oh-my-copilot 5.26.0 → 5.28.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +2 -1
- package/agents/executor.md +1 -0
- package/bridge/claude-md-coordinator.cjs +2 -2
- package/bridge/cli.cjs +23572 -17129
- package/bridge/mcp-server.cjs +2721 -1497
- package/bridge/runtime-cli.cjs +4707 -1925
- package/bridge/team-mcp.cjs +2917 -816
- package/bridge/team.js +5397 -2381
- package/copilot/agents/executor.md +1 -0
- package/copilot/hooks.json +3 -3
- package/dist/__tests__/arguments-literal-substitution.test.d.ts +2 -0
- package/dist/__tests__/arguments-literal-substitution.test.d.ts.map +1 -0
- package/dist/__tests__/arguments-literal-substitution.test.js +34 -0
- package/dist/__tests__/arguments-literal-substitution.test.js.map +1 -0
- package/dist/__tests__/bridge-self-contained.test.d.ts +2 -0
- package/dist/__tests__/bridge-self-contained.test.d.ts.map +1 -0
- package/dist/__tests__/bridge-self-contained.test.js +44 -0
- package/dist/__tests__/bridge-self-contained.test.js.map +1 -0
- package/dist/__tests__/context-safety.test.js +1 -1
- package/dist/__tests__/context-safety.test.js.map +1 -1
- package/dist/__tests__/copilot-hook-dispatch.test.js +5 -1
- package/dist/__tests__/copilot-hook-dispatch.test.js.map +1 -1
- package/dist/__tests__/copilot-hooks-manifest.test.js +15 -1
- package/dist/__tests__/copilot-hooks-manifest.test.js.map +1 -1
- package/dist/__tests__/directory-context-injector-registration.test.js +5 -2
- package/dist/__tests__/directory-context-injector-registration.test.js.map +1 -1
- package/dist/__tests__/doctor-conflicts.test.js +61 -0
- package/dist/__tests__/doctor-conflicts.test.js.map +1 -1
- package/dist/__tests__/hook-command-normalizer.test.js +96 -58
- package/dist/__tests__/hook-command-normalizer.test.js.map +1 -1
- package/dist/__tests__/hooks/session-end-cleanup.test.js +87 -1
- package/dist/__tests__/hooks/session-end-cleanup.test.js.map +1 -1
- package/dist/__tests__/hooks-command-escaping.test.js +18 -16
- package/dist/__tests__/hooks-command-escaping.test.js.map +1 -1
- package/dist/__tests__/hud/omc-state.test.js +62 -1
- package/dist/__tests__/hud/omc-state.test.js.map +1 -1
- package/dist/__tests__/installer-mcp-config.test.js +39 -1
- package/dist/__tests__/installer-mcp-config.test.js.map +1 -1
- package/dist/__tests__/issue-2652-runtime-wiring-and-output-contract.test.js +1 -1
- package/dist/__tests__/issue-2652-runtime-wiring-and-output-contract.test.js.map +1 -1
- package/dist/__tests__/keyword-detector-echo-guard.test.js +13 -1
- package/dist/__tests__/keyword-detector-echo-guard.test.js.map +1 -1
- package/dist/__tests__/keyword-detector-script.test.js +201 -0
- package/dist/__tests__/keyword-detector-script.test.js.map +1 -1
- package/dist/__tests__/npm-package-surface-helpers.d.ts.map +1 -1
- package/dist/__tests__/npm-package-surface-helpers.js +8 -4
- package/dist/__tests__/npm-package-surface-helpers.js.map +1 -1
- package/dist/__tests__/plugin-setup-deps.test.js +144 -71
- package/dist/__tests__/plugin-setup-deps.test.js.map +1 -1
- package/dist/__tests__/preemptive-compaction-hook.test.js +62 -5
- package/dist/__tests__/preemptive-compaction-hook.test.js.map +1 -1
- package/dist/__tests__/ralph-prd-mandatory.test.js +3 -0
- package/dist/__tests__/ralph-prd-mandatory.test.js.map +1 -1
- package/dist/__tests__/rate-limit-wait/herdr-daemon.test.d.ts +10 -0
- package/dist/__tests__/rate-limit-wait/herdr-daemon.test.d.ts.map +1 -0
- package/dist/__tests__/rate-limit-wait/herdr-daemon.test.js +241 -0
- package/dist/__tests__/rate-limit-wait/herdr-daemon.test.js.map +1 -0
- package/dist/__tests__/rate-limit-wait/herdr-detector.test.d.ts +9 -0
- package/dist/__tests__/rate-limit-wait/herdr-detector.test.d.ts.map +1 -0
- package/dist/__tests__/rate-limit-wait/herdr-detector.test.js +162 -0
- package/dist/__tests__/rate-limit-wait/herdr-detector.test.js.map +1 -0
- package/dist/__tests__/repair-plugin-cache-script.test.js +7 -1
- package/dist/__tests__/repair-plugin-cache-script.test.js.map +1 -1
- package/dist/__tests__/run-cjs-graceful-fallback.test.js +3 -2
- package/dist/__tests__/run-cjs-graceful-fallback.test.js.map +1 -1
- package/dist/__tests__/run-cjs-windows-stdio-contract.test.js +4 -1
- package/dist/__tests__/run-cjs-windows-stdio-contract.test.js.map +1 -1
- package/dist/__tests__/setup-contracts-regression.test.js +13 -10
- package/dist/__tests__/setup-contracts-regression.test.js.map +1 -1
- package/dist/__tests__/skills.test.js +10 -9
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/alias-retirement/__tests__/registry.test.js +2 -2
- package/dist/cli/__tests__/doctor-conflicts-json.test.js +2 -2
- package/dist/cli/__tests__/doctor-conflicts-json.test.js.map +1 -1
- package/dist/cli/__tests__/herdr-no-raw-calls.test.d.ts +10 -0
- package/dist/cli/__tests__/herdr-no-raw-calls.test.d.ts.map +1 -0
- package/dist/cli/__tests__/herdr-no-raw-calls.test.js +54 -0
- package/dist/cli/__tests__/herdr-no-raw-calls.test.js.map +1 -0
- package/dist/cli/__tests__/interop-herdr.test.d.ts +9 -0
- package/dist/cli/__tests__/interop-herdr.test.d.ts.map +1 -0
- package/dist/cli/__tests__/interop-herdr.test.js +138 -0
- package/dist/cli/__tests__/interop-herdr.test.js.map +1 -0
- package/dist/cli/__tests__/launch-herdr.test.d.ts +10 -0
- package/dist/cli/__tests__/launch-herdr.test.d.ts.map +1 -0
- package/dist/cli/__tests__/launch-herdr.test.js +141 -0
- package/dist/cli/__tests__/launch-herdr.test.js.map +1 -0
- package/dist/cli/__tests__/launch.test.js +140 -10
- package/dist/cli/__tests__/launch.test.js.map +1 -1
- package/dist/cli/__tests__/plugin-dir-capture.test.js +2 -0
- package/dist/cli/__tests__/plugin-dir-capture.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-afk.test.js +392 -2
- package/dist/cli/__tests__/ralph-afk.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-closeout.test.d.ts +2 -0
- package/dist/cli/__tests__/ralph-closeout.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralph-closeout.test.js +156 -0
- package/dist/cli/__tests__/ralph-closeout.test.js.map +1 -0
- package/dist/cli/__tests__/subcommand-json-flag.test.d.ts +2 -0
- package/dist/cli/__tests__/subcommand-json-flag.test.d.ts.map +1 -0
- package/dist/cli/__tests__/subcommand-json-flag.test.js +86 -0
- package/dist/cli/__tests__/subcommand-json-flag.test.js.map +1 -0
- package/dist/cli/__tests__/team-resume-v2.test.js +46 -0
- package/dist/cli/__tests__/team-resume-v2.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.js +24 -0
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/__tests__/wait-teleport-json.test.js +2 -2
- package/dist/cli/__tests__/wait-teleport-json.test.js.map +1 -1
- package/dist/cli/commands/__tests__/factory-run-cli.test.js +20 -0
- package/dist/cli/commands/__tests__/factory-run-cli.test.js.map +1 -1
- package/dist/cli/commands/__tests__/release-cli.test.js +11 -0
- package/dist/cli/commands/__tests__/release-cli.test.js.map +1 -1
- package/dist/cli/commands/__tests__/ship-cli.test.js +1 -1
- package/dist/cli/commands/__tests__/ship-cli.test.js.map +1 -1
- package/dist/cli/commands/__tests__/teleport.test.js +42 -0
- package/dist/cli/commands/__tests__/teleport.test.js.map +1 -1
- package/dist/cli/commands/__tests__/wait.test.js +33 -1
- package/dist/cli/commands/__tests__/wait.test.js.map +1 -1
- package/dist/cli/commands/doctor-conflicts.d.ts.map +1 -1
- package/dist/cli/commands/doctor-conflicts.js +6 -2
- package/dist/cli/commands/doctor-conflicts.js.map +1 -1
- package/dist/cli/commands/factory-bench.d.ts.map +1 -1
- package/dist/cli/commands/factory-bench.js +17 -3
- package/dist/cli/commands/factory-bench.js.map +1 -1
- package/dist/cli/commands/factory-dashboard.d.ts +5 -1
- package/dist/cli/commands/factory-dashboard.d.ts.map +1 -1
- package/dist/cli/commands/factory-dashboard.js +6 -2
- package/dist/cli/commands/factory-dashboard.js.map +1 -1
- package/dist/cli/commands/factory.d.ts +6 -0
- package/dist/cli/commands/factory.d.ts.map +1 -1
- package/dist/cli/commands/factory.js +45 -4
- package/dist/cli/commands/factory.js.map +1 -1
- package/dist/cli/commands/ralph.d.ts +36 -1
- package/dist/cli/commands/ralph.d.ts.map +1 -1
- package/dist/cli/commands/ralph.js +298 -50
- package/dist/cli/commands/ralph.js.map +1 -1
- package/dist/cli/commands/release.d.ts +3 -1
- package/dist/cli/commands/release.d.ts.map +1 -1
- package/dist/cli/commands/release.js +12 -3
- package/dist/cli/commands/release.js.map +1 -1
- package/dist/cli/commands/ship.d.ts.map +1 -1
- package/dist/cli/commands/ship.js +8 -4
- package/dist/cli/commands/ship.js.map +1 -1
- package/dist/cli/commands/team.d.ts.map +1 -1
- package/dist/cli/commands/team.js +2 -0
- package/dist/cli/commands/team.js.map +1 -1
- package/dist/cli/commands/teleport.d.ts.map +1 -1
- package/dist/cli/commands/teleport.js +6 -1
- package/dist/cli/commands/teleport.js.map +1 -1
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +3 -1
- package/dist/cli/commands/wait.js.map +1 -1
- package/dist/cli/index.js +8 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/interop.d.ts +4 -3
- package/dist/cli/interop.d.ts.map +1 -1
- package/dist/cli/interop.js +95 -4
- package/dist/cli/interop.js.map +1 -1
- package/dist/cli/launch.d.ts +17 -2
- package/dist/cli/launch.d.ts.map +1 -1
- package/dist/cli/launch.js +110 -12
- package/dist/cli/launch.js.map +1 -1
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +4 -1
- package/dist/cli/team.js.map +1 -1
- package/dist/commands/index.js +1 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +17 -0
- package/dist/config/loader.js.map +1 -1
- package/dist/copilot-run/job.d.ts +2 -0
- package/dist/copilot-run/job.d.ts.map +1 -1
- package/dist/copilot-run/job.js +3 -0
- package/dist/copilot-run/job.js.map +1 -1
- package/dist/copilot-run/sandbox.d.ts +16 -0
- package/dist/copilot-run/sandbox.d.ts.map +1 -1
- package/dist/copilot-run/sandbox.js +29 -2
- package/dist/copilot-run/sandbox.js.map +1 -1
- package/dist/factory/bench/__tests__/bench.units.test.js +133 -1
- package/dist/factory/bench/__tests__/bench.units.test.js.map +1 -1
- package/dist/factory/bench/score.d.ts +33 -1
- package/dist/factory/bench/score.d.ts.map +1 -1
- package/dist/factory/bench/score.js +95 -5
- package/dist/factory/bench/score.js.map +1 -1
- package/dist/factory/board/__tests__/board.test.js +31 -1
- package/dist/factory/board/__tests__/board.test.js.map +1 -1
- package/dist/factory/board/collect.d.ts +5 -2
- package/dist/factory/board/collect.d.ts.map +1 -1
- package/dist/factory/board/collect.js +7 -2
- package/dist/factory/board/collect.js.map +1 -1
- package/dist/factory/check/cli.d.ts.map +1 -1
- package/dist/factory/check/cli.js +6 -2
- package/dist/factory/check/cli.js.map +1 -1
- package/dist/factory/dashboard/__tests__/dashboard.test.js +10 -0
- package/dist/factory/dashboard/__tests__/dashboard.test.js.map +1 -1
- package/dist/factory/run/__tests__/auto-merge.test.js +2 -0
- package/dist/factory/run/__tests__/auto-merge.test.js.map +1 -1
- package/dist/factory/run/__tests__/claims.test.js +15 -0
- package/dist/factory/run/__tests__/claims.test.js.map +1 -1
- package/dist/factory/run/__tests__/container-gate.test.js +59 -1
- package/dist/factory/run/__tests__/container-gate.test.js.map +1 -1
- package/dist/factory/run/__tests__/engine-local-harness.d.ts.map +1 -1
- package/dist/factory/run/__tests__/engine-local-harness.js +6 -0
- package/dist/factory/run/__tests__/engine-local-harness.js.map +1 -1
- package/dist/factory/run/__tests__/engine-local-harness.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine-local-harness.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine-local-harness.test.js +23 -0
- package/dist/factory/run/__tests__/engine-local-harness.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.gates-git-transport.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.gates-git-transport.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.gates-git-transport.test.js +392 -0
- package/dist/factory/run/__tests__/engine.gates-git-transport.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.gates-test-delta.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.gates-test-delta.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.gates-test-delta.test.js +347 -0
- package/dist/factory/run/__tests__/engine.gates-test-delta.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.gates-tree-copy.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.gates-tree-copy.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.gates-tree-copy.test.js +235 -0
- package/dist/factory/run/__tests__/engine.gates-tree-copy.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.human-merged.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.human-merged.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.human-merged.test.js +171 -0
- package/dist/factory/run/__tests__/engine.human-merged.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.local.conflict-reprepare.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.local.conflict-reprepare.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.local.conflict-reprepare.test.js +56 -0
- package/dist/factory/run/__tests__/engine.local.conflict-reprepare.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.local.human-merged.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.local.human-merged.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.local.human-merged.test.js +48 -0
- package/dist/factory/run/__tests__/engine.local.human-merged.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.stall.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.stall.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.stall.test.js +137 -0
- package/dist/factory/run/__tests__/engine.stall.test.js.map +1 -0
- package/dist/factory/run/__tests__/fake-lanes.d.ts +6 -0
- package/dist/factory/run/__tests__/fake-lanes.d.ts.map +1 -1
- package/dist/factory/run/__tests__/fake-lanes.js +17 -1
- package/dist/factory/run/__tests__/fake-lanes.js.map +1 -1
- package/dist/factory/run/__tests__/human-merged.test.d.ts +2 -0
- package/dist/factory/run/__tests__/human-merged.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/human-merged.test.js +301 -0
- package/dist/factory/run/__tests__/human-merged.test.js.map +1 -0
- package/dist/factory/run/__tests__/lane.test.js +2 -0
- package/dist/factory/run/__tests__/lane.test.js.map +1 -1
- package/dist/factory/run/__tests__/merge-policy.test.js +16 -0
- package/dist/factory/run/__tests__/merge-policy.test.js.map +1 -1
- package/dist/factory/run/__tests__/prepare-gates.conflict-reprepare.test.d.ts +2 -0
- package/dist/factory/run/__tests__/prepare-gates.conflict-reprepare.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates.conflict-reprepare.test.js +137 -0
- package/dist/factory/run/__tests__/prepare-gates.conflict-reprepare.test.js.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates.crash.test.js +21 -0
- package/dist/factory/run/__tests__/prepare-gates.crash.test.js.map +1 -1
- package/dist/factory/run/__tests__/prepare-gates.gates-resume.test.js +11 -0
- package/dist/factory/run/__tests__/prepare-gates.gates-resume.test.js.map +1 -1
- package/dist/factory/run/__tests__/prepare-gates.test.js +39 -0
- package/dist/factory/run/__tests__/prepare-gates.test.js.map +1 -1
- package/dist/factory/run/__tests__/private-store.test.js +22 -1
- package/dist/factory/run/__tests__/private-store.test.js.map +1 -1
- package/dist/factory/run/__tests__/test-delta.test.d.ts +2 -0
- package/dist/factory/run/__tests__/test-delta.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/test-delta.test.js +239 -0
- package/dist/factory/run/__tests__/test-delta.test.js.map +1 -0
- package/dist/factory/run/__tests__/units.test.js +219 -2
- package/dist/factory/run/__tests__/units.test.js.map +1 -1
- package/dist/factory/run/__tests__/workspace-tree.test.js +16 -4
- package/dist/factory/run/__tests__/workspace-tree.test.js.map +1 -1
- package/dist/factory/run/auto-merge.d.ts +4 -0
- package/dist/factory/run/auto-merge.d.ts.map +1 -1
- package/dist/factory/run/auto-merge.js +3 -0
- package/dist/factory/run/auto-merge.js.map +1 -1
- package/dist/factory/run/budget.d.ts +6 -0
- package/dist/factory/run/budget.d.ts.map +1 -1
- package/dist/factory/run/budget.js +5 -0
- package/dist/factory/run/budget.js.map +1 -1
- package/dist/factory/run/claims.d.ts.map +1 -1
- package/dist/factory/run/claims.js +5 -3
- package/dist/factory/run/claims.js.map +1 -1
- package/dist/factory/run/container-gate.d.ts +14 -1
- package/dist/factory/run/container-gate.d.ts.map +1 -1
- package/dist/factory/run/container-gate.js +42 -4
- package/dist/factory/run/container-gate.js.map +1 -1
- package/dist/factory/run/engine.d.ts +46 -1
- package/dist/factory/run/engine.d.ts.map +1 -1
- package/dist/factory/run/engine.js +779 -68
- package/dist/factory/run/engine.js.map +1 -1
- package/dist/factory/run/human-merged.d.ts +105 -0
- package/dist/factory/run/human-merged.d.ts.map +1 -0
- package/dist/factory/run/human-merged.js +256 -0
- package/dist/factory/run/human-merged.js.map +1 -0
- package/dist/factory/run/lane.d.ts +2 -0
- package/dist/factory/run/lane.d.ts.map +1 -1
- package/dist/factory/run/lane.js +1 -0
- package/dist/factory/run/lane.js.map +1 -1
- package/dist/factory/run/merge-policy.d.ts +1 -2
- package/dist/factory/run/merge-policy.d.ts.map +1 -1
- package/dist/factory/run/merge-policy.js +5 -12
- package/dist/factory/run/merge-policy.js.map +1 -1
- package/dist/factory/run/prepare.d.ts +40 -1
- package/dist/factory/run/prepare.d.ts.map +1 -1
- package/dist/factory/run/prepare.js +240 -38
- package/dist/factory/run/prepare.js.map +1 -1
- package/dist/factory/run/private-run.d.ts +2 -1
- package/dist/factory/run/private-run.d.ts.map +1 -1
- package/dist/factory/run/private-run.js +5 -2
- package/dist/factory/run/private-run.js.map +1 -1
- package/dist/factory/run/prompts.d.ts +2 -2
- package/dist/factory/run/prompts.d.ts.map +1 -1
- package/dist/factory/run/prompts.js +7 -6
- package/dist/factory/run/prompts.js.map +1 -1
- package/dist/factory/run/sandbox-exec.d.ts +9 -1
- package/dist/factory/run/sandbox-exec.d.ts.map +1 -1
- package/dist/factory/run/sandbox-exec.js.map +1 -1
- package/dist/factory/run/state.d.ts +54 -1
- package/dist/factory/run/state.d.ts.map +1 -1
- package/dist/factory/run/state.js +23 -2
- package/dist/factory/run/state.js.map +1 -1
- package/dist/factory/run/test-delta.d.ts +123 -0
- package/dist/factory/run/test-delta.d.ts.map +1 -0
- package/dist/factory/run/test-delta.js +236 -0
- package/dist/factory/run/test-delta.js.map +1 -0
- package/dist/features/__tests__/checkpoint.test.js +118 -1
- package/dist/features/__tests__/checkpoint.test.js.map +1 -1
- package/dist/features/__tests__/jev-model-routing.test.js +20 -2
- package/dist/features/__tests__/jev-model-routing.test.js.map +1 -1
- package/dist/features/__tests__/jev-slop-warning.test.js +22 -2
- package/dist/features/__tests__/jev-slop-warning.test.js.map +1 -1
- package/dist/features/checkpoint/index.d.ts.map +1 -1
- package/dist/features/checkpoint/index.js +25 -8
- package/dist/features/checkpoint/index.js.map +1 -1
- package/dist/features/jev-slop-warning.d.ts +3 -2
- package/dist/features/jev-slop-warning.d.ts.map +1 -1
- package/dist/features/jev-slop-warning.js +5 -3
- package/dist/features/jev-slop-warning.js.map +1 -1
- package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/daemon.js +55 -9
- package/dist/features/rate-limit-wait/daemon.js.map +1 -1
- package/dist/features/rate-limit-wait/tmux-detector.d.ts +33 -0
- package/dist/features/rate-limit-wait/tmux-detector.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/tmux-detector.js +156 -0
- package/dist/features/rate-limit-wait/tmux-detector.js.map +1 -1
- package/dist/forge/__tests__/gh-argv-baseline.factory.test.js +4 -2
- package/dist/forge/__tests__/gh-argv-baseline.factory.test.js.map +1 -1
- package/dist/forge/ado/__tests__/adapter.test.js +7 -0
- package/dist/forge/ado/__tests__/adapter.test.js.map +1 -1
- package/dist/forge/ado/reviews.d.ts.map +1 -1
- package/dist/forge/ado/reviews.js +6 -0
- package/dist/forge/ado/reviews.js.map +1 -1
- package/dist/forge/github/__tests__/mergeability.test.d.ts +2 -0
- package/dist/forge/github/__tests__/mergeability.test.d.ts.map +1 -0
- package/dist/forge/github/__tests__/mergeability.test.js +34 -0
- package/dist/forge/github/__tests__/mergeability.test.js.map +1 -0
- package/dist/forge/github/reviews.d.ts +7 -1
- package/dist/forge/github/reviews.d.ts.map +1 -1
- package/dist/forge/github/reviews.js +13 -0
- package/dist/forge/github/reviews.js.map +1 -1
- package/dist/forge/local/__tests__/mirror.test.js +3 -1
- package/dist/forge/local/__tests__/mirror.test.js.map +1 -1
- package/dist/forge/local/__tests__/reviews.test.js +19 -0
- package/dist/forge/local/__tests__/reviews.test.js.map +1 -1
- package/dist/forge/local/mirror.d.ts +2 -0
- package/dist/forge/local/mirror.d.ts.map +1 -1
- package/dist/forge/local/mirror.js +2 -0
- package/dist/forge/local/mirror.js.map +1 -1
- package/dist/forge/local/reviews.d.ts.map +1 -1
- package/dist/forge/local/reviews.js +12 -1
- package/dist/forge/local/reviews.js.map +1 -1
- package/dist/forge/types.d.ts +13 -0
- package/dist/forge/types.d.ts.map +1 -1
- package/dist/graph/schema.d.ts +10 -10
- package/dist/hooks/__tests__/precompact-restore.test.js +38 -0
- package/dist/hooks/__tests__/precompact-restore.test.js.map +1 -1
- package/dist/hooks/__tests__/workflow-drift-guard-script.test.js +7 -2
- package/dist/hooks/__tests__/workflow-drift-guard-script.test.js.map +1 -1
- package/dist/hooks/auto-slash-command/executor.js +1 -1
- package/dist/hooks/auto-slash-command/executor.js.map +1 -1
- package/dist/hooks/code-simplifier/__tests__/jev-trigger-shadow.test.js +24 -2
- package/dist/hooks/code-simplifier/__tests__/jev-trigger-shadow.test.js.map +1 -1
- package/dist/hooks/code-simplifier/jev-shadow.d.ts.map +1 -1
- package/dist/hooks/code-simplifier/jev-shadow.js +6 -4
- package/dist/hooks/code-simplifier/jev-shadow.js.map +1 -1
- package/dist/hooks/jev/__tests__/client.test.js +20 -1
- package/dist/hooks/jev/__tests__/client.test.js.map +1 -1
- package/dist/hooks/jev/__tests__/log-context.test.d.ts +2 -0
- package/dist/hooks/jev/__tests__/log-context.test.d.ts.map +1 -0
- package/dist/hooks/jev/__tests__/log-context.test.js +97 -0
- package/dist/hooks/jev/__tests__/log-context.test.js.map +1 -0
- package/dist/hooks/jev/__tests__/log-rotation.test.d.ts +2 -0
- package/dist/hooks/jev/__tests__/log-rotation.test.d.ts.map +1 -0
- package/dist/hooks/jev/__tests__/log-rotation.test.js +148 -0
- package/dist/hooks/jev/__tests__/log-rotation.test.js.map +1 -0
- package/dist/hooks/jev/__tests__/resolver-request-count.test.d.ts +2 -0
- package/dist/hooks/jev/__tests__/resolver-request-count.test.d.ts.map +1 -0
- package/dist/hooks/jev/__tests__/resolver-request-count.test.js +117 -0
- package/dist/hooks/jev/__tests__/resolver-request-count.test.js.map +1 -0
- package/dist/hooks/jev/__tests__/resolver.test.js +63 -1
- package/dist/hooks/jev/__tests__/resolver.test.js.map +1 -1
- package/dist/hooks/jev/__tests__/shared-breaker.test.d.ts +2 -0
- package/dist/hooks/jev/__tests__/shared-breaker.test.d.ts.map +1 -0
- package/dist/hooks/jev/__tests__/shared-breaker.test.js +294 -0
- package/dist/hooks/jev/__tests__/shared-breaker.test.js.map +1 -0
- package/dist/hooks/jev/__tests__/state-omit-ids.test.d.ts +2 -0
- package/dist/hooks/jev/__tests__/state-omit-ids.test.d.ts.map +1 -0
- package/dist/hooks/jev/__tests__/state-omit-ids.test.js +88 -0
- package/dist/hooks/jev/__tests__/state-omit-ids.test.js.map +1 -0
- package/dist/hooks/jev/client.d.ts +34 -2
- package/dist/hooks/jev/client.d.ts.map +1 -1
- package/dist/hooks/jev/client.js +80 -5
- package/dist/hooks/jev/client.js.map +1 -1
- package/dist/hooks/jev/config.d.ts +78 -4
- package/dist/hooks/jev/config.d.ts.map +1 -1
- package/dist/hooks/jev/config.js +123 -9
- package/dist/hooks/jev/config.js.map +1 -1
- package/dist/hooks/jev/points.d.ts +2 -0
- package/dist/hooks/jev/points.d.ts.map +1 -1
- package/dist/hooks/jev/points.js +41 -10
- package/dist/hooks/jev/points.js.map +1 -1
- package/dist/hooks/jev/resolver.d.ts +27 -2
- package/dist/hooks/jev/resolver.d.ts.map +1 -1
- package/dist/hooks/jev/resolver.js +176 -20
- package/dist/hooks/jev/resolver.js.map +1 -1
- package/dist/hooks/jev/types.d.ts +21 -4
- package/dist/hooks/jev/types.d.ts.map +1 -1
- package/dist/hooks/keyword-detector/__tests__/autopilot-command-parity.test.d.ts +2 -0
- package/dist/hooks/keyword-detector/__tests__/autopilot-command-parity.test.d.ts.map +1 -0
- package/dist/hooks/keyword-detector/__tests__/autopilot-command-parity.test.js +209 -0
- package/dist/hooks/keyword-detector/__tests__/autopilot-command-parity.test.js.map +1 -0
- package/dist/hooks/keyword-detector/__tests__/index.test.js +6 -1
- package/dist/hooks/keyword-detector/__tests__/index.test.js.map +1 -1
- package/dist/hooks/keyword-detector/__tests__/jev-shadow.test.js +15 -0
- package/dist/hooks/keyword-detector/__tests__/jev-shadow.test.js.map +1 -1
- package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
- package/dist/hooks/keyword-detector/index.js +200 -2
- package/dist/hooks/keyword-detector/index.js.map +1 -1
- package/dist/hooks/keyword-detector/jev-shadow.js +3 -3
- package/dist/hooks/keyword-detector/jev-shadow.js.map +1 -1
- package/dist/hooks/learner/__tests__/jev-extraction-shadow.test.js +20 -1
- package/dist/hooks/learner/__tests__/jev-extraction-shadow.test.js.map +1 -1
- package/dist/hooks/learner/jev-shadow.js +3 -3
- package/dist/hooks/learner/jev-shadow.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/architect-approval-transcript.test.d.ts +2 -0
- package/dist/hooks/persistent-mode/__tests__/architect-approval-transcript.test.d.ts.map +1 -0
- package/dist/hooks/persistent-mode/__tests__/architect-approval-transcript.test.js +280 -0
- package/dist/hooks/persistent-mode/__tests__/architect-approval-transcript.test.js.map +1 -0
- package/dist/hooks/persistent-mode/__tests__/error-handling.test.js +2 -2
- package/dist/hooks/persistent-mode/__tests__/error-handling.test.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/jev-loop-continuation-shadow.test.js +47 -1
- package/dist/hooks/persistent-mode/__tests__/jev-loop-continuation-shadow.test.js.map +1 -1
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +136 -40
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/persistent-mode/jev-shadow.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/jev-shadow.js +11 -7
- package/dist/hooks/persistent-mode/jev-shadow.js.map +1 -1
- package/dist/hooks/pre-compact/index.d.ts.map +1 -1
- package/dist/hooks/pre-compact/index.js +8 -5
- package/dist/hooks/pre-compact/index.js.map +1 -1
- package/dist/hooks/project-memory/__tests__/rescan-concurrency.test.d.ts +11 -0
- package/dist/hooks/project-memory/__tests__/rescan-concurrency.test.d.ts.map +1 -0
- package/dist/hooks/project-memory/__tests__/rescan-concurrency.test.js +227 -0
- package/dist/hooks/project-memory/__tests__/rescan-concurrency.test.js.map +1 -0
- package/dist/hooks/project-memory/index.d.ts.map +1 -1
- package/dist/hooks/project-memory/index.js +26 -6
- package/dist/hooks/project-memory/index.js.map +1 -1
- package/dist/hooks/ralph/__tests__/closeout.test.d.ts +2 -0
- package/dist/hooks/ralph/__tests__/closeout.test.d.ts.map +1 -0
- package/dist/hooks/ralph/__tests__/closeout.test.js +82 -0
- package/dist/hooks/ralph/__tests__/closeout.test.js.map +1 -0
- package/dist/hooks/ralph/__tests__/feedback-baseline.test.js +572 -4
- package/dist/hooks/ralph/__tests__/feedback-baseline.test.js.map +1 -1
- package/dist/hooks/ralph/__tests__/jev-verdict-shadow.test.js +23 -2
- package/dist/hooks/ralph/__tests__/jev-verdict-shadow.test.js.map +1 -1
- package/dist/hooks/ralph/closeout.d.ts +34 -0
- package/dist/hooks/ralph/closeout.d.ts.map +1 -0
- package/dist/hooks/ralph/closeout.js +66 -0
- package/dist/hooks/ralph/closeout.js.map +1 -0
- package/dist/hooks/ralph/feedback-baseline.d.ts +60 -6
- package/dist/hooks/ralph/feedback-baseline.d.ts.map +1 -1
- package/dist/hooks/ralph/feedback-baseline.js +302 -15
- package/dist/hooks/ralph/feedback-baseline.js.map +1 -1
- package/dist/hooks/ralph/index.d.ts +1 -1
- package/dist/hooks/ralph/index.d.ts.map +1 -1
- package/dist/hooks/ralph/index.js +1 -1
- package/dist/hooks/ralph/index.js.map +1 -1
- package/dist/hooks/ralph/jev-shadow.js +3 -3
- package/dist/hooks/ralph/jev-shadow.js.map +1 -1
- package/dist/hooks/ralph/verifier.d.ts +5 -0
- package/dist/hooks/ralph/verifier.d.ts.map +1 -1
- package/dist/hooks/ralph/verifier.js +21 -10
- package/dist/hooks/ralph/verifier.js.map +1 -1
- package/dist/hooks/registry/__tests__/registry.test.js +6 -0
- package/dist/hooks/registry/__tests__/registry.test.js.map +1 -1
- package/dist/hooks/registry/registry.d.ts +6 -2
- package/dist/hooks/registry/registry.d.ts.map +1 -1
- package/dist/hooks/registry/registry.js +21 -6
- package/dist/hooks/registry/registry.js.map +1 -1
- package/dist/hooks/registry/types.d.ts +2 -0
- package/dist/hooks/registry/types.d.ts.map +1 -1
- package/dist/hooks/session-end/__tests__/callbacks.test.js +10 -1
- package/dist/hooks/session-end/__tests__/callbacks.test.js.map +1 -1
- package/dist/hooks/session-end/__tests__/worker.test.js +111 -2
- package/dist/hooks/session-end/__tests__/worker.test.js.map +1 -1
- package/dist/hooks/session-end/callbacks.js +1 -1
- package/dist/hooks/session-end/callbacks.js.map +1 -1
- package/dist/hooks/session-end/cleanup-manifest.d.ts +2 -0
- package/dist/hooks/session-end/cleanup-manifest.d.ts.map +1 -1
- package/dist/hooks/session-end/cleanup-manifest.js +8 -0
- package/dist/hooks/session-end/cleanup-manifest.js.map +1 -1
- package/dist/hooks/session-end/index.d.ts.map +1 -1
- package/dist/hooks/session-end/index.js +21 -3
- package/dist/hooks/session-end/index.js.map +1 -1
- package/dist/hooks/session-end/worker.d.ts.map +1 -1
- package/dist/hooks/session-end/worker.js +32 -2
- package/dist/hooks/session-end/worker.js.map +1 -1
- package/dist/hooks/setup/__tests__/windows-patch.test.js +89 -17
- package/dist/hooks/setup/__tests__/windows-patch.test.js.map +1 -1
- package/dist/hooks/setup/index.d.ts +10 -21
- package/dist/hooks/setup/index.d.ts.map +1 -1
- package/dist/hooks/setup/index.js +14 -48
- package/dist/hooks/setup/index.js.map +1 -1
- package/dist/hooks/task-size-detector/__tests__/jev-shadow.test.js +2 -1
- package/dist/hooks/task-size-detector/__tests__/jev-shadow.test.js.map +1 -1
- package/dist/hud/omc-state.d.ts +8 -0
- package/dist/hud/omc-state.d.ts.map +1 -1
- package/dist/hud/omc-state.js +23 -2
- package/dist/hud/omc-state.js.map +1 -1
- package/dist/installer/__tests__/claude-mcp-config-path.test.d.ts +2 -0
- package/dist/installer/__tests__/claude-mcp-config-path.test.d.ts.map +1 -0
- package/dist/installer/__tests__/claude-mcp-config-path.test.js +323 -0
- package/dist/installer/__tests__/claude-mcp-config-path.test.js.map +1 -0
- package/dist/installer/__tests__/mcp-registry.test.js +81 -3
- package/dist/installer/__tests__/mcp-registry.test.js.map +1 -1
- package/dist/installer/__tests__/standalone-hook-reconcile.test.js +36 -0
- package/dist/installer/__tests__/standalone-hook-reconcile.test.js.map +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +16 -4
- package/dist/installer/index.js.map +1 -1
- package/dist/installer/mcp-registry.d.ts +21 -1
- package/dist/installer/mcp-registry.d.ts.map +1 -1
- package/dist/installer/mcp-registry.js +101 -20
- package/dist/installer/mcp-registry.js.map +1 -1
- package/dist/lib/atomic-write.d.ts.map +1 -1
- package/dist/lib/atomic-write.js +61 -2
- package/dist/lib/atomic-write.js.map +1 -1
- package/dist/lib/one-line.d.ts +3 -0
- package/dist/lib/one-line.d.ts.map +1 -0
- package/dist/lib/one-line.js +5 -0
- package/dist/lib/one-line.js.map +1 -0
- package/dist/mcp/__tests__/team-cleanup.test.js +13 -0
- package/dist/mcp/__tests__/team-cleanup.test.js.map +1 -1
- package/dist/mcp/team-job-convergence.d.ts.map +1 -1
- package/dist/mcp/team-job-convergence.js +4 -1
- package/dist/mcp/team-job-convergence.js.map +1 -1
- package/dist/mcp/team-server.js +2 -2
- package/dist/mcp/team-server.js.map +1 -1
- package/dist/notifications/__tests__/approval-reply.test.js +8 -0
- package/dist/notifications/__tests__/approval-reply.test.js.map +1 -1
- package/dist/notifications/__tests__/reply-herdr.test.d.ts +8 -0
- package/dist/notifications/__tests__/reply-herdr.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/reply-herdr.test.js +125 -0
- package/dist/notifications/__tests__/reply-herdr.test.js.map +1 -0
- package/dist/notifications/__tests__/tmux.test.js +56 -1
- package/dist/notifications/__tests__/tmux.test.js.map +1 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +22 -7
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/reply-listener.d.ts +28 -12
- package/dist/notifications/reply-listener.d.ts.map +1 -1
- package/dist/notifications/reply-listener.js +326 -172
- package/dist/notifications/reply-listener.js.map +1 -1
- package/dist/notifications/tmux.d.ts +22 -2
- package/dist/notifications/tmux.d.ts.map +1 -1
- package/dist/notifications/tmux.js +57 -2
- package/dist/notifications/tmux.js.map +1 -1
- package/dist/release/__tests__/engine.test.js +74 -2
- package/dist/release/__tests__/engine.test.js.map +1 -1
- package/dist/release/engine.d.ts +9 -1
- package/dist/release/engine.d.ts.map +1 -1
- package/dist/release/engine.js +41 -4
- package/dist/release/engine.js.map +1 -1
- package/dist/shared/types.d.ts +5 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/ship/__tests__/check-name.test.d.ts +2 -0
- package/dist/ship/__tests__/check-name.test.d.ts.map +1 -0
- package/dist/ship/__tests__/check-name.test.js +17 -0
- package/dist/ship/__tests__/check-name.test.js.map +1 -0
- package/dist/ship/__tests__/gates-settle.test.js +13 -1
- package/dist/ship/__tests__/gates-settle.test.js.map +1 -1
- package/dist/ship/__tests__/prepare-build.test.d.ts +2 -0
- package/dist/ship/__tests__/prepare-build.test.d.ts.map +1 -0
- package/dist/ship/__tests__/prepare-build.test.js +287 -0
- package/dist/ship/__tests__/prepare-build.test.js.map +1 -0
- package/dist/ship/__tests__/prepare-merge.test.js +8 -1
- package/dist/ship/__tests__/prepare-merge.test.js.map +1 -1
- package/dist/ship/__tests__/safety-state.test.js +4 -0
- package/dist/ship/__tests__/safety-state.test.js.map +1 -1
- package/dist/ship/check-name.d.ts +12 -0
- package/dist/ship/check-name.d.ts.map +1 -0
- package/dist/ship/check-name.js +13 -0
- package/dist/ship/check-name.js.map +1 -0
- package/dist/ship/config.d.ts +13 -0
- package/dist/ship/config.d.ts.map +1 -1
- package/dist/ship/config.js +18 -1
- package/dist/ship/config.js.map +1 -1
- package/dist/ship/exec.d.ts +8 -0
- package/dist/ship/exec.d.ts.map +1 -1
- package/dist/ship/exec.js +33 -5
- package/dist/ship/exec.js.map +1 -1
- package/dist/ship/gates.d.ts.map +1 -1
- package/dist/ship/gates.js +3 -2
- package/dist/ship/gates.js.map +1 -1
- package/dist/ship/merge.d.ts +11 -2
- package/dist/ship/merge.d.ts.map +1 -1
- package/dist/ship/merge.js +55 -10
- package/dist/ship/merge.js.map +1 -1
- package/dist/ship/prepare.d.ts +16 -4
- package/dist/ship/prepare.d.ts.map +1 -1
- package/dist/ship/prepare.js +108 -2
- package/dist/ship/prepare.js.map +1 -1
- package/dist/team/__tests__/herdr-session-realherdr.test.d.ts +9 -0
- package/dist/team/__tests__/herdr-session-realherdr.test.d.ts.map +1 -0
- package/dist/team/__tests__/herdr-session-realherdr.test.js +140 -0
- package/dist/team/__tests__/herdr-session-realherdr.test.js.map +1 -0
- package/dist/team/__tests__/herdr-session.test.d.ts +9 -0
- package/dist/team/__tests__/herdr-session.test.d.ts.map +1 -0
- package/dist/team/__tests__/herdr-session.test.js +270 -0
- package/dist/team/__tests__/herdr-session.test.js.map +1 -0
- package/dist/team/__tests__/idle-nudge.test.js +17 -0
- package/dist/team/__tests__/idle-nudge.test.js.map +1 -1
- package/dist/team/__tests__/mailbox-notification-guard.test.js +403 -181
- package/dist/team/__tests__/mailbox-notification-guard.test.js.map +1 -1
- package/dist/team/__tests__/scaling-launch-config.test.js +12 -0
- package/dist/team/__tests__/scaling-launch-config.test.js.map +1 -1
- package/dist/team/__tests__/scaling.test.js +12 -0
- package/dist/team/__tests__/scaling.test.js.map +1 -1
- package/dist/team/__tests__/task-claim-renewal.test.d.ts +2 -0
- package/dist/team/__tests__/task-claim-renewal.test.d.ts.map +1 -0
- package/dist/team/__tests__/task-claim-renewal.test.js +421 -0
- package/dist/team/__tests__/task-claim-renewal.test.js.map +1 -0
- package/dist/team/__tests__/task-storage-integrity.test.js +34 -0
- package/dist/team/__tests__/task-storage-integrity.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.create-team-herdr.test.d.ts +11 -0
- package/dist/team/__tests__/tmux-session.create-team-herdr.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-session.create-team-herdr.test.js +99 -0
- package/dist/team/__tests__/tmux-session.create-team-herdr.test.js.map +1 -0
- package/dist/team/__tests__/tmux-session.herdr-arms.test.d.ts +10 -0
- package/dist/team/__tests__/tmux-session.herdr-arms.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-session.herdr-arms.test.js +226 -0
- package/dist/team/__tests__/tmux-session.herdr-arms.test.js.map +1 -0
- package/dist/team/__tests__/tmux-session.test.js +888 -721
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-bootstrap.test.js +19 -0
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- package/dist/team/api-interop.d.ts +1 -1
- package/dist/team/api-interop.d.ts.map +1 -1
- package/dist/team/api-interop.js +13 -1
- package/dist/team/api-interop.js.map +1 -1
- package/dist/team/herdr-session.d.ts +267 -0
- package/dist/team/herdr-session.d.ts.map +1 -0
- package/dist/team/herdr-session.js +508 -0
- package/dist/team/herdr-session.js.map +1 -0
- package/dist/team/idle-nudge.d.ts +1 -1
- package/dist/team/idle-nudge.d.ts.map +1 -1
- package/dist/team/idle-nudge.js +4 -4
- package/dist/team/idle-nudge.js.map +1 -1
- package/dist/team/mailbox-notification-guard.d.ts +24 -19
- package/dist/team/mailbox-notification-guard.d.ts.map +1 -1
- package/dist/team/mailbox-notification-guard.js +241 -148
- package/dist/team/mailbox-notification-guard.js.map +1 -1
- package/dist/team/model-contract.d.ts.map +1 -1
- package/dist/team/model-contract.js +1 -0
- package/dist/team/model-contract.js.map +1 -1
- package/dist/team/runtime-v2.d.ts +33 -33
- package/dist/team/runtime-v2.d.ts.map +1 -1
- package/dist/team/runtime-v2.js +2810 -1591
- package/dist/team/runtime-v2.js.map +1 -1
- package/dist/team/scaling.d.ts +3 -3
- package/dist/team/scaling.d.ts.map +1 -1
- package/dist/team/scaling.js +766 -402
- package/dist/team/scaling.js.map +1 -1
- package/dist/team/state/tasks.d.ts +15 -1
- package/dist/team/state/tasks.d.ts.map +1 -1
- package/dist/team/state/tasks.js +56 -2
- package/dist/team/state/tasks.js.map +1 -1
- package/dist/team/team-ops.d.ts +3 -2
- package/dist/team/team-ops.d.ts.map +1 -1
- package/dist/team/team-ops.js +32 -5
- package/dist/team/team-ops.js.map +1 -1
- package/dist/team/tmux-session.d.ts +66 -40
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +1733 -1096
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/types.d.ts +8 -0
- package/dist/team/types.d.ts.map +1 -1
- package/dist/team/types.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +3 -0
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/tools/lsp/__tests__/devcontainer.test.js +39 -5
- package/dist/tools/lsp/__tests__/devcontainer.test.js.map +1 -1
- package/dist/tools/lsp/devcontainer.d.ts.map +1 -1
- package/dist/tools/lsp/devcontainer.js +25 -8
- package/dist/tools/lsp/devcontainer.js.map +1 -1
- package/dist/utils/__tests__/windows-search.test.js +17 -3
- package/dist/utils/__tests__/windows-search.test.js.map +1 -1
- package/dist/utils/plugin-cache-validation.d.ts.map +1 -1
- package/dist/utils/plugin-cache-validation.js +27 -18
- package/dist/utils/plugin-cache-validation.js.map +1 -1
- package/dist/workflow/__tests__/projections.test.js +3 -3
- package/dist/workflow/__tests__/projections.test.js.map +1 -1
- package/dist/workflow/__tests__/registry.test.js +3 -3
- package/dist/workflow/__tests__/registry.test.js.map +1 -1
- package/dist/workflow/registry.d.ts.map +1 -1
- package/dist/workflow/registry.js +1 -0
- package/dist/workflow/registry.js.map +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CLAUDE.md +1 -1
- package/docs/CREDITS.md +1 -0
- package/docs/FEATURES.md +18 -0
- package/docs/FIELD-TESTING.md +10 -0
- package/docs/HOOKS.md +339 -36
- package/docs/REFERENCE.md +82 -17
- package/docs/TEAM-MULTIPLEXER.md +107 -0
- package/hooks/hooks.json +204 -66
- package/hooks/jev-compaction.mjs +2404 -0
- package/package.json +2 -2
- package/plugin.json +1 -1
- package/scripts/check-omc-playbooks.mjs +214 -124
- package/scripts/code-simplifier.mjs +26 -3
- package/scripts/copilot/build-hooks.mjs +24 -7
- package/scripts/generate-inventory-graph.mjs +77 -92
- package/scripts/jev-eval.mjs +123 -22
- package/scripts/jev-repair-transcript.mjs +331 -0
- package/scripts/jev-resolve.mjs +374 -22
- package/scripts/keyword-detector.mjs +427 -29
- package/scripts/lib/hook-command-normalizer.d.mts +33 -0
- package/scripts/lib/hook-command-normalizer.mjs +157 -60
- package/scripts/lib/jev-breaker.d.mts +73 -0
- package/scripts/lib/jev-breaker.mjs +830 -0
- package/scripts/lib/jev-compaction-state.mjs +320 -0
- package/scripts/lib/jev-delivery-guard.mjs +567 -0
- package/scripts/lib/jev-mask.mjs +36 -0
- package/scripts/lib/jev-shadow.mjs +363 -14
- package/scripts/lib/shell-checks.mjs +1121 -0
- package/scripts/lib/state-root.cjs +19 -8
- package/scripts/lib/state-root.mjs +19 -8
- package/scripts/persistent-mode.cjs +289 -1
- package/scripts/persistent-mode.mjs +540 -91
- package/scripts/plugin-setup.mjs +26 -30
- package/scripts/plugin-shipping-surface.mjs +4 -1
- package/scripts/post-tool-use-failure.mjs +18 -0
- package/scripts/post-tool-verifier.mjs +49 -3
- package/scripts/pre-tool-enforcer.mjs +658 -64
- package/scripts/run.cjs +4 -2
- package/scripts/session-start.mjs +54 -0
- package/skills/AGENTS.md +1 -0
- package/skills/ai-slop-cleaner/SKILL.md +14 -0
- package/skills/arena/SKILL.md +8 -1
- package/skills/babysit/SKILL.md +2 -1
- package/skills/create-formal-verification-skill/SKILL.md +6 -4
- package/skills/figure-it-out/SKILL.md +5 -0
- package/skills/fix-ci/SKILL.md +3 -1
- package/skills/how/references/explainer-prompt.md +7 -4
- package/skills/interrogate/SKILL.md +10 -6
- package/skills/ralph/SKILL.md +27 -2
- package/skills/ralph-experiment/SKILL.md +1 -1
- package/skills/sdd/SKILL.md +67 -0
- package/skills/sdd/phases/criteria.md +144 -0
- package/skills/sdd/phases/execute.md +226 -0
- package/skills/sdd/phases/review.md +216 -0
- package/skills/sdd/phases/rules.md +195 -0
- package/skills/sdd/phases/spec.md +75 -0
- package/skills/sdd/phases/tasks.md +162 -0
- package/skills/statechart/scripts/run.ts +6 -3
- package/skills/statechart/scripts/test/child-env.test.ts +53 -0
- package/templates/hooks/keyword-detector.mjs +172 -5
- package/templates/hooks/lib/state-root.mjs +19 -8
- package/templates/hooks/persistent-mode.mjs +296 -1
|
@@ -31,7 +31,7 @@ import { atomicWriteFileSync, getStateFileLockFailureMessage, recoverEmergencySt
|
|
|
31
31
|
import { readStdin } from './lib/stdin.mjs';
|
|
32
32
|
import { resolveOmcStateRoot, resolveSessionStatePathsForHook } from './lib/state-root.mjs';
|
|
33
33
|
import { parseWorkflowInvocation, selectWorkflowProfile, createWorkflowState, isValidWorkflowTrackingState, isWorkflowRuntimeSupported, resolveWorkflowStagePrompt, takeWorkflowTranscriptFailure } from './lib/workflow-profile-runtime.mjs';
|
|
34
|
-
import { isJevShadowOptedIn, recordJevShadow } from './lib/jev-shadow.mjs';
|
|
34
|
+
import { isJevShadowOptedIn, jevNoulOf, recordJevApplied, recordJevShadow, setJevHookContext, setJevSessionId } from './lib/jev-shadow.mjs';
|
|
35
35
|
import { initializeRalphStateForSkill, createPrdScaffold } from './lib/ralph-startup.mjs';
|
|
36
36
|
import { isCopilotHookHost } from './lib/hook-host.mjs';
|
|
37
37
|
import { skillSlash } from './lib/skill-slash.mjs';
|
|
@@ -211,6 +211,10 @@ function isExplicitRalplanSlashInvocation(prompt) {
|
|
|
211
211
|
return /^\s*\/(?:oh-my-copilot:)?ralplan(?:\s|$)/i.test(prompt);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
+
function isExplicitRalphSlashInvocation(prompt) {
|
|
215
|
+
return /^\s*\/(?:oh-my-copilot:)?ralph(?:\s|$|:)/i.test(prompt);
|
|
216
|
+
}
|
|
217
|
+
|
|
214
218
|
function isExplicitAskSlashInvocation(prompt) {
|
|
215
219
|
return /^\s*\/(?:oh-my-copilot:)?ask\s+(?:claude|codex|gemini|antigravity|agy|grok|cursor|muse)\b/i.test(prompt);
|
|
216
220
|
}
|
|
@@ -224,11 +228,19 @@ const ANTI_SLOP_EXPLICIT_PATTERN = /\b(ai[\s-]?slop|anti[\s-]?slop|deslop|de[\s-
|
|
|
224
228
|
const ANTI_SLOP_ACTION_PATTERN = /\b(clean(?:\s*up)?|cleanup|refactor|simplify|dedupe|de-duplicate|prune)\b/i;
|
|
225
229
|
const ANTI_SLOP_SMELL_PATTERN = /\b(slop|duplicate(?:d|s)?|duplication|dead\s+code|unused\s+code|over[\s-]?abstract(?:ion|ed)?|wrapper\s+layers?|boundary\s+violations?|needless\s+abstractions?|unnecessary\s+abstractions?|ai[\s-]?generated|generated\s+code|tech\s+debt)\b/i;
|
|
226
230
|
|
|
231
|
+
// Action + smell must share one sentence: a long review prompt can say
|
|
232
|
+
// "duplicate execution" in one place and "simplify the architecture" far later.
|
|
233
|
+
// Explicit "ai-slop"/"deslop" still goes through the informational-mention filter.
|
|
227
234
|
function isAntiSlopCleanupRequest(text) {
|
|
228
|
-
|
|
229
|
-
|
|
235
|
+
if (hasActionableKeyword(text, ANTI_SLOP_EXPLICIT_PATTERN)) return true;
|
|
236
|
+
return text.split(/[.!?;\n]+/).some((sentence) =>
|
|
237
|
+
ANTI_SLOP_ACTION_PATTERN.test(sentence) && ANTI_SLOP_SMELL_PATTERN.test(sentence));
|
|
230
238
|
}
|
|
231
239
|
|
|
240
|
+
// Skills that edit code; never auto-routed when the prompt forbids implementation.
|
|
241
|
+
const CODE_EDITING_SKILLS = new Set(['ai-slop-cleaner', 'autopilot', 'ralph', 'ultragoal', 'tdd']);
|
|
242
|
+
const NO_IMPLEMENT_PATTERN = /\b(?:do\s+not|don'?t|never|without)\s+(?:begin\s+|start\s+)?implement(?:ing|ation)?\b|\bno\s+(?:code\s+)?(?:changes|edits)\b|\bread[\s-]only\s+(?:review|audit|investigation)\b/i;
|
|
243
|
+
|
|
232
244
|
/** Review-outcome labels that appear together in seeded review instruction text. */
|
|
233
245
|
const REVIEW_SEED_OUTCOME_RES = [
|
|
234
246
|
/\bapprove\b/i,
|
|
@@ -1060,6 +1072,162 @@ function hasActionableRalphKeyword(text, pattern) {
|
|
|
1060
1072
|
return false;
|
|
1061
1073
|
}
|
|
1062
1074
|
|
|
1075
|
+
// The Latin autopilot aliases (autopilot, auto pilot, auto-pilot, full auto, fullsend) start the mode only as an
|
|
1076
|
+
// explicit command, like ralph and ralplan. Without this, a foreign sentence pasted into a prompt
|
|
1077
|
+
// ("Add tests (autopilot at cap; ...)") armed the mode, because the generic hasActionableKeyword treats every
|
|
1078
|
+
// mention outside quotes and help questions as a command. The grammar is deliberately small. A sentence is a
|
|
1079
|
+
// command when all of these hold:
|
|
1080
|
+
// 1. It is not a question: it does not end in "?" and does not start with a question or auxiliary word
|
|
1081
|
+
// (did, does, is, can, what, how, ...), except the request "can/could/would/will you ...".
|
|
1082
|
+
// 2. It is not negated (don't, can't, never, without, ...) and not a reference label line ("Docs: ...").
|
|
1083
|
+
// 3. The alias is the first word of the command, followed by a command verb from a closed list (also re-run,
|
|
1084
|
+
// double-check), by ":" plus such a verb, or by nothing; at the very start of the prompt any continuation that is
|
|
1085
|
+
// not a status line counts. Or an activation phrase stands directly before it: use, run, start, ...
|
|
1086
|
+
// (also after please, let's, I want) with an optional the/a/my/our/your, or turn/switch autopilot on.
|
|
1087
|
+
// "full auto" and "fullsend" are ordinary hardware phrases: only an activation phrase, a line-leading command verb
|
|
1088
|
+
// or ":" plus a verb count. A line with a non-ASCII letter is not English and keeps the generic check.
|
|
1089
|
+
// 4. Anything else that passes rules 1 and 2 and is not a status line keeps the generic activation-verb check (an
|
|
1090
|
+
// activation verb elsewhere in the clause: "Run in autopilot mode", "fix issue with autopilot in parser module").
|
|
1091
|
+
// Phrasings beyond this grammar (an open verb list, other languages) are out of scope.
|
|
1092
|
+
const AUTOPILOT_COMMAND_VERBS = 'fix|debug|investigate|resolve|handle|patch|address|implement|build|create|make|run|start|enable|activate|invoke|trigger|launch|plan|add|write|refactor|update|remove|migrate|finish|continue|do|go|test|review|check|verify|audit|analy[sz]e|inspect|deploy|install|configure|document|explain|find|search|generate|convert|ship|release|merge|prepare|design|draft|upgrade|rename|clean|optimi[sz]e|rewrite|summari[sz]e|compare|bring|ping|seed';
|
|
1093
|
+
const AUTOPILOT_HYPHENATED_VERB = '(?:re-(?:run|test|check|build|deploy|install|implement|review|verify|try|apply|start|launch|write|format|generate|create)|double-check|cross-check|un-install)';
|
|
1094
|
+
const AUTOPILOT_COMMAND_WORD = `(?:(?:${AUTOPILOT_COMMAND_VERBS})|${AUTOPILOT_HYPHENATED_VERB})`;
|
|
1095
|
+
const AUTOPILOT_STATUS_CONTINUATION = '\\s+(?:fails|was|were|is|are|has|had|looks|takes|keeps|hangs|hung|timed\\s+out|succeeds|passes|completes|finishes|works)(?![\\p{L}\\d])|\\s+(?:failed|crashed|errored|ok|okay|done|green|succeeded|passed|completed|finished|worked)(?![\\p{L}\\d])(?=[ \\t]*(?:[.,;:!?)]|\\r?\\n|$)|[ \\t]+(?:on|at|in|with|after|during|for|because|again|twice|and|but|so|before|when|while|since|until|due|once|yesterday|today|overnight|too|earlier|already)(?![\\p{L}\\d]))|\\s+(?:step|phase|exit|status|log|suite|mode|output|report|results?|summary)\\s+(?:\\d+|is|are|was|were|has|had|failed|fails|passed|passes|succeeded|looks|takes|keeps|crashed|errored|ok|okay|red|green)(?![\\p{L}\\d])';
|
|
1096
|
+
const AUTOPILOT_NOT_A_COMMAND_AFTER = `(?!${AUTOPILOT_STATUS_CONTINUATION})`;
|
|
1097
|
+
// Words that open a status line after a colon, not a command: articles, pronouns, auxiliaries, prepositions,
|
|
1098
|
+
// conjunctions, adverbs and status words.
|
|
1099
|
+
const AUTOPILOT_NON_COMMAND_WORDS = 'a|an|the|this|that|these|those|my|our|your|his|her|its|their|i|we|you|he|she|it|they|me|us|them|is|are|was|were|be|been|am|has|have|had|do|does|did|will|would|can|could|should|may|might|must|shall|not|no|nor|and|or|but|so|if|then|than|as|at|in|on|of|to|for|from|with|by|about|into|onto|over|under|after|before|during|until|while|when|where|which|who|whom|what|why|how|also|just|only|still|already|always|never|now|currently|ready|idle|off|none|nothing|active|inactive|enabled|disabled|available|unavailable|busy|pending|offline|online|yes|here|there|too|very|really|actually|maybe|perhaps|however|hung|hangs|stuck|ran|went|got|took|broke|broken|froze|frozen|became|seems|seemed|remains|lost|left|hit|began|saw|said|gave|found|kept|knew|thought|told|wrote|made|built|sent|spent|stood|held|fell|drew|drove|chose|came|won|threw|grew|met|paid|rose|sold|taught|understood|wore|sat|slept|spoke|swept|sank';
|
|
1100
|
+
// A plain alias that opens the prompt counts as a command unless it reads as a status line:
|
|
1101
|
+
// a command verb followed by a result ("autopilot run failed"), or a colon plus a status word or gerund.
|
|
1102
|
+
const AUTOPILOT_LEADING_STATUS = new RegExp(`^(?:[ \\t]*[:\\uFF1A][ \\t]*(?:(?:${AUTOPILOT_NON_COMMAND_WORDS})|(?!(?:bring|ping|seed|feed|embed|proceed|succeed|speed|need|shred|string|swing|sing|ring|fling|sling|sting|wring|spring|cling)(?![\\p{L}\\d]))\\p{L}*(?:ing|ed))(?![\\p{L}\\d])|[ \\t]+(?:${AUTOPILOT_COMMAND_VERBS})(?![\\p{L}\\d])(?:${AUTOPILOT_STATUS_CONTINUATION}))`, 'iu');
|
|
1103
|
+
const AUTOPILOT_COMMAND_AFTER = new RegExp(`^(?:[ \\t]*[,;!\\u2014\\u2013][ \\t]*|[ \\t]+-[ \\t]+|[ \\t]+)${AUTOPILOT_COMMAND_WORD}(?![\\p{L}\\d])${AUTOPILOT_NOT_A_COMMAND_AFTER}`, 'iu');
|
|
1104
|
+
const AUTOPILOT_COLON_VERB = new RegExp(`^[ \\t]*[:\\uFF1A][ \\t]*${AUTOPILOT_COMMAND_WORD}(?![\\p{L}\\d])${AUTOPILOT_NOT_A_COMMAND_AFTER}`, 'iu');
|
|
1105
|
+
const AUTOPILOT_ALONE_ON_LINE = /^[ \t]*[.!]?[ \t]*(?:\r?\n|$)/;
|
|
1106
|
+
const AUTOPILOT_NEGATION_BEFORE = /(?<![\p{L}\d])(?:(?:don|doesn|didn|shouldn|couldn|wouldn|can|won|mustn|isn|aren|shan|needn)['’]?t|cannot|do\s+not|never|not|without)\s+(?!(?:just|only|simply|merely|also|solely|stop|quit|forget|fail|hesitat\w*|delay\w*|wait\w*|paus\w*|ask\w*)(?![\p{L}\d]))(?:(?!(?:so|but|and|then|instead|because|now|mind)(?![\p{L}]))[\p{L}'’]+\s+){0,4}$/iu;
|
|
1107
|
+
// Quotes, emphasis marks and brackets right before the alias do not change what a negation governs.
|
|
1108
|
+
const AUTOPILOT_OPENING_DELIMITERS_AT_END = /["'“”‘’`*_([{<]+$/;
|
|
1109
|
+
// A sentence that starts with a question or auxiliary word asks; "can/could/would/will you ..." is a request.
|
|
1110
|
+
const AUTOPILOT_QUESTION_START = /^[ \t]*(?:[-*+>#]+[ \t]+|\d+[.)][ \t]+|\[[ xX]\][ \t]+|["'“‘([*_`])*(?!(?:can|could|would|will)\s+you(?![\p{L}\d]))(?!do\s+not(?![\p{L}\d]))(?:did|does|do|is|are|was|were|has|have|had|can|could|should|would|will|may|might|must|shall|what|why|how|when|where|who|which)(?![\p{L}\d])/iu;
|
|
1111
|
+
// The polite request "can/could/would/will you ..." keeps its question mark without being a question.
|
|
1112
|
+
const AUTOPILOT_REQUEST_START = /^[ \t]*(?:[-*+>#]+[ \t]+|\d+[.)][ \t]+|\[[ xX]\][ \t]+|["'“‘([*_`])*(?:please[ ,]+)?(?:can|could|would|will)\s+you(?![\p{L}\d])/iu;
|
|
1113
|
+
const AUTOPILOT_SENTENCE_END = /(?<=\S)[.!?][)\]}"'*_\u201D\u2019]*(?=\s|$)/g;
|
|
1114
|
+
// Markdown emphasis and heading marks around a label ("**Docs:**") do not hide it.
|
|
1115
|
+
const AUTOPILOT_MARKDOWN_MARKS = /[*_`#>]+/g;
|
|
1116
|
+
const AUTOPILOT_LIST_PREFIX = /^[\s\-+]*(?:\d+[.)]\s+)?/;
|
|
1117
|
+
const AUTOPILOT_REFERENCE_LABEL_LINE = /^[ \t]*(?:docs?|documentation|summary|status|logs?|release\s+notes|changelog|readme|examples?|output|result|results|description|title|commit|trigger|triggers|keywords?)[ \t]*:/i;
|
|
1118
|
+
// A heading line that is only the label ("## Documentation") also marks what follows as reference text.
|
|
1119
|
+
const AUTOPILOT_REFERENCE_HEADING = /^[ \t]*(?:docs?|documentation|summary|status|logs?|release\s+notes|changelog|readme|examples?|output|result|results|description|title|commit|trigger|triggers|keywords?)[ \t]*:?[ \t]*$/i;
|
|
1120
|
+
const AUTOPILOT_NOUN_USE_BEFORE = /(?<![\p{L}\d])(?:the|a|an|this|that|these|those|last|previous|our|my|its|your|their)\s+$/iu;
|
|
1121
|
+
const AUTOPILOT_COMMIT_LINE_BEFORE = /(?<![\p{L}\d])[0-9a-f]{7,40}\s+$/iu;
|
|
1122
|
+
// A line with any non-ASCII letter (Hangul, kana, Han, Thai, Cyrillic, Arabic, Polish diacritics, ...) is not
|
|
1123
|
+
// English prose, so the English command grammar cannot judge it and the generic check applies.
|
|
1124
|
+
const AUTOPILOT_NON_ENGLISH_LINE = /[\p{Script=Hangul}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}\p{Script=Thai}]|(?![A-Za-z])\p{L}/u;
|
|
1125
|
+
// Imperative "use / start" in the common ASCII-only languages (Spanish, French, German, Italian, Portuguese).
|
|
1126
|
+
const AUTOPILOT_FOREIGN_VERB_BEFORE = /(?<![\p{L}\d])(?:usa|usar|utiliza|utilizar|activa|activar|ejecuta|ejecutar|inicia|iniciar|lanza|utilise|utiliser|active|lance|lancer|nutze|nutzen|benutze|verwende|starte|aktiviere|attiva|avvia|ative|inicie|execute)\s+(?:(?:el|la|le|il|der|die|das)\s+)?$/iu;
|
|
1127
|
+
// The activation phrase directly before the alias: an activation verb, or please / let's / I want, optionally
|
|
1128
|
+
// followed by a verb, then an optional the/a/my/our/your.
|
|
1129
|
+
const AUTOPILOT_ACTIVATION_BEFORE = /(?<![\p{L}\d])(?:(?:please|let['’]?s|i\s+(?:want|need|would\s+like)(?:\s+to)?)\s+(?:(?:use|run|start|enable|activate|invoke|trigger|launch|engage|initiate|begin|kick\s+off|fire\s+up|spin\s+up|turn\s+on|switch\s+to|go(?:\s+with|\s+for)?|set)\s+)?|(?:use|run|start|enable|activate|invoke|trigger|launch|engage|initiate|begin|kick\s+off|fire\s+up|spin\s+up|turn\s+on|switch\s+to|go(?:\s+with|\s+for)?|set)\s+)(?:(?:the|a|my|our|your)\s+)?$/iu;
|
|
1130
|
+
// "do not stop using autopilot" asks to keep it running, so the negation does not cancel it.
|
|
1131
|
+
const AUTOPILOT_KEEP_USING_BEFORE = /(?<![\p{L}\d])(?:don['’]?t|do\s+not|never)\s+(?:ever\s+)?(?:stop|quit)\s+using\s+$/iu;
|
|
1132
|
+
// The separable form "turn autopilot on" / "switch autopilot on": "turn" or "switch" before the alias and "on" right after it.
|
|
1133
|
+
const AUTOPILOT_TURN_BEFORE = /(?<![\p{L}\d])(?:turn|switch)\s+(?:the\s+|a\s+|my\s+|our\s+|your\s+)?$/iu;
|
|
1134
|
+
const AUTOPILOT_ON_AFTER = /^[ \t]+on(?![\p{L}\d])/iu;
|
|
1135
|
+
const AUTOPILOT_NAMESPACE_PREFIX = /^\s*\/?(?:oh-my-(?:claudecode|codex|copilot)|omc|omg):\s*$/i;
|
|
1136
|
+
const AUTOPILOT_MAX_MATCHES = 1000;
|
|
1137
|
+
// The costly informational check sees this many characters on each side of a mention, so its cost does not grow
|
|
1138
|
+
// with the prompt length.
|
|
1139
|
+
const AUTOPILOT_CONTEXT_WINDOW = 2000;
|
|
1140
|
+
|
|
1141
|
+
function hasExplicitAutopilotInvocationContext(text, position, keywordLength, keywordText) {
|
|
1142
|
+
if (AUTOPILOT_NAMESPACE_PREFIX.test(text.slice(getLineBounds(text, position).start, position))) return true;
|
|
1143
|
+
// $, !, / and force: are explicit invocation syntax.
|
|
1144
|
+
const leadingPrefix = hasDirectInvocationPrefix(text, position);
|
|
1145
|
+
if (leadingPrefix && /[$/!:]/.test(text.slice(0, position))) return true;
|
|
1146
|
+
const { start: lineStart, end: lineEnd } = getLineBounds(text, position);
|
|
1147
|
+
// $, ! and slash directly before the alias on its line is explicit invocation syntax, also on a later line.
|
|
1148
|
+
if (/^[ \t]*[$/!]$/.test(text.slice(lineStart, position))) return true;
|
|
1149
|
+
const headStart = Math.max(lineStart, position - 80);
|
|
1150
|
+
const tail = text.slice(headStart, position);
|
|
1151
|
+
const afterKeyword = text.slice(position + keywordLength, position + keywordLength + 60);
|
|
1152
|
+
const lineHead = text.slice(lineStart, Math.min(position, lineStart + 80));
|
|
1153
|
+
// A question never starts the mode: it starts with a question word, or the sentence ends in "?".
|
|
1154
|
+
const sentenceHead = /(?:^|[.!?;]\s+)([^.!?;]*)$/.exec(text.slice(Math.max(lineStart, position - 200), position));
|
|
1155
|
+
// The clause after a label or an introductory phrase ("Question: Must I ...", "Out of curiosity, should I ...") is what gets classified.
|
|
1156
|
+
const clauseHead = (sentenceHead ? sentenceHead[1] : tail).replace(/^.*[,:\u2014\u2013]\s*/, '');
|
|
1157
|
+
if (AUTOPILOT_QUESTION_START.test(sentenceHead ? sentenceHead[1] : tail) || AUTOPILOT_QUESTION_START.test(clauseHead)) return false;
|
|
1158
|
+
AUTOPILOT_SENTENCE_END.lastIndex = position + keywordLength;
|
|
1159
|
+
const sentenceEnd = AUTOPILOT_SENTENCE_END.exec(text);
|
|
1160
|
+
// "?" inside a quotation or parenthesis that the sentence continues after ("... from "Ready?" to "Go.") is not terminal.
|
|
1161
|
+
// A bare "?" followed by a lowercase word ("rename Ready? to Go.") is a literal, not the end of a question.
|
|
1162
|
+
const afterEnd = sentenceEnd === null ? '' : text.slice(sentenceEnd.index + sentenceEnd[0].length, lineEnd);
|
|
1163
|
+
const nestedQuestion = sentenceEnd !== null
|
|
1164
|
+
&& ((sentenceEnd[0].length > 1 && !/^[ \t]*$/.test(afterEnd)) || /^[ \t]+\p{Ll}/u.test(afterEnd));
|
|
1165
|
+
if (sentenceEnd && sentenceEnd.index < lineEnd && sentenceEnd[0][0] === '?' && !nestedQuestion && !AUTOPILOT_REQUEST_START.test(clauseHead)) return false;
|
|
1166
|
+
if (AUTOPILOT_NEGATION_BEFORE.test(tail) || AUTOPILOT_NEGATION_BEFORE.test(tail.replace(AUTOPILOT_OPENING_DELIMITERS_AT_END, ''))) return false;
|
|
1167
|
+
if (AUTOPILOT_REFERENCE_LABEL_LINE.test(lineHead.replace(AUTOPILOT_MARKDOWN_MARKS, '').replace(AUTOPILOT_LIST_PREFIX, '').replace(/\s+$/, ''))) return false;
|
|
1168
|
+
if (AUTOPILOT_NON_ENGLISH_LINE.test(text.slice(lineStart, Math.min(lineEnd, lineStart + 400)))) return true;
|
|
1169
|
+
const isHardwareAlias = /^(?:full\s*auto|fullsend)$/i.test((keywordText || '').trim());
|
|
1170
|
+
if (leadingPrefix) {
|
|
1171
|
+
// A plain alias that opens the prompt counts unless it reads as a status line ("autopilot run failed").
|
|
1172
|
+
if (isHardwareAlias) {
|
|
1173
|
+
return AUTOPILOT_ALONE_ON_LINE.test(afterKeyword)
|
|
1174
|
+
|| AUTOPILOT_COLON_VERB.test(afterKeyword)
|
|
1175
|
+
|| AUTOPILOT_COMMAND_AFTER.test(afterKeyword)
|
|
1176
|
+
|| /^[ \t]+(?:this|these|that|it|my|our|everything)(?![\p{L}\d])/iu.test(afterKeyword);
|
|
1177
|
+
}
|
|
1178
|
+
return !AUTOPILOT_LEADING_STATUS.test(afterKeyword);
|
|
1179
|
+
}
|
|
1180
|
+
if (AUTOPILOT_TURN_BEFORE.test(tail) && AUTOPILOT_ON_AFTER.test(afterKeyword)) return true;
|
|
1181
|
+
if (AUTOPILOT_KEEP_USING_BEFORE.test(tail)) return true;
|
|
1182
|
+
const atLineStart = /^[ \t]*(?:[$/!][ \t]*)?$/.test(lineHead);
|
|
1183
|
+
if (atLineStart && (/[$/!]/.test(lineHead) || AUTOPILOT_ALONE_ON_LINE.test(afterKeyword))) return true;
|
|
1184
|
+
if (AUTOPILOT_ACTIVATION_BEFORE.test(tail) || AUTOPILOT_FOREIGN_VERB_BEFORE.test(tail)) return true;
|
|
1185
|
+
if (AUTOPILOT_COLON_VERB.test(afterKeyword)) return true;
|
|
1186
|
+
if (isHardwareAlias) {
|
|
1187
|
+
return (atLineStart && AUTOPILOT_COMMAND_AFTER.test(afterKeyword))
|
|
1188
|
+
|| hasConversationalInvocationNearKeyword(text, position, keywordLength, keywordText);
|
|
1189
|
+
}
|
|
1190
|
+
if (AUTOPILOT_NOUN_USE_BEFORE.test(tail) || AUTOPILOT_COMMIT_LINE_BEFORE.test(tail) || AUTOPILOT_LEADING_STATUS.test(afterKeyword)) return false;
|
|
1191
|
+
if (AUTOPILOT_COMMAND_AFTER.test(afterKeyword)) return true;
|
|
1192
|
+
if (hasConversationalInvocationNearKeyword(text, position, keywordLength, keywordText)) return true;
|
|
1193
|
+
return hasActivationIntentNearKeyword(text.slice(Math.max(lineStart, position - INFORMATIONAL_CONTEXT_WINDOW), Math.min(lineEnd, position + keywordLength + INFORMATIONAL_CONTEXT_WINDOW)), keywordText);
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
function hasActionableAutopilotKeyword(text, pattern) {
|
|
1197
|
+
const searchText = looksLikeSystemEcho(text)
|
|
1198
|
+
? stripSystemEchoes(text)
|
|
1199
|
+
: text;
|
|
1200
|
+
const flags = pattern.flags.includes('g') ? pattern.flags : `${pattern.flags}g`;
|
|
1201
|
+
const globalPattern = new RegExp(pattern.source, flags);
|
|
1202
|
+
let scanned = 0;
|
|
1203
|
+
for (const match of searchText.matchAll(globalPattern)) {
|
|
1204
|
+
if (match.index === undefined) continue;
|
|
1205
|
+
if (++scanned > AUTOPILOT_MAX_MATCHES) break;
|
|
1206
|
+
if (!hasExplicitAutopilotInvocationContext(searchText, match.index, match[0].length, match[0])) continue;
|
|
1207
|
+
// A namespaced or $ / ! / slash-prefixed command is unambiguous, whatever surrounds it.
|
|
1208
|
+
const linePrefix = searchText.slice(getLineBounds(searchText, match.index).start, match.index);
|
|
1209
|
+
if (AUTOPILOT_NAMESPACE_PREFIX.test(linePrefix) || /^[ \t]*[$/!]$/.test(linePrefix)) return true;
|
|
1210
|
+
// A command that opens its line with a command verb is judged on its own line, so a help question on an
|
|
1211
|
+
// earlier line does not veto it; every other mention is judged on a bounded window around it.
|
|
1212
|
+
const { start: lineStart, end: lineEnd } = getLineBounds(searchText, match.index);
|
|
1213
|
+
let previousLine = '';
|
|
1214
|
+
for (let end = lineStart - 1; end > 0 && !previousLine.trim();) {
|
|
1215
|
+
const start = searchText.lastIndexOf('\n', end - 1) + 1;
|
|
1216
|
+
previousLine = searchText.slice(start, end);
|
|
1217
|
+
end = start - 1;
|
|
1218
|
+
}
|
|
1219
|
+
const afterAlias = searchText.slice(match.index + match[0].length, match.index + match[0].length + 60);
|
|
1220
|
+
const ownLine = /^[ \t]*$/.test(linePrefix)
|
|
1221
|
+
&& !AUTOPILOT_REFERENCE_HEADING.test(previousLine.replace(AUTOPILOT_MARKDOWN_MARKS, '').replace(AUTOPILOT_LIST_PREFIX, '').replace(/\s+$/, ''))
|
|
1222
|
+
&& (AUTOPILOT_COMMAND_AFTER.test(afterAlias) || AUTOPILOT_COLON_VERB.test(afterAlias));
|
|
1223
|
+
const from = ownLine ? lineStart : Math.max(0, match.index - AUTOPILOT_CONTEXT_WINDOW);
|
|
1224
|
+
const to = ownLine ? lineEnd : match.index + match[0].length + AUTOPILOT_CONTEXT_WINDOW;
|
|
1225
|
+
if (isInformationalKeywordContext(searchText.slice(from, to), match.index - from, match[0].length, match[0])) continue;
|
|
1226
|
+
return true;
|
|
1227
|
+
}
|
|
1228
|
+
return false;
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1063
1231
|
function hasActionableRalplanKeyword(text, pattern) {
|
|
1064
1232
|
// Same echo guard as hasActionableKeyword.
|
|
1065
1233
|
const searchText = looksLikeSystemEcho(text)
|
|
@@ -1105,7 +1273,7 @@ function hasValidWorkflowDescriptor(state, sessionId) {
|
|
|
1105
1273
|
|
|
1106
1274
|
|
|
1107
1275
|
// Create state file for a mode
|
|
1108
|
-
async function activateState(directory, prompt, stateName, sessionId) {
|
|
1276
|
+
async function activateState(directory, prompt, stateName, sessionId, options = {}) {
|
|
1109
1277
|
const now = new Date().toISOString();
|
|
1110
1278
|
// Sanitize prompt BEFORE writing to state: prevents pasted system echoes
|
|
1111
1279
|
// and oversized blobs from being persisted and re-emitted by Stop hook.
|
|
@@ -1122,11 +1290,23 @@ async function activateState(directory, prompt, stateName, sessionId) {
|
|
|
1122
1290
|
prompt: safePrompt,
|
|
1123
1291
|
session_id: sessionId || undefined,
|
|
1124
1292
|
project_path: directory,
|
|
1125
|
-
awaiting_confirmation: true,
|
|
1126
|
-
awaiting_confirmation_set_at: now,
|
|
1127
1293
|
last_checked_at: now,
|
|
1128
1294
|
prd_mode: true, // CRITICAL: Enable PRD mode for ralph (issue #4363)
|
|
1129
1295
|
};
|
|
1296
|
+
// A typed `/oh-my-copilot:ralph` IS the confirmation. Arming the
|
|
1297
|
+
// awaiting_confirmation flag here would suppress the Stop hook for
|
|
1298
|
+
// AWAITING_CONFIRMATION_TTL_MS, and the only clearer
|
|
1299
|
+
// (confirmSkillModeStates on a Skill tool call) never runs on the slash
|
|
1300
|
+
// path — [CC] expands the skill body without a Skill tool use. A short
|
|
1301
|
+
// first turn therefore ended the loop silently. Prose activation
|
|
1302
|
+
// ("use ralph for this") keeps the flag so an accidental mention cannot
|
|
1303
|
+
// hijack the session.
|
|
1304
|
+
if (options.confirmedBySlash === true) {
|
|
1305
|
+
state.invocation_source = 'slash';
|
|
1306
|
+
} else {
|
|
1307
|
+
state.awaiting_confirmation = true;
|
|
1308
|
+
state.awaiting_confirmation_set_at = now;
|
|
1309
|
+
}
|
|
1130
1310
|
} else if (stateName === 'ralplan') {
|
|
1131
1311
|
// Ralplan needs active + session_id for stop-hook enforcement
|
|
1132
1312
|
state = {
|
|
@@ -1725,11 +1905,67 @@ function loadTaskSizeDetectionConfig(directory) {
|
|
|
1725
1905
|
result.suppressHeavyModesForSmallTasks =
|
|
1726
1906
|
taskSizeDetection.suppressHeavyModesForSmallTasks !== false;
|
|
1727
1907
|
}
|
|
1908
|
+
// Word limits of the classifier, read like the bridge reads them. Only
|
|
1909
|
+
// OMC_JEV_TASK_SIZE_NOTICE=1 passes them on (isTaskSizeNoticeEnabled).
|
|
1910
|
+
for (const limit of ['smallWordLimit', 'largeWordLimit']) {
|
|
1911
|
+
if (typeof taskSizeDetection[limit] === 'number' && Number.isFinite(taskSizeDetection[limit])) {
|
|
1912
|
+
result[limit] = taskSizeDetection[limit];
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1728
1915
|
}
|
|
1729
1916
|
|
|
1730
1917
|
return result;
|
|
1731
1918
|
}
|
|
1732
1919
|
|
|
1920
|
+
// OMC_JEV_TASK_SIZE_NOTICE=1 makes the task-size step of this script report
|
|
1921
|
+
// what it did. Suppressed heavy modes are announced with the reason, as the
|
|
1922
|
+
// TypeScript bridge (src/hooks/bridge.ts) does; heavy modes kept although Jev
|
|
1923
|
+
// rated the task small are named with the reason (script only: the bridge
|
|
1924
|
+
// drops them on any small answer). The classifier agreement check also uses
|
|
1925
|
+
// the taskSizeDetection word limits, which the bridge reads too. Off by
|
|
1926
|
+
// default: suppression is then silent and the check uses the default limits.
|
|
1927
|
+
function isTaskSizeNoticeEnabled(env = process.env) {
|
|
1928
|
+
return ['1', 'true'].includes(String(env.OMC_JEV_TASK_SIZE_NOTICE ?? '').trim().toLowerCase());
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
// OMC_JEV_TASK_SIZE_PREFIX_WINS=1: a size prefix of the classifier (quick:,
|
|
1932
|
+
// simple:, tiny:, minor:, small:, just:, only:, which classifyTaskSize always
|
|
1933
|
+
// rates small) makes the active task-size point drop heavy modes whatever size
|
|
1934
|
+
// Jev answers. Off by default: Jev must answer small with confidence >= 0.9.
|
|
1935
|
+
function isTaskSizePrefixWinsEnabled(env = process.env) {
|
|
1936
|
+
return ['1', 'true'].includes(String(env.OMC_JEV_TASK_SIZE_PREFIX_WINS ?? '').trim().toLowerCase());
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
// OMC_JEV_TASK_SIZE_SLASH_ANYWHERE=1: a heavy mode typed as a slash command
|
|
1940
|
+
// anywhere in the prompt, also as /omc:<mode>, is never dropped by the active
|
|
1941
|
+
// task-size point. Off by default: only a slash command at the start of the
|
|
1942
|
+
// prompt keeps its mode.
|
|
1943
|
+
function isTaskSizeSlashAnywhereEnabled(env = process.env) {
|
|
1944
|
+
return ['1', 'true'].includes(String(env.OMC_JEV_TASK_SIZE_SLASH_ANYWHERE ?? '').trim().toLowerCase());
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
// OMC_JEV_INTENT_APPLY=1 lets the active `intent` answer decide whether the
|
|
1948
|
+
// intent skill is invoked. Off by default: the heuristic (slash pattern) decides
|
|
1949
|
+
// and the answer is only logged.
|
|
1950
|
+
function isIntentApplyEnabled(env = process.env) {
|
|
1951
|
+
return ['1', 'true'].includes(String(env.OMC_JEV_INTENT_APPLY ?? '').trim().toLowerCase());
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
// A slash command starts the prompt or follows whitespace, an opening parenthesis or
|
|
1955
|
+
// a quote, and ends at whitespace, the end, a closing parenthesis or square bracket, a quote, or
|
|
1956
|
+
// punctuation; a dot only when no word character or letter follows (/ralph.md and /ralph.é are files).
|
|
1957
|
+
const HEAVY_MODE_SLASH_ANYWHERE_PATTERN = /(?:^|[\s("'])\/(?:oh-my-copilot:|omc:)?(ralph|autopilot|team|ralplan)(?=\s|$|[?!,;:)\]"']|\.(?![\w\p{L}]))/gui;
|
|
1958
|
+
|
|
1959
|
+
/**
|
|
1960
|
+
* Heavy modes typed as a slash command anywhere in the sanitized prompt
|
|
1961
|
+
* (/ralph, /oh-my-copilot:ralph, /omc:ralph). Pass cleanPrompt: code
|
|
1962
|
+
* blocks, quotes and pasted payloads are already removed there, while bare
|
|
1963
|
+
* slash commands are kept by sanitizeForKeywordDetection.
|
|
1964
|
+
*/
|
|
1965
|
+
function heavyModeSlashInvocations(prompt) {
|
|
1966
|
+
return new Set([...String(prompt ?? '').matchAll(HEAVY_MODE_SLASH_ANYWHERE_PATTERN)].map((match) => match[1].toLowerCase()));
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1733
1969
|
/**
|
|
1734
1970
|
* Create a compact skill invocation guide without inlining SKILL.md bodies.
|
|
1735
1971
|
* Full skill text remains available by path, avoiding UserPromptSubmit token blowups.
|
|
@@ -1884,6 +2120,41 @@ const TASK_SIZE_QUESTIONS = {
|
|
|
1884
2120
|
|
|
1885
2121
|
const INTENT_SLASH_PATTERN = /^\s*\/(?:oh-my-copilot:|omc:|omg:)?intent(?=\s|$|[?!.,;:])/i;
|
|
1886
2122
|
|
|
2123
|
+
/**
|
|
2124
|
+
* Jev delivery guard (scripts/lib/jev-delivery-guard.mjs). Loaded only when OMC_JEV_GUARD is 1 or
|
|
2125
|
+
* true. A message for the user joins the single JSON this hook prints, as systemMessage
|
|
2126
|
+
* (suppressOutput would hide it, so it is dropped from that output); it counts as shown only once
|
|
2127
|
+
* printed. Any failure leaves the hook unchanged.
|
|
2128
|
+
*/
|
|
2129
|
+
async function attachJevDeliveryGuardMessage(data, omcRoot) {
|
|
2130
|
+
if (!['1', 'true'].includes(String(process.env.OMC_JEV_GUARD ?? '').trim().toLowerCase())) return;
|
|
2131
|
+
try {
|
|
2132
|
+
const { promptCheck } = await import('./lib/jev-delivery-guard.mjs');
|
|
2133
|
+
let pending = promptCheck(data, { logDir: process.env.OMC_JEV_LOG_DIR || join(omcRoot, 'state', 'jev') });
|
|
2134
|
+
if (!pending) return;
|
|
2135
|
+
const print = console.log.bind(console);
|
|
2136
|
+
console.log = (...args) => {
|
|
2137
|
+
let shown = null;
|
|
2138
|
+
if (pending && typeof args[0] === 'string') {
|
|
2139
|
+
try {
|
|
2140
|
+
const output = JSON.parse(args[0]);
|
|
2141
|
+
if (output && typeof output === 'object' && !Array.isArray(output)) {
|
|
2142
|
+
output.systemMessage = [output.systemMessage, pending.text].filter(Boolean).join('\n');
|
|
2143
|
+
delete output.suppressOutput;
|
|
2144
|
+
args[0] = JSON.stringify(output);
|
|
2145
|
+
shown = pending;
|
|
2146
|
+
pending = null;
|
|
2147
|
+
}
|
|
2148
|
+
} catch { /* not JSON: printed as it is */ }
|
|
2149
|
+
}
|
|
2150
|
+
print(...args);
|
|
2151
|
+
if (shown) {
|
|
2152
|
+
try { shown.confirm(); } catch { /* the guard never breaks the hook */ }
|
|
2153
|
+
}
|
|
2154
|
+
};
|
|
2155
|
+
} catch { /* the guard never breaks the hook */ }
|
|
2156
|
+
}
|
|
2157
|
+
|
|
1887
2158
|
// Main
|
|
1888
2159
|
async function main() {
|
|
1889
2160
|
// Skip guard: check OMC_SKIP_HOOKS env var (see issue #838)
|
|
@@ -1913,9 +2184,12 @@ async function main() {
|
|
|
1913
2184
|
|
|
1914
2185
|
let data = {};
|
|
1915
2186
|
try { data = JSON.parse(input); } catch {}
|
|
2187
|
+
await setJevHookContext(data);
|
|
1916
2188
|
const directory = data.cwd || data.directory || process.cwd();
|
|
1917
2189
|
const sessionId = data.session_id || data.sessionId || '';
|
|
2190
|
+
setJevSessionId(sessionId, data.agent_id || data.agentId);
|
|
1918
2191
|
const omcRoot = await resolveOmcStateRoot(directory);
|
|
2192
|
+
await attachJevDeliveryGuardMessage(data, omcRoot);
|
|
1919
2193
|
|
|
1920
2194
|
const prompt = extractPrompt(input);
|
|
1921
2195
|
if (!prompt) {
|
|
@@ -2023,7 +2297,8 @@ async function main() {
|
|
|
2023
2297
|
// research prose (e.g. "autonomous driving", "autonomous agent") to be a
|
|
2024
2298
|
// reliable trigger. Aligns with src/hooks/keyword-detector/index.ts and
|
|
2025
2299
|
// templates/hooks/keyword-detector.mjs, which already exclude it.
|
|
2026
|
-
if (
|
|
2300
|
+
if (hasActionableAutopilotKeyword(cleanPrompt, /\b(autopilot|auto pilot|auto-pilot|full auto|fullsend)\b/i) ||
|
|
2301
|
+
hasActionableKeyword(cleanPrompt, /(오토파일럿)|(オートパイロット)/i) ||
|
|
2027
2302
|
hasActionableKeyword(cleanPrompt, /\b(build|create|make)\s+me\s+(an?\s+)?(app|feature|project|tool|plugin|website|api|server|cli|script|system|service|dashboard|bot|extension)\b/i) ||
|
|
2028
2303
|
hasActionableKeyword(cleanPrompt, /\bi\s+want\s+a\s+(app|feature|project|tool|plugin|website|api|server|cli|script|system|service|dashboard|bot|extension)\b/i) ||
|
|
2029
2304
|
hasActionableKeyword(cleanPrompt, /\bi\s+want\s+an\s+(app|feature|project|tool|plugin|website|api|server|cli|script|system|service|dashboard|bot|extension)\b/i) ||
|
|
@@ -2115,7 +2390,11 @@ async function main() {
|
|
|
2115
2390
|
}
|
|
2116
2391
|
|
|
2117
2392
|
// Resolve conflicts
|
|
2393
|
+
let pendingSkillTriggerApplied;
|
|
2118
2394
|
let resolved = resolveConflicts(uniqueMatches);
|
|
2395
|
+
if (NO_IMPLEMENT_PATTERN.test(cleanPrompt) && !/^\s*\//.test(prompt)) {
|
|
2396
|
+
resolved = resolved.filter((m) => !CODE_EDITING_SKILLS.has(m.name));
|
|
2397
|
+
}
|
|
2119
2398
|
|
|
2120
2399
|
const permissionMode = data.permission_mode;
|
|
2121
2400
|
if (isJevShadowOptedIn('skill-trigger', process.env, permissionMode)) {
|
|
@@ -2131,6 +2410,7 @@ async function main() {
|
|
|
2131
2410
|
// In active mode, use Jev's skill choice
|
|
2132
2411
|
if (jevResult && jevResult.mode === 'active' && jevResult.answer) {
|
|
2133
2412
|
const jevChoice = jevResult.answer.choice?.toLowerCase();
|
|
2413
|
+
const keywordsBefore = resolved.map((match) => match.name);
|
|
2134
2414
|
if (jevChoice && jevChoice !== 'none') {
|
|
2135
2415
|
// Override with Jev's chosen skill
|
|
2136
2416
|
const matchedKeyword = uniqueMatches.find((m) => m.name === jevChoice);
|
|
@@ -2139,6 +2419,11 @@ async function main() {
|
|
|
2139
2419
|
// Jev says no trigger
|
|
2140
2420
|
resolved = [];
|
|
2141
2421
|
}
|
|
2422
|
+
const keywordsAfter = resolved.map((match) => match.name);
|
|
2423
|
+
if (keywordsAfter.join(',') !== keywordsBefore.join(',')) {
|
|
2424
|
+
// Staged: the follow-up routing below can end the hook without using the keywords.
|
|
2425
|
+
pendingSkillTriggerApplied = { keywords: { from: keywordsBefore, to: keywordsAfter }, choice: jevChoice };
|
|
2426
|
+
}
|
|
2142
2427
|
}
|
|
2143
2428
|
}
|
|
2144
2429
|
if (isJevShadowOptedIn('intent', process.env, permissionMode)) {
|
|
@@ -2149,20 +2434,52 @@ async function main() {
|
|
|
2149
2434
|
heuristic: INTENT_SLASH_PATTERN.test(cleanPrompt),
|
|
2150
2435
|
permissionMode,
|
|
2151
2436
|
});
|
|
2152
|
-
// In active mode, intent Jev answer
|
|
2153
|
-
//
|
|
2437
|
+
// In active mode with opt-in, intent Jev answer decides whether to invoke the skill
|
|
2438
|
+
// The keywordDetector.disabled opt-out still wins, and intent is added at most once.
|
|
2439
|
+
if (
|
|
2440
|
+
isIntentApplyEnabled() &&
|
|
2441
|
+
!disabledKeywords.has('intent') &&
|
|
2442
|
+
!resolved.some((match) => match.name === 'intent')
|
|
2443
|
+
) {
|
|
2444
|
+
const noul = jevNoulOf(jevResult, 'intent');
|
|
2445
|
+
if (noul !== undefined && noul >= 0.5) {
|
|
2446
|
+
resolved.push({ name: 'intent', args: '' });
|
|
2447
|
+
}
|
|
2448
|
+
}
|
|
2154
2449
|
}
|
|
2155
2450
|
|
|
2156
2451
|
// Apply task-size filtering: suppress heavy keywords for small tasks (issue #4805)
|
|
2157
2452
|
// Heavy keywords are: ralph, autopilot, team, ralplan
|
|
2158
2453
|
const HEAVY_KEYWORDS = new Set(['ralph', 'autopilot', 'team', 'ralplan']);
|
|
2159
|
-
|
|
2454
|
+
const taskSizeDetectionConfig = loadTaskSizeDetectionConfig(directory);
|
|
2455
|
+
const taskSizeNotice = isTaskSizeNoticeEnabled();
|
|
2456
|
+
const taskSizeNotes = [];
|
|
2457
|
+
|
|
2458
|
+
// Slash invocations the task-size filter never suppresses. Start-of-prompt slash
|
|
2459
|
+
// commands always count; a slash command anywhere is added below only when an
|
|
2460
|
+
// active task-size decision applies.
|
|
2461
|
+
const slashInvokedByAnyRule = new Set();
|
|
2462
|
+
if (isExplicitRalplanSlashInvocation(cleanPrompt)) slashInvokedByAnyRule.add('ralplan');
|
|
2463
|
+
if (isExplicitRalphSlashInvocation(cleanPrompt)) slashInvokedByAnyRule.add('ralph');
|
|
2464
|
+
if (/^\s*\/(?:oh-my-copilot:)?autopilot(?:\s|$|:)/i.test(cleanPrompt)) slashInvokedByAnyRule.add('autopilot');
|
|
2465
|
+
if (/^\s*\/(?:oh-my-copilot:)?team(?:\s|$|:)/i.test(cleanPrompt)) slashInvokedByAnyRule.add('team');
|
|
2466
|
+
|
|
2160
2467
|
let jevTaskSizeResult = null;
|
|
2161
2468
|
let heuristicTaskSize = null;
|
|
2469
|
+
let gateTaskSize = null;
|
|
2162
2470
|
if (isJevShadowOptedIn('task-size', process.env, permissionMode)) {
|
|
2163
2471
|
try {
|
|
2164
2472
|
const { classifyTaskSize } = await import('../dist/hooks/task-size-detector/index.js');
|
|
2165
2473
|
heuristicTaskSize = classifyTaskSize(cleanPrompt);
|
|
2474
|
+
// With OMC_JEV_TASK_SIZE_NOTICE=1 the classifier agreement check below uses the
|
|
2475
|
+
// taskSizeDetection word limits, which the bridge reads too. The logged heuristic
|
|
2476
|
+
// keeps the default limits, as the bridge's twin (recordTaskSizeShadow) does.
|
|
2477
|
+
if (taskSizeNotice) {
|
|
2478
|
+
gateTaskSize = classifyTaskSize(cleanPrompt, {
|
|
2479
|
+
smallWordLimit: taskSizeDetectionConfig.smallWordLimit ?? 50,
|
|
2480
|
+
largeWordLimit: taskSizeDetectionConfig.largeWordLimit ?? 200,
|
|
2481
|
+
});
|
|
2482
|
+
}
|
|
2166
2483
|
const jevResult = recordJevShadow({
|
|
2167
2484
|
point: 'task-size',
|
|
2168
2485
|
state: { prompt: cleanPrompt, source: 'user-prompt-submit' },
|
|
@@ -2186,44 +2503,112 @@ async function main() {
|
|
|
2186
2503
|
}
|
|
2187
2504
|
}
|
|
2188
2505
|
|
|
2506
|
+
// OMC_JEV_TASK_SIZE_SLASH_ANYWHERE=1 is a task-size rule: a slash command
|
|
2507
|
+
// anywhere counts as the user's confirmation only when an active task-size
|
|
2508
|
+
// decision applies. In shadow mode or with Jev off, a mid-prompt slash
|
|
2509
|
+
// command keeps the awaiting-confirmation window, as without the variable.
|
|
2510
|
+
const slashAnywhereKeywords = jevTaskSizeResult && isTaskSizeSlashAnywhereEnabled()
|
|
2511
|
+
? heavyModeSlashInvocations(cleanPrompt)
|
|
2512
|
+
: new Set();
|
|
2513
|
+
for (const name of slashAnywhereKeywords) slashInvokedByAnyRule.add(name);
|
|
2514
|
+
|
|
2189
2515
|
// Filter heavy keywords if task-size is 'small' (issue #4805)
|
|
2190
2516
|
// Only suppress when enabled, confidence >= 0.9, and the heuristic says
|
|
2191
|
-
// small or the prompt has an explicit size prefix
|
|
2192
|
-
//
|
|
2193
|
-
|
|
2517
|
+
// small or the prompt has an explicit size prefix (with
|
|
2518
|
+
// OMC_JEV_TASK_SIZE_PREFIX_WINS=1 a classifier prefix alone is enough).
|
|
2519
|
+
// - NEVER suppress slash-invoked modes (with OMC_JEV_TASK_SIZE_SLASH_ANYWHERE=1
|
|
2520
|
+
// a slash command anywhere in the prompt counts)
|
|
2521
|
+
// With OMC_JEV_TASK_SIZE_NOTICE=1 the outcome is reported in additionalContext:
|
|
2522
|
+
// the suppressed modes with the reason, and the heavy modes kept although Jev
|
|
2523
|
+
// rated the task small, each with the reason it was kept.
|
|
2524
|
+
const suppressedHeavy = [];
|
|
2525
|
+
const keptHeavy = [];
|
|
2526
|
+
let suppressionReason = '';
|
|
2527
|
+
const jevSizeConfidence = jevTaskSizeResult?.confidence === undefined || jevTaskSizeResult?.confidence === null
|
|
2528
|
+
? null
|
|
2529
|
+
: String(jevTaskSizeResult.confidence);
|
|
2530
|
+
const sizeTwin = gateTaskSize ?? heuristicTaskSize;
|
|
2531
|
+
const heavyInResolved = () => resolved.filter((keyword) => HEAVY_KEYWORDS.has(keyword.name)).map((keyword) => keyword.name);
|
|
2532
|
+
// OMC_JEV_TASK_SIZE_PREFIX_WINS=1: a classifier size prefix drops heavy modes
|
|
2533
|
+
// whatever size Jev answers.
|
|
2534
|
+
const classifierSizePrefix = isTaskSizePrefixWinsEnabled() && heuristicTaskSize?.hasEscapeHatch === true;
|
|
2535
|
+
const taskSizeSlashAnywhere = isTaskSizeSlashAnywhereEnabled();
|
|
2194
2536
|
if (
|
|
2195
2537
|
taskSizeDetectionConfig.enabled &&
|
|
2196
2538
|
taskSizeDetectionConfig.suppressHeavyModesForSmallTasks &&
|
|
2197
2539
|
jevTaskSizeResult &&
|
|
2198
|
-
jevTaskSizeResult.size === 'small' &&
|
|
2199
|
-
|
|
2540
|
+
((jevTaskSizeResult.size === 'small' &&
|
|
2541
|
+
jevTaskSizeResult.confidence >= 0.9) ||
|
|
2542
|
+
classifierSizePrefix)
|
|
2200
2543
|
) {
|
|
2201
2544
|
// Check if prompt has a size prefix like "quick:"
|
|
2202
2545
|
const hasSizePrefix = /^\s*(?:quick|small|tiny|minimal|fast|speed|urgent):/i.test(cleanPrompt);
|
|
2203
2546
|
// Check if heuristic classifyTaskSize also says small
|
|
2204
|
-
const heuristicSaysSmall =
|
|
2547
|
+
const heuristicSaysSmall = sizeTwin && (sizeTwin.size === 'small' || sizeTwin.size === 'quick');
|
|
2205
2548
|
|
|
2206
2549
|
// Only suppress if BOTH conditions are true: confidence >= 0.9 AND (heuristic small OR size prefix)
|
|
2550
|
+
// (a classifier prefix under OMC_JEV_TASK_SIZE_PREFIX_WINS makes the heuristic say small)
|
|
2207
2551
|
const shouldSuppressForSize = (heuristicSaysSmall || hasSizePrefix);
|
|
2208
2552
|
|
|
2209
2553
|
if (shouldSuppressForSize) {
|
|
2210
|
-
// Check for slash invocations: never suppress slash-invoked modes
|
|
2211
|
-
const slashInvokedKeywords = new Set();
|
|
2212
|
-
if (isExplicitRalplanSlashInvocation(cleanPrompt)) slashInvokedKeywords.add('ralplan');
|
|
2213
|
-
// Check for other slash modes: /oh-my-copilot:ralph, /oh-my-copilot:autopilot, etc.
|
|
2214
|
-
if (/^\s*\/(?:oh-my-copilot:)?ralph(?:\s|$|:)/i.test(cleanPrompt)) slashInvokedKeywords.add('ralph');
|
|
2215
|
-
if (/^\s*\/(?:oh-my-copilot:)?autopilot(?:\s|$|:)/i.test(cleanPrompt)) slashInvokedKeywords.add('autopilot');
|
|
2216
|
-
if (/^\s*\/(?:oh-my-copilot:)?team(?:\s|$|:)/i.test(cleanPrompt)) slashInvokedKeywords.add('team');
|
|
2217
|
-
|
|
2218
2554
|
// Filter out non-slash-invoked heavy keywords
|
|
2555
|
+
const keywordsBeforeSize = resolved.map((match) => match.name);
|
|
2556
|
+
// (slash invocations already collected in slashInvokedByAnyRule)
|
|
2219
2557
|
resolved = resolved.filter(keyword => {
|
|
2220
2558
|
if (!HEAVY_KEYWORDS.has(keyword.name)) {
|
|
2221
2559
|
return true; // Keep non-heavy keywords
|
|
2222
2560
|
}
|
|
2223
2561
|
// For heavy keywords, suppress only if NOT slash-invoked
|
|
2224
|
-
|
|
2562
|
+
if (slashInvokedByAnyRule.has(keyword.name)) {
|
|
2563
|
+
keptHeavy.push(`${keyword.name} (slash command)`);
|
|
2564
|
+
return true;
|
|
2565
|
+
}
|
|
2566
|
+
suppressedHeavy.push(keyword.name);
|
|
2567
|
+
return false;
|
|
2225
2568
|
});
|
|
2569
|
+
const prefixWon = classifierSizePrefix &&
|
|
2570
|
+
!(jevTaskSizeResult.size === 'small' && jevTaskSizeResult.confidence >= 0.9);
|
|
2571
|
+
// A size prefix that won over another answer (OMC_JEV_TASK_SIZE_PREFIX_WINS) dropped the
|
|
2572
|
+
// modes, not Jev's small answer: no applied line.
|
|
2573
|
+
const suppressedForSize = keywordsBeforeSize.filter((name) => !resolved.some((match) => match.name === name));
|
|
2574
|
+
if (suppressedForSize.length > 0 && !prefixWon) {
|
|
2575
|
+
recordJevApplied('task-size', { size: jevTaskSizeResult.size, confidence: jevTaskSizeResult.confidence, suppressed: suppressedForSize });
|
|
2576
|
+
}
|
|
2577
|
+
suppressionReason = prefixWon
|
|
2578
|
+
? `size prefix "${heuristicTaskSize.escapePrefixUsed}" (Jev active-mode classification: ${jevTaskSizeResult.size}, confidence ${jevSizeConfidence ?? 'not given'})`
|
|
2579
|
+
: heuristicSaysSmall
|
|
2580
|
+
? `Jev active-mode classification: small (confidence ${jevSizeConfidence}); heuristic: ${sizeTwin.reason}`
|
|
2581
|
+
: `Jev active-mode classification: small (confidence ${jevSizeConfidence}); size prefix in the prompt`;
|
|
2582
|
+
} else if (taskSizeNotice) {
|
|
2583
|
+
const heuristicSize = sizeTwin?.size ?? 'unknown';
|
|
2584
|
+
keptHeavy.push(...heavyInResolved().map((name) => `${name} (the heuristic rates the task ${heuristicSize} and the prompt has no size prefix)`));
|
|
2226
2585
|
}
|
|
2586
|
+
} else if (
|
|
2587
|
+
taskSizeNotice &&
|
|
2588
|
+
taskSizeDetectionConfig.enabled &&
|
|
2589
|
+
taskSizeDetectionConfig.suppressHeavyModesForSmallTasks &&
|
|
2590
|
+
jevTaskSizeResult &&
|
|
2591
|
+
jevTaskSizeResult.size === 'small'
|
|
2592
|
+
) {
|
|
2593
|
+
const keptReason = jevSizeConfidence === null ? 'Jev gave no confidence' : `Jev confidence ${jevSizeConfidence} is below 0.9`;
|
|
2594
|
+
keptHeavy.push(...heavyInResolved().map((name) => `${name} (${keptReason})`));
|
|
2595
|
+
}
|
|
2596
|
+
if (taskSizeNotice && suppressedHeavy.length > 0) {
|
|
2597
|
+
taskSizeNotes.push(
|
|
2598
|
+
`[TASK-SIZE: SMALL] Heavy orchestration mode(s) suppressed: ${suppressedHeavy.join(', ')}.\n` +
|
|
2599
|
+
`Reason: ${suppressionReason}\n` +
|
|
2600
|
+
'Running directly without heavy agent stacking. ' +
|
|
2601
|
+
(taskSizeSlashAnywhere
|
|
2602
|
+
? `To run a suppressed mode anyway, type its slash command anywhere in the prompt (for example \`/oh-my-copilot:${suppressedHeavy[0]}\`); ` +
|
|
2603
|
+
'slash commands are never suppressed.\n\n'
|
|
2604
|
+
: `To run a suppressed mode anyway, start the prompt with its slash command (for example \`/oh-my-copilot:${suppressedHeavy[0]}\`); ` +
|
|
2605
|
+
'slash commands at the start of the prompt are never suppressed.\n\n'),
|
|
2606
|
+
);
|
|
2607
|
+
}
|
|
2608
|
+
if (taskSizeNotice && keptHeavy.length > 0) {
|
|
2609
|
+
// A mode can also be kept by a slash command after a size prefix won over a larger Jev answer.
|
|
2610
|
+
const keptHeader = jevTaskSizeResult?.size === 'small' ? 'kept although Jev rated this task small' : 'kept';
|
|
2611
|
+
taskSizeNotes.push(`[TASK-SIZE] Heavy mode(s) ${keptHeader}: ${keptHeavy.join(', ')}.\n\n`);
|
|
2227
2612
|
}
|
|
2228
2613
|
|
|
2229
2614
|
// Import flow tracer once (best-effort)
|
|
@@ -2294,12 +2679,17 @@ async function main() {
|
|
|
2294
2679
|
}
|
|
2295
2680
|
}
|
|
2296
2681
|
|
|
2682
|
+
// The keywords reach the rest of the hook: now the skill-trigger application counts.
|
|
2683
|
+
if (pendingSkillTriggerApplied) recordJevApplied('skill-trigger', pendingSkillTriggerApplied);
|
|
2684
|
+
|
|
2297
2685
|
// Nothing left to act on (no keywords, or all opted out) - pass through.
|
|
2298
2686
|
// Keep this after approved follow-up handling so short post-ralplan
|
|
2299
2687
|
// prompts like "team" can launch the approved execution path even
|
|
2300
2688
|
// though generic team keyword auto-detection is disabled.
|
|
2301
2689
|
if (resolved.length === 0) {
|
|
2302
|
-
console.log(JSON.stringify(
|
|
2690
|
+
console.log(JSON.stringify(taskSizeNotes.length > 0
|
|
2691
|
+
? createHookOutput(taskSizeNotes.join(''))
|
|
2692
|
+
: { continue: true, suppressOutput: true }));
|
|
2303
2693
|
return;
|
|
2304
2694
|
}
|
|
2305
2695
|
|
|
@@ -2325,14 +2715,22 @@ async function main() {
|
|
|
2325
2715
|
? []
|
|
2326
2716
|
: resolved.filter(m => ['ralph', 'ultragoal', 'autopilot', 'ralplan'].includes(m.name));
|
|
2327
2717
|
for (const mode of stateModes) {
|
|
2328
|
-
const activationError = await activateState(directory, prompt, mode.name, sessionId
|
|
2718
|
+
const activationError = await activateState(directory, prompt, mode.name, sessionId, {
|
|
2719
|
+
// Only a slash command at the start of the raw prompt counts as the user's
|
|
2720
|
+
// confirmation; the sanitized prompt is not used, which would make a command
|
|
2721
|
+
// that follows inline code look leading. A slash command anywhere counts too when
|
|
2722
|
+
// OMC_JEV_TASK_SIZE_SLASH_ANYWHERE=1 and an active task-size decision applies.
|
|
2723
|
+
// A mention inside prose keeps the awaiting-confirmation window.
|
|
2724
|
+
confirmedBySlash: mode.name === 'ralph' &&
|
|
2725
|
+
(isExplicitRalphSlashInvocation(prompt) || slashAnywhereKeywords.has('ralph')),
|
|
2726
|
+
});
|
|
2329
2727
|
if (activationError === 'workflow_descriptor_integrity_failed') {
|
|
2330
2728
|
console.log(JSON.stringify(createHookOutput('workflow_descriptor_integrity_failed')));
|
|
2331
2729
|
return;
|
|
2332
2730
|
}
|
|
2333
2731
|
if (activationError) {
|
|
2334
2732
|
console.log(JSON.stringify(createHookOutput(
|
|
2335
|
-
`[OMC STATE ERROR] ${activationError} No ${mode.name} state was activated.`,
|
|
2733
|
+
taskSizeNotes.join('') + `[OMC STATE ERROR] ${activationError} No ${mode.name} state was activated.`,
|
|
2336
2734
|
)));
|
|
2337
2735
|
return;
|
|
2338
2736
|
}
|
|
@@ -2345,7 +2743,7 @@ async function main() {
|
|
|
2345
2743
|
}
|
|
2346
2744
|
}
|
|
2347
2745
|
|
|
2348
|
-
const additionalContextParts = [];
|
|
2746
|
+
const additionalContextParts = [...taskSizeNotes];
|
|
2349
2747
|
for (const [keywordName, message] of MODE_MESSAGE_KEYWORDS) {
|
|
2350
2748
|
const index = resolved.findIndex(m => m.name === keywordName);
|
|
2351
2749
|
if (index !== -1) {
|