@vfarcic/dot-ai 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,7 +5,7 @@ import { z } from 'zod';
|
|
|
5
5
|
import { DotAI } from '../core/index';
|
|
6
6
|
import { Logger } from '../core/error-handling';
|
|
7
7
|
export declare const ANSWERQUESTION_TOOL_NAME = "answerQuestion";
|
|
8
|
-
export declare const ANSWERQUESTION_TOOL_DESCRIPTION = "Process user answers and return remaining questions or completion status";
|
|
8
|
+
export declare const ANSWERQUESTION_TOOL_DESCRIPTION = "Process user answers and return remaining questions or completion status. For open stage, use \"open\" as the answer key.";
|
|
9
9
|
export declare const ANSWERQUESTION_TOOL_INPUT_SCHEMA: {
|
|
10
10
|
solutionId: z.ZodString;
|
|
11
11
|
stage: z.ZodEnum<["required", "basic", "advanced", "open"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"answer-question.d.ts","sourceRoot":"","sources":["../../src/tools/answer-question.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAMhD,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AACzD,eAAO,MAAM,+BAA+B,
|
|
1
|
+
{"version":3,"file":"answer-question.d.ts","sourceRoot":"","sources":["../../src/tools/answer-question.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAMhD,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AACzD,eAAO,MAAM,+BAA+B,8HAA4H,CAAC;AAGzK,eAAO,MAAM,gCAAgC;;;;CAI5C,CAAC;AA6eF;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,EAC7G,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC,CAmTxD"}
|
|
@@ -46,12 +46,12 @@ const path = __importStar(require("path"));
|
|
|
46
46
|
const session_utils_1 = require("../core/session-utils");
|
|
47
47
|
// Tool metadata for direct MCP registration
|
|
48
48
|
exports.ANSWERQUESTION_TOOL_NAME = 'answerQuestion';
|
|
49
|
-
exports.ANSWERQUESTION_TOOL_DESCRIPTION = 'Process user answers and return remaining questions or completion status';
|
|
49
|
+
exports.ANSWERQUESTION_TOOL_DESCRIPTION = 'Process user answers and return remaining questions or completion status. For open stage, use "open" as the answer key.';
|
|
50
50
|
// Zod schema for MCP registration
|
|
51
51
|
exports.ANSWERQUESTION_TOOL_INPUT_SCHEMA = {
|
|
52
52
|
solutionId: zod_1.z.string().regex(/^sol_[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{6}_[a-f0-9]+$/).describe('The solution ID to update (e.g., sol_2025-07-01T154349_1e1e242592ff)'),
|
|
53
53
|
stage: zod_1.z.enum(['required', 'basic', 'advanced', 'open']).describe('The configuration stage being addressed'),
|
|
54
|
-
answers: zod_1.z.record(zod_1.z.any()).describe('User answers to configuration questions for the specified stage')
|
|
54
|
+
answers: zod_1.z.record(zod_1.z.any()).describe('User answers to configuration questions for the specified stage. For required/basic/advanced stages, use questionId as key. For open stage, use "open" as key (e.g., {"open": "add persistent storage"})')
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
57
|
* Load solution file by ID
|
|
@@ -541,7 +541,7 @@ async function handleAnswerQuestionTool(args, dotAI, logger, requestId) {
|
|
|
541
541
|
if (args.stage === 'open') {
|
|
542
542
|
// Only allow 'open' as the question ID for open stage
|
|
543
543
|
if (questionId !== 'open') {
|
|
544
|
-
validationErrors.push(`
|
|
544
|
+
validationErrors.push(`Invalid question ID '${questionId}' for open stage. Use "open" as the key, e.g., {"open": "add persistent storage"}.`);
|
|
545
545
|
continue;
|
|
546
546
|
}
|
|
547
547
|
// Skip further validation for open stage as it doesn't follow Question interface
|