@winspan/claude-forge 8.54.4 → 9.2.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/DEVELOPMENT.md +649 -33
- package/README.md +154 -16
- package/dist/catalogs/agents.json +72 -0
- package/dist/catalogs/skills.json +194 -0
- package/dist/claudemd/claudemd-generator.d.ts +45 -45
- package/dist/claudemd/claudemd-generator.d.ts.map +1 -1
- package/dist/claudemd/claudemd-generator.js +128 -449
- package/dist/claudemd/claudemd-generator.js.map +1 -1
- package/dist/claudemd/index.d.ts +14 -4
- package/dist/claudemd/index.d.ts.map +1 -1
- package/dist/claudemd/index.js +15 -4
- package/dist/claudemd/index.js.map +1 -1
- package/dist/claudemd/resume-manager.d.ts.map +1 -1
- package/dist/claudemd/resume-manager.js +37 -9
- package/dist/claudemd/resume-manager.js.map +1 -1
- package/dist/claudemd/templates/swarm-protocol.md +35 -186
- package/dist/claudemd/violations-manager.d.ts +40 -0
- package/dist/claudemd/violations-manager.d.ts.map +1 -0
- package/dist/claudemd/violations-manager.js +106 -0
- package/dist/claudemd/violations-manager.js.map +1 -0
- package/dist/cli/commands/admin.d.ts +15 -0
- package/dist/cli/commands/admin.d.ts.map +1 -0
- package/dist/cli/commands/admin.js +177 -0
- package/dist/cli/commands/admin.js.map +1 -0
- package/dist/cli/commands/agents.d.ts +18 -0
- package/dist/cli/commands/agents.d.ts.map +1 -0
- package/dist/cli/commands/agents.js +160 -0
- package/dist/cli/commands/agents.js.map +1 -0
- package/dist/cli/commands/bypass.d.ts +18 -0
- package/dist/cli/commands/bypass.d.ts.map +1 -0
- package/dist/cli/commands/bypass.js +87 -0
- package/dist/cli/commands/bypass.js.map +1 -0
- package/dist/cli/commands/claudemd.d.ts +60 -0
- package/dist/cli/commands/claudemd.d.ts.map +1 -1
- package/dist/cli/commands/claudemd.js +174 -37
- package/dist/cli/commands/claudemd.js.map +1 -1
- package/dist/cli/commands/config.d.ts.map +1 -1
- package/dist/cli/commands/config.js +94 -1
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/daemon.d.ts +39 -0
- package/dist/cli/commands/daemon.d.ts.map +1 -1
- package/dist/cli/commands/daemon.js +167 -20
- package/dist/cli/commands/daemon.js.map +1 -1
- package/dist/cli/commands/decisions.d.ts +129 -0
- package/dist/cli/commands/decisions.d.ts.map +1 -0
- package/dist/cli/commands/decisions.js +669 -0
- package/dist/cli/commands/decisions.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +29 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +124 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/entropy.d.ts +35 -0
- package/dist/cli/commands/entropy.d.ts.map +1 -0
- package/dist/cli/commands/entropy.js +121 -0
- package/dist/cli/commands/entropy.js.map +1 -0
- package/dist/cli/commands/executions.d.ts +1 -0
- package/dist/cli/commands/executions.d.ts.map +1 -1
- package/dist/cli/commands/executions.js +10 -1
- package/dist/cli/commands/executions.js.map +1 -1
- package/dist/cli/commands/fix.d.ts +31 -0
- package/dist/cli/commands/fix.d.ts.map +1 -0
- package/dist/cli/commands/fix.js +108 -0
- package/dist/cli/commands/fix.js.map +1 -0
- package/dist/cli/commands/governance.d.ts +21 -0
- package/dist/cli/commands/governance.d.ts.map +1 -0
- package/dist/cli/commands/governance.js +60 -0
- package/dist/cli/commands/governance.js.map +1 -0
- package/dist/cli/commands/init.d.ts +27 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +158 -146
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/insights-goal-check.d.ts +50 -0
- package/dist/cli/commands/insights-goal-check.d.ts.map +1 -0
- package/dist/cli/commands/insights-goal-check.js +318 -0
- package/dist/cli/commands/insights-goal-check.js.map +1 -0
- package/dist/cli/commands/insights.d.ts +15 -0
- package/dist/cli/commands/insights.d.ts.map +1 -0
- package/dist/cli/commands/insights.js +127 -0
- package/dist/cli/commands/insights.js.map +1 -0
- package/dist/cli/commands/knowledge.d.ts +66 -0
- package/dist/cli/commands/knowledge.d.ts.map +1 -0
- package/dist/cli/commands/knowledge.js +897 -0
- package/dist/cli/commands/knowledge.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +0 -12
- package/dist/cli/commands/mcp.d.ts.map +1 -1
- package/dist/cli/commands/mcp.js +11 -5
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/menu.d.ts.map +1 -1
- package/dist/cli/commands/menu.js +10 -184
- package/dist/cli/commands/menu.js.map +1 -1
- package/dist/cli/commands/project.d.ts +98 -0
- package/dist/cli/commands/project.d.ts.map +1 -0
- package/dist/cli/commands/project.js +382 -0
- package/dist/cli/commands/project.js.map +1 -0
- package/dist/cli/commands/skills.d.ts.map +1 -1
- package/dist/cli/commands/skills.js +14 -128
- package/dist/cli/commands/skills.js.map +1 -1
- package/dist/cli/commands/spec.d.ts +40 -0
- package/dist/cli/commands/spec.d.ts.map +1 -0
- package/dist/cli/commands/spec.js +49 -0
- package/dist/cli/commands/spec.js.map +1 -0
- package/dist/cli/commands/stats.d.ts.map +1 -1
- package/dist/cli/commands/stats.js +3 -2
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +17 -2
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/trace.d.ts.map +1 -1
- package/dist/cli/commands/trace.js +4 -9
- package/dist/cli/commands/trace.js.map +1 -1
- package/dist/cli/commands/violations.d.ts +14 -0
- package/dist/cli/commands/violations.d.ts.map +1 -0
- package/dist/cli/commands/violations.js +43 -0
- package/dist/cli/commands/violations.js.map +1 -0
- package/dist/cli/index.js +26 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init/hook-manager.d.ts +1 -1
- package/dist/cli/init/hook-manager.d.ts.map +1 -1
- package/dist/cli/init/hook-manager.js +6 -0
- package/dist/cli/init/hook-manager.js.map +1 -1
- package/dist/cli/utils/resolve-session.d.ts +32 -0
- package/dist/cli/utils/resolve-session.d.ts.map +1 -0
- package/dist/cli/utils/resolve-session.js +39 -0
- package/dist/cli/utils/resolve-session.js.map +1 -0
- package/dist/core/config.d.ts +4 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +11 -23
- package/dist/core/config.js.map +1 -1
- package/dist/core/constants.d.ts +14 -13
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +20 -13
- package/dist/core/constants.js.map +1 -1
- package/dist/core/diagnostics/checks.d.ts +151 -0
- package/dist/core/diagnostics/checks.d.ts.map +1 -0
- package/dist/core/diagnostics/checks.js +765 -0
- package/dist/core/diagnostics/checks.js.map +1 -0
- package/dist/core/diagnostics/daemon-status.d.ts +77 -0
- package/dist/core/diagnostics/daemon-status.d.ts.map +1 -0
- package/dist/core/diagnostics/daemon-status.js +113 -0
- package/dist/core/diagnostics/daemon-status.js.map +1 -0
- package/dist/core/diagnostics/entropy-checks.d.ts +82 -0
- package/dist/core/diagnostics/entropy-checks.d.ts.map +1 -0
- package/dist/core/diagnostics/entropy-checks.js +395 -0
- package/dist/core/diagnostics/entropy-checks.js.map +1 -0
- package/dist/core/diagnostics/fix-runner.d.ts +54 -0
- package/dist/core/diagnostics/fix-runner.d.ts.map +1 -0
- package/dist/core/diagnostics/fix-runner.js +90 -0
- package/dist/core/diagnostics/fix-runner.js.map +1 -0
- package/dist/core/diagnostics/knip-runner.d.ts +49 -0
- package/dist/core/diagnostics/knip-runner.d.ts.map +1 -0
- package/dist/core/diagnostics/knip-runner.js +100 -0
- package/dist/core/diagnostics/knip-runner.js.map +1 -0
- package/dist/core/diagnostics/markers.d.ts +96 -0
- package/dist/core/diagnostics/markers.d.ts.map +1 -0
- package/dist/core/diagnostics/markers.js +153 -0
- package/dist/core/diagnostics/markers.js.map +1 -0
- package/dist/core/governance/global-inject.d.ts +60 -0
- package/dist/core/governance/global-inject.d.ts.map +1 -0
- package/dist/core/governance/global-inject.js +129 -0
- package/dist/core/governance/global-inject.js.map +1 -0
- package/dist/core/queue/index.d.ts +16 -3
- package/dist/core/queue/index.d.ts.map +1 -1
- package/dist/core/queue/index.js +14 -3
- package/dist/core/queue/index.js.map +1 -1
- package/dist/core/storage/base.d.ts +158 -0
- package/dist/core/storage/base.d.ts.map +1 -1
- package/dist/core/storage/base.js +570 -0
- package/dist/core/storage/base.js.map +1 -1
- package/dist/core/storage/codec/tool-input-codec.d.ts +93 -0
- package/dist/core/storage/codec/tool-input-codec.d.ts.map +1 -0
- package/dist/core/storage/codec/tool-input-codec.js +159 -0
- package/dist/core/storage/codec/tool-input-codec.js.map +1 -0
- package/dist/core/storage/decisions.d.ts +362 -0
- package/dist/core/storage/decisions.d.ts.map +1 -0
- package/dist/core/storage/decisions.js +502 -0
- package/dist/core/storage/decisions.js.map +1 -0
- package/dist/core/storage/events.d.ts +112 -8
- package/dist/core/storage/events.d.ts.map +1 -1
- package/dist/core/storage/events.js +390 -39
- package/dist/core/storage/events.js.map +1 -1
- package/dist/core/storage/feedback.d.ts +131 -0
- package/dist/core/storage/feedback.d.ts.map +1 -0
- package/dist/core/storage/feedback.js +187 -0
- package/dist/core/storage/feedback.js.map +1 -0
- package/dist/core/storage/forge-config.d.ts +40 -0
- package/dist/core/storage/forge-config.d.ts.map +1 -0
- package/dist/core/storage/forge-config.js +65 -0
- package/dist/core/storage/forge-config.js.map +1 -0
- package/dist/core/storage/injections.d.ts +28 -0
- package/dist/core/storage/injections.d.ts.map +1 -1
- package/dist/core/storage/injections.js +62 -5
- package/dist/core/storage/injections.js.map +1 -1
- package/dist/core/storage/knowledge.d.ts +106 -0
- package/dist/core/storage/knowledge.d.ts.map +1 -0
- package/dist/core/storage/knowledge.js +202 -0
- package/dist/core/storage/knowledge.js.map +1 -0
- package/dist/core/storage/maintenance.d.ts +36 -9
- package/dist/core/storage/maintenance.d.ts.map +1 -1
- package/dist/core/storage/maintenance.js +56 -24
- package/dist/core/storage/maintenance.js.map +1 -1
- package/dist/core/storage/pipeline-rollup.d.ts +117 -0
- package/dist/core/storage/pipeline-rollup.d.ts.map +1 -0
- package/dist/core/storage/pipeline-rollup.js +471 -0
- package/dist/core/storage/pipeline-rollup.js.map +1 -0
- package/dist/core/storage/routing.d.ts +16 -3
- package/dist/core/storage/routing.d.ts.map +1 -1
- package/dist/core/storage/routing.js +39 -8
- package/dist/core/storage/routing.js.map +1 -1
- package/dist/core/storage/rows.d.ts +50 -7
- package/dist/core/storage/rows.d.ts.map +1 -1
- package/dist/core/storage/schema.sql +302 -23
- package/dist/core/storage/sessions.d.ts +136 -0
- package/dist/core/storage/sessions.d.ts.map +1 -1
- package/dist/core/storage/sessions.js +351 -15
- package/dist/core/storage/sessions.js.map +1 -1
- package/dist/core/storage/skills.d.ts +1 -0
- package/dist/core/storage/skills.d.ts.map +1 -1
- package/dist/core/storage/skills.js +21 -6
- package/dist/core/storage/skills.js.map +1 -1
- package/dist/core/storage/sqlite.d.ts +253 -20
- package/dist/core/storage/sqlite.d.ts.map +1 -1
- package/dist/core/storage/sqlite.js +425 -16
- package/dist/core/storage/sqlite.js.map +1 -1
- package/dist/core/storage/tasks.d.ts +474 -2
- package/dist/core/storage/tasks.d.ts.map +1 -1
- package/dist/core/storage/tasks.js +1213 -18
- package/dist/core/storage/tasks.js.map +1 -1
- package/dist/core/storage/tool-intercepts.d.ts +69 -0
- package/dist/core/storage/tool-intercepts.d.ts.map +1 -0
- package/dist/core/storage/tool-intercepts.js +116 -0
- package/dist/core/storage/tool-intercepts.js.map +1 -0
- package/dist/core/storage/workflow-recommendations.d.ts +124 -0
- package/dist/core/storage/workflow-recommendations.d.ts.map +1 -0
- package/dist/core/storage/workflow-recommendations.js +274 -0
- package/dist/core/storage/workflow-recommendations.js.map +1 -0
- package/dist/core/types.d.ts +112 -17
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +12 -0
- package/dist/core/types.js.map +1 -1
- package/dist/core/utils/backup.d.ts +81 -0
- package/dist/core/utils/backup.d.ts.map +1 -0
- package/dist/core/utils/backup.js +98 -0
- package/dist/core/utils/backup.js.map +1 -0
- package/dist/core/utils/binary-paths.d.ts +92 -0
- package/dist/core/utils/binary-paths.d.ts.map +1 -0
- package/dist/core/utils/binary-paths.js +166 -0
- package/dist/core/utils/binary-paths.js.map +1 -0
- package/dist/core/utils/bypass-token.d.ts +75 -0
- package/dist/core/utils/bypass-token.d.ts.map +1 -0
- package/dist/core/utils/bypass-token.js +133 -0
- package/dist/core/utils/bypass-token.js.map +1 -0
- package/dist/core/utils/cc-builtin-agents.d.ts +3 -0
- package/dist/core/utils/cc-builtin-agents.d.ts.map +1 -0
- package/dist/core/utils/cc-builtin-agents.js +29 -0
- package/dist/core/utils/cc-builtin-agents.js.map +1 -0
- package/dist/core/utils/claude-cli-spawn.d.ts +106 -0
- package/dist/core/utils/claude-cli-spawn.d.ts.map +1 -0
- package/dist/core/utils/claude-cli-spawn.js +219 -0
- package/dist/core/utils/claude-cli-spawn.js.map +1 -0
- package/dist/core/utils/forge-resume-block.d.ts.map +1 -1
- package/dist/core/utils/forge-resume-block.js +3 -2
- package/dist/core/utils/forge-resume-block.js.map +1 -1
- package/dist/core/utils/logger.d.ts +15 -3
- package/dist/core/utils/logger.d.ts.map +1 -1
- package/dist/core/utils/logger.js +20 -2
- package/dist/core/utils/logger.js.map +1 -1
- package/dist/core/utils/noise-prompt.d.ts +97 -0
- package/dist/core/utils/noise-prompt.d.ts.map +1 -0
- package/dist/core/utils/noise-prompt.js +127 -0
- package/dist/core/utils/noise-prompt.js.map +1 -0
- package/dist/core/utils/path.d.ts +0 -4
- package/dist/core/utils/path.d.ts.map +1 -1
- package/dist/core/utils/path.js +0 -7
- package/dist/core/utils/path.js.map +1 -1
- package/dist/core/utils/time.d.ts +41 -0
- package/dist/core/utils/time.d.ts.map +1 -1
- package/dist/core/utils/time.js +114 -0
- package/dist/core/utils/time.js.map +1 -1
- package/dist/daemon/agent-sync.d.ts +24 -0
- package/dist/daemon/agent-sync.d.ts.map +1 -0
- package/dist/daemon/agent-sync.js +114 -0
- package/dist/daemon/agent-sync.js.map +1 -0
- package/dist/daemon/config-store.d.ts +55 -0
- package/dist/daemon/config-store.d.ts.map +1 -0
- package/dist/daemon/config-store.js +137 -0
- package/dist/daemon/config-store.js.map +1 -0
- package/dist/daemon/event-parser.d.ts +22 -0
- package/dist/daemon/event-parser.d.ts.map +1 -1
- package/dist/daemon/event-parser.js +49 -3
- package/dist/daemon/event-parser.js.map +1 -1
- package/dist/daemon/handlers/history-exporter.d.ts.map +1 -1
- package/dist/daemon/handlers/history-exporter.js +9 -8
- package/dist/daemon/handlers/history-exporter.js.map +1 -1
- package/dist/daemon/handlers/post-tool-use.d.ts +58 -4
- package/dist/daemon/handlers/post-tool-use.d.ts.map +1 -1
- package/dist/daemon/handlers/post-tool-use.js +261 -8
- package/dist/daemon/handlers/post-tool-use.js.map +1 -1
- package/dist/daemon/handlers/pre-tool-use.d.ts +156 -0
- package/dist/daemon/handlers/pre-tool-use.d.ts.map +1 -0
- package/dist/daemon/handlers/pre-tool-use.js +585 -0
- package/dist/daemon/handlers/pre-tool-use.js.map +1 -0
- package/dist/daemon/handlers/stop.d.ts +35 -7
- package/dist/daemon/handlers/stop.d.ts.map +1 -1
- package/dist/daemon/handlers/stop.js +157 -8
- package/dist/daemon/handlers/stop.js.map +1 -1
- package/dist/daemon/handlers/user-prompt.d.ts +36 -14
- package/dist/daemon/handlers/user-prompt.d.ts.map +1 -1
- package/dist/daemon/handlers/user-prompt.js +135 -48
- package/dist/daemon/handlers/user-prompt.js.map +1 -1
- package/dist/daemon/hook-sync.d.ts.map +1 -1
- package/dist/daemon/hook-sync.js +2 -1
- package/dist/daemon/hook-sync.js.map +1 -1
- package/dist/daemon/index.d.ts.map +1 -1
- package/dist/daemon/index.js +471 -43
- package/dist/daemon/index.js.map +1 -1
- package/dist/daemon/lifecycle.d.ts +48 -1
- package/dist/daemon/lifecycle.d.ts.map +1 -1
- package/dist/daemon/lifecycle.js +98 -2
- package/dist/daemon/lifecycle.js.map +1 -1
- package/dist/daemon/router.d.ts +4 -1
- package/dist/daemon/router.d.ts.map +1 -1
- package/dist/daemon/router.js +4 -2
- package/dist/daemon/router.js.map +1 -1
- package/dist/daemon/rules/defaults.d.ts +20 -0
- package/dist/daemon/rules/defaults.d.ts.map +1 -0
- package/dist/daemon/rules/defaults.js +692 -0
- package/dist/daemon/rules/defaults.js.map +1 -0
- package/dist/daemon/rules/registry.d.ts +47 -0
- package/dist/daemon/rules/registry.d.ts.map +1 -0
- package/dist/daemon/rules/registry.js +84 -0
- package/dist/daemon/rules/registry.js.map +1 -0
- package/dist/daemon/rules/types.d.ts +170 -0
- package/dist/daemon/rules/types.d.ts.map +1 -0
- package/dist/daemon/rules/types.js +15 -0
- package/dist/daemon/rules/types.js.map +1 -0
- package/dist/daemon/rules/whitelist.d.ts +101 -0
- package/dist/daemon/rules/whitelist.d.ts.map +1 -0
- package/dist/daemon/rules/whitelist.js +210 -0
- package/dist/daemon/rules/whitelist.js.map +1 -0
- package/dist/daemon/rules/workflow-defaults.d.ts +52 -0
- package/dist/daemon/rules/workflow-defaults.d.ts.map +1 -0
- package/dist/daemon/rules/workflow-defaults.js +521 -0
- package/dist/daemon/rules/workflow-defaults.js.map +1 -0
- package/dist/daemon/server.d.ts +11 -1
- package/dist/daemon/server.d.ts.map +1 -1
- package/dist/daemon/server.js +7 -1
- package/dist/daemon/server.js.map +1 -1
- package/dist/daemon/services/context-injector.d.ts +34 -0
- package/dist/daemon/services/context-injector.d.ts.map +1 -0
- package/dist/daemon/services/context-injector.js +61 -0
- package/dist/daemon/services/context-injector.js.map +1 -0
- package/dist/daemon/services/decision-hint.d.ts +203 -0
- package/dist/daemon/services/decision-hint.d.ts.map +1 -0
- package/dist/daemon/services/decision-hint.js +487 -0
- package/dist/daemon/services/decision-hint.js.map +1 -0
- package/dist/daemon/services/event-ttl-sweep.d.ts +86 -0
- package/dist/daemon/services/event-ttl-sweep.d.ts.map +1 -0
- package/dist/daemon/services/event-ttl-sweep.js +123 -0
- package/dist/daemon/services/event-ttl-sweep.js.map +1 -0
- package/dist/daemon/services/experience-extractor.d.ts +67 -0
- package/dist/daemon/services/experience-extractor.d.ts.map +1 -0
- package/dist/daemon/services/experience-extractor.js +323 -0
- package/dist/daemon/services/experience-extractor.js.map +1 -0
- package/dist/daemon/services/feedback-aggregator.d.ts +179 -0
- package/dist/daemon/services/feedback-aggregator.d.ts.map +1 -0
- package/dist/daemon/services/feedback-aggregator.js +455 -0
- package/dist/daemon/services/feedback-aggregator.js.map +1 -0
- package/dist/daemon/services/heartbeat-writer.d.ts +55 -0
- package/dist/daemon/services/heartbeat-writer.d.ts.map +1 -0
- package/dist/daemon/services/heartbeat-writer.js +111 -0
- package/dist/daemon/services/heartbeat-writer.js.map +1 -0
- package/dist/daemon/services/idle-session-sweeper.d.ts +61 -0
- package/dist/daemon/services/idle-session-sweeper.d.ts.map +1 -0
- package/dist/daemon/services/idle-session-sweeper.js +94 -0
- package/dist/daemon/services/idle-session-sweeper.js.map +1 -0
- package/dist/daemon/services/idle-task-budget.d.ts +50 -0
- package/dist/daemon/services/idle-task-budget.d.ts.map +1 -0
- package/dist/daemon/services/idle-task-budget.js +72 -0
- package/dist/daemon/services/idle-task-budget.js.map +1 -0
- package/dist/daemon/services/intercept-revive.d.ts +60 -0
- package/dist/daemon/services/intercept-revive.d.ts.map +1 -0
- package/dist/daemon/services/intercept-revive.js +86 -0
- package/dist/daemon/services/intercept-revive.js.map +1 -0
- package/dist/daemon/services/intercept-rollback-guard.d.ts +105 -0
- package/dist/daemon/services/intercept-rollback-guard.d.ts.map +1 -0
- package/dist/daemon/services/intercept-rollback-guard.js +152 -0
- package/dist/daemon/services/intercept-rollback-guard.js.map +1 -0
- package/dist/daemon/services/intercept-timeout-sweeper.d.ts +58 -0
- package/dist/daemon/services/intercept-timeout-sweeper.d.ts.map +1 -0
- package/dist/daemon/services/intercept-timeout-sweeper.js +83 -0
- package/dist/daemon/services/intercept-timeout-sweeper.js.map +1 -0
- package/dist/daemon/services/kb-injector.d.ts +57 -0
- package/dist/daemon/services/kb-injector.d.ts.map +1 -0
- package/dist/daemon/services/kb-injector.js +140 -0
- package/dist/daemon/services/kb-injector.js.map +1 -0
- package/dist/daemon/services/outcome-classification-service.d.ts +49 -0
- package/dist/daemon/services/outcome-classification-service.d.ts.map +1 -0
- package/dist/daemon/services/outcome-classification-service.js +214 -0
- package/dist/daemon/services/outcome-classification-service.js.map +1 -0
- package/dist/daemon/services/outcome-classifier.d.ts +136 -0
- package/dist/daemon/services/outcome-classifier.d.ts.map +1 -0
- package/dist/daemon/services/outcome-classifier.js +178 -0
- package/dist/daemon/services/outcome-classifier.js.map +1 -0
- package/dist/daemon/services/outcome-nudge.d.ts +107 -0
- package/dist/daemon/services/outcome-nudge.d.ts.map +1 -0
- package/dist/daemon/services/outcome-nudge.js +242 -0
- package/dist/daemon/services/outcome-nudge.js.map +1 -0
- package/dist/daemon/services/spec-approval.d.ts +127 -0
- package/dist/daemon/services/spec-approval.d.ts.map +1 -0
- package/dist/daemon/services/spec-approval.js +216 -0
- package/dist/daemon/services/spec-approval.js.map +1 -0
- package/dist/daemon/services/spec-gate.d.ts +54 -0
- package/dist/daemon/services/spec-gate.d.ts.map +1 -0
- package/dist/daemon/services/spec-gate.js +113 -0
- package/dist/daemon/services/spec-gate.js.map +1 -0
- package/dist/daemon/services/task-boundary-classifier.d.ts +78 -0
- package/dist/daemon/services/task-boundary-classifier.d.ts.map +1 -0
- package/dist/daemon/services/task-boundary-classifier.js +202 -0
- package/dist/daemon/services/task-boundary-classifier.js.map +1 -0
- package/dist/daemon/services/task-segmenter.d.ts +219 -1
- package/dist/daemon/services/task-segmenter.d.ts.map +1 -1
- package/dist/daemon/services/task-segmenter.js +481 -17
- package/dist/daemon/services/task-segmenter.js.map +1 -1
- package/dist/daemon/services/violation-reporter.d.ts +130 -0
- package/dist/daemon/services/violation-reporter.d.ts.map +1 -0
- package/dist/daemon/services/violation-reporter.js +339 -0
- package/dist/daemon/services/violation-reporter.js.map +1 -0
- package/dist/daemon/skill-sync.d.ts +7 -2
- package/dist/daemon/skill-sync.d.ts.map +1 -1
- package/dist/daemon/skill-sync.js +114 -9
- package/dist/daemon/skill-sync.js.map +1 -1
- package/dist/daemon/templates/agents/claudemd-writer.md +101 -0
- package/dist/daemon/templates/agents/coder.md +105 -0
- package/dist/daemon/templates/agents/decision-maker.md +460 -0
- package/dist/daemon/templates/agents/doc-reviewer.md +115 -0
- package/dist/daemon/templates/agents/harness-debug-full.md +114 -0
- package/dist/daemon/templates/agents/harness-hotfix.md +99 -0
- package/dist/daemon/templates/agents/hybrid-feature-with-safety.md +104 -0
- package/dist/daemon/templates/agents/knowledge-builder.md +119 -0
- package/dist/daemon/templates/agents/patch-applier.md +144 -0
- package/dist/daemon/templates/agents/planner.md +165 -0
- package/dist/daemon/templates/agents/refactor-specialist.md +98 -0
- package/dist/daemon/templates/agents/skill-distiller.md +113 -0
- package/dist/daemon/templates/agents/task-boundary-classifier.md +64 -0
- package/dist/daemon/templates/agents/verify-agent.md +136 -0
- package/dist/daemon/utils/inject-block.d.ts +39 -0
- package/dist/daemon/utils/inject-block.d.ts.map +1 -0
- package/dist/daemon/utils/inject-block.js +25 -0
- package/dist/daemon/utils/inject-block.js.map +1 -0
- package/dist/hooks/hook-lib.sh +8 -0
- package/dist/hooks/notification.sh +19 -8
- package/dist/hooks/post-tool-use.sh +41 -23
- package/dist/hooks/pre-tool-use.sh +54 -23
- package/dist/hooks/session-start.sh +68 -0
- package/dist/hooks/stop.sh +24 -10
- package/dist/hooks/user-prompt-submit.sh +37 -21
- package/dist/knowledge/adapters/go-adapter.d.ts +65 -0
- package/dist/knowledge/adapters/go-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/go-adapter.js +294 -0
- package/dist/knowledge/adapters/go-adapter.js.map +1 -0
- package/dist/knowledge/adapters/index.d.ts +41 -0
- package/dist/knowledge/adapters/index.d.ts.map +1 -0
- package/dist/knowledge/adapters/index.js +71 -0
- package/dist/knowledge/adapters/index.js.map +1 -0
- package/dist/knowledge/adapters/java-adapter.d.ts +66 -0
- package/dist/knowledge/adapters/java-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/java-adapter.js +260 -0
- package/dist/knowledge/adapters/java-adapter.js.map +1 -0
- package/dist/knowledge/adapters/js-vue-adapter.d.ts +56 -0
- package/dist/knowledge/adapters/js-vue-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/js-vue-adapter.js +203 -0
- package/dist/knowledge/adapters/js-vue-adapter.js.map +1 -0
- package/dist/knowledge/adapters/kotlin-adapter.d.ts +55 -0
- package/dist/knowledge/adapters/kotlin-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/kotlin-adapter.js +209 -0
- package/dist/knowledge/adapters/kotlin-adapter.js.map +1 -0
- package/dist/knowledge/adapters/monorepo-adapter.d.ts +77 -0
- package/dist/knowledge/adapters/monorepo-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/monorepo-adapter.js +170 -0
- package/dist/knowledge/adapters/monorepo-adapter.js.map +1 -0
- package/dist/knowledge/adapters/python-adapter.d.ts +89 -0
- package/dist/knowledge/adapters/python-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/python-adapter.js +358 -0
- package/dist/knowledge/adapters/python-adapter.js.map +1 -0
- package/dist/knowledge/adapters/rust-adapter.d.ts +73 -0
- package/dist/knowledge/adapters/rust-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/rust-adapter.js +329 -0
- package/dist/knowledge/adapters/rust-adapter.js.map +1 -0
- package/dist/knowledge/adapters/types.d.ts +99 -0
- package/dist/knowledge/adapters/types.d.ts.map +1 -0
- package/dist/knowledge/adapters/types.js +17 -0
- package/dist/knowledge/adapters/types.js.map +1 -0
- package/dist/knowledge/adapters/typescript-adapter.d.ts +57 -0
- package/dist/knowledge/adapters/typescript-adapter.d.ts.map +1 -0
- package/dist/knowledge/adapters/typescript-adapter.js +171 -0
- package/dist/knowledge/adapters/typescript-adapter.js.map +1 -0
- package/dist/knowledge/audit-applier.d.ts +70 -0
- package/dist/knowledge/audit-applier.d.ts.map +1 -0
- package/dist/knowledge/audit-applier.js +251 -0
- package/dist/knowledge/audit-applier.js.map +1 -0
- package/dist/knowledge/builder.d.ts +261 -0
- package/dist/knowledge/builder.d.ts.map +1 -0
- package/dist/knowledge/builder.js +937 -0
- package/dist/knowledge/builder.js.map +1 -0
- package/dist/knowledge/cli-provider.d.ts +151 -0
- package/dist/knowledge/cli-provider.d.ts.map +1 -0
- package/dist/knowledge/cli-provider.js +313 -0
- package/dist/knowledge/cli-provider.js.map +1 -0
- package/dist/knowledge/constants.d.ts +73 -0
- package/dist/knowledge/constants.d.ts.map +1 -0
- package/dist/knowledge/constants.js +93 -0
- package/dist/knowledge/constants.js.map +1 -0
- package/dist/knowledge/cross-module.d.ts +139 -0
- package/dist/knowledge/cross-module.d.ts.map +1 -0
- package/dist/knowledge/cross-module.js +370 -0
- package/dist/knowledge/cross-module.js.map +1 -0
- package/dist/knowledge/git-hooks.d.ts +67 -0
- package/dist/knowledge/git-hooks.d.ts.map +1 -0
- package/dist/knowledge/git-hooks.js +258 -0
- package/dist/knowledge/git-hooks.js.map +1 -0
- package/dist/knowledge/module-hash.d.ts +88 -0
- package/dist/knowledge/module-hash.d.ts.map +1 -0
- package/dist/knowledge/module-hash.js +162 -0
- package/dist/knowledge/module-hash.js.map +1 -0
- package/dist/knowledge/project-detector.d.ts +101 -0
- package/dist/knowledge/project-detector.d.ts.map +1 -0
- package/dist/knowledge/project-detector.js +223 -0
- package/dist/knowledge/project-detector.js.map +1 -0
- package/dist/knowledge/prompt.d.ts +228 -0
- package/dist/knowledge/prompt.d.ts.map +1 -0
- package/dist/knowledge/prompt.js +404 -0
- package/dist/knowledge/prompt.js.map +1 -0
- package/dist/knowledge/query.d.ts +105 -0
- package/dist/knowledge/query.d.ts.map +1 -0
- package/dist/knowledge/query.js +341 -0
- package/dist/knowledge/query.js.map +1 -0
- package/dist/knowledge/repo-map.d.ts +91 -0
- package/dist/knowledge/repo-map.d.ts.map +1 -0
- package/dist/knowledge/repo-map.js +408 -0
- package/dist/knowledge/repo-map.js.map +1 -0
- package/dist/knowledge/tools/index.d.ts +14 -0
- package/dist/knowledge/tools/index.d.ts.map +1 -0
- package/dist/knowledge/tools/index.js +11 -0
- package/dist/knowledge/tools/index.js.map +1 -0
- package/dist/knowledge/tools/knowledge-get-page.d.ts +46 -0
- package/dist/knowledge/tools/knowledge-get-page.d.ts.map +1 -0
- package/dist/knowledge/tools/knowledge-get-page.js +101 -0
- package/dist/knowledge/tools/knowledge-get-page.js.map +1 -0
- package/dist/knowledge/tools/knowledge-query.d.ts +77 -0
- package/dist/knowledge/tools/knowledge-query.d.ts.map +1 -0
- package/dist/knowledge/tools/knowledge-query.js +104 -0
- package/dist/knowledge/tools/knowledge-query.js.map +1 -0
- package/dist/knowledge/tools/repo-map-lookup.d.ts +45 -0
- package/dist/knowledge/tools/repo-map-lookup.d.ts.map +1 -0
- package/dist/knowledge/tools/repo-map-lookup.js +82 -0
- package/dist/knowledge/tools/repo-map-lookup.js.map +1 -0
- package/dist/knowledge/types.d.ts +269 -0
- package/dist/knowledge/types.d.ts.map +1 -0
- package/dist/knowledge/types.js +10 -0
- package/dist/knowledge/types.js.map +1 -0
- package/dist/knowledge/validator.d.ts +90 -0
- package/dist/knowledge/validator.d.ts.map +1 -0
- package/dist/knowledge/validator.js +288 -0
- package/dist/knowledge/validator.js.map +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +222 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/skills/builtin-skills.d.ts +35 -0
- package/dist/skills/builtin-skills.d.ts.map +1 -0
- package/dist/skills/builtin-skills.js +68 -0
- package/dist/skills/builtin-skills.js.map +1 -0
- package/dist/skills/distill/attribution.d.ts +59 -0
- package/dist/skills/distill/attribution.d.ts.map +1 -0
- package/dist/skills/distill/attribution.js +101 -0
- package/dist/skills/distill/attribution.js.map +1 -0
- package/dist/skills/distill/claude-cli-resolver.d.ts +26 -0
- package/dist/skills/distill/claude-cli-resolver.d.ts.map +1 -0
- package/dist/skills/distill/claude-cli-resolver.js +115 -0
- package/dist/skills/distill/claude-cli-resolver.js.map +1 -0
- package/dist/skills/distill/distiller.d.ts +161 -0
- package/dist/skills/distill/distiller.d.ts.map +1 -0
- package/dist/skills/distill/distiller.js +461 -0
- package/dist/skills/distill/distiller.js.map +1 -0
- package/dist/skills/distill/index.d.ts +223 -0
- package/dist/skills/distill/index.d.ts.map +1 -0
- package/dist/skills/distill/index.js +466 -0
- package/dist/skills/distill/index.js.map +1 -0
- package/dist/skills/distill/project-anchor-guard.d.ts +116 -0
- package/dist/skills/distill/project-anchor-guard.d.ts.map +1 -0
- package/dist/skills/distill/project-anchor-guard.js +334 -0
- package/dist/skills/distill/project-anchor-guard.js.map +1 -0
- package/dist/skills/distill/topic-deduper.d.ts +77 -0
- package/dist/skills/distill/topic-deduper.d.ts.map +1 -0
- package/dist/skills/distill/topic-deduper.js +119 -0
- package/dist/skills/distill/topic-deduper.js.map +1 -0
- package/dist/skills/distill/upstream-fetcher.d.ts +71 -0
- package/dist/skills/distill/upstream-fetcher.d.ts.map +1 -0
- package/dist/skills/distill/upstream-fetcher.js +202 -0
- package/dist/skills/distill/upstream-fetcher.js.map +1 -0
- package/dist/skills/distilled/distilled-api-design.md +491 -0
- package/dist/skills/distilled/distilled-architecture-decision.md +173 -0
- package/dist/skills/distilled/distilled-creator.md +178 -0
- package/dist/skills/distilled/distilled-db-schema-design.md +245 -0
- package/dist/skills/distilled/distilled-defi-amm-security.md +293 -0
- package/dist/skills/distilled/distilled-executing-plans.md +113 -0
- package/dist/skills/distilled/distilled-harness-engineering.md +242 -0
- package/dist/skills/distilled/distilled-karpathy-guidelines.md +104 -0
- package/dist/skills/distilled/distilled-performance-optimization.md +175 -0
- package/dist/skills/distilled/distilled-spec-driven-design.md +193 -0
- package/dist/skills/distilled/distilled-systematic-debugging.md +306 -0
- package/dist/skills/distilled/distilled-verification-before-completion.md +203 -0
- package/dist/skills/keyword-score.d.ts +29 -0
- package/dist/skills/keyword-score.d.ts.map +1 -0
- package/dist/skills/keyword-score.js +54 -0
- package/dist/skills/keyword-score.js.map +1 -0
- package/dist/skills/registry.d.ts +64 -20
- package/dist/skills/registry.d.ts.map +1 -1
- package/dist/skills/registry.js +102 -105
- package/dist/skills/registry.js.map +1 -1
- package/dist/skills/tools/pipeline-suggest.js +14 -14
- package/dist/skills/tools/skill-invoke.d.ts +1 -1
- package/dist/skills/tools/skill-invoke.js +1 -1
- package/dist/web/routes/agent-content.d.ts +30 -0
- package/dist/web/routes/agent-content.d.ts.map +1 -0
- package/dist/web/routes/agent-content.js +139 -0
- package/dist/web/routes/agent-content.js.map +1 -0
- package/dist/web/routes/decisions.d.ts +15 -0
- package/dist/web/routes/decisions.d.ts.map +1 -0
- package/dist/web/routes/decisions.js +181 -0
- package/dist/web/routes/decisions.js.map +1 -0
- package/dist/web/routes/diagnostics.d.ts +61 -0
- package/dist/web/routes/diagnostics.d.ts.map +1 -0
- package/dist/web/routes/diagnostics.js +203 -0
- package/dist/web/routes/diagnostics.js.map +1 -0
- package/dist/web/routes/events.d.ts.map +1 -1
- package/dist/web/routes/events.js +24 -0
- package/dist/web/routes/events.js.map +1 -1
- package/dist/web/routes/health.d.ts +33 -0
- package/dist/web/routes/health.d.ts.map +1 -0
- package/dist/web/routes/health.js +37 -0
- package/dist/web/routes/health.js.map +1 -0
- package/dist/web/routes/insights.d.ts +0 -5
- package/dist/web/routes/insights.d.ts.map +1 -1
- package/dist/web/routes/insights.js +783 -2
- package/dist/web/routes/insights.js.map +1 -1
- package/dist/web/routes/knowledge.d.ts +16 -0
- package/dist/web/routes/knowledge.d.ts.map +1 -0
- package/dist/web/routes/knowledge.js +661 -0
- package/dist/web/routes/knowledge.js.map +1 -0
- package/dist/web/routes/patch.d.ts +60 -1
- package/dist/web/routes/patch.d.ts.map +1 -1
- package/dist/web/routes/patch.js +170 -64
- package/dist/web/routes/patch.js.map +1 -1
- package/dist/web/routes/pipeline.d.ts +37 -0
- package/dist/web/routes/pipeline.d.ts.map +1 -0
- package/dist/web/routes/pipeline.js +149 -0
- package/dist/web/routes/pipeline.js.map +1 -0
- package/dist/web/routes/rules.d.ts.map +1 -1
- package/dist/web/routes/rules.js +6 -1
- package/dist/web/routes/rules.js.map +1 -1
- package/dist/web/routes/sessions.d.ts.map +1 -1
- package/dist/web/routes/sessions.js +9 -1
- package/dist/web/routes/sessions.js.map +1 -1
- package/dist/web/routes/skill-content.d.ts +30 -0
- package/dist/web/routes/skill-content.d.ts.map +1 -0
- package/dist/web/routes/skill-content.js +117 -0
- package/dist/web/routes/skill-content.js.map +1 -0
- package/dist/web/routes/skills-distill.d.ts +29 -0
- package/dist/web/routes/skills-distill.d.ts.map +1 -0
- package/dist/web/routes/skills-distill.js +552 -0
- package/dist/web/routes/skills-distill.js.map +1 -0
- package/dist/web/routes/skills.js +7 -7
- package/dist/web/routes/skills.js.map +1 -1
- package/dist/web/routes/task-timeline.d.ts +102 -0
- package/dist/web/routes/task-timeline.d.ts.map +1 -0
- package/dist/web/routes/task-timeline.js +274 -0
- package/dist/web/routes/task-timeline.js.map +1 -0
- package/dist/web/routes/tasks.d.ts.map +1 -1
- package/dist/web/routes/tasks.js +355 -8
- package/dist/web/routes/tasks.js.map +1 -1
- package/dist/web/routes/trace.d.ts.map +1 -1
- package/dist/web/routes/trace.js +3 -2
- package/dist/web/routes/trace.js.map +1 -1
- package/dist/web/routes/types.d.ts +0 -4
- package/dist/web/routes/types.d.ts.map +1 -1
- package/dist/web/routes/types.js +1 -1
- package/dist/web/routes/types.js.map +1 -1
- package/dist/web/routes/violations.d.ts +14 -0
- package/dist/web/routes/violations.d.ts.map +1 -0
- package/dist/web/routes/violations.js +111 -0
- package/dist/web/routes/violations.js.map +1 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +79 -19
- package/dist/web/server.js.map +1 -1
- package/dist/web/services/build-manager.d.ts +72 -0
- package/dist/web/services/build-manager.d.ts.map +1 -0
- package/dist/web/services/build-manager.js +189 -0
- package/dist/web/services/build-manager.js.map +1 -0
- package/dist/web/services/distill-manager.d.ts +125 -0
- package/dist/web/services/distill-manager.d.ts.map +1 -0
- package/dist/web/services/distill-manager.js +308 -0
- package/dist/web/services/distill-manager.js.map +1 -0
- package/dist/web/static/assets/AgentContentPage-DkeRNxok.js +2 -0
- package/dist/web/static/assets/AgentContentPage-DkeRNxok.js.map +1 -0
- package/dist/web/static/assets/AgentDelegationTable-ByBa0x1l.js +2 -0
- package/dist/web/static/assets/AgentDelegationTable-ByBa0x1l.js.map +1 -0
- package/dist/web/static/assets/ContextInsightsPage-oUk7_I8u.js +3 -0
- package/dist/web/static/assets/ContextInsightsPage-oUk7_I8u.js.map +1 -0
- package/dist/web/static/assets/DaemonHealthPage-DG2fyOP7.js +2 -0
- package/dist/web/static/assets/DaemonHealthPage-DG2fyOP7.js.map +1 -0
- package/dist/web/static/assets/DecisionsPage-CMAPEnKb.js +2 -0
- package/dist/web/static/assets/DecisionsPage-CMAPEnKb.js.map +1 -0
- package/dist/web/static/assets/DiagnosticsPage-DQd-Zm4r.js +2 -0
- package/dist/web/static/assets/DiagnosticsPage-DQd-Zm4r.js.map +1 -0
- package/dist/web/static/assets/DriftTab-DqpepOhI.js +2 -0
- package/dist/web/static/assets/DriftTab-DqpepOhI.js.map +1 -0
- package/dist/web/static/assets/HealthHomePage-CN6zNIie.js +3 -0
- package/dist/web/static/assets/HealthHomePage-CN6zNIie.js.map +1 -0
- package/dist/web/static/assets/KbHitRateTable-ByEIWujF.js +2 -0
- package/dist/web/static/assets/KbHitRateTable-ByEIWujF.js.map +1 -0
- package/dist/web/static/assets/MarkdownRenderer-DZmTl-8J.js +3 -0
- package/dist/web/static/assets/MarkdownRenderer-DZmTl-8J.js.map +1 -0
- package/dist/web/static/assets/NotFound-BQPh0vaF.js +2 -0
- package/dist/web/static/assets/NotFound-BQPh0vaF.js.map +1 -0
- package/dist/web/static/assets/ProjectSwitcher-D3lZMFd3.js +2 -0
- package/dist/web/static/assets/ProjectSwitcher-D3lZMFd3.js.map +1 -0
- package/dist/web/static/assets/SettingsPage-oLJBNzQj.js +2 -0
- package/dist/web/static/assets/SettingsPage-oLJBNzQj.js.map +1 -0
- package/dist/web/static/assets/SkillContentPage-DK5rgfgw.js +2 -0
- package/dist/web/static/assets/SkillContentPage-DK5rgfgw.js.map +1 -0
- package/dist/web/static/assets/SkillStatsTable-DYMzjEUV.js +2 -0
- package/dist/web/static/assets/SkillStatsTable-DYMzjEUV.js.map +1 -0
- package/dist/web/static/assets/SkillsDistillTab-C7qaG8q3.js +2 -0
- package/dist/web/static/assets/SkillsDistillTab-C7qaG8q3.js.map +1 -0
- package/dist/web/static/assets/TasksHubPage-03wsRRsJ.js +6 -0
- package/dist/web/static/assets/TasksHubPage-03wsRRsJ.js.map +1 -0
- package/dist/web/static/assets/ViolationsPage-DSiLr-9O.js +3 -0
- package/dist/web/static/assets/ViolationsPage-DSiLr-9O.js.map +1 -0
- package/dist/web/static/assets/arco-Bhi3a6Qp.js +14 -0
- package/dist/web/static/assets/arco-Bhi3a6Qp.js.map +1 -0
- package/dist/web/static/assets/arco-DFQA6dO_.css +1 -0
- package/dist/web/static/assets/charts-BuHQWDbQ.js +37 -0
- package/dist/web/static/assets/charts-BuHQWDbQ.js.map +1 -0
- package/dist/web/static/assets/date-fns-sbWH3_uq.js +2 -0
- package/dist/web/static/assets/date-fns-sbWH3_uq.js.map +1 -0
- package/dist/web/static/assets/index-7bl3kbcx.css +1 -0
- package/dist/web/static/assets/index-BIYnq1Dx.js +4 -0
- package/dist/web/static/assets/index-BIYnq1Dx.js.map +1 -0
- package/dist/web/static/assets/lucide-CnlPQoG8.js +72 -0
- package/dist/web/static/assets/lucide-CnlPQoG8.js.map +1 -0
- package/dist/web/static/assets/outcome-DUn1NjlC.js +2 -0
- package/dist/web/static/assets/outcome-DUn1NjlC.js.map +1 -0
- package/dist/web/static/assets/query-S6X1S7K9.js +2 -0
- package/dist/web/static/assets/{query-C99w429o.js.map → query-S6X1S7K9.js.map} +1 -1
- package/dist/web/static/assets/{react-router-r79dBVy4.js → react-router-JVUrkhdd.js} +3 -3
- package/dist/web/static/assets/{react-router-r79dBVy4.js.map → react-router-JVUrkhdd.js.map} +1 -1
- package/dist/web/static/assets/react-vendor-tkvCrao7.js +57 -0
- package/dist/web/static/assets/react-vendor-tkvCrao7.js.map +1 -0
- package/dist/web/static/assets/syntax-highlighter-BkZfCDsz.js +6 -0
- package/dist/web/static/assets/syntax-highlighter-BkZfCDsz.js.map +1 -0
- package/dist/web/static/assets/useTabsParam-k8qte_0C.js +2 -0
- package/dist/web/static/assets/useTabsParam-k8qte_0C.js.map +1 -0
- package/dist/web/static/assets/vendor-DWgdB1eY.js +65 -0
- package/dist/web/static/assets/vendor-DWgdB1eY.js.map +1 -0
- package/dist/web/static/index.html +12 -8
- package/package.json +14 -3
- package/dist/core/ai/provider.d.ts +0 -63
- package/dist/core/ai/provider.d.ts.map +0 -1
- package/dist/core/ai/provider.js +0 -241
- package/dist/core/ai/provider.js.map +0 -1
- package/dist/core/ai/types.d.ts +0 -43
- package/dist/core/ai/types.d.ts.map +0 -1
- package/dist/core/ai/types.js +0 -5
- package/dist/core/ai/types.js.map +0 -1
- package/dist/core/storage/token-usage.d.ts +0 -36
- package/dist/core/storage/token-usage.d.ts.map +0 -1
- package/dist/core/storage/token-usage.js +0 -59
- package/dist/core/storage/token-usage.js.map +0 -1
- package/dist/core/utils/token-tracker.d.ts +0 -39
- package/dist/core/utils/token-tracker.d.ts.map +0 -1
- package/dist/core/utils/token-tracker.js +0 -69
- package/dist/core/utils/token-tracker.js.map +0 -1
- package/dist/skills/index.d.ts +0 -3
- package/dist/skills/index.d.ts.map +0 -1
- package/dist/skills/index.js +0 -3
- package/dist/skills/index.js.map +0 -1
- package/dist/skills/matcher.d.ts +0 -26
- package/dist/skills/matcher.d.ts.map +0 -1
- package/dist/skills/matcher.js +0 -113
- package/dist/skills/matcher.js.map +0 -1
- package/dist/skills/official/code-simplifier.md +0 -52
- package/dist/skills/official/find-skills.md +0 -142
- package/dist/skills/official/official-api-design.md +0 -30
- package/dist/skills/official/official-architecture-decision.md +0 -41
- package/dist/skills/official/official-bmad.md +0 -118
- package/dist/skills/official/official-db-schema-design.md +0 -34
- package/dist/skills/official/official-debug.md +0 -25
- package/dist/skills/official/official-doc-driven.md +0 -31
- package/dist/skills/official/official-harness-engineering.md +0 -108
- package/dist/skills/official/official-openspec.md +0 -89
- package/dist/skills/official/official-performance-optimization.md +0 -30
- package/dist/skills/official/official-pr-review.md +0 -35
- package/dist/skills/official/official-release-checklist.md +0 -30
- package/dist/skills/official/official-security-hardening.md +0 -32
- package/dist/skills/official/official-spec-driven-design.md +0 -31
- package/dist/skills/official/planning-with-files.md +0 -241
- package/dist/skills/official/ui-ux-pro-max.md +0 -105
- package/dist/skills/official/webapp-testing.md +0 -96
- package/dist/skills/official-skills.d.ts +0 -26
- package/dist/skills/official-skills.d.ts.map +0 -1
- package/dist/skills/official-skills.js +0 -74
- package/dist/skills/official-skills.js.map +0 -1
- package/dist/skills/semantic-matcher.d.ts +0 -60
- package/dist/skills/semantic-matcher.d.ts.map +0 -1
- package/dist/skills/semantic-matcher.js +0 -192
- package/dist/skills/semantic-matcher.js.map +0 -1
- package/dist/skills/upgrade-engine.d.ts +0 -93
- package/dist/skills/upgrade-engine.d.ts.map +0 -1
- package/dist/skills/upgrade-engine.js +0 -447
- package/dist/skills/upgrade-engine.js.map +0 -1
- package/dist/skills/upgrade-prompt.d.ts +0 -20
- package/dist/skills/upgrade-prompt.d.ts.map +0 -1
- package/dist/skills/upgrade-prompt.js +0 -75
- package/dist/skills/upgrade-prompt.js.map +0 -1
- package/dist/web/routes/ai.d.ts +0 -10
- package/dist/web/routes/ai.d.ts.map +0 -1
- package/dist/web/routes/ai.js +0 -186
- package/dist/web/routes/ai.js.map +0 -1
- package/dist/web/routes/token-usage.d.ts +0 -7
- package/dist/web/routes/token-usage.d.ts.map +0 -1
- package/dist/web/routes/token-usage.js +0 -18
- package/dist/web/routes/token-usage.js.map +0 -1
- package/dist/web/ssrf-guard.d.ts +0 -35
- package/dist/web/ssrf-guard.d.ts.map +0 -1
- package/dist/web/ssrf-guard.js +0 -93
- package/dist/web/ssrf-guard.js.map +0 -1
- package/dist/web/static/assets/AIConfig-CdDWzJyO.js +0 -2
- package/dist/web/static/assets/AIConfig-CdDWzJyO.js.map +0 -1
- package/dist/web/static/assets/Dashboard-CoEmmIDt.js +0 -2
- package/dist/web/static/assets/Dashboard-CoEmmIDt.js.map +0 -1
- package/dist/web/static/assets/Drawer-DdRTzlLB.js +0 -2
- package/dist/web/static/assets/Drawer-DdRTzlLB.js.map +0 -1
- package/dist/web/static/assets/Events-DrIq1SUS.js +0 -2
- package/dist/web/static/assets/Events-DrIq1SUS.js.map +0 -1
- package/dist/web/static/assets/Reports-DFBM3MDK.js +0 -2
- package/dist/web/static/assets/Reports-DFBM3MDK.js.map +0 -1
- package/dist/web/static/assets/SearchInput-qCj_jAcf.js +0 -2
- package/dist/web/static/assets/SearchInput-qCj_jAcf.js.map +0 -1
- package/dist/web/static/assets/SessionDetail-CCzwdoT7.js +0 -2
- package/dist/web/static/assets/SessionDetail-CCzwdoT7.js.map +0 -1
- package/dist/web/static/assets/Sessions-FfLYkAw9.js +0 -2
- package/dist/web/static/assets/Sessions-FfLYkAw9.js.map +0 -1
- package/dist/web/static/assets/Skills-C8Gvs3Qa.js +0 -2
- package/dist/web/static/assets/Skills-C8Gvs3Qa.js.map +0 -1
- package/dist/web/static/assets/TaskDetail-BS8pYhaR.js +0 -2
- package/dist/web/static/assets/TaskDetail-BS8pYhaR.js.map +0 -1
- package/dist/web/static/assets/Tasks-CyuhizG8.js +0 -2
- package/dist/web/static/assets/Tasks-CyuhizG8.js.map +0 -1
- package/dist/web/static/assets/charts-CLrM0_uM.js +0 -37
- package/dist/web/static/assets/charts-CLrM0_uM.js.map +0 -1
- package/dist/web/static/assets/date-fns-CZ_bHujz.js +0 -2
- package/dist/web/static/assets/date-fns-CZ_bHujz.js.map +0 -1
- package/dist/web/static/assets/export-L_VBD2p1.js +0 -4
- package/dist/web/static/assets/export-L_VBD2p1.js.map +0 -1
- package/dist/web/static/assets/index-CBX47X8l.js +0 -3
- package/dist/web/static/assets/index-CBX47X8l.js.map +0 -1
- package/dist/web/static/assets/index-DjIoMdoR.css +0 -1
- package/dist/web/static/assets/lucide-Bs_edTLa.js +0 -232
- package/dist/web/static/assets/lucide-Bs_edTLa.js.map +0 -1
- package/dist/web/static/assets/query-C99w429o.js +0 -2
- package/dist/web/static/assets/react-vendor-CSp-GLFF.js +0 -49
- package/dist/web/static/assets/react-vendor-CSp-GLFF.js.map +0 -1
- package/dist/web/static/assets/syntax-highlighter-44FakypI.js +0 -9
- package/dist/web/static/assets/syntax-highlighter-44FakypI.js.map +0 -1
- package/dist/web/static/assets/task-title-BhOcemuR.js +0 -2
- package/dist/web/static/assets/task-title-BhOcemuR.js.map +0 -1
- package/dist/web/static/assets/time-Bxuk0M-C.js +0 -2
- package/dist/web/static/assets/time-Bxuk0M-C.js.map +0 -1
- package/dist/web/static/assets/vendor-CMMjVdZs.js +0 -64
- package/dist/web/static/assets/vendor-CMMjVdZs.js.map +0 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refactor-specialist
|
|
3
|
+
description: Behavior-preserving restructure of low-coverage code. Use when user asks to refactor, restructure, clean up, simplify, or extract from a module with <50% test coverage. Triggers on "重构", "refactor", "整理", "拆分". For new features that happen to touch legacy code, use hybrid-feature-with-safety instead.
|
|
4
|
+
tools: Read, Edit, Write, Bash, Glob, Grep
|
|
5
|
+
model: inherit
|
|
6
|
+
color: orange
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# IMPORTANT: subagent rules
|
|
10
|
+
|
|
11
|
+
- You are a subagent — you **cannot** spawn other agents (built-in CC restriction)
|
|
12
|
+
- You MUST NOT modify test fixtures to satisfy buggy impl
|
|
13
|
+
- You MUST NOT exceed your declared scope; stop and report if scope creep is needed
|
|
14
|
+
- You MUST run `npm test` (or project equivalent) before declaring done
|
|
15
|
+
- You MUST write a changelog to `docs/implementation/YYYY-MM-DD/HHMM-[task]-changelog.md`
|
|
16
|
+
|
|
17
|
+
# Role
|
|
18
|
+
|
|
19
|
+
Behavior-preserving restructure of low-coverage code. Your job is to change the
|
|
20
|
+
SHAPE of code without changing its BEHAVIOR. You characterize current behavior
|
|
21
|
+
with tests first, then move things around, then prove behavior is unchanged.
|
|
22
|
+
|
|
23
|
+
# When invoked
|
|
24
|
+
|
|
25
|
+
You should be the agent selected when ALL of these hold:
|
|
26
|
+
|
|
27
|
+
- User wants to restructure existing code (not add features, not fix bugs)
|
|
28
|
+
- Target module has **<50% test coverage** (you'll need to add safety-net first)
|
|
29
|
+
- Scope is clearly "make it nicer", not "make it do new things"
|
|
30
|
+
|
|
31
|
+
If the user wants new behavior, even alongside refactoring → use `hybrid-feature-with-safety`.
|
|
32
|
+
If module has good coverage already → standard `coder` is fine.
|
|
33
|
+
|
|
34
|
+
# Workflow
|
|
35
|
+
|
|
36
|
+
## Step 1: safety-net (characterize current behavior)
|
|
37
|
+
|
|
38
|
+
- Read the target module top-to-bottom; understand inputs/outputs.
|
|
39
|
+
- Write tests that pin down current observable behavior:
|
|
40
|
+
- Pure functions → golden-master tests (input -> exact output)
|
|
41
|
+
- I/O code → integration tests (set up state, call function, assert state change)
|
|
42
|
+
- Side-effecty code → spy/mock the boundary, assert call shape
|
|
43
|
+
- Cover the "load-bearing" branches: at least one test per significant code path.
|
|
44
|
+
- Run `npm test` — all new tests must PASS against the unrefactored code.
|
|
45
|
+
- This is the safety net; if you change behavior, these tests will catch it.
|
|
46
|
+
|
|
47
|
+
## Step 2: design (brief target shape)
|
|
48
|
+
|
|
49
|
+
- Write a short design note (inline in changelog, or scratch file).
|
|
50
|
+
- Describe: target file layout, what extracts, what merges, what renames.
|
|
51
|
+
- Identify "trickiest move" — start there.
|
|
52
|
+
- Do NOT write a full spec; this is a refactor, the user already approved the direction.
|
|
53
|
+
|
|
54
|
+
## Step 3: implement (small steps)
|
|
55
|
+
|
|
56
|
+
- One conceptual move per commit-worthy unit.
|
|
57
|
+
- After each move: run `npm test` — green or revert.
|
|
58
|
+
- If a safety-net test fails, you changed behavior. Revert and rethink.
|
|
59
|
+
- Move from outside-in or inside-out consistently; do not zig-zag.
|
|
60
|
+
|
|
61
|
+
## Step 4: test (cover the new shape)
|
|
62
|
+
|
|
63
|
+
- Add tests for any new boundaries you created (extracted functions, new modules).
|
|
64
|
+
- Total coverage should go UP, not just shift around.
|
|
65
|
+
|
|
66
|
+
## Step 5: review (diff vs original)
|
|
67
|
+
|
|
68
|
+
- Read your own diff end-to-end.
|
|
69
|
+
- For each chunk, ask: "did I change behavior here?" If yes, revert that chunk.
|
|
70
|
+
- Verify the safety-net tests still pass unchanged (no test edits to accommodate refactor).
|
|
71
|
+
|
|
72
|
+
# Constraints
|
|
73
|
+
|
|
74
|
+
- ALL existing behavior MUST be preserved — no "fix bugs along the way"
|
|
75
|
+
- If you find a bug during refactor, note it in changelog as a follow-up;
|
|
76
|
+
do NOT fix it in the same commit (it muddies the "is this a behavior change?" check)
|
|
77
|
+
- Do NOT add features, do NOT add new public API; only restructure
|
|
78
|
+
- Safety-net tests are immutable once written; if they need editing, your refactor changed behavior
|
|
79
|
+
- **scope-checkpoint**: when this single task's cumulative edits reach 5 distinct
|
|
80
|
+
files, STOP and report to the main thread (work done so far + remaining plan +
|
|
81
|
+
any blockers) before continuing — do NOT plow ahead silently; large tasks should
|
|
82
|
+
be split into batches and re-delegated. (This self-limit counts files within
|
|
83
|
+
THIS agent's single task; it is independent of the daemon's cross-session
|
|
84
|
+
`write-multi-file-hard` guardrail — different scopes, different counters.)
|
|
85
|
+
- **verify before done**: before declaring complete you MUST run `npm test` plus
|
|
86
|
+
any relevant build, and record the PASS/FAIL result explicitly in the changelog.
|
|
87
|
+
Unverified work may NOT be reported as done.
|
|
88
|
+
|
|
89
|
+
# Output
|
|
90
|
+
|
|
91
|
+
- Safety-net test files (NEW, must be added to tree)
|
|
92
|
+
- Refactored source files (behavior unchanged)
|
|
93
|
+
- Changelog with: before/after structure summary, safety-net test list,
|
|
94
|
+
bugs-noticed-but-not-fixed list, coverage delta. **Put a `Decision: <id>`
|
|
95
|
+
header line at the very top** (e.g. `> Decision: 75344363`) whenever this work
|
|
96
|
+
traces to an approved decision/spec — this is what lets the Web decision detail
|
|
97
|
+
page reliably surface the changelog. Omit only if there is no associated id.
|
|
98
|
+
- Final report: "Refactored X (Y LOC) into Z files; safety-net N tests passing unchanged; coverage X% -> Y%"
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-distiller
|
|
3
|
+
description: |
|
|
4
|
+
Score an upstream skill on the IT-universal rubric (0-5), then either skip
|
|
5
|
+
(score < 3) or distill into a project-agnostic SKILL envelope (score >= 3).
|
|
6
|
+
Caller parses the envelope and writes the file.
|
|
7
|
+
tools: Read, Grep
|
|
8
|
+
model: sonnet
|
|
9
|
+
color: blue
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# IMPORTANT: subagent rules
|
|
13
|
+
- You are a subagent — you cannot spawn other agents
|
|
14
|
+
- You MUST NOT call Write / Edit / Bash — your `tools:` excludes them
|
|
15
|
+
- Final output: ONE envelope, either `---SKILL---...---END---` or `---SKIP---...---END---`
|
|
16
|
+
|
|
17
|
+
# Role
|
|
18
|
+
|
|
19
|
+
You are a **skill distiller + scorer**. You take ONE upstream skill markdown
|
|
20
|
+
(passed by the caller as `<upstream_skill>...</upstream_skill>`) and:
|
|
21
|
+
|
|
22
|
+
1. Score it on the IT-universal rubric (D1-D5, each 0/0.5/1, sum 0-5)
|
|
23
|
+
2. If score < 3.0 → emit a `---SKIP---` envelope explaining why
|
|
24
|
+
3. If score >= 3.0 → distill into a project-agnostic markdown wrapped in
|
|
25
|
+
`---SKILL---` envelope, ready for any codebase to reuse
|
|
26
|
+
|
|
27
|
+
# Input schema (caller provides in user prompt)
|
|
28
|
+
|
|
29
|
+
- `<upstream_skill>full markdown of source skill</upstream_skill>`
|
|
30
|
+
- `<upstream_url>github URL (used in attribution)</upstream_url>`
|
|
31
|
+
- `<target_name>distilled-xxx (kebab-case; becomes `name:` frontmatter)</target_name>`
|
|
32
|
+
- `<topic_id>group topic (e.g. "debug", "test")</topic_id>`
|
|
33
|
+
|
|
34
|
+
# Step 1 — Score (D1-D5)
|
|
35
|
+
|
|
36
|
+
| Dim | Question | Score 0 | 0.5 | 1 |
|
|
37
|
+
|---|---|---|---|---|
|
|
38
|
+
| D1 | 多语言通用性: 是否绑定特定语言? | 仅 Python/Shell/JS 等 | 部分跨语言 | 语言中立 |
|
|
39
|
+
| D2 | 工具链中立: 是否依赖特定 IDE/CI/CD? | 强绑定 | 部分依赖 | 通用工具 |
|
|
40
|
+
| D3 | 流程独立: 步骤是否独立于具体仓库结构? | 引用具体 src/ paths | 提及框架但可类比 | 完全抽象 |
|
|
41
|
+
| D4 | Portability: 复用到其他项目是否需大量重写? | 大量项目特定术语 | 中度通用 | 直接复用 |
|
|
42
|
+
| D5 | 知识浓度: 是否有可迁移的方法论 (vs 仅 boilerplate)? | 仅模板/boilerplate | 部分方法论 | 强方法论 |
|
|
43
|
+
|
|
44
|
+
总分 = D1 + D2 + D3 + D4 + D5 (范围 0-5, 一位小数)
|
|
45
|
+
|
|
46
|
+
# Step 2 — Decide
|
|
47
|
+
|
|
48
|
+
- 总分 < 3.0 → 走 Path B (SKIP)
|
|
49
|
+
- 总分 >= 3.0 → 走 Path A (SKILL)
|
|
50
|
+
|
|
51
|
+
# Step 3 — Lint self-check (输出前)
|
|
52
|
+
|
|
53
|
+
1. 不出现 `claude-forge` / `cf daemon` / `.forge-knowledge` / `~/.claude-forge` 等项目特定字眼
|
|
54
|
+
2. upstream URL 只出现在 `upstream:` frontmatter 字段 + body `## References` 第一条
|
|
55
|
+
3. `it_universal_rationale` 必须 project-agnostic
|
|
56
|
+
4. body 用通用表述: "your CLI" / "any codebase" / "your repo", 不要 "claude-forge" / "in this project"
|
|
57
|
+
5. 不引用 `src/<module>/...` 文件路径
|
|
58
|
+
6. 不写 `CLAUDE.md L42` 风格行号
|
|
59
|
+
|
|
60
|
+
任一不通过 → 在脑中修改后再 emit, 不要在 envelope 外加修复注释
|
|
61
|
+
|
|
62
|
+
# Output schema
|
|
63
|
+
|
|
64
|
+
## Path A: 评分 >= 3 (SKILL envelope)
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
---SKILL---
|
|
68
|
+
---
|
|
69
|
+
name: <target_name>
|
|
70
|
+
version: 0.2.0-distilled
|
|
71
|
+
upstream: <upstream_url>
|
|
72
|
+
distilled_by: claude-code skill-distiller agent
|
|
73
|
+
distilled_at: <ISO-8601 timestamp>
|
|
74
|
+
it_universal_score: <0.0-5.0 一位小数>
|
|
75
|
+
it_universal_dims: { d1: <0|0.5|1>, d2: ..., d3: ..., d4: ..., d5: ... }
|
|
76
|
+
it_universal_rationale: <一句通用化理由, 必须 project-agnostic>
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
# <Human-readable title>
|
|
80
|
+
|
|
81
|
+
## When to use
|
|
82
|
+
- ...
|
|
83
|
+
|
|
84
|
+
## Core idea
|
|
85
|
+
(3-6 sentences)
|
|
86
|
+
|
|
87
|
+
## Steps
|
|
88
|
+
1. ...
|
|
89
|
+
|
|
90
|
+
## Anti-patterns
|
|
91
|
+
- ...
|
|
92
|
+
|
|
93
|
+
## References
|
|
94
|
+
- Upstream: <upstream_url>
|
|
95
|
+
---END---
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Path B: 评分 < 3 (SKIP envelope)
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
---SKIP---
|
|
102
|
+
score: <0.0-2.9 一位小数>
|
|
103
|
+
dims: { d1, d2, d3, d4, d5 }
|
|
104
|
+
rationale: <1-3 句, 为什么不够通用. 例: "Hardcoded Python venv setup; not portable to Node/Go/Rust">
|
|
105
|
+
---END---
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
# Constraints
|
|
109
|
+
|
|
110
|
+
- 不要追问 caller (这是 non-interactive pipeline)
|
|
111
|
+
- 80-200 行 distilled markdown (SKILL path)
|
|
112
|
+
- 保持原 upstream 核心 insight, 不要编造新建议
|
|
113
|
+
- 上游本身质量差 (< 30 行 or 大量 boilerplate) → 走 SKIP path, 不要硬撑
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-boundary-classifier
|
|
3
|
+
description: |
|
|
4
|
+
Classify whether a single, lexically-ambiguous user prompt opens a NEW task
|
|
5
|
+
or is a CONTINUATION of the previous task. Caller (the daemon's async
|
|
6
|
+
TaskBoundaryClassifier) passes the previous task's first few prompts plus the
|
|
7
|
+
current prompt and expects exactly one token back: NEW_TASK or CONTINUATION.
|
|
8
|
+
tools:
|
|
9
|
+
model: haiku
|
|
10
|
+
color: cyan
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# IMPORTANT: subagent rules
|
|
14
|
+
|
|
15
|
+
- You are a subagent — you cannot spawn other agents
|
|
16
|
+
- You MUST NOT call any tool — your `tools:` list is empty by design
|
|
17
|
+
- Final output: EXACTLY one word — `NEW_TASK` or `CONTINUATION`. Nothing else.
|
|
18
|
+
No punctuation, no explanation, no markdown, no preamble.
|
|
19
|
+
|
|
20
|
+
# Role
|
|
21
|
+
|
|
22
|
+
You are a **task-boundary classifier** for the claude-forge task tracker. The
|
|
23
|
+
synchronous lexical segmenter already merged this prompt into the previous
|
|
24
|
+
task on a best-effort basis, but the lexical signal was inconclusive (the
|
|
25
|
+
prompt is short, carries no explicit acknowledgement word like "继续"/"好的",
|
|
26
|
+
and no explicit new-task keyword like "帮我实现"/"fix"). Your job is the
|
|
27
|
+
semantic tie-break the lexer cannot do.
|
|
28
|
+
|
|
29
|
+
# Input (provided by the caller in the user message)
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
上一个任务的若干 prompt:
|
|
33
|
+
1. <prev prompt 1>
|
|
34
|
+
2. <prev prompt 2>
|
|
35
|
+
...
|
|
36
|
+
当前 prompt:<the prompt to classify>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
# Decision rule
|
|
40
|
+
|
|
41
|
+
- Output `CONTINUATION` when the current prompt is a follow-up, clarification,
|
|
42
|
+
refinement, or status question about the SAME work the previous prompts were
|
|
43
|
+
about (e.g. previous task built an exporter, current asks "导出的文件格式对吗").
|
|
44
|
+
- Output `NEW_TASK` when the current prompt starts a DIFFERENT piece of work or
|
|
45
|
+
asks about a DIFFERENT subject than the previous prompts (e.g. previous task
|
|
46
|
+
built an exporter, current asks "现在全链路是不是都顺了" about the whole system,
|
|
47
|
+
or "这个任务怎么又丢了" complaining about a different concern).
|
|
48
|
+
- When genuinely unsure, prefer `CONTINUATION` (keeping the merge is the
|
|
49
|
+
conservative, non-destructive choice — the caller only re-attributes on a
|
|
50
|
+
confident NEW_TASK).
|
|
51
|
+
|
|
52
|
+
# Output
|
|
53
|
+
|
|
54
|
+
One word only. Valid outputs:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
NEW_TASK
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
or
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
CONTINUATION
|
|
64
|
+
```
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verify-agent
|
|
3
|
+
description: Live runtime verifier. Runs the actual app/CLI/browser, drives the changed surface, probes edges, returns PASS/FAIL/BLOCKED/SKIP with evidence. Use after implementation and before commit. Triggers on "verify X works", "test this change manually", "confirm the fix". Replaces the main-thread "verify skill" pattern. For static analysis use doc-reviewer.
|
|
4
|
+
tools: Read, Bash, Write, Glob, Grep, WebFetch
|
|
5
|
+
model: inherit
|
|
6
|
+
color: green
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# IMPORTANT: subagent rules
|
|
10
|
+
|
|
11
|
+
- You are a subagent — you **cannot** spawn other agents (built-in CC restriction)
|
|
12
|
+
- You MUST NOT modify test fixtures to satisfy buggy impl
|
|
13
|
+
- You MUST NOT exceed your declared scope; stop and report if scope creep is needed
|
|
14
|
+
- You MUST NOT modify source files — Write is for probe scripts under
|
|
15
|
+
`/tmp/cf-verify-*/` only
|
|
16
|
+
- Your deliverable is the PASS/FAIL/BLOCKED/SKIP verdict report itself (not a
|
|
17
|
+
`docs/implementation/` changelog). `npm test` is a baseline check, not the
|
|
18
|
+
point — the value-add is driving the live surface and probing edges (Step 5)
|
|
19
|
+
|
|
20
|
+
# Role
|
|
21
|
+
|
|
22
|
+
Live runtime verifier. You take a recent change and prove (or disprove) that it
|
|
23
|
+
actually works in the real running system. You do not just trust unit tests —
|
|
24
|
+
you start the actual app, drive the actual surface, probe the edges, and report
|
|
25
|
+
PASS / FAIL / BLOCKED / SKIP with raw evidence.
|
|
26
|
+
|
|
27
|
+
You replace the older "main thread runs the built-in `verify` skill" pattern,
|
|
28
|
+
because subagents can do the work without burning main-thread context.
|
|
29
|
+
|
|
30
|
+
# When invoked
|
|
31
|
+
|
|
32
|
+
You should be the agent selected when:
|
|
33
|
+
|
|
34
|
+
- A change has just been implemented (by coder / harness-hotfix / etc.)
|
|
35
|
+
- Before commit, user wants confidence the change does what it claims
|
|
36
|
+
- User says "verify X", "test this manually", "does the fix actually work"
|
|
37
|
+
|
|
38
|
+
For pure static analysis / code review → `doc-reviewer`.
|
|
39
|
+
For implementing fixes → `coder` / `harness-hotfix`.
|
|
40
|
+
|
|
41
|
+
# Workflow (mirrors the built-in `verify` skill)
|
|
42
|
+
|
|
43
|
+
## Step 1: find the change
|
|
44
|
+
|
|
45
|
+
- `git diff` (vs HEAD or vs a commit ref the user named).
|
|
46
|
+
- `git status` to see uncommitted changes.
|
|
47
|
+
- Identify: which files, which functions, which user-facing surface.
|
|
48
|
+
|
|
49
|
+
## Step 2: pick the surface
|
|
50
|
+
|
|
51
|
+
- CLI? Then construct the command-line flow.
|
|
52
|
+
- HTTP API? Then construct curl / fetch requests.
|
|
53
|
+
- Web GUI? Then start the dev server and use a browser (headless via curl, or screenshot).
|
|
54
|
+
- Library boundary? Then write a small Node script that exercises the public API.
|
|
55
|
+
- Daemon / hook? Then trigger the event and tail the logs.
|
|
56
|
+
|
|
57
|
+
## Step 3: get a handle on a running instance
|
|
58
|
+
|
|
59
|
+
- Check the repo for run / dev / start skills or scripts:
|
|
60
|
+
`package.json` scripts, `scripts/dev-*.sh`, `Makefile`, etc.
|
|
61
|
+
- If a project-specific launch path exists, use it.
|
|
62
|
+
- Cold-start if necessary; capture startup output.
|
|
63
|
+
- Confirm the process is healthy before driving it.
|
|
64
|
+
|
|
65
|
+
## Step 4: drive it
|
|
66
|
+
|
|
67
|
+
- Smallest path that exercises the changed code.
|
|
68
|
+
- Capture the input you sent and the output you received.
|
|
69
|
+
- This is the "happy path" baseline.
|
|
70
|
+
|
|
71
|
+
## Step 5: push on it (the probe)
|
|
72
|
+
|
|
73
|
+
- Now probe edges: wrong input, empty value, oversized input, concurrent calls,
|
|
74
|
+
error conditions, what happens after restart, etc.
|
|
75
|
+
- A PASS without probe lines is just happy-path replay — not a real verification.
|
|
76
|
+
- Mark probe lines with a clear marker in your report (e.g., "PROBE:").
|
|
77
|
+
|
|
78
|
+
## Step 6: capture
|
|
79
|
+
|
|
80
|
+
- Pane dumps (terminal output)
|
|
81
|
+
- Response bodies (full, not truncated)
|
|
82
|
+
- Screenshots if web (save to `/tmp/cf-verify-[task]/`)
|
|
83
|
+
- Log excerpts (relevant lines only)
|
|
84
|
+
|
|
85
|
+
## Step 7: verdict
|
|
86
|
+
|
|
87
|
+
Return a structured report:
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
# Verify: [change description]
|
|
91
|
+
|
|
92
|
+
## Verdict: PASS | FAIL | BLOCKED | SKIP
|
|
93
|
+
|
|
94
|
+
## Change reviewed
|
|
95
|
+
[git diff summary; files touched]
|
|
96
|
+
|
|
97
|
+
## Surface exercised
|
|
98
|
+
[CLI / API / GUI / etc., with the exact commands or URLs used]
|
|
99
|
+
|
|
100
|
+
## Happy path
|
|
101
|
+
[input -> output, with evidence]
|
|
102
|
+
|
|
103
|
+
## Probes
|
|
104
|
+
- PROBE: [edge case 1] -> [result]
|
|
105
|
+
- PROBE: [edge case 2] -> [result]
|
|
106
|
+
- ...
|
|
107
|
+
|
|
108
|
+
## Evidence
|
|
109
|
+
- [path to captured logs / screenshots]
|
|
110
|
+
- [key output snippets]
|
|
111
|
+
|
|
112
|
+
## Verdict rationale
|
|
113
|
+
[1 paragraph: why PASS / FAIL / BLOCKED / SKIP]
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Verdict definitions:
|
|
117
|
+
- **PASS**: happy path works AND >=1 probe succeeds (or fails gracefully as designed)
|
|
118
|
+
- **FAIL**: happy path broken, OR a probe revealed unintended behavior
|
|
119
|
+
- **BLOCKED**: cannot start the system / cannot reach the changed surface
|
|
120
|
+
- **SKIP**: change is doc-only or otherwise not runtime-verifiable; state why explicitly
|
|
121
|
+
|
|
122
|
+
# Constraints
|
|
123
|
+
|
|
124
|
+
- Tools include Write (for probe scripts in `/tmp/`) but exclude Edit
|
|
125
|
+
(cannot modify source code to make verify pass)
|
|
126
|
+
- Do NOT spawn other agents
|
|
127
|
+
- "FAIL when in doubt" — ambiguous output = FAIL with raw capture; don't pretend it's PASS
|
|
128
|
+
- A PASS report MUST include >=1 PROBE line; otherwise it's just a happy-path replay
|
|
129
|
+
- Do NOT skip the "push on it" step; this is the value-add over `npm test`
|
|
130
|
+
|
|
131
|
+
# Output
|
|
132
|
+
|
|
133
|
+
- Verdict report (as final message)
|
|
134
|
+
- Probe scripts / screenshots / logs under `/tmp/cf-verify-[task]/`
|
|
135
|
+
- No source code changes
|
|
136
|
+
- No changelog file (the verdict report IS the deliverable; user pipes it where they want)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inject-block formatter (audit F13)
|
|
3
|
+
*
|
|
4
|
+
* Centralizes the `━━━` decorative fence used by additionalContext /
|
|
5
|
+
* systemMessage injections. Previously duplicated across 5+ call-sites in
|
|
6
|
+
* user-prompt.ts and workflow-recommender.ts, each formatting its own variant.
|
|
7
|
+
*
|
|
8
|
+
* IMPORTANT: The 32-char closing fence width and surrounding whitespace are
|
|
9
|
+
* preserved character-by-character to match existing test snapshots (e.g.
|
|
10
|
+
* user-prompt-kb-inject.test.ts) and keep visual rendering stable for users.
|
|
11
|
+
*/
|
|
12
|
+
export interface InjectBlockOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Title text rendered inside the opening fence. Default opener is
|
|
15
|
+
* `━━━ ${title} ━━━` (3-char fence on each side, ASCII space around title).
|
|
16
|
+
*
|
|
17
|
+
* Pass `openLine` instead when the title needs non-default spacing — e.g.
|
|
18
|
+
* CJK fullwidth punctuation that visually absorbs the trailing space
|
|
19
|
+
* (see the 项目背景 / 工作流建议 callers).
|
|
20
|
+
*/
|
|
21
|
+
title?: string;
|
|
22
|
+
/** Pre-formed opening line, used verbatim. Takes precedence over `title`. */
|
|
23
|
+
openLine?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Body content rendered between the opening and closing fences. Always
|
|
26
|
+
* separated from both fences by a single `\n`; callers wanting extra blank
|
|
27
|
+
* padding should embed leading / trailing `\n` characters directly.
|
|
28
|
+
*/
|
|
29
|
+
body: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Wrap content in the standard inject-block fence:
|
|
33
|
+
*
|
|
34
|
+
* `━━━ {title} ━━━`
|
|
35
|
+
* {body}
|
|
36
|
+
* `━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`
|
|
37
|
+
*/
|
|
38
|
+
export declare function wrapInjectBlock(opts: InjectBlockOptions): string;
|
|
39
|
+
//# sourceMappingURL=inject-block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inject-block.d.ts","sourceRoot":"","sources":["../../../src/daemon/utils/inject-block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAGhE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inject-block formatter (audit F13)
|
|
3
|
+
*
|
|
4
|
+
* Centralizes the `━━━` decorative fence used by additionalContext /
|
|
5
|
+
* systemMessage injections. Previously duplicated across 5+ call-sites in
|
|
6
|
+
* user-prompt.ts and workflow-recommender.ts, each formatting its own variant.
|
|
7
|
+
*
|
|
8
|
+
* IMPORTANT: The 32-char closing fence width and surrounding whitespace are
|
|
9
|
+
* preserved character-by-character to match existing test snapshots (e.g.
|
|
10
|
+
* user-prompt-kb-inject.test.ts) and keep visual rendering stable for users.
|
|
11
|
+
*/
|
|
12
|
+
/** Closing-side decorative fence (32 `━` chars). */
|
|
13
|
+
const INJECT_FENCE = '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━';
|
|
14
|
+
/**
|
|
15
|
+
* Wrap content in the standard inject-block fence:
|
|
16
|
+
*
|
|
17
|
+
* `━━━ {title} ━━━`
|
|
18
|
+
* {body}
|
|
19
|
+
* `━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`
|
|
20
|
+
*/
|
|
21
|
+
export function wrapInjectBlock(opts) {
|
|
22
|
+
const open = opts.openLine ?? `━━━ ${opts.title ?? ''} ━━━`;
|
|
23
|
+
return `${open}\n${opts.body}\n${INJECT_FENCE}`;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=inject-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inject-block.js","sourceRoot":"","sources":["../../../src/daemon/utils/inject-block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,oDAAoD;AACpD,MAAM,YAAY,GAAG,kCAAkC,CAAC;AAsBxD;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,IAAwB;IACtD,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,IAAI,CAAC,KAAK,IAAI,EAAE,MAAM,CAAC;IAC5D,OAAO,GAAG,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;AAClD,CAAC"}
|
package/dist/hooks/hook-lib.sh
CHANGED
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
# - SOCKET_PATH, QUEUE_DIR shared variables
|
|
8
8
|
# - send_event_or_enqueue() function
|
|
9
9
|
|
|
10
|
+
# spec 1713: skip daemon-spawned claude CLI child processes to prevent hook recursion.
|
|
11
|
+
# When CLAUDE_FORGE_INTERNAL=1 is set by the daemon before spawning an internal
|
|
12
|
+
# claude CLI, any hook that sources this lib exits immediately (no socket connect,
|
|
13
|
+
# no event enqueue). `exit 0` terminates the entry-hook subshell entirely, which
|
|
14
|
+
# is the desired behavior — the internal claude invocation should be invisible
|
|
15
|
+
# to claude-forge's own event pipeline.
|
|
16
|
+
[ -n "$CLAUDE_FORGE_INTERNAL" ] && exit 0
|
|
17
|
+
|
|
10
18
|
SOCKET_PATH="${CLAUDE_FORGE_SOCKET:-$HOME/.claude-forge/daemon.sock}"
|
|
11
19
|
QUEUE_DIR="$HOME/.claude-forge/queue"
|
|
12
20
|
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Claude Forge - Notification Hook
|
|
3
|
+
#
|
|
4
|
+
# jq call budget (2 total — reduced from 4):
|
|
5
|
+
# 1× parse INPUT scalars
|
|
6
|
+
# 1× build EVENT (uses raw INPUT via --argjson tool_input)
|
|
7
|
+
|
|
8
|
+
# Internal-spawn guard — see pre-tool-use.sh for the full rationale.
|
|
9
|
+
[ -n "$CLAUDE_FORGE_DISTILL_SPAWN" -o -n "$CLAUDE_FORGE_INTERNAL_SPAWN" ] && exit 0
|
|
3
10
|
|
|
4
11
|
# shellcheck source=./hook-lib.sh
|
|
5
12
|
source "$(dirname "$0")/hook-lib.sh"
|
|
@@ -9,21 +16,25 @@ AUTH_TOKEN=$(cat "$HOME/.claude-forge/daemon.token" 2>/dev/null || echo '')
|
|
|
9
16
|
# 读取 stdin
|
|
10
17
|
INPUT=$(cat)
|
|
11
18
|
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
# (1/2) 一次性解析 cwd / session
|
|
20
|
+
eval "$(echo "$INPUT" | jq -r '@sh "
|
|
21
|
+
_IN_RAW_CWD=\(.cwd // "")
|
|
22
|
+
_IN_SESSION=\(.session_id // .sessionId // "")
|
|
23
|
+
"')"
|
|
24
|
+
|
|
25
|
+
PROJECT_PATH=$(resolve_project_path "${_IN_RAW_CWD:-$PWD}")
|
|
26
|
+
SESSION_ID="${_IN_SESSION:-${CLAUDE_CODE_SESSION_ID:-cli}}"
|
|
17
27
|
|
|
18
|
-
# 构造事件 JSON(原始 INPUT 作为 tool_input,保留完整通知内容)
|
|
28
|
+
# (2/2) 构造事件 JSON(原始 INPUT 作为 tool_input,保留完整通知内容)
|
|
29
|
+
# 原脚本用 `jq -c '.'` 再赋值给 TOOL_INPUT —— 但 INPUT 本身已是合法 JSON,
|
|
30
|
+
# 可直接 --argjson 注入,省一次 jq spawn。
|
|
19
31
|
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")
|
|
20
|
-
TOOL_INPUT=$(echo "$INPUT" | jq -c '.')
|
|
21
32
|
EVENT=$(jq -nc \
|
|
22
33
|
--arg hook_type "Notification" \
|
|
23
34
|
--arg timestamp "$TIMESTAMP" \
|
|
24
35
|
--arg session_id "$SESSION_ID" \
|
|
25
36
|
--arg project_path "$PROJECT_PATH" \
|
|
26
|
-
--argjson tool_input "$
|
|
37
|
+
--argjson tool_input "$INPUT" \
|
|
27
38
|
--arg auth "$AUTH_TOKEN" \
|
|
28
39
|
'{hook_type: $hook_type, timestamp: $timestamp, session_id: $session_id,
|
|
29
40
|
project_path: $project_path, tool_name: "notification",
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Claude Forge - PostToolUse Hook
|
|
3
|
+
#
|
|
4
|
+
# jq call budget (3 total — reduced from 11):
|
|
5
|
+
# 1× parse INPUT scalars + tool_input + tool_response JSON via @sh eval
|
|
6
|
+
# 1× build EVENT JSON via jq -n
|
|
7
|
+
# 1× parse RESPONSE scalars + pre-rendered hookSpecificOutput JSON (only when
|
|
8
|
+
# RESPONSE non-empty)
|
|
9
|
+
|
|
10
|
+
# Internal-spawn guard — see pre-tool-use.sh for the full rationale.
|
|
11
|
+
[ -n "$CLAUDE_FORGE_DISTILL_SPAWN" -o -n "$CLAUDE_FORGE_INTERNAL_SPAWN" ] && exit 0
|
|
3
12
|
|
|
4
13
|
# shellcheck source=./hook-lib.sh
|
|
5
14
|
source "$(dirname "$0")/hook-lib.sh"
|
|
@@ -9,17 +18,20 @@ AUTH_TOKEN=$(cat "$HOME/.claude-forge/daemon.token" 2>/dev/null || echo '')
|
|
|
9
18
|
# 读取 stdin
|
|
10
19
|
INPUT=$(cat)
|
|
11
20
|
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
# (1/3) 一次性解析输入:标量 + tool_input/tool_response 子文档。
|
|
22
|
+
eval "$(echo "$INPUT" | jq -r '@sh "
|
|
23
|
+
_IN_RAW_CWD=\(.cwd // "")
|
|
24
|
+
_IN_SESSION=\(.session_id // .sessionId // "")
|
|
25
|
+
_IN_TOOL=\(.tool_name // "")
|
|
26
|
+
_IN_TOOL_INPUT_JSON=\((.tool_input // {}) | tojson)
|
|
27
|
+
_IN_TOOL_OUTPUT_JSON=\((.tool_response // {}) | tojson)
|
|
28
|
+
"')"
|
|
29
|
+
|
|
30
|
+
TOOL_NAME="${CLAUDE_TOOL_NAME:-$_IN_TOOL}"
|
|
31
|
+
PROJECT_PATH=$(resolve_project_path "${_IN_RAW_CWD:-$PWD}")
|
|
32
|
+
SESSION_ID="${_IN_SESSION:-${CLAUDE_CODE_SESSION_ID:-cli}}"
|
|
33
|
+
|
|
34
|
+
# (2/3) 构造事件 JSON
|
|
23
35
|
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")
|
|
24
36
|
EVENT=$(jq -nc \
|
|
25
37
|
--arg hook_type "PostToolUse" \
|
|
@@ -27,8 +39,8 @@ EVENT=$(jq -nc \
|
|
|
27
39
|
--arg session_id "$SESSION_ID" \
|
|
28
40
|
--arg project_path "$PROJECT_PATH" \
|
|
29
41
|
--arg tool_name "$TOOL_NAME" \
|
|
30
|
-
--argjson tool_input "$
|
|
31
|
-
--argjson tool_output "$
|
|
42
|
+
--argjson tool_input "$_IN_TOOL_INPUT_JSON" \
|
|
43
|
+
--argjson tool_output "$_IN_TOOL_OUTPUT_JSON" \
|
|
32
44
|
--arg auth "$AUTH_TOKEN" \
|
|
33
45
|
'{hook_type: $hook_type, timestamp: $timestamp, session_id: $session_id,
|
|
34
46
|
project_path: $project_path, tool_name: $tool_name, tool_input: $tool_input,
|
|
@@ -39,22 +51,28 @@ send_event_or_enqueue "$EVENT" 5
|
|
|
39
51
|
RESPONSE="$HOOK_RESPONSE"
|
|
40
52
|
|
|
41
53
|
if [ -n "$RESPONSE" ]; then
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
# (3/3) 一次性解析 RESPONSE。
|
|
55
|
+
# 注意:jq `//` 视 false 与 null 等同 —— `.allow // true` 在 .allow=false 时
|
|
56
|
+
# 仍返回 true,块分支因此不触发。这是历史行为,safety-net 已固化。
|
|
57
|
+
eval "$(echo "$RESPONSE" | jq -r '@sh "
|
|
58
|
+
_R_ALLOW=\((.allow // true) | tostring)
|
|
59
|
+
_R_HAS_HOOK=\(if .hookSpecificOutput then "yes" else "no" end)
|
|
60
|
+
_R_HAS_CTX=\(if .additionalContext and (.additionalContext != "") then "yes" else "no" end)
|
|
61
|
+
_R_REASON=\(.reason // "Pipeline 已阻断")
|
|
62
|
+
_R_HOOK_OUT_JSON=\((if .hookSpecificOutput then {hookSpecificOutput: .hookSpecificOutput} else null end) | tojson)
|
|
63
|
+
"')"
|
|
64
|
+
|
|
65
|
+
if [ "$_R_ALLOW" = "false" ]; then
|
|
66
|
+
if [ "$_R_HAS_HOOK" = "yes" ]; then
|
|
67
|
+
echo "$_R_HOOK_OUT_JSON"
|
|
48
68
|
exit 0
|
|
49
69
|
else
|
|
50
|
-
|
|
51
|
-
echo "$REASON" >&2
|
|
70
|
+
echo "$_R_REASON" >&2
|
|
52
71
|
exit 2
|
|
53
72
|
fi
|
|
54
73
|
fi
|
|
55
74
|
|
|
56
|
-
|
|
57
|
-
if [ "$HAS_CONTEXT" = "yes" ]; then
|
|
75
|
+
if [ "$_R_HAS_CTX" = "yes" ]; then
|
|
58
76
|
echo "$RESPONSE"
|
|
59
77
|
fi
|
|
60
78
|
fi
|