feat(ask): add initial ask tool prototype and project setup

This commit is contained in:
Erik Kotsiuba
2026-04-16 17:56:01 +02:00
commit 133a0548ba
16 changed files with 4039 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
import { Type } from "@sinclair/typebox";
export const AskOptionSchema = Type.Object({
value: Type.String({
description: "Machine-readable value returned for this option",
}),
label: Type.String({ description: "Short option title shown in the list" }),
description: Type.Optional(
Type.String({ description: "Optional subtitle/description" }),
),
preview: Type.Optional(
Type.String({
description: "Optional preview text, used by richer question variants",
}),
),
});
export const AskQuestionSchema = Type.Object({
id: Type.String({ description: "Unique question identifier" }),
label: Type.Optional(
Type.String({ description: "Short tab label, e.g. Scope or Runtime" }),
),
prompt: Type.String({ description: "Full question prompt" }),
type: Type.Optional(
Type.Union(
[
Type.Literal("single"),
Type.Literal("multi"),
Type.Literal("code-review"),
],
{ description: "Question type" },
),
),
allowOther: Type.Optional(
Type.Boolean({ description: "Include a fixed 'Type something.' option" }),
),
required: Type.Optional(
Type.Boolean({
description: "Whether an answer is required before submit",
}),
),
options: Type.Array(AskOptionSchema, {
description: "Available answer options",
}),
});
export const AskParamsSchema = Type.Object({
title: Type.Optional(
Type.String({ description: "Optional title shown above the interview" }),
),
questions: Type.Array(AskQuestionSchema, {
description: "Questions to ask the user",
}),
});