@windagency/valora 2.0.1
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 +505 -0
- package/bin/mcp.js +10 -0
- package/bin/valora.js +10 -0
- package/data/agents/.gitkeep +0 -0
- package/data/agents/_meta/.gitkeep +0 -0
- package/data/agents/_meta/schema.json +352 -0
- package/data/agents/_template.md +72 -0
- package/data/agents/asserter.md +821 -0
- package/data/agents/expertises/.gitkeep +0 -0
- package/data/agents/expertises/_template/.gitkeep +0 -0
- package/data/agents/expertises/_template/registry.json +14 -0
- package/data/agents/lead.md +566 -0
- package/data/agents/platform-engineer.md +486 -0
- package/data/agents/product-manager.md +557 -0
- package/data/agents/qa.md +593 -0
- package/data/agents/registry.json +766 -0
- package/data/agents/secops-engineer.md +693 -0
- package/data/agents/software-engineer-typescript-backend.md +698 -0
- package/data/agents/software-engineer-typescript-frontend-react.md +512 -0
- package/data/agents/software-engineer-typescript-frontend.md +460 -0
- package/data/agents/software-engineer-typescript.md +371 -0
- package/data/agents/ui-ux-designer.md +534 -0
- package/data/commands/.gitkeep +0 -0
- package/data/commands/_meta/.gitkeep +0 -0
- package/data/commands/_meta/schema.json +317 -0
- package/data/commands/_template.md +65 -0
- package/data/commands/assert.md +895 -0
- package/data/commands/commit.md +1078 -0
- package/data/commands/create-backlog.md +402 -0
- package/data/commands/create-pr.md +401 -0
- package/data/commands/create-prd.md +242 -0
- package/data/commands/feedback.md +600 -0
- package/data/commands/fetch-task.md +665 -0
- package/data/commands/gather-knowledge.md +856 -0
- package/data/commands/generate-all-documentation.md +550 -0
- package/data/commands/generate-docs.md +738 -0
- package/data/commands/implement.md +511 -0
- package/data/commands/plan-architecture.md +269 -0
- package/data/commands/plan-implementation.md +312 -0
- package/data/commands/plan.md +582 -0
- package/data/commands/pre-check.md +553 -0
- package/data/commands/refine-specs.md +271 -0
- package/data/commands/refine-task.md +957 -0
- package/data/commands/registry.json +283 -0
- package/data/commands/review-code.md +680 -0
- package/data/commands/review-functional.md +235 -0
- package/data/commands/review-plan.md +546 -0
- package/data/commands/test.md +263 -0
- package/data/commands/validate-coverage.md +424 -0
- package/data/commands/validate-parallel.md +281 -0
- package/data/commands/validate-plan.md +367 -0
- package/data/config.default.json +40 -0
- package/data/external-mcp.default.json +326 -0
- package/data/hooks/enforce-modern-cli.sh +123 -0
- package/data/hooks/tests/enforce-modern-cli.test.sh +135 -0
- package/data/hooks.default.json +17 -0
- package/data/prompts/.gitkeep +0 -0
- package/data/prompts/00_generator/.gitkeep +0 -0
- package/data/prompts/00_generator/_template.md +25 -0
- package/data/prompts/00_generator/create_agent.md +97 -0
- package/data/prompts/00_generator/create_command.md +53 -0
- package/data/prompts/01_onboard/.gitkeep +0 -0
- package/data/prompts/01_onboard/analyze-clarity.md +413 -0
- package/data/prompts/01_onboard/analyze-documentation-requirements.md +543 -0
- package/data/prompts/01_onboard/analyze-patterns.md +288 -0
- package/data/prompts/01_onboard/analyze-requirements.md +809 -0
- package/data/prompts/01_onboard/collect-clarifications.md +374 -0
- package/data/prompts/01_onboard/fetch-task.md +409 -0
- package/data/prompts/01_onboard/map-dependencies.md +326 -0
- package/data/prompts/01_onboard/refine-requirements.md +638 -0
- package/data/prompts/01_onboard/refine-specifications.md +456 -0
- package/data/prompts/02_context/.gitkeep +0 -0
- package/data/prompts/02_context/analyze-change-scope.md +306 -0
- package/data/prompts/02_context/analyze-changes-for-review.md +292 -0
- package/data/prompts/02_context/analyze-codebase-changes.md +265 -0
- package/data/prompts/02_context/analyze-command-execution.md +231 -0
- package/data/prompts/02_context/analyze-commits-for-pr.md +258 -0
- package/data/prompts/02_context/analyze-functional-scope.md +380 -0
- package/data/prompts/02_context/analyze-git-branch.md +137 -0
- package/data/prompts/02_context/analyze-git-status.md +184 -0
- package/data/prompts/02_context/analyze-task-context.md +397 -0
- package/data/prompts/02_context/check-dependencies.md +394 -0
- package/data/prompts/02_context/extract-ticket-info.md +201 -0
- package/data/prompts/02_context/extract-ticket-references.md +157 -0
- package/data/prompts/02_context/gather-git-metrics.md +237 -0
- package/data/prompts/02_context/gather-validation-context.md +281 -0
- package/data/prompts/02_context/identify-completed-workflow.md +203 -0
- package/data/prompts/02_context/load-and-analyze-parallel.md +441 -0
- package/data/prompts/02_context/load-backlog.md +395 -0
- package/data/prompts/02_context/load-commit-template.md +186 -0
- package/data/prompts/02_context/load-documentation-context.md +382 -0
- package/data/prompts/02_context/load-implementation-context.md +360 -0
- package/data/prompts/02_context/load-plan-context.md +371 -0
- package/data/prompts/02_context/load-pr-template.md +198 -0
- package/data/prompts/02_context/load-prd.md +385 -0
- package/data/prompts/02_context/load-specifications.md +354 -0
- package/data/prompts/02_context/load-task.md +311 -0
- package/data/prompts/02_context/scan-codebase.md +270 -0
- package/data/prompts/02_context/understand-intent.md +145 -0
- package/data/prompts/02_context/use-modern-cli-tools.md +403 -0
- package/data/prompts/03_plan/.gitkeep +0 -0
- package/data/prompts/03_plan/assess-complexity.md +508 -0
- package/data/prompts/03_plan/assess-risks.md +677 -0
- package/data/prompts/03_plan/breakdown-implementation.md +895 -0
- package/data/prompts/03_plan/decompose-tasks.md +584 -0
- package/data/prompts/03_plan/define-architecture.md +347 -0
- package/data/prompts/03_plan/identify-dependencies.md +703 -0
- package/data/prompts/04_code/.gitkeep +0 -0
- package/data/prompts/04_code/calculate-version-bump.md +260 -0
- package/data/prompts/04_code/create-version-tag.md +321 -0
- package/data/prompts/04_code/determine-commit-strategy.md +300 -0
- package/data/prompts/04_code/determine-labels.md +380 -0
- package/data/prompts/04_code/determine-reviewers.md +324 -0
- package/data/prompts/04_code/generate-commit-messages.md +355 -0
- package/data/prompts/04_code/generate-pr-description.md +507 -0
- package/data/prompts/04_code/generate-pr-title.md +310 -0
- package/data/prompts/04_code/implement-changes.md +861 -0
- package/data/prompts/04_code/implement-tests.md +672 -0
- package/data/prompts/04_code/interactive-review.md +330 -0
- package/data/prompts/04_code/push-and-create-pr.md +435 -0
- package/data/prompts/04_code/stage-and-commit.md +424 -0
- package/data/prompts/04_code/validate-prerequisites.md +345 -0
- package/data/prompts/04_code/verify-implementation.md +705 -0
- package/data/prompts/05_review/.gitkeep +0 -0
- package/data/prompts/05_review/assess-code-quality.md +473 -0
- package/data/prompts/05_review/assess-constraints.md +368 -0
- package/data/prompts/05_review/calculate-performance-metrics.md +213 -0
- package/data/prompts/05_review/collect-user-feedback.md +236 -0
- package/data/prompts/05_review/evaluate-quality-outcomes.md +239 -0
- package/data/prompts/05_review/generate-commit-insights.md +344 -0
- package/data/prompts/05_review/identify-improvement-areas.md +275 -0
- package/data/prompts/05_review/synthesize-plan-assessment.md +778 -0
- package/data/prompts/05_review/synthesize-validation-report.md +369 -0
- package/data/prompts/05_review/validate-accessibility.md +303 -0
- package/data/prompts/05_review/validate-architecture.md +274 -0
- package/data/prompts/05_review/validate-backlog.md +620 -0
- package/data/prompts/05_review/validate-completeness.md +819 -0
- package/data/prompts/05_review/validate-documentation.md +453 -0
- package/data/prompts/05_review/validate-functional-requirements.md +432 -0
- package/data/prompts/05_review/validate-implementation-completeness.md +281 -0
- package/data/prompts/05_review/validate-maintainability.md +515 -0
- package/data/prompts/05_review/validate-performance.md +351 -0
- package/data/prompts/05_review/validate-pr-creation.md +260 -0
- package/data/prompts/05_review/validate-pr-readiness.md +315 -0
- package/data/prompts/05_review/validate-readiness.md +429 -0
- package/data/prompts/05_review/validate-risk-coverage.md +484 -0
- package/data/prompts/05_review/validate-security.md +260 -0
- package/data/prompts/05_review/validate-standards-compliance.md +204 -0
- package/data/prompts/05_review/validate-step-quality.md +445 -0
- package/data/prompts/05_review/validate-technical-feasibility.md +469 -0
- package/data/prompts/05_review/validate-test-strategy.md +556 -0
- package/data/prompts/05_review/validate-testability.md +532 -0
- package/data/prompts/05_review/validate-type-safety.md +200 -0
- package/data/prompts/05_review/verify-commits.md +388 -0
- package/data/prompts/06_test/.gitkeep +0 -0
- package/data/prompts/06_test/analyze-results.md +581 -0
- package/data/prompts/06_test/analyze-test-infrastructure.md +360 -0
- package/data/prompts/06_test/execute-tests.md +534 -0
- package/data/prompts/07_documentation/.gitkeep +0 -0
- package/data/prompts/07_documentation/apply-specification-refinement.md +304 -0
- package/data/prompts/07_documentation/apply-task-refinement.md +389 -0
- package/data/prompts/07_documentation/export-metrics.md +271 -0
- package/data/prompts/07_documentation/generate-all-domains-parallel.md +469 -0
- package/data/prompts/07_documentation/generate-backend-docs.md +322 -0
- package/data/prompts/07_documentation/generate-backlog-artifacts.md +720 -0
- package/data/prompts/07_documentation/generate-code-review-report.md +385 -0
- package/data/prompts/07_documentation/generate-feedback-report.md +299 -0
- package/data/prompts/07_documentation/generate-feedback-summary.md +164 -0
- package/data/prompts/07_documentation/generate-frontend-docs.md +309 -0
- package/data/prompts/07_documentation/generate-functional-review-report.md +410 -0
- package/data/prompts/07_documentation/generate-infrastructure-docs.md +630 -0
- package/data/prompts/07_documentation/generate-prd.md +197 -0
- package/data/prompts/07_documentation/persist-documentation.md +245 -0
- package/data/prompts/07_documentation/review-and-persist-parallel.md +459 -0
- package/data/prompts/07_documentation/update-changelog.md +399 -0
- package/data/prompts/07_documentation/update-inline-docs.md +574 -0
- package/data/prompts/07_documentation/update-knowledge-base.md +352 -0
- package/data/prompts/08_deployment/.gitkeep +0 -0
- package/data/prompts/09_refactor/.gitkeep +0 -0
- package/data/prompts/10_maintenance/.gitkeep +0 -0
- package/data/prompts/_meta/.gitkeep +0 -0
- package/data/prompts/_meta/schema.json +411 -0
- package/data/prompts/_template.md +56 -0
- package/data/prompts/registry.json +2227 -0
- package/data/templates/.gitkeep +0 -0
- package/data/templates/ASSERT_COMPLETENESS.md +121 -0
- package/data/templates/ASSERT_SECURITY.md +186 -0
- package/data/templates/ASSERT_TYPESCRIPT.md +195 -0
- package/data/templates/BACKEND_DOC.md +241 -0
- package/data/templates/CHANGELOG.md +38 -0
- package/data/templates/DOC_API_QUICK.md +273 -0
- package/data/templates/DOC_COMPONENT_QUICK.md +180 -0
- package/data/templates/DOC_EXTRACTION_CHECKLIST.md +284 -0
- package/data/templates/FRONTEND_DOC.md +253 -0
- package/data/templates/GUIDED_COMPLETION.md +38 -0
- package/data/templates/INFRASTRUCTURE_DOC.md +138 -0
- package/data/templates/PLAN_ARCHITECTURE.md +190 -0
- package/data/templates/PLAN_IMPLEMENTATION.md +302 -0
- package/data/templates/PLAN_PATTERN_AUTH.md +366 -0
- package/data/templates/PLAN_PATTERN_BACKGROUND_JOB.md +403 -0
- package/data/templates/PLAN_PATTERN_DATABASE.md +287 -0
- package/data/templates/PLAN_PATTERN_REACT_FEATURE.md +303 -0
- package/data/templates/PLAN_PATTERN_REST_API.md +322 -0
- package/data/templates/PLAN_QUALITY_CHECKLIST.md +167 -0
- package/data/templates/PRD.md +110 -0
- package/data/templates/PULL_REQUEST.md +30 -0
- package/data/templates/REVIEW_CODE_CHECKLIST.md +227 -0
- package/data/templates/TEST_COVERAGE_GATE.md +265 -0
- package/data/templates/TEST_GENERATION_REQUIREMENTS.md +437 -0
- package/data/templates/TROUBLESHOOTING.md +170 -0
- package/data/templates/USER_STORY.md +43 -0
- package/data/templates/plans/PATTERN_DATABASE_MIGRATION.md +551 -0
- package/data/templates/plans/PATTERN_REACT_COMPONENT.md +483 -0
- package/data/templates/plans/PATTERN_REST_API.md +428 -0
- package/data/templates/plans/README.md +174 -0
- package/data/templates/standards/TECHNICAL_DEFAULTS.md +724 -0
- package/dist/cleanup/coordinator.d.ts +26 -0
- package/dist/cleanup/coordinator.d.ts.map +1 -0
- package/dist/cleanup/coordinator.js +167 -0
- package/dist/cleanup/coordinator.js.map +1 -0
- package/dist/cleanup/index.d.ts +5 -0
- package/dist/cleanup/index.d.ts.map +1 -0
- package/dist/cleanup/index.js +5 -0
- package/dist/cleanup/index.js.map +1 -0
- package/dist/cli/autocomplete.d.ts +65 -0
- package/dist/cli/autocomplete.d.ts.map +1 -0
- package/dist/cli/autocomplete.js +422 -0
- package/dist/cli/autocomplete.js.map +1 -0
- package/dist/cli/command-adapter.interface.d.ts +98 -0
- package/dist/cli/command-adapter.interface.d.ts.map +1 -0
- package/dist/cli/command-adapter.interface.js +13 -0
- package/dist/cli/command-adapter.interface.js.map +1 -0
- package/dist/cli/command-error-handler.d.ts +69 -0
- package/dist/cli/command-error-handler.d.ts.map +1 -0
- package/dist/cli/command-error-handler.js +239 -0
- package/dist/cli/command-error-handler.js.map +1 -0
- package/dist/cli/command-executor.d.ts +146 -0
- package/dist/cli/command-executor.d.ts.map +1 -0
- package/dist/cli/command-executor.js +479 -0
- package/dist/cli/command-executor.js.map +1 -0
- package/dist/cli/command-palette.d.ts +56 -0
- package/dist/cli/command-palette.d.ts.map +1 -0
- package/dist/cli/command-palette.js +246 -0
- package/dist/cli/command-palette.js.map +1 -0
- package/dist/cli/command-resolver.d.ts +42 -0
- package/dist/cli/command-resolver.d.ts.map +1 -0
- package/dist/cli/command-resolver.js +140 -0
- package/dist/cli/command-resolver.js.map +1 -0
- package/dist/cli/command-suggestions.d.ts +49 -0
- package/dist/cli/command-suggestions.d.ts.map +1 -0
- package/dist/cli/command-suggestions.js +209 -0
- package/dist/cli/command-suggestions.js.map +1 -0
- package/dist/cli/command-templates.d.ts +83 -0
- package/dist/cli/command-templates.d.ts.map +1 -0
- package/dist/cli/command-templates.js +457 -0
- package/dist/cli/command-templates.js.map +1 -0
- package/dist/cli/command-validator.d.ts +78 -0
- package/dist/cli/command-validator.d.ts.map +1 -0
- package/dist/cli/command-validator.js +197 -0
- package/dist/cli/command-validator.js.map +1 -0
- package/dist/cli/command-wizard.d.ts +42 -0
- package/dist/cli/command-wizard.d.ts.map +1 -0
- package/dist/cli/command-wizard.js +328 -0
- package/dist/cli/command-wizard.js.map +1 -0
- package/dist/cli/commander-adapter.d.ts +91 -0
- package/dist/cli/commander-adapter.d.ts.map +1 -0
- package/dist/cli/commander-adapter.js +142 -0
- package/dist/cli/commander-adapter.js.map +1 -0
- package/dist/cli/commands/config.d.ts +9 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +62 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/dashboard.d.ts +9 -0
- package/dist/cli/commands/dashboard.d.ts.map +1 -0
- package/dist/cli/commands/dashboard.js +31 -0
- package/dist/cli/commands/dashboard.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +9 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +103 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/dynamic.d.ts +21 -0
- package/dist/cli/commands/dynamic.d.ts.map +1 -0
- package/dist/cli/commands/dynamic.js +516 -0
- package/dist/cli/commands/dynamic.js.map +1 -0
- package/dist/cli/commands/explore.d.ts +11 -0
- package/dist/cli/commands/explore.d.ts.map +1 -0
- package/dist/cli/commands/explore.js +815 -0
- package/dist/cli/commands/explore.js.map +1 -0
- package/dist/cli/commands/help.d.ts +9 -0
- package/dist/cli/commands/help.d.ts.map +1 -0
- package/dist/cli/commands/help.js +52 -0
- package/dist/cli/commands/help.js.map +1 -0
- package/dist/cli/commands/init.d.ts +9 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +71 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/monitoring.d.ts +11 -0
- package/dist/cli/commands/monitoring.d.ts.map +1 -0
- package/dist/cli/commands/monitoring.js +358 -0
- package/dist/cli/commands/monitoring.js.map +1 -0
- package/dist/cli/commands/session.d.ts +9 -0
- package/dist/cli/commands/session.d.ts.map +1 -0
- package/dist/cli/commands/session.js +521 -0
- package/dist/cli/commands/session.js.map +1 -0
- package/dist/cli/config-builder.d.ts +53 -0
- package/dist/cli/config-builder.d.ts.map +1 -0
- package/dist/cli/config-builder.js +150 -0
- package/dist/cli/config-builder.js.map +1 -0
- package/dist/cli/document-approval.d.ts +71 -0
- package/dist/cli/document-approval.d.ts.map +1 -0
- package/dist/cli/document-approval.js +328 -0
- package/dist/cli/document-approval.js.map +1 -0
- package/dist/cli/document-output-processor.d.ts +125 -0
- package/dist/cli/document-output-processor.d.ts.map +1 -0
- package/dist/cli/document-output-processor.js +496 -0
- package/dist/cli/document-output-processor.js.map +1 -0
- package/dist/cli/execution-coordinator.d.ts +97 -0
- package/dist/cli/execution-coordinator.d.ts.map +1 -0
- package/dist/cli/execution-coordinator.js +489 -0
- package/dist/cli/execution-coordinator.js.map +1 -0
- package/dist/cli/first-run-setup.d.ts +12 -0
- package/dist/cli/first-run-setup.d.ts.map +1 -0
- package/dist/cli/first-run-setup.js +63 -0
- package/dist/cli/first-run-setup.js.map +1 -0
- package/dist/cli/flags.d.ts +53 -0
- package/dist/cli/flags.d.ts.map +1 -0
- package/dist/cli/flags.js +60 -0
- package/dist/cli/flags.js.map +1 -0
- package/dist/cli/index.d.ts +11 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +182 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/presenters/assert-presenter.d.ts +29 -0
- package/dist/cli/presenters/assert-presenter.d.ts.map +1 -0
- package/dist/cli/presenters/assert-presenter.js +224 -0
- package/dist/cli/presenters/assert-presenter.js.map +1 -0
- package/dist/cli/presenters/base-presenter.d.ts +80 -0
- package/dist/cli/presenters/base-presenter.d.ts.map +1 -0
- package/dist/cli/presenters/base-presenter.js +124 -0
- package/dist/cli/presenters/base-presenter.js.map +1 -0
- package/dist/cli/presenters/feedback-presenter.d.ts +24 -0
- package/dist/cli/presenters/feedback-presenter.d.ts.map +1 -0
- package/dist/cli/presenters/feedback-presenter.js +144 -0
- package/dist/cli/presenters/feedback-presenter.js.map +1 -0
- package/dist/cli/presenters/fetch-task-presenter.d.ts +26 -0
- package/dist/cli/presenters/fetch-task-presenter.d.ts.map +1 -0
- package/dist/cli/presenters/fetch-task-presenter.js +122 -0
- package/dist/cli/presenters/fetch-task-presenter.js.map +1 -0
- package/dist/cli/presenters/implementation-presenter.d.ts +28 -0
- package/dist/cli/presenters/implementation-presenter.d.ts.map +1 -0
- package/dist/cli/presenters/implementation-presenter.js +148 -0
- package/dist/cli/presenters/implementation-presenter.js.map +1 -0
- package/dist/cli/presenters/index.d.ts +14 -0
- package/dist/cli/presenters/index.d.ts.map +1 -0
- package/dist/cli/presenters/index.js +14 -0
- package/dist/cli/presenters/index.js.map +1 -0
- package/dist/cli/presenters/presenter-registry.d.ts +51 -0
- package/dist/cli/presenters/presenter-registry.d.ts.map +1 -0
- package/dist/cli/presenters/presenter-registry.js +89 -0
- package/dist/cli/presenters/presenter-registry.js.map +1 -0
- package/dist/cli/presenters/review-code-presenter.d.ts +34 -0
- package/dist/cli/presenters/review-code-presenter.d.ts.map +1 -0
- package/dist/cli/presenters/review-code-presenter.js +197 -0
- package/dist/cli/presenters/review-code-presenter.js.map +1 -0
- package/dist/cli/presenters/review-plan-presenter.d.ts +26 -0
- package/dist/cli/presenters/review-plan-presenter.d.ts.map +1 -0
- package/dist/cli/presenters/review-plan-presenter.js +130 -0
- package/dist/cli/presenters/review-plan-presenter.js.map +1 -0
- package/dist/cli/provider-fallback-service.d.ts +52 -0
- package/dist/cli/provider-fallback-service.d.ts.map +1 -0
- package/dist/cli/provider-fallback-service.js +134 -0
- package/dist/cli/provider-fallback-service.js.map +1 -0
- package/dist/cli/provider-mismatch-handler.d.ts +35 -0
- package/dist/cli/provider-mismatch-handler.d.ts.map +1 -0
- package/dist/cli/provider-mismatch-handler.js +133 -0
- package/dist/cli/provider-mismatch-handler.js.map +1 -0
- package/dist/cli/provider-resolver.d.ts +84 -0
- package/dist/cli/provider-resolver.d.ts.map +1 -0
- package/dist/cli/provider-resolver.js +360 -0
- package/dist/cli/provider-resolver.js.map +1 -0
- package/dist/cli/result-presenter.d.ts +68 -0
- package/dist/cli/result-presenter.d.ts.map +1 -0
- package/dist/cli/result-presenter.js +186 -0
- package/dist/cli/result-presenter.js.map +1 -0
- package/dist/cli/session-browser.d.ts +46 -0
- package/dist/cli/session-browser.d.ts.map +1 -0
- package/dist/cli/session-browser.js +343 -0
- package/dist/cli/session-browser.js.map +1 -0
- package/dist/cli/session-cleanup-adapter.d.ts +25 -0
- package/dist/cli/session-cleanup-adapter.d.ts.map +1 -0
- package/dist/cli/session-cleanup-adapter.js +95 -0
- package/dist/cli/session-cleanup-adapter.js.map +1 -0
- package/dist/cli/session-formatter.d.ts +107 -0
- package/dist/cli/session-formatter.d.ts.map +1 -0
- package/dist/cli/session-formatter.js +411 -0
- package/dist/cli/session-formatter.js.map +1 -0
- package/dist/cli/session-manager.d.ts +68 -0
- package/dist/cli/session-manager.d.ts.map +1 -0
- package/dist/cli/session-manager.js +153 -0
- package/dist/cli/session-manager.js.map +1 -0
- package/dist/cli/session-resume.d.ts +70 -0
- package/dist/cli/session-resume.d.ts.map +1 -0
- package/dist/cli/session-resume.js +322 -0
- package/dist/cli/session-resume.js.map +1 -0
- package/dist/cli/types/cli-options.types.d.ts +54 -0
- package/dist/cli/types/cli-options.types.d.ts.map +1 -0
- package/dist/cli/types/cli-options.types.js +8 -0
- package/dist/cli/types/cli-options.types.js.map +1 -0
- package/dist/cli/types/wizard.types.d.ts +51 -0
- package/dist/cli/types/wizard.types.d.ts.map +1 -0
- package/dist/cli/types/wizard.types.js +8 -0
- package/dist/cli/types/wizard.types.js.map +1 -0
- package/dist/config/constants.d.ts +192 -0
- package/dist/config/constants.d.ts.map +1 -0
- package/dist/config/constants.js +196 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/config/index.d.ts +8 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +8 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/interactive-wizard.d.ts +67 -0
- package/dist/config/interactive-wizard.d.ts.map +1 -0
- package/dist/config/interactive-wizard.js +325 -0
- package/dist/config/interactive-wizard.js.map +1 -0
- package/dist/config/loader.d.ts +113 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +433 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/providers.config.d.ts +90 -0
- package/dist/config/providers.config.d.ts.map +1 -0
- package/dist/config/providers.config.js +249 -0
- package/dist/config/providers.config.js.map +1 -0
- package/dist/config/schema.d.ts +1848 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +167 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config/validation-helpers.d.ts +44 -0
- package/dist/config/validation-helpers.d.ts.map +1 -0
- package/dist/config/validation-helpers.js +239 -0
- package/dist/config/validation-helpers.js.map +1 -0
- package/dist/config/wizard.d.ts +10 -0
- package/dist/config/wizard.d.ts.map +1 -0
- package/dist/config/wizard.js +11 -0
- package/dist/config/wizard.js.map +1 -0
- package/dist/di/container.d.ts +92 -0
- package/dist/di/container.d.ts.map +1 -0
- package/dist/di/container.js +349 -0
- package/dist/di/container.js.map +1 -0
- package/dist/executor/agent-loader.d.ts +62 -0
- package/dist/executor/agent-loader.d.ts.map +1 -0
- package/dist/executor/agent-loader.js +172 -0
- package/dist/executor/agent-loader.js.map +1 -0
- package/dist/executor/command-discovery.d.ts +72 -0
- package/dist/executor/command-discovery.d.ts.map +1 -0
- package/dist/executor/command-discovery.js +248 -0
- package/dist/executor/command-discovery.js.map +1 -0
- package/dist/executor/command-isolation.executor.d.ts +53 -0
- package/dist/executor/command-isolation.executor.d.ts.map +1 -0
- package/dist/executor/command-isolation.executor.js +183 -0
- package/dist/executor/command-isolation.executor.js.map +1 -0
- package/dist/executor/command-loader.d.ts +34 -0
- package/dist/executor/command-loader.d.ts.map +1 -0
- package/dist/executor/command-loader.js +93 -0
- package/dist/executor/command-loader.js.map +1 -0
- package/dist/executor/command-validation.d.ts +21 -0
- package/dist/executor/command-validation.d.ts.map +1 -0
- package/dist/executor/command-validation.js +79 -0
- package/dist/executor/command-validation.js.map +1 -0
- package/dist/executor/dry-run-cache.d.ts +155 -0
- package/dist/executor/dry-run-cache.d.ts.map +1 -0
- package/dist/executor/dry-run-cache.js +191 -0
- package/dist/executor/dry-run-cache.js.map +1 -0
- package/dist/executor/dry-run-preview.service.d.ts +101 -0
- package/dist/executor/dry-run-preview.service.d.ts.map +1 -0
- package/dist/executor/dry-run-preview.service.js +250 -0
- package/dist/executor/dry-run-preview.service.js.map +1 -0
- package/dist/executor/dry-run-strategy.d.ts +137 -0
- package/dist/executor/dry-run-strategy.d.ts.map +1 -0
- package/dist/executor/dry-run-strategy.js +511 -0
- package/dist/executor/dry-run-strategy.js.map +1 -0
- package/dist/executor/escalation-detection.service.d.ts +48 -0
- package/dist/executor/escalation-detection.service.d.ts.map +1 -0
- package/dist/executor/escalation-detection.service.js +219 -0
- package/dist/executor/escalation-detection.service.js.map +1 -0
- package/dist/executor/escalation-handler.service.d.ts +57 -0
- package/dist/executor/escalation-handler.service.d.ts.map +1 -0
- package/dist/executor/escalation-handler.service.js +265 -0
- package/dist/executor/escalation-handler.service.js.map +1 -0
- package/dist/executor/execution-context.d.ts +107 -0
- package/dist/executor/execution-context.d.ts.map +1 -0
- package/dist/executor/execution-context.js +158 -0
- package/dist/executor/execution-context.js.map +1 -0
- package/dist/executor/execution-strategy.d.ts +104 -0
- package/dist/executor/execution-strategy.d.ts.map +1 -0
- package/dist/executor/execution-strategy.js +259 -0
- package/dist/executor/execution-strategy.js.map +1 -0
- package/dist/executor/hook-execution.service.d.ts +95 -0
- package/dist/executor/hook-execution.service.d.ts.map +1 -0
- package/dist/executor/hook-execution.service.js +371 -0
- package/dist/executor/hook-execution.service.js.map +1 -0
- package/dist/executor/index.d.ts +16 -0
- package/dist/executor/index.d.ts.map +1 -0
- package/dist/executor/index.js +16 -0
- package/dist/executor/index.js.map +1 -0
- package/dist/executor/input-pre-resolver.d.ts +61 -0
- package/dist/executor/input-pre-resolver.d.ts.map +1 -0
- package/dist/executor/input-pre-resolver.js +172 -0
- package/dist/executor/input-pre-resolver.js.map +1 -0
- package/dist/executor/interactive-question-handler.service.d.ts +79 -0
- package/dist/executor/interactive-question-handler.service.d.ts.map +1 -0
- package/dist/executor/interactive-question-handler.service.js +250 -0
- package/dist/executor/interactive-question-handler.service.js.map +1 -0
- package/dist/executor/message-builder.service.d.ts +83 -0
- package/dist/executor/message-builder.service.d.ts.map +1 -0
- package/dist/executor/message-builder.service.js +211 -0
- package/dist/executor/message-builder.service.js.map +1 -0
- package/dist/executor/output-parsing.service.d.ts +169 -0
- package/dist/executor/output-parsing.service.d.ts.map +1 -0
- package/dist/executor/output-parsing.service.js +566 -0
- package/dist/executor/output-parsing.service.js.map +1 -0
- package/dist/executor/pipeline-events.d.ts +15 -0
- package/dist/executor/pipeline-events.d.ts.map +1 -0
- package/dist/executor/pipeline-events.js +15 -0
- package/dist/executor/pipeline-events.js.map +1 -0
- package/dist/executor/pipeline-validator.d.ts +29 -0
- package/dist/executor/pipeline-validator.d.ts.map +1 -0
- package/dist/executor/pipeline-validator.js +105 -0
- package/dist/executor/pipeline-validator.js.map +1 -0
- package/dist/executor/pipeline.d.ts +55 -0
- package/dist/executor/pipeline.d.ts.map +1 -0
- package/dist/executor/pipeline.js +360 -0
- package/dist/executor/pipeline.js.map +1 -0
- package/dist/executor/project-guidance-loader.d.ts +69 -0
- package/dist/executor/project-guidance-loader.d.ts.map +1 -0
- package/dist/executor/project-guidance-loader.js +528 -0
- package/dist/executor/project-guidance-loader.js.map +1 -0
- package/dist/executor/prompt-loader.d.ts +39 -0
- package/dist/executor/prompt-loader.d.ts.map +1 -0
- package/dist/executor/prompt-loader.js +172 -0
- package/dist/executor/prompt-loader.js.map +1 -0
- package/dist/executor/stage-executor.d.ts +192 -0
- package/dist/executor/stage-executor.d.ts.map +1 -0
- package/dist/executor/stage-executor.js +790 -0
- package/dist/executor/stage-executor.js.map +1 -0
- package/dist/executor/stage-output-cache.d.ts +152 -0
- package/dist/executor/stage-output-cache.d.ts.map +1 -0
- package/dist/executor/stage-output-cache.js +426 -0
- package/dist/executor/stage-output-cache.js.map +1 -0
- package/dist/executor/stage-scheduler.d.ts +20 -0
- package/dist/executor/stage-scheduler.d.ts.map +1 -0
- package/dist/executor/stage-scheduler.js +59 -0
- package/dist/executor/stage-scheduler.js.map +1 -0
- package/dist/executor/stage-validation.service.d.ts +122 -0
- package/dist/executor/stage-validation.service.d.ts.map +1 -0
- package/dist/executor/stage-validation.service.js +377 -0
- package/dist/executor/stage-validation.service.js.map +1 -0
- package/dist/executor/tool-execution.service.d.ts +289 -0
- package/dist/executor/tool-execution.service.d.ts.map +1 -0
- package/dist/executor/tool-execution.service.js +1124 -0
- package/dist/executor/tool-execution.service.js.map +1 -0
- package/dist/executor/tools/dry-run-simulator.service.d.ts +107 -0
- package/dist/executor/tools/dry-run-simulator.service.d.ts.map +1 -0
- package/dist/executor/tools/dry-run-simulator.service.js +284 -0
- package/dist/executor/tools/dry-run-simulator.service.js.map +1 -0
- package/dist/executor/tools/pending-write-approver.service.d.ts +84 -0
- package/dist/executor/tools/pending-write-approver.service.d.ts.map +1 -0
- package/dist/executor/tools/pending-write-approver.service.js +197 -0
- package/dist/executor/tools/pending-write-approver.service.js.map +1 -0
- package/dist/executor/tools/search-tools.service.d.ts +44 -0
- package/dist/executor/tools/search-tools.service.d.ts.map +1 -0
- package/dist/executor/tools/search-tools.service.js +109 -0
- package/dist/executor/tools/search-tools.service.js.map +1 -0
- package/dist/executor/tools/session-tools.service.d.ts +74 -0
- package/dist/executor/tools/session-tools.service.d.ts.map +1 -0
- package/dist/executor/tools/session-tools.service.js +278 -0
- package/dist/executor/tools/session-tools.service.js.map +1 -0
- package/dist/executor/variable-resolution.service.d.ts +77 -0
- package/dist/executor/variable-resolution.service.d.ts.map +1 -0
- package/dist/executor/variable-resolution.service.js +115 -0
- package/dist/executor/variable-resolution.service.js.map +1 -0
- package/dist/executor/variables.d.ts +89 -0
- package/dist/executor/variables.d.ts.map +1 -0
- package/dist/executor/variables.js +306 -0
- package/dist/executor/variables.js.map +1 -0
- package/dist/exploration/collaboration-coordinator.d.ts +130 -0
- package/dist/exploration/collaboration-coordinator.d.ts.map +1 -0
- package/dist/exploration/collaboration-coordinator.js +332 -0
- package/dist/exploration/collaboration-coordinator.js.map +1 -0
- package/dist/exploration/container-manager.d.ts +121 -0
- package/dist/exploration/container-manager.d.ts.map +1 -0
- package/dist/exploration/container-manager.js +390 -0
- package/dist/exploration/container-manager.js.map +1 -0
- package/dist/exploration/dashboard-controls.d.ts +24 -0
- package/dist/exploration/dashboard-controls.d.ts.map +1 -0
- package/dist/exploration/dashboard-controls.js +221 -0
- package/dist/exploration/dashboard-controls.js.map +1 -0
- package/dist/exploration/dashboard-metrics.d.ts +62 -0
- package/dist/exploration/dashboard-metrics.d.ts.map +1 -0
- package/dist/exploration/dashboard-metrics.js +154 -0
- package/dist/exploration/dashboard-metrics.js.map +1 -0
- package/dist/exploration/dashboard-ui.d.ts +22 -0
- package/dist/exploration/dashboard-ui.d.ts.map +1 -0
- package/dist/exploration/dashboard-ui.js +206 -0
- package/dist/exploration/dashboard-ui.js.map +1 -0
- package/dist/exploration/execution-modes.d.ts +120 -0
- package/dist/exploration/execution-modes.d.ts.map +1 -0
- package/dist/exploration/execution-modes.js +388 -0
- package/dist/exploration/execution-modes.js.map +1 -0
- package/dist/exploration/exploration-events.d.ts +139 -0
- package/dist/exploration/exploration-events.d.ts.map +1 -0
- package/dist/exploration/exploration-events.js +261 -0
- package/dist/exploration/exploration-events.js.map +1 -0
- package/dist/exploration/exploration-state.d.ts +102 -0
- package/dist/exploration/exploration-state.d.ts.map +1 -0
- package/dist/exploration/exploration-state.js +307 -0
- package/dist/exploration/exploration-state.js.map +1 -0
- package/dist/exploration/merge-orchestrator.d.ts +175 -0
- package/dist/exploration/merge-orchestrator.d.ts.map +1 -0
- package/dist/exploration/merge-orchestrator.js +615 -0
- package/dist/exploration/merge-orchestrator.js.map +1 -0
- package/dist/exploration/orchestrator.d.ts +95 -0
- package/dist/exploration/orchestrator.d.ts.map +1 -0
- package/dist/exploration/orchestrator.js +404 -0
- package/dist/exploration/orchestrator.js.map +1 -0
- package/dist/exploration/resource-allocator.d.ts +108 -0
- package/dist/exploration/resource-allocator.d.ts.map +1 -0
- package/dist/exploration/resource-allocator.js +244 -0
- package/dist/exploration/resource-allocator.js.map +1 -0
- package/dist/exploration/result-comparator.d.ts +110 -0
- package/dist/exploration/result-comparator.d.ts.map +1 -0
- package/dist/exploration/result-comparator.js +363 -0
- package/dist/exploration/result-comparator.js.map +1 -0
- package/dist/exploration/safety-validator.d.ts +59 -0
- package/dist/exploration/safety-validator.d.ts.map +1 -0
- package/dist/exploration/safety-validator.js +339 -0
- package/dist/exploration/safety-validator.js.map +1 -0
- package/dist/exploration/shared-volume-manager.d.ts +72 -0
- package/dist/exploration/shared-volume-manager.d.ts.map +1 -0
- package/dist/exploration/shared-volume-manager.js +303 -0
- package/dist/exploration/shared-volume-manager.js.map +1 -0
- package/dist/exploration/worktree-manager-secure.d.ts +110 -0
- package/dist/exploration/worktree-manager-secure.d.ts.map +1 -0
- package/dist/exploration/worktree-manager-secure.js +347 -0
- package/dist/exploration/worktree-manager-secure.js.map +1 -0
- package/dist/exploration/worktree-manager.d.ts +97 -0
- package/dist/exploration/worktree-manager.d.ts.map +1 -0
- package/dist/exploration/worktree-manager.js +298 -0
- package/dist/exploration/worktree-manager.js.map +1 -0
- package/dist/llm/index.d.ts +10 -0
- package/dist/llm/index.d.ts.map +1 -0
- package/dist/llm/index.js +10 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/llm/model-mapping-registry.d.ts +73 -0
- package/dist/llm/model-mapping-registry.d.ts.map +1 -0
- package/dist/llm/model-mapping-registry.js +197 -0
- package/dist/llm/model-mapping-registry.js.map +1 -0
- package/dist/llm/provider.interface.d.ts +60 -0
- package/dist/llm/provider.interface.d.ts.map +1 -0
- package/dist/llm/provider.interface.js +79 -0
- package/dist/llm/provider.interface.js.map +1 -0
- package/dist/llm/providers/anthropic.provider.d.ts +78 -0
- package/dist/llm/providers/anthropic.provider.d.ts.map +1 -0
- package/dist/llm/providers/anthropic.provider.js +456 -0
- package/dist/llm/providers/anthropic.provider.js.map +1 -0
- package/dist/llm/providers/cursor.provider.d.ts +61 -0
- package/dist/llm/providers/cursor.provider.d.ts.map +1 -0
- package/dist/llm/providers/cursor.provider.js +273 -0
- package/dist/llm/providers/cursor.provider.js.map +1 -0
- package/dist/llm/providers/google.provider.d.ts +43 -0
- package/dist/llm/providers/google.provider.d.ts.map +1 -0
- package/dist/llm/providers/google.provider.js +179 -0
- package/dist/llm/providers/google.provider.js.map +1 -0
- package/dist/llm/providers/index.d.ts +25 -0
- package/dist/llm/providers/index.d.ts.map +1 -0
- package/dist/llm/providers/index.js +28 -0
- package/dist/llm/providers/index.js.map +1 -0
- package/dist/llm/providers/openai.provider.d.ts +23 -0
- package/dist/llm/providers/openai.provider.d.ts.map +1 -0
- package/dist/llm/providers/openai.provider.js +193 -0
- package/dist/llm/providers/openai.provider.js.map +1 -0
- package/dist/llm/registry.d.ts +41 -0
- package/dist/llm/registry.d.ts.map +1 -0
- package/dist/llm/registry.js +88 -0
- package/dist/llm/registry.js.map +1 -0
- package/dist/mcp/command-discovery.service.d.ts +26 -0
- package/dist/mcp/command-discovery.service.d.ts.map +1 -0
- package/dist/mcp/command-discovery.service.js +65 -0
- package/dist/mcp/command-discovery.service.js.map +1 -0
- package/dist/mcp/context.d.ts +28 -0
- package/dist/mcp/context.d.ts.map +1 -0
- package/dist/mcp/context.js +34 -0
- package/dist/mcp/context.js.map +1 -0
- package/dist/mcp/external-client/tool-proxy.d.ts +103 -0
- package/dist/mcp/external-client/tool-proxy.d.ts.map +1 -0
- package/dist/mcp/external-client/tool-proxy.js +291 -0
- package/dist/mcp/external-client/tool-proxy.js.map +1 -0
- package/dist/mcp/external-mcp-integrator.d.ts +70 -0
- package/dist/mcp/external-mcp-integrator.d.ts.map +1 -0
- package/dist/mcp/external-mcp-integrator.js +161 -0
- package/dist/mcp/external-mcp-integrator.js.map +1 -0
- package/dist/mcp/mcp-approval-cache.service.d.ts +88 -0
- package/dist/mcp/mcp-approval-cache.service.d.ts.map +1 -0
- package/dist/mcp/mcp-approval-cache.service.js +257 -0
- package/dist/mcp/mcp-approval-cache.service.js.map +1 -0
- package/dist/mcp/mcp-approval-workflow.d.ts +92 -0
- package/dist/mcp/mcp-approval-workflow.d.ts.map +1 -0
- package/dist/mcp/mcp-approval-workflow.js +346 -0
- package/dist/mcp/mcp-approval-workflow.js.map +1 -0
- package/dist/mcp/mcp-audit-logger.service.d.ts +90 -0
- package/dist/mcp/mcp-audit-logger.service.d.ts.map +1 -0
- package/dist/mcp/mcp-audit-logger.service.js +264 -0
- package/dist/mcp/mcp-audit-logger.service.js.map +1 -0
- package/dist/mcp/mcp-availability.service.d.ts +84 -0
- package/dist/mcp/mcp-availability.service.d.ts.map +1 -0
- package/dist/mcp/mcp-availability.service.js +177 -0
- package/dist/mcp/mcp-availability.service.js.map +1 -0
- package/dist/mcp/mcp-client-manager.service.d.ts +103 -0
- package/dist/mcp/mcp-client-manager.service.d.ts.map +1 -0
- package/dist/mcp/mcp-client-manager.service.js +380 -0
- package/dist/mcp/mcp-client-manager.service.js.map +1 -0
- package/dist/mcp/mcp-tool-handler.d.ts +88 -0
- package/dist/mcp/mcp-tool-handler.d.ts.map +1 -0
- package/dist/mcp/mcp-tool-handler.js +207 -0
- package/dist/mcp/mcp-tool-handler.js.map +1 -0
- package/dist/mcp/request-handler.d.ts +44 -0
- package/dist/mcp/request-handler.d.ts.map +1 -0
- package/dist/mcp/request-handler.js +282 -0
- package/dist/mcp/request-handler.js.map +1 -0
- package/dist/mcp/sampling-service.d.ts +36 -0
- package/dist/mcp/sampling-service.d.ts.map +1 -0
- package/dist/mcp/sampling-service.js +147 -0
- package/dist/mcp/sampling-service.js.map +1 -0
- package/dist/mcp/server-manager.d.ts +36 -0
- package/dist/mcp/server-manager.d.ts.map +1 -0
- package/dist/mcp/server-manager.js +113 -0
- package/dist/mcp/server-manager.js.map +1 -0
- package/dist/mcp/server.d.ts +45 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +269 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/shutdown-manager.d.ts +24 -0
- package/dist/mcp/shutdown-manager.d.ts.map +1 -0
- package/dist/mcp/shutdown-manager.js +59 -0
- package/dist/mcp/shutdown-manager.js.map +1 -0
- package/dist/mcp/system-monitor.d.ts +38 -0
- package/dist/mcp/system-monitor.d.ts.map +1 -0
- package/dist/mcp/system-monitor.js +80 -0
- package/dist/mcp/system-monitor.js.map +1 -0
- package/dist/mcp/tool-mapping.service.d.ts +35 -0
- package/dist/mcp/tool-mapping.service.d.ts.map +1 -0
- package/dist/mcp/tool-mapping.service.js +91 -0
- package/dist/mcp/tool-mapping.service.js.map +1 -0
- package/dist/mcp/tool-registry.d.ts +29 -0
- package/dist/mcp/tool-registry.d.ts.map +1 -0
- package/dist/mcp/tool-registry.js +52 -0
- package/dist/mcp/tool-registry.js.map +1 -0
- package/dist/mcp/types.d.ts +33 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/mcp/types.js +7 -0
- package/dist/mcp/types.js.map +1 -0
- package/dist/output/activity-feed.d.ts +62 -0
- package/dist/output/activity-feed.d.ts.map +1 -0
- package/dist/output/activity-feed.js +170 -0
- package/dist/output/activity-feed.js.map +1 -0
- package/dist/output/box-formatter.d.ts +149 -0
- package/dist/output/box-formatter.d.ts.map +1 -0
- package/dist/output/box-formatter.js +239 -0
- package/dist/output/box-formatter.js.map +1 -0
- package/dist/output/cleanup-scheduler.d.ts +26 -0
- package/dist/output/cleanup-scheduler.d.ts.map +1 -0
- package/dist/output/cleanup-scheduler.js +115 -0
- package/dist/output/cleanup-scheduler.js.map +1 -0
- package/dist/output/color-adapter.d.ts +56 -0
- package/dist/output/color-adapter.d.ts.map +1 -0
- package/dist/output/color-adapter.interface.d.ts +139 -0
- package/dist/output/color-adapter.interface.d.ts.map +1 -0
- package/dist/output/color-adapter.interface.js +49 -0
- package/dist/output/color-adapter.interface.js.map +1 -0
- package/dist/output/color-adapter.js +163 -0
- package/dist/output/color-adapter.js.map +1 -0
- package/dist/output/console-output.d.ts +156 -0
- package/dist/output/console-output.d.ts.map +1 -0
- package/dist/output/console-output.js +264 -0
- package/dist/output/console-output.js.map +1 -0
- package/dist/output/diagnostic-formatter.d.ts +62 -0
- package/dist/output/diagnostic-formatter.d.ts.map +1 -0
- package/dist/output/diagnostic-formatter.js +186 -0
- package/dist/output/diagnostic-formatter.js.map +1 -0
- package/dist/output/header-formatter.d.ts +147 -0
- package/dist/output/header-formatter.d.ts.map +1 -0
- package/dist/output/header-formatter.js +232 -0
- package/dist/output/header-formatter.js.map +1 -0
- package/dist/output/help-formatter.d.ts +79 -0
- package/dist/output/help-formatter.d.ts.map +1 -0
- package/dist/output/help-formatter.js +358 -0
- package/dist/output/help-formatter.js.map +1 -0
- package/dist/output/index.d.ts +12 -0
- package/dist/output/index.d.ts.map +1 -0
- package/dist/output/index.js +12 -0
- package/dist/output/index.js.map +1 -0
- package/dist/output/logger.d.ts +113 -0
- package/dist/output/logger.d.ts.map +1 -0
- package/dist/output/logger.js +461 -0
- package/dist/output/logger.js.map +1 -0
- package/dist/output/markdown.d.ts +35 -0
- package/dist/output/markdown.d.ts.map +1 -0
- package/dist/output/markdown.js +188 -0
- package/dist/output/markdown.js.map +1 -0
- package/dist/output/multi-stage-progress.d.ts +77 -0
- package/dist/output/multi-stage-progress.d.ts.map +1 -0
- package/dist/output/multi-stage-progress.js +173 -0
- package/dist/output/multi-stage-progress.js.map +1 -0
- package/dist/output/pipeline-emitter.d.ts +85 -0
- package/dist/output/pipeline-emitter.d.ts.map +1 -0
- package/dist/output/pipeline-emitter.js +202 -0
- package/dist/output/pipeline-emitter.js.map +1 -0
- package/dist/output/processing-feedback.d.ts +299 -0
- package/dist/output/processing-feedback.d.ts.map +1 -0
- package/dist/output/processing-feedback.js +1032 -0
- package/dist/output/processing-feedback.js.map +1 -0
- package/dist/output/progress-formatter.d.ts +68 -0
- package/dist/output/progress-formatter.d.ts.map +1 -0
- package/dist/output/progress-formatter.js +210 -0
- package/dist/output/progress-formatter.js.map +1 -0
- package/dist/output/progress.d.ts +92 -0
- package/dist/output/progress.d.ts.map +1 -0
- package/dist/output/progress.js +256 -0
- package/dist/output/progress.js.map +1 -0
- package/dist/output/retention-manager.d.ts +62 -0
- package/dist/output/retention-manager.d.ts.map +1 -0
- package/dist/output/retention-manager.js +401 -0
- package/dist/output/retention-manager.js.map +1 -0
- package/dist/output/terminal-utils.d.ts +50 -0
- package/dist/output/terminal-utils.d.ts.map +1 -0
- package/dist/output/terminal-utils.js +103 -0
- package/dist/output/terminal-utils.js.map +1 -0
- package/dist/output/verbose-formatter.d.ts +91 -0
- package/dist/output/verbose-formatter.d.ts.map +1 -0
- package/dist/output/verbose-formatter.js +182 -0
- package/dist/output/verbose-formatter.js.map +1 -0
- package/dist/output/welcome-banner.d.ts +16 -0
- package/dist/output/welcome-banner.d.ts.map +1 -0
- package/dist/output/welcome-banner.js +80 -0
- package/dist/output/welcome-banner.js.map +1 -0
- package/dist/package.json +166 -0
- package/dist/services/agent-capability-matcher.service.d.ts +89 -0
- package/dist/services/agent-capability-matcher.service.d.ts.map +1 -0
- package/dist/services/agent-capability-matcher.service.js +310 -0
- package/dist/services/agent-capability-matcher.service.js.map +1 -0
- package/dist/services/agent-capability-registry.service.d.ts +93 -0
- package/dist/services/agent-capability-registry.service.d.ts.map +1 -0
- package/dist/services/agent-capability-registry.service.js +242 -0
- package/dist/services/agent-capability-registry.service.js.map +1 -0
- package/dist/services/agent-selection-analytics.service.d.ts +89 -0
- package/dist/services/agent-selection-analytics.service.d.ts.map +1 -0
- package/dist/services/agent-selection-analytics.service.js +180 -0
- package/dist/services/agent-selection-analytics.service.js.map +1 -0
- package/dist/services/context-analyzer.service.d.ts +56 -0
- package/dist/services/context-analyzer.service.d.ts.map +1 -0
- package/dist/services/context-analyzer.service.js +323 -0
- package/dist/services/context-analyzer.service.js.map +1 -0
- package/dist/services/diagnostics.service.d.ts +40 -0
- package/dist/services/diagnostics.service.d.ts.map +1 -0
- package/dist/services/diagnostics.service.js +245 -0
- package/dist/services/diagnostics.service.js.map +1 -0
- package/dist/services/document-detector.service.d.ts +89 -0
- package/dist/services/document-detector.service.d.ts.map +1 -0
- package/dist/services/document-detector.service.js +500 -0
- package/dist/services/document-detector.service.js.map +1 -0
- package/dist/services/document-path-resolver.service.d.ts +68 -0
- package/dist/services/document-path-resolver.service.d.ts.map +1 -0
- package/dist/services/document-path-resolver.service.js +155 -0
- package/dist/services/document-path-resolver.service.js.map +1 -0
- package/dist/services/document-template.service.d.ts +83 -0
- package/dist/services/document-template.service.d.ts.map +1 -0
- package/dist/services/document-template.service.js +317 -0
- package/dist/services/document-template.service.js.map +1 -0
- package/dist/services/document-writer.service.d.ts +42 -0
- package/dist/services/document-writer.service.d.ts.map +1 -0
- package/dist/services/document-writer.service.js +155 -0
- package/dist/services/document-writer.service.js.map +1 -0
- package/dist/services/dynamic-agent-resolver.service.d.ts +81 -0
- package/dist/services/dynamic-agent-resolver.service.d.ts.map +1 -0
- package/dist/services/dynamic-agent-resolver.service.js +267 -0
- package/dist/services/dynamic-agent-resolver.service.js.map +1 -0
- package/dist/services/git-stash-protection.service.d.ts +76 -0
- package/dist/services/git-stash-protection.service.d.ts.map +1 -0
- package/dist/services/git-stash-protection.service.js +190 -0
- package/dist/services/git-stash-protection.service.js.map +1 -0
- package/dist/services/idempotency-store.service.d.ts +101 -0
- package/dist/services/idempotency-store.service.d.ts.map +1 -0
- package/dist/services/idempotency-store.service.js +418 -0
- package/dist/services/idempotency-store.service.js.map +1 -0
- package/dist/services/index.d.ts +17 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +17 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/task-classifier.service.d.ts +42 -0
- package/dist/services/task-classifier.service.d.ts.map +1 -0
- package/dist/services/task-classifier.service.js +211 -0
- package/dist/services/task-classifier.service.js.map +1 -0
- package/dist/session/archive-adapter.d.ts +26 -0
- package/dist/session/archive-adapter.d.ts.map +1 -0
- package/dist/session/archive-adapter.interface.d.ts +59 -0
- package/dist/session/archive-adapter.interface.d.ts.map +1 -0
- package/dist/session/archive-adapter.interface.js +11 -0
- package/dist/session/archive-adapter.interface.js.map +1 -0
- package/dist/session/archive-adapter.js +72 -0
- package/dist/session/archive-adapter.js.map +1 -0
- package/dist/session/cleanup-scheduler.d.ts +22 -0
- package/dist/session/cleanup-scheduler.d.ts.map +1 -0
- package/dist/session/cleanup-scheduler.js +96 -0
- package/dist/session/cleanup-scheduler.js.map +1 -0
- package/dist/session/context.d.ts +109 -0
- package/dist/session/context.d.ts.map +1 -0
- package/dist/session/context.js +253 -0
- package/dist/session/context.js.map +1 -0
- package/dist/session/index.d.ts +9 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +9 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/lifecycle.d.ts +87 -0
- package/dist/session/lifecycle.d.ts.map +1 -0
- package/dist/session/lifecycle.js +301 -0
- package/dist/session/lifecycle.js.map +1 -0
- package/dist/session/retention-manager.d.ts +55 -0
- package/dist/session/retention-manager.d.ts.map +1 -0
- package/dist/session/retention-manager.js +299 -0
- package/dist/session/retention-manager.js.map +1 -0
- package/dist/session/retention-policy-runner.d.ts +19 -0
- package/dist/session/retention-policy-runner.d.ts.map +1 -0
- package/dist/session/retention-policy-runner.js +103 -0
- package/dist/session/retention-policy-runner.js.map +1 -0
- package/dist/session/session-cleanup-ui.d.ts +101 -0
- package/dist/session/session-cleanup-ui.d.ts.map +1 -0
- package/dist/session/session-cleanup-ui.js +339 -0
- package/dist/session/session-cleanup-ui.js.map +1 -0
- package/dist/session/session-exporter.d.ts +61 -0
- package/dist/session/session-exporter.d.ts.map +1 -0
- package/dist/session/session-exporter.js +274 -0
- package/dist/session/session-exporter.js.map +1 -0
- package/dist/session/store.d.ts +138 -0
- package/dist/session/store.d.ts.map +1 -0
- package/dist/session/store.js +430 -0
- package/dist/session/store.js.map +1 -0
- package/dist/session/types.d.ts +22 -0
- package/dist/session/types.d.ts.map +1 -0
- package/dist/session/types.js +7 -0
- package/dist/session/types.js.map +1 -0
- package/dist/tsconfig.json +18 -0
- package/dist/types/agent.types.d.ts +110 -0
- package/dist/types/agent.types.d.ts.map +1 -0
- package/dist/types/agent.types.js +5 -0
- package/dist/types/agent.types.js.map +1 -0
- package/dist/types/cli.types.d.ts +86 -0
- package/dist/types/cli.types.d.ts.map +1 -0
- package/dist/types/cli.types.js +5 -0
- package/dist/types/cli.types.js.map +1 -0
- package/dist/types/command.types.d.ts +176 -0
- package/dist/types/command.types.d.ts.map +1 -0
- package/dist/types/command.types.js +19 -0
- package/dist/types/command.types.js.map +1 -0
- package/dist/types/common.types.d.ts +31 -0
- package/dist/types/common.types.d.ts.map +1 -0
- package/dist/types/common.types.js +8 -0
- package/dist/types/common.types.js.map +1 -0
- package/dist/types/config.types.d.ts +104 -0
- package/dist/types/config.types.d.ts.map +1 -0
- package/dist/types/config.types.js +5 -0
- package/dist/types/config.types.js.map +1 -0
- package/dist/types/diagnostics.types.d.ts +18 -0
- package/dist/types/diagnostics.types.d.ts.map +1 -0
- package/dist/types/diagnostics.types.js +8 -0
- package/dist/types/diagnostics.types.js.map +1 -0
- package/dist/types/document.types.d.ts +127 -0
- package/dist/types/document.types.d.ts.map +1 -0
- package/dist/types/document.types.js +73 -0
- package/dist/types/document.types.js.map +1 -0
- package/dist/types/error.types.d.ts +48 -0
- package/dist/types/error.types.d.ts.map +1 -0
- package/dist/types/error.types.js +16 -0
- package/dist/types/error.types.js.map +1 -0
- package/dist/types/escalation.types.d.ts +76 -0
- package/dist/types/escalation.types.d.ts.map +1 -0
- package/dist/types/escalation.types.js +15 -0
- package/dist/types/escalation.types.js.map +1 -0
- package/dist/types/exploration.types.d.ts +298 -0
- package/dist/types/exploration.types.d.ts.map +1 -0
- package/dist/types/exploration.types.js +5 -0
- package/dist/types/exploration.types.js.map +1 -0
- package/dist/types/hook.types.d.ts +47 -0
- package/dist/types/hook.types.d.ts.map +1 -0
- package/dist/types/hook.types.js +8 -0
- package/dist/types/hook.types.js.map +1 -0
- package/dist/types/idempotency.types.d.ts +80 -0
- package/dist/types/idempotency.types.d.ts.map +1 -0
- package/dist/types/idempotency.types.js +16 -0
- package/dist/types/idempotency.types.js.map +1 -0
- package/dist/types/index.d.ts +25 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +25 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/llm.types.d.ts +73 -0
- package/dist/types/llm.types.d.ts.map +1 -0
- package/dist/types/llm.types.js +5 -0
- package/dist/types/llm.types.js.map +1 -0
- package/dist/types/logger.types.d.ts +21 -0
- package/dist/types/logger.types.d.ts.map +1 -0
- package/dist/types/logger.types.js +9 -0
- package/dist/types/logger.types.js.map +1 -0
- package/dist/types/mcp-client.types.d.ts +232 -0
- package/dist/types/mcp-client.types.d.ts.map +1 -0
- package/dist/types/mcp-client.types.js +8 -0
- package/dist/types/mcp-client.types.js.map +1 -0
- package/dist/types/mcp-registry.types.d.ts +49 -0
- package/dist/types/mcp-registry.types.d.ts.map +1 -0
- package/dist/types/mcp-registry.types.js +70 -0
- package/dist/types/mcp-registry.types.js.map +1 -0
- package/dist/types/mcp.types.d.ts +127 -0
- package/dist/types/mcp.types.d.ts.map +1 -0
- package/dist/types/mcp.types.js +5 -0
- package/dist/types/mcp.types.js.map +1 -0
- package/dist/types/pipeline.types.d.ts +139 -0
- package/dist/types/pipeline.types.d.ts.map +1 -0
- package/dist/types/pipeline.types.js +26 -0
- package/dist/types/pipeline.types.js.map +1 -0
- package/dist/types/prompt.types.d.ts +66 -0
- package/dist/types/prompt.types.d.ts.map +1 -0
- package/dist/types/prompt.types.js +5 -0
- package/dist/types/prompt.types.js.map +1 -0
- package/dist/types/provider-names.types.d.ts +56 -0
- package/dist/types/provider-names.types.d.ts.map +1 -0
- package/dist/types/provider-names.types.js +63 -0
- package/dist/types/provider-names.types.js.map +1 -0
- package/dist/types/provider.types.d.ts +22 -0
- package/dist/types/provider.types.d.ts.map +1 -0
- package/dist/types/provider.types.js +21 -0
- package/dist/types/provider.types.js.map +1 -0
- package/dist/types/session.types.d.ts +121 -0
- package/dist/types/session.types.d.ts.map +1 -0
- package/dist/types/session.types.js +5 -0
- package/dist/types/session.types.js.map +1 -0
- package/dist/types/tracing.types.d.ts +176 -0
- package/dist/types/tracing.types.d.ts.map +1 -0
- package/dist/types/tracing.types.js +77 -0
- package/dist/types/tracing.types.js.map +1 -0
- package/dist/types/ui.types.d.ts +88 -0
- package/dist/types/ui.types.d.ts.map +1 -0
- package/dist/types/ui.types.js +8 -0
- package/dist/types/ui.types.js.map +1 -0
- package/dist/types/workflow.types.d.ts +63 -0
- package/dist/types/workflow.types.d.ts.map +1 -0
- package/dist/types/workflow.types.js +5 -0
- package/dist/types/workflow.types.js.map +1 -0
- package/dist/ui/dashboard-tui.d.ts +38 -0
- package/dist/ui/dashboard-tui.d.ts.map +1 -0
- package/dist/ui/dashboard-tui.js +422 -0
- package/dist/ui/dashboard-tui.js.map +1 -0
- package/dist/ui/prompt-adapter.d.ts +37 -0
- package/dist/ui/prompt-adapter.d.ts.map +1 -0
- package/dist/ui/prompt-adapter.interface.d.ts +175 -0
- package/dist/ui/prompt-adapter.interface.d.ts.map +1 -0
- package/dist/ui/prompt-adapter.interface.js +54 -0
- package/dist/ui/prompt-adapter.interface.js.map +1 -0
- package/dist/ui/prompt-adapter.js +45 -0
- package/dist/ui/prompt-adapter.js.map +1 -0
- package/dist/ui/spinner-adapter.d.ts +29 -0
- package/dist/ui/spinner-adapter.d.ts.map +1 -0
- package/dist/ui/spinner-adapter.interface.d.ts +200 -0
- package/dist/ui/spinner-adapter.interface.d.ts.map +1 -0
- package/dist/ui/spinner-adapter.interface.js +53 -0
- package/dist/ui/spinner-adapter.interface.js.map +1 -0
- package/dist/ui/spinner-adapter.js +40 -0
- package/dist/ui/spinner-adapter.js.map +1 -0
- package/dist/ui/tui-adapter.d.ts +52 -0
- package/dist/ui/tui-adapter.d.ts.map +1 -0
- package/dist/ui/tui-adapter.interface.d.ts +197 -0
- package/dist/ui/tui-adapter.interface.d.ts.map +1 -0
- package/dist/ui/tui-adapter.interface.js +62 -0
- package/dist/ui/tui-adapter.interface.js.map +1 -0
- package/dist/ui/tui-adapter.js +58 -0
- package/dist/ui/tui-adapter.js.map +1 -0
- package/dist/utils/base-cleanup-scheduler.d.ts +60 -0
- package/dist/utils/base-cleanup-scheduler.d.ts.map +1 -0
- package/dist/utils/base-cleanup-scheduler.js +110 -0
- package/dist/utils/base-cleanup-scheduler.js.map +1 -0
- package/dist/utils/base-retention-manager.d.ts +136 -0
- package/dist/utils/base-retention-manager.d.ts.map +1 -0
- package/dist/utils/base-retention-manager.js +234 -0
- package/dist/utils/base-retention-manager.js.map +1 -0
- package/dist/utils/console-interceptor.d.ts +52 -0
- package/dist/utils/console-interceptor.d.ts.map +1 -0
- package/dist/utils/console-interceptor.js +92 -0
- package/dist/utils/console-interceptor.js.map +1 -0
- package/dist/utils/data-sanitizer.d.ts +106 -0
- package/dist/utils/data-sanitizer.d.ts.map +1 -0
- package/dist/utils/data-sanitizer.js +295 -0
- package/dist/utils/data-sanitizer.js.map +1 -0
- package/dist/utils/diff-generator.d.ts +42 -0
- package/dist/utils/diff-generator.d.ts.map +1 -0
- package/dist/utils/diff-generator.js +286 -0
- package/dist/utils/diff-generator.js.map +1 -0
- package/dist/utils/docs-linter.d.ts +178 -0
- package/dist/utils/docs-linter.d.ts.map +1 -0
- package/dist/utils/docs-linter.js +623 -0
- package/dist/utils/docs-linter.js.map +1 -0
- package/dist/utils/domain-keyword-registry.d.ts +57 -0
- package/dist/utils/domain-keyword-registry.d.ts.map +1 -0
- package/dist/utils/domain-keyword-registry.js +253 -0
- package/dist/utils/domain-keyword-registry.js.map +1 -0
- package/dist/utils/encryption.d.ts +111 -0
- package/dist/utils/encryption.d.ts.map +1 -0
- package/dist/utils/encryption.js +304 -0
- package/dist/utils/encryption.js.map +1 -0
- package/dist/utils/environment.d.ts +37 -0
- package/dist/utils/environment.d.ts.map +1 -0
- package/dist/utils/environment.js +87 -0
- package/dist/utils/environment.js.map +1 -0
- package/dist/utils/error-handler.d.ts +130 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +319 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/error-messages.d.ts +23 -0
- package/dist/utils/error-messages.d.ts.map +1 -0
- package/dist/utils/error-messages.js +160 -0
- package/dist/utils/error-messages.js.map +1 -0
- package/dist/utils/error-utils.d.ts +26 -0
- package/dist/utils/error-utils.d.ts.map +1 -0
- package/dist/utils/error-utils.js +33 -0
- package/dist/utils/error-utils.js.map +1 -0
- package/dist/utils/file-lock.d.ts +77 -0
- package/dist/utils/file-lock.d.ts.map +1 -0
- package/dist/utils/file-lock.js +355 -0
- package/dist/utils/file-lock.js.map +1 -0
- package/dist/utils/file-utils.d.ts +71 -0
- package/dist/utils/file-utils.d.ts.map +1 -0
- package/dist/utils/file-utils.js +235 -0
- package/dist/utils/file-utils.js.map +1 -0
- package/dist/utils/heap-profiler.d.ts +20 -0
- package/dist/utils/heap-profiler.d.ts.map +1 -0
- package/dist/utils/heap-profiler.js +60 -0
- package/dist/utils/heap-profiler.js.map +1 -0
- package/dist/utils/help-content.d.ts +117 -0
- package/dist/utils/help-content.d.ts.map +1 -0
- package/dist/utils/help-content.js +1512 -0
- package/dist/utils/help-content.js.map +1 -0
- package/dist/utils/id-generator.d.ts +45 -0
- package/dist/utils/id-generator.d.ts.map +1 -0
- package/dist/utils/id-generator.js +62 -0
- package/dist/utils/id-generator.js.map +1 -0
- package/dist/utils/index.d.ts +17 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +18 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/input-validator.d.ts +152 -0
- package/dist/utils/input-validator.d.ts.map +1 -0
- package/dist/utils/input-validator.js +494 -0
- package/dist/utils/input-validator.js.map +1 -0
- package/dist/utils/markdown-parser.d.ts +32 -0
- package/dist/utils/markdown-parser.d.ts.map +1 -0
- package/dist/utils/markdown-parser.js +85 -0
- package/dist/utils/markdown-parser.js.map +1 -0
- package/dist/utils/metrics-collector.d.ts +165 -0
- package/dist/utils/metrics-collector.d.ts.map +1 -0
- package/dist/utils/metrics-collector.js +392 -0
- package/dist/utils/metrics-collector.js.map +1 -0
- package/dist/utils/number-format.d.ts +29 -0
- package/dist/utils/number-format.d.ts.map +1 -0
- package/dist/utils/number-format.js +72 -0
- package/dist/utils/number-format.js.map +1 -0
- package/dist/utils/paths.d.ts +37 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +91 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/performance-profiler.d.ts +155 -0
- package/dist/utils/performance-profiler.d.ts.map +1 -0
- package/dist/utils/performance-profiler.js +429 -0
- package/dist/utils/performance-profiler.js.map +1 -0
- package/dist/utils/prompt-handler.d.ts +18 -0
- package/dist/utils/prompt-handler.d.ts.map +1 -0
- package/dist/utils/prompt-handler.js +66 -0
- package/dist/utils/prompt-handler.js.map +1 -0
- package/dist/utils/rate-limiter.d.ts +99 -0
- package/dist/utils/rate-limiter.d.ts.map +1 -0
- package/dist/utils/rate-limiter.js +214 -0
- package/dist/utils/rate-limiter.js.map +1 -0
- package/dist/utils/resource-monitor.d.ts +203 -0
- package/dist/utils/resource-monitor.d.ts.map +1 -0
- package/dist/utils/resource-monitor.js +521 -0
- package/dist/utils/resource-monitor.js.map +1 -0
- package/dist/utils/resource-resolver.d.ts +58 -0
- package/dist/utils/resource-resolver.d.ts.map +1 -0
- package/dist/utils/resource-resolver.js +150 -0
- package/dist/utils/resource-resolver.js.map +1 -0
- package/dist/utils/safe-exec.d.ts +90 -0
- package/dist/utils/safe-exec.d.ts.map +1 -0
- package/dist/utils/safe-exec.js +210 -0
- package/dist/utils/safe-exec.js.map +1 -0
- package/dist/utils/safe-regex.d.ts +49 -0
- package/dist/utils/safe-regex.d.ts.map +1 -0
- package/dist/utils/safe-regex.js +96 -0
- package/dist/utils/safe-regex.js.map +1 -0
- package/dist/utils/template-loader.d.ts +39 -0
- package/dist/utils/template-loader.d.ts.map +1 -0
- package/dist/utils/template-loader.js +75 -0
- package/dist/utils/template-loader.js.map +1 -0
- package/dist/utils/token-estimator.d.ts +60 -0
- package/dist/utils/token-estimator.d.ts.map +1 -0
- package/dist/utils/token-estimator.js +114 -0
- package/dist/utils/token-estimator.js.map +1 -0
- package/dist/utils/tracing.d.ts +166 -0
- package/dist/utils/tracing.d.ts.map +1 -0
- package/dist/utils/tracing.js +645 -0
- package/dist/utils/tracing.js.map +1 -0
- package/dist/utils/type-guards.d.ts +58 -0
- package/dist/utils/type-guards.d.ts.map +1 -0
- package/dist/utils/type-guards.js +103 -0
- package/dist/utils/type-guards.js.map +1 -0
- package/dist/utils/yaml-parser.d.ts +38 -0
- package/dist/utils/yaml-parser.d.ts.map +1 -0
- package/dist/utils/yaml-parser.js +71 -0
- package/dist/utils/yaml-parser.js.map +1 -0
- package/package.json +166 -0
|
@@ -0,0 +1,790 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stage Executor - Handles execution of individual pipeline stages
|
|
3
|
+
*
|
|
4
|
+
* MAINT-002: Large Files Need Splitting - Extracted from pipeline.ts
|
|
5
|
+
*/
|
|
6
|
+
import { DEFAULT_MAX_TOKENS, DEFAULT_TEMPERATURE } from '../config/constants.js';
|
|
7
|
+
import { ProviderName } from '../config/providers.config.js';
|
|
8
|
+
import { existsSync } from 'fs';
|
|
9
|
+
import { MCPApprovalCacheService } from '../mcp/mcp-approval-cache.service.js';
|
|
10
|
+
import { MCPApprovalWorkflow } from '../mcp/mcp-approval-workflow.js';
|
|
11
|
+
import { MCPAuditLoggerService } from '../mcp/mcp-audit-logger.service.js';
|
|
12
|
+
import { MCPAvailabilityService } from '../mcp/mcp-availability.service.js';
|
|
13
|
+
import { MCPClientManagerService } from '../mcp/mcp-client-manager.service.js';
|
|
14
|
+
import { getMCPToolHandler } from '../mcp/mcp-tool-handler.js';
|
|
15
|
+
import { getLogger } from '../output/logger.js';
|
|
16
|
+
import { ResolutionPath } from '../types/provider.types.js';
|
|
17
|
+
import { formatErrorMessage } from '../utils/error-utils.js';
|
|
18
|
+
import { readFile } from '../utils/file-utils.js';
|
|
19
|
+
import { getEscalationDetectionService } from './escalation-detection.service.js';
|
|
20
|
+
import { getEscalationHandlerService } from './escalation-handler.service.js';
|
|
21
|
+
import { getMessageBuilderService } from './message-builder.service.js';
|
|
22
|
+
import { getOutputParsingService } from './output-parsing.service.js';
|
|
23
|
+
import { getPipelineEmitter } from './pipeline-events.js';
|
|
24
|
+
import { loadAvailableAgents, loadProjectGuidance, loadProjectKnowledge } from './project-guidance-loader.js';
|
|
25
|
+
import { getStageOutputCache } from './stage-output-cache.js';
|
|
26
|
+
import { getStageValidationService } from './stage-validation.service.js';
|
|
27
|
+
import { getToolExecutionService } from './tool-execution.service.js';
|
|
28
|
+
export class StageExecutor {
|
|
29
|
+
promptLoader;
|
|
30
|
+
agentLoader;
|
|
31
|
+
escalationDetectionService;
|
|
32
|
+
escalationHandlerService;
|
|
33
|
+
eventEmitter;
|
|
34
|
+
mcpClientManager;
|
|
35
|
+
mcpToolHandler;
|
|
36
|
+
messageBuilderService;
|
|
37
|
+
outputParsingService;
|
|
38
|
+
stageOutputCache;
|
|
39
|
+
toolExecutionService;
|
|
40
|
+
validationService;
|
|
41
|
+
constructor(promptLoader, agentLoader, eventEmitter) {
|
|
42
|
+
this.promptLoader = promptLoader;
|
|
43
|
+
this.agentLoader = agentLoader;
|
|
44
|
+
this.eventEmitter = eventEmitter ?? getPipelineEmitter();
|
|
45
|
+
this.validationService = getStageValidationService();
|
|
46
|
+
this.escalationDetectionService = getEscalationDetectionService();
|
|
47
|
+
this.escalationHandlerService = getEscalationHandlerService();
|
|
48
|
+
this.toolExecutionService = getToolExecutionService();
|
|
49
|
+
this.outputParsingService = getOutputParsingService();
|
|
50
|
+
this.messageBuilderService = getMessageBuilderService();
|
|
51
|
+
this.stageOutputCache = getStageOutputCache();
|
|
52
|
+
// Initialize MCP services for external tool calls
|
|
53
|
+
const approvalCache = new MCPApprovalCacheService();
|
|
54
|
+
const auditLogger = new MCPAuditLoggerService();
|
|
55
|
+
this.mcpClientManager = new MCPClientManagerService(approvalCache, auditLogger);
|
|
56
|
+
const availabilityService = new MCPAvailabilityService(this.mcpClientManager);
|
|
57
|
+
const approvalWorkflow = new MCPApprovalWorkflow();
|
|
58
|
+
this.mcpToolHandler = getMCPToolHandler(this.mcpClientManager, availabilityService, approvalCache, auditLogger, approvalWorkflow);
|
|
59
|
+
// Wire up MCP services to tool execution service
|
|
60
|
+
this.toolExecutionService.setMCPClientManager(this.mcpClientManager);
|
|
61
|
+
this.toolExecutionService.setMCPToolHandler(this.mcpToolHandler);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Reset tool execution state for a new command
|
|
65
|
+
* Should be called at the start of each command execution
|
|
66
|
+
*/
|
|
67
|
+
resetForNewCommand() {
|
|
68
|
+
this.toolExecutionService.resetForNewCommand();
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Flush any pending file writes with user confirmation
|
|
72
|
+
* Should be called at the end of pipeline execution
|
|
73
|
+
*/
|
|
74
|
+
async flushPendingWrites() {
|
|
75
|
+
return this.toolExecutionService.flushPendingWrites();
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Check if there are pending writes awaiting confirmation
|
|
79
|
+
*/
|
|
80
|
+
hasPendingWrites() {
|
|
81
|
+
return this.toolExecutionService.hasPendingWrites();
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Execute a single pipeline stage
|
|
85
|
+
*/
|
|
86
|
+
async executeStage(stage, context, stageIndex, options) {
|
|
87
|
+
const logger = getLogger();
|
|
88
|
+
const { executionContext } = context;
|
|
89
|
+
const startTime = Date.now();
|
|
90
|
+
this.logStageStart(logger, stage, stageIndex, options);
|
|
91
|
+
this.emitStageStartEvent(stage, stageIndex, options);
|
|
92
|
+
try {
|
|
93
|
+
// Check cache if caching is enabled for this stage
|
|
94
|
+
if (stage.cache?.enabled) {
|
|
95
|
+
const cachedResult = this.checkStageCache(stage, executionContext, options, logger);
|
|
96
|
+
if (cachedResult) {
|
|
97
|
+
return cachedResult;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const stageResult = await this.performStageExecution(stage, executionContext, startTime, options);
|
|
101
|
+
// Store successful result in cache if caching is enabled
|
|
102
|
+
if (stage.cache?.enabled && stageResult.success) {
|
|
103
|
+
this.storeInCache(stage, executionContext, stageResult, options, logger);
|
|
104
|
+
}
|
|
105
|
+
// Validate stage outputs for early termination conditions
|
|
106
|
+
const validatedResult = this.validateStageResult(stage, stageResult, logger);
|
|
107
|
+
return validatedResult;
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
return this.handleStageError(stage, error, startTime, stageIndex);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Check stage output cache for a cached result
|
|
115
|
+
*/
|
|
116
|
+
checkStageCache(stage, executionContext, _options, logger) {
|
|
117
|
+
const stageId = `${stage.stage}.${stage.prompt}`;
|
|
118
|
+
// Resolve inputs for cache key generation
|
|
119
|
+
const variableResolver = executionContext.getVariableResolver();
|
|
120
|
+
const resolvedInputs = stage.inputs ? variableResolver.resolve(stage.inputs) : {};
|
|
121
|
+
// Convert stage cache config to service format
|
|
122
|
+
const cacheConfig = stage.cache
|
|
123
|
+
? {
|
|
124
|
+
cache_key_inputs: stage.cache.cache_key_inputs,
|
|
125
|
+
enabled: stage.cache.enabled,
|
|
126
|
+
file_dependencies: stage.cache.file_dependencies,
|
|
127
|
+
ttl_ms: stage.cache.ttl_ms
|
|
128
|
+
}
|
|
129
|
+
: undefined;
|
|
130
|
+
const cacheResult = this.stageOutputCache.get(stageId, resolvedInputs, cacheConfig);
|
|
131
|
+
if (cacheResult.hit && cacheResult.entry) {
|
|
132
|
+
logger.info(`Stage cache hit: ${stageId}`, {
|
|
133
|
+
cacheAge_ms: Date.now() - cacheResult.entry.createdAt,
|
|
134
|
+
savedTime_ms: cacheResult.savedTime_ms
|
|
135
|
+
});
|
|
136
|
+
// Emit stage complete event with cache info
|
|
137
|
+
this.eventEmitter.emitStageComplete({
|
|
138
|
+
duration: 0,
|
|
139
|
+
stage: stageId,
|
|
140
|
+
success: true
|
|
141
|
+
});
|
|
142
|
+
return {
|
|
143
|
+
duration_ms: 0,
|
|
144
|
+
metadata: {
|
|
145
|
+
cached: true,
|
|
146
|
+
originalDuration_ms: cacheResult.entry.originalDuration_ms,
|
|
147
|
+
savedTime_ms: cacheResult.savedTime_ms,
|
|
148
|
+
stageContext: {
|
|
149
|
+
inputs: resolvedInputs,
|
|
150
|
+
prompt: stage.prompt,
|
|
151
|
+
stage: stage.stage
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
outputs: cacheResult.entry.outputs,
|
|
155
|
+
prompt: stage.prompt,
|
|
156
|
+
stage: stage.stage,
|
|
157
|
+
success: true
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
if (!cacheResult.hit) {
|
|
161
|
+
logger.debug(`Stage cache miss: ${stageId}`, { reason: cacheResult.reason });
|
|
162
|
+
}
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Store stage result in cache
|
|
167
|
+
*/
|
|
168
|
+
storeInCache(stage, executionContext, result, _options, logger) {
|
|
169
|
+
const stageId = `${stage.stage}.${stage.prompt}`;
|
|
170
|
+
// Resolve inputs for cache key generation
|
|
171
|
+
const variableResolver = executionContext.getVariableResolver();
|
|
172
|
+
const resolvedInputs = stage.inputs ? variableResolver.resolve(stage.inputs) : {};
|
|
173
|
+
// Convert stage cache config to service format
|
|
174
|
+
const cacheConfig = stage.cache
|
|
175
|
+
? {
|
|
176
|
+
cache_key_inputs: stage.cache.cache_key_inputs,
|
|
177
|
+
enabled: stage.cache.enabled,
|
|
178
|
+
file_dependencies: stage.cache.file_dependencies,
|
|
179
|
+
ttl_ms: stage.cache.ttl_ms
|
|
180
|
+
}
|
|
181
|
+
: undefined;
|
|
182
|
+
try {
|
|
183
|
+
this.stageOutputCache.set(stageId, resolvedInputs, result.outputs, result.duration_ms, cacheConfig);
|
|
184
|
+
logger.debug(`Stage output cached: ${stageId}`, { duration_ms: result.duration_ms });
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
logger.warn(`Failed to cache stage output: ${stageId}`, { error: error.message });
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Validate stage result and potentially mark for early termination
|
|
192
|
+
*/
|
|
193
|
+
validateStageResult(stage, result, logger) {
|
|
194
|
+
const stageName = `${stage.stage}.${stage.prompt}`;
|
|
195
|
+
// Only validate specific stages that require validation
|
|
196
|
+
if (!this.validationService.requiresValidation(stageName)) {
|
|
197
|
+
return result;
|
|
198
|
+
}
|
|
199
|
+
// Skip validation if stage already failed
|
|
200
|
+
if (!result.success) {
|
|
201
|
+
return result;
|
|
202
|
+
}
|
|
203
|
+
// Validate the outputs
|
|
204
|
+
const validation = this.validationService.validate(stageName, result.outputs);
|
|
205
|
+
if (!validation.isValid) {
|
|
206
|
+
logger.warn(`Stage validation failed: ${stageName}`, {
|
|
207
|
+
reasons: validation.reasons
|
|
208
|
+
});
|
|
209
|
+
// Display the validation failure summary
|
|
210
|
+
this.validationService.displayValidationFailure(validation);
|
|
211
|
+
// Return modified result with failure and stop signal
|
|
212
|
+
return {
|
|
213
|
+
...result,
|
|
214
|
+
error: validation.reasons.join('; '),
|
|
215
|
+
metadata: {
|
|
216
|
+
...result.metadata,
|
|
217
|
+
stopPipeline: validation.shouldStopPipeline,
|
|
218
|
+
validationFailure: true,
|
|
219
|
+
validationReasons: validation.reasons
|
|
220
|
+
},
|
|
221
|
+
success: false
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
return result;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Log stage start information
|
|
228
|
+
*/
|
|
229
|
+
logStageStart(logger, stage, stageIndex, options) {
|
|
230
|
+
const executionMode = options?.isParallel ? 'parallel' : 'sequential';
|
|
231
|
+
const worktreeLabel = options?.worktreeInfo ? ` [worktree: ${options.worktreeInfo.branch}]` : '';
|
|
232
|
+
logger.debug(`Executing stage: ${stage.stage}.${stage.prompt} (${executionMode})${worktreeLabel}`, {
|
|
233
|
+
executionMode,
|
|
234
|
+
index: stageIndex + 1,
|
|
235
|
+
isParallel: options?.isParallel ?? false,
|
|
236
|
+
totalStages: stageIndex + 1,
|
|
237
|
+
worktree: options?.worktreeInfo?.path
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Emit stage start event
|
|
242
|
+
*/
|
|
243
|
+
emitStageStartEvent(stage, stageIndex, options) {
|
|
244
|
+
this.eventEmitter.emitStageStart({
|
|
245
|
+
index: stageIndex,
|
|
246
|
+
isParallel: options?.isParallel,
|
|
247
|
+
stage: `${stage.stage}.${stage.prompt}`,
|
|
248
|
+
totalStages: stageIndex + 1,
|
|
249
|
+
worktreeInfo: options?.worktreeInfo
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Perform the actual stage execution
|
|
254
|
+
*/
|
|
255
|
+
async performStageExecution(stage, executionContext, startTime, options) {
|
|
256
|
+
const logger = getLogger();
|
|
257
|
+
// Load resources and resolve inputs
|
|
258
|
+
const resources = await this.loadStageResources(stage, executionContext);
|
|
259
|
+
const enrichedInputs = await this.resolveStageInputs(stage, executionContext, options, logger);
|
|
260
|
+
// Build messages
|
|
261
|
+
const { systemMessage, userMessage } = this.buildStageMessages(stage, resources, enrichedInputs);
|
|
262
|
+
// Get execution configuration
|
|
263
|
+
const config = this.getExecutionConfig(executionContext);
|
|
264
|
+
// Log tool configuration
|
|
265
|
+
this.logToolConfiguration(stage, config, logger);
|
|
266
|
+
// Set dry-run mode on tool service (tools will be simulated, not executed)
|
|
267
|
+
if (config.isDryRun) {
|
|
268
|
+
this.toolExecutionService.setDryRunMode(true);
|
|
269
|
+
logger.info('Dry-run mode enabled - tools will be simulated');
|
|
270
|
+
}
|
|
271
|
+
// Emit LLM request event
|
|
272
|
+
this.eventEmitter.emitLLMRequest({
|
|
273
|
+
model: config.modelOverride ?? executionContext.model,
|
|
274
|
+
stage: `${stage.stage}.${stage.prompt}`
|
|
275
|
+
});
|
|
276
|
+
// Call LLM with tool loop
|
|
277
|
+
// In dry-run mode, tools are passed to LLM but simulated during execution
|
|
278
|
+
const completion = await this.callLLMWithToolLoop(executionContext, systemMessage, userMessage, config.modelOverride, config.modeOverride, config.tools, stage, logger);
|
|
279
|
+
const duration = Date.now() - startTime;
|
|
280
|
+
// Emit LLM response event
|
|
281
|
+
const model = config.modelOverride ?? executionContext.model ?? 'default';
|
|
282
|
+
this.emitLLMResponseEvent(stage, model, duration, completion);
|
|
283
|
+
// Handle completion
|
|
284
|
+
return this.handleStageCompletion(completion, stage, executionContext, resources.escalationCriteria, enrichedInputs, duration, logger);
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Load all resources needed for stage execution
|
|
288
|
+
*/
|
|
289
|
+
async loadStageResources(stage, executionContext) {
|
|
290
|
+
const prompt = await this.promptLoader.loadPrompt(stage.prompt);
|
|
291
|
+
const agent = await this.agentLoader.loadAgent(executionContext.agentRole);
|
|
292
|
+
const projectGuidance = await loadProjectGuidance();
|
|
293
|
+
const projectKnowledge = await loadProjectKnowledge(executionContext.knowledgeFiles ?? []);
|
|
294
|
+
const availableAgents = await loadAvailableAgents(prompt.agents ?? []);
|
|
295
|
+
return {
|
|
296
|
+
agent,
|
|
297
|
+
availableAgents,
|
|
298
|
+
escalationCriteria: agent.decision_making?.escalation_criteria,
|
|
299
|
+
projectGuidance,
|
|
300
|
+
projectKnowledge,
|
|
301
|
+
prompt
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Resolve stage inputs (use pre-resolved if available)
|
|
306
|
+
*/
|
|
307
|
+
async resolveStageInputs(stage, executionContext, options, logger) {
|
|
308
|
+
if (options?.preResolvedInputs) {
|
|
309
|
+
logger.debug(`Using pre-resolved inputs for stage: ${stage.stage}.${stage.prompt}`);
|
|
310
|
+
return options.preResolvedInputs;
|
|
311
|
+
}
|
|
312
|
+
const variableResolutionService = executionContext.getVariableResolver();
|
|
313
|
+
const resolvedInputs = stage.inputs ? variableResolutionService.resolve(stage.inputs) : {};
|
|
314
|
+
return this.enrichInputsWithFileContents(resolvedInputs, logger);
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Build system and user messages for the stage
|
|
318
|
+
*/
|
|
319
|
+
buildStageMessages(stage, resources, enrichedInputs) {
|
|
320
|
+
const systemMessage = this.messageBuilderService.buildSystemMessage({
|
|
321
|
+
agentProfile: resources.agent.content,
|
|
322
|
+
availableAgents: resources.availableAgents,
|
|
323
|
+
escalationCriteria: resources.escalationCriteria,
|
|
324
|
+
expectedOutputs: stage.outputs,
|
|
325
|
+
projectGuidance: resources.projectGuidance,
|
|
326
|
+
projectKnowledge: resources.projectKnowledge,
|
|
327
|
+
promptContent: resources.prompt.content
|
|
328
|
+
});
|
|
329
|
+
const userMessage = this.messageBuilderService.buildUserMessage(enrichedInputs);
|
|
330
|
+
return { systemMessage, userMessage };
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Get execution configuration (model, mode, tools, dry-run)
|
|
334
|
+
*/
|
|
335
|
+
getExecutionConfig(executionContext) {
|
|
336
|
+
const modelOverride = executionContext.flags['model'];
|
|
337
|
+
const modeOverride = executionContext.flags['mode'];
|
|
338
|
+
const allowedTools = executionContext.allowedTools;
|
|
339
|
+
const tools = allowedTools && allowedTools.length > 0 ? this.toolExecutionService.getToolDefinitions(allowedTools) : undefined;
|
|
340
|
+
const isDryRun = executionContext.flags['dryRun'] === true || executionContext.flags['dry-run'] === true;
|
|
341
|
+
return { isDryRun, modelOverride, modeOverride, tools };
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Log tool configuration for diagnostics
|
|
345
|
+
*/
|
|
346
|
+
logToolConfiguration(stage, config, logger) {
|
|
347
|
+
logger.info('Stage execution tool configuration', {
|
|
348
|
+
allowedToolsCount: config.tools?.length ?? 0,
|
|
349
|
+
isDryRun: config.isDryRun,
|
|
350
|
+
stage: `${stage.stage}.${stage.prompt}`,
|
|
351
|
+
toolDefinitionsCount: config.tools?.length ?? 0,
|
|
352
|
+
toolNames: config.tools?.map((t) => t.name)
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Handle stage completion (guided, escalation, or normal)
|
|
357
|
+
*/
|
|
358
|
+
async handleStageCompletion(completion, stage, executionContext, escalationCriteria, enrichedInputs, duration, logger) {
|
|
359
|
+
const handlerCtx = {
|
|
360
|
+
completion,
|
|
361
|
+
duration,
|
|
362
|
+
logger,
|
|
363
|
+
resolvedInputs: enrichedInputs,
|
|
364
|
+
stage
|
|
365
|
+
};
|
|
366
|
+
if (completion.guidedCompletion) {
|
|
367
|
+
return this.handleGuidedCompletion(handlerCtx);
|
|
368
|
+
}
|
|
369
|
+
if (escalationCriteria && escalationCriteria.length > 0) {
|
|
370
|
+
const escalationResult = await this.processEscalation(completion.content, stage, executionContext.agentRole, escalationCriteria, duration, enrichedInputs, logger);
|
|
371
|
+
if (escalationResult) {
|
|
372
|
+
return escalationResult;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
return this.handleNormalCompletion(handlerCtx);
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Call the LLM provider with tool loop
|
|
379
|
+
*
|
|
380
|
+
* If tools are provided, this method will:
|
|
381
|
+
* 1. Send the request to the LLM with tools
|
|
382
|
+
* 2. Check if the response contains tool_calls
|
|
383
|
+
* 3. Execute the requested tools
|
|
384
|
+
* 4. Send tool results back to the LLM
|
|
385
|
+
* 5. Repeat until the LLM completes without tool calls
|
|
386
|
+
*/
|
|
387
|
+
async callLLMWithToolLoop(executionContext, systemMessage, userMessage, modelOverride, modeOverride, tools, stage, logger) {
|
|
388
|
+
const maxToolIterations = 20;
|
|
389
|
+
const messages = [
|
|
390
|
+
{ content: systemMessage, role: 'system' },
|
|
391
|
+
{ content: userMessage, role: 'user' }
|
|
392
|
+
];
|
|
393
|
+
for (let iterations = 1; iterations <= maxToolIterations; iterations++) {
|
|
394
|
+
const completion = await this.executeLLMIteration(executionContext, messages, tools, modelOverride, modeOverride, iterations, logger);
|
|
395
|
+
// No tool calls means we're done
|
|
396
|
+
if (!completion.tool_calls || completion.tool_calls.length === 0) {
|
|
397
|
+
logger.debug('LLM completed without tool calls', { iterations, stage: `${stage.stage}.${stage.prompt}` });
|
|
398
|
+
return completion;
|
|
399
|
+
}
|
|
400
|
+
// Process tool calls and add to conversation
|
|
401
|
+
await this.processToolCallsInLoop(completion, messages, stage, iterations, logger);
|
|
402
|
+
}
|
|
403
|
+
// Exceeded max iterations
|
|
404
|
+
return this.handleMaxIterationsExceeded(executionContext, messages, stage, modelOverride, modeOverride, logger);
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Execute a single LLM iteration
|
|
408
|
+
*/
|
|
409
|
+
async executeLLMIteration(executionContext, messages, tools, modelOverride, modeOverride, iteration, logger) {
|
|
410
|
+
this.logLLMRequest(logger, iteration, tools);
|
|
411
|
+
const completionOptions = this.buildCompletionOptions(executionContext, messages, tools, modelOverride, modeOverride);
|
|
412
|
+
const completion = await executionContext.provider.complete(completionOptions);
|
|
413
|
+
this.logLLMResponse(logger, completion);
|
|
414
|
+
return completion;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Log LLM request information
|
|
418
|
+
*/
|
|
419
|
+
logLLMRequest(logger, iteration, tools) {
|
|
420
|
+
logger.info('Calling LLM with tool loop', {
|
|
421
|
+
hasTools: !!tools,
|
|
422
|
+
iteration,
|
|
423
|
+
toolCount: tools?.length ?? 0,
|
|
424
|
+
toolNames: tools?.map((t) => t.name)
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Build LLM completion options
|
|
429
|
+
*/
|
|
430
|
+
buildCompletionOptions(executionContext, messages, tools, modelOverride, modeOverride) {
|
|
431
|
+
const maxTokensFlag = executionContext.flags['maxTokens'];
|
|
432
|
+
const maxTokens = typeof maxTokensFlag === 'number' ? maxTokensFlag : DEFAULT_MAX_TOKENS;
|
|
433
|
+
return {
|
|
434
|
+
max_tokens: maxTokens,
|
|
435
|
+
messages,
|
|
436
|
+
mode: modeOverride ?? executionContext.mode,
|
|
437
|
+
model: modelOverride ?? executionContext.model,
|
|
438
|
+
temperature: DEFAULT_TEMPERATURE,
|
|
439
|
+
tools
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Log LLM response information
|
|
444
|
+
*/
|
|
445
|
+
logLLMResponse(logger, completion) {
|
|
446
|
+
logger.info('LLM response received', {
|
|
447
|
+
contentLength: completion.content?.length ?? 0,
|
|
448
|
+
finishReason: completion.finish_reason,
|
|
449
|
+
hasToolCalls: !!completion.tool_calls,
|
|
450
|
+
toolCallCount: completion.tool_calls?.length ?? 0
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Process tool calls and add results to conversation
|
|
455
|
+
*/
|
|
456
|
+
async processToolCallsInLoop(completion, messages, stage, iterations, logger) {
|
|
457
|
+
const toolCalls = completion.tool_calls;
|
|
458
|
+
logger.info('Processing tool calls from LLM', {
|
|
459
|
+
iterations,
|
|
460
|
+
stage: `${stage.stage}.${stage.prompt}`,
|
|
461
|
+
toolCount: toolCalls.length,
|
|
462
|
+
tools: toolCalls.map((tc) => tc.name)
|
|
463
|
+
});
|
|
464
|
+
// Add assistant message with tool calls
|
|
465
|
+
messages.push({
|
|
466
|
+
content: completion.content || '',
|
|
467
|
+
role: 'assistant',
|
|
468
|
+
tool_calls: toolCalls
|
|
469
|
+
});
|
|
470
|
+
// Execute tools and add results
|
|
471
|
+
const toolResults = await this.toolExecutionService.executeTools(toolCalls);
|
|
472
|
+
toolResults.forEach((result) => messages.push({
|
|
473
|
+
content: this.formatToolResult(result),
|
|
474
|
+
name: result.tool_call_id,
|
|
475
|
+
role: 'tool'
|
|
476
|
+
}));
|
|
477
|
+
logger.debug('Tool results added to conversation', { iterations, resultCount: toolResults.length });
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Handle case when tool loop exceeds max iterations
|
|
481
|
+
*/
|
|
482
|
+
async handleMaxIterationsExceeded(executionContext, messages, stage, modelOverride, modeOverride, logger) {
|
|
483
|
+
logger.warn('Tool loop exceeded maximum iterations', {
|
|
484
|
+
maxIterations: 20,
|
|
485
|
+
stage: `${stage.stage}.${stage.prompt}`
|
|
486
|
+
});
|
|
487
|
+
return this.requestFinalOutput(executionContext, messages, stage, modelOverride, modeOverride, logger);
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Request final structured output when tool loop is exhausted
|
|
491
|
+
* Makes a final LLM call without tools to get the required JSON output
|
|
492
|
+
*/
|
|
493
|
+
async requestFinalOutput(executionContext, messages, stage, modelOverride, modeOverride, logger) {
|
|
494
|
+
logger.warn('Requesting final structured output (tool loop exhausted)', {
|
|
495
|
+
stage: `${stage.stage}.${stage.prompt}`
|
|
496
|
+
});
|
|
497
|
+
// Add a user message prompting for final output
|
|
498
|
+
const finalPromptMessage = {
|
|
499
|
+
content: `STOP. Tool execution limit reached. You MUST now output your final response.
|
|
500
|
+
|
|
501
|
+
**CRITICAL INSTRUCTION**: Your response must be ONLY a JSON code block. No other text before or after.
|
|
502
|
+
|
|
503
|
+
Required format (exactly this structure):
|
|
504
|
+
\`\`\`json
|
|
505
|
+
{
|
|
506
|
+
"code_changes": {
|
|
507
|
+
"files_created": [...],
|
|
508
|
+
"files_modified": [...],
|
|
509
|
+
"files_deleted": []
|
|
510
|
+
},
|
|
511
|
+
"files_modified": ["list", "of", "file", "paths"],
|
|
512
|
+
"implementation_notes": {
|
|
513
|
+
"approach": "description of what was done",
|
|
514
|
+
"decisions": ["key decisions made"]
|
|
515
|
+
},
|
|
516
|
+
"breaking_changes": []
|
|
517
|
+
}
|
|
518
|
+
\`\`\`
|
|
519
|
+
|
|
520
|
+
Summarize ALL changes you made during tool execution. Output ONLY the JSON code block above. DO NOT include any explanatory text, greetings, or commentary. Start your response with \`\`\`json`,
|
|
521
|
+
role: 'user'
|
|
522
|
+
};
|
|
523
|
+
const finalMessages = [...messages, finalPromptMessage];
|
|
524
|
+
// Call LLM WITHOUT tools to force text response
|
|
525
|
+
const completion = await executionContext.provider.complete({
|
|
526
|
+
max_tokens: typeof executionContext.flags['maxTokens'] === 'number'
|
|
527
|
+
? executionContext.flags['maxTokens']
|
|
528
|
+
: DEFAULT_MAX_TOKENS,
|
|
529
|
+
messages: finalMessages,
|
|
530
|
+
mode: modeOverride ?? executionContext.mode,
|
|
531
|
+
model: modelOverride ?? executionContext.model,
|
|
532
|
+
temperature: DEFAULT_TEMPERATURE
|
|
533
|
+
// No tools - force text completion
|
|
534
|
+
});
|
|
535
|
+
logger.warn('Received final output after tool loop exhaustion', {
|
|
536
|
+
contentLength: completion.content?.length ?? 0,
|
|
537
|
+
hasToolCalls: !!completion.tool_calls,
|
|
538
|
+
stage: `${stage.stage}.${stage.prompt}`
|
|
539
|
+
});
|
|
540
|
+
return completion;
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Format a tool result for the conversation
|
|
544
|
+
*/
|
|
545
|
+
formatToolResult(result) {
|
|
546
|
+
return result.output;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Emit LLM response event
|
|
550
|
+
*/
|
|
551
|
+
emitLLMResponseEvent(stage, model, duration, completion) {
|
|
552
|
+
this.eventEmitter.emitLLMResponse({
|
|
553
|
+
duration,
|
|
554
|
+
model,
|
|
555
|
+
outputTokens: completion.usage?.completion_tokens,
|
|
556
|
+
promptTokens: completion.usage?.prompt_tokens,
|
|
557
|
+
stage: `${stage.stage}.${stage.prompt}`,
|
|
558
|
+
tokenCount: completion.usage?.completion_tokens
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Handle guided completion result
|
|
563
|
+
*/
|
|
564
|
+
handleGuidedCompletion(ctx) {
|
|
565
|
+
const { completion, duration, logger, resolvedInputs, stage } = ctx;
|
|
566
|
+
logger.always(`Guided completion mode activated for stage: ${stage.stage}.${stage.prompt}`, {
|
|
567
|
+
mode: ResolutionPath.GUIDED,
|
|
568
|
+
useCursorSubscription: true
|
|
569
|
+
});
|
|
570
|
+
return {
|
|
571
|
+
duration_ms: duration,
|
|
572
|
+
metadata: {
|
|
573
|
+
guidedMode: true,
|
|
574
|
+
provider: ProviderName.CURSOR,
|
|
575
|
+
resolutionPath: ResolutionPath.GUIDED,
|
|
576
|
+
stageContext: {
|
|
577
|
+
inputs: resolvedInputs,
|
|
578
|
+
prompt: stage.prompt,
|
|
579
|
+
stage: stage.stage
|
|
580
|
+
},
|
|
581
|
+
stopPipeline: true
|
|
582
|
+
},
|
|
583
|
+
outputs: {
|
|
584
|
+
guidedCompletion: completion.guidedCompletion,
|
|
585
|
+
result: completion.content,
|
|
586
|
+
success: true
|
|
587
|
+
},
|
|
588
|
+
prompt: stage.prompt,
|
|
589
|
+
stage: stage.stage,
|
|
590
|
+
success: true
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Handle normal completion result
|
|
595
|
+
*/
|
|
596
|
+
handleNormalCompletion(ctx) {
|
|
597
|
+
const { completion, duration, logger, resolvedInputs, stage } = ctx;
|
|
598
|
+
logger.debug(`Stage completed: ${stage.stage}.${stage.prompt}`, {
|
|
599
|
+
duration_ms: duration,
|
|
600
|
+
outputTokens: completion.usage?.completion_tokens
|
|
601
|
+
});
|
|
602
|
+
const parsedOutputs = this.outputParsingService.parseStageOutputs(completion.content, stage.outputs ?? []);
|
|
603
|
+
// Provide default values for missing expected outputs to prevent pipeline failures
|
|
604
|
+
const outputsWithDefaults = this.outputParsingService.applyDefaultValues(parsedOutputs, stage.outputs ?? []);
|
|
605
|
+
this.eventEmitter.emitStageComplete({
|
|
606
|
+
duration,
|
|
607
|
+
stage: `${stage.stage}.${stage.prompt}`,
|
|
608
|
+
success: true
|
|
609
|
+
});
|
|
610
|
+
return {
|
|
611
|
+
duration_ms: duration,
|
|
612
|
+
metadata: {
|
|
613
|
+
stageContext: {
|
|
614
|
+
inputs: resolvedInputs,
|
|
615
|
+
prompt: stage.prompt,
|
|
616
|
+
stage: stage.stage
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
outputs: {
|
|
620
|
+
...outputsWithDefaults,
|
|
621
|
+
result: completion.content,
|
|
622
|
+
usage: completion.usage
|
|
623
|
+
},
|
|
624
|
+
prompt: stage.prompt,
|
|
625
|
+
stage: stage.stage,
|
|
626
|
+
success: true
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Handle stage execution error
|
|
631
|
+
*/
|
|
632
|
+
handleStageError(stage, error, startTime, stageIndex) {
|
|
633
|
+
const logger = getLogger();
|
|
634
|
+
const duration = Date.now() - startTime;
|
|
635
|
+
logger.error(`Stage failed: ${stage.stage}.${stage.prompt}`, error, {
|
|
636
|
+
duration_ms: duration,
|
|
637
|
+
stageIndex
|
|
638
|
+
});
|
|
639
|
+
this.eventEmitter.emitStageError(`${stage.stage}.${stage.prompt}`, error.message);
|
|
640
|
+
return {
|
|
641
|
+
duration_ms: duration,
|
|
642
|
+
error: formatErrorMessage(error),
|
|
643
|
+
metadata: {
|
|
644
|
+
stageContext: {
|
|
645
|
+
prompt: stage.prompt,
|
|
646
|
+
stage: stage.stage
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
outputs: {},
|
|
650
|
+
prompt: stage.prompt,
|
|
651
|
+
stage: stage.stage,
|
|
652
|
+
success: false
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Enrich inputs by reading file contents for file path arguments
|
|
657
|
+
* This allows the LLM to receive actual file contents instead of just paths
|
|
658
|
+
*/
|
|
659
|
+
async enrichInputsWithFileContents(inputs, logger) {
|
|
660
|
+
const enriched = {};
|
|
661
|
+
for (const [key, value] of Object.entries(inputs)) {
|
|
662
|
+
// Check if this is a file path argument (ends with _file, _file_arg, or _path)
|
|
663
|
+
const isFileArg = key.endsWith('_file') || key.endsWith('_file_arg') || key.endsWith('_path');
|
|
664
|
+
if (isFileArg && typeof value === 'string' && value.trim()) {
|
|
665
|
+
const filePath = value.trim();
|
|
666
|
+
// Check if file exists
|
|
667
|
+
if (existsSync(filePath)) {
|
|
668
|
+
try {
|
|
669
|
+
const content = await readFile(filePath);
|
|
670
|
+
logger.debug(`Read file content for ${key}: ${filePath} (${content.length} chars)`);
|
|
671
|
+
// Include both the path and the content
|
|
672
|
+
enriched[key] = filePath;
|
|
673
|
+
enriched[`${key}_content`] = content;
|
|
674
|
+
}
|
|
675
|
+
catch (error) {
|
|
676
|
+
logger.warn(`Failed to read file for ${key}: ${filePath}`, { error: error.message });
|
|
677
|
+
enriched[key] = value;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
else {
|
|
681
|
+
logger.warn(`File not found for ${key}: ${filePath}`);
|
|
682
|
+
enriched[key] = value;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
else {
|
|
686
|
+
enriched[key] = value;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
return enriched;
|
|
690
|
+
}
|
|
691
|
+
// Output parsing methods extracted to OutputParsingService (see output-parsing.service.ts)
|
|
692
|
+
/**
|
|
693
|
+
* Process escalation for a stage response
|
|
694
|
+
* Returns StageOutput if escalation results in abort or needs to stop pipeline
|
|
695
|
+
* Returns null if escalation is handled and execution should continue normally
|
|
696
|
+
*/
|
|
697
|
+
async processEscalation(responseContent, stage, agentRole, escalationCriteria, duration, resolvedInputs, logger) {
|
|
698
|
+
const stageName = `${stage.stage}.${stage.prompt}`;
|
|
699
|
+
// Parse response for escalation signal
|
|
700
|
+
const parseResult = this.escalationDetectionService.parseResponse(responseContent);
|
|
701
|
+
const { signal } = parseResult;
|
|
702
|
+
// Check if escalation should be triggered
|
|
703
|
+
if (!this.escalationDetectionService.shouldTriggerEscalation(signal)) {
|
|
704
|
+
logger.debug('No escalation triggered for stage', { stageName });
|
|
705
|
+
return null;
|
|
706
|
+
}
|
|
707
|
+
// Emit escalation triggered event
|
|
708
|
+
this.emitEscalationTriggeredEvent(agentRole, stageName, signal);
|
|
709
|
+
// Build escalation context and handle escalation
|
|
710
|
+
const context = {
|
|
711
|
+
agentRole,
|
|
712
|
+
escalationCriteria,
|
|
713
|
+
llmResponse: responseContent,
|
|
714
|
+
signal: signal,
|
|
715
|
+
stageName
|
|
716
|
+
};
|
|
717
|
+
const result = await this.escalationHandlerService.handleEscalation(context);
|
|
718
|
+
this.escalationHandlerService.displayEscalationSummary(context, result);
|
|
719
|
+
// Process escalation result
|
|
720
|
+
return this.handleEscalationResultActions(result, stage, stageName, duration, resolvedInputs, signal, logger);
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* Emit escalation triggered event with signal info
|
|
724
|
+
*/
|
|
725
|
+
emitEscalationTriggeredEvent(agentRole, stageName, signal) {
|
|
726
|
+
this.eventEmitter.emitEscalationTriggered({
|
|
727
|
+
agentRole,
|
|
728
|
+
confidence: signal?.confidence ?? 0,
|
|
729
|
+
riskLevel: signal?.risk_level ?? 'medium',
|
|
730
|
+
stage: stageName,
|
|
731
|
+
triggeredCriteria: signal?.triggered_criteria ?? []
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Handle escalation result actions (abort, proceed, modify)
|
|
736
|
+
*/
|
|
737
|
+
handleEscalationResultActions(result, stage, stageName, duration, resolvedInputs, signal, logger) {
|
|
738
|
+
if (result.shouldAbort) {
|
|
739
|
+
this.eventEmitter.emitEscalationAborted({
|
|
740
|
+
reason: 'User aborted after escalation review',
|
|
741
|
+
stage: stageName
|
|
742
|
+
});
|
|
743
|
+
return this.handleEscalationAbort(stage, duration, resolvedInputs, signal);
|
|
744
|
+
}
|
|
745
|
+
this.eventEmitter.emitEscalationResolved({
|
|
746
|
+
decision: result.decision.decision,
|
|
747
|
+
guidance: result.modifiedGuidance,
|
|
748
|
+
stage: stageName
|
|
749
|
+
});
|
|
750
|
+
if (result.shouldProceed) {
|
|
751
|
+
logger.debug('Escalation handled: proceeding with execution', { stageName });
|
|
752
|
+
return null;
|
|
753
|
+
}
|
|
754
|
+
if (result.modifiedGuidance) {
|
|
755
|
+
logger.info('Escalation handled: modification requested', {
|
|
756
|
+
guidance: result.modifiedGuidance,
|
|
757
|
+
stageName
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
return null;
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Handle escalation abort by returning a failed StageOutput
|
|
764
|
+
*/
|
|
765
|
+
handleEscalationAbort(stage, duration, resolvedInputs, signal) {
|
|
766
|
+
return {
|
|
767
|
+
duration_ms: duration,
|
|
768
|
+
error: `Escalation aborted by user: ${signal.reasoning}`,
|
|
769
|
+
metadata: {
|
|
770
|
+
escalation: {
|
|
771
|
+
aborted: true,
|
|
772
|
+
confidence: signal.confidence,
|
|
773
|
+
riskLevel: signal.risk_level,
|
|
774
|
+
triggeredCriteria: signal.triggered_criteria
|
|
775
|
+
},
|
|
776
|
+
stageContext: {
|
|
777
|
+
inputs: resolvedInputs,
|
|
778
|
+
prompt: stage.prompt,
|
|
779
|
+
stage: stage.stage
|
|
780
|
+
},
|
|
781
|
+
stopPipeline: true
|
|
782
|
+
},
|
|
783
|
+
outputs: {},
|
|
784
|
+
prompt: stage.prompt,
|
|
785
|
+
stage: stage.stage,
|
|
786
|
+
success: false
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
//# sourceMappingURL=stage-executor.js.map
|