codingbuddy 5.2.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/agent/agent-prompt.builder.js +135 -2
- package/dist/src/agent/agent-stack.loader.d.ts +3 -0
- package/dist/src/agent/agent-stack.loader.js +38 -0
- package/dist/src/agent/agent-stack.schema.d.ts +14 -0
- package/dist/src/agent/agent-stack.schema.js +19 -0
- package/dist/src/agent/agent-stack.service.d.ts +15 -0
- package/dist/src/agent/agent-stack.service.js +112 -0
- package/dist/src/agent/agent.module.js +5 -2
- package/dist/src/agent/agent.service.d.ts +8 -1
- package/dist/src/agent/agent.service.js +126 -40
- package/dist/src/agent/agent.types.d.ts +26 -46
- package/dist/src/agent/council-preset.service.d.ts +6 -0
- package/dist/src/agent/council-preset.service.js +46 -0
- package/dist/src/agent/council-preset.types.d.ts +6 -0
- package/dist/src/agent/council-preset.types.js +3 -0
- package/dist/src/agent/execution-plan.d.ts +8 -0
- package/dist/src/agent/execution-plan.js +73 -0
- package/dist/src/agent/execution-plan.types.d.ts +74 -0
- package/dist/src/agent/execution-plan.types.js +3 -0
- package/dist/src/agent/index.d.ts +9 -0
- package/dist/src/agent/index.js +9 -0
- package/dist/src/agent/stack-matcher.d.ts +13 -0
- package/dist/src/agent/stack-matcher.js +81 -0
- package/dist/src/agent/teams-capability.service.d.ts +11 -0
- package/dist/src/agent/teams-capability.service.js +74 -0
- package/dist/src/agent/teams-capability.types.d.ts +6 -0
- package/dist/src/agent/teams-capability.types.js +3 -0
- package/dist/src/cli/cli.d.ts +4 -3
- package/dist/src/cli/cli.js +54 -0
- package/dist/src/cli/cli.types.d.ts +4 -0
- package/dist/src/cli/completion/completion.d.ts +16 -0
- package/dist/src/cli/completion/completion.js +276 -0
- package/dist/src/cli/completion/index.d.ts +2 -0
- package/dist/src/cli/completion/index.js +7 -0
- package/dist/src/cli/plugin/create-plugin.command.d.ts +21 -0
- package/dist/src/cli/plugin/create-plugin.command.js +151 -0
- package/dist/src/cli/run-tui.d.ts +1 -0
- package/dist/src/cli/run-tui.js +7 -1
- package/dist/src/config/config.schema.d.ts +3 -0
- package/dist/src/config/config.schema.js +5 -0
- package/dist/src/keyword/keyword.module.js +39 -2
- package/dist/src/keyword/keyword.service.d.ts +5 -0
- package/dist/src/keyword/keyword.service.js +90 -6
- package/dist/src/keyword/keyword.types.d.ts +30 -0
- package/dist/src/keyword/permission-forecast.d.ts +2 -0
- package/dist/src/keyword/permission-forecast.js +94 -0
- package/dist/src/mcp/handlers/agent.handler.d.ts +6 -1
- package/dist/src/mcp/handlers/agent.handler.js +81 -8
- package/dist/src/mcp/handlers/checklist-context.handler.d.ts +3 -1
- package/dist/src/mcp/handlers/checklist-context.handler.js +17 -2
- package/dist/src/mcp/handlers/clarification-gate.d.ts +22 -0
- package/dist/src/mcp/handlers/clarification-gate.js +129 -0
- package/dist/src/mcp/handlers/council-scene.builder.d.ts +9 -0
- package/dist/src/mcp/handlers/council-scene.builder.js +115 -0
- package/dist/src/mcp/handlers/council-scene.types.d.ts +11 -0
- package/dist/src/mcp/handlers/council-scene.types.js +3 -0
- package/dist/src/mcp/handlers/discussion.handler.d.ts +4 -0
- package/dist/src/mcp/handlers/discussion.handler.js +45 -5
- package/dist/src/mcp/handlers/discussion.types.d.ts +12 -0
- package/dist/src/mcp/handlers/discussion.types.js +4 -1
- package/dist/src/mcp/handlers/execution-gate.d.ts +29 -0
- package/dist/src/mcp/handlers/execution-gate.js +49 -0
- package/dist/src/mcp/handlers/index.d.ts +1 -0
- package/dist/src/mcp/handlers/index.js +3 -1
- package/dist/src/mcp/handlers/mode.handler.d.ts +14 -1
- package/dist/src/mcp/handlers/mode.handler.js +205 -3
- package/dist/src/mcp/handlers/planning-contract.d.ts +2 -0
- package/dist/src/mcp/handlers/planning-contract.js +28 -0
- package/dist/src/mcp/handlers/planning-stage.d.ts +20 -0
- package/dist/src/mcp/handlers/planning-stage.js +58 -0
- package/dist/src/mcp/handlers/quality-report.handler.d.ts +3 -1
- package/dist/src/mcp/handlers/quality-report.handler.js +20 -2
- package/dist/src/mcp/handlers/review-pr.handler.d.ts +12 -0
- package/dist/src/mcp/handlers/review-pr.handler.js +81 -0
- package/dist/src/mcp/mcp.module.js +1 -0
- package/dist/src/rules/rules.service.d.ts +6 -0
- package/dist/src/rules/rules.service.js +3 -0
- package/dist/src/rules/skill.schema.d.ts +5 -0
- package/dist/src/rules/skill.schema.js +36 -0
- package/dist/src/shared/rules-core.d.ts +5 -0
- package/dist/src/shared/rules-core.js +5 -0
- package/dist/src/shared/version.d.ts +1 -1
- package/dist/src/shared/version.js +1 -1
- package/dist/src/ship/review-pr.service.d.ts +15 -0
- package/dist/src/ship/review-pr.service.js +136 -0
- package/dist/src/ship/review-pr.types.d.ts +21 -0
- package/dist/src/ship/review-pr.types.js +3 -0
- package/dist/src/ship/ship.module.js +5 -2
- package/dist/src/skill/i18n/keywords.js +921 -0
- package/dist/src/skill/skill-recommendation.service.d.ts +1 -0
- package/dist/src/skill/skill-recommendation.service.js +27 -1
- package/dist/src/skill/skill-recommendation.types.d.ts +5 -0
- package/dist/src/tui/events/hud-file-bridge.d.ts +4 -0
- package/dist/src/tui/events/hud-file-bridge.js +36 -0
- package/dist/src/tui-bundle.mjs +45 -3
- package/package.json +7 -2
- package/dist/api/mcp.js.map +0 -1
- package/dist/src/agent/agent-prompt.builder.js.map +0 -1
- package/dist/src/agent/agent-summary.utils.js.map +0 -1
- package/dist/src/agent/agent.module.js.map +0 -1
- package/dist/src/agent/agent.service.js.map +0 -1
- package/dist/src/agent/agent.types.js.map +0 -1
- package/dist/src/agent/index.js.map +0 -1
- package/dist/src/analyzer/analyzer.module.js.map +0 -1
- package/dist/src/analyzer/analyzer.service.js.map +0 -1
- package/dist/src/analyzer/analyzer.types.js.map +0 -1
- package/dist/src/analyzer/code.sampler.js.map +0 -1
- package/dist/src/analyzer/config.analyzer.js.map +0 -1
- package/dist/src/analyzer/conventions.analyzer.js.map +0 -1
- package/dist/src/analyzer/conventions.schemas.js.map +0 -1
- package/dist/src/analyzer/conventions.types.js.map +0 -1
- package/dist/src/analyzer/directory.analyzer.js.map +0 -1
- package/dist/src/analyzer/index.js.map +0 -1
- package/dist/src/analyzer/package.analyzer.js.map +0 -1
- package/dist/src/app.module.js.map +0 -1
- package/dist/src/checklist/checklist.module.js.map +0 -1
- package/dist/src/checklist/checklist.schema.js.map +0 -1
- package/dist/src/checklist/checklist.service.js.map +0 -1
- package/dist/src/checklist/checklist.types.js.map +0 -1
- package/dist/src/checklist/index.js.map +0 -1
- package/dist/src/cli/cli.js.map +0 -1
- package/dist/src/cli/cli.types.js.map +0 -1
- package/dist/src/cli/index.js.map +0 -1
- package/dist/src/cli/init/claude-settings.utils.js.map +0 -1
- package/dist/src/cli/init/config.generator.js.map +0 -1
- package/dist/src/cli/init/config.writer.js.map +0 -1
- package/dist/src/cli/init/gitignore.utils.js.map +0 -1
- package/dist/src/cli/init/index.js.map +0 -1
- package/dist/src/cli/init/init.command.js.map +0 -1
- package/dist/src/cli/init/init.constants.js.map +0 -1
- package/dist/src/cli/init/init.wizard.js.map +0 -1
- package/dist/src/cli/init/prompt.builder.js.map +0 -1
- package/dist/src/cli/init/prompts/agent-prompt.js.map +0 -1
- package/dist/src/cli/init/prompts/architecture-prompt.js.map +0 -1
- package/dist/src/cli/init/prompts/basic-prompt.js.map +0 -1
- package/dist/src/cli/init/prompts/conventions-prompt.js.map +0 -1
- package/dist/src/cli/init/prompts/index.js.map +0 -1
- package/dist/src/cli/init/prompts/language-prompt.js.map +0 -1
- package/dist/src/cli/init/prompts/model-prompt.js.map +0 -1
- package/dist/src/cli/init/prompts/tech-stack-prompt.js.map +0 -1
- package/dist/src/cli/init/prompts/test-strategy-prompt.js.map +0 -1
- package/dist/src/cli/init/summary/index.js.map +0 -1
- package/dist/src/cli/init/summary/summary.prompt.js.map +0 -1
- package/dist/src/cli/init/summary/summary.renderer.js.map +0 -1
- package/dist/src/cli/init/templates/config-renderer.js.map +0 -1
- package/dist/src/cli/init/templates/frameworks/default.template.js.map +0 -1
- package/dist/src/cli/init/templates/frameworks/express.template.js.map +0 -1
- package/dist/src/cli/init/templates/frameworks/index.js.map +0 -1
- package/dist/src/cli/init/templates/frameworks/nestjs.template.js.map +0 -1
- package/dist/src/cli/init/templates/frameworks/nextjs.template.js.map +0 -1
- package/dist/src/cli/init/templates/frameworks/node.template.js.map +0 -1
- package/dist/src/cli/init/templates/frameworks/react.template.js.map +0 -1
- package/dist/src/cli/init/templates/index.js.map +0 -1
- package/dist/src/cli/init/templates/template.renderer.js.map +0 -1
- package/dist/src/cli/init/templates/template.selector.js.map +0 -1
- package/dist/src/cli/init/templates/template.types.js.map +0 -1
- package/dist/src/cli/plugin/install.command.js.map +0 -1
- package/dist/src/cli/plugin/plugins.command.js.map +0 -1
- package/dist/src/cli/plugin/search.command.js.map +0 -1
- package/dist/src/cli/plugin/uninstall.command.js.map +0 -1
- package/dist/src/cli/plugin/update.command.js.map +0 -1
- package/dist/src/cli/restart-tui.js.map +0 -1
- package/dist/src/cli/run-tui.js.map +0 -1
- package/dist/src/cli/utils/console.js.map +0 -1
- package/dist/src/cli/utils/index.js.map +0 -1
- package/dist/src/collaboration/discussion-engine.js.map +0 -1
- package/dist/src/collaboration/index.js.map +0 -1
- package/dist/src/collaboration/opinion-adapter.js.map +0 -1
- package/dist/src/collaboration/terminal-formatter.js.map +0 -1
- package/dist/src/collaboration/types.js.map +0 -1
- package/dist/src/config/config-diff.service.js.map +0 -1
- package/dist/src/config/config.loader.js.map +0 -1
- package/dist/src/config/config.module.js.map +0 -1
- package/dist/src/config/config.schema.js.map +0 -1
- package/dist/src/config/config.service.js.map +0 -1
- package/dist/src/config/context.loader.js.map +0 -1
- package/dist/src/config/ignore.parser.js.map +0 -1
- package/dist/src/config/index.js.map +0 -1
- package/dist/src/context/briefing-loader.service.js.map +0 -1
- package/dist/src/context/briefing.service.js.map +0 -1
- package/dist/src/context/briefing.types.js.map +0 -1
- package/dist/src/context/context-archive.service.js.map +0 -1
- package/dist/src/context/context-archive.types.js.map +0 -1
- package/dist/src/context/context-document.service.js.map +0 -1
- package/dist/src/context/context-document.types.js.map +0 -1
- package/dist/src/context/context-parser.utils.js.map +0 -1
- package/dist/src/context/context-serializer.utils.js.map +0 -1
- package/dist/src/context/context.module.js.map +0 -1
- package/dist/src/context/context.service.js.map +0 -1
- package/dist/src/context/context.types.js.map +0 -1
- package/dist/src/context/index.js.map +0 -1
- package/dist/src/context/intent-patterns.js.map +0 -1
- package/dist/src/custom/custom.module.js.map +0 -1
- package/dist/src/custom/custom.service.js.map +0 -1
- package/dist/src/custom/custom.types.js.map +0 -1
- package/dist/src/custom/index.js.map +0 -1
- package/dist/src/diagnostic/diagnostic-log.service.js.map +0 -1
- package/dist/src/diagnostic/diagnostic.module.js.map +0 -1
- package/dist/src/diagnostic/diagnostic.types.js.map +0 -1
- package/dist/src/diagnostic/index.js.map +0 -1
- package/dist/src/impact/impact-event.service.js.map +0 -1
- package/dist/src/impact/impact-report.service.js.map +0 -1
- package/dist/src/impact/impact.module.js.map +0 -1
- package/dist/src/impact/impact.types.js.map +0 -1
- package/dist/src/impact/index.js.map +0 -1
- package/dist/src/keyword/activation-message.builder.js.map +0 -1
- package/dist/src/keyword/auto-executor.js.map +0 -1
- package/dist/src/keyword/auto-executor.types.js.map +0 -1
- package/dist/src/keyword/auto-formatter.js.map +0 -1
- package/dist/src/keyword/auto-prompt-builder.js.map +0 -1
- package/dist/src/keyword/complexity-classifier.js.map +0 -1
- package/dist/src/keyword/complexity-indicators.js.map +0 -1
- package/dist/src/keyword/diff-analyzer.js.map +0 -1
- package/dist/src/keyword/explicit-pattern-matcher.js.map +0 -1
- package/dist/src/keyword/index.js.map +0 -1
- package/dist/src/keyword/keyword.module.js.map +0 -1
- package/dist/src/keyword/keyword.service.js.map +0 -1
- package/dist/src/keyword/keyword.types.js.map +0 -1
- package/dist/src/keyword/patterns/agent.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/ai-ml.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/backend.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/context.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/data-science.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/data.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/devops.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/explicit.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/frontend.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/index.js.map +0 -1
- package/dist/src/keyword/patterns/intent-pattern-checks.js.map +0 -1
- package/dist/src/keyword/patterns/intent-patterns.types.js.map +0 -1
- package/dist/src/keyword/patterns/meta-discussion.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/mobile.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/platform.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/security.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/systems.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/test.patterns.js.map +0 -1
- package/dist/src/keyword/patterns/tooling.patterns.js.map +0 -1
- package/dist/src/keyword/primary-agent-resolver.js.map +0 -1
- package/dist/src/keyword/rule-filter.js.map +0 -1
- package/dist/src/keyword/srp-template.js.map +0 -1
- package/dist/src/keyword/strategies/__tests__/strategy-test.utils.js.map +0 -1
- package/dist/src/keyword/strategies/act-agent.strategy.js.map +0 -1
- package/dist/src/keyword/strategies/eval-agent.strategy.js.map +0 -1
- package/dist/src/keyword/strategies/index.js.map +0 -1
- package/dist/src/keyword/strategies/plan-agent.strategy.js.map +0 -1
- package/dist/src/keyword/strategies/resolution-strategy.interface.js.map +0 -1
- package/dist/src/keyword/taskmaestro-detector.js.map +0 -1
- package/dist/src/keyword/visual-data.builder.js.map +0 -1
- package/dist/src/main.js.map +0 -1
- package/dist/src/mcp/handlers/abstract-handler.js.map +0 -1
- package/dist/src/mcp/handlers/agent.handler.js.map +0 -1
- package/dist/src/mcp/handlers/base.handler.js.map +0 -1
- package/dist/src/mcp/handlers/briefing.handler.js.map +0 -1
- package/dist/src/mcp/handlers/checklist-context.handler.js.map +0 -1
- package/dist/src/mcp/handlers/config.handler.js.map +0 -1
- package/dist/src/mcp/handlers/context-archive.handler.js.map +0 -1
- package/dist/src/mcp/handlers/context-document.handler.js.map +0 -1
- package/dist/src/mcp/handlers/conventions.handler.js.map +0 -1
- package/dist/src/mcp/handlers/discussion.handler.js.map +0 -1
- package/dist/src/mcp/handlers/discussion.types.js.map +0 -1
- package/dist/src/mcp/handlers/impact.handler.js.map +0 -1
- package/dist/src/mcp/handlers/index.js.map +0 -1
- package/dist/src/mcp/handlers/mode.handler.js.map +0 -1
- package/dist/src/mcp/handlers/pipeline.handler.js.map +0 -1
- package/dist/src/mcp/handlers/plugin-validation.handler.js.map +0 -1
- package/dist/src/mcp/handlers/quality-report.handler.js.map +0 -1
- package/dist/src/mcp/handlers/release-check.handler.js.map +0 -1
- package/dist/src/mcp/handlers/resume.handler.js.map +0 -1
- package/dist/src/mcp/handlers/rule-impact.handler.js.map +0 -1
- package/dist/src/mcp/handlers/rule-insights.handler.js.map +0 -1
- package/dist/src/mcp/handlers/rules.handler.js.map +0 -1
- package/dist/src/mcp/handlers/skill.handler.js.map +0 -1
- package/dist/src/mcp/handlers/tui.handler.js.map +0 -1
- package/dist/src/mcp/mcp-serverless.js.map +0 -1
- package/dist/src/mcp/mcp.controller.js.map +0 -1
- package/dist/src/mcp/mcp.module.js.map +0 -1
- package/dist/src/mcp/mcp.service.js.map +0 -1
- package/dist/src/mcp/response.utils.js.map +0 -1
- package/dist/src/mcp/sse-auth.guard.js.map +0 -1
- package/dist/src/model/index.js.map +0 -1
- package/dist/src/model/model-resolver.service.js.map +0 -1
- package/dist/src/model/model.constants.js.map +0 -1
- package/dist/src/model/model.resolver.js.map +0 -1
- package/dist/src/model/model.types.js.map +0 -1
- package/dist/src/parallel-validation/extract-file-paths.js.map +0 -1
- package/dist/src/parallel-validation/index.js.map +0 -1
- package/dist/src/parallel-validation/overlap-matrix.js.map +0 -1
- package/dist/src/parallel-validation/parallel-validation.handler.js.map +0 -1
- package/dist/src/parallel-validation/parallel-validation.types.js.map +0 -1
- package/dist/src/parallel-validation/wave-splitter.js.map +0 -1
- package/dist/src/pipeline/index.js.map +0 -1
- package/dist/src/pipeline/pipeline.executors.js.map +0 -1
- package/dist/src/pipeline/pipeline.module.js.map +0 -1
- package/dist/src/pipeline/pipeline.service.js.map +0 -1
- package/dist/src/pipeline/pipeline.types.js.map +0 -1
- package/dist/src/plugin/plugin-installer.service.js.map +0 -1
- package/dist/src/plugin/plugin-manifest.schema.js.map +0 -1
- package/dist/src/plugin/plugin.module.js.map +0 -1
- package/dist/src/plugin/plugin.types.js.map +0 -1
- package/dist/src/plugin/registry-client.js.map +0 -1
- package/dist/src/rules/agent.schema.js.map +0 -1
- package/dist/src/rules/rule-event-collector.js.map +0 -1
- package/dist/src/rules/rule-event.types.js.map +0 -1
- package/dist/src/rules/rule-insights.service.js.map +0 -1
- package/dist/src/rules/rule-stats-writer.js.map +0 -1
- package/dist/src/rules/rule-tracker.js.map +0 -1
- package/dist/src/rules/rules-content.utils.js.map +0 -1
- package/dist/src/rules/rules.module.js.map +0 -1
- package/dist/src/rules/rules.service.js.map +0 -1
- package/dist/src/rules/rules.types.js.map +0 -1
- package/dist/src/rules/skill.schema.js.map +0 -1
- package/dist/src/shared/agent.utils.js.map +0 -1
- package/dist/src/shared/async.utils.js.map +0 -1
- package/dist/src/shared/client-type.js.map +0 -1
- package/dist/src/shared/error.utils.js.map +0 -1
- package/dist/src/shared/esm-import.js.map +0 -1
- package/dist/src/shared/event-bridge-reader.js.map +0 -1
- package/dist/src/shared/file.utils.js.map +0 -1
- package/dist/src/shared/filesystem.interface.js.map +0 -1
- package/dist/src/shared/format.utils.js.map +0 -1
- package/dist/src/shared/keyword-core.js.map +0 -1
- package/dist/src/shared/language.service.js.map +0 -1
- package/dist/src/shared/language.types.js.map +0 -1
- package/dist/src/shared/lru-cache.js.map +0 -1
- package/dist/src/shared/node-filesystem.service.js.map +0 -1
- package/dist/src/shared/path.utils.js.map +0 -1
- package/dist/src/shared/pattern-matcher.js.map +0 -1
- package/dist/src/shared/rules-core.js.map +0 -1
- package/dist/src/shared/security.utils.js.map +0 -1
- package/dist/src/shared/slug.utils.js.map +0 -1
- package/dist/src/shared/tui-bundle-path.js.map +0 -1
- package/dist/src/shared/validation.constants.js.map +0 -1
- package/dist/src/shared/verbosity.types.js.map +0 -1
- package/dist/src/shared/version.js.map +0 -1
- package/dist/src/shared/version.utils.js.map +0 -1
- package/dist/src/ship/file-specialist-mapper.js.map +0 -1
- package/dist/src/ship/quality-report.service.js.map +0 -1
- package/dist/src/ship/quality-report.types.js.map +0 -1
- package/dist/src/ship/ship.module.js.map +0 -1
- package/dist/src/skill/i18n/index.js.map +0 -1
- package/dist/src/skill/i18n/keywords.js.map +0 -1
- package/dist/src/skill/i18n/keywords.types.js.map +0 -1
- package/dist/src/skill/index.js.map +0 -1
- package/dist/src/skill/skill-content.utils.js.map +0 -1
- package/dist/src/skill/skill-recommendation.service.js.map +0 -1
- package/dist/src/skill/skill-recommendation.types.js.map +0 -1
- package/dist/src/skill/skill-triggers.js.map +0 -1
- package/dist/src/skill/skill.module.js.map +0 -1
- package/dist/src/state/index.js.map +0 -1
- package/dist/src/state/state.module.js.map +0 -1
- package/dist/src/state/state.service.js.map +0 -1
- package/dist/src/state/state.types.js.map +0 -1
- package/dist/src/tui/__perf__/memory-stability.spec.d.ts +0 -1
- package/dist/src/tui/__perf__/memory-stability.spec.js +0 -105
- package/dist/src/tui/__perf__/memory-stability.spec.js.map +0 -1
- package/dist/src/tui/__perf__/rendering-performance.spec.d.ts +0 -1
- package/dist/src/tui/__perf__/rendering-performance.spec.js +0 -163
- package/dist/src/tui/__perf__/rendering-performance.spec.js.map +0 -1
- package/dist/src/tui/cli-flags.js.map +0 -1
- package/dist/src/tui/components/ActModeScreen.js.map +0 -1
- package/dist/src/tui/components/ActivityVisualizer.js.map +0 -1
- package/dist/src/tui/components/ActivityVisualizer.spec.d.ts +0 -1
- package/dist/src/tui/components/ActivityVisualizer.spec.js +0 -91
- package/dist/src/tui/components/ActivityVisualizer.spec.js.map +0 -1
- package/dist/src/tui/components/AgentDiscussionPanel.js.map +0 -1
- package/dist/src/tui/components/AgentDiscussionPanel.spec.d.ts +0 -1
- package/dist/src/tui/components/AgentDiscussionPanel.spec.js +0 -229
- package/dist/src/tui/components/AgentDiscussionPanel.spec.js.map +0 -1
- package/dist/src/tui/components/ChecklistPanel.js.map +0 -1
- package/dist/src/tui/components/ChecklistPanel.spec.d.ts +0 -1
- package/dist/src/tui/components/ChecklistPanel.spec.js +0 -45
- package/dist/src/tui/components/ChecklistPanel.spec.js.map +0 -1
- package/dist/src/tui/components/ContextSection.js.map +0 -1
- package/dist/src/tui/components/EvalModeScreen.js.map +0 -1
- package/dist/src/tui/components/FlowMap.js.map +0 -1
- package/dist/src/tui/components/FlowMap.spec.d.ts +0 -1
- package/dist/src/tui/components/FlowMap.spec.js +0 -147
- package/dist/src/tui/components/FlowMap.spec.js.map +0 -1
- package/dist/src/tui/components/FocusedAgentPanel.js.map +0 -1
- package/dist/src/tui/components/FocusedAgentPanel.spec.d.ts +0 -1
- package/dist/src/tui/components/FocusedAgentPanel.spec.js +0 -183
- package/dist/src/tui/components/FocusedAgentPanel.spec.js.map +0 -1
- package/dist/src/tui/components/HeaderBar.js.map +0 -1
- package/dist/src/tui/components/HeaderBar.spec.d.ts +0 -1
- package/dist/src/tui/components/HeaderBar.spec.js +0 -96
- package/dist/src/tui/components/HeaderBar.spec.js.map +0 -1
- package/dist/src/tui/components/ModeScreenRouter.js.map +0 -1
- package/dist/src/tui/components/PlanModeScreen.js.map +0 -1
- package/dist/src/tui/components/SessionDashboard.js.map +0 -1
- package/dist/src/tui/components/SessionTabBar.js.map +0 -1
- package/dist/src/tui/components/SessionTabBar.spec.d.ts +0 -1
- package/dist/src/tui/components/SessionTabBar.spec.js +0 -59
- package/dist/src/tui/components/SessionTabBar.spec.js.map +0 -1
- package/dist/src/tui/components/StageHealthBar.js.map +0 -1
- package/dist/src/tui/components/StageHealthBar.spec.d.ts +0 -1
- package/dist/src/tui/components/StageHealthBar.spec.js +0 -99
- package/dist/src/tui/components/StageHealthBar.spec.js.map +0 -1
- package/dist/src/tui/components/act-screen.pure.js.map +0 -1
- package/dist/src/tui/components/activity-visualizer.pure.js.map +0 -1
- package/dist/src/tui/components/agent-discussion-panel.pure.js.map +0 -1
- package/dist/src/tui/components/checklist-panel.pure.js.map +0 -1
- package/dist/src/tui/components/context-section.pure.js.map +0 -1
- package/dist/src/tui/components/eval-screen.pure.js.map +0 -1
- package/dist/src/tui/components/flow-map.pure.js.map +0 -1
- package/dist/src/tui/components/focused-agent.pure.js.map +0 -1
- package/dist/src/tui/components/grid-layout.pure.js.map +0 -1
- package/dist/src/tui/components/index.js.map +0 -1
- package/dist/src/tui/components/live.pure.js.map +0 -1
- package/dist/src/tui/components/plan-screen.pure.js.map +0 -1
- package/dist/src/tui/components/session-dashboard.pure.js.map +0 -1
- package/dist/src/tui/components/session-tab-bar.pure.js.map +0 -1
- package/dist/src/tui/components/stage-health.pure.js.map +0 -1
- package/dist/src/tui/dashboard-app.js.map +0 -1
- package/dist/src/tui/dashboard-app.spec.d.ts +0 -1
- package/dist/src/tui/dashboard-app.spec.js +0 -158
- package/dist/src/tui/dashboard-app.spec.js.map +0 -1
- package/dist/src/tui/dashboard-types.js.map +0 -1
- package/dist/src/tui/ensure-tui-ready.js.map +0 -1
- package/dist/src/tui/eventbus-ui.integration.spec.d.ts +0 -1
- package/dist/src/tui/eventbus-ui.integration.spec.js +0 -577
- package/dist/src/tui/eventbus-ui.integration.spec.js.map +0 -1
- package/dist/src/tui/events/agent-metadata.service.js.map +0 -1
- package/dist/src/tui/events/agent-metadata.types.js.map +0 -1
- package/dist/src/tui/events/event-bus.js.map +0 -1
- package/dist/src/tui/events/events.module.js.map +0 -1
- package/dist/src/tui/events/hud-file-bridge.js.map +0 -1
- package/dist/src/tui/events/index.js.map +0 -1
- package/dist/src/tui/events/parse-agent.js.map +0 -1
- package/dist/src/tui/events/parse-tool-response.js.map +0 -1
- package/dist/src/tui/events/response-event-extractor.js.map +0 -1
- package/dist/src/tui/events/tui-interceptor.js.map +0 -1
- package/dist/src/tui/events/types.js.map +0 -1
- package/dist/src/tui/hooks/index.js.map +0 -1
- package/dist/src/tui/hooks/use-dashboard-state.js.map +0 -1
- package/dist/src/tui/hooks/use-focus-agent.js.map +0 -1
- package/dist/src/tui/hooks/use-multi-session-state.js.map +0 -1
- package/dist/src/tui/hooks/use-terminal-size.js.map +0 -1
- package/dist/src/tui/hooks/use-tick.js.map +0 -1
- package/dist/src/tui/hooks/use-tick.spec.d.ts +0 -1
- package/dist/src/tui/hooks/use-tick.spec.js +0 -70
- package/dist/src/tui/hooks/use-tick.spec.js.map +0 -1
- package/dist/src/tui/index.js.map +0 -1
- package/dist/src/tui/ipc/index.js.map +0 -1
- package/dist/src/tui/ipc/instance-registry.js.map +0 -1
- package/dist/src/tui/ipc/ipc-bridge.js.map +0 -1
- package/dist/src/tui/ipc/ipc-client.js.map +0 -1
- package/dist/src/tui/ipc/ipc-debug.js.map +0 -1
- package/dist/src/tui/ipc/ipc-server.js.map +0 -1
- package/dist/src/tui/ipc/ipc-state-cache.js.map +0 -1
- package/dist/src/tui/ipc/ipc.types.js.map +0 -1
- package/dist/src/tui/ipc/multi-session-manager.js.map +0 -1
- package/dist/src/tui/ipc/shutdown-manager.js.map +0 -1
- package/dist/src/tui/ipc/test-utils.js.map +0 -1
- package/dist/src/tui/ipc/tui-auto-launcher.js.map +0 -1
- package/dist/src/tui/multi-session-app.js.map +0 -1
- package/dist/src/tui/multi-session-app.spec.d.ts +0 -1
- package/dist/src/tui/multi-session-app.spec.js +0 -95
- package/dist/src/tui/multi-session-app.spec.js.map +0 -1
- package/dist/src/tui/testing/tui-test-utils.js.map +0 -1
- package/dist/src/tui/transport-tui.integration.spec.d.ts +0 -1
- package/dist/src/tui/transport-tui.integration.spec.js +0 -189
- package/dist/src/tui/transport-tui.integration.spec.js.map +0 -1
- package/dist/src/tui/tui-config.js.map +0 -1
- package/dist/src/tui/types.js.map +0 -1
- package/dist/src/tui/utils/color-buffer.js.map +0 -1
- package/dist/src/tui/utils/colors.js.map +0 -1
- package/dist/src/tui/utils/display-width.js.map +0 -1
- package/dist/src/tui/utils/edge-router.js.map +0 -1
- package/dist/src/tui/utils/icons.js.map +0 -1
- package/dist/src/tui/utils/index.js.map +0 -1
- package/dist/src/tui/utils/theme.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
|
@@ -12,9 +12,12 @@ const rule_filter_1 = require("./rule-filter");
|
|
|
12
12
|
const skill_content_utils_1 = require("../skill/skill-content.utils");
|
|
13
13
|
const agent_summary_utils_1 = require("../agent/agent-summary.utils");
|
|
14
14
|
const rules_content_utils_1 = require("../rules/rules-content.utils");
|
|
15
|
+
const permission_forecast_1 = require("./permission-forecast");
|
|
15
16
|
const keyword_core_1 = require("../shared/keyword-core");
|
|
16
17
|
const taskmaestro_detector_1 = require("./taskmaestro-detector");
|
|
17
18
|
const diff_analyzer_1 = require("./diff-analyzer");
|
|
19
|
+
const stack_matcher_1 = require("../agent/stack-matcher");
|
|
20
|
+
const planning_contract_1 = require("../mcp/handlers/planning-contract");
|
|
18
21
|
const BASE_CONFIG = (0, keyword_core_1.getDefaultModeConfig)();
|
|
19
22
|
const DEFAULT_CONFIG = {
|
|
20
23
|
modes: {
|
|
@@ -109,6 +112,7 @@ class KeywordService {
|
|
|
109
112
|
this.getMaxIncludedSkillsFn = options?.getMaxIncludedSkillsFn;
|
|
110
113
|
this.getClientTypeFn = options?.getClientTypeFn;
|
|
111
114
|
this.trackRuleUsageFn = options?.trackRuleUsageFn;
|
|
115
|
+
this.loadStacksFn = options?.loadStacksFn;
|
|
112
116
|
this.cacheTTL = process.env.NODE_ENV === 'production' ? 3600000 : 300000;
|
|
113
117
|
}
|
|
114
118
|
async parseMode(prompt, options) {
|
|
@@ -187,13 +191,16 @@ class KeywordService {
|
|
|
187
191
|
}
|
|
188
192
|
const resolvedAgent = await this.resolvePrimaryAgent(mode, originalPrompt, modeConfig.delegates_to, options?.context, recommendedActAgent, diffAnalysis ?? undefined);
|
|
189
193
|
await this.addAgentInfoToResult(result, resolvedAgent);
|
|
190
|
-
this.addParallelAgentsToResult(result, mode, config, originalPrompt);
|
|
194
|
+
await this.addParallelAgentsToResult(result, mode, config, originalPrompt);
|
|
191
195
|
await this.addActRecommendationToResult(result, mode, originalPrompt);
|
|
192
196
|
this.addActivationMessageToResult(result, resolvedAgent);
|
|
193
197
|
this.addDisplayInstructionToResult(result, mode);
|
|
194
198
|
await this.addAutoConfigToResult(result, mode);
|
|
195
199
|
this.addComplexityToResult(result, mode, originalPrompt);
|
|
196
200
|
await this.addIncludedSkillsToResult(result, originalPrompt, options);
|
|
201
|
+
if (mode === 'PLAN' || mode === 'AUTO') {
|
|
202
|
+
await this.enforceRequiredAgentSkills(result, options);
|
|
203
|
+
}
|
|
197
204
|
await this.addIncludedAgentToResult(result, mode, options);
|
|
198
205
|
const taskmaestroInstalled = (0, taskmaestro_detector_1.isTaskmaestroAvailable)();
|
|
199
206
|
result.availableStrategies = taskmaestroInstalled ? ['subagent', 'taskmaestro'] : ['subagent'];
|
|
@@ -202,6 +209,7 @@ class KeywordService {
|
|
|
202
209
|
'TaskMaestro skill not found at ~/.claude/skills/taskmaestro/SKILL.md. To enable tmux-based parallel specialist execution, install the taskmaestro skill.';
|
|
203
210
|
}
|
|
204
211
|
this.addReleaseChecklistIfNeeded(result, mode, originalPrompt);
|
|
212
|
+
result.permissionForecast = (0, permission_forecast_1.generatePermissionForecast)(mode, originalPrompt);
|
|
205
213
|
return result;
|
|
206
214
|
}
|
|
207
215
|
addReleaseChecklistIfNeeded(result, mode, originalPrompt) {
|
|
@@ -241,8 +249,8 @@ class KeywordService {
|
|
|
241
249
|
result.delegate_agent_info = delegateAgentInfo;
|
|
242
250
|
}
|
|
243
251
|
}
|
|
244
|
-
addParallelAgentsToResult(result, mode, config, originalPrompt) {
|
|
245
|
-
const recommendation = this.getParallelAgentsRecommendation(mode, config, originalPrompt);
|
|
252
|
+
async addParallelAgentsToResult(result, mode, config, originalPrompt) {
|
|
253
|
+
const recommendation = await this.getParallelAgentsRecommendation(mode, config, originalPrompt);
|
|
246
254
|
if (recommendation) {
|
|
247
255
|
result.parallelAgentsRecommendation = recommendation;
|
|
248
256
|
}
|
|
@@ -335,6 +343,58 @@ class KeywordService {
|
|
|
335
343
|
this.logger.warn(`Failed to auto-include skills: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
336
344
|
}
|
|
337
345
|
}
|
|
346
|
+
async enforceRequiredAgentSkills(result, options) {
|
|
347
|
+
if (!this.loadAgentInfoFn || !this.loadSkillContentFn || !result.delegates_to)
|
|
348
|
+
return;
|
|
349
|
+
try {
|
|
350
|
+
const agentData = await this.loadAgentInfoFn(result.delegates_to);
|
|
351
|
+
const requiredSkillNames = this.extractRequiredSkillNames(agentData);
|
|
352
|
+
if (requiredSkillNames.length === 0)
|
|
353
|
+
return;
|
|
354
|
+
const verbosity = options?.verbosity ?? 'standard';
|
|
355
|
+
if (!result.included_skills) {
|
|
356
|
+
result.included_skills = [];
|
|
357
|
+
}
|
|
358
|
+
for (const skillName of requiredSkillNames) {
|
|
359
|
+
const existingIndex = result.included_skills.findIndex(s => s.name === skillName);
|
|
360
|
+
const content = await this.loadSkillContentFn(skillName);
|
|
361
|
+
if (!content)
|
|
362
|
+
continue;
|
|
363
|
+
const enforcedSkill = {
|
|
364
|
+
name: content.name,
|
|
365
|
+
description: content.description,
|
|
366
|
+
content: verbosity === 'minimal' ? '' : content.content,
|
|
367
|
+
reason: 'Required by planning agent',
|
|
368
|
+
};
|
|
369
|
+
if (existingIndex >= 0) {
|
|
370
|
+
result.included_skills[existingIndex] = enforcedSkill;
|
|
371
|
+
}
|
|
372
|
+
else {
|
|
373
|
+
result.included_skills.push(enforcedSkill);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
result.requiredSkillsEnforced = true;
|
|
377
|
+
result.requiredSkillNames = requiredSkillNames;
|
|
378
|
+
}
|
|
379
|
+
catch (error) {
|
|
380
|
+
this.logger.warn(`Failed to enforce required agent skills: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
extractRequiredSkillNames(agentData) {
|
|
384
|
+
if (!agentData || typeof agentData !== 'object')
|
|
385
|
+
return [];
|
|
386
|
+
const agent = agentData;
|
|
387
|
+
const skills = agent.skills;
|
|
388
|
+
if (!skills || typeof skills !== 'object')
|
|
389
|
+
return [];
|
|
390
|
+
const required = skills.required;
|
|
391
|
+
if (!Array.isArray(required))
|
|
392
|
+
return [];
|
|
393
|
+
return required
|
|
394
|
+
.filter((s) => typeof s === 'object' && s !== null)
|
|
395
|
+
.map(s => s.name)
|
|
396
|
+
.filter((n) => typeof n === 'string');
|
|
397
|
+
}
|
|
338
398
|
async getMaxIncludedSkills() {
|
|
339
399
|
if (!this.getMaxIncludedSkillsFn)
|
|
340
400
|
return keyword_types_1.DEFAULT_MAX_INCLUDED_SKILLS;
|
|
@@ -407,15 +467,34 @@ class KeywordService {
|
|
|
407
467
|
expertise: summary.expertise,
|
|
408
468
|
};
|
|
409
469
|
}
|
|
470
|
+
const planningContract = (0, planning_contract_1.resolvePlanningContract)(mode, result.delegates_to);
|
|
471
|
+
if (planningContract) {
|
|
472
|
+
result.included_agent.planningContract = [...planningContract];
|
|
473
|
+
}
|
|
410
474
|
this.logger.log(`Auto-included agent: ${agentPrompt.displayName} (verbosity: ${verbosity})`);
|
|
411
475
|
}
|
|
412
476
|
}
|
|
413
477
|
getPrimaryAgentTier(agentName) {
|
|
414
478
|
return keyword_types_1.ALL_PRIMARY_AGENTS.includes(agentName) ? 'primary' : 'specialist';
|
|
415
479
|
}
|
|
416
|
-
getParallelAgentsRecommendation(mode, config, prompt) {
|
|
480
|
+
async getParallelAgentsRecommendation(mode, config, prompt) {
|
|
417
481
|
const modeConfig = config.modes[mode];
|
|
418
|
-
const
|
|
482
|
+
const defaultSpecialists = modeConfig?.defaultSpecialists ?? [];
|
|
483
|
+
let stackResult = null;
|
|
484
|
+
let stackSpecialists;
|
|
485
|
+
if (prompt && this.loadStacksFn) {
|
|
486
|
+
try {
|
|
487
|
+
const stacks = await this.loadStacksFn();
|
|
488
|
+
stackResult = (0, stack_matcher_1.matchStack)(prompt, stacks);
|
|
489
|
+
if (stackResult) {
|
|
490
|
+
const matched = stacks.find(s => s.name === stackResult.stackName);
|
|
491
|
+
stackSpecialists = matched?.specialist_agents;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
catch {
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
const baseSpecialists = stackSpecialists?.length ? stackSpecialists : defaultSpecialists;
|
|
419
498
|
const contextSpecialists = prompt ? this.getContextAwareSpecialists(prompt) : [];
|
|
420
499
|
const allSpecialists = [...new Set([...baseSpecialists, ...contextSpecialists])];
|
|
421
500
|
if (allSpecialists.length === 0) {
|
|
@@ -432,10 +511,15 @@ class KeywordService {
|
|
|
432
511
|
else {
|
|
433
512
|
hint = `Use Task tool with subagent_type="general-purpose" and run_in_background=true for each specialist. Call prepare_parallel_agents MCP tool to get ready-to-use prompts.`;
|
|
434
513
|
}
|
|
435
|
-
|
|
514
|
+
const result = {
|
|
436
515
|
specialists: allSpecialists,
|
|
437
516
|
hint,
|
|
438
517
|
};
|
|
518
|
+
if (stackResult) {
|
|
519
|
+
result.suggestedStack = stackResult.stackName;
|
|
520
|
+
result.stackBased = true;
|
|
521
|
+
}
|
|
522
|
+
return result;
|
|
439
523
|
}
|
|
440
524
|
getContextAwareSpecialists(prompt) {
|
|
441
525
|
const specialists = [];
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import type { DiffAnalysisResult } from './diff-analyzer';
|
|
2
|
+
import type { CouncilPreset } from '../agent/council-preset.types';
|
|
3
|
+
import type { ExecutionPlan } from '../agent/execution-plan.types';
|
|
4
|
+
import type { TeamsCapabilityStatus } from '../agent/teams-capability.types';
|
|
2
5
|
export declare const KEYWORDS: readonly ["PLAN", "ACT", "EVAL", "AUTO"];
|
|
3
6
|
export type Mode = (typeof KEYWORDS)[number];
|
|
7
|
+
export type PermissionClass = 'read-only' | 'repo-write' | 'network' | 'destructive' | 'external';
|
|
8
|
+
export interface ApprovalBundle {
|
|
9
|
+
name: string;
|
|
10
|
+
actions: string[];
|
|
11
|
+
permissionClass: PermissionClass;
|
|
12
|
+
reason: string;
|
|
13
|
+
}
|
|
14
|
+
export interface PermissionForecast {
|
|
15
|
+
permissionClasses: PermissionClass[];
|
|
16
|
+
approvalBundles: ApprovalBundle[];
|
|
17
|
+
permissionSummary: string;
|
|
18
|
+
}
|
|
4
19
|
export declare const MODE_AGENTS: readonly ["plan-mode", "act-mode", "eval-mode", "auto-mode"];
|
|
5
20
|
export declare const PLAN_PRIMARY_AGENTS: readonly ["solution-architect", "technical-planner"];
|
|
6
21
|
export declare const ACT_PRIMARY_AGENTS: readonly ["tooling-engineer", "platform-engineer", "data-engineer", "data-scientist", "ai-ml-engineer", "mobile-developer", "frontend-developer", "backend-developer", "devops-engineer", "agent-architect", "test-engineer", "security-engineer", "systems-developer", "software-engineer"];
|
|
@@ -41,6 +56,8 @@ export interface ParallelAgentRecommendation {
|
|
|
41
56
|
specialists: string[];
|
|
42
57
|
hint: string;
|
|
43
58
|
dispatch?: DispatchStrength;
|
|
59
|
+
suggestedStack?: string;
|
|
60
|
+
stackBased?: boolean;
|
|
44
61
|
}
|
|
45
62
|
export interface IncludedSkill {
|
|
46
63
|
name: string;
|
|
@@ -52,6 +69,7 @@ export interface IncludedAgent {
|
|
|
52
69
|
name: string;
|
|
53
70
|
systemPrompt: string;
|
|
54
71
|
expertise: string[];
|
|
72
|
+
planningContract?: string[];
|
|
55
73
|
}
|
|
56
74
|
export type PrimaryAgentSource = 'explicit' | 'explicit_patterns' | 'config' | 'intent' | 'context' | 'default';
|
|
57
75
|
export interface PrimaryAgentResolutionResult {
|
|
@@ -118,6 +136,12 @@ export interface ParseModeResult {
|
|
|
118
136
|
taskmaestroInstallHint?: string;
|
|
119
137
|
visual?: VisualData;
|
|
120
138
|
diffAnalysis?: DiffAnalysisResult;
|
|
139
|
+
councilPreset?: CouncilPreset;
|
|
140
|
+
requiredSkillsEnforced?: boolean;
|
|
141
|
+
requiredSkillNames?: string[];
|
|
142
|
+
executionPlan?: ExecutionPlan;
|
|
143
|
+
teamsCapability?: TeamsCapabilityStatus;
|
|
144
|
+
permissionForecast?: PermissionForecast;
|
|
121
145
|
}
|
|
122
146
|
export interface DispatchReadyParams {
|
|
123
147
|
subagent_type: 'general-purpose';
|
|
@@ -157,6 +181,12 @@ export interface VisualData {
|
|
|
157
181
|
collaboration: CollaborationConfig;
|
|
158
182
|
}
|
|
159
183
|
export type { DiffAnalysisResult, DiffAgentScore } from './diff-analyzer';
|
|
184
|
+
export interface ReviewContext {
|
|
185
|
+
detected: boolean;
|
|
186
|
+
pr_number: number;
|
|
187
|
+
issue_number?: number;
|
|
188
|
+
hint: string;
|
|
189
|
+
}
|
|
160
190
|
export interface ModeConfig {
|
|
161
191
|
description: string;
|
|
162
192
|
instructions: string;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generatePermissionForecast = generatePermissionForecast;
|
|
4
|
+
const SHIP_PATTERNS = /\b(ship|deploy|push|pr\b|pull\s*request|merge|release)\b/i;
|
|
5
|
+
const TEST_PATTERNS = /\b(tests?|lint|typecheck|format|check|verify|coverage)\b/i;
|
|
6
|
+
const INSTALL_PATTERNS = /\b(install|add\s+package|add\s+dependency|yarn\s+add|npm\s+install)\b/i;
|
|
7
|
+
const DELETE_PATTERNS = /\b(delete|remove|drop|reset|clean|destroy)\b/i;
|
|
8
|
+
const REVIEW_PATTERNS = /\b(review|comment|approve|feedback|pr\b|pull\s*request)\b/i;
|
|
9
|
+
const SHIP_BUNDLE = {
|
|
10
|
+
name: 'Ship changes',
|
|
11
|
+
actions: ['git add', 'git commit', 'git push', 'gh pr create'],
|
|
12
|
+
permissionClass: 'external',
|
|
13
|
+
reason: 'Committing, pushing, and creating a PR requires repo-write and GitHub API access',
|
|
14
|
+
};
|
|
15
|
+
const TEST_BUNDLE = {
|
|
16
|
+
name: 'Run checks',
|
|
17
|
+
actions: ['yarn test', 'yarn lint', 'yarn typecheck'],
|
|
18
|
+
permissionClass: 'read-only',
|
|
19
|
+
reason: 'Running tests and linters reads the codebase but does not modify it',
|
|
20
|
+
};
|
|
21
|
+
const INSTALL_BUNDLE = {
|
|
22
|
+
name: 'Install dependencies',
|
|
23
|
+
actions: ['yarn install', 'yarn add'],
|
|
24
|
+
permissionClass: 'network',
|
|
25
|
+
reason: 'Package installation fetches from external registries',
|
|
26
|
+
};
|
|
27
|
+
const REVIEW_BUNDLE = {
|
|
28
|
+
name: 'Review PR',
|
|
29
|
+
actions: ['gh pr review', 'gh pr comment'],
|
|
30
|
+
permissionClass: 'external',
|
|
31
|
+
reason: 'Reviewing or commenting on a PR uses the GitHub API',
|
|
32
|
+
};
|
|
33
|
+
const MODE_BASE_CLASSES = {
|
|
34
|
+
PLAN: ['read-only'],
|
|
35
|
+
ACT: ['read-only', 'repo-write'],
|
|
36
|
+
EVAL: ['read-only'],
|
|
37
|
+
AUTO: ['read-only', 'repo-write', 'external'],
|
|
38
|
+
};
|
|
39
|
+
function generatePermissionForecast(mode, prompt) {
|
|
40
|
+
const classes = new Set(MODE_BASE_CLASSES[mode]);
|
|
41
|
+
const bundles = [];
|
|
42
|
+
if (SHIP_PATTERNS.test(prompt)) {
|
|
43
|
+
classes.add('repo-write');
|
|
44
|
+
classes.add('external');
|
|
45
|
+
bundles.push(SHIP_BUNDLE);
|
|
46
|
+
}
|
|
47
|
+
if (TEST_PATTERNS.test(prompt)) {
|
|
48
|
+
bundles.push(TEST_BUNDLE);
|
|
49
|
+
}
|
|
50
|
+
if (INSTALL_PATTERNS.test(prompt)) {
|
|
51
|
+
classes.add('network');
|
|
52
|
+
bundles.push(INSTALL_BUNDLE);
|
|
53
|
+
}
|
|
54
|
+
if (DELETE_PATTERNS.test(prompt)) {
|
|
55
|
+
classes.add('destructive');
|
|
56
|
+
}
|
|
57
|
+
if (REVIEW_PATTERNS.test(prompt) && mode === 'EVAL') {
|
|
58
|
+
classes.add('external');
|
|
59
|
+
bundles.push(REVIEW_BUNDLE);
|
|
60
|
+
}
|
|
61
|
+
if (mode === 'ACT' && bundles.length === 0) {
|
|
62
|
+
bundles.push({
|
|
63
|
+
name: 'Code changes',
|
|
64
|
+
actions: ['file edit', 'git add', 'git commit'],
|
|
65
|
+
permissionClass: 'repo-write',
|
|
66
|
+
reason: 'Implementation involves editing files and creating commits',
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
const permissionClasses = sortPermissionClasses([...classes]);
|
|
70
|
+
return {
|
|
71
|
+
permissionClasses,
|
|
72
|
+
approvalBundles: bundles,
|
|
73
|
+
permissionSummary: buildSummary(mode, permissionClasses, bundles),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
const CLASS_ORDER = [
|
|
77
|
+
'read-only',
|
|
78
|
+
'repo-write',
|
|
79
|
+
'network',
|
|
80
|
+
'destructive',
|
|
81
|
+
'external',
|
|
82
|
+
];
|
|
83
|
+
function sortPermissionClasses(classes) {
|
|
84
|
+
return [...classes].sort((a, b) => CLASS_ORDER.indexOf(a) - CLASS_ORDER.indexOf(b));
|
|
85
|
+
}
|
|
86
|
+
function buildSummary(mode, classes, bundles) {
|
|
87
|
+
const highest = classes[classes.length - 1];
|
|
88
|
+
const bundleNames = bundles.map(b => b.name).join(', ');
|
|
89
|
+
if (bundles.length === 0) {
|
|
90
|
+
return `${mode} mode requires ${highest} permissions`;
|
|
91
|
+
}
|
|
92
|
+
return `${mode} mode requires ${highest} permissions — expected actions: ${bundleNames}`;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=permission-forecast.js.map
|
|
@@ -2,16 +2,21 @@ import type { ToolDefinition } from './base.handler';
|
|
|
2
2
|
import type { ToolResponse } from '../response.utils';
|
|
3
3
|
import { AbstractHandler } from './abstract-handler';
|
|
4
4
|
import { AgentService } from '../../agent/agent.service';
|
|
5
|
+
import { AgentStackService } from '../../agent/agent-stack.service';
|
|
5
6
|
import { ImpactEventService } from '../../impact';
|
|
7
|
+
import { RuleEventCollector } from '../../rules/rule-event-collector';
|
|
6
8
|
export declare class AgentHandler extends AbstractHandler {
|
|
7
9
|
private readonly agentService;
|
|
10
|
+
private readonly agentStackService;
|
|
8
11
|
private readonly impactEventService;
|
|
9
|
-
|
|
12
|
+
private readonly ruleEventCollector;
|
|
13
|
+
constructor(agentService: AgentService, agentStackService: AgentStackService, impactEventService: ImpactEventService, ruleEventCollector: RuleEventCollector);
|
|
10
14
|
protected getHandledTools(): string[];
|
|
11
15
|
protected handleTool(toolName: string, args: Record<string, unknown> | undefined): Promise<ToolResponse>;
|
|
12
16
|
getToolDefinitions(): ToolDefinition[];
|
|
13
17
|
private handleDispatchAgents;
|
|
14
18
|
private handleGetAgentSystemPrompt;
|
|
15
19
|
private handlePrepareParallelAgents;
|
|
20
|
+
private handleListAgentStacks;
|
|
16
21
|
private extractInlineAgents;
|
|
17
22
|
}
|
|
@@ -13,18 +13,27 @@ exports.AgentHandler = void 0;
|
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const abstract_handler_1 = require("./abstract-handler");
|
|
15
15
|
const agent_service_1 = require("../../agent/agent.service");
|
|
16
|
+
const agent_stack_service_1 = require("../../agent/agent-stack.service");
|
|
16
17
|
const verbosity_types_1 = require("../../shared/verbosity.types");
|
|
17
18
|
const response_utils_1 = require("../response.utils");
|
|
18
19
|
const validation_constants_1 = require("../../shared/validation.constants");
|
|
19
20
|
const impact_1 = require("../../impact");
|
|
21
|
+
const rule_event_collector_1 = require("../../rules/rule-event-collector");
|
|
20
22
|
let AgentHandler = class AgentHandler extends abstract_handler_1.AbstractHandler {
|
|
21
|
-
constructor(agentService, impactEventService) {
|
|
23
|
+
constructor(agentService, agentStackService, impactEventService, ruleEventCollector) {
|
|
22
24
|
super();
|
|
23
25
|
this.agentService = agentService;
|
|
26
|
+
this.agentStackService = agentStackService;
|
|
24
27
|
this.impactEventService = impactEventService;
|
|
28
|
+
this.ruleEventCollector = ruleEventCollector;
|
|
25
29
|
}
|
|
26
30
|
getHandledTools() {
|
|
27
|
-
return [
|
|
31
|
+
return [
|
|
32
|
+
'get_agent_system_prompt',
|
|
33
|
+
'prepare_parallel_agents',
|
|
34
|
+
'dispatch_agents',
|
|
35
|
+
'list_agent_stacks',
|
|
36
|
+
];
|
|
28
37
|
}
|
|
29
38
|
async handleTool(toolName, args) {
|
|
30
39
|
switch (toolName) {
|
|
@@ -34,6 +43,8 @@ let AgentHandler = class AgentHandler extends abstract_handler_1.AbstractHandler
|
|
|
34
43
|
return this.handlePrepareParallelAgents(args);
|
|
35
44
|
case 'dispatch_agents':
|
|
36
45
|
return this.handleDispatchAgents(args);
|
|
46
|
+
case 'list_agent_stacks':
|
|
47
|
+
return this.handleListAgentStacks(args);
|
|
37
48
|
default:
|
|
38
49
|
return (0, response_utils_1.createErrorResponse)(`Unknown tool: ${toolName}`);
|
|
39
50
|
}
|
|
@@ -144,8 +155,12 @@ let AgentHandler = class AgentHandler extends abstract_handler_1.AbstractHandler
|
|
|
144
155
|
},
|
|
145
156
|
executionStrategy: {
|
|
146
157
|
type: 'string',
|
|
147
|
-
enum: ['subagent', 'taskmaestro', 'teams'],
|
|
148
|
-
description: 'Execution strategy for specialist agents. "subagent" (default) uses Claude Code Agent tool with run_in_background. "taskmaestro" returns tmux pane assignments for /taskmaestro skill. "teams" uses Claude Code native teams with shared TaskList coordination.',
|
|
158
|
+
enum: ['subagent', 'taskmaestro', 'teams', 'taskmaestro+teams'],
|
|
159
|
+
description: 'Execution strategy for specialist agents. "subagent" (default) uses Claude Code Agent tool with run_in_background. "taskmaestro" returns tmux pane assignments for /taskmaestro skill. "teams" uses Claude Code native teams with shared TaskList coordination. "taskmaestro+teams" uses TaskMaestro as outer transport with Teams as inner coordination.',
|
|
160
|
+
},
|
|
161
|
+
agentStack: {
|
|
162
|
+
type: 'string',
|
|
163
|
+
description: 'Agent stack name to resolve primary + specialists from a preset (e.g., "api-development"). Overrides primaryAgent and specialists when provided. Tip: use the suggestedStack value from parse_mode response to auto-select the best stack for the current context.',
|
|
149
164
|
},
|
|
150
165
|
inlineAgents: {
|
|
151
166
|
type: 'object',
|
|
@@ -171,6 +186,19 @@ let AgentHandler = class AgentHandler extends abstract_handler_1.AbstractHandler
|
|
|
171
186
|
required: ['mode'],
|
|
172
187
|
},
|
|
173
188
|
},
|
|
189
|
+
{
|
|
190
|
+
name: 'list_agent_stacks',
|
|
191
|
+
description: 'List available agent stack presets. Each stack defines a primary agent and specialist combination for common workflows.',
|
|
192
|
+
inputSchema: {
|
|
193
|
+
type: 'object',
|
|
194
|
+
properties: {
|
|
195
|
+
category: {
|
|
196
|
+
type: 'string',
|
|
197
|
+
description: 'Optional category filter (e.g., "development", "review", "data", "security")',
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
},
|
|
174
202
|
];
|
|
175
203
|
}
|
|
176
204
|
async handleDispatchAgents(args) {
|
|
@@ -180,13 +208,25 @@ let AgentHandler = class AgentHandler extends abstract_handler_1.AbstractHandler
|
|
|
180
208
|
? 'Missing required parameter: mode (PLAN, ACT, EVAL, or AUTO)'
|
|
181
209
|
: `Invalid mode: ${mode}. Must be PLAN, ACT, EVAL, or AUTO`);
|
|
182
210
|
}
|
|
183
|
-
const
|
|
184
|
-
|
|
211
|
+
const agentStack = (0, validation_constants_1.extractOptionalString)(args, 'agentStack');
|
|
212
|
+
let primaryAgent = (0, validation_constants_1.extractOptionalString)(args, 'primaryAgent');
|
|
213
|
+
let specialists = (0, validation_constants_1.extractStringArray)(args, 'specialists');
|
|
185
214
|
const targetFiles = (0, validation_constants_1.extractStringArray)(args, 'targetFiles');
|
|
186
215
|
const taskDescription = (0, validation_constants_1.extractOptionalString)(args, 'taskDescription');
|
|
187
|
-
|
|
216
|
+
let includeParallel = args?.includeParallel === true;
|
|
188
217
|
const executionStrategy = args?.executionStrategy ?? 'subagent';
|
|
189
218
|
const inlineAgents = this.extractInlineAgents(args);
|
|
219
|
+
if (agentStack) {
|
|
220
|
+
try {
|
|
221
|
+
const stack = await this.agentStackService.resolveStack(agentStack);
|
|
222
|
+
primaryAgent = primaryAgent ?? stack.primary_agent;
|
|
223
|
+
specialists = specialists?.length ? specialists : stack.specialist_agents;
|
|
224
|
+
includeParallel = includeParallel || stack.specialist_agents.length > 0;
|
|
225
|
+
}
|
|
226
|
+
catch (error) {
|
|
227
|
+
return (0, response_utils_1.createErrorResponse)(`Failed to resolve agent stack: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
190
230
|
try {
|
|
191
231
|
const result = await this.agentService.dispatchAgents({
|
|
192
232
|
mode: mode,
|
|
@@ -218,6 +258,27 @@ let AgentHandler = class AgentHandler extends abstract_handler_1.AbstractHandler
|
|
|
218
258
|
}
|
|
219
259
|
catch {
|
|
220
260
|
}
|
|
261
|
+
try {
|
|
262
|
+
const timestamp = new Date().toISOString();
|
|
263
|
+
if (primaryAgent) {
|
|
264
|
+
this.ruleEventCollector.record({
|
|
265
|
+
type: 'specialist_dispatched',
|
|
266
|
+
timestamp,
|
|
267
|
+
domain: primaryAgent,
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
if (result.parallelAgents) {
|
|
271
|
+
for (const agent of result.parallelAgents) {
|
|
272
|
+
this.ruleEventCollector.record({
|
|
273
|
+
type: 'specialist_dispatched',
|
|
274
|
+
timestamp,
|
|
275
|
+
domain: agent.name,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
catch {
|
|
281
|
+
}
|
|
221
282
|
return (0, response_utils_1.createJsonResponse)(result);
|
|
222
283
|
}
|
|
223
284
|
catch (error) {
|
|
@@ -283,6 +344,16 @@ let AgentHandler = class AgentHandler extends abstract_handler_1.AbstractHandler
|
|
|
283
344
|
return (0, response_utils_1.createErrorResponse)(`Failed to prepare parallel agents: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
284
345
|
}
|
|
285
346
|
}
|
|
347
|
+
async handleListAgentStacks(args) {
|
|
348
|
+
const category = (0, validation_constants_1.extractOptionalString)(args, 'category');
|
|
349
|
+
try {
|
|
350
|
+
const stacks = await this.agentStackService.listStacks(category);
|
|
351
|
+
return (0, response_utils_1.createJsonResponse)({ stacks });
|
|
352
|
+
}
|
|
353
|
+
catch (error) {
|
|
354
|
+
return (0, response_utils_1.createErrorResponse)(`Failed to list agent stacks: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
286
357
|
extractInlineAgents(args) {
|
|
287
358
|
const raw = args?.inlineAgents;
|
|
288
359
|
if (!(0, validation_constants_1.isRecordObject)(raw))
|
|
@@ -294,6 +365,8 @@ exports.AgentHandler = AgentHandler;
|
|
|
294
365
|
exports.AgentHandler = AgentHandler = __decorate([
|
|
295
366
|
(0, common_1.Injectable)(),
|
|
296
367
|
__metadata("design:paramtypes", [agent_service_1.AgentService,
|
|
297
|
-
|
|
368
|
+
agent_stack_service_1.AgentStackService,
|
|
369
|
+
impact_1.ImpactEventService,
|
|
370
|
+
rule_event_collector_1.RuleEventCollector])
|
|
298
371
|
], AgentHandler);
|
|
299
372
|
//# sourceMappingURL=agent.handler.js.map
|
|
@@ -4,11 +4,13 @@ import { AbstractHandler } from './abstract-handler';
|
|
|
4
4
|
import { ChecklistService } from '../../checklist/checklist.service';
|
|
5
5
|
import { ContextService } from '../../context/context.service';
|
|
6
6
|
import { ImpactEventService } from '../../impact';
|
|
7
|
+
import { RuleEventCollector } from '../../rules/rule-event-collector';
|
|
7
8
|
export declare class ChecklistContextHandler extends AbstractHandler {
|
|
8
9
|
private readonly checklistService;
|
|
9
10
|
private readonly contextService;
|
|
10
11
|
private readonly impactEventService;
|
|
11
|
-
|
|
12
|
+
private readonly ruleEventCollector;
|
|
13
|
+
constructor(checklistService: ChecklistService, contextService: ContextService, impactEventService: ImpactEventService, ruleEventCollector: RuleEventCollector);
|
|
12
14
|
protected getHandledTools(): string[];
|
|
13
15
|
protected handleTool(toolName: string, args: Record<string, unknown> | undefined): Promise<ToolResponse>;
|
|
14
16
|
getToolDefinitions(): ToolDefinition[];
|
|
@@ -17,6 +17,7 @@ const context_service_1 = require("../../context/context.service");
|
|
|
17
17
|
const response_utils_1 = require("../response.utils");
|
|
18
18
|
const validation_constants_1 = require("../../shared/validation.constants");
|
|
19
19
|
const impact_1 = require("../../impact");
|
|
20
|
+
const rule_event_collector_1 = require("../../rules/rule-event-collector");
|
|
20
21
|
const VALID_CHECKLIST_DOMAINS = [
|
|
21
22
|
'security',
|
|
22
23
|
'accessibility',
|
|
@@ -26,11 +27,12 @@ const VALID_CHECKLIST_DOMAINS = [
|
|
|
26
27
|
'seo',
|
|
27
28
|
];
|
|
28
29
|
let ChecklistContextHandler = class ChecklistContextHandler extends abstract_handler_1.AbstractHandler {
|
|
29
|
-
constructor(checklistService, contextService, impactEventService) {
|
|
30
|
+
constructor(checklistService, contextService, impactEventService, ruleEventCollector) {
|
|
30
31
|
super();
|
|
31
32
|
this.checklistService = checklistService;
|
|
32
33
|
this.contextService = contextService;
|
|
33
34
|
this.impactEventService = impactEventService;
|
|
35
|
+
this.ruleEventCollector = ruleEventCollector;
|
|
34
36
|
}
|
|
35
37
|
getHandledTools() {
|
|
36
38
|
return ['generate_checklist', 'analyze_task'];
|
|
@@ -120,6 +122,18 @@ let ChecklistContextHandler = class ChecklistContextHandler extends abstract_han
|
|
|
120
122
|
}
|
|
121
123
|
catch {
|
|
122
124
|
}
|
|
125
|
+
try {
|
|
126
|
+
const timestamp = new Date().toISOString();
|
|
127
|
+
for (const domain of domains ?? []) {
|
|
128
|
+
this.ruleEventCollector.record({
|
|
129
|
+
type: 'checklist_generated',
|
|
130
|
+
timestamp,
|
|
131
|
+
domain,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
}
|
|
123
137
|
return (0, response_utils_1.createJsonResponse)(result);
|
|
124
138
|
}
|
|
125
139
|
catch (error) {
|
|
@@ -152,6 +166,7 @@ exports.ChecklistContextHandler = ChecklistContextHandler = __decorate([
|
|
|
152
166
|
(0, common_1.Injectable)(),
|
|
153
167
|
__metadata("design:paramtypes", [checklist_service_1.ChecklistService,
|
|
154
168
|
context_service_1.ContextService,
|
|
155
|
-
impact_1.ImpactEventService
|
|
169
|
+
impact_1.ImpactEventService,
|
|
170
|
+
rule_event_collector_1.RuleEventCollector])
|
|
156
171
|
], ChecklistContextHandler);
|
|
157
172
|
//# sourceMappingURL=checklist-context.handler.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const DEFAULT_QUESTION_BUDGET = 3;
|
|
2
|
+
export declare const MIN_PROMPT_LENGTH = 20;
|
|
3
|
+
export interface ClarificationOptions {
|
|
4
|
+
questionBudget?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface ClarificationMetadata {
|
|
7
|
+
clarificationNeeded: boolean;
|
|
8
|
+
planReady: boolean;
|
|
9
|
+
questionBudget?: number;
|
|
10
|
+
nextQuestion?: string;
|
|
11
|
+
clarificationTopics?: string[];
|
|
12
|
+
assumptionNote?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function hasOverridePhrase(prompt: string): boolean;
|
|
15
|
+
export declare function hasVagueIntent(prompt: string): boolean;
|
|
16
|
+
export declare function hasTechnicalReference(prompt: string): boolean;
|
|
17
|
+
export declare const CLARIFICATION_TOPICS: {
|
|
18
|
+
readonly VAGUE_INTENT: "vague-intent";
|
|
19
|
+
readonly TARGET_ARTIFACT: "target-artifact";
|
|
20
|
+
readonly REQUEST_SCOPE: "request-scope";
|
|
21
|
+
};
|
|
22
|
+
export declare function evaluateClarification(prompt: string, options?: ClarificationOptions): ClarificationMetadata;
|