task-o-matic-core 0.1.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.
- package/README.md +646 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +46 -0
- package/dist/lib/ai-service/ai-operations.d.ts +45 -0
- package/dist/lib/ai-service/ai-operations.d.ts.map +1 -0
- package/dist/lib/ai-service/ai-operations.js +60 -0
- package/dist/lib/ai-service/base-operations.d.ts +43 -0
- package/dist/lib/ai-service/base-operations.d.ts.map +1 -0
- package/dist/lib/ai-service/base-operations.js +119 -0
- package/dist/lib/ai-service/documentation-operations.d.ts +18 -0
- package/dist/lib/ai-service/documentation-operations.d.ts.map +1 -0
- package/dist/lib/ai-service/documentation-operations.js +308 -0
- package/dist/lib/ai-service/filesystem-tools.d.ts +69 -0
- package/dist/lib/ai-service/filesystem-tools.d.ts.map +1 -0
- package/dist/lib/ai-service/filesystem-tools.js +70 -0
- package/dist/lib/ai-service/json-parser.d.ts +34 -0
- package/dist/lib/ai-service/json-parser.d.ts.map +1 -0
- package/dist/lib/ai-service/json-parser.js +177 -0
- package/dist/lib/ai-service/mcp-client.d.ts +9 -0
- package/dist/lib/ai-service/mcp-client.d.ts.map +1 -0
- package/dist/lib/ai-service/mcp-client.js +48 -0
- package/dist/lib/ai-service/model-provider.d.ts +12 -0
- package/dist/lib/ai-service/model-provider.d.ts.map +1 -0
- package/dist/lib/ai-service/model-provider.js +146 -0
- package/dist/lib/ai-service/prd-operations.d.ts +25 -0
- package/dist/lib/ai-service/prd-operations.d.ts.map +1 -0
- package/dist/lib/ai-service/prd-operations.js +592 -0
- package/dist/lib/ai-service/research-tools.d.ts +4 -0
- package/dist/lib/ai-service/research-tools.d.ts.map +1 -0
- package/dist/lib/ai-service/research-tools.js +8 -0
- package/dist/lib/ai-service/retry-handler.d.ts +8 -0
- package/dist/lib/ai-service/retry-handler.d.ts.map +1 -0
- package/dist/lib/ai-service/retry-handler.js +63 -0
- package/dist/lib/ai-service/task-operations.d.ts +13 -0
- package/dist/lib/ai-service/task-operations.d.ts.map +1 -0
- package/dist/lib/ai-service/task-operations.js +220 -0
- package/dist/lib/benchmark/registry.d.ts +11 -0
- package/dist/lib/benchmark/registry.d.ts.map +1 -0
- package/dist/lib/benchmark/registry.js +212 -0
- package/dist/lib/benchmark/runner.d.ts +6 -0
- package/dist/lib/benchmark/runner.d.ts.map +1 -0
- package/dist/lib/benchmark/runner.js +150 -0
- package/dist/lib/benchmark/storage.d.ts +13 -0
- package/dist/lib/benchmark/storage.d.ts.map +1 -0
- package/dist/lib/benchmark/storage.js +100 -0
- package/dist/lib/benchmark/types.d.ts +104 -0
- package/dist/lib/benchmark/types.d.ts.map +1 -0
- package/dist/lib/benchmark/types.js +2 -0
- package/dist/lib/better-t-stack-cli.d.ts +50 -0
- package/dist/lib/better-t-stack-cli.d.ts.map +1 -0
- package/dist/lib/better-t-stack-cli.js +428 -0
- package/dist/lib/bootstrap/cli-bootstrap.d.ts +14 -0
- package/dist/lib/bootstrap/cli-bootstrap.d.ts.map +1 -0
- package/dist/lib/bootstrap/cli-bootstrap.js +322 -0
- package/dist/lib/bootstrap/index.d.ts +3 -0
- package/dist/lib/bootstrap/index.d.ts.map +1 -0
- package/dist/lib/bootstrap/index.js +18 -0
- package/dist/lib/bootstrap/medusa-bootstrap.d.ts +14 -0
- package/dist/lib/bootstrap/medusa-bootstrap.d.ts.map +1 -0
- package/dist/lib/bootstrap/medusa-bootstrap.js +215 -0
- package/dist/lib/config-validation.d.ts +215 -0
- package/dist/lib/config-validation.d.ts.map +1 -0
- package/dist/lib/config-validation.js +254 -0
- package/dist/lib/config.d.ts +55 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +351 -0
- package/dist/lib/context-builder.d.ts +66 -0
- package/dist/lib/context-builder.d.ts.map +1 -0
- package/dist/lib/context-builder.js +322 -0
- package/dist/lib/executors/claude-code-executor.d.ts +9 -0
- package/dist/lib/executors/claude-code-executor.d.ts.map +1 -0
- package/dist/lib/executors/claude-code-executor.js +69 -0
- package/dist/lib/executors/codex-executor.d.ts +9 -0
- package/dist/lib/executors/codex-executor.d.ts.map +1 -0
- package/dist/lib/executors/codex-executor.js +73 -0
- package/dist/lib/executors/executor-factory.d.ts +5 -0
- package/dist/lib/executors/executor-factory.d.ts.map +1 -0
- package/dist/lib/executors/executor-factory.js +27 -0
- package/dist/lib/executors/gemini-executor.d.ts +9 -0
- package/dist/lib/executors/gemini-executor.d.ts.map +1 -0
- package/dist/lib/executors/gemini-executor.js +67 -0
- package/dist/lib/executors/kilo-executor.d.ts +9 -0
- package/dist/lib/executors/kilo-executor.d.ts.map +1 -0
- package/dist/lib/executors/kilo-executor.js +69 -0
- package/dist/lib/executors/opencode-executor.d.ts +9 -0
- package/dist/lib/executors/opencode-executor.d.ts.map +1 -0
- package/dist/lib/executors/opencode-executor.js +67 -0
- package/dist/lib/git-utils.d.ts +88 -0
- package/dist/lib/git-utils.d.ts.map +1 -0
- package/dist/lib/git-utils.js +242 -0
- package/dist/lib/hooks.d.ts +73 -0
- package/dist/lib/hooks.d.ts.map +1 -0
- package/dist/lib/hooks.js +62 -0
- package/dist/lib/index.d.ts +100 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +143 -0
- package/dist/lib/logger.d.ts +20 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +32 -0
- package/dist/lib/notifications.d.ts +7 -0
- package/dist/lib/notifications.d.ts.map +1 -0
- package/dist/lib/notifications.js +81 -0
- package/dist/lib/prompt-builder.d.ts +70 -0
- package/dist/lib/prompt-builder.d.ts.map +1 -0
- package/dist/lib/prompt-builder.js +344 -0
- package/dist/lib/prompt-registry.d.ts +22 -0
- package/dist/lib/prompt-registry.d.ts.map +1 -0
- package/dist/lib/prompt-registry.js +409 -0
- package/dist/lib/provider-defaults.json +32 -0
- package/dist/lib/storage/file-system.d.ts +57 -0
- package/dist/lib/storage/file-system.d.ts.map +1 -0
- package/dist/lib/storage/file-system.js +638 -0
- package/dist/lib/storage/storage-callbacks.d.ts +17 -0
- package/dist/lib/storage/storage-callbacks.d.ts.map +1 -0
- package/dist/lib/storage/storage-callbacks.js +94 -0
- package/dist/lib/storage/types.d.ts +43 -0
- package/dist/lib/storage/types.d.ts.map +1 -0
- package/dist/lib/storage/types.js +2 -0
- package/dist/lib/task-execution-core.d.ts +7 -0
- package/dist/lib/task-execution-core.d.ts.map +1 -0
- package/dist/lib/task-execution-core.js +381 -0
- package/dist/lib/task-execution.d.ts +7 -0
- package/dist/lib/task-execution.d.ts.map +1 -0
- package/dist/lib/task-execution.js +40 -0
- package/dist/lib/task-loop-execution.d.ts +7 -0
- package/dist/lib/task-loop-execution.d.ts.map +1 -0
- package/dist/lib/task-loop-execution.js +156 -0
- package/dist/lib/task-planning.d.ts +29 -0
- package/dist/lib/task-planning.d.ts.map +1 -0
- package/dist/lib/task-planning.js +103 -0
- package/dist/lib/task-review.d.ts +27 -0
- package/dist/lib/task-review.d.ts.map +1 -0
- package/dist/lib/task-review.js +103 -0
- package/dist/lib/validation.d.ts +26 -0
- package/dist/lib/validation.d.ts.map +1 -0
- package/dist/lib/validation.js +98 -0
- package/dist/prompts/documentation-detection.d.ts +2 -0
- package/dist/prompts/documentation-detection.d.ts.map +1 -0
- package/dist/prompts/documentation-detection.js +24 -0
- package/dist/prompts/documentation-recap.d.ts +3 -0
- package/dist/prompts/documentation-recap.d.ts.map +1 -0
- package/dist/prompts/documentation-recap.js +13 -0
- package/dist/prompts/index.d.ts +15 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +30 -0
- package/dist/prompts/prd-combination.d.ts +2 -0
- package/dist/prompts/prd-combination.d.ts.map +1 -0
- package/dist/prompts/prd-combination.js +35 -0
- package/dist/prompts/prd-generation.d.ts +2 -0
- package/dist/prompts/prd-generation.d.ts.map +1 -0
- package/dist/prompts/prd-generation.js +49 -0
- package/dist/prompts/prd-parsing.d.ts +3 -0
- package/dist/prompts/prd-parsing.d.ts.map +1 -0
- package/dist/prompts/prd-parsing.js +172 -0
- package/dist/prompts/prd-question-answer.d.ts +3 -0
- package/dist/prompts/prd-question-answer.d.ts.map +1 -0
- package/dist/prompts/prd-question-answer.js +27 -0
- package/dist/prompts/prd-question.d.ts +3 -0
- package/dist/prompts/prd-question.d.ts.map +1 -0
- package/dist/prompts/prd-question.js +40 -0
- package/dist/prompts/prd-rework.d.ts +3 -0
- package/dist/prompts/prd-rework.d.ts.map +1 -0
- package/dist/prompts/prd-rework.js +81 -0
- package/dist/prompts/prd-suggest-stack.d.ts +3 -0
- package/dist/prompts/prd-suggest-stack.d.ts.map +1 -0
- package/dist/prompts/prd-suggest-stack.js +99 -0
- package/dist/prompts/task-breakdown.d.ts +3 -0
- package/dist/prompts/task-breakdown.d.ts.map +1 -0
- package/dist/prompts/task-breakdown.js +151 -0
- package/dist/prompts/task-enhancement.d.ts +3 -0
- package/dist/prompts/task-enhancement.d.ts.map +1 -0
- package/dist/prompts/task-enhancement.js +140 -0
- package/dist/prompts/task-execution.d.ts +3 -0
- package/dist/prompts/task-execution.d.ts.map +1 -0
- package/dist/prompts/task-execution.js +24 -0
- package/dist/prompts/task-planning.d.ts +3 -0
- package/dist/prompts/task-planning.d.ts.map +1 -0
- package/dist/prompts/task-planning.js +66 -0
- package/dist/prompts/workflow-assistance.d.ts +32 -0
- package/dist/prompts/workflow-assistance.d.ts.map +1 -0
- package/dist/prompts/workflow-assistance.js +130 -0
- package/dist/prompts/workflow-prompts.d.ts +9 -0
- package/dist/prompts/workflow-prompts.d.ts.map +1 -0
- package/dist/prompts/workflow-prompts.js +93 -0
- package/dist/services/benchmark.d.ts +26 -0
- package/dist/services/benchmark.d.ts.map +1 -0
- package/dist/services/benchmark.js +343 -0
- package/dist/services/prd.d.ts +136 -0
- package/dist/services/prd.d.ts.map +1 -0
- package/dist/services/prd.js +550 -0
- package/dist/services/tasks.d.ts +388 -0
- package/dist/services/tasks.d.ts.map +1 -0
- package/dist/services/tasks.js +1150 -0
- package/dist/services/workflow-ai-assistant.d.ts +74 -0
- package/dist/services/workflow-ai-assistant.d.ts.map +1 -0
- package/dist/services/workflow-ai-assistant.js +175 -0
- package/dist/services/workflow-benchmark.d.ts +34 -0
- package/dist/services/workflow-benchmark.d.ts.map +1 -0
- package/dist/services/workflow-benchmark.js +318 -0
- package/dist/services/workflow.d.ts +107 -0
- package/dist/services/workflow.d.ts.map +1 -0
- package/dist/services/workflow.js +580 -0
- package/dist/test/hooks.test.d.ts +2 -0
- package/dist/test/hooks.test.d.ts.map +1 -0
- package/dist/test/hooks.test.js +67 -0
- package/dist/test/integration/callbacks.test.d.ts +2 -0
- package/dist/test/integration/callbacks.test.d.ts.map +1 -0
- package/dist/test/integration/callbacks.test.js +64 -0
- package/dist/test/lib/ai-service/task-operations.test.d.ts +2 -0
- package/dist/test/lib/ai-service/task-operations.test.d.ts.map +1 -0
- package/dist/test/lib/ai-service/task-operations.test.js +362 -0
- package/dist/test/lib/config.test.d.ts +2 -0
- package/dist/test/lib/config.test.d.ts.map +1 -0
- package/dist/test/lib/config.test.js +128 -0
- package/dist/test/lib/git-utils.test.d.ts +2 -0
- package/dist/test/lib/git-utils.test.d.ts.map +1 -0
- package/dist/test/lib/git-utils.test.js +168 -0
- package/dist/test/mocks/mock-ai-operations.d.ts +15 -0
- package/dist/test/mocks/mock-ai-operations.d.ts.map +1 -0
- package/dist/test/mocks/mock-ai-operations.js +107 -0
- package/dist/test/mocks/mock-context-builder.d.ts +10 -0
- package/dist/test/mocks/mock-context-builder.d.ts.map +1 -0
- package/dist/test/mocks/mock-context-builder.js +81 -0
- package/dist/test/mocks/mock-model-provider.d.ts +7 -0
- package/dist/test/mocks/mock-model-provider.d.ts.map +1 -0
- package/dist/test/mocks/mock-model-provider.js +21 -0
- package/dist/test/mocks/mock-service-factory.d.ts +11 -0
- package/dist/test/mocks/mock-service-factory.d.ts.map +1 -0
- package/dist/test/mocks/mock-service-factory.js +61 -0
- package/dist/test/mocks/mock-storage.d.ts +50 -0
- package/dist/test/mocks/mock-storage.d.ts.map +1 -0
- package/dist/test/mocks/mock-storage.js +145 -0
- package/dist/test/model-parsing.test.d.ts +2 -0
- package/dist/test/model-parsing.test.d.ts.map +1 -0
- package/dist/test/model-parsing.test.js +73 -0
- package/dist/test/services/task-service.test.d.ts +2 -0
- package/dist/test/services/task-service.test.d.ts.map +1 -0
- package/dist/test/services/task-service.test.js +459 -0
- package/dist/test/storage.test.d.ts +2 -0
- package/dist/test/storage.test.d.ts.map +1 -0
- package/dist/test/storage.test.js +207 -0
- package/dist/test/task-loop-git.test.d.ts +2 -0
- package/dist/test/task-loop-git.test.d.ts.map +1 -0
- package/dist/test/task-loop-git.test.js +95 -0
- package/dist/test/test-mock-setup.d.ts +26 -0
- package/dist/test/test-mock-setup.d.ts.map +1 -0
- package/dist/test/test-mock-setup.js +41 -0
- package/dist/test/test-setup.d.ts +9 -0
- package/dist/test/test-setup.d.ts.map +1 -0
- package/dist/test/test-setup.js +44 -0
- package/dist/test/test-utils.d.ts +22 -0
- package/dist/test/test-utils.d.ts.map +1 -0
- package/dist/test/test-utils.js +37 -0
- package/dist/test/utils/ai-operation-utility.test.d.ts +2 -0
- package/dist/test/utils/ai-operation-utility.test.d.ts.map +1 -0
- package/dist/test/utils/ai-operation-utility.test.js +290 -0
- package/dist/test/utils/error-handling.test.d.ts +2 -0
- package/dist/test/utils/error-handling.test.d.ts.map +1 -0
- package/dist/test/utils/error-handling.test.js +231 -0
- package/dist/test/utils/file-utils.test.d.ts +2 -0
- package/dist/test/utils/file-utils.test.d.ts.map +1 -0
- package/dist/test/utils/file-utils.test.js +76 -0
- package/dist/test/utils/id-generator.test.d.ts +2 -0
- package/dist/test/utils/id-generator.test.d.ts.map +1 -0
- package/dist/test/utils/id-generator.test.js +41 -0
- package/dist/test/utils/model-parser.test.d.ts +2 -0
- package/dist/test/utils/model-parser.test.d.ts.map +1 -0
- package/dist/test/utils/model-parser.test.js +65 -0
- package/dist/test/validation.test.d.ts +2 -0
- package/dist/test/validation.test.d.ts.map +1 -0
- package/dist/test/validation.test.js +22 -0
- package/dist/types/callbacks.d.ts +30 -0
- package/dist/types/callbacks.d.ts.map +1 -0
- package/dist/types/callbacks.js +2 -0
- package/dist/types/index.d.ts +435 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +30 -0
- package/dist/types/mcp.d.ts +3 -0
- package/dist/types/mcp.d.ts.map +1 -0
- package/dist/types/mcp.js +3 -0
- package/dist/types/options.d.ts +112 -0
- package/dist/types/options.d.ts.map +1 -0
- package/dist/types/options.js +2 -0
- package/dist/types/results.d.ts +200 -0
- package/dist/types/results.d.ts.map +1 -0
- package/dist/types/results.js +2 -0
- package/dist/types/workflow-options.d.ts +82 -0
- package/dist/types/workflow-options.d.ts.map +1 -0
- package/dist/types/workflow-options.js +2 -0
- package/dist/types/workflow-results.d.ts +82 -0
- package/dist/types/workflow-results.d.ts.map +1 -0
- package/dist/types/workflow-results.js +2 -0
- package/dist/utils/ai-config-builder.d.ts +14 -0
- package/dist/utils/ai-config-builder.d.ts.map +1 -0
- package/dist/utils/ai-config-builder.js +22 -0
- package/dist/utils/ai-operation-utility.d.ts +142 -0
- package/dist/utils/ai-operation-utility.d.ts.map +1 -0
- package/dist/utils/ai-operation-utility.js +303 -0
- package/dist/utils/ai-service-factory.d.ts +34 -0
- package/dist/utils/ai-service-factory.d.ts.map +1 -0
- package/dist/utils/ai-service-factory.js +99 -0
- package/dist/utils/error-utils.d.ts +70 -0
- package/dist/utils/error-utils.d.ts.map +1 -0
- package/dist/utils/error-utils.js +104 -0
- package/dist/utils/file-utils.d.ts +107 -0
- package/dist/utils/file-utils.d.ts.map +1 -0
- package/dist/utils/file-utils.js +171 -0
- package/dist/utils/id-generator.d.ts +92 -0
- package/dist/utils/id-generator.d.ts.map +1 -0
- package/dist/utils/id-generator.js +146 -0
- package/dist/utils/metadata-utils.d.ts +40 -0
- package/dist/utils/metadata-utils.d.ts.map +1 -0
- package/dist/utils/metadata-utils.js +43 -0
- package/dist/utils/model-executor-parser.d.ts +38 -0
- package/dist/utils/model-executor-parser.d.ts.map +1 -0
- package/dist/utils/model-executor-parser.js +69 -0
- package/dist/utils/model-parser.d.ts +6 -0
- package/dist/utils/model-parser.d.ts.map +1 -0
- package/dist/utils/model-parser.js +49 -0
- package/dist/utils/stack-formatter.d.ts +12 -0
- package/dist/utils/stack-formatter.d.ts.map +1 -0
- package/dist/utils/stack-formatter.js +36 -0
- package/dist/utils/storage-utils.d.ts +49 -0
- package/dist/utils/storage-utils.d.ts.map +1 -0
- package/dist/utils/storage-utils.js +80 -0
- package/dist/utils/streaming-utils.d.ts +38 -0
- package/dist/utils/streaming-utils.d.ts.map +1 -0
- package/dist/utils/streaming-utils.js +64 -0
- package/dist/utils/task-o-matic-error.d.ts +206 -0
- package/dist/utils/task-o-matic-error.d.ts.map +1 -0
- package/dist/utils/task-o-matic-error.js +304 -0
- package/package.json +40 -0
- package/src/index.ts +36 -0
- package/src/lib/ai-service/ai-operations.ts +310 -0
- package/src/lib/ai-service/base-operations.ts +139 -0
- package/src/lib/ai-service/documentation-operations.ts +438 -0
- package/src/lib/ai-service/filesystem-tools.ts +73 -0
- package/src/lib/ai-service/gemini-proxy.ts.bak +52 -0
- package/src/lib/ai-service/json-parser.ts +203 -0
- package/src/lib/ai-service/mcp-client.ts +54 -0
- package/src/lib/ai-service/model-provider.ts +192 -0
- package/src/lib/ai-service/prd-operations.ts +854 -0
- package/src/lib/ai-service/research-tools.ts +207 -0
- package/src/lib/ai-service/retry-handler.ts +89 -0
- package/src/lib/ai-service/task-operations.ts +342 -0
- package/src/lib/benchmark/registry.ts +307 -0
- package/src/lib/benchmark/runner.ts +190 -0
- package/src/lib/benchmark/storage.ts +140 -0
- package/src/lib/benchmark/types.ts +121 -0
- package/src/lib/better-t-stack-cli.ts +524 -0
- package/src/lib/bootstrap/cli-bootstrap.ts +397 -0
- package/src/lib/bootstrap/index.ts +2 -0
- package/src/lib/bootstrap/medusa-bootstrap.ts +261 -0
- package/src/lib/config-validation.ts +278 -0
- package/src/lib/config.ts +435 -0
- package/src/lib/context-builder.ts +383 -0
- package/src/lib/executors/claude-code-executor.ts +83 -0
- package/src/lib/executors/codex-executor.ts +85 -0
- package/src/lib/executors/executor-factory.ts +28 -0
- package/src/lib/executors/gemini-executor.ts +80 -0
- package/src/lib/executors/kilo-executor.ts +83 -0
- package/src/lib/executors/opencode-executor.ts +81 -0
- package/src/lib/git-utils.ts +334 -0
- package/src/lib/hooks.ts +121 -0
- package/src/lib/index.ts +166 -0
- package/src/lib/logger.ts +43 -0
- package/src/lib/notifications.ts +103 -0
- package/src/lib/prompt-builder.ts +471 -0
- package/src/lib/prompt-registry.ts +491 -0
- package/src/lib/provider-defaults.json +32 -0
- package/src/lib/storage/file-system.ts +864 -0
- package/src/lib/storage/storage-callbacks.ts +120 -0
- package/src/lib/storage/types.ts +58 -0
- package/src/lib/task-execution-core.ts +591 -0
- package/src/lib/task-execution.ts +59 -0
- package/src/lib/task-loop-execution.ts +214 -0
- package/src/lib/task-planning.ts +157 -0
- package/src/lib/task-review.ts +138 -0
- package/src/lib/validation.ts +140 -0
- package/src/prompts/documentation-detection.ts +21 -0
- package/src/prompts/documentation-recap.ts +11 -0
- package/src/prompts/index.ts +14 -0
- package/src/prompts/prd-combination.ts +32 -0
- package/src/prompts/prd-generation.ts +46 -0
- package/src/prompts/prd-parsing.ts +170 -0
- package/src/prompts/prd-question-answer.ts +25 -0
- package/src/prompts/prd-question.ts +38 -0
- package/src/prompts/prd-rework.ts +79 -0
- package/src/prompts/prd-suggest-stack.ts +97 -0
- package/src/prompts/task-breakdown.ts +149 -0
- package/src/prompts/task-enhancement.ts +138 -0
- package/src/prompts/task-execution.ts +22 -0
- package/src/prompts/task-planning.ts +64 -0
- package/src/prompts/workflow-assistance.ts +151 -0
- package/src/prompts/workflow-prompts.ts +97 -0
- package/src/services/benchmark.ts +433 -0
- package/src/services/prd.ts +845 -0
- package/src/services/tasks.ts +1515 -0
- package/src/services/workflow-ai-assistant.ts +298 -0
- package/src/services/workflow-benchmark.ts +339 -0
- package/src/services/workflow.ts +779 -0
- package/src/test/hooks.test.ts +77 -0
- package/src/test/integration/callbacks.test.ts +39 -0
- package/src/test/lib/ai-service/task-operations.test.ts +430 -0
- package/src/test/lib/config.test.ts +150 -0
- package/src/test/lib/git-utils.test.ts +198 -0
- package/src/test/mocks/mock-ai-operations.ts +205 -0
- package/src/test/mocks/mock-context-builder.ts +84 -0
- package/src/test/mocks/mock-model-provider.ts +21 -0
- package/src/test/mocks/mock-service-factory.ts +64 -0
- package/src/test/mocks/mock-storage.ts +204 -0
- package/src/test/model-parsing.test.ts +78 -0
- package/src/test/services/task-service.test.ts +551 -0
- package/src/test/storage.test.ts +206 -0
- package/src/test/task-loop-git.test.ts +142 -0
- package/src/test/test-mock-setup.ts +46 -0
- package/src/test/test-setup.ts +48 -0
- package/src/test/test-utils.ts +45 -0
- package/src/test/utils/ai-operation-utility.test.ts +306 -0
- package/src/test/utils/error-handling.test.ts +241 -0
- package/src/test/utils/file-utils.test.ts +80 -0
- package/src/test/utils/id-generator.test.ts +44 -0
- package/src/test/utils/model-parser.test.ts +67 -0
- package/src/test/validation.test.ts +19 -0
- package/src/types/callbacks.ts +14 -0
- package/src/types/index.ts +628 -0
- package/src/types/mcp.ts +5 -0
- package/src/types/options.ts +165 -0
- package/src/types/results.ts +216 -0
- package/src/types/workflow-options.ts +113 -0
- package/src/types/workflow-results.ts +87 -0
- package/src/utils/ai-config-builder.ts +33 -0
- package/src/utils/ai-operation-utility.ts +380 -0
- package/src/utils/ai-service-factory.ts +125 -0
- package/src/utils/error-utils.ts +124 -0
- package/src/utils/file-utils.ts +197 -0
- package/src/utils/id-generator.ts +168 -0
- package/src/utils/metadata-utils.ts +48 -0
- package/src/utils/model-executor-parser.ts +80 -0
- package/src/utils/model-parser.ts +58 -0
- package/src/utils/stack-formatter.ts +53 -0
- package/src/utils/storage-utils.ts +94 -0
- package/src/utils/streaming-utils.ts +91 -0
- package/src/utils/task-o-matic-error.ts +393 -0
- package/tsconfig.json +20 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PRD_PARSING_PROMPT,
|
|
3
|
+
PRD_PARSING_SYSTEM_PROMPT,
|
|
4
|
+
TASK_BREAKDOWN_PROMPT,
|
|
5
|
+
TASK_BREAKDOWN_SYSTEM_PROMPT,
|
|
6
|
+
TASK_ENHANCEMENT_PROMPT,
|
|
7
|
+
TASK_ENHANCEMENT_SYSTEM_PROMPT,
|
|
8
|
+
PRD_REWORK_PROMPT,
|
|
9
|
+
PRD_REWORK_SYSTEM_PROMPT,
|
|
10
|
+
DOCUMENTATION_DETECTION_PROMPT,
|
|
11
|
+
TASK_PLANNING_PROMPT,
|
|
12
|
+
TASK_PLANNING_SYSTEM_PROMPT,
|
|
13
|
+
TASK_EXECUTION_PROMPT,
|
|
14
|
+
TASK_EXECUTION_SYSTEM_PROMPT,
|
|
15
|
+
PRD_QUESTION_PROMPT,
|
|
16
|
+
PRD_QUESTION_SYSTEM_PROMPT,
|
|
17
|
+
DOCUMENTATION_RECAP_PROMPT,
|
|
18
|
+
DOCUMENTATION_RECAP_SYSTEM_PROMPT,
|
|
19
|
+
PRD_QUESTION_ANSWER_PROMPT,
|
|
20
|
+
PRD_QUESTION_ANSWER_SYSTEM_PROMPT,
|
|
21
|
+
PROJECT_INIT_SUGGESTION_PROMPT,
|
|
22
|
+
PROJECT_INIT_SUGGESTION_SYSTEM_PROMPT,
|
|
23
|
+
PRD_IMPROVEMENT_PROMPT,
|
|
24
|
+
PRD_IMPROVEMENT_SYSTEM_PROMPT,
|
|
25
|
+
TASK_PRIORITIZATION_PROMPT,
|
|
26
|
+
TASK_PRIORITIZATION_SYSTEM_PROMPT,
|
|
27
|
+
TASK_SPLITTING_ASSISTANCE_PROMPT,
|
|
28
|
+
TASK_SPLITTING_ASSISTANCE_SYSTEM_PROMPT,
|
|
29
|
+
PRD_SUGGEST_STACK_PROMPT,
|
|
30
|
+
PRD_SUGGEST_STACK_SYSTEM_PROMPT,
|
|
31
|
+
} from "../prompts";
|
|
32
|
+
|
|
33
|
+
export interface PromptMetadata {
|
|
34
|
+
name: string;
|
|
35
|
+
description: string;
|
|
36
|
+
type: "system" | "user";
|
|
37
|
+
requiredVariables: string[];
|
|
38
|
+
optionalVariables: string[];
|
|
39
|
+
promptText: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export class PromptRegistry {
|
|
43
|
+
private static prompts: Map<string, PromptMetadata> = new Map([
|
|
44
|
+
// PRD Parsing Prompts
|
|
45
|
+
[
|
|
46
|
+
"prd-parsing",
|
|
47
|
+
{
|
|
48
|
+
name: "prd-parsing",
|
|
49
|
+
description: "Parse PRD into structured tasks with dependency analysis",
|
|
50
|
+
type: "user",
|
|
51
|
+
requiredVariables: ["PRD_CONTENT"],
|
|
52
|
+
optionalVariables: ["STACK_INFO"],
|
|
53
|
+
promptText: PRD_PARSING_PROMPT,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
[
|
|
57
|
+
"prd-parsing-system",
|
|
58
|
+
{
|
|
59
|
+
name: "prd-parsing-system",
|
|
60
|
+
description: "System prompt for PRD parsing with task breakdown rules",
|
|
61
|
+
type: "system",
|
|
62
|
+
requiredVariables: [],
|
|
63
|
+
optionalVariables: [],
|
|
64
|
+
promptText: PRD_PARSING_SYSTEM_PROMPT,
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
|
|
68
|
+
// Task Enhancement Prompts
|
|
69
|
+
[
|
|
70
|
+
"task-enhancement",
|
|
71
|
+
{
|
|
72
|
+
name: "task-enhancement",
|
|
73
|
+
description: "Enhance task description with Context7 documentation",
|
|
74
|
+
type: "user",
|
|
75
|
+
requiredVariables: ["TASK_TITLE"],
|
|
76
|
+
optionalVariables: ["TASK_DESCRIPTION", "CONTEXT_INFO", "PRD_CONTENT"],
|
|
77
|
+
promptText: TASK_ENHANCEMENT_PROMPT,
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
[
|
|
81
|
+
"task-enhancement-system",
|
|
82
|
+
{
|
|
83
|
+
name: "task-enhancement-system",
|
|
84
|
+
description:
|
|
85
|
+
"System prompt for task enhancement with documentation integration",
|
|
86
|
+
type: "system",
|
|
87
|
+
requiredVariables: [],
|
|
88
|
+
optionalVariables: [],
|
|
89
|
+
promptText: TASK_ENHANCEMENT_SYSTEM_PROMPT,
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
|
|
93
|
+
// Task Breakdown Prompts
|
|
94
|
+
[
|
|
95
|
+
"task-breakdown",
|
|
96
|
+
{
|
|
97
|
+
name: "task-breakdown",
|
|
98
|
+
description: "Break down complex tasks into smaller subtasks",
|
|
99
|
+
type: "user",
|
|
100
|
+
requiredVariables: ["TASK_TITLE"],
|
|
101
|
+
optionalVariables: ["TASK_DESCRIPTION"],
|
|
102
|
+
promptText: TASK_BREAKDOWN_PROMPT,
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
[
|
|
106
|
+
"task-breakdown-system",
|
|
107
|
+
{
|
|
108
|
+
name: "task-breakdown-system",
|
|
109
|
+
description: "System prompt for task breakdown methodology",
|
|
110
|
+
type: "system",
|
|
111
|
+
requiredVariables: [],
|
|
112
|
+
optionalVariables: [],
|
|
113
|
+
promptText: TASK_BREAKDOWN_SYSTEM_PROMPT,
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
|
|
117
|
+
// PRD Rework Prompts
|
|
118
|
+
[
|
|
119
|
+
"prd-rework",
|
|
120
|
+
{
|
|
121
|
+
name: "prd-rework",
|
|
122
|
+
description: "Improve PRD based on user feedback",
|
|
123
|
+
type: "user",
|
|
124
|
+
requiredVariables: ["PRD_CONTENT", "USER_FEEDBACK"],
|
|
125
|
+
optionalVariables: ["STACK_INFO"],
|
|
126
|
+
promptText: PRD_REWORK_PROMPT,
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
[
|
|
130
|
+
"prd-rework-system",
|
|
131
|
+
{
|
|
132
|
+
name: "prd-rework-system",
|
|
133
|
+
description: "System prompt for PRD improvement and enhancement",
|
|
134
|
+
type: "system",
|
|
135
|
+
requiredVariables: [],
|
|
136
|
+
optionalVariables: [],
|
|
137
|
+
promptText: PRD_REWORK_SYSTEM_PROMPT,
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
|
|
141
|
+
// Documentation Detection Prompts
|
|
142
|
+
[
|
|
143
|
+
"documentation-detection",
|
|
144
|
+
{
|
|
145
|
+
name: "documentation-detection",
|
|
146
|
+
description:
|
|
147
|
+
"Analyze task and identify required documentation libraries",
|
|
148
|
+
type: "user",
|
|
149
|
+
requiredVariables: ["TASK_TITLE"],
|
|
150
|
+
optionalVariables: ["TASK_DESCRIPTION", "STACK_INFO"],
|
|
151
|
+
promptText: DOCUMENTATION_DETECTION_PROMPT,
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
|
|
155
|
+
// Task Planning Prompts
|
|
156
|
+
[
|
|
157
|
+
"task-planning",
|
|
158
|
+
{
|
|
159
|
+
name: "task-planning",
|
|
160
|
+
description: "Create detailed implementation plan for task or subtask",
|
|
161
|
+
type: "user",
|
|
162
|
+
requiredVariables: ["TASK_CONTEXT", "TASK_DETAILS"],
|
|
163
|
+
optionalVariables: [],
|
|
164
|
+
promptText: TASK_PLANNING_PROMPT,
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
[
|
|
168
|
+
"task-planning-system",
|
|
169
|
+
{
|
|
170
|
+
name: "task-planning-system",
|
|
171
|
+
description: "System prompt for detailed task implementation planning",
|
|
172
|
+
type: "system",
|
|
173
|
+
requiredVariables: [],
|
|
174
|
+
optionalVariables: [],
|
|
175
|
+
promptText: TASK_PLANNING_SYSTEM_PROMPT,
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
|
|
179
|
+
// Task Execution Prompts
|
|
180
|
+
[
|
|
181
|
+
"task-execution",
|
|
182
|
+
{
|
|
183
|
+
name: "task-execution",
|
|
184
|
+
description: "Execute task with full project context",
|
|
185
|
+
type: "user",
|
|
186
|
+
requiredVariables: ["TASK_PLAN", "STACK_INFO"],
|
|
187
|
+
optionalVariables: [
|
|
188
|
+
"RETRY_CONTEXT",
|
|
189
|
+
"DOCUMENTATION_CONTEXT",
|
|
190
|
+
"PRD_CONTENT",
|
|
191
|
+
],
|
|
192
|
+
promptText: TASK_EXECUTION_PROMPT,
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
[
|
|
196
|
+
"task-execution-system",
|
|
197
|
+
{
|
|
198
|
+
name: "task-execution-system",
|
|
199
|
+
description: "System prompt for task execution",
|
|
200
|
+
type: "system",
|
|
201
|
+
requiredVariables: [],
|
|
202
|
+
optionalVariables: [],
|
|
203
|
+
promptText: TASK_EXECUTION_SYSTEM_PROMPT,
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
|
|
207
|
+
// PRD Question Prompts
|
|
208
|
+
[
|
|
209
|
+
"prd-question",
|
|
210
|
+
{
|
|
211
|
+
name: "prd-question",
|
|
212
|
+
description: "Generate clarifying questions for PRD",
|
|
213
|
+
type: "user",
|
|
214
|
+
requiredVariables: ["PRD_CONTENT"],
|
|
215
|
+
optionalVariables: ["STACK_INFO"],
|
|
216
|
+
promptText: PRD_QUESTION_PROMPT,
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
[
|
|
220
|
+
"prd-question-system",
|
|
221
|
+
{
|
|
222
|
+
name: "prd-question-system",
|
|
223
|
+
description: "System prompt for PRD questioning",
|
|
224
|
+
type: "system",
|
|
225
|
+
requiredVariables: [],
|
|
226
|
+
optionalVariables: [],
|
|
227
|
+
promptText: PRD_QUESTION_SYSTEM_PROMPT,
|
|
228
|
+
},
|
|
229
|
+
],
|
|
230
|
+
|
|
231
|
+
// Documentation Recap Prompts
|
|
232
|
+
[
|
|
233
|
+
"documentation-recap",
|
|
234
|
+
{
|
|
235
|
+
name: "documentation-recap",
|
|
236
|
+
description: "Create concise recap of fetched documentation",
|
|
237
|
+
type: "user",
|
|
238
|
+
requiredVariables: ["LIBRARIES_LIST", "DOCUMENTATION_CONTENTS"],
|
|
239
|
+
optionalVariables: [],
|
|
240
|
+
promptText: DOCUMENTATION_RECAP_PROMPT,
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
[
|
|
244
|
+
"documentation-recap-system",
|
|
245
|
+
{
|
|
246
|
+
name: "documentation-recap-system",
|
|
247
|
+
description: "System prompt for documentation recap",
|
|
248
|
+
type: "system",
|
|
249
|
+
requiredVariables: [],
|
|
250
|
+
optionalVariables: [],
|
|
251
|
+
promptText: DOCUMENTATION_RECAP_SYSTEM_PROMPT,
|
|
252
|
+
},
|
|
253
|
+
],
|
|
254
|
+
|
|
255
|
+
// PRD Question Answer Prompts
|
|
256
|
+
[
|
|
257
|
+
"prd-question-answer",
|
|
258
|
+
{
|
|
259
|
+
name: "prd-question-answer",
|
|
260
|
+
description: "Answer questions about PRD",
|
|
261
|
+
type: "user",
|
|
262
|
+
requiredVariables: ["PRD_CONTENT", "QUESTIONS_TEXT"],
|
|
263
|
+
optionalVariables: ["CONTEXT_TEXT"],
|
|
264
|
+
promptText: PRD_QUESTION_ANSWER_PROMPT,
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
[
|
|
268
|
+
"prd-question-answer-system",
|
|
269
|
+
{
|
|
270
|
+
name: "prd-question-answer-system",
|
|
271
|
+
description: "System prompt for PRD question answering",
|
|
272
|
+
type: "system",
|
|
273
|
+
requiredVariables: [],
|
|
274
|
+
optionalVariables: [],
|
|
275
|
+
promptText: PRD_QUESTION_ANSWER_SYSTEM_PROMPT,
|
|
276
|
+
},
|
|
277
|
+
],
|
|
278
|
+
|
|
279
|
+
// Workflow Prompts
|
|
280
|
+
[
|
|
281
|
+
"project-init-suggestion",
|
|
282
|
+
{
|
|
283
|
+
name: "project-init-suggestion",
|
|
284
|
+
description: "Suggest project initialization configuration",
|
|
285
|
+
type: "user",
|
|
286
|
+
requiredVariables: ["USER_DESCRIPTION"],
|
|
287
|
+
optionalVariables: [],
|
|
288
|
+
promptText: PROJECT_INIT_SUGGESTION_PROMPT,
|
|
289
|
+
},
|
|
290
|
+
],
|
|
291
|
+
[
|
|
292
|
+
"project-init-suggestion-system",
|
|
293
|
+
{
|
|
294
|
+
name: "project-init-suggestion-system",
|
|
295
|
+
description: "System prompt for project initialization",
|
|
296
|
+
type: "system",
|
|
297
|
+
requiredVariables: [],
|
|
298
|
+
optionalVariables: [],
|
|
299
|
+
promptText: PROJECT_INIT_SUGGESTION_SYSTEM_PROMPT,
|
|
300
|
+
},
|
|
301
|
+
],
|
|
302
|
+
[
|
|
303
|
+
"prd-improvement",
|
|
304
|
+
{
|
|
305
|
+
name: "prd-improvement",
|
|
306
|
+
description: "Improve PRD based on user feedback",
|
|
307
|
+
type: "user",
|
|
308
|
+
requiredVariables: ["CURRENT_PRD", "USER_FEEDBACK"],
|
|
309
|
+
optionalVariables: [],
|
|
310
|
+
promptText: PRD_IMPROVEMENT_PROMPT,
|
|
311
|
+
},
|
|
312
|
+
],
|
|
313
|
+
[
|
|
314
|
+
"prd-improvement-system",
|
|
315
|
+
{
|
|
316
|
+
name: "prd-improvement-system",
|
|
317
|
+
description: "System prompt for PRD improvement",
|
|
318
|
+
type: "system",
|
|
319
|
+
requiredVariables: [],
|
|
320
|
+
optionalVariables: [],
|
|
321
|
+
promptText: PRD_IMPROVEMENT_SYSTEM_PROMPT,
|
|
322
|
+
},
|
|
323
|
+
],
|
|
324
|
+
[
|
|
325
|
+
"task-prioritization",
|
|
326
|
+
{
|
|
327
|
+
name: "task-prioritization",
|
|
328
|
+
description: "Prioritize tasks based on user guidance",
|
|
329
|
+
type: "user",
|
|
330
|
+
requiredVariables: ["TASKS_DESCRIPTION", "USER_GUIDANCE"],
|
|
331
|
+
optionalVariables: [],
|
|
332
|
+
promptText: TASK_PRIORITIZATION_PROMPT,
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
[
|
|
336
|
+
"task-prioritization-system",
|
|
337
|
+
{
|
|
338
|
+
name: "task-prioritization-system",
|
|
339
|
+
description: "System prompt for task prioritization",
|
|
340
|
+
type: "system",
|
|
341
|
+
requiredVariables: [],
|
|
342
|
+
optionalVariables: [],
|
|
343
|
+
promptText: TASK_PRIORITIZATION_SYSTEM_PROMPT,
|
|
344
|
+
},
|
|
345
|
+
],
|
|
346
|
+
[
|
|
347
|
+
"task-splitting-assistance",
|
|
348
|
+
{
|
|
349
|
+
name: "task-splitting-assistance",
|
|
350
|
+
description: "Generate task splitting instructions",
|
|
351
|
+
type: "user",
|
|
352
|
+
requiredVariables: ["TASK_TITLE", "USER_GUIDANCE"],
|
|
353
|
+
optionalVariables: ["TASK_CONTENT"],
|
|
354
|
+
promptText: TASK_SPLITTING_ASSISTANCE_PROMPT,
|
|
355
|
+
},
|
|
356
|
+
],
|
|
357
|
+
[
|
|
358
|
+
"task-splitting-assistance-system",
|
|
359
|
+
{
|
|
360
|
+
name: "task-splitting-assistance-system",
|
|
361
|
+
description: "System prompt for task splitting assistance",
|
|
362
|
+
type: "system",
|
|
363
|
+
requiredVariables: [],
|
|
364
|
+
optionalVariables: [],
|
|
365
|
+
promptText: TASK_SPLITTING_ASSISTANCE_SYSTEM_PROMPT,
|
|
366
|
+
},
|
|
367
|
+
],
|
|
368
|
+
|
|
369
|
+
// PRD Stack Suggestion Prompts
|
|
370
|
+
[
|
|
371
|
+
"prd-suggest-stack",
|
|
372
|
+
{
|
|
373
|
+
name: "prd-suggest-stack",
|
|
374
|
+
description: "Suggest technology stack based on PRD analysis",
|
|
375
|
+
type: "user",
|
|
376
|
+
requiredVariables: ["PRD_CONTENT"],
|
|
377
|
+
optionalVariables: ["STACK_INFO", "PROJECT_NAME"],
|
|
378
|
+
promptText: PRD_SUGGEST_STACK_PROMPT,
|
|
379
|
+
},
|
|
380
|
+
],
|
|
381
|
+
[
|
|
382
|
+
"prd-suggest-stack-system",
|
|
383
|
+
{
|
|
384
|
+
name: "prd-suggest-stack-system",
|
|
385
|
+
description: "System prompt for PRD stack suggestion",
|
|
386
|
+
type: "system",
|
|
387
|
+
requiredVariables: [],
|
|
388
|
+
optionalVariables: [],
|
|
389
|
+
promptText: PRD_SUGGEST_STACK_SYSTEM_PROMPT,
|
|
390
|
+
},
|
|
391
|
+
],
|
|
392
|
+
]);
|
|
393
|
+
|
|
394
|
+
static getPrompt(name: string): PromptMetadata | undefined {
|
|
395
|
+
return this.prompts.get(name);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
static getAllPrompts(): PromptMetadata[] {
|
|
399
|
+
return Array.from(this.prompts.values());
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
static getPromptsByType(type: "system" | "user"): PromptMetadata[] {
|
|
403
|
+
return Array.from(this.prompts.values()).filter(
|
|
404
|
+
(prompt) => prompt.type === type
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
static hasPrompt(name: string): boolean {
|
|
409
|
+
return this.prompts.has(name);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
static listPrompts(): string {
|
|
413
|
+
const prompts = this.getAllPrompts();
|
|
414
|
+
let output = "Available prompts:\n\n";
|
|
415
|
+
|
|
416
|
+
// Group by type
|
|
417
|
+
const systemPrompts = prompts.filter((p) => p.type === "system");
|
|
418
|
+
const userPrompts = prompts.filter((p) => p.type === "user");
|
|
419
|
+
|
|
420
|
+
if (systemPrompts.length > 0) {
|
|
421
|
+
output += "System Prompts:\n";
|
|
422
|
+
systemPrompts.forEach((prompt) => {
|
|
423
|
+
output += ` ${prompt.name}\n`;
|
|
424
|
+
output += ` ${prompt.description}\n`;
|
|
425
|
+
if (prompt.requiredVariables.length > 0) {
|
|
426
|
+
output += ` Required variables: ${prompt.requiredVariables.join(
|
|
427
|
+
", "
|
|
428
|
+
)}\n`;
|
|
429
|
+
}
|
|
430
|
+
if (prompt.optionalVariables.length > 0) {
|
|
431
|
+
output += ` Optional variables: ${prompt.optionalVariables.join(
|
|
432
|
+
", "
|
|
433
|
+
)}\n`;
|
|
434
|
+
}
|
|
435
|
+
output += "\n";
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
if (userPrompts.length > 0) {
|
|
440
|
+
output += "User Prompts:\n";
|
|
441
|
+
userPrompts.forEach((prompt) => {
|
|
442
|
+
output += ` ${prompt.name}\n`;
|
|
443
|
+
output += ` ${prompt.description}\n`;
|
|
444
|
+
if (prompt.requiredVariables.length > 0) {
|
|
445
|
+
output += ` Required variables: ${prompt.requiredVariables.join(
|
|
446
|
+
", "
|
|
447
|
+
)}\n`;
|
|
448
|
+
}
|
|
449
|
+
if (prompt.optionalVariables.length > 0) {
|
|
450
|
+
output += ` Optional variables: ${prompt.optionalVariables.join(
|
|
451
|
+
", "
|
|
452
|
+
)}\n`;
|
|
453
|
+
}
|
|
454
|
+
output += "\n";
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
return output;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
static validatePrompt(
|
|
462
|
+
name: string,
|
|
463
|
+
variables: Record<string, string>
|
|
464
|
+
): {
|
|
465
|
+
valid: boolean;
|
|
466
|
+
missingRequired: string[];
|
|
467
|
+
missingOptional: string[];
|
|
468
|
+
} {
|
|
469
|
+
const prompt = this.getPrompt(name);
|
|
470
|
+
if (!prompt) {
|
|
471
|
+
return {
|
|
472
|
+
valid: false,
|
|
473
|
+
missingRequired: [],
|
|
474
|
+
missingOptional: [],
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
const missingRequired = prompt.requiredVariables.filter(
|
|
479
|
+
(variable) => !variables[variable]
|
|
480
|
+
);
|
|
481
|
+
const missingOptional = prompt.optionalVariables.filter(
|
|
482
|
+
(variable) => !variables[variable]
|
|
483
|
+
);
|
|
484
|
+
|
|
485
|
+
return {
|
|
486
|
+
valid: missingRequired.length === 0,
|
|
487
|
+
missingRequired,
|
|
488
|
+
missingOptional,
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openrouter": {
|
|
3
|
+
"model": "z-ai/glm-4.7",
|
|
4
|
+
"maxTokens": 32768,
|
|
5
|
+
"temperature": 0.5
|
|
6
|
+
},
|
|
7
|
+
"anthropic": {
|
|
8
|
+
"model": "claude-sonnet-4.5",
|
|
9
|
+
"maxTokens": 32768,
|
|
10
|
+
"temperature": 0.5
|
|
11
|
+
},
|
|
12
|
+
"openai": {
|
|
13
|
+
"model": "gpt-5",
|
|
14
|
+
"maxTokens": 32768,
|
|
15
|
+
"temperature": 0.5
|
|
16
|
+
},
|
|
17
|
+
"custom": {
|
|
18
|
+
"model": "llama-3.3-70b",
|
|
19
|
+
"maxTokens": 32768,
|
|
20
|
+
"temperature": 0.5
|
|
21
|
+
},
|
|
22
|
+
"gemini": {
|
|
23
|
+
"model": "gemini-3-flash-preview",
|
|
24
|
+
"maxTokens": 32768,
|
|
25
|
+
"temperature": 0.5
|
|
26
|
+
},
|
|
27
|
+
"zai": {
|
|
28
|
+
"model": "glm-4.7",
|
|
29
|
+
"maxTokens": 32768,
|
|
30
|
+
"temperature": 0.5
|
|
31
|
+
}
|
|
32
|
+
}
|