@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,737 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Edge Case Tests for MCP Team Workers
|
|
3
|
-
*
|
|
4
|
-
* Covers gaps not addressed by the existing 69 tests:
|
|
5
|
-
* - Malformed input handling (bad JSON, unexpected types, missing fields)
|
|
6
|
-
* - Boundary conditions (empty strings, long names, special characters)
|
|
7
|
-
* - File system edge cases (missing files, corrupt data)
|
|
8
|
-
* - Offset cursor behavior when inbox is truncated mid-line
|
|
9
|
-
* - Outbox rotation boundary conditions
|
|
10
|
-
* - Heartbeat with invalid/edge-case timestamps
|
|
11
|
-
* - Task status transition edge cases
|
|
12
|
-
* - Registration with corrupt backing files
|
|
13
|
-
* - Sanitization edge cases (unicode, empty, path traversal)
|
|
14
|
-
*/
|
|
15
|
-
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
|
16
|
-
import { mkdirSync, mkdtempSync, writeFileSync, rmSync, existsSync, readFileSync, appendFileSync } from 'fs';
|
|
17
|
-
import { join } from 'path';
|
|
18
|
-
import { tmpdir } from 'os';
|
|
19
|
-
let TEST_BASE_DIR;
|
|
20
|
-
vi.mock('../../utils/paths.js', async () => {
|
|
21
|
-
const actual = await vi.importActual('../../utils/paths.js');
|
|
22
|
-
return { ...actual, getClaudeConfigDir: () => TEST_BASE_DIR };
|
|
23
|
-
});
|
|
24
|
-
// --- task-file-ops imports ---
|
|
25
|
-
import { readTask, updateTask, findNextTask, areBlockersResolved, writeTaskFailure, readTaskFailure, listTaskIds } from '../task-file-ops.js';
|
|
26
|
-
// --- inbox-outbox imports ---
|
|
27
|
-
import { appendOutbox, rotateOutboxIfNeeded, readNewInboxMessages, readAllInboxMessages, clearInbox, writeShutdownSignal, checkShutdownSignal, deleteShutdownSignal, cleanupWorkerFiles } from '../inbox-outbox.js';
|
|
28
|
-
// --- heartbeat imports ---
|
|
29
|
-
import { writeHeartbeat, readHeartbeat, listHeartbeats, isWorkerAlive, deleteHeartbeat, cleanupTeamHeartbeats } from '../heartbeat.js';
|
|
30
|
-
// --- tmux-session imports ---
|
|
31
|
-
import { sanitizeName, sessionName } from '../tmux-session.js';
|
|
32
|
-
// --- team-registration imports ---
|
|
33
|
-
import { readProbeResult, writeProbeResult, registerMcpWorker, unregisterMcpWorker, isMcpWorker, listMcpWorkers } from '../team-registration.js';
|
|
34
|
-
// ============================================================
|
|
35
|
-
// Shared test constants and helpers
|
|
36
|
-
// ============================================================
|
|
37
|
-
const EDGE_TEAM_TASKS = 'test-edge-tasks';
|
|
38
|
-
const EDGE_TEAM_IO = 'test-edge-io';
|
|
39
|
-
const REG_TEAM = 'test-edge-reg-team';
|
|
40
|
-
let TASKS_DIR;
|
|
41
|
-
let TEAMS_IO_DIR;
|
|
42
|
-
let HB_DIR;
|
|
43
|
-
let REG_DIR;
|
|
44
|
-
let CONFIG_DIR;
|
|
45
|
-
beforeEach(() => {
|
|
46
|
-
TEST_BASE_DIR = mkdtempSync(join(tmpdir(), 'edge-cases-test-'));
|
|
47
|
-
TASKS_DIR = join(TEST_BASE_DIR, 'tasks', EDGE_TEAM_TASKS);
|
|
48
|
-
TEAMS_IO_DIR = join(TEST_BASE_DIR, 'teams', EDGE_TEAM_IO);
|
|
49
|
-
HB_DIR = join(TEST_BASE_DIR, 'hb');
|
|
50
|
-
REG_DIR = join(TEST_BASE_DIR, 'reg');
|
|
51
|
-
CONFIG_DIR = join(TEST_BASE_DIR, 'teams', REG_TEAM);
|
|
52
|
-
});
|
|
53
|
-
afterEach(() => {
|
|
54
|
-
rmSync(TEST_BASE_DIR, { recursive: true, force: true });
|
|
55
|
-
});
|
|
56
|
-
function writeTaskHelper(task) {
|
|
57
|
-
mkdirSync(TASKS_DIR, { recursive: true });
|
|
58
|
-
writeFileSync(join(TASKS_DIR, `${task.id}.json`), JSON.stringify(task, null, 2));
|
|
59
|
-
}
|
|
60
|
-
function makeHeartbeat(overrides) {
|
|
61
|
-
return {
|
|
62
|
-
workerName: 'w1',
|
|
63
|
-
teamName: 'test-team',
|
|
64
|
-
provider: 'codex',
|
|
65
|
-
pid: 12345,
|
|
66
|
-
lastPollAt: new Date().toISOString(),
|
|
67
|
-
consecutiveErrors: 0,
|
|
68
|
-
status: 'polling',
|
|
69
|
-
...overrides,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
// ============================================================
|
|
73
|
-
// 1. task-file-ops edge cases
|
|
74
|
-
// ============================================================
|
|
75
|
-
describe('task-file-ops edge cases', () => {
|
|
76
|
-
beforeEach(() => {
|
|
77
|
-
mkdirSync(TASKS_DIR, { recursive: true });
|
|
78
|
-
});
|
|
79
|
-
describe('updateTask on non-existent file', () => {
|
|
80
|
-
it('throws when task file does not exist', () => {
|
|
81
|
-
// updateTask calls readFileSync directly without existsSync guard
|
|
82
|
-
expect(() => updateTask(EDGE_TEAM_TASKS, 'nonexistent', { status: 'completed' }))
|
|
83
|
-
.toThrow();
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
describe('updateTask with empty updates object', () => {
|
|
87
|
-
it('preserves task unchanged when updates is empty', () => {
|
|
88
|
-
const task = {
|
|
89
|
-
id: '1', subject: 'Test', description: 'Desc', status: 'pending',
|
|
90
|
-
owner: 'w1', blocks: [], blockedBy: [],
|
|
91
|
-
};
|
|
92
|
-
writeTaskHelper(task);
|
|
93
|
-
updateTask(EDGE_TEAM_TASKS, '1', {});
|
|
94
|
-
const result = readTask(EDGE_TEAM_TASKS, '1');
|
|
95
|
-
expect(result).toEqual(task);
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
describe('updateTask skips undefined values', () => {
|
|
99
|
-
it('does not overwrite fields with undefined', () => {
|
|
100
|
-
const task = {
|
|
101
|
-
id: '1', subject: 'Test', description: 'Desc', status: 'pending',
|
|
102
|
-
owner: 'w1', blocks: [], blockedBy: [],
|
|
103
|
-
};
|
|
104
|
-
writeTaskHelper(task);
|
|
105
|
-
// Passing an update with owner set to undefined should not wipe the owner
|
|
106
|
-
updateTask(EDGE_TEAM_TASKS, '1', { owner: undefined, status: 'in_progress' });
|
|
107
|
-
const result = readTask(EDGE_TEAM_TASKS, '1');
|
|
108
|
-
expect(result?.owner).toBe('w1');
|
|
109
|
-
expect(result?.status).toBe('in_progress');
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
describe('listTaskIds with mixed numeric and alpha IDs', () => {
|
|
113
|
-
it('sorts numeric IDs numerically and alpha IDs lexicographically', () => {
|
|
114
|
-
writeTaskHelper({ id: '10', subject: 'T', description: 'D', status: 'pending', owner: 'w', blocks: [], blockedBy: [] });
|
|
115
|
-
writeTaskHelper({ id: '2', subject: 'T', description: 'D', status: 'pending', owner: 'w', blocks: [], blockedBy: [] });
|
|
116
|
-
writeTaskHelper({ id: 'abc', subject: 'T', description: 'D', status: 'pending', owner: 'w', blocks: [], blockedBy: [] });
|
|
117
|
-
writeTaskHelper({ id: '1', subject: 'T', description: 'D', status: 'pending', owner: 'w', blocks: [], blockedBy: [] });
|
|
118
|
-
const ids = listTaskIds(EDGE_TEAM_TASKS);
|
|
119
|
-
// Numeric ones should be sorted numerically; alpha falls to localeCompare
|
|
120
|
-
// The sort function: if both parse as number, numeric sort; else localeCompare
|
|
121
|
-
// Since '1','2','10' are numeric and 'abc' is NaN, mixed comparison uses localeCompare
|
|
122
|
-
// Let's verify the actual order
|
|
123
|
-
expect(ids.length).toBe(4);
|
|
124
|
-
// '1' and '2' and '10' are numeric; 'abc' is NaN
|
|
125
|
-
// When one is NaN and other is number, localeCompare is used
|
|
126
|
-
// localeCompare('1','abc') < 0, localeCompare('10','abc') < 0, localeCompare('2','abc') < 0
|
|
127
|
-
// So all numeric come before 'abc'
|
|
128
|
-
expect(ids[ids.length - 1]).toBe('abc');
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
describe('listTaskIds with only non-.json files', () => {
|
|
132
|
-
it('returns empty when directory has no .json files', () => {
|
|
133
|
-
writeFileSync(join(TASKS_DIR, 'README.md'), 'not a task');
|
|
134
|
-
writeFileSync(join(TASKS_DIR, 'notes.txt'), 'not a task');
|
|
135
|
-
expect(listTaskIds(EDGE_TEAM_TASKS)).toEqual([]);
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
describe('areBlockersResolved with nonexistent blocker', () => {
|
|
139
|
-
it('returns false when blocker task file does not exist', () => {
|
|
140
|
-
// Blocker ID references a task that was never created
|
|
141
|
-
expect(areBlockersResolved(EDGE_TEAM_TASKS, ['does-not-exist'])).toBe(false);
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
describe('areBlockersResolved with in_progress blocker', () => {
|
|
145
|
-
it('returns false when blocker is in_progress (not completed)', () => {
|
|
146
|
-
writeTaskHelper({
|
|
147
|
-
id: 'blocker', subject: 'B', description: 'D',
|
|
148
|
-
status: 'in_progress', owner: 'w', blocks: [], blockedBy: [],
|
|
149
|
-
});
|
|
150
|
-
expect(areBlockersResolved(EDGE_TEAM_TASKS, ['blocker'])).toBe(false);
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
describe('findNextTask returns null for nonexistent team', () => {
|
|
154
|
-
it('returns null gracefully when team directory missing', async () => {
|
|
155
|
-
expect(await findNextTask('completely_nonexistent_team_xyz', 'w1')).toBeNull();
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
describe('findNextTask with in_progress task', () => {
|
|
159
|
-
it('skips tasks that are already in_progress', async () => {
|
|
160
|
-
writeTaskHelper({
|
|
161
|
-
id: '1', subject: 'T', description: 'D',
|
|
162
|
-
status: 'in_progress', owner: 'w1', blocks: [], blockedBy: [],
|
|
163
|
-
});
|
|
164
|
-
expect(await findNextTask(EDGE_TEAM_TASKS, 'w1')).toBeNull();
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
describe('readTask with empty file', () => {
|
|
168
|
-
it('returns null for empty JSON file', () => {
|
|
169
|
-
writeFileSync(join(TASKS_DIR, 'empty.json'), '');
|
|
170
|
-
expect(readTask(EDGE_TEAM_TASKS, 'empty')).toBeNull();
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
describe('readTask with valid JSON but non-object', () => {
|
|
174
|
-
it('returns the parsed value (no schema validation)', () => {
|
|
175
|
-
writeFileSync(join(TASKS_DIR, 'array.json'), '[]');
|
|
176
|
-
// readTask just does JSON.parse and casts, so an array would be returned
|
|
177
|
-
const result = readTask(EDGE_TEAM_TASKS, 'array');
|
|
178
|
-
expect(result).toEqual([]);
|
|
179
|
-
});
|
|
180
|
-
});
|
|
181
|
-
describe('writeTaskFailure with malformed existing sidecar', () => {
|
|
182
|
-
it('creates fresh sidecar when existing file is corrupt', () => {
|
|
183
|
-
// Write corrupt sidecar
|
|
184
|
-
mkdirSync(TASKS_DIR, { recursive: true });
|
|
185
|
-
writeFileSync(join(TASKS_DIR, 'corrupt.failure.json'), '{not valid json');
|
|
186
|
-
// readTaskFailure returns null for corrupt -> retryCount starts at 1
|
|
187
|
-
writeTaskFailure(EDGE_TEAM_TASKS, 'corrupt', 'new error');
|
|
188
|
-
const failure = readTaskFailure(EDGE_TEAM_TASKS, 'corrupt');
|
|
189
|
-
expect(failure?.retryCount).toBe(1);
|
|
190
|
-
expect(failure?.lastError).toBe('new error');
|
|
191
|
-
});
|
|
192
|
-
});
|
|
193
|
-
describe('readTaskFailure with corrupt sidecar file', () => {
|
|
194
|
-
it('returns null for corrupt failure sidecar', () => {
|
|
195
|
-
mkdirSync(TASKS_DIR, { recursive: true });
|
|
196
|
-
writeFileSync(join(TASKS_DIR, 'bad.failure.json'), 'not json at all');
|
|
197
|
-
expect(readTaskFailure(EDGE_TEAM_TASKS, 'bad')).toBeNull();
|
|
198
|
-
});
|
|
199
|
-
});
|
|
200
|
-
describe('task ID with special characters', () => {
|
|
201
|
-
it('handles task ID with dots', () => {
|
|
202
|
-
// ID 'v1.2.3' creates file 'v1.2.3.json'
|
|
203
|
-
const task = {
|
|
204
|
-
id: 'v1.2.3', subject: 'Versioned', description: 'D',
|
|
205
|
-
status: 'pending', owner: 'w1', blocks: [], blockedBy: [],
|
|
206
|
-
};
|
|
207
|
-
writeTaskHelper(task);
|
|
208
|
-
const result = readTask(EDGE_TEAM_TASKS, 'v1.2.3');
|
|
209
|
-
expect(result?.id).toBe('v1.2.3');
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
describe('listTaskIds excludes .tmp files with various PIDs', () => {
|
|
213
|
-
it('filters out temp files regardless of PID suffix', () => {
|
|
214
|
-
writeTaskHelper({ id: '1', subject: 'T', description: 'D', status: 'pending', owner: 'w', blocks: [], blockedBy: [] });
|
|
215
|
-
writeFileSync(join(TASKS_DIR, '1.json.tmp.99999'), '{}');
|
|
216
|
-
writeFileSync(join(TASKS_DIR, '2.json.tmp.1'), '{}');
|
|
217
|
-
const ids = listTaskIds(EDGE_TEAM_TASKS);
|
|
218
|
-
expect(ids).toEqual(['1']);
|
|
219
|
-
});
|
|
220
|
-
});
|
|
221
|
-
describe('task status transition: completed -> pending', () => {
|
|
222
|
-
it('allows backward transition (no validation in updateTask)', () => {
|
|
223
|
-
// This tests that updateTask does NOT enforce valid transitions.
|
|
224
|
-
// In production, completed -> pending could be a logic bug, but
|
|
225
|
-
// updateTask is a low-level primitive that does not validate.
|
|
226
|
-
writeTaskHelper({
|
|
227
|
-
id: '1', subject: 'T', description: 'D',
|
|
228
|
-
status: 'completed', owner: 'w1', blocks: [], blockedBy: [],
|
|
229
|
-
});
|
|
230
|
-
updateTask(EDGE_TEAM_TASKS, '1', { status: 'pending' });
|
|
231
|
-
const result = readTask(EDGE_TEAM_TASKS, '1');
|
|
232
|
-
expect(result?.status).toBe('pending');
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
describe('findNextTask with multiple pending tasks returns first by sorted ID', () => {
|
|
236
|
-
it('returns the lowest-sorted pending task', async () => {
|
|
237
|
-
writeTaskHelper({ id: '3', subject: 'T3', description: 'D', status: 'pending', owner: 'w1', blocks: [], blockedBy: [] });
|
|
238
|
-
writeTaskHelper({ id: '1', subject: 'T1', description: 'D', status: 'pending', owner: 'w1', blocks: [], blockedBy: [] });
|
|
239
|
-
writeTaskHelper({ id: '2', subject: 'T2', description: 'D', status: 'pending', owner: 'w1', blocks: [], blockedBy: [] });
|
|
240
|
-
const result = await findNextTask(EDGE_TEAM_TASKS, 'w1');
|
|
241
|
-
expect(result?.id).toBe('1');
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
// ============================================================
|
|
246
|
-
// 2. inbox-outbox edge cases
|
|
247
|
-
// ============================================================
|
|
248
|
-
describe('inbox-outbox edge cases', () => {
|
|
249
|
-
beforeEach(() => {
|
|
250
|
-
mkdirSync(join(TEAMS_IO_DIR, 'inbox'), { recursive: true });
|
|
251
|
-
mkdirSync(join(TEAMS_IO_DIR, 'outbox'), { recursive: true });
|
|
252
|
-
mkdirSync(join(TEAMS_IO_DIR, 'signals'), { recursive: true });
|
|
253
|
-
});
|
|
254
|
-
describe('readNewInboxMessages with malformed JSONL mixed with valid', () => {
|
|
255
|
-
it('returns valid messages before first malformed line and stops', () => {
|
|
256
|
-
// Use a unique worker name to avoid any cursor conflicts
|
|
257
|
-
const workerName = 'w-malformed-test';
|
|
258
|
-
const inbox = join(TEAMS_IO_DIR, 'inbox', `${workerName}.jsonl`);
|
|
259
|
-
const cursorFile = join(TEAMS_IO_DIR, 'inbox', `${workerName}.offset`);
|
|
260
|
-
const validMsg1 = { type: 'message', content: 'first', timestamp: '2026-01-01T00:00:00Z' };
|
|
261
|
-
const validMsg2 = { type: 'message', content: 'second', timestamp: '2026-01-01T00:01:00Z' };
|
|
262
|
-
const unreachableMsg = { type: 'message', content: 'unreachable', timestamp: '2026-01-01T00:02:00Z' };
|
|
263
|
-
const content = [
|
|
264
|
-
JSON.stringify(validMsg1),
|
|
265
|
-
JSON.stringify(validMsg2),
|
|
266
|
-
'this is not json',
|
|
267
|
-
JSON.stringify(unreachableMsg),
|
|
268
|
-
].join('\n') + '\n';
|
|
269
|
-
writeFileSync(inbox, content);
|
|
270
|
-
// Verify file was written correctly
|
|
271
|
-
const rawContent = readFileSync(inbox, 'utf-8');
|
|
272
|
-
expect(rawContent.length).toBeGreaterThan(0);
|
|
273
|
-
// Verify no stale cursor
|
|
274
|
-
expect(existsSync(cursorFile)).toBe(false);
|
|
275
|
-
const msgs = readNewInboxMessages(EDGE_TEAM_IO, workerName);
|
|
276
|
-
expect(msgs).toHaveLength(2);
|
|
277
|
-
expect(msgs[0].content).toBe('first');
|
|
278
|
-
expect(msgs[1].content).toBe('second');
|
|
279
|
-
});
|
|
280
|
-
});
|
|
281
|
-
describe('readNewInboxMessages with corrupt cursor file', () => {
|
|
282
|
-
it('resets cursor to 0 on malformed cursor JSON', () => {
|
|
283
|
-
const inbox = join(TEAMS_IO_DIR, 'inbox', 'w1.jsonl');
|
|
284
|
-
const cursorFile = join(TEAMS_IO_DIR, 'inbox', 'w1.offset');
|
|
285
|
-
const msg = { type: 'message', content: 'hello', timestamp: '2026-01-01T00:00:00Z' };
|
|
286
|
-
writeFileSync(inbox, JSON.stringify(msg) + '\n');
|
|
287
|
-
writeFileSync(cursorFile, 'NOT VALID JSON AT ALL');
|
|
288
|
-
const msgs = readNewInboxMessages(EDGE_TEAM_IO, 'w1');
|
|
289
|
-
expect(msgs).toHaveLength(1);
|
|
290
|
-
expect(msgs[0].content).toBe('hello');
|
|
291
|
-
});
|
|
292
|
-
});
|
|
293
|
-
describe('readNewInboxMessages returns empty when cursor equals file size', () => {
|
|
294
|
-
it('returns empty array when no new data since last read', () => {
|
|
295
|
-
const inbox = join(TEAMS_IO_DIR, 'inbox', 'w1.jsonl');
|
|
296
|
-
const msg = { type: 'message', content: 'data', timestamp: '2026-01-01T00:00:00Z' };
|
|
297
|
-
writeFileSync(inbox, JSON.stringify(msg) + '\n');
|
|
298
|
-
// First read consumes everything
|
|
299
|
-
const first = readNewInboxMessages(EDGE_TEAM_IO, 'w1');
|
|
300
|
-
expect(first).toHaveLength(1);
|
|
301
|
-
// Second read with no new data
|
|
302
|
-
const second = readNewInboxMessages(EDGE_TEAM_IO, 'w1');
|
|
303
|
-
expect(second).toEqual([]);
|
|
304
|
-
});
|
|
305
|
-
});
|
|
306
|
-
describe('readAllInboxMessages with malformed lines', () => {
|
|
307
|
-
it('skips invalid JSON lines and returns valid ones', () => {
|
|
308
|
-
const inbox = join(TEAMS_IO_DIR, 'inbox', 'w1.jsonl');
|
|
309
|
-
const valid = { type: 'context', content: 'ctx', timestamp: '2026-01-01T00:00:00Z' };
|
|
310
|
-
writeFileSync(inbox, 'garbage\n' + JSON.stringify(valid) + '\n' + '{{{\n');
|
|
311
|
-
const msgs = readAllInboxMessages(EDGE_TEAM_IO, 'w1');
|
|
312
|
-
expect(msgs).toHaveLength(1);
|
|
313
|
-
expect(msgs[0].content).toBe('ctx');
|
|
314
|
-
});
|
|
315
|
-
});
|
|
316
|
-
describe('rotateOutboxIfNeeded at exact boundary', () => {
|
|
317
|
-
it('does not rotate when line count equals maxLines', () => {
|
|
318
|
-
const msg = { type: 'heartbeat', timestamp: '2026-01-01T00:00:00Z' };
|
|
319
|
-
for (let i = 0; i < 10; i++) {
|
|
320
|
-
appendOutbox(EDGE_TEAM_IO, 'w1', { ...msg, message: `msg-${i}` });
|
|
321
|
-
}
|
|
322
|
-
rotateOutboxIfNeeded(EDGE_TEAM_IO, 'w1', 10);
|
|
323
|
-
const lines = readFileSync(join(TEAMS_IO_DIR, 'outbox', 'w1.jsonl'), 'utf-8')
|
|
324
|
-
.trim().split('\n').filter(l => l.trim());
|
|
325
|
-
// Should keep all 10 since 10 <= 10
|
|
326
|
-
expect(lines).toHaveLength(10);
|
|
327
|
-
});
|
|
328
|
-
it('rotates when line count is maxLines + 1', () => {
|
|
329
|
-
const msg = { type: 'heartbeat', timestamp: '2026-01-01T00:00:00Z' };
|
|
330
|
-
for (let i = 0; i < 11; i++) {
|
|
331
|
-
appendOutbox(EDGE_TEAM_IO, 'w1', { ...msg, message: `msg-${i}` });
|
|
332
|
-
}
|
|
333
|
-
rotateOutboxIfNeeded(EDGE_TEAM_IO, 'w1', 10);
|
|
334
|
-
const lines = readFileSync(join(TEAMS_IO_DIR, 'outbox', 'w1.jsonl'), 'utf-8')
|
|
335
|
-
.trim().split('\n').filter(l => l.trim());
|
|
336
|
-
// Should keep floor(10/2) = 5 most recent
|
|
337
|
-
expect(lines).toHaveLength(5);
|
|
338
|
-
// Most recent should be msg-10
|
|
339
|
-
expect(JSON.parse(lines[lines.length - 1]).message).toBe('msg-10');
|
|
340
|
-
});
|
|
341
|
-
});
|
|
342
|
-
describe('rotateOutboxIfNeeded on nonexistent file', () => {
|
|
343
|
-
it('is a no-op and does not throw', () => {
|
|
344
|
-
expect(() => rotateOutboxIfNeeded(EDGE_TEAM_IO, 'ghost', 10)).not.toThrow();
|
|
345
|
-
});
|
|
346
|
-
});
|
|
347
|
-
describe('rotateOutboxIfNeeded with maxLines of 0', () => {
|
|
348
|
-
it('keeps ALL lines due to JS slice(-0) returning full array', () => {
|
|
349
|
-
// BUG/QUIRK: When maxLines=0, keepCount = floor(0/2) = 0,
|
|
350
|
-
// but lines.slice(-0) in JS returns the ENTIRE array (not empty).
|
|
351
|
-
// This means maxLines=0 does NOT empty the file -- it keeps everything.
|
|
352
|
-
// This is a known JavaScript edge case with Array.prototype.slice.
|
|
353
|
-
const msg = { type: 'idle', timestamp: '2026-01-01T00:00:00Z' };
|
|
354
|
-
appendOutbox(EDGE_TEAM_IO, 'w1', msg);
|
|
355
|
-
rotateOutboxIfNeeded(EDGE_TEAM_IO, 'w1', 0);
|
|
356
|
-
const lines = readFileSync(join(TEAMS_IO_DIR, 'outbox', 'w1.jsonl'), 'utf-8')
|
|
357
|
-
.trim().split('\n').filter(l => l.trim());
|
|
358
|
-
// slice(-0) === slice(0) === full array, so 1 line is preserved
|
|
359
|
-
expect(lines).toHaveLength(1);
|
|
360
|
-
});
|
|
361
|
-
});
|
|
362
|
-
describe('clearInbox when files do not exist', () => {
|
|
363
|
-
it('does not throw when inbox and cursor are missing', () => {
|
|
364
|
-
expect(() => clearInbox(EDGE_TEAM_IO, 'nonexistent-worker')).not.toThrow();
|
|
365
|
-
});
|
|
366
|
-
});
|
|
367
|
-
describe('deleteShutdownSignal when file does not exist', () => {
|
|
368
|
-
it('does not throw', () => {
|
|
369
|
-
expect(() => deleteShutdownSignal(EDGE_TEAM_IO, 'ghost')).not.toThrow();
|
|
370
|
-
});
|
|
371
|
-
});
|
|
372
|
-
describe('checkShutdownSignal with corrupt signal file', () => {
|
|
373
|
-
it('returns null for malformed signal JSON', () => {
|
|
374
|
-
const sigFile = join(TEAMS_IO_DIR, 'signals', 'w1.shutdown');
|
|
375
|
-
writeFileSync(sigFile, 'this is not json');
|
|
376
|
-
expect(checkShutdownSignal(EDGE_TEAM_IO, 'w1')).toBeNull();
|
|
377
|
-
});
|
|
378
|
-
});
|
|
379
|
-
describe('cleanupWorkerFiles when some files already missing', () => {
|
|
380
|
-
it('cleans available files and ignores missing ones', () => {
|
|
381
|
-
// Only create outbox, skip inbox/cursor/signal
|
|
382
|
-
appendOutbox(EDGE_TEAM_IO, 'w1', { type: 'idle', timestamp: '2026-01-01T00:00:00Z' });
|
|
383
|
-
expect(existsSync(join(TEAMS_IO_DIR, 'outbox', 'w1.jsonl'))).toBe(true);
|
|
384
|
-
// Cleanup should not throw even though inbox/signal don't exist
|
|
385
|
-
expect(() => cleanupWorkerFiles(EDGE_TEAM_IO, 'w1')).not.toThrow();
|
|
386
|
-
expect(existsSync(join(TEAMS_IO_DIR, 'outbox', 'w1.jsonl'))).toBe(false);
|
|
387
|
-
});
|
|
388
|
-
});
|
|
389
|
-
describe('inbox messages with empty content', () => {
|
|
390
|
-
it('reads messages with empty string content', () => {
|
|
391
|
-
const inbox = join(TEAMS_IO_DIR, 'inbox', 'w1.jsonl');
|
|
392
|
-
const msg = { type: 'message', content: '', timestamp: '2026-01-01T00:00:00Z' };
|
|
393
|
-
writeFileSync(inbox, JSON.stringify(msg) + '\n');
|
|
394
|
-
const msgs = readNewInboxMessages(EDGE_TEAM_IO, 'w1');
|
|
395
|
-
expect(msgs).toHaveLength(1);
|
|
396
|
-
expect(msgs[0].content).toBe('');
|
|
397
|
-
});
|
|
398
|
-
});
|
|
399
|
-
describe('readNewInboxMessages with multi-byte UTF-8 content', () => {
|
|
400
|
-
it('correctly handles unicode characters in messages', () => {
|
|
401
|
-
const inbox = join(TEAMS_IO_DIR, 'inbox', 'w1.jsonl');
|
|
402
|
-
const msg = {
|
|
403
|
-
type: 'message',
|
|
404
|
-
content: 'Hello \u{1F600} \u{1F4BB} \u00E9\u00E8\u00EA \u4F60\u597D',
|
|
405
|
-
timestamp: '2026-01-01T00:00:00Z',
|
|
406
|
-
};
|
|
407
|
-
writeFileSync(inbox, JSON.stringify(msg) + '\n');
|
|
408
|
-
const msgs = readNewInboxMessages(EDGE_TEAM_IO, 'w1');
|
|
409
|
-
expect(msgs).toHaveLength(1);
|
|
410
|
-
expect(msgs[0].content).toContain('\u4F60\u597D');
|
|
411
|
-
});
|
|
412
|
-
});
|
|
413
|
-
describe('readNewInboxMessages with multi-byte then append', () => {
|
|
414
|
-
it('cursor byte offset works correctly across multi-byte boundaries', () => {
|
|
415
|
-
const inbox = join(TEAMS_IO_DIR, 'inbox', 'w1.jsonl');
|
|
416
|
-
// First message with multi-byte chars
|
|
417
|
-
const msg1 = {
|
|
418
|
-
type: 'message',
|
|
419
|
-
content: '\u{1F600}\u{1F600}\u{1F600}',
|
|
420
|
-
timestamp: '2026-01-01T00:00:00Z',
|
|
421
|
-
};
|
|
422
|
-
writeFileSync(inbox, JSON.stringify(msg1) + '\n');
|
|
423
|
-
const batch1 = readNewInboxMessages(EDGE_TEAM_IO, 'w1');
|
|
424
|
-
expect(batch1).toHaveLength(1);
|
|
425
|
-
// Append second message
|
|
426
|
-
const msg2 = { type: 'message', content: 'after-emoji', timestamp: '2026-01-01T00:01:00Z' };
|
|
427
|
-
appendFileSync(inbox, JSON.stringify(msg2) + '\n');
|
|
428
|
-
const batch2 = readNewInboxMessages(EDGE_TEAM_IO, 'w1');
|
|
429
|
-
expect(batch2).toHaveLength(1);
|
|
430
|
-
expect(batch2[0].content).toBe('after-emoji');
|
|
431
|
-
});
|
|
432
|
-
});
|
|
433
|
-
describe('writeShutdownSignal overwrites existing signal', () => {
|
|
434
|
-
it('replaces previous signal content', () => {
|
|
435
|
-
writeShutdownSignal(EDGE_TEAM_IO, 'w1', 'req-1', 'first reason');
|
|
436
|
-
writeShutdownSignal(EDGE_TEAM_IO, 'w1', 'req-2', 'second reason');
|
|
437
|
-
const sig = checkShutdownSignal(EDGE_TEAM_IO, 'w1');
|
|
438
|
-
expect(sig?.requestId).toBe('req-2');
|
|
439
|
-
expect(sig?.reason).toBe('second reason');
|
|
440
|
-
});
|
|
441
|
-
});
|
|
442
|
-
describe('appendOutbox creates directories automatically', () => {
|
|
443
|
-
it('creates outbox dir if it does not exist', () => {
|
|
444
|
-
// Remove the outbox directory
|
|
445
|
-
rmSync(join(TEAMS_IO_DIR, 'outbox'), { recursive: true, force: true });
|
|
446
|
-
expect(existsSync(join(TEAMS_IO_DIR, 'outbox'))).toBe(false);
|
|
447
|
-
const msg = { type: 'idle', timestamp: '2026-01-01T00:00:00Z' };
|
|
448
|
-
appendOutbox(EDGE_TEAM_IO, 'w1', msg);
|
|
449
|
-
expect(existsSync(join(TEAMS_IO_DIR, 'outbox', 'w1.jsonl'))).toBe(true);
|
|
450
|
-
});
|
|
451
|
-
});
|
|
452
|
-
});
|
|
453
|
-
// ============================================================
|
|
454
|
-
// 3. heartbeat edge cases
|
|
455
|
-
// ============================================================
|
|
456
|
-
describe('heartbeat edge cases', () => {
|
|
457
|
-
beforeEach(() => {
|
|
458
|
-
mkdirSync(HB_DIR, { recursive: true });
|
|
459
|
-
});
|
|
460
|
-
describe('isWorkerAlive with maxAgeMs of 0', () => {
|
|
461
|
-
it('returns false because any age >= 0 fails the < 0 check', () => {
|
|
462
|
-
writeHeartbeat(HB_DIR, makeHeartbeat());
|
|
463
|
-
// Even a fresh heartbeat is at least 0ms old, and 0 < 0 is false
|
|
464
|
-
expect(isWorkerAlive(HB_DIR, 'test-team', 'w1', 0)).toBe(false);
|
|
465
|
-
});
|
|
466
|
-
});
|
|
467
|
-
describe('isWorkerAlive with very large maxAgeMs', () => {
|
|
468
|
-
it('returns true for stale heartbeat when maxAge exceeds the staleness', () => {
|
|
469
|
-
const stale = makeHeartbeat({ lastPollAt: '2000-01-01T00:00:00Z' });
|
|
470
|
-
writeHeartbeat(HB_DIR, stale);
|
|
471
|
-
// Year 2000 is ~26 years ago from 2026. Use 30 years in ms to be safe.
|
|
472
|
-
const thirtyYearsMs = 30 * 365.25 * 24 * 60 * 60 * 1000;
|
|
473
|
-
expect(isWorkerAlive(HB_DIR, 'test-team', 'w1', thirtyYearsMs)).toBe(true);
|
|
474
|
-
});
|
|
475
|
-
});
|
|
476
|
-
describe('isWorkerAlive with future timestamp', () => {
|
|
477
|
-
it('returns true since future - now is negative, which is < maxAgeMs', () => {
|
|
478
|
-
const future = makeHeartbeat({
|
|
479
|
-
lastPollAt: new Date(Date.now() + 3600000).toISOString(),
|
|
480
|
-
});
|
|
481
|
-
writeHeartbeat(HB_DIR, future);
|
|
482
|
-
expect(isWorkerAlive(HB_DIR, 'test-team', 'w1', 1000)).toBe(true);
|
|
483
|
-
});
|
|
484
|
-
});
|
|
485
|
-
describe('isWorkerAlive with empty string timestamp', () => {
|
|
486
|
-
it('returns false for empty lastPollAt', () => {
|
|
487
|
-
const bad = makeHeartbeat({ lastPollAt: '' });
|
|
488
|
-
writeHeartbeat(HB_DIR, bad);
|
|
489
|
-
// new Date('').getTime() is NaN
|
|
490
|
-
expect(isWorkerAlive(HB_DIR, 'test-team', 'w1', 60000)).toBe(false);
|
|
491
|
-
});
|
|
492
|
-
});
|
|
493
|
-
describe('isWorkerAlive with epoch zero timestamp', () => {
|
|
494
|
-
it('returns false for very old epoch timestamp with tight maxAge', () => {
|
|
495
|
-
const epoch = makeHeartbeat({ lastPollAt: '1970-01-01T00:00:00Z' });
|
|
496
|
-
writeHeartbeat(HB_DIR, epoch);
|
|
497
|
-
expect(isWorkerAlive(HB_DIR, 'test-team', 'w1', 60000)).toBe(false);
|
|
498
|
-
});
|
|
499
|
-
});
|
|
500
|
-
describe('readHeartbeat with corrupt JSON file', () => {
|
|
501
|
-
it('returns null for corrupt heartbeat file', () => {
|
|
502
|
-
const dir = join(HB_DIR, '.omc', 'state', 'team-bridge', 'test-team');
|
|
503
|
-
mkdirSync(dir, { recursive: true });
|
|
504
|
-
writeFileSync(join(dir, 'w1.heartbeat.json'), 'NOT JSON');
|
|
505
|
-
expect(readHeartbeat(HB_DIR, 'test-team', 'w1')).toBeNull();
|
|
506
|
-
});
|
|
507
|
-
});
|
|
508
|
-
describe('listHeartbeats with mixed valid and corrupt files', () => {
|
|
509
|
-
it('returns only successfully parsed heartbeats', () => {
|
|
510
|
-
writeHeartbeat(HB_DIR, makeHeartbeat({ workerName: 'good1' }));
|
|
511
|
-
writeHeartbeat(HB_DIR, makeHeartbeat({ workerName: 'good2' }));
|
|
512
|
-
// Write a corrupt heartbeat file
|
|
513
|
-
const dir = join(HB_DIR, '.omc', 'state', 'team-bridge', 'test-team');
|
|
514
|
-
writeFileSync(join(dir, 'corrupt.heartbeat.json'), '{bad json{{{');
|
|
515
|
-
const heartbeats = listHeartbeats(HB_DIR, 'test-team');
|
|
516
|
-
expect(heartbeats).toHaveLength(2);
|
|
517
|
-
const names = heartbeats.map(h => h.workerName).sort();
|
|
518
|
-
expect(names).toEqual(['good1', 'good2']);
|
|
519
|
-
});
|
|
520
|
-
});
|
|
521
|
-
describe('writeHeartbeat overwrites existing data', () => {
|
|
522
|
-
it('replaces previous heartbeat content', () => {
|
|
523
|
-
writeHeartbeat(HB_DIR, makeHeartbeat({ status: 'polling', consecutiveErrors: 0 }));
|
|
524
|
-
writeHeartbeat(HB_DIR, makeHeartbeat({ status: 'executing', consecutiveErrors: 2 }));
|
|
525
|
-
const hb = readHeartbeat(HB_DIR, 'test-team', 'w1');
|
|
526
|
-
expect(hb?.status).toBe('executing');
|
|
527
|
-
expect(hb?.consecutiveErrors).toBe(2);
|
|
528
|
-
});
|
|
529
|
-
});
|
|
530
|
-
describe('cleanupTeamHeartbeats with non-heartbeat files', () => {
|
|
531
|
-
it('removes all files in the team directory including non-heartbeat ones', () => {
|
|
532
|
-
writeHeartbeat(HB_DIR, makeHeartbeat({ workerName: 'w1' }));
|
|
533
|
-
const dir = join(HB_DIR, '.omc', 'state', 'team-bridge', 'test-team');
|
|
534
|
-
// Write an extra non-heartbeat file
|
|
535
|
-
writeFileSync(join(dir, 'other-file.txt'), 'not a heartbeat');
|
|
536
|
-
cleanupTeamHeartbeats(HB_DIR, 'test-team');
|
|
537
|
-
// Heartbeat should be gone
|
|
538
|
-
expect(readHeartbeat(HB_DIR, 'test-team', 'w1')).toBeNull();
|
|
539
|
-
// The non-heartbeat file is also deleted (cleanupTeamHeartbeats deletes all files)
|
|
540
|
-
expect(existsSync(join(dir, 'other-file.txt'))).toBe(false);
|
|
541
|
-
});
|
|
542
|
-
});
|
|
543
|
-
describe('deleteHeartbeat is idempotent', () => {
|
|
544
|
-
it('can be called twice without error', () => {
|
|
545
|
-
writeHeartbeat(HB_DIR, makeHeartbeat());
|
|
546
|
-
deleteHeartbeat(HB_DIR, 'test-team', 'w1');
|
|
547
|
-
expect(() => deleteHeartbeat(HB_DIR, 'test-team', 'w1')).not.toThrow();
|
|
548
|
-
});
|
|
549
|
-
});
|
|
550
|
-
});
|
|
551
|
-
// ============================================================
|
|
552
|
-
// 4. tmux-session edge cases
|
|
553
|
-
// ============================================================
|
|
554
|
-
describe('tmux-session edge cases', () => {
|
|
555
|
-
describe('sanitizeName with empty string', () => {
|
|
556
|
-
it('throws for empty string', () => {
|
|
557
|
-
expect(() => sanitizeName('')).toThrow('no valid characters');
|
|
558
|
-
});
|
|
559
|
-
});
|
|
560
|
-
describe('sanitizeName with unicode characters', () => {
|
|
561
|
-
it('strips all unicode and keeps only ASCII alphanumeric/hyphen', () => {
|
|
562
|
-
expect(() => sanitizeName('\u4F60\u597D\u{1F600}')).toThrow('no valid characters');
|
|
563
|
-
});
|
|
564
|
-
it('keeps ASCII portion of mixed unicode/ASCII', () => {
|
|
565
|
-
expect(sanitizeName('\u4F60hello\u597D')).toBe('hello');
|
|
566
|
-
});
|
|
567
|
-
});
|
|
568
|
-
describe('sanitizeName with only hyphens', () => {
|
|
569
|
-
it('accepts hyphens-only name', () => {
|
|
570
|
-
expect(sanitizeName('---')).toBe('---');
|
|
571
|
-
});
|
|
572
|
-
});
|
|
573
|
-
describe('sanitizeName with whitespace', () => {
|
|
574
|
-
it('strips spaces and tabs', () => {
|
|
575
|
-
expect(sanitizeName(' hello world ')).toBe('helloworld');
|
|
576
|
-
});
|
|
577
|
-
});
|
|
578
|
-
describe('sanitizeName with path traversal characters', () => {
|
|
579
|
-
it('strips dots, slashes, and backslashes', () => {
|
|
580
|
-
expect(sanitizeName('../../../etc/passwd')).toBe('etcpasswd');
|
|
581
|
-
});
|
|
582
|
-
});
|
|
583
|
-
describe('sanitizeName with newlines and control characters', () => {
|
|
584
|
-
it('strips all control characters', () => {
|
|
585
|
-
expect(sanitizeName('hello\nworld\t!')).toBe('helloworld');
|
|
586
|
-
});
|
|
587
|
-
});
|
|
588
|
-
describe('sessionName total length', () => {
|
|
589
|
-
it('each part is truncated to 50 chars independently', () => {
|
|
590
|
-
const longName = 'a'.repeat(100);
|
|
591
|
-
const result = sessionName(longName, longName);
|
|
592
|
-
// 'omc-team-' + 50 chars + '-' + 50 chars = 110 total
|
|
593
|
-
expect(result.length).toBe(110);
|
|
594
|
-
expect(result).toBe(`omc-team-${'a'.repeat(50)}-${'a'.repeat(50)}`);
|
|
595
|
-
});
|
|
596
|
-
});
|
|
597
|
-
describe('sanitizeName preserves case', () => {
|
|
598
|
-
it('does not lowercase the name', () => {
|
|
599
|
-
expect(sanitizeName('MyWorker-ABC')).toBe('MyWorker-ABC');
|
|
600
|
-
});
|
|
601
|
-
});
|
|
602
|
-
});
|
|
603
|
-
// ============================================================
|
|
604
|
-
// 5. team-registration edge cases
|
|
605
|
-
// ============================================================
|
|
606
|
-
describe('team-registration edge cases', () => {
|
|
607
|
-
beforeEach(() => {
|
|
608
|
-
mkdirSync(REG_DIR, { recursive: true });
|
|
609
|
-
mkdirSync(join(REG_DIR, '.omc', 'state'), { recursive: true });
|
|
610
|
-
mkdirSync(CONFIG_DIR, { recursive: true });
|
|
611
|
-
});
|
|
612
|
-
describe('readProbeResult with corrupt JSON', () => {
|
|
613
|
-
it('returns null for malformed probe result file', () => {
|
|
614
|
-
const probePath = join(REG_DIR, '.omc', 'state', 'config-probe-result.json');
|
|
615
|
-
writeFileSync(probePath, 'NOT JSON');
|
|
616
|
-
expect(readProbeResult(REG_DIR)).toBeNull();
|
|
617
|
-
});
|
|
618
|
-
});
|
|
619
|
-
describe('listMcpWorkers with malformed shadow registry', () => {
|
|
620
|
-
it('returns empty when shadow registry is corrupt JSON', () => {
|
|
621
|
-
const shadowPath = join(REG_DIR, '.omc', 'state', 'team-mcp-workers.json');
|
|
622
|
-
writeFileSync(shadowPath, '{bad');
|
|
623
|
-
// Should not throw and return whatever was parsed from config (empty since config not set up for this team)
|
|
624
|
-
const workers = listMcpWorkers(REG_TEAM, REG_DIR);
|
|
625
|
-
expect(Array.isArray(workers)).toBe(true);
|
|
626
|
-
});
|
|
627
|
-
});
|
|
628
|
-
describe('listMcpWorkers with malformed config.json', () => {
|
|
629
|
-
it('ignores corrupt config.json and falls back to shadow', () => {
|
|
630
|
-
const configPath = join(CONFIG_DIR, 'config.json');
|
|
631
|
-
writeFileSync(configPath, '{bad json{{{');
|
|
632
|
-
// Register in shadow only
|
|
633
|
-
registerMcpWorker(REG_TEAM, 'w1', 'codex', 'gpt-5', 'sess1', '/cwd', REG_DIR);
|
|
634
|
-
const workers = listMcpWorkers(REG_TEAM, REG_DIR);
|
|
635
|
-
expect(workers).toHaveLength(1);
|
|
636
|
-
expect(workers[0].name).toBe('w1');
|
|
637
|
-
});
|
|
638
|
-
});
|
|
639
|
-
describe('registerMcpWorker builds correct agentId', () => {
|
|
640
|
-
it('agentId format is {workerName}@{teamName}', () => {
|
|
641
|
-
registerMcpWorker(REG_TEAM, 'myworker', 'gemini', 'gemini-pro', 'sess1', '/cwd', REG_DIR);
|
|
642
|
-
const workers = listMcpWorkers(REG_TEAM, REG_DIR);
|
|
643
|
-
expect(workers[0].agentId).toBe(`myworker@${REG_TEAM}`);
|
|
644
|
-
});
|
|
645
|
-
});
|
|
646
|
-
describe('registerInConfig with config.json missing members array', () => {
|
|
647
|
-
it('creates members array when config.json has no members field', () => {
|
|
648
|
-
// Write config.json without members
|
|
649
|
-
const configPath = join(CONFIG_DIR, 'config.json');
|
|
650
|
-
writeFileSync(configPath, JSON.stringify({ teamName: REG_TEAM }));
|
|
651
|
-
// Set probe to pass so registerInConfig is called
|
|
652
|
-
writeProbeResult(REG_DIR, { probeResult: 'pass', probedAt: '', version: '' });
|
|
653
|
-
registerMcpWorker(REG_TEAM, 'w1', 'codex', 'gpt-5', 'sess1', '/cwd', REG_DIR);
|
|
654
|
-
const config = JSON.parse(readFileSync(configPath, 'utf-8'));
|
|
655
|
-
expect(config.members).toHaveLength(1);
|
|
656
|
-
expect(config.members[0].name).toBe('w1');
|
|
657
|
-
});
|
|
658
|
-
});
|
|
659
|
-
describe('registerInConfig deduplicates by worker name', () => {
|
|
660
|
-
it('replaces existing entry with same name', () => {
|
|
661
|
-
const configPath = join(CONFIG_DIR, 'config.json');
|
|
662
|
-
writeFileSync(configPath, JSON.stringify({
|
|
663
|
-
teamName: REG_TEAM,
|
|
664
|
-
members: [{ name: 'w1', backendType: 'tmux', agentType: 'mcp-codex' }],
|
|
665
|
-
}));
|
|
666
|
-
writeProbeResult(REG_DIR, { probeResult: 'pass', probedAt: '', version: '' });
|
|
667
|
-
registerMcpWorker(REG_TEAM, 'w1', 'gemini', 'gemini-pro', 'sess2', '/cwd2', REG_DIR);
|
|
668
|
-
const config = JSON.parse(readFileSync(configPath, 'utf-8'));
|
|
669
|
-
expect(config.members).toHaveLength(1);
|
|
670
|
-
expect(config.members[0].agentType).toBe('mcp-gemini');
|
|
671
|
-
});
|
|
672
|
-
});
|
|
673
|
-
describe('unregisterMcpWorker with corrupt config.json', () => {
|
|
674
|
-
it('does not throw when config.json is malformed', () => {
|
|
675
|
-
const configPath = join(CONFIG_DIR, 'config.json');
|
|
676
|
-
writeFileSync(configPath, 'NOT JSON');
|
|
677
|
-
expect(() => unregisterMcpWorker(REG_TEAM, 'w1', REG_DIR)).not.toThrow();
|
|
678
|
-
});
|
|
679
|
-
});
|
|
680
|
-
describe('unregisterMcpWorker with corrupt shadow registry', () => {
|
|
681
|
-
it('does not throw when shadow registry is malformed', () => {
|
|
682
|
-
const shadowPath = join(REG_DIR, '.omc', 'state', 'team-mcp-workers.json');
|
|
683
|
-
writeFileSync(shadowPath, 'NOT JSON');
|
|
684
|
-
expect(() => unregisterMcpWorker(REG_TEAM, 'w1', REG_DIR)).not.toThrow();
|
|
685
|
-
});
|
|
686
|
-
});
|
|
687
|
-
describe('isMcpWorker with various inputs', () => {
|
|
688
|
-
it('returns false for null/undefined backendType', () => {
|
|
689
|
-
expect(isMcpWorker({ backendType: null })).toBe(false);
|
|
690
|
-
expect(isMcpWorker({ backendType: undefined })).toBe(false);
|
|
691
|
-
});
|
|
692
|
-
it('returns false for numeric backendType', () => {
|
|
693
|
-
expect(isMcpWorker({ backendType: 123 })).toBe(false);
|
|
694
|
-
});
|
|
695
|
-
it('returns true only for exact string tmux', () => {
|
|
696
|
-
expect(isMcpWorker({ backendType: 'TMUX' })).toBe(false);
|
|
697
|
-
expect(isMcpWorker({ backendType: 'tmux ' })).toBe(false);
|
|
698
|
-
expect(isMcpWorker({ backendType: 'tmux' })).toBe(true);
|
|
699
|
-
});
|
|
700
|
-
});
|
|
701
|
-
describe('listMcpWorkers with no files at all', () => {
|
|
702
|
-
it('returns empty array when neither config nor shadow exist', () => {
|
|
703
|
-
// Use a team name that has no config dir
|
|
704
|
-
const workers = listMcpWorkers('totally_nonexistent_team_abc', REG_DIR);
|
|
705
|
-
expect(workers).toEqual([]);
|
|
706
|
-
});
|
|
707
|
-
});
|
|
708
|
-
describe('shadow registry handles missing workers array gracefully', () => {
|
|
709
|
-
it('registers successfully when shadow registry has no workers field', () => {
|
|
710
|
-
// Shadow file exists but has no "workers" key — (registry.workers || []) guard handles it
|
|
711
|
-
const shadowPath = join(REG_DIR, '.omc', 'state', 'team-mcp-workers.json');
|
|
712
|
-
writeFileSync(shadowPath, JSON.stringify({ teamName: REG_TEAM }));
|
|
713
|
-
// Should not throw
|
|
714
|
-
expect(() => registerMcpWorker(REG_TEAM, 'w1', 'codex', 'gpt-5', 'sess1', '/cwd', REG_DIR)).not.toThrow();
|
|
715
|
-
// Verify the worker was registered
|
|
716
|
-
const workers = listMcpWorkers(REG_TEAM, REG_DIR);
|
|
717
|
-
expect(workers.length).toBeGreaterThanOrEqual(1);
|
|
718
|
-
expect(workers.some(w => w.name === 'w1')).toBe(true);
|
|
719
|
-
});
|
|
720
|
-
});
|
|
721
|
-
describe('config.json members with non-tmux workers', () => {
|
|
722
|
-
it('listMcpWorkers filters out non-tmux members from config', () => {
|
|
723
|
-
const configPath = join(CONFIG_DIR, 'config.json');
|
|
724
|
-
writeFileSync(configPath, JSON.stringify({
|
|
725
|
-
teamName: REG_TEAM,
|
|
726
|
-
members: [
|
|
727
|
-
{ name: 'claude-agent', backendType: 'subprocess', agentType: 'claude' },
|
|
728
|
-
{ name: 'mcp-w1', backendType: 'tmux', agentType: 'mcp-codex' },
|
|
729
|
-
],
|
|
730
|
-
}));
|
|
731
|
-
const workers = listMcpWorkers(REG_TEAM, REG_DIR);
|
|
732
|
-
expect(workers).toHaveLength(1);
|
|
733
|
-
expect(workers[0].name).toBe('mcp-w1');
|
|
734
|
-
});
|
|
735
|
-
});
|
|
736
|
-
});
|
|
737
|
-
//# sourceMappingURL=edge-cases.test.js.map
|