@liangjie559567/ultrapower 5.5.13 → 5.5.14
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 -2
- package/LICENSE +21 -21
- package/bridge/gyoshu_bridge.py +846 -846
- package/dist/hooks/bridge-normalize.d.ts.map +1 -1
- package/dist/hooks/bridge-normalize.js +2 -0
- package/dist/hooks/bridge-normalize.js.map +1 -1
- package/dist/lib/path-validator.d.ts.map +1 -1
- package/dist/lib/path-validator.js +7 -0
- package/dist/lib/path-validator.js.map +1 -1
- package/docs/CLAUDE.md +1 -1
- package/docs/guides/v5.5.13-new-features.md +234 -0
- package/hooks/run-hook.cmd +0 -0
- package/hooks/session-start +0 -0
- package/package.json +1 -1
- package/scripts/persistent-mode.cjs +605 -605
- package/skills/systematic-debugging/find-polluter.sh +0 -0
- package/skills/writing-skills/graphviz-conventions.dot +171 -171
- package/skills/writing-skills/render-graphs.js +0 -0
- package/templates/axiom/scripts/Check-Memory.ps1 +68 -68
- package/templates/axiom/scripts/Poll-Memory.ps1 +36 -36
- package/templates/axiom/scripts/Watch-Memory.ps1 +149 -149
- package/templates/axiom/scripts/agent-runner.ps1 +101 -101
- package/templates/axiom/scripts/start-reviews.ps1 +19 -19
- package/dist/__tests__/agent-registry.test.d.ts +0 -2
- package/dist/__tests__/agent-registry.test.d.ts.map +0 -1
- package/dist/__tests__/agent-registry.test.js +0 -45
- package/dist/__tests__/agent-registry.test.js.map +0 -1
- package/dist/__tests__/analytics/backfill-dedup.test.d.ts +0 -2
- package/dist/__tests__/analytics/backfill-dedup.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/backfill-dedup.test.js +0 -179
- package/dist/__tests__/analytics/backfill-dedup.test.js.map +0 -1
- package/dist/__tests__/analytics/backfill-engine.test.d.ts +0 -2
- package/dist/__tests__/analytics/backfill-engine.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/backfill-engine.test.js +0 -362
- package/dist/__tests__/analytics/backfill-engine.test.js.map +0 -1
- package/dist/__tests__/analytics/output-estimator.test.d.ts +0 -2
- package/dist/__tests__/analytics/output-estimator.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/output-estimator.test.js +0 -124
- package/dist/__tests__/analytics/output-estimator.test.js.map +0 -1
- package/dist/__tests__/analytics/token-extractor.test.d.ts +0 -2
- package/dist/__tests__/analytics/token-extractor.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/token-extractor.test.js +0 -165
- package/dist/__tests__/analytics/token-extractor.test.js.map +0 -1
- package/dist/__tests__/analytics/token-tracker.test.d.ts +0 -2
- package/dist/__tests__/analytics/token-tracker.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/token-tracker.test.js +0 -189
- package/dist/__tests__/analytics/token-tracker.test.js.map +0 -1
- package/dist/__tests__/analytics/tokscale-adapter.test.d.ts +0 -2
- package/dist/__tests__/analytics/tokscale-adapter.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/tokscale-adapter.test.js +0 -79
- package/dist/__tests__/analytics/tokscale-adapter.test.js.map +0 -1
- package/dist/__tests__/analytics/transcript-parser.test.d.ts +0 -2
- package/dist/__tests__/analytics/transcript-parser.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/transcript-parser.test.js +0 -289
- package/dist/__tests__/analytics/transcript-parser.test.js.map +0 -1
- package/dist/__tests__/analytics/transcript-scanner.test.d.ts +0 -2
- package/dist/__tests__/analytics/transcript-scanner.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/transcript-scanner.test.js +0 -443
- package/dist/__tests__/analytics/transcript-scanner.test.js.map +0 -1
- package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts +0 -2
- package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/transcript-token-extractor.test.js +0 -177
- package/dist/__tests__/analytics/transcript-token-extractor.test.js.map +0 -1
- package/dist/__tests__/auto-update.test.d.ts +0 -2
- package/dist/__tests__/auto-update.test.d.ts.map +0 -1
- package/dist/__tests__/auto-update.test.js +0 -451
- package/dist/__tests__/auto-update.test.js.map +0 -1
- package/dist/__tests__/auto-upgrade-prompt.test.d.ts +0 -2
- package/dist/__tests__/auto-upgrade-prompt.test.d.ts.map +0 -1
- package/dist/__tests__/auto-upgrade-prompt.test.js +0 -81
- package/dist/__tests__/auto-upgrade-prompt.test.js.map +0 -1
- package/dist/__tests__/bash-history.test.d.ts +0 -5
- package/dist/__tests__/bash-history.test.d.ts.map +0 -1
- package/dist/__tests__/bash-history.test.js +0 -78
- package/dist/__tests__/bash-history.test.js.map +0 -1
- package/dist/__tests__/cli-config-stop-callback.test.d.ts +0 -2
- package/dist/__tests__/cli-config-stop-callback.test.d.ts.map +0 -1
- package/dist/__tests__/cli-config-stop-callback.test.js +0 -102
- package/dist/__tests__/cli-config-stop-callback.test.js.map +0 -1
- package/dist/__tests__/cli-notify-profile.test.d.ts +0 -2
- package/dist/__tests__/cli-notify-profile.test.d.ts.map +0 -1
- package/dist/__tests__/cli-notify-profile.test.js +0 -213
- package/dist/__tests__/cli-notify-profile.test.js.map +0 -1
- package/dist/__tests__/codex-backoff.test.d.ts +0 -2
- package/dist/__tests__/codex-backoff.test.d.ts.map +0 -1
- package/dist/__tests__/codex-backoff.test.js +0 -143
- package/dist/__tests__/codex-backoff.test.js.map +0 -1
- package/dist/__tests__/compatibility-security.test.d.ts +0 -13
- package/dist/__tests__/compatibility-security.test.d.ts.map +0 -1
- package/dist/__tests__/compatibility-security.test.js +0 -403
- package/dist/__tests__/compatibility-security.test.js.map +0 -1
- package/dist/__tests__/compatibility.test.d.ts +0 -7
- package/dist/__tests__/compatibility.test.d.ts.map +0 -1
- package/dist/__tests__/compatibility.test.js +0 -484
- package/dist/__tests__/compatibility.test.js.map +0 -1
- package/dist/__tests__/consensus-execution-handoff.test.d.ts +0 -14
- package/dist/__tests__/consensus-execution-handoff.test.d.ts.map +0 -1
- package/dist/__tests__/consensus-execution-handoff.test.js +0 -178
- package/dist/__tests__/consensus-execution-handoff.test.js.map +0 -1
- package/dist/__tests__/delegation-enforcement-levels.test.d.ts +0 -9
- package/dist/__tests__/delegation-enforcement-levels.test.d.ts.map +0 -1
- package/dist/__tests__/delegation-enforcement-levels.test.js +0 -583
- package/dist/__tests__/delegation-enforcement-levels.test.js.map +0 -1
- package/dist/__tests__/delegation-enforcer-integration.test.d.ts +0 -6
- package/dist/__tests__/delegation-enforcer-integration.test.d.ts.map +0 -1
- package/dist/__tests__/delegation-enforcer-integration.test.js +0 -136
- package/dist/__tests__/delegation-enforcer-integration.test.js.map +0 -1
- package/dist/__tests__/delegation-enforcer.test.d.ts +0 -5
- package/dist/__tests__/delegation-enforcer.test.d.ts.map +0 -1
- package/dist/__tests__/delegation-enforcer.test.js +0 -209
- package/dist/__tests__/delegation-enforcer.test.js.map +0 -1
- package/dist/__tests__/directory-context-injector.test.d.ts +0 -2
- package/dist/__tests__/directory-context-injector.test.d.ts.map +0 -1
- package/dist/__tests__/directory-context-injector.test.js +0 -186
- package/dist/__tests__/directory-context-injector.test.js.map +0 -1
- package/dist/__tests__/disable-tools.test.d.ts +0 -8
- package/dist/__tests__/disable-tools.test.d.ts.map +0 -1
- package/dist/__tests__/disable-tools.test.js +0 -182
- package/dist/__tests__/disable-tools.test.js.map +0 -1
- package/dist/__tests__/doctor-conflicts.test.d.ts +0 -8
- package/dist/__tests__/doctor-conflicts.test.d.ts.map +0 -1
- package/dist/__tests__/doctor-conflicts.test.js +0 -230
- package/dist/__tests__/doctor-conflicts.test.js.map +0 -1
- package/dist/__tests__/example.test.d.ts +0 -2
- package/dist/__tests__/example.test.d.ts.map +0 -1
- package/dist/__tests__/example.test.js +0 -20
- package/dist/__tests__/example.test.js.map +0 -1
- package/dist/__tests__/helpers/prompt-test-helpers.d.ts +0 -4
- package/dist/__tests__/helpers/prompt-test-helpers.d.ts.map +0 -1
- package/dist/__tests__/helpers/prompt-test-helpers.js +0 -9
- package/dist/__tests__/helpers/prompt-test-helpers.js.map +0 -1
- package/dist/__tests__/hooks/learner/bridge.test.d.ts +0 -11
- package/dist/__tests__/hooks/learner/bridge.test.d.ts.map +0 -1
- package/dist/__tests__/hooks/learner/bridge.test.js +0 -217
- package/dist/__tests__/hooks/learner/bridge.test.js.map +0 -1
- package/dist/__tests__/hooks/learner/parser.test.d.ts +0 -5
- package/dist/__tests__/hooks/learner/parser.test.d.ts.map +0 -1
- package/dist/__tests__/hooks/learner/parser.test.js +0 -219
- package/dist/__tests__/hooks/learner/parser.test.js.map +0 -1
- package/dist/__tests__/hooks-json-paths.test.d.ts +0 -9
- package/dist/__tests__/hooks-json-paths.test.d.ts.map +0 -1
- package/dist/__tests__/hooks-json-paths.test.js +0 -91
- package/dist/__tests__/hooks-json-paths.test.js.map +0 -1
- package/dist/__tests__/hooks.test.d.ts +0 -2
- package/dist/__tests__/hooks.test.d.ts.map +0 -1
- package/dist/__tests__/hooks.test.js +0 -1273
- package/dist/__tests__/hooks.test.js.map +0 -1
- package/dist/__tests__/hud/analytics-display.test.d.ts +0 -2
- package/dist/__tests__/hud/analytics-display.test.d.ts.map +0 -1
- package/dist/__tests__/hud/analytics-display.test.js +0 -236
- package/dist/__tests__/hud/analytics-display.test.js.map +0 -1
- package/dist/__tests__/hud/call-counts.test.d.ts +0 -2
- package/dist/__tests__/hud/call-counts.test.d.ts.map +0 -1
- package/dist/__tests__/hud/call-counts.test.js +0 -90
- package/dist/__tests__/hud/call-counts.test.js.map +0 -1
- package/dist/__tests__/hud/context-warning.test.d.ts +0 -2
- package/dist/__tests__/hud/context-warning.test.d.ts.map +0 -1
- package/dist/__tests__/hud/context-warning.test.js +0 -84
- package/dist/__tests__/hud/context-warning.test.js.map +0 -1
- package/dist/__tests__/hud/cwd.test.d.ts +0 -2
- package/dist/__tests__/hud/cwd.test.d.ts.map +0 -1
- package/dist/__tests__/hud/cwd.test.js +0 -62
- package/dist/__tests__/hud/cwd.test.js.map +0 -1
- package/dist/__tests__/hud/defaults.test.d.ts +0 -2
- package/dist/__tests__/hud/defaults.test.d.ts.map +0 -1
- package/dist/__tests__/hud/defaults.test.js +0 -55
- package/dist/__tests__/hud/defaults.test.js.map +0 -1
- package/dist/__tests__/hud/git.test.d.ts +0 -2
- package/dist/__tests__/hud/git.test.d.ts.map +0 -1
- package/dist/__tests__/hud/git.test.js +0 -110
- package/dist/__tests__/hud/git.test.js.map +0 -1
- package/dist/__tests__/hud/model.test.d.ts +0 -2
- package/dist/__tests__/hud/model.test.d.ts.map +0 -1
- package/dist/__tests__/hud/model.test.js +0 -63
- package/dist/__tests__/hud/model.test.js.map +0 -1
- package/dist/__tests__/hud/render.test.d.ts +0 -2
- package/dist/__tests__/hud/render.test.d.ts.map +0 -1
- package/dist/__tests__/hud/render.test.js +0 -141
- package/dist/__tests__/hud/render.test.js.map +0 -1
- package/dist/__tests__/hud/sanitize.test.d.ts +0 -10
- package/dist/__tests__/hud/sanitize.test.d.ts.map +0 -1
- package/dist/__tests__/hud/sanitize.test.js +0 -138
- package/dist/__tests__/hud/sanitize.test.js.map +0 -1
- package/dist/__tests__/hud/skills.test.d.ts +0 -2
- package/dist/__tests__/hud/skills.test.d.ts.map +0 -1
- package/dist/__tests__/hud/skills.test.js +0 -143
- package/dist/__tests__/hud/skills.test.js.map +0 -1
- package/dist/__tests__/hud/state.test.d.ts +0 -2
- package/dist/__tests__/hud/state.test.d.ts.map +0 -1
- package/dist/__tests__/hud/state.test.js +0 -162
- package/dist/__tests__/hud/state.test.js.map +0 -1
- package/dist/__tests__/hud/thinking.test.d.ts +0 -2
- package/dist/__tests__/hud/thinking.test.d.ts.map +0 -1
- package/dist/__tests__/hud/thinking.test.js +0 -32
- package/dist/__tests__/hud/thinking.test.js.map +0 -1
- package/dist/__tests__/hud/top-agents.test.d.ts +0 -8
- package/dist/__tests__/hud/top-agents.test.d.ts.map +0 -1
- package/dist/__tests__/hud/top-agents.test.js +0 -158
- package/dist/__tests__/hud/top-agents.test.js.map +0 -1
- package/dist/__tests__/hud/usage-api.test.d.ts +0 -5
- package/dist/__tests__/hud/usage-api.test.d.ts.map +0 -1
- package/dist/__tests__/hud/usage-api.test.js +0 -201
- package/dist/__tests__/hud/usage-api.test.js.map +0 -1
- package/dist/__tests__/hud/version-display.test.d.ts +0 -2
- package/dist/__tests__/hud/version-display.test.d.ts.map +0 -1
- package/dist/__tests__/hud/version-display.test.js +0 -107
- package/dist/__tests__/hud/version-display.test.js.map +0 -1
- package/dist/__tests__/hud/windows-platform.test.d.ts +0 -2
- package/dist/__tests__/hud/windows-platform.test.d.ts.map +0 -1
- package/dist/__tests__/hud/windows-platform.test.js +0 -193
- package/dist/__tests__/hud/windows-platform.test.js.map +0 -1
- package/dist/__tests__/hud-agents.test.d.ts +0 -7
- package/dist/__tests__/hud-agents.test.d.ts.map +0 -1
- package/dist/__tests__/hud-agents.test.js +0 -392
- package/dist/__tests__/hud-agents.test.js.map +0 -1
- package/dist/__tests__/hud-axiom.test.d.ts +0 -5
- package/dist/__tests__/hud-axiom.test.d.ts.map +0 -1
- package/dist/__tests__/hud-axiom.test.js +0 -287
- package/dist/__tests__/hud-axiom.test.js.map +0 -1
- package/dist/__tests__/hud-suggestions.test.d.ts +0 -5
- package/dist/__tests__/hud-suggestions.test.d.ts.map +0 -1
- package/dist/__tests__/hud-suggestions.test.js +0 -244
- package/dist/__tests__/hud-suggestions.test.js.map +0 -1
- package/dist/__tests__/hud-windows.test.d.ts +0 -2
- package/dist/__tests__/hud-windows.test.d.ts.map +0 -1
- package/dist/__tests__/hud-windows.test.js +0 -154
- package/dist/__tests__/hud-windows.test.js.map +0 -1
- package/dist/__tests__/inline-prompt-integration.test.d.ts +0 -2
- package/dist/__tests__/inline-prompt-integration.test.d.ts.map +0 -1
- package/dist/__tests__/inline-prompt-integration.test.js +0 -411
- package/dist/__tests__/inline-prompt-integration.test.js.map +0 -1
- package/dist/__tests__/inline-success-shape.test.d.ts +0 -2
- package/dist/__tests__/inline-success-shape.test.d.ts.map +0 -1
- package/dist/__tests__/inline-success-shape.test.js +0 -130
- package/dist/__tests__/inline-success-shape.test.js.map +0 -1
- package/dist/__tests__/installer-hooks-merge.test.d.ts +0 -13
- package/dist/__tests__/installer-hooks-merge.test.d.ts.map +0 -1
- package/dist/__tests__/installer-hooks-merge.test.js +0 -250
- package/dist/__tests__/installer-hooks-merge.test.js.map +0 -1
- package/dist/__tests__/installer-hud-skip.test.d.ts +0 -2
- package/dist/__tests__/installer-hud-skip.test.d.ts.map +0 -1
- package/dist/__tests__/installer-hud-skip.test.js +0 -102
- package/dist/__tests__/installer-hud-skip.test.js.map +0 -1
- package/dist/__tests__/installer.test.d.ts +0 -2
- package/dist/__tests__/installer.test.d.ts.map +0 -1
- package/dist/__tests__/installer.test.js +0 -474
- package/dist/__tests__/installer.test.js.map +0 -1
- package/dist/__tests__/job-management-sqlite.test.d.ts +0 -2
- package/dist/__tests__/job-management-sqlite.test.d.ts.map +0 -1
- package/dist/__tests__/job-management-sqlite.test.js +0 -284
- package/dist/__tests__/job-management-sqlite.test.js.map +0 -1
- package/dist/__tests__/job-management.test.d.ts +0 -2
- package/dist/__tests__/job-management.test.d.ts.map +0 -1
- package/dist/__tests__/job-management.test.js +0 -411
- package/dist/__tests__/job-management.test.js.map +0 -1
- package/dist/__tests__/job-state-db.test.d.ts +0 -2
- package/dist/__tests__/job-state-db.test.d.ts.map +0 -1
- package/dist/__tests__/job-state-db.test.js +0 -611
- package/dist/__tests__/job-state-db.test.js.map +0 -1
- package/dist/__tests__/learner/auto-learner.test.d.ts +0 -7
- package/dist/__tests__/learner/auto-learner.test.d.ts.map +0 -1
- package/dist/__tests__/learner/auto-learner.test.js +0 -507
- package/dist/__tests__/learner/auto-learner.test.js.map +0 -1
- package/dist/__tests__/learner/matcher.test.d.ts +0 -2
- package/dist/__tests__/learner/matcher.test.d.ts.map +0 -1
- package/dist/__tests__/learner/matcher.test.js +0 -330
- package/dist/__tests__/learner/matcher.test.js.map +0 -1
- package/dist/__tests__/live-data.test.d.ts +0 -2
- package/dist/__tests__/live-data.test.d.ts.map +0 -1
- package/dist/__tests__/live-data.test.js +0 -331
- package/dist/__tests__/live-data.test.js.map +0 -1
- package/dist/__tests__/load-agent-prompt.test.d.ts +0 -2
- package/dist/__tests__/load-agent-prompt.test.d.ts.map +0 -1
- package/dist/__tests__/load-agent-prompt.test.js +0 -91
- package/dist/__tests__/load-agent-prompt.test.js.map +0 -1
- package/dist/__tests__/lsp-servers.test.d.ts +0 -2
- package/dist/__tests__/lsp-servers.test.d.ts.map +0 -1
- package/dist/__tests__/lsp-servers.test.js +0 -121
- package/dist/__tests__/lsp-servers.test.js.map +0 -1
- package/dist/__tests__/mcp-fallback-429.test.d.ts +0 -2
- package/dist/__tests__/mcp-fallback-429.test.d.ts.map +0 -1
- package/dist/__tests__/mcp-fallback-429.test.js +0 -164
- package/dist/__tests__/mcp-fallback-429.test.js.map +0 -1
- package/dist/__tests__/mcp-server-workflows.test.d.ts +0 -2
- package/dist/__tests__/mcp-server-workflows.test.d.ts.map +0 -1
- package/dist/__tests__/mcp-server-workflows.test.js +0 -301
- package/dist/__tests__/mcp-server-workflows.test.js.map +0 -1
- package/dist/__tests__/mnemosyne/config.test.d.ts +0 -2
- package/dist/__tests__/mnemosyne/config.test.d.ts.map +0 -1
- package/dist/__tests__/mnemosyne/config.test.js +0 -37
- package/dist/__tests__/mnemosyne/config.test.js.map +0 -1
- package/dist/__tests__/mnemosyne/detector.test.d.ts +0 -2
- package/dist/__tests__/mnemosyne/detector.test.d.ts.map +0 -1
- package/dist/__tests__/mnemosyne/detector.test.js +0 -99
- package/dist/__tests__/mnemosyne/detector.test.js.map +0 -1
- package/dist/__tests__/mnemosyne/finder.test.d.ts +0 -2
- package/dist/__tests__/mnemosyne/finder.test.d.ts.map +0 -1
- package/dist/__tests__/mnemosyne/finder.test.js +0 -105
- package/dist/__tests__/mnemosyne/finder.test.js.map +0 -1
- package/dist/__tests__/mnemosyne/loader.test.d.ts +0 -2
- package/dist/__tests__/mnemosyne/loader.test.d.ts.map +0 -1
- package/dist/__tests__/mnemosyne/loader.test.js +0 -73
- package/dist/__tests__/mnemosyne/loader.test.js.map +0 -1
- package/dist/__tests__/mnemosyne/parser.test.d.ts +0 -2
- package/dist/__tests__/mnemosyne/parser.test.d.ts.map +0 -1
- package/dist/__tests__/mnemosyne/parser.test.js +0 -81
- package/dist/__tests__/mnemosyne/parser.test.js.map +0 -1
- package/dist/__tests__/mnemosyne/validator.test.d.ts +0 -2
- package/dist/__tests__/mnemosyne/validator.test.d.ts.map +0 -1
- package/dist/__tests__/mnemosyne/validator.test.js +0 -85
- package/dist/__tests__/mnemosyne/validator.test.js.map +0 -1
- package/dist/__tests__/model-routing.test.d.ts +0 -2
- package/dist/__tests__/model-routing.test.d.ts.map +0 -1
- package/dist/__tests__/model-routing.test.js +0 -794
- package/dist/__tests__/model-routing.test.js.map +0 -1
- package/dist/__tests__/multi-model-mcp-integration.test.d.ts +0 -2
- package/dist/__tests__/multi-model-mcp-integration.test.d.ts.map +0 -1
- package/dist/__tests__/multi-model-mcp-integration.test.js +0 -69
- package/dist/__tests__/multi-model-mcp-integration.test.js.map +0 -1
- package/dist/__tests__/multi-model-mcp.test.d.ts +0 -2
- package/dist/__tests__/multi-model-mcp.test.d.ts.map +0 -1
- package/dist/__tests__/multi-model-mcp.test.js +0 -145
- package/dist/__tests__/multi-model-mcp.test.js.map +0 -1
- package/dist/__tests__/notepad.test.d.ts +0 -2
- package/dist/__tests__/notepad.test.d.ts.map +0 -1
- package/dist/__tests__/notepad.test.js +0 -374
- package/dist/__tests__/notepad.test.js.map +0 -1
- package/dist/__tests__/omc-tools-contract.test.d.ts +0 -11
- package/dist/__tests__/omc-tools-contract.test.d.ts.map +0 -1
- package/dist/__tests__/omc-tools-contract.test.js +0 -172
- package/dist/__tests__/omc-tools-contract.test.js.map +0 -1
- package/dist/__tests__/omc-tools-server.test.d.ts +0 -2
- package/dist/__tests__/omc-tools-server.test.d.ts.map +0 -1
- package/dist/__tests__/omc-tools-server.test.js +0 -61
- package/dist/__tests__/omc-tools-server.test.js.map +0 -1
- package/dist/__tests__/permission-enforcement.test.d.ts +0 -2
- package/dist/__tests__/permission-enforcement.test.d.ts.map +0 -1
- package/dist/__tests__/permission-enforcement.test.js +0 -194
- package/dist/__tests__/permission-enforcement.test.js.map +0 -1
- package/dist/__tests__/plugin-registry.test.d.ts +0 -2
- package/dist/__tests__/plugin-registry.test.d.ts.map +0 -1
- package/dist/__tests__/plugin-registry.test.js +0 -233
- package/dist/__tests__/plugin-registry.test.js.map +0 -1
- package/dist/__tests__/prompt-file-only.test.d.ts +0 -2
- package/dist/__tests__/prompt-file-only.test.d.ts.map +0 -1
- package/dist/__tests__/prompt-file-only.test.js +0 -263
- package/dist/__tests__/prompt-file-only.test.js.map +0 -1
- package/dist/__tests__/prompt-injection.test.d.ts +0 -2
- package/dist/__tests__/prompt-injection.test.d.ts.map +0 -1
- package/dist/__tests__/prompt-injection.test.js +0 -242
- package/dist/__tests__/prompt-injection.test.js.map +0 -1
- package/dist/__tests__/providers/azure-devops.test.d.ts +0 -2
- package/dist/__tests__/providers/azure-devops.test.d.ts.map +0 -1
- package/dist/__tests__/providers/azure-devops.test.js +0 -158
- package/dist/__tests__/providers/azure-devops.test.js.map +0 -1
- package/dist/__tests__/providers/bitbucket.test.d.ts +0 -2
- package/dist/__tests__/providers/bitbucket.test.d.ts.map +0 -1
- package/dist/__tests__/providers/bitbucket.test.js +0 -170
- package/dist/__tests__/providers/bitbucket.test.js.map +0 -1
- package/dist/__tests__/providers/detection.test.d.ts +0 -2
- package/dist/__tests__/providers/detection.test.d.ts.map +0 -1
- package/dist/__tests__/providers/detection.test.js +0 -181
- package/dist/__tests__/providers/detection.test.js.map +0 -1
- package/dist/__tests__/providers/gitea.test.d.ts +0 -2
- package/dist/__tests__/providers/gitea.test.d.ts.map +0 -1
- package/dist/__tests__/providers/gitea.test.js +0 -212
- package/dist/__tests__/providers/gitea.test.js.map +0 -1
- package/dist/__tests__/providers/github.test.d.ts +0 -2
- package/dist/__tests__/providers/github.test.d.ts.map +0 -1
- package/dist/__tests__/providers/github.test.js +0 -146
- package/dist/__tests__/providers/github.test.js.map +0 -1
- package/dist/__tests__/providers/gitlab.test.d.ts +0 -2
- package/dist/__tests__/providers/gitlab.test.d.ts.map +0 -1
- package/dist/__tests__/providers/gitlab.test.js +0 -149
- package/dist/__tests__/providers/gitlab.test.js.map +0 -1
- package/dist/__tests__/ralph-prd.test.d.ts +0 -2
- package/dist/__tests__/ralph-prd.test.d.ts.map +0 -1
- package/dist/__tests__/ralph-prd.test.js +0 -308
- package/dist/__tests__/ralph-prd.test.js.map +0 -1
- package/dist/__tests__/ralph-progress.test.d.ts +0 -2
- package/dist/__tests__/ralph-progress.test.d.ts.map +0 -1
- package/dist/__tests__/ralph-progress.test.js +0 -312
- package/dist/__tests__/ralph-progress.test.js.map +0 -1
- package/dist/__tests__/rate-limit-wait/daemon.test.d.ts +0 -5
- package/dist/__tests__/rate-limit-wait/daemon.test.d.ts.map +0 -1
- package/dist/__tests__/rate-limit-wait/daemon.test.js +0 -321
- package/dist/__tests__/rate-limit-wait/daemon.test.js.map +0 -1
- package/dist/__tests__/rate-limit-wait/integration.test.d.ts +0 -8
- package/dist/__tests__/rate-limit-wait/integration.test.d.ts.map +0 -1
- package/dist/__tests__/rate-limit-wait/integration.test.js +0 -341
- package/dist/__tests__/rate-limit-wait/integration.test.js.map +0 -1
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.d.ts +0 -5
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.d.ts.map +0 -1
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js +0 -183
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js.map +0 -1
- package/dist/__tests__/rate-limit-wait/tmux-detector.test.d.ts +0 -5
- package/dist/__tests__/rate-limit-wait/tmux-detector.test.d.ts.map +0 -1
- package/dist/__tests__/rate-limit-wait/tmux-detector.test.js +0 -312
- package/dist/__tests__/rate-limit-wait/tmux-detector.test.js.map +0 -1
- package/dist/__tests__/release-local.test.d.ts +0 -2
- package/dist/__tests__/release-local.test.d.ts.map +0 -1
- package/dist/__tests__/release-local.test.js +0 -19
- package/dist/__tests__/release-local.test.js.map +0 -1
- package/dist/__tests__/release-steps.test.d.ts +0 -2
- package/dist/__tests__/release-steps.test.d.ts.map +0 -1
- package/dist/__tests__/release-steps.test.js +0 -82
- package/dist/__tests__/release-steps.test.js.map +0 -1
- package/dist/__tests__/session-catalog.test.d.ts +0 -2
- package/dist/__tests__/session-catalog.test.d.ts.map +0 -1
- package/dist/__tests__/session-catalog.test.js +0 -195
- package/dist/__tests__/session-catalog.test.js.map +0 -1
- package/dist/__tests__/session-migration.test.d.ts +0 -2
- package/dist/__tests__/session-migration.test.d.ts.map +0 -1
- package/dist/__tests__/session-migration.test.js +0 -155
- package/dist/__tests__/session-migration.test.js.map +0 -1
- package/dist/__tests__/skills.test.d.ts +0 -2
- package/dist/__tests__/skills.test.d.ts.map +0 -1
- package/dist/__tests__/skills.test.js +0 -207
- package/dist/__tests__/skills.test.js.map +0 -1
- package/dist/__tests__/standalone-server.test.d.ts +0 -2
- package/dist/__tests__/standalone-server.test.d.ts.map +0 -1
- package/dist/__tests__/standalone-server.test.js +0 -53
- package/dist/__tests__/standalone-server.test.js.map +0 -1
- package/dist/__tests__/task-continuation.test.d.ts +0 -2
- package/dist/__tests__/task-continuation.test.d.ts.map +0 -1
- package/dist/__tests__/task-continuation.test.js +0 -743
- package/dist/__tests__/task-continuation.test.js.map +0 -1
- package/dist/__tests__/tools/skills-tools.test.d.ts +0 -2
- package/dist/__tests__/tools/skills-tools.test.d.ts.map +0 -1
- package/dist/__tests__/tools/skills-tools.test.js +0 -63
- package/dist/__tests__/tools/skills-tools.test.js.map +0 -1
- package/dist/__tests__/tools/trace-tools.test.d.ts +0 -2
- package/dist/__tests__/tools/trace-tools.test.d.ts.map +0 -1
- package/dist/__tests__/tools/trace-tools.test.js +0 -237
- package/dist/__tests__/tools/trace-tools.test.js.map +0 -1
- package/dist/__tests__/types.test.d.ts +0 -2
- package/dist/__tests__/types.test.d.ts.map +0 -1
- package/dist/__tests__/types.test.js +0 -78
- package/dist/__tests__/types.test.js.map +0 -1
- package/dist/__tests__/validate-and-read-file.test.d.ts +0 -2
- package/dist/__tests__/validate-and-read-file.test.d.ts.map +0 -1
- package/dist/__tests__/validate-and-read-file.test.js +0 -84
- package/dist/__tests__/validate-and-read-file.test.js.map +0 -1
- package/dist/__tests__/validateMode.test.d.ts +0 -2
- package/dist/__tests__/validateMode.test.d.ts.map +0 -1
- package/dist/__tests__/validateMode.test.js +0 -100
- package/dist/__tests__/validateMode.test.js.map +0 -1
- package/dist/__tests__/version-helper.test.d.ts +0 -2
- package/dist/__tests__/version-helper.test.d.ts.map +0 -1
- package/dist/__tests__/version-helper.test.js +0 -37
- package/dist/__tests__/version-helper.test.js.map +0 -1
- package/dist/agents/__tests__/agent-wrapper.test.d.ts +0 -2
- package/dist/agents/__tests__/agent-wrapper.test.d.ts.map +0 -1
- package/dist/agents/__tests__/agent-wrapper.test.js +0 -37
- package/dist/agents/__tests__/agent-wrapper.test.js.map +0 -1
- package/dist/agents/__tests__/timeout-config.test.d.ts +0 -2
- package/dist/agents/__tests__/timeout-config.test.d.ts.map +0 -1
- package/dist/agents/__tests__/timeout-config.test.js +0 -35
- package/dist/agents/__tests__/timeout-config.test.js.map +0 -1
- package/dist/agents/__tests__/timeout-manager.test.d.ts +0 -2
- package/dist/agents/__tests__/timeout-manager.test.d.ts.map +0 -1
- package/dist/agents/__tests__/timeout-manager.test.js +0 -37
- package/dist/agents/__tests__/timeout-manager.test.js.map +0 -1
- package/dist/agents/coordinator-deprecated.d.ts +0 -18
- package/dist/agents/coordinator-deprecated.d.ts.map +0 -1
- package/dist/agents/coordinator-deprecated.js +0 -38
- package/dist/agents/coordinator-deprecated.js.map +0 -1
- package/dist/cli/commands/__tests__/cleanup.test.d.ts +0 -2
- package/dist/cli/commands/__tests__/cleanup.test.d.ts.map +0 -1
- package/dist/cli/commands/__tests__/cleanup.test.js +0 -37
- package/dist/cli/commands/__tests__/cleanup.test.js.map +0 -1
- package/dist/features/delegation-routing/__tests__/resolver.test.d.ts +0 -2
- package/dist/features/delegation-routing/__tests__/resolver.test.d.ts.map +0 -1
- package/dist/features/delegation-routing/__tests__/resolver.test.js +0 -419
- package/dist/features/delegation-routing/__tests__/resolver.test.js.map +0 -1
- package/dist/features/model-routing/__tests__/external-model-policy.test.d.ts +0 -2
- package/dist/features/model-routing/__tests__/external-model-policy.test.d.ts.map +0 -1
- package/dist/features/model-routing/__tests__/external-model-policy.test.js +0 -475
- package/dist/features/model-routing/__tests__/external-model-policy.test.js.map +0 -1
- package/dist/features/state-manager/__tests__/cache.test.d.ts +0 -2
- package/dist/features/state-manager/__tests__/cache.test.d.ts.map +0 -1
- package/dist/features/state-manager/__tests__/cache.test.js +0 -204
- package/dist/features/state-manager/__tests__/cache.test.js.map +0 -1
- package/dist/features/state-manager/__tests__/encryption-performance.test.d.ts +0 -2
- package/dist/features/state-manager/__tests__/encryption-performance.test.d.ts.map +0 -1
- package/dist/features/state-manager/__tests__/encryption-performance.test.js +0 -42
- package/dist/features/state-manager/__tests__/encryption-performance.test.js.map +0 -1
- package/dist/features/state-manager/__tests__/encryption.test.d.ts +0 -2
- package/dist/features/state-manager/__tests__/encryption.test.d.ts.map +0 -1
- package/dist/features/state-manager/__tests__/encryption.test.js +0 -68
- package/dist/features/state-manager/__tests__/encryption.test.js.map +0 -1
- package/dist/features/wizard/__tests__/engine.test.d.ts +0 -2
- package/dist/features/wizard/__tests__/engine.test.d.ts.map +0 -1
- package/dist/features/wizard/__tests__/engine.test.js +0 -78
- package/dist/features/wizard/__tests__/engine.test.js.map +0 -1
- package/dist/features/wizard/__tests__/recommendation-engine.test.d.ts +0 -2
- package/dist/features/wizard/__tests__/recommendation-engine.test.d.ts.map +0 -1
- package/dist/features/wizard/__tests__/recommendation-engine.test.js +0 -43
- package/dist/features/wizard/__tests__/recommendation-engine.test.js.map +0 -1
- package/dist/hooks/__tests__/askuserquestion-lifecycle.test.d.ts +0 -9
- package/dist/hooks/__tests__/askuserquestion-lifecycle.test.d.ts.map +0 -1
- package/dist/hooks/__tests__/askuserquestion-lifecycle.test.js +0 -110
- package/dist/hooks/__tests__/askuserquestion-lifecycle.test.js.map +0 -1
- package/dist/hooks/__tests__/background-process-guard.test.d.ts +0 -2
- package/dist/hooks/__tests__/background-process-guard.test.d.ts.map +0 -1
- package/dist/hooks/__tests__/background-process-guard.test.js +0 -233
- package/dist/hooks/__tests__/background-process-guard.test.js.map +0 -1
- package/dist/hooks/__tests__/bridge-normalize.test.d.ts +0 -2
- package/dist/hooks/__tests__/bridge-normalize.test.d.ts.map +0 -1
- package/dist/hooks/__tests__/bridge-normalize.test.js +0 -90
- package/dist/hooks/__tests__/bridge-normalize.test.js.map +0 -1
- package/dist/hooks/__tests__/bridge-pkill.test.d.ts +0 -8
- package/dist/hooks/__tests__/bridge-pkill.test.d.ts.map +0 -1
- package/dist/hooks/__tests__/bridge-pkill.test.js +0 -188
- package/dist/hooks/__tests__/bridge-pkill.test.js.map +0 -1
- package/dist/hooks/__tests__/bridge-routing.test.d.ts +0 -9
- package/dist/hooks/__tests__/bridge-routing.test.d.ts.map +0 -1
- package/dist/hooks/__tests__/bridge-routing.test.js +0 -516
- package/dist/hooks/__tests__/bridge-routing.test.js.map +0 -1
- package/dist/hooks/__tests__/bridge-security.test.d.ts +0 -11
- package/dist/hooks/__tests__/bridge-security.test.d.ts.map +0 -1
- package/dist/hooks/__tests__/bridge-security.test.js +0 -498
- package/dist/hooks/__tests__/bridge-security.test.js.map +0 -1
- package/dist/hooks/__tests__/bridge.test.d.ts +0 -2
- package/dist/hooks/__tests__/bridge.test.d.ts.map +0 -1
- package/dist/hooks/__tests__/bridge.test.js +0 -199
- package/dist/hooks/__tests__/bridge.test.js.map +0 -1
- package/dist/hooks/__tests__/compaction-concurrency.test.d.ts +0 -10
- package/dist/hooks/__tests__/compaction-concurrency.test.d.ts.map +0 -1
- package/dist/hooks/__tests__/compaction-concurrency.test.js +0 -313
- package/dist/hooks/__tests__/compaction-concurrency.test.js.map +0 -1
- package/dist/hooks/auto-slash-command/__tests__/detector.test.d.ts +0 -2
- package/dist/hooks/auto-slash-command/__tests__/detector.test.d.ts.map +0 -1
- package/dist/hooks/auto-slash-command/__tests__/detector.test.js +0 -70
- package/dist/hooks/auto-slash-command/__tests__/detector.test.js.map +0 -1
- package/dist/hooks/auto-slash-command/__tests__/executor.test.d.ts +0 -2
- package/dist/hooks/auto-slash-command/__tests__/executor.test.d.ts.map +0 -1
- package/dist/hooks/auto-slash-command/__tests__/executor.test.js +0 -55
- package/dist/hooks/auto-slash-command/__tests__/executor.test.js.map +0 -1
- package/dist/hooks/auto-slash-command/__tests__/index.test.d.ts +0 -2
- package/dist/hooks/auto-slash-command/__tests__/index.test.d.ts.map +0 -1
- package/dist/hooks/auto-slash-command/__tests__/index.test.js +0 -50
- package/dist/hooks/auto-slash-command/__tests__/index.test.js.map +0 -1
- package/dist/hooks/autopilot/__tests__/cancel.test.d.ts +0 -2
- package/dist/hooks/autopilot/__tests__/cancel.test.d.ts.map +0 -1
- package/dist/hooks/autopilot/__tests__/cancel.test.js +0 -606
- package/dist/hooks/autopilot/__tests__/cancel.test.js.map +0 -1
- package/dist/hooks/autopilot/__tests__/prompts.test.d.ts +0 -2
- package/dist/hooks/autopilot/__tests__/prompts.test.d.ts.map +0 -1
- package/dist/hooks/autopilot/__tests__/prompts.test.js +0 -92
- package/dist/hooks/autopilot/__tests__/prompts.test.js.map +0 -1
- package/dist/hooks/autopilot/__tests__/state.test.d.ts +0 -2
- package/dist/hooks/autopilot/__tests__/state.test.d.ts.map +0 -1
- package/dist/hooks/autopilot/__tests__/state.test.js +0 -76
- package/dist/hooks/autopilot/__tests__/state.test.js.map +0 -1
- package/dist/hooks/autopilot/__tests__/summary.test.d.ts +0 -2
- package/dist/hooks/autopilot/__tests__/summary.test.d.ts.map +0 -1
- package/dist/hooks/autopilot/__tests__/summary.test.js +0 -324
- package/dist/hooks/autopilot/__tests__/summary.test.js.map +0 -1
- package/dist/hooks/autopilot/__tests__/transition.test.d.ts +0 -2
- package/dist/hooks/autopilot/__tests__/transition.test.d.ts.map +0 -1
- package/dist/hooks/autopilot/__tests__/transition.test.js +0 -58
- package/dist/hooks/autopilot/__tests__/transition.test.js.map +0 -1
- package/dist/hooks/autopilot/__tests__/transitions.test.d.ts +0 -12
- package/dist/hooks/autopilot/__tests__/transitions.test.d.ts.map +0 -1
- package/dist/hooks/autopilot/__tests__/transitions.test.js +0 -303
- package/dist/hooks/autopilot/__tests__/transitions.test.js.map +0 -1
- package/dist/hooks/autopilot/__tests__/validation.test.d.ts +0 -2
- package/dist/hooks/autopilot/__tests__/validation.test.d.ts.map +0 -1
- package/dist/hooks/autopilot/__tests__/validation.test.js +0 -450
- package/dist/hooks/autopilot/__tests__/validation.test.js.map +0 -1
- package/dist/hooks/beads-context/__tests__/index.test.d.ts +0 -2
- package/dist/hooks/beads-context/__tests__/index.test.d.ts.map +0 -1
- package/dist/hooks/beads-context/__tests__/index.test.js +0 -150
- package/dist/hooks/beads-context/__tests__/index.test.js.map +0 -1
- package/dist/hooks/empty-message-sanitizer/__tests__/index.test.d.ts +0 -2
- package/dist/hooks/empty-message-sanitizer/__tests__/index.test.d.ts.map +0 -1
- package/dist/hooks/empty-message-sanitizer/__tests__/index.test.js +0 -416
- package/dist/hooks/empty-message-sanitizer/__tests__/index.test.js.map +0 -1
- package/dist/hooks/keyword-detector/__tests__/index.test.d.ts +0 -2
- package/dist/hooks/keyword-detector/__tests__/index.test.d.ts.map +0 -1
- package/dist/hooks/keyword-detector/__tests__/index.test.js +0 -868
- package/dist/hooks/keyword-detector/__tests__/index.test.js.map +0 -1
- package/dist/hooks/learner/__tests__/confidence.test.d.ts +0 -2
- package/dist/hooks/learner/__tests__/confidence.test.d.ts.map +0 -1
- package/dist/hooks/learner/__tests__/confidence.test.js +0 -42
- package/dist/hooks/learner/__tests__/confidence.test.js.map +0 -1
- package/dist/hooks/learner/__tests__/detector.test.d.ts +0 -2
- package/dist/hooks/learner/__tests__/detector.test.d.ts.map +0 -1
- package/dist/hooks/learner/__tests__/detector.test.js +0 -170
- package/dist/hooks/learner/__tests__/detector.test.js.map +0 -1
- package/dist/hooks/learner/__tests__/index-manager-filter.test.d.ts +0 -14
- package/dist/hooks/learner/__tests__/index-manager-filter.test.d.ts.map +0 -1
- package/dist/hooks/learner/__tests__/index-manager-filter.test.js +0 -147
- package/dist/hooks/learner/__tests__/index-manager-filter.test.js.map +0 -1
- package/dist/hooks/learner/__tests__/index-manager-import.test.d.ts +0 -2
- package/dist/hooks/learner/__tests__/index-manager-import.test.d.ts.map +0 -1
- package/dist/hooks/learner/__tests__/index-manager-import.test.js +0 -43
- package/dist/hooks/learner/__tests__/index-manager-import.test.js.map +0 -1
- package/dist/hooks/learner/__tests__/index.test.d.ts +0 -2
- package/dist/hooks/learner/__tests__/index.test.d.ts.map +0 -1
- package/dist/hooks/learner/__tests__/index.test.js +0 -48
- package/dist/hooks/learner/__tests__/index.test.js.map +0 -1
- package/dist/hooks/learner/__tests__/learning-queue-parser.test.d.ts +0 -10
- package/dist/hooks/learner/__tests__/learning-queue-parser.test.d.ts.map +0 -1
- package/dist/hooks/learner/__tests__/learning-queue-parser.test.js +0 -131
- package/dist/hooks/learner/__tests__/learning-queue-parser.test.js.map +0 -1
- package/dist/hooks/learner/__tests__/matcher.test.d.ts +0 -2
- package/dist/hooks/learner/__tests__/matcher.test.d.ts.map +0 -1
- package/dist/hooks/learner/__tests__/matcher.test.js +0 -114
- package/dist/hooks/learner/__tests__/matcher.test.js.map +0 -1
- package/dist/hooks/learner/__tests__/promotion.test.d.ts +0 -2
- package/dist/hooks/learner/__tests__/promotion.test.d.ts.map +0 -1
- package/dist/hooks/learner/__tests__/promotion.test.js +0 -146
- package/dist/hooks/learner/__tests__/promotion.test.js.map +0 -1
- package/dist/hooks/learner/__tests__/queue-archiver.test.d.ts +0 -13
- package/dist/hooks/learner/__tests__/queue-archiver.test.d.ts.map +0 -1
- package/dist/hooks/learner/__tests__/queue-archiver.test.js +0 -162
- package/dist/hooks/learner/__tests__/queue-archiver.test.js.map +0 -1
- package/dist/hooks/learner/__tests__/reflection-archiver.test.d.ts +0 -14
- package/dist/hooks/learner/__tests__/reflection-archiver.test.d.ts.map +0 -1
- package/dist/hooks/learner/__tests__/reflection-archiver.test.js +0 -159
- package/dist/hooks/learner/__tests__/reflection-archiver.test.js.map +0 -1
- package/dist/hooks/learner/__tests__/reflection-parser.test.d.ts +0 -14
- package/dist/hooks/learner/__tests__/reflection-parser.test.d.ts.map +0 -1
- package/dist/hooks/learner/__tests__/reflection-parser.test.js +0 -201
- package/dist/hooks/learner/__tests__/reflection-parser.test.js.map +0 -1
- package/dist/hooks/learner/__tests__/validator.test.d.ts +0 -2
- package/dist/hooks/learner/__tests__/validator.test.d.ts.map +0 -1
- package/dist/hooks/learner/__tests__/validator.test.js +0 -123
- package/dist/hooks/learner/__tests__/validator.test.js.map +0 -1
- package/dist/hooks/learner/__tests__/writer.test.d.ts +0 -2
- package/dist/hooks/learner/__tests__/writer.test.d.ts.map +0 -1
- package/dist/hooks/learner/__tests__/writer.test.js +0 -141
- package/dist/hooks/learner/__tests__/writer.test.js.map +0 -1
- package/dist/hooks/mode-registry/__tests__/session-isolation.test.d.ts +0 -2
- package/dist/hooks/mode-registry/__tests__/session-isolation.test.d.ts.map +0 -1
- package/dist/hooks/mode-registry/__tests__/session-isolation.test.js +0 -236
- package/dist/hooks/mode-registry/__tests__/session-isolation.test.js.map +0 -1
- package/dist/hooks/nexus/__tests__/config.test.d.ts +0 -2
- package/dist/hooks/nexus/__tests__/config.test.d.ts.map +0 -1
- package/dist/hooks/nexus/__tests__/config.test.js +0 -38
- package/dist/hooks/nexus/__tests__/config.test.js.map +0 -1
- package/dist/hooks/nexus/__tests__/consciousness-sync.test.d.ts +0 -2
- package/dist/hooks/nexus/__tests__/consciousness-sync.test.d.ts.map +0 -1
- package/dist/hooks/nexus/__tests__/consciousness-sync.test.js +0 -28
- package/dist/hooks/nexus/__tests__/consciousness-sync.test.js.map +0 -1
- package/dist/hooks/nexus/__tests__/data-collector.test.d.ts +0 -2
- package/dist/hooks/nexus/__tests__/data-collector.test.d.ts.map +0 -1
- package/dist/hooks/nexus/__tests__/data-collector.test.js +0 -61
- package/dist/hooks/nexus/__tests__/data-collector.test.js.map +0 -1
- package/dist/hooks/nexus/__tests__/improvement-puller.test.d.ts +0 -2
- package/dist/hooks/nexus/__tests__/improvement-puller.test.d.ts.map +0 -1
- package/dist/hooks/nexus/__tests__/improvement-puller.test.js +0 -49
- package/dist/hooks/nexus/__tests__/improvement-puller.test.js.map +0 -1
- package/dist/hooks/nexus/__tests__/session-end-hook.test.d.ts +0 -2
- package/dist/hooks/nexus/__tests__/session-end-hook.test.d.ts.map +0 -1
- package/dist/hooks/nexus/__tests__/session-end-hook.test.js +0 -39
- package/dist/hooks/nexus/__tests__/session-end-hook.test.js.map +0 -1
- package/dist/hooks/observability/__tests__/observability.test.d.ts +0 -2
- package/dist/hooks/observability/__tests__/observability.test.d.ts.map +0 -1
- package/dist/hooks/observability/__tests__/observability.test.js +0 -176
- package/dist/hooks/observability/__tests__/observability.test.js.map +0 -1
- package/dist/hooks/permission-handler/__tests__/index.test.d.ts +0 -2
- package/dist/hooks/permission-handler/__tests__/index.test.d.ts.map +0 -1
- package/dist/hooks/permission-handler/__tests__/index.test.js +0 -417
- package/dist/hooks/permission-handler/__tests__/index.test.js.map +0 -1
- package/dist/hooks/persistent-mode/__tests__/error-handling.test.d.ts +0 -6
- package/dist/hooks/persistent-mode/__tests__/error-handling.test.d.ts.map +0 -1
- package/dist/hooks/persistent-mode/__tests__/error-handling.test.js +0 -71
- package/dist/hooks/persistent-mode/__tests__/error-handling.test.js.map +0 -1
- package/dist/hooks/persistent-mode/__tests__/ralph-max-iteration.test.d.ts +0 -2
- package/dist/hooks/persistent-mode/__tests__/ralph-max-iteration.test.d.ts.map +0 -1
- package/dist/hooks/persistent-mode/__tests__/ralph-max-iteration.test.js +0 -38
- package/dist/hooks/persistent-mode/__tests__/ralph-max-iteration.test.js.map +0 -1
- package/dist/hooks/persistent-mode/__tests__/tool-error.test.d.ts +0 -6
- package/dist/hooks/persistent-mode/__tests__/tool-error.test.d.ts.map +0 -1
- package/dist/hooks/persistent-mode/__tests__/tool-error.test.js +0 -335
- package/dist/hooks/persistent-mode/__tests__/tool-error.test.js.map +0 -1
- package/dist/hooks/persistent-mode/session-isolation.test.d.ts +0 -2
- package/dist/hooks/persistent-mode/session-isolation.test.d.ts.map +0 -1
- package/dist/hooks/persistent-mode/session-isolation.test.js +0 -491
- package/dist/hooks/persistent-mode/session-isolation.test.js.map +0 -1
- package/dist/hooks/project-memory/__tests__/detector.test.d.ts +0 -5
- package/dist/hooks/project-memory/__tests__/detector.test.d.ts.map +0 -1
- package/dist/hooks/project-memory/__tests__/detector.test.js +0 -165
- package/dist/hooks/project-memory/__tests__/detector.test.js.map +0 -1
- package/dist/hooks/project-memory/__tests__/formatter.test.d.ts +0 -5
- package/dist/hooks/project-memory/__tests__/formatter.test.d.ts.map +0 -1
- package/dist/hooks/project-memory/__tests__/formatter.test.js +0 -262
- package/dist/hooks/project-memory/__tests__/formatter.test.js.map +0 -1
- package/dist/hooks/project-memory/__tests__/integration.test.d.ts +0 -5
- package/dist/hooks/project-memory/__tests__/integration.test.d.ts.map +0 -1
- package/dist/hooks/project-memory/__tests__/integration.test.js +0 -154
- package/dist/hooks/project-memory/__tests__/integration.test.js.map +0 -1
- package/dist/hooks/project-memory/__tests__/learner.test.d.ts +0 -5
- package/dist/hooks/project-memory/__tests__/learner.test.d.ts.map +0 -1
- package/dist/hooks/project-memory/__tests__/learner.test.js +0 -159
- package/dist/hooks/project-memory/__tests__/learner.test.js.map +0 -1
- package/dist/hooks/project-memory/__tests__/storage.test.d.ts +0 -5
- package/dist/hooks/project-memory/__tests__/storage.test.d.ts.map +0 -1
- package/dist/hooks/project-memory/__tests__/storage.test.js +0 -207
- package/dist/hooks/project-memory/__tests__/storage.test.js.map +0 -1
- package/dist/hooks/ralph/__tests__/loop.test.d.ts +0 -2
- package/dist/hooks/ralph/__tests__/loop.test.d.ts.map +0 -1
- package/dist/hooks/ralph/__tests__/loop.test.js +0 -268
- package/dist/hooks/ralph/__tests__/loop.test.js.map +0 -1
- package/dist/hooks/ralph/__tests__/prd.test.d.ts +0 -2
- package/dist/hooks/ralph/__tests__/prd.test.d.ts.map +0 -1
- package/dist/hooks/ralph/__tests__/prd.test.js +0 -197
- package/dist/hooks/ralph/__tests__/prd.test.js.map +0 -1
- package/dist/hooks/ralph/__tests__/progress.test.d.ts +0 -2
- package/dist/hooks/ralph/__tests__/progress.test.d.ts.map +0 -1
- package/dist/hooks/ralph/__tests__/progress.test.js +0 -120
- package/dist/hooks/ralph/__tests__/progress.test.js.map +0 -1
- package/dist/hooks/ralph/__tests__/verifier.test.d.ts +0 -2
- package/dist/hooks/ralph/__tests__/verifier.test.d.ts.map +0 -1
- package/dist/hooks/ralph/__tests__/verifier.test.js +0 -75
- package/dist/hooks/ralph/__tests__/verifier.test.js.map +0 -1
- package/dist/hooks/recovery/__tests__/context-window.test.d.ts +0 -2
- package/dist/hooks/recovery/__tests__/context-window.test.d.ts.map +0 -1
- package/dist/hooks/recovery/__tests__/context-window.test.js +0 -131
- package/dist/hooks/recovery/__tests__/context-window.test.js.map +0 -1
- package/dist/hooks/recovery/__tests__/edit-error.test.d.ts +0 -2
- package/dist/hooks/recovery/__tests__/edit-error.test.d.ts.map +0 -1
- package/dist/hooks/recovery/__tests__/edit-error.test.js +0 -88
- package/dist/hooks/recovery/__tests__/edit-error.test.js.map +0 -1
- package/dist/hooks/recovery/__tests__/index.test.d.ts +0 -2
- package/dist/hooks/recovery/__tests__/index.test.d.ts.map +0 -1
- package/dist/hooks/recovery/__tests__/index.test.js +0 -270
- package/dist/hooks/recovery/__tests__/index.test.js.map +0 -1
- package/dist/hooks/recovery/__tests__/session-recovery.test.d.ts +0 -2
- package/dist/hooks/recovery/__tests__/session-recovery.test.d.ts.map +0 -1
- package/dist/hooks/recovery/__tests__/session-recovery.test.js +0 -129
- package/dist/hooks/recovery/__tests__/session-recovery.test.js.map +0 -1
- package/dist/hooks/recovery/__tests__/storage.test.d.ts +0 -2
- package/dist/hooks/recovery/__tests__/storage.test.d.ts.map +0 -1
- package/dist/hooks/recovery/__tests__/storage.test.js +0 -549
- package/dist/hooks/recovery/__tests__/storage.test.js.map +0 -1
- package/dist/hooks/rules-injector/__tests__/finder.test.d.ts +0 -2
- package/dist/hooks/rules-injector/__tests__/finder.test.d.ts.map +0 -1
- package/dist/hooks/rules-injector/__tests__/finder.test.js +0 -68
- package/dist/hooks/rules-injector/__tests__/finder.test.js.map +0 -1
- package/dist/hooks/rules-injector/__tests__/index.test.d.ts +0 -2
- package/dist/hooks/rules-injector/__tests__/index.test.d.ts.map +0 -1
- package/dist/hooks/rules-injector/__tests__/index.test.js +0 -58
- package/dist/hooks/rules-injector/__tests__/index.test.js.map +0 -1
- package/dist/hooks/rules-injector/__tests__/matcher.test.d.ts +0 -2
- package/dist/hooks/rules-injector/__tests__/matcher.test.d.ts.map +0 -1
- package/dist/hooks/rules-injector/__tests__/matcher.test.js +0 -86
- package/dist/hooks/rules-injector/__tests__/matcher.test.js.map +0 -1
- package/dist/hooks/rules-injector/__tests__/parser.test.d.ts +0 -2
- package/dist/hooks/rules-injector/__tests__/parser.test.d.ts.map +0 -1
- package/dist/hooks/rules-injector/__tests__/parser.test.js +0 -86
- package/dist/hooks/rules-injector/__tests__/parser.test.js.map +0 -1
- package/dist/hooks/session-end/__tests__/callbacks.test.d.ts +0 -2
- package/dist/hooks/session-end/__tests__/callbacks.test.d.ts.map +0 -1
- package/dist/hooks/session-end/__tests__/callbacks.test.js +0 -382
- package/dist/hooks/session-end/__tests__/callbacks.test.js.map +0 -1
- package/dist/hooks/session-end/__tests__/index.test.d.ts +0 -2
- package/dist/hooks/session-end/__tests__/index.test.d.ts.map +0 -1
- package/dist/hooks/session-end/__tests__/index.test.js +0 -77
- package/dist/hooks/session-end/__tests__/index.test.js.map +0 -1
- package/dist/hooks/session-end/__tests__/nexus-integration.test.d.ts +0 -2
- package/dist/hooks/session-end/__tests__/nexus-integration.test.d.ts.map +0 -1
- package/dist/hooks/session-end/__tests__/nexus-integration.test.js +0 -30
- package/dist/hooks/session-end/__tests__/nexus-integration.test.js.map +0 -1
- package/dist/hooks/session-end/__tests__/python-repl-cleanup.test.d.ts +0 -2
- package/dist/hooks/session-end/__tests__/python-repl-cleanup.test.d.ts.map +0 -1
- package/dist/hooks/session-end/__tests__/python-repl-cleanup.test.js +0 -46
- package/dist/hooks/session-end/__tests__/python-repl-cleanup.test.js.map +0 -1
- package/dist/hooks/session-end/__tests__/session-duration.test.d.ts +0 -2
- package/dist/hooks/session-end/__tests__/session-duration.test.d.ts.map +0 -1
- package/dist/hooks/session-end/__tests__/session-duration.test.js +0 -236
- package/dist/hooks/session-end/__tests__/session-duration.test.js.map +0 -1
- package/dist/hooks/session-end/__tests__/session-end-bridge-cleanup.test.d.ts +0 -2
- package/dist/hooks/session-end/__tests__/session-end-bridge-cleanup.test.d.ts.map +0 -1
- package/dist/hooks/session-end/__tests__/session-end-bridge-cleanup.test.js +0 -58
- package/dist/hooks/session-end/__tests__/session-end-bridge-cleanup.test.js.map +0 -1
- package/dist/hooks/setup/__tests__/index.test.d.ts +0 -2
- package/dist/hooks/setup/__tests__/index.test.d.ts.map +0 -1
- package/dist/hooks/setup/__tests__/index.test.js +0 -68
- package/dist/hooks/setup/__tests__/index.test.js.map +0 -1
- package/dist/hooks/setup/__tests__/prune.test.d.ts +0 -2
- package/dist/hooks/setup/__tests__/prune.test.d.ts.map +0 -1
- package/dist/hooks/setup/__tests__/prune.test.js +0 -94
- package/dist/hooks/setup/__tests__/prune.test.js.map +0 -1
- package/dist/hooks/subagent-tracker/__tests__/flow-tracer.test.d.ts +0 -2
- package/dist/hooks/subagent-tracker/__tests__/flow-tracer.test.d.ts.map +0 -1
- package/dist/hooks/subagent-tracker/__tests__/flow-tracer.test.js +0 -107
- package/dist/hooks/subagent-tracker/__tests__/flow-tracer.test.js.map +0 -1
- package/dist/hooks/subagent-tracker/__tests__/flush-race.test.d.ts +0 -2
- package/dist/hooks/subagent-tracker/__tests__/flush-race.test.d.ts.map +0 -1
- package/dist/hooks/subagent-tracker/__tests__/flush-race.test.js +0 -376
- package/dist/hooks/subagent-tracker/__tests__/flush-race.test.js.map +0 -1
- package/dist/hooks/subagent-tracker/__tests__/index.test.d.ts +0 -2
- package/dist/hooks/subagent-tracker/__tests__/index.test.d.ts.map +0 -1
- package/dist/hooks/subagent-tracker/__tests__/index.test.js +0 -818
- package/dist/hooks/subagent-tracker/__tests__/index.test.js.map +0 -1
- package/dist/hooks/subagent-tracker/__tests__/session-replay.test.d.ts +0 -2
- package/dist/hooks/subagent-tracker/__tests__/session-replay.test.d.ts.map +0 -1
- package/dist/hooks/subagent-tracker/__tests__/session-replay.test.js +0 -139
- package/dist/hooks/subagent-tracker/__tests__/session-replay.test.js.map +0 -1
- package/dist/hooks/subagent-tracker/__tests__/syncSleep.test.d.ts +0 -10
- package/dist/hooks/subagent-tracker/__tests__/syncSleep.test.d.ts.map +0 -1
- package/dist/hooks/subagent-tracker/__tests__/syncSleep.test.js +0 -112
- package/dist/hooks/subagent-tracker/__tests__/syncSleep.test.js.map +0 -1
- package/dist/hooks/team-pipeline/__tests__/state.test.d.ts +0 -2
- package/dist/hooks/team-pipeline/__tests__/state.test.d.ts.map +0 -1
- package/dist/hooks/team-pipeline/__tests__/state.test.js +0 -94
- package/dist/hooks/team-pipeline/__tests__/state.test.js.map +0 -1
- package/dist/hooks/team-pipeline/__tests__/transitions.test.d.ts +0 -2
- package/dist/hooks/team-pipeline/__tests__/transitions.test.d.ts.map +0 -1
- package/dist/hooks/team-pipeline/__tests__/transitions.test.js +0 -156
- package/dist/hooks/team-pipeline/__tests__/transitions.test.js.map +0 -1
- package/dist/hooks/think-mode/__tests__/index.test.d.ts +0 -2
- package/dist/hooks/think-mode/__tests__/index.test.d.ts.map +0 -1
- package/dist/hooks/think-mode/__tests__/index.test.js +0 -556
- package/dist/hooks/think-mode/__tests__/index.test.js.map +0 -1
- package/dist/hooks/todo-continuation/__tests__/isUserAbort.test.d.ts +0 -2
- package/dist/hooks/todo-continuation/__tests__/isUserAbort.test.d.ts.map +0 -1
- package/dist/hooks/todo-continuation/__tests__/isUserAbort.test.js +0 -119
- package/dist/hooks/todo-continuation/__tests__/isUserAbort.test.js.map +0 -1
- package/dist/hooks/ultrawork/session-isolation.test.d.ts +0 -2
- package/dist/hooks/ultrawork/session-isolation.test.d.ts.map +0 -1
- package/dist/hooks/ultrawork/session-isolation.test.js +0 -333
- package/dist/hooks/ultrawork/session-isolation.test.js.map +0 -1
- package/dist/installer/__tests__/claude-md-merge.test.d.ts +0 -6
- package/dist/installer/__tests__/claude-md-merge.test.d.ts.map +0 -1
- package/dist/installer/__tests__/claude-md-merge.test.js +0 -220
- package/dist/installer/__tests__/claude-md-merge.test.js.map +0 -1
- package/dist/installer/__tests__/hooks.test.d.ts +0 -6
- package/dist/installer/__tests__/hooks.test.d.ts.map +0 -1
- package/dist/installer/__tests__/hooks.test.js +0 -121
- package/dist/installer/__tests__/hooks.test.js.map +0 -1
- package/dist/installer/__tests__/safe-installer.test.d.ts +0 -6
- package/dist/installer/__tests__/safe-installer.test.d.ts.map +0 -1
- package/dist/installer/__tests__/safe-installer.test.js +0 -185
- package/dist/installer/__tests__/safe-installer.test.js.map +0 -1
- package/dist/lib/__tests__/atomic-write.test.d.ts +0 -2
- package/dist/lib/__tests__/atomic-write.test.d.ts.map +0 -1
- package/dist/lib/__tests__/atomic-write.test.js +0 -196
- package/dist/lib/__tests__/atomic-write.test.js.map +0 -1
- package/dist/lib/__tests__/file-lock.test.d.ts +0 -13
- package/dist/lib/__tests__/file-lock.test.d.ts.map +0 -1
- package/dist/lib/__tests__/file-lock.test.js +0 -122
- package/dist/lib/__tests__/file-lock.test.js.map +0 -1
- package/dist/lib/__tests__/plugin-deps.test.d.ts +0 -2
- package/dist/lib/__tests__/plugin-deps.test.d.ts.map +0 -1
- package/dist/lib/__tests__/plugin-deps.test.js +0 -58
- package/dist/lib/__tests__/plugin-deps.test.js.map +0 -1
- package/dist/lib/__tests__/plugin-marketplace.test.d.ts +0 -2
- package/dist/lib/__tests__/plugin-marketplace.test.d.ts.map +0 -1
- package/dist/lib/__tests__/plugin-marketplace.test.js +0 -52
- package/dist/lib/__tests__/plugin-marketplace.test.js.map +0 -1
- package/dist/lib/__tests__/plugin-registry.test.d.ts +0 -2
- package/dist/lib/__tests__/plugin-registry.test.d.ts.map +0 -1
- package/dist/lib/__tests__/plugin-registry.test.js +0 -241
- package/dist/lib/__tests__/plugin-registry.test.js.map +0 -1
- package/dist/lib/__tests__/plugin-rollback.test.d.ts +0 -2
- package/dist/lib/__tests__/plugin-rollback.test.d.ts.map +0 -1
- package/dist/lib/__tests__/plugin-rollback.test.js +0 -60
- package/dist/lib/__tests__/plugin-rollback.test.js.map +0 -1
- package/dist/lib/__tests__/plugin-security.test.d.ts +0 -2
- package/dist/lib/__tests__/plugin-security.test.d.ts.map +0 -1
- package/dist/lib/__tests__/plugin-security.test.js +0 -70
- package/dist/lib/__tests__/plugin-security.test.js.map +0 -1
- package/dist/lib/__tests__/validateMode.test.d.ts +0 -2
- package/dist/lib/__tests__/validateMode.test.d.ts.map +0 -1
- package/dist/lib/__tests__/validateMode.test.js +0 -61
- package/dist/lib/__tests__/validateMode.test.js.map +0 -1
- package/dist/lib/__tests__/version.test.d.ts +0 -6
- package/dist/lib/__tests__/version.test.d.ts.map +0 -1
- package/dist/lib/__tests__/version.test.js +0 -37
- package/dist/lib/__tests__/version.test.js.map +0 -1
- package/dist/lib/__tests__/worktree-paths.test.d.ts +0 -2
- package/dist/lib/__tests__/worktree-paths.test.d.ts.map +0 -1
- package/dist/lib/__tests__/worktree-paths.test.js +0 -225
- package/dist/lib/__tests__/worktree-paths.test.js.map +0 -1
- package/dist/mcp/__tests__/cli-detection.test.d.ts +0 -2
- package/dist/mcp/__tests__/cli-detection.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/cli-detection.test.js +0 -50
- package/dist/mcp/__tests__/cli-detection.test.js.map +0 -1
- package/dist/mcp/__tests__/codex-core.test.d.ts +0 -2
- package/dist/mcp/__tests__/codex-core.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/codex-core.test.js +0 -143
- package/dist/mcp/__tests__/codex-core.test.js.map +0 -1
- package/dist/mcp/__tests__/codex-integration.test.d.ts +0 -2
- package/dist/mcp/__tests__/codex-integration.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/codex-integration.test.js +0 -59
- package/dist/mcp/__tests__/codex-integration.test.js.map +0 -1
- package/dist/mcp/__tests__/codex-reasoning-effort.test.d.ts +0 -2
- package/dist/mcp/__tests__/codex-reasoning-effort.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/codex-reasoning-effort.test.js +0 -141
- package/dist/mcp/__tests__/codex-reasoning-effort.test.js.map +0 -1
- package/dist/mcp/__tests__/gemini-core.test.d.ts +0 -2
- package/dist/mcp/__tests__/gemini-core.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/gemini-core.test.js +0 -53
- package/dist/mcp/__tests__/gemini-core.test.js.map +0 -1
- package/dist/mcp/__tests__/gemini-integration.test.d.ts +0 -2
- package/dist/mcp/__tests__/gemini-integration.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/gemini-integration.test.js +0 -50
- package/dist/mcp/__tests__/gemini-integration.test.js.map +0 -1
- package/dist/mcp/__tests__/gemini-yolo-env.test.d.ts +0 -2
- package/dist/mcp/__tests__/gemini-yolo-env.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/gemini-yolo-env.test.js +0 -274
- package/dist/mcp/__tests__/gemini-yolo-env.test.js.map +0 -1
- package/dist/mcp/__tests__/job-state-db-deprecation.test.d.ts +0 -2
- package/dist/mcp/__tests__/job-state-db-deprecation.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/job-state-db-deprecation.test.js +0 -166
- package/dist/mcp/__tests__/job-state-db-deprecation.test.js.map +0 -1
- package/dist/mcp/__tests__/omc-tools-server.test.d.ts +0 -2
- package/dist/mcp/__tests__/omc-tools-server.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/omc-tools-server.test.js +0 -108
- package/dist/mcp/__tests__/omc-tools-server.test.js.map +0 -1
- package/dist/mcp/__tests__/prompt-injection.test.d.ts +0 -2
- package/dist/mcp/__tests__/prompt-injection.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/prompt-injection.test.js +0 -86
- package/dist/mcp/__tests__/prompt-injection.test.js.map +0 -1
- package/dist/mcp/__tests__/shared-exec.test.d.ts +0 -2
- package/dist/mcp/__tests__/shared-exec.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/shared-exec.test.js +0 -151
- package/dist/mcp/__tests__/shared-exec.test.js.map +0 -1
- package/dist/notifications/__tests__/config-merge.test.d.ts +0 -2
- package/dist/notifications/__tests__/config-merge.test.d.ts.map +0 -1
- package/dist/notifications/__tests__/config-merge.test.js +0 -242
- package/dist/notifications/__tests__/config-merge.test.js.map +0 -1
- package/dist/notifications/__tests__/config.test.d.ts +0 -2
- package/dist/notifications/__tests__/config.test.d.ts.map +0 -1
- package/dist/notifications/__tests__/config.test.js +0 -227
- package/dist/notifications/__tests__/config.test.js.map +0 -1
- package/dist/notifications/__tests__/dispatcher.test.d.ts +0 -2
- package/dist/notifications/__tests__/dispatcher.test.d.ts.map +0 -1
- package/dist/notifications/__tests__/dispatcher.test.js +0 -898
- package/dist/notifications/__tests__/dispatcher.test.js.map +0 -1
- package/dist/notifications/__tests__/formatter.test.d.ts +0 -2
- package/dist/notifications/__tests__/formatter.test.d.ts.map +0 -1
- package/dist/notifications/__tests__/formatter.test.js +0 -72
- package/dist/notifications/__tests__/formatter.test.js.map +0 -1
- package/dist/notifications/__tests__/notify-registry-integration.test.d.ts +0 -2
- package/dist/notifications/__tests__/notify-registry-integration.test.d.ts.map +0 -1
- package/dist/notifications/__tests__/notify-registry-integration.test.js +0 -349
- package/dist/notifications/__tests__/notify-registry-integration.test.js.map +0 -1
- package/dist/notifications/__tests__/profiles.test.d.ts +0 -2
- package/dist/notifications/__tests__/profiles.test.d.ts.map +0 -1
- package/dist/notifications/__tests__/profiles.test.js +0 -253
- package/dist/notifications/__tests__/profiles.test.js.map +0 -1
- package/dist/notifications/__tests__/reply-config.test.d.ts +0 -2
- package/dist/notifications/__tests__/reply-config.test.d.ts.map +0 -1
- package/dist/notifications/__tests__/reply-config.test.js +0 -213
- package/dist/notifications/__tests__/reply-config.test.js.map +0 -1
- package/dist/notifications/__tests__/reply-listener.test.d.ts +0 -2
- package/dist/notifications/__tests__/reply-listener.test.d.ts.map +0 -1
- package/dist/notifications/__tests__/reply-listener.test.js +0 -431
- package/dist/notifications/__tests__/reply-listener.test.js.map +0 -1
- package/dist/notifications/__tests__/session-registry.test.d.ts +0 -2
- package/dist/notifications/__tests__/session-registry.test.d.ts.map +0 -1
- package/dist/notifications/__tests__/session-registry.test.js +0 -465
- package/dist/notifications/__tests__/session-registry.test.js.map +0 -1
- package/dist/notifications/__tests__/sleepMs.test.d.ts +0 -10
- package/dist/notifications/__tests__/sleepMs.test.d.ts.map +0 -1
- package/dist/notifications/__tests__/sleepMs.test.js +0 -117
- package/dist/notifications/__tests__/sleepMs.test.js.map +0 -1
- package/dist/notifications/__tests__/tmux.test.d.ts +0 -2
- package/dist/notifications/__tests__/tmux.test.d.ts.map +0 -1
- package/dist/notifications/__tests__/tmux.test.js +0 -137
- package/dist/notifications/__tests__/tmux.test.js.map +0 -1
- package/dist/skills/__tests__/ax-context-init.test.d.ts +0 -2
- package/dist/skills/__tests__/ax-context-init.test.d.ts.map +0 -1
- package/dist/skills/__tests__/ax-context-init.test.js +0 -36
- package/dist/skills/__tests__/ax-context-init.test.js.map +0 -1
- package/dist/skills/__tests__/mingw-escape.test.d.ts +0 -9
- package/dist/skills/__tests__/mingw-escape.test.d.ts.map +0 -1
- package/dist/skills/__tests__/mingw-escape.test.js +0 -105
- package/dist/skills/__tests__/mingw-escape.test.js.map +0 -1
- package/dist/team/__tests__/activity-log.test.d.ts +0 -2
- package/dist/team/__tests__/activity-log.test.d.ts.map +0 -1
- package/dist/team/__tests__/activity-log.test.js +0 -141
- package/dist/team/__tests__/activity-log.test.js.map +0 -1
- package/dist/team/__tests__/audit-log.test.d.ts +0 -2
- package/dist/team/__tests__/audit-log.test.d.ts.map +0 -1
- package/dist/team/__tests__/audit-log.test.js +0 -305
- package/dist/team/__tests__/audit-log.test.js.map +0 -1
- package/dist/team/__tests__/bridge-entry.test.d.ts +0 -2
- package/dist/team/__tests__/bridge-entry.test.d.ts.map +0 -1
- package/dist/team/__tests__/bridge-entry.test.js +0 -152
- package/dist/team/__tests__/bridge-entry.test.js.map +0 -1
- package/dist/team/__tests__/bridge-integration.test.d.ts +0 -2
- package/dist/team/__tests__/bridge-integration.test.d.ts.map +0 -1
- package/dist/team/__tests__/bridge-integration.test.js +0 -328
- package/dist/team/__tests__/bridge-integration.test.js.map +0 -1
- package/dist/team/__tests__/capabilities.test.d.ts +0 -2
- package/dist/team/__tests__/capabilities.test.d.ts.map +0 -1
- package/dist/team/__tests__/capabilities.test.js +0 -97
- package/dist/team/__tests__/capabilities.test.js.map +0 -1
- package/dist/team/__tests__/deadlock-detector.test.d.ts +0 -2
- package/dist/team/__tests__/deadlock-detector.test.d.ts.map +0 -1
- package/dist/team/__tests__/deadlock-detector.test.js +0 -50
- package/dist/team/__tests__/deadlock-detector.test.js.map +0 -1
- package/dist/team/__tests__/dependency-graph.test.d.ts +0 -2
- package/dist/team/__tests__/dependency-graph.test.d.ts.map +0 -1
- package/dist/team/__tests__/dependency-graph.test.js +0 -29
- package/dist/team/__tests__/dependency-graph.test.js.map +0 -1
- package/dist/team/__tests__/edge-cases.test.d.ts +0 -16
- package/dist/team/__tests__/edge-cases.test.d.ts.map +0 -1
- package/dist/team/__tests__/edge-cases.test.js +0 -737
- package/dist/team/__tests__/edge-cases.test.js.map +0 -1
- package/dist/team/__tests__/fs-utils.test.d.ts +0 -2
- package/dist/team/__tests__/fs-utils.test.d.ts.map +0 -1
- package/dist/team/__tests__/fs-utils.test.js +0 -74
- package/dist/team/__tests__/fs-utils.test.js.map +0 -1
- package/dist/team/__tests__/git-worktree.test.d.ts +0 -2
- package/dist/team/__tests__/git-worktree.test.d.ts.map +0 -1
- package/dist/team/__tests__/git-worktree.test.js +0 -90
- package/dist/team/__tests__/git-worktree.test.js.map +0 -1
- package/dist/team/__tests__/heartbeat.test.d.ts +0 -2
- package/dist/team/__tests__/heartbeat.test.d.ts.map +0 -1
- package/dist/team/__tests__/heartbeat.test.js +0 -93
- package/dist/team/__tests__/heartbeat.test.js.map +0 -1
- package/dist/team/__tests__/inbox-outbox.test.d.ts +0 -2
- package/dist/team/__tests__/inbox-outbox.test.d.ts.map +0 -1
- package/dist/team/__tests__/inbox-outbox.test.js +0 -220
- package/dist/team/__tests__/inbox-outbox.test.js.map +0 -1
- package/dist/team/__tests__/mcp-team-bridge.test.d.ts +0 -2
- package/dist/team/__tests__/mcp-team-bridge.test.d.ts.map +0 -1
- package/dist/team/__tests__/mcp-team-bridge.test.js +0 -458
- package/dist/team/__tests__/mcp-team-bridge.test.js.map +0 -1
- package/dist/team/__tests__/merge-coordinator.test.d.ts +0 -2
- package/dist/team/__tests__/merge-coordinator.test.d.ts.map +0 -1
- package/dist/team/__tests__/merge-coordinator.test.js +0 -128
- package/dist/team/__tests__/merge-coordinator.test.js.map +0 -1
- package/dist/team/__tests__/message-router.test.d.ts +0 -2
- package/dist/team/__tests__/message-router.test.d.ts.map +0 -1
- package/dist/team/__tests__/message-router.test.js +0 -78
- package/dist/team/__tests__/message-router.test.js.map +0 -1
- package/dist/team/__tests__/outbox-reader.test.d.ts +0 -2
- package/dist/team/__tests__/outbox-reader.test.d.ts.map +0 -1
- package/dist/team/__tests__/outbox-reader.test.js +0 -134
- package/dist/team/__tests__/outbox-reader.test.js.map +0 -1
- package/dist/team/__tests__/permissions.test.d.ts +0 -2
- package/dist/team/__tests__/permissions.test.d.ts.map +0 -1
- package/dist/team/__tests__/permissions.test.js +0 -255
- package/dist/team/__tests__/permissions.test.js.map +0 -1
- package/dist/team/__tests__/prompt-sanitization.test.d.ts +0 -2
- package/dist/team/__tests__/prompt-sanitization.test.d.ts.map +0 -1
- package/dist/team/__tests__/prompt-sanitization.test.js +0 -150
- package/dist/team/__tests__/prompt-sanitization.test.js.map +0 -1
- package/dist/team/__tests__/summary-report.test.d.ts +0 -2
- package/dist/team/__tests__/summary-report.test.d.ts.map +0 -1
- package/dist/team/__tests__/summary-report.test.js +0 -196
- package/dist/team/__tests__/summary-report.test.js.map +0 -1
- package/dist/team/__tests__/task-file-ops.test.d.ts +0 -2
- package/dist/team/__tests__/task-file-ops.test.d.ts.map +0 -1
- package/dist/team/__tests__/task-file-ops.test.js +0 -392
- package/dist/team/__tests__/task-file-ops.test.js.map +0 -1
- package/dist/team/__tests__/task-router.test.d.ts +0 -2
- package/dist/team/__tests__/task-router.test.d.ts.map +0 -1
- package/dist/team/__tests__/task-router.test.js +0 -118
- package/dist/team/__tests__/task-router.test.js.map +0 -1
- package/dist/team/__tests__/team-registration.test.d.ts +0 -2
- package/dist/team/__tests__/team-registration.test.d.ts.map +0 -1
- package/dist/team/__tests__/team-registration.test.js +0 -90
- package/dist/team/__tests__/team-registration.test.js.map +0 -1
- package/dist/team/__tests__/team-status.test.d.ts +0 -2
- package/dist/team/__tests__/team-status.test.d.ts.map +0 -1
- package/dist/team/__tests__/team-status.test.js +0 -146
- package/dist/team/__tests__/team-status.test.js.map +0 -1
- package/dist/team/__tests__/tmux-session.test.d.ts +0 -2
- package/dist/team/__tests__/tmux-session.test.d.ts.map +0 -1
- package/dist/team/__tests__/tmux-session.test.js +0 -60
- package/dist/team/__tests__/tmux-session.test.js.map +0 -1
- package/dist/team/__tests__/unified-team.test.d.ts +0 -2
- package/dist/team/__tests__/unified-team.test.d.ts.map +0 -1
- package/dist/team/__tests__/unified-team.test.js +0 -77
- package/dist/team/__tests__/unified-team.test.js.map +0 -1
- package/dist/team/__tests__/usage-tracker.test.d.ts +0 -2
- package/dist/team/__tests__/usage-tracker.test.d.ts.map +0 -1
- package/dist/team/__tests__/usage-tracker.test.js +0 -106
- package/dist/team/__tests__/usage-tracker.test.js.map +0 -1
- package/dist/team/__tests__/worker-health.test.d.ts +0 -2
- package/dist/team/__tests__/worker-health.test.d.ts.map +0 -1
- package/dist/team/__tests__/worker-health.test.js +0 -129
- package/dist/team/__tests__/worker-health.test.js.map +0 -1
- package/dist/team/__tests__/worker-restart.test.d.ts +0 -2
- package/dist/team/__tests__/worker-restart.test.d.ts.map +0 -1
- package/dist/team/__tests__/worker-restart.test.js +0 -122
- package/dist/team/__tests__/worker-restart.test.js.map +0 -1
- package/dist/tools/__tests__/ast-tools.test.d.ts +0 -2
- package/dist/tools/__tests__/ast-tools.test.d.ts.map +0 -1
- package/dist/tools/__tests__/ast-tools.test.js +0 -178
- package/dist/tools/__tests__/ast-tools.test.js.map +0 -1
- package/dist/tools/__tests__/lsp-tools.test.d.ts +0 -2
- package/dist/tools/__tests__/lsp-tools.test.d.ts.map +0 -1
- package/dist/tools/__tests__/lsp-tools.test.js +0 -252
- package/dist/tools/__tests__/lsp-tools.test.js.map +0 -1
- package/dist/tools/__tests__/schema-conversion.test.d.ts +0 -11
- package/dist/tools/__tests__/schema-conversion.test.d.ts.map +0 -1
- package/dist/tools/__tests__/schema-conversion.test.js +0 -270
- package/dist/tools/__tests__/schema-conversion.test.js.map +0 -1
- package/dist/tools/__tests__/state-tools.test.d.ts +0 -2
- package/dist/tools/__tests__/state-tools.test.d.ts.map +0 -1
- package/dist/tools/__tests__/state-tools.test.js +0 -444
- package/dist/tools/__tests__/state-tools.test.js.map +0 -1
- package/dist/tools/diagnostics/__tests__/index.test.d.ts +0 -2
- package/dist/tools/diagnostics/__tests__/index.test.d.ts.map +0 -1
- package/dist/tools/diagnostics/__tests__/index.test.js +0 -111
- package/dist/tools/diagnostics/__tests__/index.test.js.map +0 -1
- package/dist/tools/diagnostics/__tests__/lsp-aggregator.test.d.ts +0 -2
- package/dist/tools/diagnostics/__tests__/lsp-aggregator.test.d.ts.map +0 -1
- package/dist/tools/diagnostics/__tests__/lsp-aggregator.test.js +0 -120
- package/dist/tools/diagnostics/__tests__/lsp-aggregator.test.js.map +0 -1
- package/dist/tools/diagnostics/__tests__/tsc-runner.test.d.ts +0 -2
- package/dist/tools/diagnostics/__tests__/tsc-runner.test.d.ts.map +0 -1
- package/dist/tools/diagnostics/__tests__/tsc-runner.test.js +0 -86
- package/dist/tools/diagnostics/__tests__/tsc-runner.test.js.map +0 -1
- package/dist/tools/lsp/__tests__/client-eviction.test.d.ts +0 -2
- package/dist/tools/lsp/__tests__/client-eviction.test.d.ts.map +0 -1
- package/dist/tools/lsp/__tests__/client-eviction.test.js +0 -343
- package/dist/tools/lsp/__tests__/client-eviction.test.js.map +0 -1
- package/dist/tools/lsp/__tests__/client-timer-buffer.test.d.ts +0 -11
- package/dist/tools/lsp/__tests__/client-timer-buffer.test.d.ts.map +0 -1
- package/dist/tools/lsp/__tests__/client-timer-buffer.test.js +0 -222
- package/dist/tools/lsp/__tests__/client-timer-buffer.test.js.map +0 -1
- package/dist/tools/lsp/__tests__/client-win32-spawn.test.d.ts +0 -2
- package/dist/tools/lsp/__tests__/client-win32-spawn.test.d.ts.map +0 -1
- package/dist/tools/lsp/__tests__/client-win32-spawn.test.js +0 -84
- package/dist/tools/lsp/__tests__/client-win32-spawn.test.js.map +0 -1
- package/dist/tools/lsp/__tests__/command-exists.test.d.ts +0 -2
- package/dist/tools/lsp/__tests__/command-exists.test.d.ts.map +0 -1
- package/dist/tools/lsp/__tests__/command-exists.test.js +0 -104
- package/dist/tools/lsp/__tests__/command-exists.test.js.map +0 -1
- package/dist/tools/lsp/__tests__/utils.test.d.ts +0 -2
- package/dist/tools/lsp/__tests__/utils.test.d.ts.map +0 -1
- package/dist/tools/lsp/__tests__/utils.test.js +0 -338
- package/dist/tools/lsp/__tests__/utils.test.js.map +0 -1
- package/dist/tools/python-repl/__tests__/bridge-manager-cleanup.test.d.ts +0 -2
- package/dist/tools/python-repl/__tests__/bridge-manager-cleanup.test.d.ts.map +0 -1
- package/dist/tools/python-repl/__tests__/bridge-manager-cleanup.test.js +0 -76
- package/dist/tools/python-repl/__tests__/bridge-manager-cleanup.test.js.map +0 -1
- package/dist/tools/python-repl/__tests__/bridge-manager.test.d.ts +0 -2
- package/dist/tools/python-repl/__tests__/bridge-manager.test.d.ts.map +0 -1
- package/dist/tools/python-repl/__tests__/bridge-manager.test.js +0 -338
- package/dist/tools/python-repl/__tests__/bridge-manager.test.js.map +0 -1
- package/dist/tools/python-repl/__tests__/socket-client.test.d.ts +0 -2
- package/dist/tools/python-repl/__tests__/socket-client.test.d.ts.map +0 -1
- package/dist/tools/python-repl/__tests__/socket-client.test.js +0 -155
- package/dist/tools/python-repl/__tests__/socket-client.test.js.map +0 -1
- package/dist/utils/__tests__/paths.test.d.ts +0 -2
- package/dist/utils/__tests__/paths.test.d.ts.map +0 -1
- package/dist/utils/__tests__/paths.test.js +0 -88
- package/dist/utils/__tests__/paths.test.js.map +0 -1
- package/dist/utils/__tests__/string-width.test.d.ts +0 -6
- package/dist/utils/__tests__/string-width.test.d.ts.map +0 -1
- package/dist/utils/__tests__/string-width.test.js +0 -173
- package/dist/utils/__tests__/string-width.test.js.map +0 -1
- package/dist/verification/tier-selector.test.d.ts +0 -2
- package/dist/verification/tier-selector.test.d.ts.map +0 -1
- package/dist/verification/tier-selector.test.js +0 -282
- package/dist/verification/tier-selector.test.js.map +0 -1
|
@@ -1,1273 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
|
2
|
-
import { mkdirSync, writeFileSync, readFileSync, rmSync, existsSync } from 'fs';
|
|
3
|
-
import { join } from 'path';
|
|
4
|
-
import { tmpdir, homedir } from 'os';
|
|
5
|
-
import { execSync } from 'child_process';
|
|
6
|
-
// Mock isTeamEnabled so team/ultrapilot/swarm keywords are detected in CI
|
|
7
|
-
vi.mock('../features/auto-update.js', async (importOriginal) => {
|
|
8
|
-
const actual = await importOriginal();
|
|
9
|
-
return {
|
|
10
|
-
...actual,
|
|
11
|
-
isTeamEnabled: () => true,
|
|
12
|
-
};
|
|
13
|
-
});
|
|
14
|
-
import { extractPromptText, removeCodeBlocks, detectKeywordsWithType, hasKeyword, getPrimaryKeyword } from '../hooks/keyword-detector/index.js';
|
|
15
|
-
import { formatTodoStatus, getNextPendingTodo } from '../hooks/todo-continuation/index.js';
|
|
16
|
-
import { resetTodoContinuationAttempts } from '../hooks/persistent-mode/index.js';
|
|
17
|
-
import { startUltraQA, clearUltraQAState, isRalphLoopActive } from '../hooks/ultraqa/index.js';
|
|
18
|
-
import { createRalphLoopHook, clearRalphState, isUltraQAActive } from '../hooks/ralph/index.js';
|
|
19
|
-
import { processHook } from '../hooks/bridge.js';
|
|
20
|
-
describe('Keyword Detector', () => {
|
|
21
|
-
describe('extractPromptText', () => {
|
|
22
|
-
it('should extract text from text parts', () => {
|
|
23
|
-
const parts = [
|
|
24
|
-
{ type: 'text', text: 'Hello world' },
|
|
25
|
-
{ type: 'text', text: 'How are you?' }
|
|
26
|
-
];
|
|
27
|
-
expect(extractPromptText(parts)).toBe('Hello world How are you?');
|
|
28
|
-
});
|
|
29
|
-
it('should filter out non-text parts', () => {
|
|
30
|
-
const parts = [
|
|
31
|
-
{ type: 'text', text: 'Hello' },
|
|
32
|
-
{ type: 'image', url: 'test.jpg' },
|
|
33
|
-
{ type: 'text', text: 'world' }
|
|
34
|
-
];
|
|
35
|
-
expect(extractPromptText(parts)).toBe('Hello world');
|
|
36
|
-
});
|
|
37
|
-
it('should handle empty parts array', () => {
|
|
38
|
-
expect(extractPromptText([])).toBe('');
|
|
39
|
-
});
|
|
40
|
-
it('should handle parts without text', () => {
|
|
41
|
-
const parts = [
|
|
42
|
-
{ type: 'text' },
|
|
43
|
-
{ type: 'text', text: undefined }
|
|
44
|
-
];
|
|
45
|
-
expect(extractPromptText(parts)).toBe('');
|
|
46
|
-
});
|
|
47
|
-
it('should join multiple text parts with space', () => {
|
|
48
|
-
const parts = [
|
|
49
|
-
{ type: 'text', text: 'analyze' },
|
|
50
|
-
{ type: 'text', text: 'this' },
|
|
51
|
-
{ type: 'text', text: 'code' }
|
|
52
|
-
];
|
|
53
|
-
expect(extractPromptText(parts)).toBe('analyze this code');
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
describe('removeCodeBlocks', () => {
|
|
57
|
-
it('should remove triple backtick fenced code blocks', () => {
|
|
58
|
-
const text = 'Some text\n```javascript\nconst x = 1;\n```\nMore text';
|
|
59
|
-
const result = removeCodeBlocks(text);
|
|
60
|
-
expect(result).not.toContain('const x = 1');
|
|
61
|
-
expect(result).toContain('Some text');
|
|
62
|
-
expect(result).toContain('More text');
|
|
63
|
-
});
|
|
64
|
-
it('should remove tilde fenced code blocks', () => {
|
|
65
|
-
const text = 'Before\n~~~python\nprint("hello")\n~~~\nAfter';
|
|
66
|
-
const result = removeCodeBlocks(text);
|
|
67
|
-
expect(result).not.toContain('print("hello")');
|
|
68
|
-
expect(result).toContain('Before');
|
|
69
|
-
expect(result).toContain('After');
|
|
70
|
-
});
|
|
71
|
-
it('should remove inline code with single backticks', () => {
|
|
72
|
-
const text = 'Use `analyze` command here';
|
|
73
|
-
const result = removeCodeBlocks(text);
|
|
74
|
-
expect(result).not.toContain('`analyze`');
|
|
75
|
-
expect(result).toContain('Use');
|
|
76
|
-
expect(result).toContain('command here');
|
|
77
|
-
});
|
|
78
|
-
it('should handle multiple code blocks', () => {
|
|
79
|
-
const text = '```js\ncode1\n```\ntext\n```ts\ncode2\n```';
|
|
80
|
-
const result = removeCodeBlocks(text);
|
|
81
|
-
expect(result).not.toContain('code1');
|
|
82
|
-
expect(result).not.toContain('code2');
|
|
83
|
-
expect(result).toContain('text');
|
|
84
|
-
});
|
|
85
|
-
it('should handle text without code blocks', () => {
|
|
86
|
-
const text = 'Just plain text here';
|
|
87
|
-
expect(removeCodeBlocks(text)).toBe(text);
|
|
88
|
-
});
|
|
89
|
-
it('should handle empty string', () => {
|
|
90
|
-
expect(removeCodeBlocks('')).toBe('');
|
|
91
|
-
});
|
|
92
|
-
it('should handle nested inline code', () => {
|
|
93
|
-
const text = 'Text with `inline` and `another` code';
|
|
94
|
-
const result = removeCodeBlocks(text);
|
|
95
|
-
expect(result).not.toContain('`');
|
|
96
|
-
expect(result).toContain('Text with');
|
|
97
|
-
expect(result).toContain('and');
|
|
98
|
-
expect(result).toContain('code');
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
describe('detectKeywordsWithType', () => {
|
|
102
|
-
it('should detect ultrawork keyword', () => {
|
|
103
|
-
const detected = detectKeywordsWithType('I need ultrawork mode');
|
|
104
|
-
expect(detected).toHaveLength(1);
|
|
105
|
-
expect(detected[0].type).toBe('ultrawork');
|
|
106
|
-
expect(detected[0].keyword).toBe('ultrawork');
|
|
107
|
-
});
|
|
108
|
-
it('should detect ulw abbreviation', () => {
|
|
109
|
-
const detected = detectKeywordsWithType('Use ulw for this task');
|
|
110
|
-
expect(detected).toHaveLength(1);
|
|
111
|
-
expect(detected[0].type).toBe('ultrawork');
|
|
112
|
-
expect(detected[0].keyword).toBe('ulw');
|
|
113
|
-
});
|
|
114
|
-
it('should detect ultrathink keyword', () => {
|
|
115
|
-
const detected = detectKeywordsWithType('I need to ultrathink this');
|
|
116
|
-
expect(detected).toHaveLength(1);
|
|
117
|
-
expect(detected[0].type).toBe('ultrathink');
|
|
118
|
-
expect(detected[0].keyword).toBe('ultrathink');
|
|
119
|
-
});
|
|
120
|
-
it('should detect ultrathink keyword directly', () => {
|
|
121
|
-
const detected = detectKeywordsWithType('Let me ultrathink about it');
|
|
122
|
-
expect(detected).toHaveLength(1);
|
|
123
|
-
expect(detected[0].type).toBe('ultrathink');
|
|
124
|
-
expect(detected[0].keyword).toBe('ultrathink');
|
|
125
|
-
});
|
|
126
|
-
it('should detect deepsearch keywords for codebase search', () => {
|
|
127
|
-
const patterns = [
|
|
128
|
-
'search the codebase',
|
|
129
|
-
'find in codebase',
|
|
130
|
-
'deepsearch for pattern'
|
|
131
|
-
];
|
|
132
|
-
for (const pattern of patterns) {
|
|
133
|
-
const detected = detectKeywordsWithType(pattern);
|
|
134
|
-
expect(detected.length).toBeGreaterThan(0);
|
|
135
|
-
expect(detected[0].type).toBe('deepsearch');
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
it('should detect analyze keywords with restricted patterns', () => {
|
|
139
|
-
const patterns = [
|
|
140
|
-
'deep analyze this code',
|
|
141
|
-
'deepanalyze this code',
|
|
142
|
-
'deep-analyze the issue'
|
|
143
|
-
];
|
|
144
|
-
for (const pattern of patterns) {
|
|
145
|
-
const detected = detectKeywordsWithType(pattern);
|
|
146
|
-
expect(detected.length).toBeGreaterThan(0);
|
|
147
|
-
expect(detected[0].type).toBe('analyze');
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
it('should be case insensitive', () => {
|
|
151
|
-
const variants = ['ULTRAWORK', 'UltraWork', 'uLtRaWoRk'];
|
|
152
|
-
for (const variant of variants) {
|
|
153
|
-
const detected = detectKeywordsWithType(variant);
|
|
154
|
-
expect(detected).toHaveLength(1);
|
|
155
|
-
expect(detected[0].type).toBe('ultrawork');
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
it('should respect word boundaries', () => {
|
|
159
|
-
// Should not match partial words
|
|
160
|
-
const text = 'multiwork is not ultrawork';
|
|
161
|
-
const detected = detectKeywordsWithType(text);
|
|
162
|
-
expect(detected).toHaveLength(1);
|
|
163
|
-
expect(detected[0].keyword).toBe('ultrawork');
|
|
164
|
-
});
|
|
165
|
-
it('should include position information', () => {
|
|
166
|
-
const detected = detectKeywordsWithType('Start search the codebase here');
|
|
167
|
-
expect(detected[0].position).toBeGreaterThanOrEqual(0);
|
|
168
|
-
});
|
|
169
|
-
it('should return empty array for no matches', () => {
|
|
170
|
-
const detected = detectKeywordsWithType('Just plain text');
|
|
171
|
-
expect(detected).toEqual([]);
|
|
172
|
-
});
|
|
173
|
-
it('should detect multiple different keyword types', () => {
|
|
174
|
-
const text = 'search the codebase and deep analyze the bug';
|
|
175
|
-
const detected = detectKeywordsWithType(text);
|
|
176
|
-
expect(detected.length).toBeGreaterThanOrEqual(2);
|
|
177
|
-
const types = detected.map(d => d.type);
|
|
178
|
-
expect(types).toContain('deepsearch');
|
|
179
|
-
expect(types).toContain('analyze');
|
|
180
|
-
});
|
|
181
|
-
// New keyword types tests
|
|
182
|
-
it('should detect cancel keyword', () => {
|
|
183
|
-
const detected = detectKeywordsWithType('cancelomc this task');
|
|
184
|
-
expect(detected).toHaveLength(1);
|
|
185
|
-
expect(detected[0].type).toBe('cancel');
|
|
186
|
-
expect(detected[0].keyword).toBe('cancelomc');
|
|
187
|
-
});
|
|
188
|
-
it('should detect cancel keyword variations', () => {
|
|
189
|
-
const cancelTerms = ['cancelomc', 'stopomc'];
|
|
190
|
-
for (const term of cancelTerms) {
|
|
191
|
-
const detected = detectKeywordsWithType(`Please ${term} the process`);
|
|
192
|
-
expect(detected).toHaveLength(1);
|
|
193
|
-
expect(detected[0].type).toBe('cancel');
|
|
194
|
-
expect(detected[0].keyword).toBe(term);
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
it('should route legacy ultrapilot keyword to team (with dual-emission)', () => {
|
|
198
|
-
const detected = detectKeywordsWithType('use ultrapilot for this');
|
|
199
|
-
expect(detected).toHaveLength(2);
|
|
200
|
-
expect(detected[0].type).toBe('ultrapilot');
|
|
201
|
-
expect(detected[1].type).toBe('team');
|
|
202
|
-
expect(detected[0].keyword).toBe('ultrapilot');
|
|
203
|
-
});
|
|
204
|
-
it('should route legacy ultrapilot patterns to team', () => {
|
|
205
|
-
const patterns = [
|
|
206
|
-
'ultrapilot this project',
|
|
207
|
-
'parallel build the app',
|
|
208
|
-
'swarm build the system'
|
|
209
|
-
];
|
|
210
|
-
for (const pattern of patterns) {
|
|
211
|
-
const detected = detectKeywordsWithType(pattern);
|
|
212
|
-
expect(detected.length).toBeGreaterThan(0);
|
|
213
|
-
const hasTeam = detected.some(d => d.type === 'team');
|
|
214
|
-
expect(hasTeam).toBe(true);
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
it('should route legacy swarm keyword to team (with dual-emission)', () => {
|
|
218
|
-
const detected = detectKeywordsWithType('swarm 5 agents to fix this');
|
|
219
|
-
expect(detected).toHaveLength(2);
|
|
220
|
-
expect(detected[0].type).toBe('swarm');
|
|
221
|
-
expect(detected[1].type).toBe('team');
|
|
222
|
-
expect(detected[0].keyword).toBe('swarm 5 agents');
|
|
223
|
-
});
|
|
224
|
-
it('should route coordinated agents pattern to team (with dual-emission)', () => {
|
|
225
|
-
const detected = detectKeywordsWithType('use coordinated agents');
|
|
226
|
-
expect(detected).toHaveLength(2);
|
|
227
|
-
expect(detected[0].type).toBe('swarm');
|
|
228
|
-
expect(detected[1].type).toBe('team');
|
|
229
|
-
expect(detected[0].keyword).toBe('coordinated agents');
|
|
230
|
-
});
|
|
231
|
-
it('should detect pipeline keyword', () => {
|
|
232
|
-
const detected = detectKeywordsWithType('use agent pipeline for this');
|
|
233
|
-
expect(detected).toHaveLength(1);
|
|
234
|
-
expect(detected[0].type).toBe('pipeline');
|
|
235
|
-
expect(detected[0].keyword).toBe('agent pipeline');
|
|
236
|
-
});
|
|
237
|
-
it('should detect chain agents pattern', () => {
|
|
238
|
-
const detected = detectKeywordsWithType('chain agents together');
|
|
239
|
-
expect(detected).toHaveLength(1);
|
|
240
|
-
expect(detected[0].type).toBe('pipeline');
|
|
241
|
-
expect(detected[0].keyword).toBe('chain agents');
|
|
242
|
-
});
|
|
243
|
-
it('should detect ralplan keyword', () => {
|
|
244
|
-
const detected = detectKeywordsWithType('ralplan this feature');
|
|
245
|
-
expect(detected).toHaveLength(1);
|
|
246
|
-
expect(detected[0].type).toBe('ralplan');
|
|
247
|
-
expect(detected[0].keyword).toBe('ralplan');
|
|
248
|
-
});
|
|
249
|
-
it('should detect plan patterns', () => {
|
|
250
|
-
const patterns = [
|
|
251
|
-
'plan this feature',
|
|
252
|
-
'plan the refactoring'
|
|
253
|
-
];
|
|
254
|
-
for (const pattern of patterns) {
|
|
255
|
-
const detected = detectKeywordsWithType(pattern);
|
|
256
|
-
expect(detected.length).toBeGreaterThan(0);
|
|
257
|
-
const hasPlan = detected.some(d => d.type === 'plan');
|
|
258
|
-
expect(hasPlan).toBe(true);
|
|
259
|
-
}
|
|
260
|
-
});
|
|
261
|
-
it('should detect tdd keyword', () => {
|
|
262
|
-
const detected = detectKeywordsWithType('use tdd for this');
|
|
263
|
-
expect(detected).toHaveLength(1);
|
|
264
|
-
expect(detected[0].type).toBe('tdd');
|
|
265
|
-
expect(detected[0].keyword).toBe('tdd');
|
|
266
|
-
});
|
|
267
|
-
it('should detect tdd patterns', () => {
|
|
268
|
-
const patterns = [
|
|
269
|
-
'test first development',
|
|
270
|
-
'use tdd approach'
|
|
271
|
-
];
|
|
272
|
-
for (const pattern of patterns) {
|
|
273
|
-
const detected = detectKeywordsWithType(pattern);
|
|
274
|
-
expect(detected.length).toBeGreaterThan(0);
|
|
275
|
-
const hasTDD = detected.some(d => d.type === 'tdd');
|
|
276
|
-
expect(hasTDD).toBe(true);
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
it('should not detect research keyword', () => {
|
|
280
|
-
const detected = detectKeywordsWithType('research this topic');
|
|
281
|
-
expect(detected).toHaveLength(0);
|
|
282
|
-
});
|
|
283
|
-
it('should detect deepsearch keyword', () => {
|
|
284
|
-
const detected = detectKeywordsWithType('deepsearch for the pattern');
|
|
285
|
-
expect(detected).toHaveLength(1);
|
|
286
|
-
expect(detected[0].type).toBe('deepsearch');
|
|
287
|
-
expect(detected[0].keyword).toBe('deepsearch');
|
|
288
|
-
});
|
|
289
|
-
it('should detect deepsearch patterns', () => {
|
|
290
|
-
const patterns = [
|
|
291
|
-
'search the codebase for errors',
|
|
292
|
-
'find in codebase',
|
|
293
|
-
'find in the codebase'
|
|
294
|
-
];
|
|
295
|
-
for (const pattern of patterns) {
|
|
296
|
-
const detected = detectKeywordsWithType(pattern);
|
|
297
|
-
expect(detected.length).toBeGreaterThan(0);
|
|
298
|
-
const hasDeepsearch = detected.some(d => d.type === 'deepsearch');
|
|
299
|
-
expect(hasDeepsearch).toBe(true);
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
it('should NOT detect deepsearch for generic find', () => {
|
|
303
|
-
const patterns = [
|
|
304
|
-
'find the file',
|
|
305
|
-
'find this function',
|
|
306
|
-
'search for help'
|
|
307
|
-
];
|
|
308
|
-
for (const pattern of patterns) {
|
|
309
|
-
const detected = detectKeywordsWithType(pattern);
|
|
310
|
-
const hasDeepsearch = detected.some(d => d.type === 'deepsearch');
|
|
311
|
-
expect(hasDeepsearch).toBe(false);
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
it('should detect analyze patterns with restrictions', () => {
|
|
315
|
-
const patterns = [
|
|
316
|
-
'deep analyze this code',
|
|
317
|
-
'deepanalyze this issue',
|
|
318
|
-
'deep-analyze the problem'
|
|
319
|
-
];
|
|
320
|
-
for (const pattern of patterns) {
|
|
321
|
-
const detected = detectKeywordsWithType(pattern);
|
|
322
|
-
expect(detected.length).toBeGreaterThan(0);
|
|
323
|
-
const hasAnalyze = detected.some(d => d.type === 'analyze');
|
|
324
|
-
expect(hasAnalyze).toBe(true);
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
it('should NOT detect analyze for generic patterns', () => {
|
|
328
|
-
const patterns = [
|
|
329
|
-
'how to do this',
|
|
330
|
-
'understand this code',
|
|
331
|
-
'review this code',
|
|
332
|
-
'analyze without context',
|
|
333
|
-
'investigate the bug',
|
|
334
|
-
'debug the issue'
|
|
335
|
-
];
|
|
336
|
-
for (const pattern of patterns) {
|
|
337
|
-
const detected = detectKeywordsWithType(pattern);
|
|
338
|
-
const hasAnalyze = detected.some(d => d.type === 'analyze');
|
|
339
|
-
expect(hasAnalyze).toBe(false);
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
});
|
|
343
|
-
describe('hasKeyword', () => {
|
|
344
|
-
it('should return true when keyword exists', () => {
|
|
345
|
-
expect(hasKeyword('use ultrawork mode')).toBe(true);
|
|
346
|
-
expect(hasKeyword('search the codebase')).toBe(true);
|
|
347
|
-
expect(hasKeyword('deep analyze the bug')).toBe(true);
|
|
348
|
-
});
|
|
349
|
-
it('should return false when no keyword exists', () => {
|
|
350
|
-
expect(hasKeyword('just normal text')).toBe(false);
|
|
351
|
-
expect(hasKeyword('hello world')).toBe(false);
|
|
352
|
-
});
|
|
353
|
-
it('should ignore keywords in code blocks', () => {
|
|
354
|
-
const text = 'Normal text\n```\nsearch in code\n```\nMore text';
|
|
355
|
-
expect(hasKeyword(text)).toBe(false);
|
|
356
|
-
});
|
|
357
|
-
it('should detect keywords outside code blocks', () => {
|
|
358
|
-
const text = 'Please search the codebase\n```\nsome code\n```\nfor this';
|
|
359
|
-
expect(hasKeyword(text)).toBe(true);
|
|
360
|
-
});
|
|
361
|
-
it('should handle empty string', () => {
|
|
362
|
-
expect(hasKeyword('')).toBe(false);
|
|
363
|
-
});
|
|
364
|
-
});
|
|
365
|
-
describe('getPrimaryKeyword', () => {
|
|
366
|
-
it('should return highest priority keyword', () => {
|
|
367
|
-
// ultrawork has highest priority
|
|
368
|
-
const text = 'search and analyze with ultrawork';
|
|
369
|
-
const primary = getPrimaryKeyword(text);
|
|
370
|
-
expect(primary).not.toBeNull();
|
|
371
|
-
expect(primary.type).toBe('ultrawork');
|
|
372
|
-
});
|
|
373
|
-
it('should return ultrathink when present', () => {
|
|
374
|
-
const text = 'ultrathink about this problem';
|
|
375
|
-
const primary = getPrimaryKeyword(text);
|
|
376
|
-
expect(primary).not.toBeNull();
|
|
377
|
-
expect(primary.type).toBe('ultrathink');
|
|
378
|
-
});
|
|
379
|
-
it('should return deepsearch for codebase search', () => {
|
|
380
|
-
const text = 'find in codebase';
|
|
381
|
-
const primary = getPrimaryKeyword(text);
|
|
382
|
-
expect(primary).not.toBeNull();
|
|
383
|
-
expect(primary.type).toBe('deepsearch');
|
|
384
|
-
});
|
|
385
|
-
it('should return analyze when only analyze keyword', () => {
|
|
386
|
-
const text = 'deep analyze the issue';
|
|
387
|
-
const primary = getPrimaryKeyword(text);
|
|
388
|
-
expect(primary).not.toBeNull();
|
|
389
|
-
expect(primary.type).toBe('analyze');
|
|
390
|
-
});
|
|
391
|
-
it('should return null when no keywords', () => {
|
|
392
|
-
const primary = getPrimaryKeyword('just normal text');
|
|
393
|
-
expect(primary).toBeNull();
|
|
394
|
-
});
|
|
395
|
-
it('should ignore code blocks', () => {
|
|
396
|
-
const text = '```\nultrawork code\n```\nsearch the codebase';
|
|
397
|
-
const primary = getPrimaryKeyword(text);
|
|
398
|
-
expect(primary).not.toBeNull();
|
|
399
|
-
expect(primary.type).toBe('deepsearch');
|
|
400
|
-
});
|
|
401
|
-
it('should return first detected when same priority', () => {
|
|
402
|
-
// deepsearch has higher priority than analyze in the priority list
|
|
403
|
-
const text = 'search the codebase and deep analyze the bug';
|
|
404
|
-
const primary = getPrimaryKeyword(text);
|
|
405
|
-
expect(primary).not.toBeNull();
|
|
406
|
-
// Should return deepsearch as it comes first in priority list
|
|
407
|
-
expect(primary.type).toBe('deepsearch');
|
|
408
|
-
});
|
|
409
|
-
// New priority tests for new keywords
|
|
410
|
-
it('should give cancel highest priority', () => {
|
|
411
|
-
const primary = getPrimaryKeyword('stopomc searching for files');
|
|
412
|
-
expect(primary).not.toBeNull();
|
|
413
|
-
expect(primary.type).toBe('cancel');
|
|
414
|
-
});
|
|
415
|
-
it('should give cancel priority over analyze', () => {
|
|
416
|
-
const primary = getPrimaryKeyword('cancelomc this investigation');
|
|
417
|
-
expect(primary).not.toBeNull();
|
|
418
|
-
expect(primary.type).toBe('cancel');
|
|
419
|
-
});
|
|
420
|
-
it('should prioritize cancel over all other keywords', () => {
|
|
421
|
-
const primary = getPrimaryKeyword('stopomc ultrawork and search');
|
|
422
|
-
expect(primary).not.toBeNull();
|
|
423
|
-
expect(primary.type).toBe('cancel');
|
|
424
|
-
});
|
|
425
|
-
it('should prioritize ralph after cancel', () => {
|
|
426
|
-
const primary = getPrimaryKeyword('ralph mode for the task');
|
|
427
|
-
expect(primary).not.toBeNull();
|
|
428
|
-
expect(primary.type).toBe('ralph');
|
|
429
|
-
});
|
|
430
|
-
it('should prioritize ultrapilot for legacy ultrapilot trigger', () => {
|
|
431
|
-
const primary = getPrimaryKeyword('ultrapilot this task');
|
|
432
|
-
expect(primary).not.toBeNull();
|
|
433
|
-
expect(primary.type).toBe('ultrapilot');
|
|
434
|
-
});
|
|
435
|
-
it('should prioritize team for legacy swarm trigger', () => {
|
|
436
|
-
const primary = getPrimaryKeyword('swarm 5 agents for this');
|
|
437
|
-
expect(primary).not.toBeNull();
|
|
438
|
-
expect(primary.type).toBe('team');
|
|
439
|
-
});
|
|
440
|
-
it('should prioritize pipeline correctly', () => {
|
|
441
|
-
const primary = getPrimaryKeyword('agent pipeline the task');
|
|
442
|
-
expect(primary).not.toBeNull();
|
|
443
|
-
expect(primary.type).toBe('pipeline');
|
|
444
|
-
});
|
|
445
|
-
it('should prioritize ralplan over plan', () => {
|
|
446
|
-
const primary = getPrimaryKeyword('ralplan this project');
|
|
447
|
-
expect(primary).not.toBeNull();
|
|
448
|
-
expect(primary.type).toBe('ralplan');
|
|
449
|
-
});
|
|
450
|
-
it('should detect plan correctly', () => {
|
|
451
|
-
const primary = getPrimaryKeyword('plan this feature');
|
|
452
|
-
expect(primary).not.toBeNull();
|
|
453
|
-
expect(primary.type).toBe('plan');
|
|
454
|
-
});
|
|
455
|
-
it('should prioritize tdd correctly', () => {
|
|
456
|
-
const primary = getPrimaryKeyword('tdd for this feature');
|
|
457
|
-
expect(primary).not.toBeNull();
|
|
458
|
-
expect(primary.type).toBe('tdd');
|
|
459
|
-
});
|
|
460
|
-
it('should return null for removed research keyword', () => {
|
|
461
|
-
const primary = getPrimaryKeyword('research this topic');
|
|
462
|
-
expect(primary).toBeNull();
|
|
463
|
-
});
|
|
464
|
-
it('should prioritize deepsearch over generic search', () => {
|
|
465
|
-
const primary = getPrimaryKeyword('search the codebase');
|
|
466
|
-
expect(primary).not.toBeNull();
|
|
467
|
-
expect(primary.type).toBe('deepsearch');
|
|
468
|
-
});
|
|
469
|
-
it('should prioritize analyze with restricted pattern', () => {
|
|
470
|
-
const primary = getPrimaryKeyword('deep analyze the bug');
|
|
471
|
-
expect(primary).not.toBeNull();
|
|
472
|
-
expect(primary.type).toBe('analyze');
|
|
473
|
-
});
|
|
474
|
-
});
|
|
475
|
-
});
|
|
476
|
-
describe('Team staged workflow integration', () => {
|
|
477
|
-
let testDir;
|
|
478
|
-
const sessionId = 'team-session-test';
|
|
479
|
-
beforeEach(() => {
|
|
480
|
-
testDir = join(tmpdir(), `omc-team-test-${Date.now()}-${Math.random().toString(36).slice(2)}`);
|
|
481
|
-
mkdirSync(join(testDir, '.omc', 'state', 'sessions', sessionId), { recursive: true });
|
|
482
|
-
execSync('git init', { cwd: testDir });
|
|
483
|
-
});
|
|
484
|
-
afterEach(() => {
|
|
485
|
-
rmSync(testDir, { recursive: true, force: true });
|
|
486
|
-
});
|
|
487
|
-
it('restores active Team stage on session-start', async () => {
|
|
488
|
-
writeFileSync(join(testDir, '.omc', 'state', 'sessions', sessionId, 'team-state.json'), JSON.stringify({
|
|
489
|
-
active: true,
|
|
490
|
-
session_id: sessionId,
|
|
491
|
-
stage: 'team-exec',
|
|
492
|
-
team_name: 'delivery-team'
|
|
493
|
-
}));
|
|
494
|
-
const result = await processHook('session-start', {
|
|
495
|
-
sessionId,
|
|
496
|
-
directory: testDir,
|
|
497
|
-
});
|
|
498
|
-
expect(result.continue).toBe(true);
|
|
499
|
-
expect(result.message || '').toContain('[TEAM MODE RESTORED]');
|
|
500
|
-
expect(result.message || '').toContain('delivery-team');
|
|
501
|
-
expect(result.message || '').toContain('team-exec');
|
|
502
|
-
});
|
|
503
|
-
it('emits terminal Team restore guidance on cancelled stage', async () => {
|
|
504
|
-
writeFileSync(join(testDir, '.omc', 'state', 'sessions', sessionId, 'team-state.json'), JSON.stringify({
|
|
505
|
-
active: true,
|
|
506
|
-
session_id: sessionId,
|
|
507
|
-
stage: 'team-fix',
|
|
508
|
-
status: 'cancelled',
|
|
509
|
-
team_name: 'delivery-team'
|
|
510
|
-
}));
|
|
511
|
-
const result = await processHook('session-start', {
|
|
512
|
-
sessionId,
|
|
513
|
-
directory: testDir,
|
|
514
|
-
});
|
|
515
|
-
expect(result.continue).toBe(true);
|
|
516
|
-
expect(result.message || '').toContain('[TEAM MODE TERMINAL STATE DETECTED]');
|
|
517
|
-
expect(result.message || '').toContain('cancel');
|
|
518
|
-
});
|
|
519
|
-
it('enforces verify stage continuation while active and non-terminal', async () => {
|
|
520
|
-
writeFileSync(join(testDir, '.omc', 'state', 'sessions', sessionId, 'team-state.json'), JSON.stringify({
|
|
521
|
-
active: true,
|
|
522
|
-
session_id: sessionId,
|
|
523
|
-
stage: 'team-verify',
|
|
524
|
-
team_name: 'delivery-team'
|
|
525
|
-
}));
|
|
526
|
-
const result = await processHook('persistent-mode', {
|
|
527
|
-
sessionId,
|
|
528
|
-
directory: testDir,
|
|
529
|
-
});
|
|
530
|
-
expect(result.continue).toBe(true);
|
|
531
|
-
expect(result.message).toContain('[TEAM MODE CONTINUATION]');
|
|
532
|
-
expect(result.message).toContain('team-verify');
|
|
533
|
-
expect(result.message).toContain('Continue verification');
|
|
534
|
-
});
|
|
535
|
-
it('enforces fix stage continuation while active and non-terminal', async () => {
|
|
536
|
-
writeFileSync(join(testDir, '.omc', 'state', 'sessions', sessionId, 'team-state.json'), JSON.stringify({
|
|
537
|
-
active: true,
|
|
538
|
-
session_id: sessionId,
|
|
539
|
-
stage: 'team-fix',
|
|
540
|
-
team_name: 'delivery-team'
|
|
541
|
-
}));
|
|
542
|
-
const result = await processHook('persistent-mode', {
|
|
543
|
-
sessionId,
|
|
544
|
-
directory: testDir,
|
|
545
|
-
});
|
|
546
|
-
expect(result.continue).toBe(true);
|
|
547
|
-
expect(result.message).toContain('[TEAM MODE CONTINUATION]');
|
|
548
|
-
expect(result.message).toContain('team-fix');
|
|
549
|
-
expect(result.message).toContain('fix loop');
|
|
550
|
-
});
|
|
551
|
-
it('allows terminal cleanup when Team stage is cancelled', async () => {
|
|
552
|
-
writeFileSync(join(testDir, '.omc', 'state', 'sessions', sessionId, 'team-state.json'), JSON.stringify({
|
|
553
|
-
active: true,
|
|
554
|
-
session_id: sessionId,
|
|
555
|
-
stage: 'team-verify',
|
|
556
|
-
status: 'cancelled',
|
|
557
|
-
team_name: 'delivery-team'
|
|
558
|
-
}));
|
|
559
|
-
const result = await processHook('persistent-mode', {
|
|
560
|
-
sessionId,
|
|
561
|
-
directory: testDir,
|
|
562
|
-
});
|
|
563
|
-
expect(result.continue).toBe(true);
|
|
564
|
-
expect(result.message || '').not.toContain('[TEAM MODE CONTINUATION]');
|
|
565
|
-
});
|
|
566
|
-
});
|
|
567
|
-
describe('Persistent-mode reply cleanup behavior', () => {
|
|
568
|
-
const originalHome = process.env.HOME;
|
|
569
|
-
const originalUserProfile = process.env.USERPROFILE;
|
|
570
|
-
let testDir;
|
|
571
|
-
let tempHome;
|
|
572
|
-
const sessionId = 'reply-cleanup-session';
|
|
573
|
-
beforeEach(() => {
|
|
574
|
-
testDir = join(tmpdir(), `omc-reply-cleanup-${Date.now()}-${Math.random().toString(36).slice(2)}`);
|
|
575
|
-
tempHome = join(tmpdir(), `omc-reply-home-${Date.now()}-${Math.random().toString(36).slice(2)}`);
|
|
576
|
-
mkdirSync(testDir, { recursive: true });
|
|
577
|
-
mkdirSync(tempHome, { recursive: true });
|
|
578
|
-
execSync('git init', { cwd: testDir });
|
|
579
|
-
process.env.HOME = tempHome;
|
|
580
|
-
process.env.USERPROFILE = tempHome;
|
|
581
|
-
});
|
|
582
|
-
afterEach(() => {
|
|
583
|
-
process.env.HOME = originalHome;
|
|
584
|
-
process.env.USERPROFILE = originalUserProfile;
|
|
585
|
-
rmSync(testDir, { recursive: true, force: true });
|
|
586
|
-
rmSync(tempHome, { recursive: true, force: true });
|
|
587
|
-
});
|
|
588
|
-
it('does not remove reply-session registry on idle Stop/persistent-mode', async () => {
|
|
589
|
-
const registryPath = join(homedir(), '.omc', 'state', 'reply-session-registry.jsonl');
|
|
590
|
-
mkdirSync(join(homedir(), '.omc', 'state'), { recursive: true });
|
|
591
|
-
writeFileSync(registryPath, `${JSON.stringify({
|
|
592
|
-
platform: 'telegram',
|
|
593
|
-
messageId: '123',
|
|
594
|
-
sessionId,
|
|
595
|
-
tmuxPaneId: '%1',
|
|
596
|
-
tmuxSessionName: 'main',
|
|
597
|
-
event: 'session-start',
|
|
598
|
-
createdAt: new Date().toISOString(),
|
|
599
|
-
})}\n`);
|
|
600
|
-
const before = readFileSync(registryPath, 'utf-8');
|
|
601
|
-
const result = await processHook('persistent-mode', {
|
|
602
|
-
sessionId,
|
|
603
|
-
directory: testDir,
|
|
604
|
-
});
|
|
605
|
-
const after = readFileSync(registryPath, 'utf-8');
|
|
606
|
-
expect(result.continue).toBe(true);
|
|
607
|
-
expect(existsSync(registryPath)).toBe(true);
|
|
608
|
-
expect(after).toBe(before);
|
|
609
|
-
expect(after).toContain(sessionId);
|
|
610
|
-
});
|
|
611
|
-
});
|
|
612
|
-
describe('Todo Continuation', () => {
|
|
613
|
-
describe('formatTodoStatus', () => {
|
|
614
|
-
it('should format when all tasks complete', () => {
|
|
615
|
-
const result = {
|
|
616
|
-
count: 0,
|
|
617
|
-
todos: [],
|
|
618
|
-
total: 5,
|
|
619
|
-
source: 'todo'
|
|
620
|
-
};
|
|
621
|
-
expect(formatTodoStatus(result)).toBe('All tasks complete (5 total)');
|
|
622
|
-
});
|
|
623
|
-
it('should format with incomplete tasks', () => {
|
|
624
|
-
const result = {
|
|
625
|
-
count: 3,
|
|
626
|
-
todos: [],
|
|
627
|
-
total: 10,
|
|
628
|
-
source: 'todo'
|
|
629
|
-
};
|
|
630
|
-
expect(formatTodoStatus(result)).toBe('7/10 completed, 3 remaining');
|
|
631
|
-
});
|
|
632
|
-
it('should handle zero total tasks', () => {
|
|
633
|
-
const result = {
|
|
634
|
-
count: 0,
|
|
635
|
-
todos: [],
|
|
636
|
-
total: 0,
|
|
637
|
-
source: 'none'
|
|
638
|
-
};
|
|
639
|
-
expect(formatTodoStatus(result)).toBe('All tasks complete (0 total)');
|
|
640
|
-
});
|
|
641
|
-
it('should handle all tasks incomplete', () => {
|
|
642
|
-
const result = {
|
|
643
|
-
count: 5,
|
|
644
|
-
todos: [],
|
|
645
|
-
total: 5,
|
|
646
|
-
source: 'todo'
|
|
647
|
-
};
|
|
648
|
-
expect(formatTodoStatus(result)).toBe('0/5 completed, 5 remaining');
|
|
649
|
-
});
|
|
650
|
-
it('should handle single task remaining', () => {
|
|
651
|
-
const result = {
|
|
652
|
-
count: 1,
|
|
653
|
-
todos: [],
|
|
654
|
-
total: 10,
|
|
655
|
-
source: 'todo'
|
|
656
|
-
};
|
|
657
|
-
expect(formatTodoStatus(result)).toBe('9/10 completed, 1 remaining');
|
|
658
|
-
});
|
|
659
|
-
});
|
|
660
|
-
describe('getNextPendingTodo', () => {
|
|
661
|
-
it('should return in_progress todo first', () => {
|
|
662
|
-
const todos = [
|
|
663
|
-
{ content: 'Task 1', status: 'pending' },
|
|
664
|
-
{ content: 'Task 2', status: 'in_progress' },
|
|
665
|
-
{ content: 'Task 3', status: 'pending' }
|
|
666
|
-
];
|
|
667
|
-
const result = {
|
|
668
|
-
count: 3,
|
|
669
|
-
todos,
|
|
670
|
-
total: 3,
|
|
671
|
-
source: 'todo'
|
|
672
|
-
};
|
|
673
|
-
const next = getNextPendingTodo(result);
|
|
674
|
-
expect(next).not.toBeNull();
|
|
675
|
-
expect(next.content).toBe('Task 2');
|
|
676
|
-
expect(next.status).toBe('in_progress');
|
|
677
|
-
});
|
|
678
|
-
it('should return first pending when no in_progress', () => {
|
|
679
|
-
const todos = [
|
|
680
|
-
{ content: 'Task 1', status: 'pending' },
|
|
681
|
-
{ content: 'Task 2', status: 'pending' },
|
|
682
|
-
{ content: 'Task 3', status: 'completed' }
|
|
683
|
-
];
|
|
684
|
-
const result = {
|
|
685
|
-
count: 2,
|
|
686
|
-
todos: todos.filter(t => t.status !== 'completed'),
|
|
687
|
-
total: 3,
|
|
688
|
-
source: 'todo'
|
|
689
|
-
};
|
|
690
|
-
const next = getNextPendingTodo(result);
|
|
691
|
-
expect(next).not.toBeNull();
|
|
692
|
-
expect(next.content).toBe('Task 1');
|
|
693
|
-
expect(next.status).toBe('pending');
|
|
694
|
-
});
|
|
695
|
-
it('should return null when no todos', () => {
|
|
696
|
-
const result = {
|
|
697
|
-
count: 0,
|
|
698
|
-
todos: [],
|
|
699
|
-
total: 0,
|
|
700
|
-
source: 'none'
|
|
701
|
-
};
|
|
702
|
-
const next = getNextPendingTodo(result);
|
|
703
|
-
expect(next).toBeNull();
|
|
704
|
-
});
|
|
705
|
-
it('should return null when all completed', () => {
|
|
706
|
-
const result = {
|
|
707
|
-
count: 0,
|
|
708
|
-
todos: [],
|
|
709
|
-
total: 3,
|
|
710
|
-
source: 'todo'
|
|
711
|
-
};
|
|
712
|
-
const next = getNextPendingTodo(result);
|
|
713
|
-
expect(next).toBeNull();
|
|
714
|
-
});
|
|
715
|
-
it('should handle todos with priority field', () => {
|
|
716
|
-
const todos = [
|
|
717
|
-
{ content: 'Task 1', status: 'pending', priority: 'low' },
|
|
718
|
-
{ content: 'Task 2', status: 'in_progress', priority: 'high' }
|
|
719
|
-
];
|
|
720
|
-
const result = {
|
|
721
|
-
count: 2,
|
|
722
|
-
todos,
|
|
723
|
-
total: 2,
|
|
724
|
-
source: 'todo'
|
|
725
|
-
};
|
|
726
|
-
const next = getNextPendingTodo(result);
|
|
727
|
-
expect(next).not.toBeNull();
|
|
728
|
-
expect(next.content).toBe('Task 2');
|
|
729
|
-
});
|
|
730
|
-
it('should handle todos with id field', () => {
|
|
731
|
-
const todos = [
|
|
732
|
-
{ content: 'Task 1', status: 'pending', id: 'todo-1' },
|
|
733
|
-
{ content: 'Task 2', status: 'pending', id: 'todo-2' }
|
|
734
|
-
];
|
|
735
|
-
const result = {
|
|
736
|
-
count: 2,
|
|
737
|
-
todos,
|
|
738
|
-
total: 2,
|
|
739
|
-
source: 'todo'
|
|
740
|
-
};
|
|
741
|
-
const next = getNextPendingTodo(result);
|
|
742
|
-
expect(next).not.toBeNull();
|
|
743
|
-
expect(next.id).toBe('todo-1');
|
|
744
|
-
});
|
|
745
|
-
it('should ignore cancelled todos', () => {
|
|
746
|
-
const todos = [
|
|
747
|
-
{ content: 'Task 1', status: 'cancelled' },
|
|
748
|
-
{ content: 'Task 2', status: 'pending' }
|
|
749
|
-
];
|
|
750
|
-
const result = {
|
|
751
|
-
count: 1,
|
|
752
|
-
todos: [todos[1]],
|
|
753
|
-
total: 2,
|
|
754
|
-
source: 'todo'
|
|
755
|
-
};
|
|
756
|
-
const next = getNextPendingTodo(result);
|
|
757
|
-
expect(next).not.toBeNull();
|
|
758
|
-
expect(next.content).toBe('Task 2');
|
|
759
|
-
});
|
|
760
|
-
it('should prefer in_progress over multiple pending', () => {
|
|
761
|
-
const todos = [
|
|
762
|
-
{ content: 'Task 1', status: 'pending' },
|
|
763
|
-
{ content: 'Task 2', status: 'pending' },
|
|
764
|
-
{ content: 'Task 3', status: 'pending' },
|
|
765
|
-
{ content: 'Task 4', status: 'in_progress' }
|
|
766
|
-
];
|
|
767
|
-
const result = {
|
|
768
|
-
count: 4,
|
|
769
|
-
todos,
|
|
770
|
-
total: 4,
|
|
771
|
-
source: 'todo'
|
|
772
|
-
};
|
|
773
|
-
const next = getNextPendingTodo(result);
|
|
774
|
-
expect(next).not.toBeNull();
|
|
775
|
-
expect(next.content).toBe('Task 4');
|
|
776
|
-
expect(next.status).toBe('in_progress');
|
|
777
|
-
});
|
|
778
|
-
});
|
|
779
|
-
describe('Todo type validation', () => {
|
|
780
|
-
it('should handle all valid status values', () => {
|
|
781
|
-
const statuses = ['pending', 'in_progress', 'completed', 'cancelled'];
|
|
782
|
-
const todos = statuses.map((status, i) => ({
|
|
783
|
-
content: `Task ${i + 1}`,
|
|
784
|
-
status
|
|
785
|
-
}));
|
|
786
|
-
expect(todos).toHaveLength(4);
|
|
787
|
-
todos.forEach(todo => {
|
|
788
|
-
expect(todo.content).toBeTruthy();
|
|
789
|
-
expect(statuses).toContain(todo.status);
|
|
790
|
-
});
|
|
791
|
-
});
|
|
792
|
-
it('should handle optional fields', () => {
|
|
793
|
-
const todo = {
|
|
794
|
-
content: 'Test task',
|
|
795
|
-
status: 'pending',
|
|
796
|
-
priority: 'high',
|
|
797
|
-
id: 'test-123'
|
|
798
|
-
};
|
|
799
|
-
expect(todo.content).toBe('Test task');
|
|
800
|
-
expect(todo.status).toBe('pending');
|
|
801
|
-
expect(todo.priority).toBe('high');
|
|
802
|
-
expect(todo.id).toBe('test-123');
|
|
803
|
-
});
|
|
804
|
-
it('should handle minimal todo object', () => {
|
|
805
|
-
const todo = {
|
|
806
|
-
content: 'Minimal task',
|
|
807
|
-
status: 'pending'
|
|
808
|
-
};
|
|
809
|
-
expect(todo.content).toBe('Minimal task');
|
|
810
|
-
expect(todo.status).toBe('pending');
|
|
811
|
-
expect(todo.priority).toBeUndefined();
|
|
812
|
-
expect(todo.id).toBeUndefined();
|
|
813
|
-
});
|
|
814
|
-
});
|
|
815
|
-
describe('IncompleteTodosResult validation', () => {
|
|
816
|
-
it('should maintain consistency between count and todos length', () => {
|
|
817
|
-
const todos = [
|
|
818
|
-
{ content: 'Task 1', status: 'pending' },
|
|
819
|
-
{ content: 'Task 2', status: 'in_progress' }
|
|
820
|
-
];
|
|
821
|
-
const result = {
|
|
822
|
-
count: todos.length,
|
|
823
|
-
todos,
|
|
824
|
-
total: 5,
|
|
825
|
-
source: 'todo'
|
|
826
|
-
};
|
|
827
|
-
expect(result.count).toBe(result.todos.length);
|
|
828
|
-
expect(result.total).toBeGreaterThanOrEqual(result.count);
|
|
829
|
-
});
|
|
830
|
-
it('should handle edge case of more completed than total', () => {
|
|
831
|
-
// This shouldn't happen in practice, but test the type structure
|
|
832
|
-
const result = {
|
|
833
|
-
count: 0,
|
|
834
|
-
todos: [],
|
|
835
|
-
total: 3,
|
|
836
|
-
source: 'todo'
|
|
837
|
-
};
|
|
838
|
-
expect(result.count).toBeLessThanOrEqual(result.total);
|
|
839
|
-
});
|
|
840
|
-
});
|
|
841
|
-
});
|
|
842
|
-
describe('Hook Output Structure', () => {
|
|
843
|
-
describe('JSON output format', () => {
|
|
844
|
-
it('should create valid hook output with continue flag', () => {
|
|
845
|
-
const output = {
|
|
846
|
-
continue: true,
|
|
847
|
-
message: 'Test message'
|
|
848
|
-
};
|
|
849
|
-
expect(output).toHaveProperty('continue');
|
|
850
|
-
expect(output).toHaveProperty('message');
|
|
851
|
-
expect(typeof output.continue).toBe('boolean');
|
|
852
|
-
expect(typeof output.message).toBe('string');
|
|
853
|
-
});
|
|
854
|
-
it('should create valid hook output without message', () => {
|
|
855
|
-
const output = {
|
|
856
|
-
continue: false
|
|
857
|
-
};
|
|
858
|
-
expect(output).toHaveProperty('continue');
|
|
859
|
-
expect(output.continue).toBe(false);
|
|
860
|
-
});
|
|
861
|
-
it('should serialize to valid JSON', () => {
|
|
862
|
-
const output = {
|
|
863
|
-
continue: true,
|
|
864
|
-
message: 'ULTRAWORK MODE ACTIVATED'
|
|
865
|
-
};
|
|
866
|
-
const json = JSON.stringify(output);
|
|
867
|
-
const parsed = JSON.parse(json);
|
|
868
|
-
expect(parsed.continue).toBe(true);
|
|
869
|
-
expect(parsed.message).toBe('ULTRAWORK MODE ACTIVATED');
|
|
870
|
-
});
|
|
871
|
-
it('should handle multiline messages', () => {
|
|
872
|
-
const output = {
|
|
873
|
-
continue: true,
|
|
874
|
-
message: 'Line 1\nLine 2\nLine 3'
|
|
875
|
-
};
|
|
876
|
-
const json = JSON.stringify(output);
|
|
877
|
-
const parsed = JSON.parse(json);
|
|
878
|
-
expect(parsed.message).toContain('\n');
|
|
879
|
-
expect(parsed.message.split('\n')).toHaveLength(3);
|
|
880
|
-
});
|
|
881
|
-
it('should handle empty message', () => {
|
|
882
|
-
const output = {
|
|
883
|
-
continue: true,
|
|
884
|
-
message: ''
|
|
885
|
-
};
|
|
886
|
-
expect(output.message).toBe('');
|
|
887
|
-
});
|
|
888
|
-
it('should handle special characters in message', () => {
|
|
889
|
-
const output = {
|
|
890
|
-
continue: true,
|
|
891
|
-
message: 'Message with "quotes" and \'apostrophes\' and \\ backslashes'
|
|
892
|
-
};
|
|
893
|
-
const json = JSON.stringify(output);
|
|
894
|
-
const parsed = JSON.parse(json);
|
|
895
|
-
expect(parsed.message).toBe(output.message);
|
|
896
|
-
});
|
|
897
|
-
});
|
|
898
|
-
describe('Hook message formatting', () => {
|
|
899
|
-
it('should format continuation message', () => {
|
|
900
|
-
const message = '[SYSTEM REMINDER - TODO CONTINUATION] Incomplete tasks remain. Continue working.';
|
|
901
|
-
expect(message).toContain('[SYSTEM REMINDER');
|
|
902
|
-
expect(message).toContain('TODO CONTINUATION');
|
|
903
|
-
expect(message).toContain('Continue working');
|
|
904
|
-
});
|
|
905
|
-
it('should format keyword detection message', () => {
|
|
906
|
-
const keyword = {
|
|
907
|
-
type: 'ultrawork',
|
|
908
|
-
keyword: 'ultrawork',
|
|
909
|
-
position: 0
|
|
910
|
-
};
|
|
911
|
-
const message = `ULTRAWORK MODE ACTIVATED - Detected keyword: ${keyword.keyword}`;
|
|
912
|
-
expect(message).toContain('ULTRAWORK MODE');
|
|
913
|
-
expect(message).toContain(keyword.keyword);
|
|
914
|
-
});
|
|
915
|
-
it('should format todo status message', () => {
|
|
916
|
-
const result = {
|
|
917
|
-
count: 2,
|
|
918
|
-
todos: [],
|
|
919
|
-
total: 5,
|
|
920
|
-
source: 'todo'
|
|
921
|
-
};
|
|
922
|
-
const status = formatTodoStatus(result);
|
|
923
|
-
const message = `Todo Status: ${status}`;
|
|
924
|
-
expect(message).toContain('3/5 completed');
|
|
925
|
-
expect(message).toContain('2 remaining');
|
|
926
|
-
});
|
|
927
|
-
});
|
|
928
|
-
});
|
|
929
|
-
describe('Integration: Keyword Detection with Code Blocks', () => {
|
|
930
|
-
it('should detect keywords outside code and ignore inside', () => {
|
|
931
|
-
const text = `
|
|
932
|
-
Please search the codebase
|
|
933
|
-
|
|
934
|
-
\`\`\`javascript
|
|
935
|
-
// This search should be ignored
|
|
936
|
-
function search() {
|
|
937
|
-
return analyze();
|
|
938
|
-
}
|
|
939
|
-
\`\`\`
|
|
940
|
-
|
|
941
|
-
Now deep analyze the bug
|
|
942
|
-
`;
|
|
943
|
-
const detected = detectKeywordsWithType(removeCodeBlocks(text));
|
|
944
|
-
const types = detected.map(d => d.type);
|
|
945
|
-
expect(types).toContain('deepsearch');
|
|
946
|
-
expect(types).toContain('analyze');
|
|
947
|
-
// Should only detect the ones outside code blocks
|
|
948
|
-
expect(detected.filter(d => d.type === 'deepsearch')).toHaveLength(1);
|
|
949
|
-
expect(detected.filter(d => d.type === 'analyze')).toHaveLength(1);
|
|
950
|
-
});
|
|
951
|
-
it('should handle inline code with keywords', () => {
|
|
952
|
-
const text = 'Use the `deepsearch` command to find in codebase';
|
|
953
|
-
const cleanText = removeCodeBlocks(text);
|
|
954
|
-
const detected = detectKeywordsWithType(cleanText);
|
|
955
|
-
// The phrase 'find in codebase' should still be detected
|
|
956
|
-
expect(detected.some(d => d.type === 'deepsearch')).toBe(true);
|
|
957
|
-
});
|
|
958
|
-
it('should prioritize ultrawork even with other keywords', () => {
|
|
959
|
-
const text = 'search the codebase, deep analyze the bug, and use ultrawork mode';
|
|
960
|
-
const primary = getPrimaryKeyword(text);
|
|
961
|
-
expect(primary).not.toBeNull();
|
|
962
|
-
expect(primary.type).toBe('ultrawork');
|
|
963
|
-
expect(primary.keyword).toBe('ultrawork');
|
|
964
|
-
});
|
|
965
|
-
});
|
|
966
|
-
describe('Edge Cases', () => {
|
|
967
|
-
describe('Empty and null inputs', () => {
|
|
968
|
-
it('should handle empty prompt parts', () => {
|
|
969
|
-
expect(extractPromptText([])).toBe('');
|
|
970
|
-
});
|
|
971
|
-
it('should handle empty text in removeCodeBlocks', () => {
|
|
972
|
-
expect(removeCodeBlocks('')).toBe('');
|
|
973
|
-
});
|
|
974
|
-
it('should handle empty text in detectKeywordsWithType', () => {
|
|
975
|
-
expect(detectKeywordsWithType('')).toEqual([]);
|
|
976
|
-
});
|
|
977
|
-
it('should handle empty text in hasKeyword', () => {
|
|
978
|
-
expect(hasKeyword('')).toBe(false);
|
|
979
|
-
});
|
|
980
|
-
it('should handle empty text in getPrimaryKeyword', () => {
|
|
981
|
-
expect(getPrimaryKeyword('')).toBeNull();
|
|
982
|
-
});
|
|
983
|
-
});
|
|
984
|
-
describe('Whitespace handling', () => {
|
|
985
|
-
it('should detect keywords with extra whitespace', () => {
|
|
986
|
-
const text = ' search the codebase ';
|
|
987
|
-
expect(hasKeyword(text)).toBe(true);
|
|
988
|
-
});
|
|
989
|
-
it('should handle newlines and tabs', () => {
|
|
990
|
-
const text = 'search\n\tthe\r\ncodebase';
|
|
991
|
-
const detected = detectKeywordsWithType(text);
|
|
992
|
-
expect(detected.some(d => d.type === 'deepsearch')).toBe(true);
|
|
993
|
-
});
|
|
994
|
-
});
|
|
995
|
-
describe('Unicode and special characters', () => {
|
|
996
|
-
it('should handle unicode characters', () => {
|
|
997
|
-
const text = 'search the codebase with émojis 🔍';
|
|
998
|
-
expect(hasKeyword(text)).toBe(true);
|
|
999
|
-
});
|
|
1000
|
-
it('should handle mixed scripts', () => {
|
|
1001
|
-
const text = 'Please search the codebase 搜索 искать';
|
|
1002
|
-
const detected = detectKeywordsWithType(text);
|
|
1003
|
-
expect(detected.some(d => d.type === 'deepsearch')).toBe(true);
|
|
1004
|
-
});
|
|
1005
|
-
});
|
|
1006
|
-
describe('Very long inputs', () => {
|
|
1007
|
-
it('should handle long text efficiently', () => {
|
|
1008
|
-
const longText = 'plain text '.repeat(1000) + ' search the codebase';
|
|
1009
|
-
expect(hasKeyword(longText)).toBe(true);
|
|
1010
|
-
});
|
|
1011
|
-
it('should handle many code blocks', () => {
|
|
1012
|
-
const manyBlocks = '```code```\n'.repeat(100) + 'search the codebase';
|
|
1013
|
-
const cleaned = removeCodeBlocks(manyBlocks);
|
|
1014
|
-
expect(hasKeyword(cleaned)).toBe(true);
|
|
1015
|
-
});
|
|
1016
|
-
});
|
|
1017
|
-
});
|
|
1018
|
-
describe('UltraQA Loop', () => {
|
|
1019
|
-
describe('State Management', () => {
|
|
1020
|
-
it('should define valid UltraQA goal types', () => {
|
|
1021
|
-
const validGoalTypes = ['tests', 'build', 'lint', 'typecheck', 'custom'];
|
|
1022
|
-
validGoalTypes.forEach(goalType => {
|
|
1023
|
-
expect(typeof goalType).toBe('string');
|
|
1024
|
-
});
|
|
1025
|
-
});
|
|
1026
|
-
it('should have valid state structure', () => {
|
|
1027
|
-
const state = {
|
|
1028
|
-
active: true,
|
|
1029
|
-
goal_type: 'tests',
|
|
1030
|
-
goal_pattern: null,
|
|
1031
|
-
cycle: 1,
|
|
1032
|
-
max_cycles: 5,
|
|
1033
|
-
failures: [],
|
|
1034
|
-
started_at: new Date().toISOString(),
|
|
1035
|
-
session_id: 'test-session'
|
|
1036
|
-
};
|
|
1037
|
-
expect(state.active).toBe(true);
|
|
1038
|
-
expect(state.goal_type).toBe('tests');
|
|
1039
|
-
expect(state.cycle).toBe(1);
|
|
1040
|
-
expect(state.max_cycles).toBe(5);
|
|
1041
|
-
expect(Array.isArray(state.failures)).toBe(true);
|
|
1042
|
-
});
|
|
1043
|
-
it('should track failure history', () => {
|
|
1044
|
-
const failures = ['Error 1', 'Error 2', 'Error 1'];
|
|
1045
|
-
expect(failures).toHaveLength(3);
|
|
1046
|
-
expect(failures.filter(f => f === 'Error 1')).toHaveLength(2);
|
|
1047
|
-
});
|
|
1048
|
-
});
|
|
1049
|
-
describe('Cycle Limits', () => {
|
|
1050
|
-
it('should respect max cycles limit', () => {
|
|
1051
|
-
const state = {
|
|
1052
|
-
cycle: 5,
|
|
1053
|
-
max_cycles: 5
|
|
1054
|
-
};
|
|
1055
|
-
expect(state.cycle).toBe(state.max_cycles);
|
|
1056
|
-
expect(state.cycle <= state.max_cycles).toBe(true);
|
|
1057
|
-
});
|
|
1058
|
-
it('should allow incrementing cycles within limit', () => {
|
|
1059
|
-
let cycle = 1;
|
|
1060
|
-
const maxCycles = 5;
|
|
1061
|
-
while (cycle < maxCycles) {
|
|
1062
|
-
cycle++;
|
|
1063
|
-
expect(cycle <= maxCycles).toBe(true);
|
|
1064
|
-
}
|
|
1065
|
-
expect(cycle).toBe(maxCycles);
|
|
1066
|
-
});
|
|
1067
|
-
});
|
|
1068
|
-
describe('Result Types', () => {
|
|
1069
|
-
it('should have valid success result', () => {
|
|
1070
|
-
const result = {
|
|
1071
|
-
success: true,
|
|
1072
|
-
cycles: 3,
|
|
1073
|
-
reason: 'goal_met'
|
|
1074
|
-
};
|
|
1075
|
-
expect(result.success).toBe(true);
|
|
1076
|
-
expect(result.reason).toBe('goal_met');
|
|
1077
|
-
});
|
|
1078
|
-
it('should have valid failure result', () => {
|
|
1079
|
-
const result = {
|
|
1080
|
-
success: false,
|
|
1081
|
-
cycles: 5,
|
|
1082
|
-
reason: 'max_cycles',
|
|
1083
|
-
diagnosis: 'Unable to fix recurring issue'
|
|
1084
|
-
};
|
|
1085
|
-
expect(result.success).toBe(false);
|
|
1086
|
-
expect(result.reason).toBe('max_cycles');
|
|
1087
|
-
expect(result.diagnosis).toBeDefined();
|
|
1088
|
-
});
|
|
1089
|
-
it('should detect same failure pattern', () => {
|
|
1090
|
-
const failures = ['Error A', 'Error A', 'Error A'];
|
|
1091
|
-
const allSame = failures.every(f => f === failures[0]);
|
|
1092
|
-
expect(allSame).toBe(true);
|
|
1093
|
-
});
|
|
1094
|
-
});
|
|
1095
|
-
describe('Goal Commands', () => {
|
|
1096
|
-
it('should map goal types to commands', () => {
|
|
1097
|
-
const goalCommands = {
|
|
1098
|
-
tests: 'npm test',
|
|
1099
|
-
build: 'npm run build',
|
|
1100
|
-
lint: 'npm run lint',
|
|
1101
|
-
typecheck: 'npm run typecheck || tsc --noEmit'
|
|
1102
|
-
};
|
|
1103
|
-
expect(goalCommands.tests).toBe('npm test');
|
|
1104
|
-
expect(goalCommands.build).toBe('npm run build');
|
|
1105
|
-
expect(goalCommands.lint).toBe('npm run lint');
|
|
1106
|
-
});
|
|
1107
|
-
});
|
|
1108
|
-
describe('Progress Formatting', () => {
|
|
1109
|
-
it('should format progress message', () => {
|
|
1110
|
-
const cycle = 2;
|
|
1111
|
-
const maxCycles = 5;
|
|
1112
|
-
const status = 'Running tests...';
|
|
1113
|
-
const message = `[ULTRAQA Cycle ${cycle}/${maxCycles}] ${status}`;
|
|
1114
|
-
expect(message).toBe('[ULTRAQA Cycle 2/5] Running tests...');
|
|
1115
|
-
expect(message).toContain('ULTRAQA');
|
|
1116
|
-
expect(message).toContain(`${cycle}/${maxCycles}`);
|
|
1117
|
-
});
|
|
1118
|
-
});
|
|
1119
|
-
});
|
|
1120
|
-
describe('Persistent Mode - Max Attempts Counter', () => {
|
|
1121
|
-
const testSessionId = 'test-session-123';
|
|
1122
|
-
beforeEach(() => {
|
|
1123
|
-
// Reset the counter before each test
|
|
1124
|
-
resetTodoContinuationAttempts(testSessionId);
|
|
1125
|
-
});
|
|
1126
|
-
afterEach(() => {
|
|
1127
|
-
// Clean up after each test
|
|
1128
|
-
resetTodoContinuationAttempts(testSessionId);
|
|
1129
|
-
});
|
|
1130
|
-
it('should export resetTodoContinuationAttempts function', () => {
|
|
1131
|
-
expect(typeof resetTodoContinuationAttempts).toBe('function');
|
|
1132
|
-
});
|
|
1133
|
-
it('should not throw when resetting non-existent session', () => {
|
|
1134
|
-
expect(() => resetTodoContinuationAttempts('non-existent')).not.toThrow();
|
|
1135
|
-
});
|
|
1136
|
-
it('should allow resetting attempts multiple times', () => {
|
|
1137
|
-
resetTodoContinuationAttempts(testSessionId);
|
|
1138
|
-
resetTodoContinuationAttempts(testSessionId);
|
|
1139
|
-
resetTodoContinuationAttempts(testSessionId);
|
|
1140
|
-
// Should not throw
|
|
1141
|
-
expect(true).toBe(true);
|
|
1142
|
-
});
|
|
1143
|
-
});
|
|
1144
|
-
describe('Mutual Exclusion - UltraQA and Ralph', () => {
|
|
1145
|
-
let testDir;
|
|
1146
|
-
beforeEach(() => {
|
|
1147
|
-
// Create a unique temp directory for each test
|
|
1148
|
-
testDir = join(tmpdir(), `omc-test-${Date.now()}-${Math.random().toString(36).slice(2)}`);
|
|
1149
|
-
mkdirSync(testDir, { recursive: true });
|
|
1150
|
-
mkdirSync(join(testDir, '.omc'), { recursive: true });
|
|
1151
|
-
mkdirSync(join(testDir, '.omc', 'state'), { recursive: true });
|
|
1152
|
-
});
|
|
1153
|
-
afterEach(() => {
|
|
1154
|
-
// Clean up temp directory
|
|
1155
|
-
try {
|
|
1156
|
-
rmSync(testDir, { recursive: true, force: true });
|
|
1157
|
-
}
|
|
1158
|
-
catch {
|
|
1159
|
-
// Ignore cleanup errors
|
|
1160
|
-
}
|
|
1161
|
-
});
|
|
1162
|
-
describe('isUltraQAActive', () => {
|
|
1163
|
-
it('should return false when no ultraqa state exists', () => {
|
|
1164
|
-
expect(isUltraQAActive(testDir)).toBe(false);
|
|
1165
|
-
});
|
|
1166
|
-
it('should return true when ultraqa is active', () => {
|
|
1167
|
-
const stateFile = join(testDir, '.omc', 'state', 'ultraqa-state.json');
|
|
1168
|
-
writeFileSync(stateFile, JSON.stringify({ active: true }));
|
|
1169
|
-
expect(isUltraQAActive(testDir)).toBe(true);
|
|
1170
|
-
});
|
|
1171
|
-
it('should return false when ultraqa is not active', () => {
|
|
1172
|
-
const stateFile = join(testDir, '.omc', 'state', 'ultraqa-state.json');
|
|
1173
|
-
writeFileSync(stateFile, JSON.stringify({ active: false }));
|
|
1174
|
-
expect(isUltraQAActive(testDir)).toBe(false);
|
|
1175
|
-
});
|
|
1176
|
-
it('should return false for invalid JSON', () => {
|
|
1177
|
-
const stateFile = join(testDir, '.omc', 'state', 'ultraqa-state.json');
|
|
1178
|
-
writeFileSync(stateFile, 'invalid json');
|
|
1179
|
-
expect(isUltraQAActive(testDir)).toBe(false);
|
|
1180
|
-
});
|
|
1181
|
-
});
|
|
1182
|
-
describe('isRalphLoopActive', () => {
|
|
1183
|
-
it('should return false when no ralph state exists', () => {
|
|
1184
|
-
expect(isRalphLoopActive(testDir)).toBe(false);
|
|
1185
|
-
});
|
|
1186
|
-
it('should return true when ralph is active', () => {
|
|
1187
|
-
const stateFile = join(testDir, '.omc', 'state', 'ralph-state.json');
|
|
1188
|
-
writeFileSync(stateFile, JSON.stringify({ active: true }));
|
|
1189
|
-
expect(isRalphLoopActive(testDir)).toBe(true);
|
|
1190
|
-
});
|
|
1191
|
-
it('should return false when ralph is not active', () => {
|
|
1192
|
-
const stateFile = join(testDir, '.omc', 'state', 'ralph-state.json');
|
|
1193
|
-
writeFileSync(stateFile, JSON.stringify({ active: false }));
|
|
1194
|
-
expect(isRalphLoopActive(testDir)).toBe(false);
|
|
1195
|
-
});
|
|
1196
|
-
});
|
|
1197
|
-
describe('UltraQA mutual exclusion', () => {
|
|
1198
|
-
it('should fail to start UltraQA when Ralph is active', () => {
|
|
1199
|
-
// Activate Ralph first - write to session-scoped path since startUltraQA
|
|
1200
|
-
// passes sessionId which makes readRalphState check session path only
|
|
1201
|
-
const sessionDir = join(testDir, '.omc', 'state', 'sessions', 'test-session');
|
|
1202
|
-
mkdirSync(sessionDir, { recursive: true });
|
|
1203
|
-
const ralphStateFile = join(sessionDir, 'ralph-state.json');
|
|
1204
|
-
writeFileSync(ralphStateFile, JSON.stringify({ active: true }));
|
|
1205
|
-
// Try to start UltraQA
|
|
1206
|
-
const result = startUltraQA(testDir, 'tests', 'test-session');
|
|
1207
|
-
expect(result.success).toBe(false);
|
|
1208
|
-
expect(result.error).toContain('Cannot start UltraQA while Ralph Loop is active');
|
|
1209
|
-
});
|
|
1210
|
-
it('should succeed starting UltraQA when Ralph is not active', () => {
|
|
1211
|
-
const result = startUltraQA(testDir, 'tests', 'test-session');
|
|
1212
|
-
expect(result.success).toBe(true);
|
|
1213
|
-
expect(result.error).toBeUndefined();
|
|
1214
|
-
// Clean up
|
|
1215
|
-
clearUltraQAState(testDir);
|
|
1216
|
-
});
|
|
1217
|
-
it('should succeed starting UltraQA when ralph state exists but inactive', () => {
|
|
1218
|
-
const ralphStateFile = join(testDir, '.omc', 'state', 'ralph-state.json');
|
|
1219
|
-
writeFileSync(ralphStateFile, JSON.stringify({ active: false }));
|
|
1220
|
-
const result = startUltraQA(testDir, 'tests', 'test-session');
|
|
1221
|
-
expect(result.success).toBe(true);
|
|
1222
|
-
// Clean up
|
|
1223
|
-
clearUltraQAState(testDir);
|
|
1224
|
-
});
|
|
1225
|
-
});
|
|
1226
|
-
describe('Ralph mutual exclusion', () => {
|
|
1227
|
-
it('should fail to start Ralph when UltraQA is active', () => {
|
|
1228
|
-
// Activate UltraQA first - write to session-scoped path since startLoop
|
|
1229
|
-
// passes sessionId which makes isUltraQAActive check session path only
|
|
1230
|
-
const sessionDir = join(testDir, '.omc', 'state', 'sessions', 'test-session');
|
|
1231
|
-
mkdirSync(sessionDir, { recursive: true });
|
|
1232
|
-
const ultraqaStateFile = join(sessionDir, 'ultraqa-state.json');
|
|
1233
|
-
writeFileSync(ultraqaStateFile, JSON.stringify({ active: true }));
|
|
1234
|
-
// Try to start Ralph
|
|
1235
|
-
const hook = createRalphLoopHook(testDir);
|
|
1236
|
-
const result = hook.startLoop('test-session', 'test prompt');
|
|
1237
|
-
expect(result).toBe(false);
|
|
1238
|
-
});
|
|
1239
|
-
it('should succeed starting Ralph when UltraQA is not active', () => {
|
|
1240
|
-
const hook = createRalphLoopHook(testDir);
|
|
1241
|
-
const result = hook.startLoop('test-session', 'test prompt');
|
|
1242
|
-
expect(result).toBe(true);
|
|
1243
|
-
// Clean up
|
|
1244
|
-
clearRalphState(testDir);
|
|
1245
|
-
});
|
|
1246
|
-
it('should succeed starting Ralph when ultraqa state exists but inactive', () => {
|
|
1247
|
-
const ultraqaStateFile = join(testDir, '.omc', 'state', 'ultraqa-state.json');
|
|
1248
|
-
writeFileSync(ultraqaStateFile, JSON.stringify({ active: false }));
|
|
1249
|
-
const hook = createRalphLoopHook(testDir);
|
|
1250
|
-
const result = hook.startLoop('test-session', 'test prompt');
|
|
1251
|
-
expect(result).toBe(true);
|
|
1252
|
-
// Clean up
|
|
1253
|
-
clearRalphState(testDir);
|
|
1254
|
-
});
|
|
1255
|
-
});
|
|
1256
|
-
describe('State cleanup', () => {
|
|
1257
|
-
it('should clear UltraQA state properly', () => {
|
|
1258
|
-
const result = startUltraQA(testDir, 'tests', 'test-session');
|
|
1259
|
-
expect(result.success).toBe(true);
|
|
1260
|
-
const cleared = clearUltraQAState(testDir);
|
|
1261
|
-
expect(cleared).toBe(true);
|
|
1262
|
-
expect(isRalphLoopActive(testDir)).toBe(false);
|
|
1263
|
-
});
|
|
1264
|
-
it('should clear Ralph state properly', () => {
|
|
1265
|
-
const hook = createRalphLoopHook(testDir);
|
|
1266
|
-
hook.startLoop('test-session', 'test prompt');
|
|
1267
|
-
const cleared = clearRalphState(testDir);
|
|
1268
|
-
expect(cleared).toBe(true);
|
|
1269
|
-
expect(isUltraQAActive(testDir)).toBe(false);
|
|
1270
|
-
});
|
|
1271
|
-
});
|
|
1272
|
-
});
|
|
1273
|
-
//# sourceMappingURL=hooks.test.js.map
|