@liangjie559567/ultrapower 6.0.0 → 7.0.2
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 +1 -1
- package/LICENSE +21 -21
- package/README.md +2 -2
- package/agents/executor.md +10 -5
- package/bridge/codex-server.cjs +1 -1
- package/bridge/gemini-server.cjs +1 -1
- package/bridge/gyoshu_bridge.py +846 -846
- package/dist/agents/status.d.ts +28 -0
- package/dist/agents/status.d.ts.map +1 -0
- package/dist/agents/status.js +44 -0
- package/dist/agents/status.js.map +1 -0
- package/dist/cache/result-cache.d.ts +20 -0
- package/dist/cache/result-cache.d.ts.map +1 -0
- package/dist/cache/result-cache.js +64 -0
- package/dist/cache/result-cache.js.map +1 -0
- package/dist/cache/security.d.ts +21 -0
- package/dist/cache/security.d.ts.map +1 -0
- package/dist/cache/security.js +39 -0
- package/dist/cache/security.js.map +1 -0
- package/dist/cli/autocomplete.d.ts +25 -0
- package/dist/cli/autocomplete.d.ts.map +1 -0
- package/dist/cli/autocomplete.js +99 -0
- package/dist/cli/autocomplete.js.map +1 -0
- package/dist/cli/commands/agents.d.ts +2 -0
- package/dist/cli/commands/agents.d.ts.map +1 -1
- package/dist/cli/commands/agents.js +8 -0
- package/dist/cli/commands/agents.js.map +1 -1
- package/dist/cli/commands/backfill.d.ts +2 -0
- package/dist/cli/commands/backfill.d.ts.map +1 -1
- package/dist/cli/commands/backfill.js +13 -0
- package/dist/cli/commands/backfill.js.map +1 -1
- package/dist/cli/commands/cleanup.d.ts +2 -0
- package/dist/cli/commands/cleanup.d.ts.map +1 -1
- package/dist/cli/commands/cleanup.js +7 -0
- package/dist/cli/commands/cleanup.js.map +1 -1
- package/dist/cli/commands/config-notify-profile.d.ts +3 -0
- package/dist/cli/commands/config-notify-profile.d.ts.map +1 -0
- package/dist/cli/commands/config-notify-profile.js +58 -0
- package/dist/cli/commands/config-notify-profile.js.map +1 -0
- package/dist/cli/commands/config-stop-callback.d.ts +3 -0
- package/dist/cli/commands/config-stop-callback.d.ts.map +1 -0
- package/dist/cli/commands/config-stop-callback.js +97 -0
- package/dist/cli/commands/config-stop-callback.js.map +1 -0
- package/dist/cli/commands/config.d.ts +3 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +10 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/cost.d.ts +2 -0
- package/dist/cli/commands/cost.d.ts.map +1 -1
- package/dist/cli/commands/cost.js +8 -0
- package/dist/cli/commands/cost.js.map +1 -1
- package/dist/cli/commands/dashboard.d.ts +3 -0
- package/dist/cli/commands/dashboard.d.ts.map +1 -0
- package/dist/cli/commands/dashboard.js +13 -0
- package/dist/cli/commands/dashboard.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +3 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +11 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/export.d.ts +2 -0
- package/dist/cli/commands/export.d.ts.map +1 -1
- package/dist/cli/commands/export.js +10 -0
- package/dist/cli/commands/export.js.map +1 -1
- package/dist/cli/commands/info.d.ts +3 -0
- package/dist/cli/commands/info.d.ts.map +1 -0
- package/dist/cli/commands/info.js +10 -0
- package/dist/cli/commands/info.js.map +1 -0
- package/dist/cli/commands/init.d.ts +3 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +10 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/interop.d.ts +3 -0
- package/dist/cli/commands/interop.d.ts.map +1 -0
- package/dist/cli/commands/interop.js +10 -0
- package/dist/cli/commands/interop.js.map +1 -0
- package/dist/cli/commands/launch.d.ts +3 -0
- package/dist/cli/commands/launch.d.ts.map +1 -0
- package/dist/cli/commands/launch.js +20 -0
- package/dist/cli/commands/launch.js.map +1 -0
- package/dist/cli/commands/perf-wrapper.d.ts +2 -0
- package/dist/cli/commands/perf-wrapper.d.ts.map +1 -0
- package/dist/cli/commands/perf-wrapper.js +4 -0
- package/dist/cli/commands/perf-wrapper.js.map +1 -0
- package/dist/cli/commands/registry.d.ts +9 -0
- package/dist/cli/commands/registry.d.ts.map +1 -0
- package/dist/cli/commands/registry.js +29 -0
- package/dist/cli/commands/registry.js.map +1 -0
- package/dist/cli/commands/sessions.d.ts +2 -0
- package/dist/cli/commands/sessions.d.ts.map +1 -1
- package/dist/cli/commands/sessions.js +8 -0
- package/dist/cli/commands/sessions.js.map +1 -1
- package/dist/cli/commands/setup.d.ts +3 -0
- package/dist/cli/commands/setup.d.ts.map +1 -0
- package/dist/cli/commands/setup.js +10 -0
- package/dist/cli/commands/setup.js.map +1 -0
- package/dist/cli/commands/stats.d.ts +2 -0
- package/dist/cli/commands/stats.d.ts.map +1 -1
- package/dist/cli/commands/stats.js +8 -0
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/teleport-wrapper.d.ts +3 -0
- package/dist/cli/commands/teleport-wrapper.d.ts.map +1 -0
- package/dist/cli/commands/teleport-wrapper.js +12 -0
- package/dist/cli/commands/teleport-wrapper.js.map +1 -0
- package/dist/cli/commands/test-prompt.d.ts +3 -0
- package/dist/cli/commands/test-prompt.d.ts.map +1 -0
- package/dist/cli/commands/test-prompt.js +11 -0
- package/dist/cli/commands/test-prompt.js.map +1 -0
- package/dist/cli/commands/tui.d.ts +3 -0
- package/dist/cli/commands/tui.d.ts.map +1 -0
- package/dist/cli/commands/tui.js +10 -0
- package/dist/cli/commands/tui.js.map +1 -0
- package/dist/cli/commands/tutorial.d.ts +8 -0
- package/dist/cli/commands/tutorial.d.ts.map +1 -0
- package/dist/cli/commands/tutorial.js +31 -0
- package/dist/cli/commands/tutorial.js.map +1 -0
- package/dist/cli/commands/update.d.ts +3 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.js +10 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/commands/version.d.ts +3 -0
- package/dist/cli/commands/version.d.ts.map +1 -0
- package/dist/cli/commands/version.js +10 -0
- package/dist/cli/commands/version.js.map +1 -0
- package/dist/cli/commands/wait-wrapper.d.ts +3 -0
- package/dist/cli/commands/wait-wrapper.d.ts.map +1 -0
- package/dist/cli/commands/wait-wrapper.js +12 -0
- package/dist/cli/commands/wait-wrapper.js.map +1 -0
- package/dist/cli/error-handler.d.ts +7 -0
- package/dist/cli/error-handler.d.ts.map +1 -0
- package/dist/cli/error-handler.js +30 -0
- package/dist/cli/error-handler.js.map +1 -0
- package/dist/cli/index.d.ts +1 -7
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +44 -1474
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/loader.d.ts +24 -0
- package/dist/cli/loader.d.ts.map +1 -0
- package/dist/cli/loader.js +27 -0
- package/dist/cli/loader.js.map +1 -0
- package/dist/cli/progress/agent-status.d.ts +22 -0
- package/dist/cli/progress/agent-status.d.ts.map +1 -0
- package/dist/cli/progress/agent-status.js +44 -0
- package/dist/cli/progress/agent-status.js.map +1 -0
- package/dist/cli/progress/examples.d.ts +7 -0
- package/dist/cli/progress/examples.d.ts.map +1 -0
- package/dist/cli/progress/examples.js +50 -0
- package/dist/cli/progress/examples.js.map +1 -0
- package/dist/cli/progress/index.d.ts +7 -0
- package/dist/cli/progress/index.d.ts.map +1 -0
- package/dist/cli/progress/index.js +7 -0
- package/dist/cli/progress/index.js.map +1 -0
- package/dist/cli/progress/progress-bar.d.ts +17 -0
- package/dist/cli/progress/progress-bar.d.ts.map +1 -0
- package/dist/cli/progress/progress-bar.js +28 -0
- package/dist/cli/progress/progress-bar.js.map +1 -0
- package/dist/cli/progress/spinner.d.ts +14 -0
- package/dist/cli/progress/spinner.d.ts.map +1 -0
- package/dist/cli/progress/spinner.js +34 -0
- package/dist/cli/progress/spinner.js.map +1 -0
- package/dist/cli/tutorial/index.d.ts +15 -0
- package/dist/cli/tutorial/index.d.ts.map +1 -0
- package/dist/cli/tutorial/index.js +89 -0
- package/dist/cli/tutorial/index.js.map +1 -0
- package/dist/cli/utils/config.d.ts +2 -0
- package/dist/cli/utils/config.d.ts.map +1 -0
- package/dist/cli/utils/config.js +4 -0
- package/dist/cli/utils/config.js.map +1 -0
- package/dist/cli/utils/dashboard.d.ts +2 -0
- package/dist/cli/utils/dashboard.d.ts.map +1 -0
- package/dist/cli/utils/dashboard.js +74 -0
- package/dist/cli/utils/dashboard.js.map +1 -0
- package/dist/cli/utils/info.d.ts +2 -0
- package/dist/cli/utils/info.d.ts.map +1 -0
- package/dist/cli/utils/info.js +4 -0
- package/dist/cli/utils/info.js.map +1 -0
- package/dist/cli/utils/init.d.ts +2 -0
- package/dist/cli/utils/init.d.ts.map +1 -0
- package/dist/cli/utils/init.js +4 -0
- package/dist/cli/utils/init.js.map +1 -0
- package/dist/cli/utils/interop.d.ts +2 -0
- package/dist/cli/utils/interop.d.ts.map +1 -0
- package/dist/cli/utils/interop.js +4 -0
- package/dist/cli/utils/interop.js.map +1 -0
- package/dist/cli/utils/setup.d.ts +2 -0
- package/dist/cli/utils/setup.d.ts.map +1 -0
- package/dist/cli/utils/setup.js +4 -0
- package/dist/cli/utils/setup.js.map +1 -0
- package/dist/cli/utils/test-prompt.d.ts +2 -0
- package/dist/cli/utils/test-prompt.d.ts.map +1 -0
- package/dist/cli/utils/test-prompt.js +4 -0
- package/dist/cli/utils/test-prompt.js.map +1 -0
- package/dist/cli/utils/update.d.ts +2 -0
- package/dist/cli/utils/update.d.ts.map +1 -0
- package/dist/cli/utils/update.js +4 -0
- package/dist/cli/utils/update.js.map +1 -0
- package/dist/cli/utils/version-info.d.ts +2 -0
- package/dist/cli/utils/version-info.d.ts.map +1 -0
- package/dist/cli/utils/version-info.js +4 -0
- package/dist/cli/utils/version-info.js.map +1 -0
- package/dist/errors/classifier.d.ts +10 -0
- package/dist/errors/classifier.d.ts.map +1 -0
- package/dist/errors/classifier.js +119 -0
- package/dist/errors/classifier.js.map +1 -0
- package/dist/errors/index.d.ts +7 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +7 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/spelling.d.ts +5 -0
- package/dist/errors/spelling.d.ts.map +1 -0
- package/dist/errors/spelling.js +36 -0
- package/dist/errors/spelling.js.map +1 -0
- package/dist/errors/types.d.ts +25 -0
- package/dist/errors/types.d.ts.map +1 -0
- package/dist/errors/types.js +13 -0
- package/dist/errors/types.js.map +1 -0
- package/dist/features/ccg/incremental-processor.d.ts +3 -3
- package/dist/features/ccg/incremental-processor.d.ts.map +1 -1
- package/dist/features/ccg/incremental-processor.js +7 -7
- package/dist/features/ccg/incremental-processor.js.map +1 -1
- package/dist/features/state-manager/index.d.ts +5 -0
- package/dist/features/state-manager/index.d.ts.map +1 -1
- package/dist/features/state-manager/index.js +7 -0
- package/dist/features/state-manager/index.js.map +1 -1
- package/dist/hooks/bridge-converter.d.ts +10 -0
- package/dist/hooks/bridge-converter.d.ts.map +1 -0
- package/dist/hooks/bridge-converter.js +43 -0
- package/dist/hooks/bridge-converter.js.map +1 -0
- package/dist/hooks/bridge.d.ts +2 -31
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +24 -1066
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/cache.d.ts +2 -0
- package/dist/hooks/cache.d.ts.map +1 -0
- package/dist/hooks/cache.js +78 -0
- package/dist/hooks/cache.js.map +1 -0
- package/dist/hooks/handlers/autopilot.d.ts +3 -0
- package/dist/hooks/handlers/autopilot.d.ts.map +1 -0
- package/dist/hooks/handlers/autopilot.js +23 -0
- package/dist/hooks/handlers/autopilot.js.map +1 -0
- package/dist/hooks/handlers/index.d.ts +5 -0
- package/dist/hooks/handlers/index.d.ts.map +1 -0
- package/dist/hooks/handlers/index.js +18 -0
- package/dist/hooks/handlers/index.js.map +1 -0
- package/dist/hooks/handlers/keyword-detector.d.ts +3 -0
- package/dist/hooks/handlers/keyword-detector.d.ts.map +1 -0
- package/dist/hooks/handlers/keyword-detector.js +66 -0
- package/dist/hooks/handlers/keyword-detector.js.map +1 -0
- package/dist/hooks/handlers/persistent-mode.d.ts +3 -0
- package/dist/hooks/handlers/persistent-mode.d.ts.map +1 -0
- package/dist/hooks/handlers/persistent-mode.js +82 -0
- package/dist/hooks/handlers/persistent-mode.js.map +1 -0
- package/dist/hooks/handlers/post-tool-use.d.ts +3 -0
- package/dist/hooks/handlers/post-tool-use.d.ts.map +1 -0
- package/dist/hooks/handlers/post-tool-use.js +74 -0
- package/dist/hooks/handlers/post-tool-use.js.map +1 -0
- package/dist/hooks/handlers/pre-tool-use.d.ts +7 -0
- package/dist/hooks/handlers/pre-tool-use.d.ts.map +1 -0
- package/dist/hooks/handlers/pre-tool-use.js +120 -0
- package/dist/hooks/handlers/pre-tool-use.js.map +1 -0
- package/dist/hooks/handlers/ralph.d.ts +3 -0
- package/dist/hooks/handlers/ralph.d.ts.map +1 -0
- package/dist/hooks/handlers/ralph.js +53 -0
- package/dist/hooks/handlers/ralph.js.map +1 -0
- package/dist/hooks/handlers/route-map.d.ts +8 -0
- package/dist/hooks/handlers/route-map.d.ts.map +1 -0
- package/dist/hooks/handlers/route-map.js +64 -0
- package/dist/hooks/handlers/route-map.js.map +1 -0
- package/dist/hooks/handlers/session-start.d.ts +3 -0
- package/dist/hooks/handlers/session-start.d.ts.map +1 -0
- package/dist/hooks/handlers/session-start.js +186 -0
- package/dist/hooks/handlers/session-start.js.map +1 -0
- package/dist/hooks/handlers/stop-continuation.d.ts +3 -0
- package/dist/hooks/handlers/stop-continuation.d.ts.map +1 -0
- package/dist/hooks/handlers/stop-continuation.js +50 -0
- package/dist/hooks/handlers/stop-continuation.js.map +1 -0
- package/dist/hooks/team-state-reader.d.ts +24 -0
- package/dist/hooks/team-state-reader.d.ts.map +1 -0
- package/dist/hooks/team-state-reader.js +88 -0
- package/dist/hooks/team-state-reader.js.map +1 -0
- package/dist/hooks/validation.d.ts +5 -0
- package/dist/hooks/validation.d.ts.map +1 -0
- package/dist/hooks/validation.js +48 -0
- package/dist/hooks/validation.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/unified-logger.d.ts +15 -0
- package/dist/lib/unified-logger.d.ts.map +1 -0
- package/dist/lib/unified-logger.js +23 -0
- package/dist/lib/unified-logger.js.map +1 -0
- package/dist/mcp/adapters/memory-adapter.d.ts +2 -2
- package/dist/mcp/adapters/state-adapter.d.ts +5 -5
- package/dist/mcp/adapters/trace-adapter.d.ts +3 -3
- package/dist/mcp/codex-server.d.ts.map +1 -1
- package/dist/mcp/codex-server.js +22 -27
- package/dist/mcp/codex-server.js.map +1 -1
- package/dist/mcp/config/schema.d.ts +6 -6
- package/dist/mcp/config-schema.d.ts +6 -6
- package/dist/mcp/gemini-server.d.ts.map +1 -1
- package/dist/mcp/gemini-server.js +21 -26
- package/dist/mcp/gemini-server.js.map +1 -1
- package/dist/mcp/logger.d.ts.map +1 -1
- package/dist/mcp/logger.js +3 -1
- package/dist/mcp/logger.js.map +1 -1
- package/dist/mcp/tool-types.d.ts +50 -0
- package/dist/mcp/tool-types.d.ts.map +1 -0
- package/dist/mcp/tool-types.js +6 -0
- package/dist/mcp/tool-types.js.map +1 -0
- package/dist/observability/masker.d.ts +3 -0
- package/dist/observability/masker.d.ts.map +1 -0
- package/dist/observability/masker.js +23 -0
- package/dist/observability/masker.js.map +1 -0
- package/dist/observability/monitor.d.ts +17 -0
- package/dist/observability/monitor.d.ts.map +1 -0
- package/dist/observability/monitor.js +30 -0
- package/dist/observability/monitor.js.map +1 -0
- package/dist/observability/tracer.d.ts +6 -0
- package/dist/observability/tracer.d.ts.map +1 -0
- package/dist/observability/tracer.js +36 -0
- package/dist/observability/tracer.js.map +1 -0
- package/dist/reliability/circuit-breaker.d.ts +24 -0
- package/dist/reliability/circuit-breaker.d.ts.map +1 -0
- package/dist/reliability/circuit-breaker.js +59 -0
- package/dist/reliability/circuit-breaker.js.map +1 -0
- package/dist/reliability/model-fallback.d.ts +21 -0
- package/dist/reliability/model-fallback.d.ts.map +1 -0
- package/dist/reliability/model-fallback.js +47 -0
- package/dist/reliability/model-fallback.js.map +1 -0
- package/dist/reliability/retry-classifier.d.ts +17 -0
- package/dist/reliability/retry-classifier.d.ts.map +1 -0
- package/dist/reliability/retry-classifier.js +59 -0
- package/dist/reliability/retry-classifier.js.map +1 -0
- package/dist/reliability/retry-manager.d.ts +20 -0
- package/dist/reliability/retry-manager.d.ts.map +1 -0
- package/dist/reliability/retry-manager.js +45 -0
- package/dist/reliability/retry-manager.js.map +1 -0
- package/dist/security/audit-logger.d.ts +21 -0
- package/dist/security/audit-logger.d.ts.map +1 -0
- package/dist/security/audit-logger.js +58 -0
- package/dist/security/audit-logger.js.map +1 -0
- package/dist/security/budget-controller.d.ts +23 -0
- package/dist/security/budget-controller.d.ts.map +1 -0
- package/dist/security/budget-controller.js +31 -0
- package/dist/security/budget-controller.js.map +1 -0
- package/dist/security/concurrency-control.d.ts +42 -0
- package/dist/security/concurrency-control.d.ts.map +1 -0
- package/dist/security/concurrency-control.js +87 -0
- package/dist/security/concurrency-control.js.map +1 -0
- package/dist/security/resource-guard.d.ts +25 -0
- package/dist/security/resource-guard.d.ts.map +1 -0
- package/dist/security/resource-guard.js +57 -0
- package/dist/security/resource-guard.js.map +1 -0
- package/dist/security/tenant-isolator.d.ts +27 -0
- package/dist/security/tenant-isolator.d.ts.map +1 -0
- package/dist/security/tenant-isolator.js +52 -0
- package/dist/security/tenant-isolator.js.map +1 -0
- package/dist/state/backup-manager.d.ts +56 -0
- package/dist/state/backup-manager.d.ts.map +1 -0
- package/dist/state/backup-manager.js +174 -0
- package/dist/state/backup-manager.js.map +1 -0
- package/dist/state/index.d.ts +26 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +40 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/migration/index.d.ts +25 -0
- package/dist/state/migration/index.d.ts.map +1 -0
- package/dist/state/migration/index.js +61 -0
- package/dist/state/migration/index.js.map +1 -0
- package/dist/state/migration/integrity.d.ts +30 -0
- package/dist/state/migration/integrity.d.ts.map +1 -0
- package/dist/state/migration/integrity.js +109 -0
- package/dist/state/migration/integrity.js.map +1 -0
- package/dist/tools/python-repl/index.d.ts +2 -2
- package/dist/tools/python-repl/tool.d.ts +2 -2
- package/docs/CLAUDE.md +1 -1
- package/docs/INSTALL.md +2 -2
- package/docs/REFERENCE.md +1 -1
- package/docs/api/assets/highlight.css +85 -85
- package/docs/api/assets/style.css +1633 -1633
- package/docs/api/classes/ContextCollector.html +21 -21
- package/docs/api/functions/activateUltrawork.html +2 -2
- package/docs/api/functions/addCustomNote.html +5 -5
- package/docs/api/functions/addDirective.html +2 -2
- package/docs/api/functions/addManualEntry.html +2 -2
- package/docs/api/functions/addPattern.html +3 -3
- package/docs/api/functions/addWorker.html +2 -2
- package/docs/api/functions/addWorkingMemoryEntry.html +2 -2
- package/docs/api/functions/analyzeContextUsage.html +2 -2
- package/docs/api/functions/appendProgress.html +2 -2
- package/docs/api/functions/appendSessionId.html +2 -2
- package/docs/api/functions/applyCommentFilters.html +3 -3
- package/docs/api/functions/assignFileToWorker.html +2 -2
- package/docs/api/functions/backgroundUpdateCheck.html +2 -2
- package/docs/api/functions/buildAxiomBootContext.html +1 -1
- package/docs/api/functions/buildBoulderContinuation.html +2 -2
- package/docs/api/functions/buildDelegationTable.html +2 -2
- package/docs/api/functions/buildKeyTriggersSection.html +2 -2
- package/docs/api/functions/buildOrchestratorReminder.html +2 -2
- package/docs/api/functions/buildUseAvoidSection.html +2 -2
- package/docs/api/functions/buildVerificationReminder.html +2 -2
- package/docs/api/functions/canResumeAutopilot.html +10 -10
- package/docs/api/functions/canStartMode.html +5 -5
- package/docs/api/functions/cancelAutopilot.html +3 -3
- package/docs/api/functions/cancelUltraQA.html +2 -2
- package/docs/api/functions/checkBackgroundNotifications.html +2 -2
- package/docs/api/functions/checkBoulderContinuation.html +2 -2
- package/docs/api/functions/checkDuplicateTriggers.html +2 -2
- package/docs/api/functions/checkExpertGate.html +1 -1
- package/docs/api/functions/checkForComments.html +2 -2
- package/docs/api/functions/checkForUpdates.html +2 -2
- package/docs/api/functions/checkIncompleteTodos.html +13 -13
- package/docs/api/functions/checkPersistentModes.html +3 -3
- package/docs/api/functions/cleanupOrphanedState.html +2 -2
- package/docs/api/functions/cleanupStaleAgents.html +2 -2
- package/docs/api/functions/cleanupTransientState.html +2 -2
- package/docs/api/functions/clearAgentUsageState.html +1 -1
- package/docs/api/functions/clearAllModeStates.html +2 -2
- package/docs/api/functions/clearAutopilot.html +2 -2
- package/docs/api/functions/clearAutopilotState.html +2 -2
- package/docs/api/functions/clearBeadsContext.html +2 -2
- package/docs/api/functions/clearBoulderState.html +2 -2
- package/docs/api/functions/clearDetectionState.html +2 -2
- package/docs/api/functions/clearInjectedPaths.html +2 -2
- package/docs/api/functions/clearInjectedRules.html +2 -2
- package/docs/api/functions/clearLinkedUltraworkState.html +2 -2
- package/docs/api/functions/clearModeState.html +10 -10
- package/docs/api/functions/clearProjectMemorySession.html +4 -4
- package/docs/api/functions/clearRalphState.html +2 -2
- package/docs/api/functions/clearRapidFireDebounce.html +2 -2
- package/docs/api/functions/clearSkillSession.html +2 -2
- package/docs/api/functions/clearThinkModeState.html +2 -2
- package/docs/api/functions/clearTrackingState.html +2 -2
- package/docs/api/functions/clearUltraQAState.html +2 -2
- package/docs/api/functions/clearVerificationState.html +3 -3
- package/docs/api/functions/commandExists.html +2 -2
- package/docs/api/functions/compareVersions.html +3 -3
- package/docs/api/functions/completeUltraQA.html +2 -2
- package/docs/api/functions/completeUltrapilot.html +2 -2
- package/docs/api/functions/completeWorker.html +2 -2
- package/docs/api/functions/containsTokenLimitError.html +2 -2
- package/docs/api/functions/createAgentToolRestrictions.html +3 -3
- package/docs/api/functions/createAgentUsageReminderHook.html +1 -1
- package/docs/api/functions/createAutoSlashCommandHook.html +7 -7
- package/docs/api/functions/createBackgroundNotificationHook.html +7 -7
- package/docs/api/functions/createBackgroundTaskManager.html +2 -2
- package/docs/api/functions/createBoulderState.html +2 -2
- package/docs/api/functions/createCommentCheckerHook.html +6 -6
- package/docs/api/functions/createCompactCheckpoint.html +2 -2
- package/docs/api/functions/createContentHash.html +2 -2
- package/docs/api/functions/createContextInjectorHook.html +7 -7
- package/docs/api/functions/createDirectoryReadmeInjectorHook.html +9 -9
- package/docs/api/functions/createEmptyMessageSanitizerHook.html +6 -6
- package/docs/api/functions/createEnvContext.html +2 -2
- package/docs/api/functions/createHookOutput.html +4 -4
- package/docs/api/functions/createLearnedSkillsHook.html +6 -6
- package/docs/api/functions/createMagicKeywordProcessor.html +2 -2
- package/docs/api/functions/createModeMarker.html +6 -6
- package/docs/api/functions/createPrd.html +2 -2
- package/docs/api/functions/createPreemptiveCompactionHook.html +6 -6
- package/docs/api/functions/createRalphLoopHook.html +2 -2
- package/docs/api/functions/createRecoveryHook.html +7 -7
- package/docs/api/functions/createRulesInjectorHook.html +8 -8
- package/docs/api/functions/createSimplePrd.html +2 -2
- package/docs/api/functions/createSisyphusOrchestratorHook.html +7 -7
- package/docs/api/functions/createSisyphusSession.html +7 -7
- package/docs/api/functions/createThinkModeHook.html +7 -7
- package/docs/api/functions/createThinkingBlockValidatorHook.html +1 -1
- package/docs/api/functions/createTodoContinuationHook.html +2 -2
- package/docs/api/functions/createUltraworkStateHook.html +2 -2
- package/docs/api/functions/deactivateUltrawork.html +8 -8
- package/docs/api/functions/decayHotPaths.html +2 -2
- package/docs/api/functions/decomposeTask.html +11 -11
- package/docs/api/functions/deepMerge.html +2 -2
- package/docs/api/functions/detectArchitectApproval.html +2 -2
- package/docs/api/functions/detectArchitectRejection.html +2 -2
- package/docs/api/functions/detectContextLimitError.html +2 -2
- package/docs/api/functions/detectContextLimitErrorInText.html +2 -2
- package/docs/api/functions/detectDirectivesFromMessage.html +2 -2
- package/docs/api/functions/detectEditError.html +2 -2
- package/docs/api/functions/detectEditErrorInOutput.html +2 -2
- package/docs/api/functions/detectEditErrorInText.html +2 -2
- package/docs/api/functions/detectExtractableMoment.html +2 -2
- package/docs/api/functions/detectKeywordsWithType.html +11 -11
- package/docs/api/functions/detectMagicKeywords.html +2 -2
- package/docs/api/functions/detectProjectEnvironment.html +2 -2
- package/docs/api/functions/detectRecoverableError.html +3 -3
- package/docs/api/functions/detectSessionErrorType.html +2 -2
- package/docs/api/functions/detectSlashCommand.html +3 -3
- package/docs/api/functions/detectThinkKeyword.html +2 -2
- package/docs/api/functions/detectUltrathinkKeyword.html +2 -2
- package/docs/api/functions/discoverAllCommands.html +2 -2
- package/docs/api/functions/enablePrdMode.html +2 -2
- package/docs/api/functions/enhancePrompt.html +2 -2
- package/docs/api/functions/ensureAutopilotDir.html +2 -2
- package/docs/api/functions/ensureDirectoryStructure.html +2 -2
- package/docs/api/functions/ensureModeStateDir.html +2 -2
- package/docs/api/functions/ensureSkillsDir.html +2 -2
- package/docs/api/functions/estimateTokens.html +2 -2
- package/docs/api/functions/executeSlashCommand.html +2 -2
- package/docs/api/functions/expandCommand.html +8 -8
- package/docs/api/functions/expandCommandPrompt.html +6 -6
- package/docs/api/functions/expandCommands.html +2 -2
- package/docs/api/functions/exportSessionSummary.html +2 -2
- package/docs/api/functions/exportWisdomToNotepad.html +2 -2
- package/docs/api/functions/extractPromptText.html +11 -11
- package/docs/api/functions/extractSlashPromptText.html +2 -2
- package/docs/api/functions/extractThinkPromptText.html +2 -2
- package/docs/api/functions/failWorker.html +2 -2
- package/docs/api/functions/findCommand.html +2 -2
- package/docs/api/functions/findMatchingSkills.html +2 -2
- package/docs/api/functions/findPlannerPlans.html +3 -3
- package/docs/api/functions/findPrdPath.html +2 -2
- package/docs/api/functions/findPreviousThinkingContent.html +1 -1
- package/docs/api/functions/findProgressPath.html +2 -2
- package/docs/api/functions/findProjectRoot.html +3 -3
- package/docs/api/functions/findRecoveryEmptyMessages.html +2 -2
- package/docs/api/functions/findRecoveryOrphanThinking.html +2 -2
- package/docs/api/functions/findRecoveryThinkingBlocks.html +2 -2
- package/docs/api/functions/findRuleFiles.html +4 -4
- package/docs/api/functions/findSkillFiles.html +3 -3
- package/docs/api/functions/formatCancelMessage.html +2 -2
- package/docs/api/functions/formatCompactSummary.html +2 -2
- package/docs/api/functions/formatContextSummary.html +3 -3
- package/docs/api/functions/formatDirectivesForContext.html +2 -2
- package/docs/api/functions/formatFailureSummary.html +2 -2
- package/docs/api/functions/formatFile.html +2 -2
- package/docs/api/functions/formatFileChanges.html +2 -2
- package/docs/api/functions/formatFileList.html +2 -2
- package/docs/api/functions/formatFullContext.html +2 -2
- package/docs/api/functions/formatFullNotepad.html +2 -2
- package/docs/api/functions/formatLearningsForContext.html +2 -2
- package/docs/api/functions/formatNextStoryPrompt.html +2 -2
- package/docs/api/functions/formatNotepadContext.html +2 -2
- package/docs/api/functions/formatPatternsForContext.html +2 -2
- package/docs/api/functions/formatPrd.html +2 -2
- package/docs/api/functions/formatPrdStatus.html +2 -2
- package/docs/api/functions/formatPreCompactSummary.html +2 -2
- package/docs/api/functions/formatProgressForContext.html +2 -2
- package/docs/api/functions/formatProgressMessage.html +2 -2
- package/docs/api/functions/formatStory.html +2 -2
- package/docs/api/functions/formatSummary.html +2 -2
- package/docs/api/functions/formatUpdateNotification.html +2 -2
- package/docs/api/functions/formatValidationResults.html +2 -2
- package/docs/api/functions/generateExtractionPrompt.html +2 -2
- package/docs/api/functions/generateSkillFrontmatter.html +2 -2
- package/docs/api/functions/generateSummary.html +2 -2
- package/docs/api/functions/getActiveAgentCount.html +2 -2
- package/docs/api/functions/getActiveExclusiveMode.html +4 -4
- package/docs/api/functions/getActiveModes.html +2 -2
- package/docs/api/functions/getActivePlanPath.html +2 -2
- package/docs/api/functions/getAgentDefinitions.html +2 -2
- package/docs/api/functions/getAgentsByType.html +2 -2
- package/docs/api/functions/getAllCommands.html +2 -2
- package/docs/api/functions/getAllModeStatuses.html +5 -5
- package/docs/api/functions/getAllSkills.html +2 -2
- package/docs/api/functions/getArchitectRejectionContinuationPrompt.html +2 -2
- package/docs/api/functions/getArchitectVerificationPrompt.html +2 -2
- package/docs/api/functions/getAutoFormatMessage.html +2 -2
- package/docs/api/functions/getAutopilotStateAge.html +3 -3
- package/docs/api/functions/getAvailableAgents.html +2 -2
- package/docs/api/functions/getAxiomDir.html +1 -1
- package/docs/api/functions/getBackgroundTaskGuidance.html +4 -4
- package/docs/api/functions/getBeadsContextConfig.html +2 -2
- package/docs/api/functions/getBeadsInstructions.html +2 -2
- package/docs/api/functions/getBoulderFilePath.html +2 -2
- package/docs/api/functions/getCheckpointPath.html +2 -2
- package/docs/api/functions/getClaudeThinkingConfig.html +3 -3
- package/docs/api/functions/getCommand.html +2 -2
- package/docs/api/functions/getCommandsDir.html +2 -2
- package/docs/api/functions/getCompactionQueueDepth.html +3 -3
- package/docs/api/functions/getCompletedWorkers.html +2 -2
- package/docs/api/functions/getDefaultMcpServers.html +1 -1
- package/docs/api/functions/getDefaultModelForCategory.html +2 -2
- package/docs/api/functions/getDetectionStats.html +2 -2
- package/docs/api/functions/getDirectPlanningPrompt.html +3 -3
- package/docs/api/functions/getExecutionPrompt.html +2 -2
- package/docs/api/functions/getExpansionPrompt.html +3 -3
- package/docs/api/functions/getExpertGateMessage.html +1 -1
- package/docs/api/functions/getFailedWorkers.html +2 -2
- package/docs/api/functions/getFormatter.html +2 -2
- package/docs/api/functions/getGitDiffStats.html +2 -2
- package/docs/api/functions/getGlobalStateFilePath.html +4 -4
- package/docs/api/functions/getGoalCommand.html +2 -2
- package/docs/api/functions/getHighVariant.html +3 -3
- package/docs/api/functions/getInstallInfo.html +2 -2
- package/docs/api/functions/getInstalledVersion.html +2 -2
- package/docs/api/functions/getIssuesToFix.html +2 -2
- package/docs/api/functions/getLastDetection.html +2 -2
- package/docs/api/functions/getLearnerConfigValue.html +2 -2
- package/docs/api/functions/getLinter.html +2 -2
- package/docs/api/functions/getManualSection.html +2 -2
- package/docs/api/functions/getMemoryFilePaths.html +1 -1
- package/docs/api/functions/getModeMarkerFilePath.html +2 -2
- package/docs/api/functions/getModeStateFilePath.html +2 -2
- package/docs/api/functions/getNextStory.html +2 -2
- package/docs/api/functions/getNotepadPath.html +2 -2
- package/docs/api/functions/getNotepadStats.html +2 -2
- package/docs/api/functions/getOmcPrdPath.html +2 -2
- package/docs/api/functions/getOmcProgressPath.html +2 -2
- package/docs/api/functions/getOmcSystemPrompt.html +2 -2
- package/docs/api/functions/getOmcToolNames.html +3 -3
- package/docs/api/functions/getPatterns.html +2 -2
- package/docs/api/functions/getPhasePrompt.html +2 -2
- package/docs/api/functions/getPlanName.html +2 -2
- package/docs/api/functions/getPlanPath.html +2 -2
- package/docs/api/functions/getPlanProgress.html +2 -2
- package/docs/api/functions/getPlanSummaries.html +2 -2
- package/docs/api/functions/getPrdCompletionStatus.html +2 -2
- package/docs/api/functions/getPrdPath.html +2 -2
- package/docs/api/functions/getPrdStatus.html +2 -2
- package/docs/api/functions/getPreCommitReminderMessage.html +2 -2
- package/docs/api/functions/getPriorityContext.html +2 -2
- package/docs/api/functions/getProgressContext.html +2 -2
- package/docs/api/functions/getProgressPath.html +2 -2
- package/docs/api/functions/getPromotionCandidates.html +2 -2
- package/docs/api/functions/getQAPrompt.html +2 -2
- package/docs/api/functions/getRalphContext.html +3 -3
- package/docs/api/functions/getReadmesForPath.html +2 -2
- package/docs/api/functions/getRecentLearnings.html +2 -2
- package/docs/api/functions/getRulesForPath.html +2 -2
- package/docs/api/functions/getRunningAgents.html +2 -2
- package/docs/api/functions/getRunningWorkers.html +2 -2
- package/docs/api/functions/getSessionTokenEstimate.html +2 -2
- package/docs/api/functions/getSkillsDir.html +2 -2
- package/docs/api/functions/getSpecPath.html +2 -2
- package/docs/api/functions/getStaleAgents.html +2 -2
- package/docs/api/functions/getStateDir.html +2 -2
- package/docs/api/functions/getStory.html +2 -2
- package/docs/api/functions/getSubagentStateFilePath.html +2 -2
- package/docs/api/functions/getThinkModeState.html +2 -2
- package/docs/api/functions/getThinkingConfig.html +3 -3
- package/docs/api/functions/getTopHotPaths.html +2 -2
- package/docs/api/functions/getTrackingStats.html +2 -2
- package/docs/api/functions/getTransitionPrompt.html +2 -2
- package/docs/api/functions/getUltraworkPersistenceMessage.html +2 -2
- package/docs/api/functions/getValidationPrompt.html +2 -2
- package/docs/api/functions/getValidationSpawnPrompt.html +2 -2
- package/docs/api/functions/getValidationStats.html +1 -1
- package/docs/api/functions/getValidationStatus.html +2 -2
- package/docs/api/functions/getWorkingMemory.html +2 -2
- package/docs/api/functions/handleBackgroundEvent.html +3 -3
- package/docs/api/functions/handleContextWindowRecovery.html +2 -2
- package/docs/api/functions/handleEditErrorRecovery.html +2 -2
- package/docs/api/functions/handlePermissionRequest.html +2 -2
- package/docs/api/functions/handleRecovery.html +10 -10
- package/docs/api/functions/handleSessionEnd.html +2 -2
- package/docs/api/functions/handleSessionRecovery.html +2 -2
- package/docs/api/functions/handleSharedFiles.html +7 -7
- package/docs/api/functions/handleSubagentStart.html +2 -2
- package/docs/api/functions/handleSubagentStop.html +2 -2
- package/docs/api/functions/hasBoulder.html +2 -2
- package/docs/api/functions/hasContentParts.html +1 -1
- package/docs/api/functions/hasModeState.html +3 -3
- package/docs/api/functions/hasPrd.html +2 -2
- package/docs/api/functions/hasTextContent.html +2 -2
- package/docs/api/functions/hasValidContent.html +3 -3
- package/docs/api/functions/incrementAgentCount.html +2 -2
- package/docs/api/functions/incrementRalphIteration.html +2 -2
- package/docs/api/functions/incrementReinforcement.html +2 -2
- package/docs/api/functions/initAutopilot.html +2 -2
- package/docs/api/functions/initNotepad.html +2 -2
- package/docs/api/functions/initPrd.html +2 -2
- package/docs/api/functions/initProgress.html +2 -2
- package/docs/api/functions/initUltrapilot.html +2 -2
- package/docs/api/functions/injectContextIntoText.html +2 -2
- package/docs/api/functions/injectPendingContext.html +3 -3
- package/docs/api/functions/injectRecoveryTextPart.html +2 -2
- package/docs/api/functions/install.html +2 -2
- package/docs/api/functions/integrateResults.html +5 -5
- package/docs/api/functions/isActiveModeRunning.html +2 -2
- package/docs/api/functions/isAllowedPath.html +2 -2
- package/docs/api/functions/isAlreadyHighVariant.html +2 -2
- package/docs/api/functions/isAutopilotActive.html +2 -2
- package/docs/api/functions/isAxiomEnabled.html +1 -1
- package/docs/api/functions/isClaudeInstalled.html +3 -3
- package/docs/api/functions/isClaudeModel.html +2 -2
- package/docs/api/functions/isCompactionInProgress.html +3 -3
- package/docs/api/functions/isDuplicateByContentHash.html +2 -2
- package/docs/api/functions/isDuplicateByRealPath.html +2 -2
- package/docs/api/functions/isExcludedCommand.html +2 -2
- package/docs/api/functions/isExtendedThinkingModel.html +1 -1
- package/docs/api/functions/isFileOwnedByWorker.html +2 -2
- package/docs/api/functions/isFormatterAvailable.html +2 -2
- package/docs/api/functions/isGptModel.html +2 -2
- package/docs/api/functions/isInstalled.html +2 -2
- package/docs/api/functions/isLearnerEnabled.html +2 -2
- package/docs/api/functions/isModeActive.html +6 -6
- package/docs/api/functions/isNonInteractive.html +1 -1
- package/docs/api/functions/isRecoverableError.html +2 -2
- package/docs/api/functions/isSafeCommand.html +2 -2
- package/docs/api/functions/isSessionRecoverable.html +2 -2
- package/docs/api/functions/isSharedFile.html +2 -2
- package/docs/api/functions/isThinkModeActive.html +2 -2
- package/docs/api/functions/isToolPart.html +2 -2
- package/docs/api/functions/isUltraQAActive.html +1 -1
- package/docs/api/functions/isWriteEditTool.html +2 -2
- package/docs/api/functions/learnFromToolOutput.html +7 -7
- package/docs/api/functions/lintFile.html +2 -2
- package/docs/api/functions/listAvailableCommands.html +2 -2
- package/docs/api/functions/listCommands.html +2 -2
- package/docs/api/functions/listPromotableLearnings.html +2 -2
- package/docs/api/functions/loadAgentPrompt.html +7 -7
- package/docs/api/functions/loadAgentUsageState.html +1 -1
- package/docs/api/functions/loadAllSkills.html +3 -3
- package/docs/api/functions/loadConfig.html +2 -2
- package/docs/api/functions/loadInjectedPaths.html +2 -2
- package/docs/api/functions/loadInjectedRules.html +2 -2
- package/docs/api/functions/loadLearnerConfig.html +2 -2
- package/docs/api/functions/loadProjectMemory.html +3 -3
- package/docs/api/functions/loadSkillById.html +2 -2
- package/docs/api/functions/mapDirectoryStructure.html +2 -2
- package/docs/api/functions/markStoryComplete.html +2 -2
- package/docs/api/functions/markStoryIncomplete.html +2 -2
- package/docs/api/functions/mergeAgentConfig.html +2 -2
- package/docs/api/functions/parseAxiomState.html +1 -1
- package/docs/api/functions/parseContextLimitError.html +2 -2
- package/docs/api/functions/parseProgress.html +2 -2
- package/docs/api/functions/parseRuleFrontmatter.html +10 -10
- package/docs/api/functions/parseSkillFile.html +2 -2
- package/docs/api/functions/parseSlashCommand.html +2 -2
- package/docs/api/functions/parseTokenLimitError.html +2 -2
- package/docs/api/functions/performUpdate.html +2 -2
- package/docs/api/functions/prependRecoveryThinkingPart.html +2 -2
- package/docs/api/functions/prependThinkingBlock.html +1 -1
- package/docs/api/functions/processAxiomBoot.html +1 -1
- package/docs/api/functions/processAxiomGuards.html +1 -1
- package/docs/api/functions/processBackgroundNotification.html +2 -2
- package/docs/api/functions/processBackgroundNotificationHook.html +2 -2
- package/docs/api/functions/processEditOutput.html +2 -2
- package/docs/api/functions/processHook.html +3 -3
- package/docs/api/functions/processMessageForSkills.html +2 -2
- package/docs/api/functions/processOrchestratorPostTool.html +3 -3
- package/docs/api/functions/processOrchestratorPreTool.html +3 -3
- package/docs/api/functions/processPermissionRequest.html +2 -2
- package/docs/api/functions/processPreCompact.html +6 -6
- package/docs/api/functions/processProjectMemoryPreCompact.html +3 -3
- package/docs/api/functions/processResponseForDetection.html +3 -3
- package/docs/api/functions/processSessionEnd.html +2 -2
- package/docs/api/functions/processSetup.html +2 -2
- package/docs/api/functions/processSetupInit.html +2 -2
- package/docs/api/functions/processSetupMaintenance.html +2 -2
- package/docs/api/functions/processSlashCommand.html +2 -2
- package/docs/api/functions/processSubagentStart.html +2 -2
- package/docs/api/functions/processSubagentStop.html +2 -2
- package/docs/api/functions/processThinkMode.html +3 -3
- package/docs/api/functions/promoteLearning.html +2 -2
- package/docs/api/functions/pruneOldEntries.html +2 -2
- package/docs/api/functions/pruneOldStateFiles.html +2 -2
- package/docs/api/functions/readActiveContext.html +1 -1
- package/docs/api/functions/readAutopilotState.html +2 -2
- package/docs/api/functions/readBoulderState.html +2 -2
- package/docs/api/functions/readModeMarker.html +4 -4
- package/docs/api/functions/readNotepad.html +2 -2
- package/docs/api/functions/readPrd.html +2 -2
- package/docs/api/functions/readProgress.html +2 -2
- package/docs/api/functions/readProgressRaw.html +2 -2
- package/docs/api/functions/readProjectDecisions.html +1 -1
- package/docs/api/functions/readRalphState.html +2 -2
- package/docs/api/functions/readRecoveryMessages.html +2 -2
- package/docs/api/functions/readRecoveryParts.html +2 -2
- package/docs/api/functions/readTrackingState.html +3 -3
- package/docs/api/functions/readUltraQAState.html +2 -2
- package/docs/api/functions/readUltrapilotState.html +2 -2
- package/docs/api/functions/readUltraworkState.html +4 -4
- package/docs/api/functions/readUserPreferences.html +1 -1
- package/docs/api/functions/readVerificationState.html +3 -3
- package/docs/api/functions/recordArchitectFeedback.html +2 -2
- package/docs/api/functions/recordConflict.html +2 -2
- package/docs/api/functions/recordFailure.html +2 -2
- package/docs/api/functions/recordHookFire.html +2 -2
- package/docs/api/functions/recordHookResult.html +2 -2
- package/docs/api/functions/recordKeywordDetected.html +2 -2
- package/docs/api/functions/recordModeChange.html +2 -2
- package/docs/api/functions/recordPattern.html +2 -2
- package/docs/api/functions/recordSessionMetrics.html +2 -2
- package/docs/api/functions/recordSkillActivated.html +2 -2
- package/docs/api/functions/recordSkillInvoked.html +2 -2
- package/docs/api/functions/recordStoryProgress.html +2 -2
- package/docs/api/functions/recordValidationVerdict.html +2 -2
- package/docs/api/functions/registerBeadsContext.html +3 -3
- package/docs/api/functions/registerProjectMemoryContext.html +6 -6
- package/docs/api/functions/removeCodeBlocks.html +12 -12
- package/docs/api/functions/removeModeMarker.html +5 -5
- package/docs/api/functions/removeSlashCodeBlocks.html +2 -2
- package/docs/api/functions/removeThinkCodeBlocks.html +2 -2
- package/docs/api/functions/replaceRecoveryEmptyTextParts.html +2 -2
- package/docs/api/functions/rescanProjectEnvironment.html +4 -4
- package/docs/api/functions/resetSessionTokenEstimate.html +2 -2
- package/docs/api/functions/resumeAutopilot.html +2 -2
- package/docs/api/functions/runPreCommitChecks.html +2 -2
- package/docs/api/functions/runTests.html +2 -2
- package/docs/api/functions/runTypeCheck.html +2 -2
- package/docs/api/functions/sanitizeMessage.html +2 -2
- package/docs/api/functions/sanitizeMessages.html +2 -2
- package/docs/api/functions/saveAgentUsageState.html +1 -1
- package/docs/api/functions/saveInjectedPaths.html +2 -2
- package/docs/api/functions/saveInjectedRules.html +2 -2
- package/docs/api/functions/saveLearnerConfig.html +2 -2
- package/docs/api/functions/saveModeSummary.html +2 -2
- package/docs/api/functions/saveProjectMemory.html +3 -3
- package/docs/api/functions/saveVersionMetadata.html +2 -2
- package/docs/api/functions/setCurrentStory.html +2 -2
- package/docs/api/functions/setEnvironmentVariables.html +2 -2
- package/docs/api/functions/setLearnerConfigValue.html +2 -2
- package/docs/api/functions/setPriorityContext.html +2 -2
- package/docs/api/functions/shouldActivateThinkMode.html +3 -3
- package/docs/api/functions/shouldActivateUltrathink.html +2 -2
- package/docs/api/functions/shouldApplyRule.html +2 -2
- package/docs/api/functions/shouldCheckForUpdates.html +2 -2
- package/docs/api/functions/shouldCompleteByPrd.html +2 -2
- package/docs/api/functions/shouldPromptExtraction.html +2 -2
- package/docs/api/functions/shouldReinforceUltrawork.html +2 -2
- package/docs/api/functions/shouldRetryValidation.html +2 -2
- package/docs/api/functions/shouldRunInBackground.html +8 -8
- package/docs/api/functions/spawnWorkers.html +7 -7
- package/docs/api/functions/startUltraQA.html +3 -3
- package/docs/api/functions/startUltrapilot.html +7 -7
- package/docs/api/functions/startValidationRound.html +2 -2
- package/docs/api/functions/startVerification.html +2 -2
- package/docs/api/functions/startsWithThinkingBlock.html +1 -1
- package/docs/api/functions/stopUltraQA.html +2 -2
- package/docs/api/functions/stripRecoveryThinkingParts.html +2 -2
- package/docs/api/functions/toSdkMcpFormat.html +2 -2
- package/docs/api/functions/trackAccess.html +2 -2
- package/docs/api/functions/trackProgress.html +5 -5
- package/docs/api/functions/transitionPhase.html +2 -2
- package/docs/api/functions/transitionRalphToUltraQA.html +9 -9
- package/docs/api/functions/transitionToComplete.html +2 -2
- package/docs/api/functions/transitionToFailed.html +2 -2
- package/docs/api/functions/transitionUltraQAToValidation.html +2 -2
- package/docs/api/functions/updateDirectoryAccess.html +2 -2
- package/docs/api/functions/updateExecution.html +2 -2
- package/docs/api/functions/updateExpansion.html +2 -2
- package/docs/api/functions/updatePlanning.html +2 -2
- package/docs/api/functions/updateQA.html +2 -2
- package/docs/api/functions/updateValidation.html +2 -2
- package/docs/api/functions/updateWorkerState.html +2 -2
- package/docs/api/functions/validateAgentConfig.html +2 -2
- package/docs/api/functions/validateCommitMessage.html +2 -2
- package/docs/api/functions/validateConfigFiles.html +2 -2
- package/docs/api/functions/validateExtractionRequest.html +2 -2
- package/docs/api/functions/validateMessage.html +1 -1
- package/docs/api/functions/validateMessages.html +1 -1
- package/docs/api/functions/validateSkillMetadata.html +2 -2
- package/docs/api/functions/writeAutopilotState.html +2 -2
- package/docs/api/functions/writeBoulderState.html +2 -2
- package/docs/api/functions/writePrd.html +2 -2
- package/docs/api/functions/writeRalphState.html +2 -2
- package/docs/api/functions/writeSkill.html +2 -2
- package/docs/api/functions/writeTrackingState.html +5 -5
- package/docs/api/functions/writeUltraQAState.html +2 -2
- package/docs/api/functions/writeUltrapilotState.html +2 -2
- package/docs/api/functions/writeUltraworkState.html +2 -2
- package/docs/api/functions/writeVerificationState.html +2 -2
- package/docs/api/hierarchy.html +1 -1
- package/docs/api/index.html +843 -843
- package/docs/api/interfaces/AgentConfig.html +18 -18
- package/docs/api/interfaces/AgentOverrideConfig.html +10 -10
- package/docs/api/interfaces/AgentPromptMetadata.html +19 -19
- package/docs/api/interfaces/AgentState.html +5 -5
- package/docs/api/interfaces/AgentUsageState.html +8 -8
- package/docs/api/interfaces/AutoSlashCommandHookInput.html +5 -5
- package/docs/api/interfaces/AutoSlashCommandHookOutput.html +3 -3
- package/docs/api/interfaces/AutoSlashCommandResult.html +5 -5
- package/docs/api/interfaces/AutopilotConfig.html +26 -26
- package/docs/api/interfaces/AutopilotExecution.html +16 -16
- package/docs/api/interfaces/AutopilotExpansion.html +12 -12
- package/docs/api/interfaces/AutopilotPlanning.html +8 -8
- package/docs/api/interfaces/AutopilotQA.html +12 -12
- package/docs/api/interfaces/AutopilotResult.html +10 -10
- package/docs/api/interfaces/AutopilotState.html +36 -36
- package/docs/api/interfaces/AutopilotSummary.html +16 -16
- package/docs/api/interfaces/AutopilotValidation.html +10 -10
- package/docs/api/interfaces/AutopilotValidationResult.html +8 -8
- package/docs/api/interfaces/AvailableAgent.html +5 -5
- package/docs/api/interfaces/AxiomBootInput.html +3 -3
- package/docs/api/interfaces/AxiomBootOutput.html +4 -4
- package/docs/api/interfaces/AxiomGuardsInput.html +4 -4
- package/docs/api/interfaces/AxiomGuardsOutput.html +4 -4
- package/docs/api/interfaces/AxiomMemoryFiles.html +5 -5
- package/docs/api/interfaces/AxiomState.html +8 -8
- package/docs/api/interfaces/BackgroundNotificationHookConfig.html +11 -11
- package/docs/api/interfaces/BackgroundNotificationHookInput.html +8 -8
- package/docs/api/interfaces/BackgroundNotificationHookOutput.html +8 -8
- package/docs/api/interfaces/BackgroundTask.html +7 -7
- package/docs/api/interfaces/BackgroundTaskManager.html +26 -26
- package/docs/api/interfaces/BeadsContextConfig.html +4 -4
- package/docs/api/interfaces/BoulderState.html +12 -12
- package/docs/api/interfaces/BuildInfo.html +6 -6
- package/docs/api/interfaces/CanStartResult.html +4 -4
- package/docs/api/interfaces/CancelResult.html +4 -4
- package/docs/api/interfaces/ClaudeThinkingConfig.html +4 -4
- package/docs/api/interfaces/CodeConventions.html +5 -5
- package/docs/api/interfaces/CodebasePattern.html +5 -5
- package/docs/api/interfaces/CommandInfo.html +5 -5
- package/docs/api/interfaces/CommandMetadata.html +7 -7
- package/docs/api/interfaces/CommentCheckResult.html +10 -10
- package/docs/api/interfaces/CommentCheckerConfig.html +6 -6
- package/docs/api/interfaces/CommentInfo.html +14 -14
- package/docs/api/interfaces/CommentPendingCall.html +18 -18
- package/docs/api/interfaces/CommitConfig.html +9 -9
- package/docs/api/interfaces/CompactCheckpoint.html +7 -7
- package/docs/api/interfaces/ContextEntry.html +14 -14
- package/docs/api/interfaces/ContextUsageResult.html +12 -12
- package/docs/api/interfaces/CustomNote.html +5 -5
- package/docs/api/interfaces/DelegationDecision.html +7 -7
- package/docs/api/interfaces/DelegationRoute.html +7 -7
- package/docs/api/interfaces/DelegationRoutingConfig.html +5 -5
- package/docs/api/interfaces/DelegationTrigger.html +6 -6
- package/docs/api/interfaces/DetectedKeyword.html +13 -13
- package/docs/api/interfaces/DetectionConfig.html +8 -8
- package/docs/api/interfaces/DetectionResult.html +13 -13
- package/docs/api/interfaces/DirectoryInfo.html +7 -7
- package/docs/api/interfaces/EmptyMessageSanitizerConfig.html +6 -6
- package/docs/api/interfaces/EmptyMessageSanitizerInput.html +6 -6
- package/docs/api/interfaces/EmptyMessageSanitizerOutput.html +8 -8
- package/docs/api/interfaces/ExecuteResult.html +5 -5
- package/docs/api/interfaces/ExpandedCommand.html +4 -4
- package/docs/api/interfaces/ExternalModelPreference.html +4 -4
- package/docs/api/interfaces/ExternalModelsConfig.html +6 -6
- package/docs/api/interfaces/ExternalModelsDefaults.html +5 -5
- package/docs/api/interfaces/ExternalModelsFallbackPolicy.html +5 -5
- package/docs/api/interfaces/FileOwnership.html +8 -8
- package/docs/api/interfaces/FormatConfig.html +7 -7
- package/docs/api/interfaces/FrameworkDetection.html +4 -4
- package/docs/api/interfaces/FullAgentConfig.html +26 -26
- package/docs/api/interfaces/GateCheckResult.html +5 -5
- package/docs/api/interfaces/GitBranchPattern.html +3 -3
- package/docs/api/interfaces/HookContext.html +5 -5
- package/docs/api/interfaces/HookDefinition.html +5 -5
- package/docs/api/interfaces/HookInput.html +18 -18
- package/docs/api/interfaces/HookOutput.html +10 -10
- package/docs/api/interfaces/HookResult.html +4 -4
- package/docs/api/interfaces/HotPath.html +6 -6
- package/docs/api/interfaces/InjectedPathsData.html +9 -9
- package/docs/api/interfaces/InjectedRulesData.html +10 -10
- package/docs/api/interfaces/InjectedSkillsData.html +8 -8
- package/docs/api/interfaces/InjectionResult.html +8 -8
- package/docs/api/interfaces/InstallOptions.html +9 -9
- package/docs/api/interfaces/InstallResult.html +10 -10
- package/docs/api/interfaces/IntegrationResult.html +14 -14
- package/docs/api/interfaces/LanguageDetection.html +5 -5
- package/docs/api/interfaces/LearnedSkill.html +16 -16
- package/docs/api/interfaces/LearnerConfig.html +18 -18
- package/docs/api/interfaces/LintConfig.html +7 -7
- package/docs/api/interfaces/MagicKeyword.html +4 -4
- package/docs/api/interfaces/MatchResult.html +6 -6
- package/docs/api/interfaces/MessageContext.html +8 -8
- package/docs/api/interfaces/MessageInfo.html +9 -9
- package/docs/api/interfaces/MessagePart.html +15 -15
- package/docs/api/interfaces/MessageWithModel.html +3 -3
- package/docs/api/interfaces/MessageWithParts.html +6 -6
- package/docs/api/interfaces/MessagesTransformHook.html +3 -3
- package/docs/api/interfaces/MessagesTransformInput.html +3 -3
- package/docs/api/interfaces/MessagesTransformOutput.html +3 -3
- package/docs/api/interfaces/ModeConfig.html +13 -13
- package/docs/api/interfaces/ModeStatus.html +4 -4
- package/docs/api/interfaces/ModelRef.html +4 -4
- package/docs/api/interfaces/NonInteractiveEnvConfig.html +2 -2
- package/docs/api/interfaces/NotepadConfig.html +7 -7
- package/docs/api/interfaces/NotepadStats.html +11 -11
- package/docs/api/interfaces/NotificationCheckResult.html +8 -8
- package/docs/api/interfaces/OrchestratorToolInput.html +6 -6
- package/docs/api/interfaces/OrchestratorToolOutput.html +6 -6
- package/docs/api/interfaces/OutputPart.html +4 -4
- package/docs/api/interfaces/PRD.html +9 -9
- package/docs/api/interfaces/PRDStatus.html +13 -13
- package/docs/api/interfaces/ParsedSlashCommand.html +8 -8
- package/docs/api/interfaces/ParsedTokenLimitError.html +16 -16
- package/docs/api/interfaces/PendingContext.html +8 -8
- package/docs/api/interfaces/PermissionHookOutput.html +4 -4
- package/docs/api/interfaces/PermissionRequestInput.html +9 -9
- package/docs/api/interfaces/PersistentModeResult.html +9 -9
- package/docs/api/interfaces/PlanProgress.html +8 -8
- package/docs/api/interfaces/PlanSummary.html +10 -10
- package/docs/api/interfaces/PluginConfig.html +17 -17
- package/docs/api/interfaces/PreCommitResult.html +3 -3
- package/docs/api/interfaces/PreCompactHookOutput.html +4 -4
- package/docs/api/interfaces/PreCompactInput.html +8 -8
- package/docs/api/interfaces/PreemptiveCompactionConfig.html +14 -14
- package/docs/api/interfaces/PriorityContextResult.html +5 -5
- package/docs/api/interfaces/ProgressEntry.html +11 -11
- package/docs/api/interfaces/ProgressLog.html +7 -7
- package/docs/api/interfaces/ProjectMemory.html +14 -14
- package/docs/api/interfaces/ProjectStructure.html +5 -5
- package/docs/api/interfaces/PromotionCandidate.html +9 -9
- package/docs/api/interfaces/PruneResult.html +5 -5
- package/docs/api/interfaces/QualityValidation.html +10 -10
- package/docs/api/interfaces/RalphLoopHook.html +4 -4
- package/docs/api/interfaces/RalphLoopOptions.html +5 -5
- package/docs/api/interfaces/RalphLoopState.html +21 -21
- package/docs/api/interfaces/RecoveryConfig.html +16 -16
- package/docs/api/interfaces/RecoveryMessageData.html +4 -4
- package/docs/api/interfaces/RecoveryResult.html +10 -10
- package/docs/api/interfaces/RecoveryStoredMessageMeta.html +8 -8
- package/docs/api/interfaces/RecoveryStoredReasoningPart.html +7 -7
- package/docs/api/interfaces/RecoveryStoredTextPart.html +9 -9
- package/docs/api/interfaces/RecoveryStoredToolPart.html +9 -9
- package/docs/api/interfaces/RegisterContextOptions.html +12 -12
- package/docs/api/interfaces/ReleaseInfo.html +9 -9
- package/docs/api/interfaces/ResolveDelegationOptions.html +7 -7
- package/docs/api/interfaces/ResolveOptions.html +6 -6
- package/docs/api/interfaces/ResolvedModel.html +5 -5
- package/docs/api/interfaces/RetryState.html +6 -6
- package/docs/api/interfaces/RuleFileCandidate.html +12 -12
- package/docs/api/interfaces/RuleFrontmatterResult.html +6 -6
- package/docs/api/interfaces/RuleInfo.html +18 -18
- package/docs/api/interfaces/RuleMetadata.html +9 -9
- package/docs/api/interfaces/RuleToInject.html +10 -10
- package/docs/api/interfaces/SessionEndHookOutput.html +2 -2
- package/docs/api/interfaces/SessionEndInput.html +9 -9
- package/docs/api/interfaces/SessionMetrics.html +9 -9
- package/docs/api/interfaces/SessionState.html +5 -5
- package/docs/api/interfaces/SetupHookOutput.html +3 -3
- package/docs/api/interfaces/SetupInput.html +7 -7
- package/docs/api/interfaces/SetupResult.html +5 -5
- package/docs/api/interfaces/ShellHook.html +4 -4
- package/docs/api/interfaces/SisyphusOptions.html +14 -14
- package/docs/api/interfaces/SisyphusSession.html +16 -16
- package/docs/api/interfaces/SkillExtractionRequest.html +12 -12
- package/docs/api/interfaces/SkillFileCandidate.html +10 -10
- package/docs/api/interfaces/SkillHookContext.html +5 -5
- package/docs/api/interfaces/SkillMetadata.html +22 -22
- package/docs/api/interfaces/SkillParseResult.html +5 -5
- package/docs/api/interfaces/SubagentHookOutput.html +3 -3
- package/docs/api/interfaces/SubagentInfo.html +14 -14
- package/docs/api/interfaces/SubagentStartInput.html +10 -10
- package/docs/api/interfaces/SubagentStopInput.html +11 -11
- package/docs/api/interfaces/SubagentTrackingState.html +6 -6
- package/docs/api/interfaces/TaskExecutionDecision.html +10 -10
- package/docs/api/interfaces/TechStack.html +5 -5
- package/docs/api/interfaces/ThinkModeInput.html +4 -4
- package/docs/api/interfaces/ThinkModeState.html +12 -12
- package/docs/api/interfaces/ThinkingValidatorMessageInfo.html +6 -6
- package/docs/api/interfaces/ThinkingValidatorMessagePart.html +9 -9
- package/docs/api/interfaces/ThinkingValidatorMessageWithParts.html +4 -4
- package/docs/api/interfaces/TodoContinuationHook.html +2 -2
- package/docs/api/interfaces/TransitionResult.html +4 -4
- package/docs/api/interfaces/TruncateState.html +6 -6
- package/docs/api/interfaces/UltraQAOptions.html +5 -5
- package/docs/api/interfaces/UltraQAResult.html +9 -9
- package/docs/api/interfaces/UltraQAState.html +19 -19
- package/docs/api/interfaces/UltrapilotConfig.html +14 -14
- package/docs/api/interfaces/UltrapilotState.html +26 -26
- package/docs/api/interfaces/UltraworkState.html +17 -17
- package/docs/api/interfaces/UpdateCheckResult.html +7 -7
- package/docs/api/interfaces/UpdateResult.html +7 -7
- package/docs/api/interfaces/UserDirective.html +7 -7
- package/docs/api/interfaces/UserStory.html +15 -15
- package/docs/api/interfaces/ValidationCoordinatorResult.html +6 -6
- package/docs/api/interfaces/ValidationResult.html +10 -10
- package/docs/api/interfaces/VerificationState.html +17 -17
- package/docs/api/interfaces/VersionMetadata.html +12 -12
- package/docs/api/interfaces/WorkerState.html +24 -24
- package/docs/api/interfaces/WriteSkillResult.html +6 -6
- package/docs/api/modules.html +1 -1
- package/docs/api/types/AgentCategory.html +2 -2
- package/docs/api/types/AgentCost.html +3 -3
- package/docs/api/types/AgentFactory.html +2 -2
- package/docs/api/types/AgentOverrides.html +2 -2
- package/docs/api/types/AutopilotPhase.html +2 -2
- package/docs/api/types/AutopilotSignal.html +2 -2
- package/docs/api/types/CommandScope.html +2 -2
- package/docs/api/types/ContextPriority.html +3 -3
- package/docs/api/types/ContextSourceType.html +3 -3
- package/docs/api/types/DelegationProvider.html +2 -2
- package/docs/api/types/DelegationTool.html +2 -2
- package/docs/api/types/ExecutionMode.html +3 -3
- package/docs/api/types/ExternalModelProvider.html +2 -2
- package/docs/api/types/GateType.html +3 -3
- package/docs/api/types/InjectionStrategy.html +2 -2
- package/docs/api/types/KeywordType.html +10 -10
- package/docs/api/types/ModelType.html +2 -2
- package/docs/api/types/QAStatus.html +2 -2
- package/docs/api/types/RecoveryErrorType.html +2 -2
- package/docs/api/types/RecoveryStoredPart.html +2 -2
- package/docs/api/types/TaskTool.html +1 -1
- package/docs/api/types/ThinkingConfig.html +2 -2
- package/docs/api/types/UltraQAGoalType.html +1 -1
- package/docs/api/types/UserStoryInput.html +2 -2
- package/docs/api/types/ValidationVerdict.html +2 -2
- package/docs/api/types/ValidationVerdictType.html +2 -2
- package/docs/api/variables/AGENTS_DIR.html +1 -1
- package/docs/api/variables/AGENTS_FILENAME.html +2 -2
- package/docs/api/variables/AGENT_TOOLS.html +2 -2
- package/docs/api/variables/ALLOWED_PATH_PREFIX.html +2 -2
- package/docs/api/variables/ANALYST_PROMPT_METADATA.html +1 -1
- package/docs/api/variables/ARCHITECT_PROMPT_METADATA.html +1 -1
- package/docs/api/variables/AUTO_SLASH_COMMAND_HOOK_NAME.html +4 -4
- package/docs/api/variables/AUTO_SLASH_COMMAND_TAG_CLOSE.html +1 -1
- package/docs/api/variables/AUTO_SLASH_COMMAND_TAG_OPEN.html +2 -2
- package/docs/api/variables/BACKGROUND_NOTIFICATION_HOOK_NAME.html +2 -2
- package/docs/api/variables/BDD_KEYWORDS.html +2 -2
- package/docs/api/variables/BEADS_INSTRUCTIONS.html +1 -1
- package/docs/api/variables/BEADS_RUST_INSTRUCTIONS.html +1 -1
- package/docs/api/variables/BLOCKING_PATTERNS.html +3 -3
- package/docs/api/variables/BOULDER_CONTINUATION_PROMPT.html +2 -2
- package/docs/api/variables/BOULDER_DIR.html +2 -2
- package/docs/api/variables/BOULDER_FILE.html +2 -2
- package/docs/api/variables/BOULDER_STATE_PATH.html +2 -2
- package/docs/api/variables/CHARS_PER_TOKEN.html +2 -2
- package/docs/api/variables/CI_COMMANDS.html +2 -2
- package/docs/api/variables/CI_GATE_MESSAGE.html +1 -1
- package/docs/api/variables/CLAUDE_CONFIG_DIR.html +2 -2
- package/docs/api/variables/CLAUDE_DEFAULT_CONTEXT_LIMIT.html +2 -2
- package/docs/api/variables/COMMANDS_DIR.html +1 -1
- package/docs/api/variables/COMMENT_CHECKER_MESSAGE_HEADER.html +2 -2
- package/docs/api/variables/COMPACTION_COOLDOWN_MS.html +2 -2
- package/docs/api/variables/CONTENT_PART_TYPES.html +2 -2
- package/docs/api/variables/CONTEXT_CRITICAL_MESSAGE.html +2 -2
- package/docs/api/variables/CONTEXT_FILENAMES.html +2 -2
- package/docs/api/variables/CONTEXT_LIMIT_RECOVERY_MESSAGE.html +2 -2
- package/docs/api/variables/CONTEXT_LIMIT_SHORT_MESSAGE.html +2 -2
- package/docs/api/variables/CONTEXT_WARNING_MESSAGE.html +2 -2
- package/docs/api/variables/CRITICAL_THRESHOLD.html +2 -2
- package/docs/api/variables/CRITIC_PROMPT_METADATA.html +1 -1
- package/docs/api/variables/DEFAULT_CONFIG.html +2 -2
- package/docs/api/variables/DEFAULT_MAX_BACKGROUND_TASKS.html +2 -2
- package/docs/api/variables/DEFAULT_THINKING_CONTENT.html +2 -2
- package/docs/api/variables/DIRECT_WORK_REMINDER.html +2 -2
- package/docs/api/variables/DOCUMENT_SPECIALIST_PROMPT_METADATA.html +1 -1
- package/docs/api/variables/DOCUMENT_WRITER_PROMPT_METADATA.html +1 -1
- package/docs/api/variables/EDIT_ERROR_PATTERNS.html +2 -2
- package/docs/api/variables/EDIT_ERROR_REMINDER.html +3 -3
- package/docs/api/variables/EMPTY_MESSAGE_SANITIZER_DEBUG_PREFIX.html +2 -2
- package/docs/api/variables/EMPTY_MESSAGE_SANITIZER_ERROR_PATTERNS.html +2 -2
- package/docs/api/variables/EMPTY_MESSAGE_SANITIZER_HOOK_NAME.html +2 -2
- package/docs/api/variables/ENTRY_SEPARATOR.html +1 -1
- package/docs/api/variables/EXCLUDED_COMMANDS.html +3 -3
- package/docs/api/variables/EXPERT_GATE_MESSAGE.html +1 -1
- package/docs/api/variables/EXPLORE_PROMPT_METADATA.html +1 -1
- package/docs/api/variables/EXTENSION_TO_LANGUAGE.html +2 -2
- package/docs/api/variables/FEATURE_FLAG_KEY.html +2 -2
- package/docs/api/variables/FRONTEND_ENGINEER_PROMPT_METADATA.html +1 -1
- package/docs/api/variables/GITHUB_API_URL.html +1 -1
- package/docs/api/variables/INSTALLER_CLAUDE_CONFIG_DIR.html +2 -2
- package/docs/api/variables/INSTALLER_VERSION.html +2 -2
- package/docs/api/variables/LINE_COMMENT_PATTERNS.html +2 -2
- package/docs/api/variables/LONG_RUNNING_PATTERNS.html +3 -3
- package/docs/api/variables/MANUAL_HEADER.html +1 -1
- package/docs/api/variables/MAX_SKILLS_PER_SESSION.html +2 -2
- package/docs/api/variables/MAX_SKILL_CONTENT_LENGTH.html +2 -2
- package/docs/api/variables/MAX_WARNINGS.html +2 -2
- package/docs/api/variables/MIN_QUALITY_SCORE.html +2 -2
- package/docs/api/variables/MODE_CONFIGS.html +4 -4
- package/docs/api/variables/MULTIMODAL_LOOKER_PROMPT_METADATA.html +1 -1
- package/docs/api/variables/NON_EMPTY_CONTENT_RECOVERY_MESSAGE.html +2 -2
- package/docs/api/variables/NON_INTERACTIVE_ENV.html +1 -1
- package/docs/api/variables/NON_INTERACTIVE_ENV_HOOK_NAME.html +1 -1
- package/docs/api/variables/NOTEPAD_BASE_PATH.html +2 -2
- package/docs/api/variables/NOTEPAD_DEFAULT_CONFIG.html +1 -1
- package/docs/api/variables/NOTEPAD_DIR.html +2 -2
- package/docs/api/variables/NOTEPAD_FILENAME.html +1 -1
- package/docs/api/variables/OMC_ORCHESTRATOR_HOOK_NAME.html +4 -4
- package/docs/api/variables/ORCHESTRATOR_DELEGATION_REQUIRED.html +2 -2
- package/docs/api/variables/PATTERNS_HEADER.html +1 -1
- package/docs/api/variables/PLACEHOLDER_TEXT.html +3 -3
- package/docs/api/variables/PLANNER_PLANS_DIR.html +2 -2
- package/docs/api/variables/PLANNER_PROMPT_METADATA.html +1 -1
- package/docs/api/variables/PLAN_EXTENSION.html +2 -2
- package/docs/api/variables/PRD_EXAMPLE_FILENAME.html +1 -1
- package/docs/api/variables/PRD_FILENAME.html +1 -1
- package/docs/api/variables/PREEMPTIVE_DEFAULT_THRESHOLD.html +2 -2
- package/docs/api/variables/PREVENTED_ERROR.html +2 -2
- package/docs/api/variables/PRIORITY_HEADER.html +1 -1
- package/docs/api/variables/PROGRESS_FILENAME.html +1 -1
- package/docs/api/variables/PROJECT_MARKERS.html +2 -2
- package/docs/api/variables/PROJECT_RULE_FILES.html +2 -2
- package/docs/api/variables/PROJECT_RULE_SUBDIRS.html +2 -2
- package/docs/api/variables/PROJECT_SKILLS_SUBDIR.html +2 -2
- package/docs/api/variables/RAPID_FIRE_DEBOUNCE_MS.html +7 -7
- package/docs/api/variables/README_FILENAME.html +2 -2
- package/docs/api/variables/README_INJECTOR_STORAGE.html +1 -1
- package/docs/api/variables/README_TRACKED_TOOLS.html +2 -2
- package/docs/api/variables/RECOVERY_FAILED_MESSAGE.html +2 -2
- package/docs/api/variables/RECOVERY_MESSAGES.html +2 -2
- package/docs/api/variables/RECOVERY_PLACEHOLDER_TEXT.html +2 -2
- package/docs/api/variables/REMINDER_MESSAGE.html +2 -2
- package/docs/api/variables/REPO_NAME.html +1 -1
- package/docs/api/variables/REPO_OWNER.html +2 -2
- package/docs/api/variables/RETRY_CONFIG.html +6 -6
- package/docs/api/variables/RULES_INJECTOR_STORAGE.html +1 -1
- package/docs/api/variables/RULE_EXTENSIONS.html +2 -2
- package/docs/api/variables/SHELL_COMMAND_PATTERNS.html +3 -3
- package/docs/api/variables/SINGLE_TASK_DIRECTIVE.html +2 -2
- package/docs/api/variables/SISYPHUS_JUNIOR_PROMPT_METADATA.html +1 -1
- package/docs/api/variables/SKILL_EXTENSION.html +2 -2
- package/docs/api/variables/SLASH_COMMAND_PATTERN.html +2 -2
- package/docs/api/variables/STALE_STATE_MAX_AGE_MS.html +2 -2
- package/docs/api/variables/SYNTHETIC_THINKING_ID_PREFIX.html +2 -2
- package/docs/api/variables/TARGET_TOOLS.html +2 -2
- package/docs/api/variables/THINKING_BLOCK_VALIDATOR_HOOK_NAME.html +2 -2
- package/docs/api/variables/THINKING_CONFIGS.html +2 -2
- package/docs/api/variables/THINKING_MODEL_PATTERNS.html +3 -3
- package/docs/api/variables/THINKING_PART_TYPES.html +2 -2
- package/docs/api/variables/TOKEN_LIMIT_KEYWORDS.html +2 -2
- package/docs/api/variables/TOKEN_LIMIT_PATTERNS.html +2 -2
- package/docs/api/variables/TOOL_PART_TYPES.html +2 -2
- package/docs/api/variables/TRACKED_TOOLS.html +2 -2
- package/docs/api/variables/TRUNCATE_CONFIG.html +6 -6
- package/docs/api/variables/TRUNCATION_APPLIED_MESSAGE.html +2 -2
- package/docs/api/variables/TYPE_CHECKER_PREFIXES.html +2 -2
- package/docs/api/variables/ULTRAPILOT_DEFAULT_CONFIG.html +2 -2
- package/docs/api/variables/USER_GATE_MESSAGE.html +1 -1
- package/docs/api/variables/USER_RULE_DIR.html +2 -2
- package/docs/api/variables/USER_SKILLS_DIR.html +2 -2
- package/docs/api/variables/VERIFICATION_REMINDER.html +2 -2
- package/docs/api/variables/VERSION_FILE.html +1 -1
- package/docs/api/variables/WORKING_MEMORY_HEADER.html +1 -1
- package/docs/api/variables/WRITE_EDIT_TOOLS.html +2 -2
- package/docs/api/variables/allCustomTools.html +3 -3
- package/docs/api/variables/analystAgent.html +1 -1
- package/docs/api/variables/architectAgent.html +1 -1
- package/docs/api/variables/astTools.html +2 -2
- package/docs/api/variables/contextCollector.html +2 -2
- package/docs/api/variables/criticAgent.html +1 -1
- package/docs/api/variables/designerAgent.html +1 -1
- package/docs/api/variables/executorAgent.html +1 -1
- package/docs/api/variables/exploreAgent.html +1 -1
- package/docs/api/variables/lspTools.html +2 -2
- package/docs/api/variables/nonInteractiveEnvHook.html +8 -8
- package/docs/api/variables/omcSystemPrompt.html +2 -2
- package/docs/api/variables/omcToolNames.html +3 -3
- package/docs/api/variables/omcToolsServer.html +4 -4
- package/docs/api/variables/plannerAgent.html +1 -1
- package/docs/api/variables/researcherAgent.html +1 -1
- package/docs/api/variables/visionAgent.html +1 -1
- package/docs/api/variables/writerAgent.html +1 -1
- package/docs/concepts/README.md +63 -0
- package/docs/concepts/agent-selection.md +83 -0
- package/docs/concepts/agents.md +63 -0
- package/docs/concepts/error-handling.md +121 -0
- package/docs/concepts/modes.md +70 -0
- package/docs/concepts/skills.md +68 -0
- package/docs/getting-started/concepts.md +127 -63
- package/docs/getting-started/quick-reference.md +135 -0
- package/docs/getting-started/quickstart.md +101 -17
- package/docs/quick-start.md +169 -0
- package/docs/reviews/autoresearch-integration/review_domain.md +295 -295
- package/docs/reviews/autoresearch-integration/review_product.md +287 -287
- package/docs/standards/README.md +1 -1
- package/docs/state-migration.md +98 -0
- package/docs/tasks/v7.0.1/sub_prds/T-001-test-optimization.md +66 -0
- package/hooks/run-hook.cmd +0 -0
- package/hooks/session-start +0 -0
- package/package.json +5 -1
- package/scripts/check-version-sync.mjs +33 -0
- package/scripts/fix-agent-headers.py +58 -58
- package/scripts/fix-blank-lines.py +19 -19
- package/scripts/fix-long-lines.py +41 -41
- package/scripts/migrate-console-to-logger.ts +91 -0
- package/scripts/persistent-mode.cjs +605 -605
- package/skills/release/SKILL.md +126 -0
- 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/templates/demo/README.md +39 -0
- package/templates/example-project/README.md +34 -0
- package/templates/example-project/dist/index.js +5 -0
- package/templates/example-project/package-lock.json +47 -0
- package/templates/example-project/package.json +13 -0
- package/templates/example-project/src/index.ts +5 -0
- package/templates/example-project/tsconfig.json +11 -0
package/dist/hooks/bridge.js
CHANGED
|
@@ -1,946 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hook Bridge - TypeScript logic invoked by shell scripts
|
|
3
|
-
*
|
|
4
|
-
* This module provides the main entry point for shell hooks to call TypeScript
|
|
5
|
-
* for complex processing. The shell script reads stdin, passes it to this module,
|
|
6
|
-
* and writes the JSON output to stdout.
|
|
7
|
-
*
|
|
8
|
-
* Usage from shell:
|
|
9
|
-
* ```bash
|
|
10
|
-
* #!/bin/bash
|
|
11
|
-
* INPUT=$(cat)
|
|
12
|
-
* echo "$INPUT" | node ~/.claude/omc/hook-bridge.mjs --hook=keyword-detector
|
|
13
|
-
* ```
|
|
14
3
|
*/
|
|
15
4
|
import { pathToFileURL } from 'url';
|
|
16
|
-
import { existsSync, readFileSync, watch } from "fs";
|
|
17
|
-
import { readFile } from "fs/promises";
|
|
18
|
-
import { join } from "path";
|
|
19
|
-
import { resolveToWorktreeRoot } from "../lib/worktree-paths.js";
|
|
20
|
-
import { auditLogger } from "../audit/logger.js";
|
|
21
|
-
import { safeJsonParse } from "../lib/safe-json.js";
|
|
22
|
-
// Hot-path imports: needed on every/most hook invocations (keyword-detector, pre/post-tool-use)
|
|
23
|
-
import { removeCodeBlocks, getAllKeywords } from "./keyword-detector/index.js";
|
|
24
|
-
import { processOrchestratorPreTool, processOrchestratorPostTool } from "./omc-orchestrator/index.js";
|
|
25
|
-
import { processPreToolUse as enforceDelegationModel } from "../features/delegation-enforcer.js";
|
|
26
5
|
import { normalizeHookInput } from "./bridge-normalize.js";
|
|
27
|
-
import { withTimeout } from "./timeout-wrapper.js";
|
|
28
6
|
import { HookSeverity, HOOK_SEVERITY } from "./bridge-types.js";
|
|
29
|
-
import {
|
|
7
|
+
import { loadHandler } from "./handlers/index.js";
|
|
8
|
+
import { HOOK_ROUTES } from "./handlers/route-map.js";
|
|
30
9
|
import { loadConfig } from "../config/loader.js";
|
|
31
|
-
import {
|
|
32
|
-
|
|
33
|
-
import { getAgentDashboard, } from "./subagent-tracker/index.js";
|
|
34
|
-
// Session replay recordFileTouch is used in pre-tool-use hot path
|
|
35
|
-
import { recordFileTouch, } from "./subagent-tracker/session-replay.js";
|
|
36
|
-
// Usage tracking for post-tool-use (non-blocking)
|
|
37
|
-
import { recordUsage, extractAgentRole, extractSkillName } from "./learner/usage-tracker.js";
|
|
38
|
-
const PKILL_F_FLAG_PATTERN = /\bpkill\b.*\s-f\b/;
|
|
39
|
-
const PKILL_FULL_FLAG_PATTERN = /\bpkill\b.*--full\b/;
|
|
40
|
-
const TEAM_TERMINAL_VALUES = new Set([
|
|
41
|
-
"completed",
|
|
42
|
-
"complete",
|
|
43
|
-
"cancelled",
|
|
44
|
-
"canceled",
|
|
45
|
-
"cancel",
|
|
46
|
-
"failed",
|
|
47
|
-
"aborted",
|
|
48
|
-
"terminated",
|
|
49
|
-
"done",
|
|
50
|
-
]);
|
|
51
|
-
// LRU Cache for file reads
|
|
52
|
-
class LRUCache {
|
|
53
|
-
cache = new Map();
|
|
54
|
-
maxSize;
|
|
55
|
-
constructor(maxSize) {
|
|
56
|
-
this.maxSize = maxSize;
|
|
57
|
-
}
|
|
58
|
-
get(key) {
|
|
59
|
-
const value = this.cache.get(key);
|
|
60
|
-
if (value !== undefined) {
|
|
61
|
-
this.cache.delete(key);
|
|
62
|
-
this.cache.set(key, value);
|
|
63
|
-
}
|
|
64
|
-
return value;
|
|
65
|
-
}
|
|
66
|
-
set(key, value) {
|
|
67
|
-
this.cache.delete(key);
|
|
68
|
-
this.cache.set(key, value);
|
|
69
|
-
if (this.cache.size > this.maxSize) {
|
|
70
|
-
const firstKey = this.cache.keys().next().value;
|
|
71
|
-
if (firstKey !== undefined) {
|
|
72
|
-
this.cache.delete(firstKey);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
delete(key) {
|
|
77
|
-
this.cache.delete(key);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
const fileCache = new LRUCache(50);
|
|
81
|
-
const watchers = new Map();
|
|
82
|
-
function watchFile(path) {
|
|
83
|
-
if (watchers.has(path))
|
|
84
|
-
return;
|
|
85
|
-
try {
|
|
86
|
-
const watcher = watch(path, () => {
|
|
87
|
-
fileCache.delete(path);
|
|
88
|
-
});
|
|
89
|
-
watcher.on('error', (err) => {
|
|
90
|
-
watchers.delete(path);
|
|
91
|
-
import("../audit/logger.js").then(({ auditLogger }) => {
|
|
92
|
-
auditLogger.log({
|
|
93
|
-
actor: "bridge",
|
|
94
|
-
action: "file-watch-error",
|
|
95
|
-
resource: path,
|
|
96
|
-
result: "failure",
|
|
97
|
-
metadata: { error: err.message }
|
|
98
|
-
}).catch(() => { });
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
watchers.set(path, watcher);
|
|
102
|
-
}
|
|
103
|
-
catch (err) {
|
|
104
|
-
import("../audit/logger.js").then(({ auditLogger }) => {
|
|
105
|
-
auditLogger.log({
|
|
106
|
-
actor: "bridge",
|
|
107
|
-
action: "file-watch-setup-error",
|
|
108
|
-
resource: path,
|
|
109
|
-
result: "failure",
|
|
110
|
-
metadata: { error: err instanceof Error ? err.message : String(err) }
|
|
111
|
-
}).catch(() => { });
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
async function readFileCached(path) {
|
|
116
|
-
const cached = fileCache.get(path);
|
|
117
|
-
if (cached !== undefined)
|
|
118
|
-
return cached;
|
|
119
|
-
const content = await readFile(path, "utf-8");
|
|
120
|
-
const recheck = fileCache.get(path);
|
|
121
|
-
if (recheck !== undefined)
|
|
122
|
-
return recheck;
|
|
123
|
-
fileCache.set(path, content);
|
|
124
|
-
watchFile(path);
|
|
125
|
-
return content;
|
|
126
|
-
}
|
|
127
|
-
async function readTeamStagedState(directory, sessionId) {
|
|
128
|
-
const stateDir = join(directory, ".omc", "state");
|
|
129
|
-
const statePaths = sessionId
|
|
130
|
-
? [
|
|
131
|
-
join(stateDir, "sessions", sessionId, "team-state.json"),
|
|
132
|
-
join(stateDir, "team-state.json"),
|
|
133
|
-
]
|
|
134
|
-
: [join(stateDir, "team-state.json")];
|
|
135
|
-
for (const statePath of statePaths) {
|
|
136
|
-
try {
|
|
137
|
-
const content = await readFile(statePath, "utf-8");
|
|
138
|
-
const result = safeJsonParse(content, statePath);
|
|
139
|
-
if (!result.success || typeof result.data !== "object" || result.data === null) {
|
|
140
|
-
continue;
|
|
141
|
-
}
|
|
142
|
-
const stateSessionId = result.data.session_id || result.data.sessionId;
|
|
143
|
-
if (sessionId && stateSessionId && stateSessionId !== sessionId) {
|
|
144
|
-
continue;
|
|
145
|
-
}
|
|
146
|
-
return result.data;
|
|
147
|
-
}
|
|
148
|
-
catch {
|
|
149
|
-
continue;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
// Backward compatibility: sync version for non-async contexts
|
|
155
|
-
function _readTeamStagedStateSync(directory, sessionId) {
|
|
156
|
-
const stateDir = join(directory, ".omc", "state");
|
|
157
|
-
const statePaths = sessionId
|
|
158
|
-
? [
|
|
159
|
-
join(stateDir, "sessions", sessionId, "team-state.json"),
|
|
160
|
-
join(stateDir, "team-state.json"),
|
|
161
|
-
]
|
|
162
|
-
: [join(stateDir, "team-state.json")];
|
|
163
|
-
for (const statePath of statePaths) {
|
|
164
|
-
if (!existsSync(statePath)) {
|
|
165
|
-
continue;
|
|
166
|
-
}
|
|
167
|
-
const content = readFileSync(statePath, "utf-8");
|
|
168
|
-
const result = safeJsonParse(content, statePath);
|
|
169
|
-
if (!result.success || typeof result.data !== "object" || result.data === null) {
|
|
170
|
-
continue;
|
|
171
|
-
}
|
|
172
|
-
const stateSessionId = result.data.session_id || result.data.sessionId;
|
|
173
|
-
if (sessionId && stateSessionId && stateSessionId !== sessionId) {
|
|
174
|
-
continue;
|
|
175
|
-
}
|
|
176
|
-
return result.data;
|
|
177
|
-
}
|
|
178
|
-
return null;
|
|
179
|
-
}
|
|
180
|
-
function getTeamStage(state) {
|
|
181
|
-
return state.stage || state.current_stage || state.currentStage || "team-exec";
|
|
182
|
-
}
|
|
183
|
-
function isTeamStateTerminal(state) {
|
|
184
|
-
if (state.terminal === true || state.cancelled === true || state.canceled === true || state.completed === true) {
|
|
185
|
-
return true;
|
|
186
|
-
}
|
|
187
|
-
const status = String(state.status || "").toLowerCase();
|
|
188
|
-
const stage = String(getTeamStage(state)).toLowerCase();
|
|
189
|
-
return TEAM_TERMINAL_VALUES.has(status) || TEAM_TERMINAL_VALUES.has(stage);
|
|
190
|
-
}
|
|
191
|
-
function getTeamStagePrompt(stage) {
|
|
192
|
-
switch (stage) {
|
|
193
|
-
case "team-plan":
|
|
194
|
-
return "Continue planning and decomposition, then move into execution once the task graph is ready.";
|
|
195
|
-
case "team-prd":
|
|
196
|
-
return "Continue clarifying scope and acceptance criteria, then proceed to execution once criteria are explicit.";
|
|
197
|
-
case "team-exec":
|
|
198
|
-
return "Continue execution: monitor teammates, unblock dependencies, and drive tasks to terminal status for this pass.";
|
|
199
|
-
case "team-verify":
|
|
200
|
-
return "Continue verification: validate outputs, run required checks, and decide pass or fix-loop entry.";
|
|
201
|
-
case "team-fix":
|
|
202
|
-
return "Continue fix loop work, then return to execution/verification until no required follow-up remains.";
|
|
203
|
-
default:
|
|
204
|
-
return "Continue from the current Team stage and preserve staged workflow semantics.";
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Returns the required camelCase keys for a given hook type.
|
|
209
|
-
* Centralizes key requirements to avoid drift between normalization and validation.
|
|
210
|
-
*/
|
|
211
|
-
export function requiredKeysForHook(hookType) {
|
|
212
|
-
switch (hookType) {
|
|
213
|
-
case "session-end":
|
|
214
|
-
case "subagent-start":
|
|
215
|
-
case "subagent-stop":
|
|
216
|
-
case "pre-compact":
|
|
217
|
-
case "setup-init":
|
|
218
|
-
case "setup-maintenance":
|
|
219
|
-
case "ralph":
|
|
220
|
-
case "persistent-mode":
|
|
221
|
-
case "session-start":
|
|
222
|
-
return ["sessionId", "directory"];
|
|
223
|
-
case "permission-request":
|
|
224
|
-
return ["sessionId", "directory", "toolName"];
|
|
225
|
-
case "pre-tool-use":
|
|
226
|
-
case "post-tool-use":
|
|
227
|
-
return ["directory", "toolName"];
|
|
228
|
-
case "autopilot":
|
|
229
|
-
return ["directory"];
|
|
230
|
-
case "keyword-detector":
|
|
231
|
-
case "stop-continuation":
|
|
232
|
-
return [];
|
|
233
|
-
default:
|
|
234
|
-
return [];
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Validates that an input object contains all required fields.
|
|
239
|
-
* Returns true if all required fields are present, false otherwise.
|
|
240
|
-
* Logs missing keys at debug level on failure.
|
|
241
|
-
*/
|
|
242
|
-
function validateHookInput(input, requiredFields, hookType) {
|
|
243
|
-
if (typeof input !== "object" || input === null)
|
|
244
|
-
return false;
|
|
245
|
-
const obj = input;
|
|
246
|
-
const missing = requiredFields.filter((field) => !(field in obj) || obj[field] === undefined);
|
|
247
|
-
if (missing.length > 0) {
|
|
248
|
-
console.error(`[hook-bridge] validateHookInput failed for "${hookType ?? "unknown"}": missing keys: ${missing.join(", ")}`);
|
|
249
|
-
return false;
|
|
250
|
-
}
|
|
251
|
-
return true;
|
|
252
|
-
}
|
|
253
|
-
// Types moved to bridge-types.ts to break circular dependency
|
|
254
|
-
/**
|
|
255
|
-
* Extract prompt text from various input formats
|
|
256
|
-
*/
|
|
257
|
-
function getPromptText(input) {
|
|
258
|
-
if (input.prompt) {
|
|
259
|
-
return input.prompt;
|
|
260
|
-
}
|
|
261
|
-
if (input.message?.content) {
|
|
262
|
-
return input.message.content;
|
|
263
|
-
}
|
|
264
|
-
if (input.parts) {
|
|
265
|
-
return input.parts
|
|
266
|
-
.filter((p) => p.type === "text" && p.text)
|
|
267
|
-
.map((p) => p.text)
|
|
268
|
-
.join(" ");
|
|
269
|
-
}
|
|
270
|
-
return "";
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Process keyword detection hook
|
|
274
|
-
* Detects magic keywords and returns injection message
|
|
275
|
-
* Also activates persistent state for modes that require it (ralph, ultrawork)
|
|
276
|
-
*/
|
|
277
|
-
async function processKeywordDetector(input) {
|
|
278
|
-
const promptText = getPromptText(input);
|
|
279
|
-
if (!promptText) {
|
|
280
|
-
return { continue: true };
|
|
281
|
-
}
|
|
282
|
-
// Remove code blocks to prevent false positives
|
|
283
|
-
const cleanedText = removeCodeBlocks(promptText);
|
|
284
|
-
// Get all keywords (supports multiple keywords in one prompt)
|
|
285
|
-
const keywords = getAllKeywords(cleanedText);
|
|
286
|
-
if (keywords.length === 0) {
|
|
287
|
-
return { continue: true };
|
|
288
|
-
}
|
|
289
|
-
const sessionId = input.sessionId;
|
|
290
|
-
const directory = resolveToWorktreeRoot(input.directory);
|
|
291
|
-
const messages = [];
|
|
292
|
-
// Process each keyword and collect messages
|
|
293
|
-
for (const keywordType of keywords) {
|
|
294
|
-
switch (keywordType) {
|
|
295
|
-
case "ralph": {
|
|
296
|
-
// Lazy-load ralph module
|
|
297
|
-
const { createRalphLoopHook } = await import("./ralph/index.js");
|
|
298
|
-
// Activate ralph state which also auto-activates ultrawork
|
|
299
|
-
const hook = createRalphLoopHook(directory);
|
|
300
|
-
hook.startLoop(sessionId, promptText);
|
|
301
|
-
messages.push(RALPH_MESSAGE);
|
|
302
|
-
break;
|
|
303
|
-
}
|
|
304
|
-
case "ultrawork": {
|
|
305
|
-
// Lazy-load ultrawork module
|
|
306
|
-
const { activateUltrawork } = await import("./ultrawork/index.js");
|
|
307
|
-
// Activate persistent ultrawork state
|
|
308
|
-
activateUltrawork(promptText, sessionId, directory);
|
|
309
|
-
messages.push(ULTRAWORK_MESSAGE);
|
|
310
|
-
break;
|
|
311
|
-
}
|
|
312
|
-
case "ultrathink":
|
|
313
|
-
messages.push(ULTRATHINK_MESSAGE);
|
|
314
|
-
break;
|
|
315
|
-
case "deepsearch":
|
|
316
|
-
messages.push(SEARCH_MESSAGE);
|
|
317
|
-
break;
|
|
318
|
-
case "analyze":
|
|
319
|
-
messages.push(ANALYZE_MESSAGE);
|
|
320
|
-
break;
|
|
321
|
-
// For modes without dedicated message constants, return generic activation message
|
|
322
|
-
// These are handled by UserPromptSubmit hook for skill invocation
|
|
323
|
-
case "cancel":
|
|
324
|
-
case "autopilot":
|
|
325
|
-
case "team":
|
|
326
|
-
case "pipeline":
|
|
327
|
-
case "ralplan":
|
|
328
|
-
case "plan":
|
|
329
|
-
case "tdd":
|
|
330
|
-
messages.push(`[MODE: ${keywordType.toUpperCase()}] Skill invocation handled by UserPromptSubmit hook.`);
|
|
331
|
-
break;
|
|
332
|
-
default:
|
|
333
|
-
// Skip unknown keywords
|
|
334
|
-
break;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
// Return combined message with delimiter
|
|
338
|
-
if (messages.length === 0) {
|
|
339
|
-
return { continue: true };
|
|
340
|
-
}
|
|
341
|
-
return {
|
|
342
|
-
continue: true,
|
|
343
|
-
message: messages.join("\n\n---\n\n"),
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
* Process stop continuation hook
|
|
348
|
-
* NOTE: Simplified to always return continue: true (soft enforcement only).
|
|
349
|
-
* All continuation enforcement is now done via message injection, not blocking.
|
|
350
|
-
*/
|
|
351
|
-
async function processStopContinuation(_input) {
|
|
352
|
-
// Always allow stop - no hard blocking
|
|
353
|
-
return { continue: true };
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* Process Ralph hook (session.idle event)
|
|
357
|
-
* Continues work loops until completion promise is detected and architect verifies
|
|
358
|
-
*/
|
|
359
|
-
async function processRalph(input) {
|
|
360
|
-
const sessionId = input.sessionId;
|
|
361
|
-
const directory = resolveToWorktreeRoot(input.directory);
|
|
362
|
-
if (!sessionId) {
|
|
363
|
-
return { continue: true };
|
|
364
|
-
}
|
|
365
|
-
// Lazy-load ralph module
|
|
366
|
-
const { readRalphState, incrementRalphIteration, clearRalphState, readVerificationState, getArchitectVerificationPrompt, clearVerificationState, } = await import("./ralph/index.js");
|
|
367
|
-
// Read Ralph state
|
|
368
|
-
const state = readRalphState(directory);
|
|
369
|
-
if (!state || !state.active) {
|
|
370
|
-
return { continue: true };
|
|
371
|
-
}
|
|
372
|
-
// Strict session isolation: only process state for matching session
|
|
373
|
-
if (state.session_id !== sessionId) {
|
|
374
|
-
return { continue: true };
|
|
375
|
-
}
|
|
376
|
-
// Check for existing verification state (architect verification in progress)
|
|
377
|
-
const verificationState = readVerificationState(directory);
|
|
378
|
-
if (verificationState?.pending) {
|
|
379
|
-
// Check if architect has approved (by looking for the tag in transcript)
|
|
380
|
-
// This is handled more thoroughly in persistent-mode hook
|
|
381
|
-
// Here we just remind to spawn architect if verification is pending
|
|
382
|
-
const verificationPrompt = getArchitectVerificationPrompt(verificationState);
|
|
383
|
-
return {
|
|
384
|
-
continue: true,
|
|
385
|
-
message: verificationPrompt,
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
// Check max iterations
|
|
389
|
-
if (state.iteration >= state.max_iterations) {
|
|
390
|
-
clearRalphState(directory);
|
|
391
|
-
clearVerificationState(directory);
|
|
392
|
-
return {
|
|
393
|
-
continue: true,
|
|
394
|
-
message: `[RALPH LOOP STOPPED] Max iterations (${state.max_iterations}) reached without completion.`,
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
// Increment and continue
|
|
398
|
-
const newState = incrementRalphIteration(directory);
|
|
399
|
-
if (!newState) {
|
|
400
|
-
return { continue: true };
|
|
401
|
-
}
|
|
402
|
-
const continuationPrompt = `[RALPH LOOP - ITERATION ${newState.iteration}/${newState.max_iterations}]
|
|
403
|
-
|
|
404
|
-
The task is NOT complete yet. Continue working.
|
|
405
|
-
|
|
406
|
-
IMPORTANT:
|
|
407
|
-
- Review your progress so far
|
|
408
|
-
- Continue from where you left off
|
|
409
|
-
- When FULLY complete (after Architect verification), run \`/ultrapower:cancel\` to cleanly exit and clean up state files. If cancel fails, retry with \`/ultrapower:cancel --force\`.
|
|
410
|
-
- Do not stop until the task is truly done
|
|
411
|
-
|
|
412
|
-
Original task:
|
|
413
|
-
${newState.prompt}`;
|
|
414
|
-
return {
|
|
415
|
-
continue: true,
|
|
416
|
-
message: continuationPrompt,
|
|
417
|
-
};
|
|
418
|
-
}
|
|
419
|
-
/**
|
|
420
|
-
* Process persistent mode hook (enhanced stop continuation)
|
|
421
|
-
* Unified handler for ultrawork, ralph, and todo-continuation
|
|
422
|
-
*/
|
|
423
|
-
async function processPersistentMode(input) {
|
|
424
|
-
const sessionId = input.sessionId;
|
|
425
|
-
const directory = resolveToWorktreeRoot(input.directory);
|
|
426
|
-
// Lazy-load persistent-mode and todo-continuation modules
|
|
427
|
-
const { checkPersistentModes, createHookOutput } = await import("./persistent-mode/index.js");
|
|
428
|
-
// Extract stop context for abort detection (supports both camelCase and snake_case)
|
|
429
|
-
const stopContext = {
|
|
430
|
-
stop_reason: input.stop_reason,
|
|
431
|
-
stopReason: input.stopReason,
|
|
432
|
-
user_requested: input.user_requested,
|
|
433
|
-
userRequested: input.userRequested,
|
|
434
|
-
};
|
|
435
|
-
const result = await checkPersistentModes(sessionId, directory, stopContext);
|
|
436
|
-
const output = createHookOutput(result);
|
|
437
|
-
const teamState = await readTeamStagedState(directory, sessionId);
|
|
438
|
-
if (!teamState || teamState.active !== true || isTeamStateTerminal(teamState)) {
|
|
439
|
-
// No persistent mode and no active team — Claude is truly idle.
|
|
440
|
-
// Send session-idle notification (non-blocking) unless this was a user abort or context limit.
|
|
441
|
-
if (result.mode === "none" && sessionId) {
|
|
442
|
-
const isAbort = stopContext.user_requested === true || stopContext.userRequested === true;
|
|
443
|
-
const isContextLimit = stopContext.stop_reason === "context_limit" || stopContext.stopReason === "context_limit";
|
|
444
|
-
if (!isAbort && !isContextLimit) {
|
|
445
|
-
import("../notifications/index.js").then(({ notify }) => notify("session-idle", {
|
|
446
|
-
sessionId,
|
|
447
|
-
projectPath: directory,
|
|
448
|
-
profileName: process.env.OMC_NOTIFY_PROFILE,
|
|
449
|
-
}).catch((err) => {
|
|
450
|
-
import("../audit/logger.js").then(({ auditLogger }) => {
|
|
451
|
-
auditLogger.log({
|
|
452
|
-
actor: "bridge",
|
|
453
|
-
action: "session-idle-notification",
|
|
454
|
-
resource: sessionId,
|
|
455
|
-
result: "failure",
|
|
456
|
-
metadata: { error: err.message }
|
|
457
|
-
}).catch(() => { });
|
|
458
|
-
});
|
|
459
|
-
if (process.env.OMC_DEBUG) {
|
|
460
|
-
console.error(`[bridge] session-idle notification failed: ${err.message}`);
|
|
461
|
-
}
|
|
462
|
-
})).catch((err) => {
|
|
463
|
-
import("../audit/logger.js").then(({ auditLogger }) => {
|
|
464
|
-
auditLogger.log({
|
|
465
|
-
actor: "bridge",
|
|
466
|
-
action: "notification-import",
|
|
467
|
-
resource: "notifications/index.js",
|
|
468
|
-
result: "failure",
|
|
469
|
-
metadata: { error: err.message }
|
|
470
|
-
}).catch(() => { });
|
|
471
|
-
});
|
|
472
|
-
if (process.env.OMC_DEBUG) {
|
|
473
|
-
console.error(`[bridge] notification import failed: ${err.message}`);
|
|
474
|
-
}
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
// IMPORTANT: Do NOT clean up reply-listener/session-registry on Stop hooks.
|
|
478
|
-
// Stop can fire for normal "idle" turns while the session is still active.
|
|
479
|
-
// Reply cleanup is handled in the true SessionEnd hook only.
|
|
480
|
-
}
|
|
481
|
-
return output;
|
|
482
|
-
}
|
|
483
|
-
const stage = getTeamStage(teamState);
|
|
484
|
-
const stagePrompt = getTeamStagePrompt(stage);
|
|
485
|
-
const teamName = teamState.team_name || teamState.teamName || "team";
|
|
486
|
-
const currentMessage = output.message ? `${output.message}\n` : "";
|
|
487
|
-
return {
|
|
488
|
-
...output,
|
|
489
|
-
message: `${currentMessage}<team-stage-continuation>
|
|
490
|
-
|
|
491
|
-
[TEAM MODE CONTINUATION]
|
|
492
|
-
|
|
493
|
-
Team "${teamName}" is currently in stage: ${stage}
|
|
494
|
-
${stagePrompt}
|
|
495
|
-
|
|
496
|
-
While stage state is active and non-terminal, keep progressing the staged workflow.
|
|
497
|
-
When team verification passes or cancel is requested, allow terminal cleanup behavior.
|
|
498
|
-
|
|
499
|
-
</team-stage-continuation>
|
|
500
|
-
|
|
501
|
-
---
|
|
502
|
-
|
|
503
|
-
`,
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* Process session start hook
|
|
508
|
-
* Restores persistent mode states and injects context if needed
|
|
509
|
-
*/
|
|
510
|
-
async function processSessionStart(input) {
|
|
511
|
-
const sessionId = input.sessionId;
|
|
512
|
-
const directory = resolveToWorktreeRoot(input.directory);
|
|
513
|
-
// Lazy-load session-start dependencies
|
|
514
|
-
const { initSilentAutoUpdate } = await import("../features/auto-update.js");
|
|
515
|
-
const { readAutopilotState } = await import("./autopilot/index.js");
|
|
516
|
-
const { readUltraworkState } = await import("./ultrawork/index.js");
|
|
517
|
-
const { checkIncompleteTodos } = await import("./todo-continuation/index.js");
|
|
518
|
-
// Trigger silent auto-update check (non-blocking, checks config internally)
|
|
519
|
-
initSilentAutoUpdate();
|
|
520
|
-
// Send session-start notification (non-blocking, swallows errors)
|
|
521
|
-
if (sessionId) {
|
|
522
|
-
import("../notifications/index.js").then(({ notify }) => notify("session-start", {
|
|
523
|
-
sessionId,
|
|
524
|
-
projectPath: directory,
|
|
525
|
-
profileName: process.env.OMC_NOTIFY_PROFILE,
|
|
526
|
-
}).catch((err) => {
|
|
527
|
-
if (process.env.OMC_DEBUG) {
|
|
528
|
-
console.error(`[bridge] session-start notification failed: ${err.message}`);
|
|
529
|
-
}
|
|
530
|
-
})).catch((err) => {
|
|
531
|
-
if (process.env.OMC_DEBUG) {
|
|
532
|
-
console.error(`[bridge] notification import failed: ${err.message}`);
|
|
533
|
-
}
|
|
534
|
-
});
|
|
535
|
-
}
|
|
536
|
-
// Start reply listener daemon if configured (non-blocking, swallows errors)
|
|
537
|
-
if (sessionId) {
|
|
538
|
-
Promise.all([
|
|
539
|
-
import("../notifications/reply-listener.js"),
|
|
540
|
-
import("../notifications/config.js"),
|
|
541
|
-
]).then(([{ startReplyListener }, { getReplyConfig, getNotificationConfig, getReplyListenerPlatformConfig },]) => {
|
|
542
|
-
const replyConfig = getReplyConfig();
|
|
543
|
-
if (!replyConfig)
|
|
544
|
-
return;
|
|
545
|
-
const notifConfig = getNotificationConfig();
|
|
546
|
-
const platformConfig = getReplyListenerPlatformConfig(notifConfig);
|
|
547
|
-
startReplyListener({
|
|
548
|
-
...replyConfig,
|
|
549
|
-
...platformConfig,
|
|
550
|
-
});
|
|
551
|
-
}).catch((err) => {
|
|
552
|
-
// reply listener setup failed — non-critical, notifications disabled
|
|
553
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
554
|
-
if (process.env.OMC_DEBUG) {
|
|
555
|
-
process.stderr.write(`[bridge] reply-listener setup error: ${msg}\n`);
|
|
556
|
-
}
|
|
557
|
-
});
|
|
558
|
-
}
|
|
559
|
-
const messages = [];
|
|
560
|
-
// Check for active autopilot state - only restore if it belongs to this session
|
|
561
|
-
const autopilotState = readAutopilotState(directory);
|
|
562
|
-
if (autopilotState?.active && autopilotState.session_id === sessionId) {
|
|
563
|
-
messages.push(`<session-restore>
|
|
564
|
-
|
|
565
|
-
[AUTOPILOT MODE RESTORED]
|
|
566
|
-
|
|
567
|
-
You have an active autopilot session from ${autopilotState.started_at}.
|
|
568
|
-
Original idea: ${autopilotState.originalIdea}
|
|
569
|
-
Current phase: ${autopilotState.phase}
|
|
570
|
-
|
|
571
|
-
Continue autopilot execution until complete.
|
|
572
|
-
|
|
573
|
-
</session-restore>
|
|
574
|
-
|
|
575
|
-
---
|
|
576
|
-
|
|
577
|
-
`);
|
|
578
|
-
}
|
|
579
|
-
// Check for active ultrawork state - only restore if it belongs to this session
|
|
580
|
-
const ultraworkState = readUltraworkState(directory);
|
|
581
|
-
if (ultraworkState?.active && ultraworkState.session_id === sessionId) {
|
|
582
|
-
messages.push(`<session-restore>
|
|
583
|
-
|
|
584
|
-
[ULTRAWORK MODE RESTORED]
|
|
585
|
-
|
|
586
|
-
You have an active ultrawork session from ${ultraworkState.started_at}.
|
|
587
|
-
Original task: ${ultraworkState.original_prompt}
|
|
588
|
-
|
|
589
|
-
Continue working in ultrawork mode until all tasks are complete.
|
|
590
|
-
|
|
591
|
-
</session-restore>
|
|
592
|
-
|
|
593
|
-
---
|
|
594
|
-
|
|
595
|
-
`);
|
|
596
|
-
}
|
|
597
|
-
const teamState = await readTeamStagedState(directory, sessionId);
|
|
598
|
-
if (teamState?.active) {
|
|
599
|
-
const teamName = teamState.team_name || teamState.teamName || "team";
|
|
600
|
-
const stage = getTeamStage(teamState);
|
|
601
|
-
if (isTeamStateTerminal(teamState)) {
|
|
602
|
-
messages.push(`<session-restore>
|
|
603
|
-
|
|
604
|
-
[TEAM MODE TERMINAL STATE DETECTED]
|
|
605
|
-
|
|
606
|
-
Team "${teamName}" stage state is terminal (${stage}).
|
|
607
|
-
If this is expected, run normal cleanup/cancel completion flow and clear stale Team state files.
|
|
608
|
-
|
|
609
|
-
</session-restore>
|
|
610
|
-
|
|
611
|
-
---
|
|
612
|
-
|
|
613
|
-
`);
|
|
614
|
-
}
|
|
615
|
-
else {
|
|
616
|
-
messages.push(`<session-restore>
|
|
617
|
-
|
|
618
|
-
[TEAM MODE RESTORED]
|
|
619
|
-
|
|
620
|
-
You have an active Team staged run for "${teamName}".
|
|
621
|
-
Current stage: ${stage}
|
|
622
|
-
${getTeamStagePrompt(stage)}
|
|
623
|
-
|
|
624
|
-
Resume from this stage and continue the staged Team workflow.
|
|
625
|
-
|
|
626
|
-
</session-restore>
|
|
627
|
-
|
|
628
|
-
---
|
|
629
|
-
|
|
630
|
-
`);
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
// Load root AGENTS.md if it exists (deepinit output - issue #613)
|
|
634
|
-
const agentsMdPath = join(directory, 'AGENTS.md');
|
|
635
|
-
if (existsSync(agentsMdPath)) {
|
|
636
|
-
try {
|
|
637
|
-
let agentsContent = (await readFileCached(agentsMdPath)).trim();
|
|
638
|
-
if (agentsContent) {
|
|
639
|
-
// Truncate to ~2500 tokens (10000 chars) to avoid context bloat
|
|
640
|
-
const MAX_AGENTS_CHARS = 10000;
|
|
641
|
-
let truncationNotice = '';
|
|
642
|
-
if (agentsContent.length > MAX_AGENTS_CHARS) {
|
|
643
|
-
agentsContent = agentsContent.slice(0, MAX_AGENTS_CHARS);
|
|
644
|
-
truncationNotice = `\n\n[Note: Content was truncated. For full context, read: ${agentsMdPath}]`;
|
|
645
|
-
}
|
|
646
|
-
messages.push(`<session-restore>
|
|
647
|
-
|
|
648
|
-
[ROOT AGENTS.md LOADED]
|
|
649
|
-
|
|
650
|
-
The following project documentation was generated by deepinit to help AI agents understand the codebase:
|
|
651
|
-
|
|
652
|
-
${agentsContent}${truncationNotice}
|
|
653
|
-
|
|
654
|
-
</session-restore>
|
|
655
|
-
|
|
656
|
-
---
|
|
657
|
-
|
|
658
|
-
`);
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
catch {
|
|
662
|
-
// Skip if file can't be read
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
// Check for incomplete todos
|
|
666
|
-
const todoResult = await checkIncompleteTodos(sessionId, directory);
|
|
667
|
-
if (todoResult.count > 0) {
|
|
668
|
-
messages.push(`<session-restore>
|
|
669
|
-
|
|
670
|
-
[PENDING TASKS DETECTED]
|
|
671
|
-
|
|
672
|
-
You have ${todoResult.count} incomplete tasks from a previous session.
|
|
673
|
-
Please continue working on these tasks.
|
|
674
|
-
|
|
675
|
-
</session-restore>
|
|
676
|
-
|
|
677
|
-
---
|
|
678
|
-
|
|
679
|
-
`);
|
|
680
|
-
}
|
|
681
|
-
if (messages.length > 0) {
|
|
682
|
-
return {
|
|
683
|
-
continue: true,
|
|
684
|
-
message: messages.join("\n"),
|
|
685
|
-
};
|
|
686
|
-
}
|
|
687
|
-
return { continue: true };
|
|
688
|
-
}
|
|
689
|
-
/**
|
|
690
|
-
* Fire-and-forget notification for AskUserQuestion (issue #597).
|
|
691
|
-
* Extracted for testability; the dynamic import makes direct assertion
|
|
692
|
-
* on the notify() call timing-sensitive, so tests spy on this wrapper instead.
|
|
693
|
-
*/
|
|
694
|
-
export function dispatchAskUserQuestionNotification(sessionId, directory, toolInput) {
|
|
695
|
-
const input = toolInput;
|
|
696
|
-
const questions = input?.questions || [];
|
|
697
|
-
const questionText = questions.map(q => q.question || "").filter(Boolean).join("; ") || "User input requested";
|
|
698
|
-
import("../notifications/index.js").then(({ notify }) => notify("ask-user-question", {
|
|
699
|
-
sessionId,
|
|
700
|
-
projectPath: directory,
|
|
701
|
-
question: questionText,
|
|
702
|
-
profileName: process.env.OMC_NOTIFY_PROFILE,
|
|
703
|
-
}).catch((err) => {
|
|
704
|
-
if (process.env.OMC_DEBUG) {
|
|
705
|
-
console.error(`[bridge] ask-user-question notification failed: ${err.message}`);
|
|
706
|
-
}
|
|
707
|
-
})).catch((err) => {
|
|
708
|
-
if (process.env.OMC_DEBUG) {
|
|
709
|
-
console.error(`[bridge] notification import failed: ${err.message}`);
|
|
710
|
-
}
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
|
-
/** @internal Object wrapper so tests can spy on the dispatch call. */
|
|
714
|
-
export const _notify = {
|
|
715
|
-
askUserQuestion: dispatchAskUserQuestionNotification,
|
|
716
|
-
};
|
|
717
|
-
/**
|
|
718
|
-
* Process pre-tool-use hook
|
|
719
|
-
* Checks delegation enforcement and tracks background tasks
|
|
720
|
-
*/
|
|
721
|
-
async function processPreToolUse(input) {
|
|
722
|
-
const directory = resolveToWorktreeRoot(input.directory);
|
|
723
|
-
// Check delegation enforcement with timeout
|
|
724
|
-
const enforcementResult = await withTimeout(() => Promise.resolve(processOrchestratorPreTool({
|
|
725
|
-
toolName: input.toolName || "",
|
|
726
|
-
toolInput: input.toolInput || {},
|
|
727
|
-
sessionId: input.sessionId,
|
|
728
|
-
directory,
|
|
729
|
-
})), {
|
|
730
|
-
timeoutMs: 3000,
|
|
731
|
-
label: 'orchestrator-pre-tool',
|
|
732
|
-
fallback: () => ({ continue: true })
|
|
733
|
-
}) || { continue: true };
|
|
734
|
-
// If enforcement blocks, return immediately
|
|
735
|
-
if (!enforcementResult.continue) {
|
|
736
|
-
return {
|
|
737
|
-
continue: false,
|
|
738
|
-
reason: enforcementResult.reason,
|
|
739
|
-
message: enforcementResult.message,
|
|
740
|
-
};
|
|
741
|
-
}
|
|
742
|
-
// Notify when AskUserQuestion is about to execute (issue #597)
|
|
743
|
-
// Fire-and-forget: notify users that input is needed BEFORE the tool blocks
|
|
744
|
-
if (input.toolName === "AskUserQuestion" && input.sessionId) {
|
|
745
|
-
_notify.askUserQuestion(input.sessionId, directory, input.toolInput);
|
|
746
|
-
}
|
|
747
|
-
// Warn about pkill -f self-termination risk (issue #210)
|
|
748
|
-
// Matches: pkill -f, pkill -9 -f, pkill --full, etc.
|
|
749
|
-
if (input.toolName === "Bash") {
|
|
750
|
-
const command = input.toolInput?.command ?? "";
|
|
751
|
-
if (PKILL_F_FLAG_PATTERN.test(command) ||
|
|
752
|
-
PKILL_FULL_FLAG_PATTERN.test(command)) {
|
|
753
|
-
return {
|
|
754
|
-
continue: true,
|
|
755
|
-
message: [
|
|
756
|
-
"WARNING: `pkill -f` matches its own process command line and will self-terminate the shell (exit code 144 = SIGTERM).",
|
|
757
|
-
"Safer alternatives:",
|
|
758
|
-
" - `pkill <exact-process-name>` (without -f)",
|
|
759
|
-
' - `kill $(pgrep -f "pattern")` (pgrep does not kill itself)',
|
|
760
|
-
"Proceeding anyway, but the command may kill this shell session.",
|
|
761
|
-
].join("\n"),
|
|
762
|
-
};
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
// Background process guard - prevent forkbomb (issue #302)
|
|
766
|
-
// Block new background tasks if limit is exceeded
|
|
767
|
-
if (input.toolName === "Task" || input.toolName === "Bash") {
|
|
768
|
-
const toolInput = input.toolInput;
|
|
769
|
-
if (toolInput?.run_in_background) {
|
|
770
|
-
const config = loadConfig();
|
|
771
|
-
const maxBgTasks = config.permissions?.maxBackgroundTasks ?? 5;
|
|
772
|
-
const runningCount = getRunningTaskCount(directory);
|
|
773
|
-
if (runningCount >= maxBgTasks) {
|
|
774
|
-
return {
|
|
775
|
-
continue: false,
|
|
776
|
-
reason: `Background process limit reached (${runningCount}/${maxBgTasks}). ` +
|
|
777
|
-
`Wait for running tasks to complete before starting new ones. ` +
|
|
778
|
-
`Limit is configurable via permissions.maxBackgroundTasks in config or OMC_MAX_BACKGROUND_TASKS env var.`,
|
|
779
|
-
};
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
// Track Task tool invocations for HUD background tasks display
|
|
784
|
-
if (input.toolName === "Task") {
|
|
785
|
-
const toolInput = input.toolInput;
|
|
786
|
-
if (toolInput?.description) {
|
|
787
|
-
const taskId = `task-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
788
|
-
addBackgroundTask(taskId, toolInput.description, toolInput.subagent_type, directory);
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
// Track file ownership for Edit/Write tools
|
|
792
|
-
if (input.toolName === "Edit" || input.toolName === "Write") {
|
|
793
|
-
const toolInput = input.toolInput;
|
|
794
|
-
if (toolInput?.file_path && input.sessionId) {
|
|
795
|
-
// Note: We don't have agent_id here in pre-tool, file ownership is recorded elsewhere
|
|
796
|
-
// Record file touch for replay
|
|
797
|
-
recordFileTouch(directory, input.sessionId, "orchestrator", toolInput.file_path);
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
// Enforce model parameter for Task/Agent calls
|
|
801
|
-
const delegationResult = enforceDelegationModel(input.toolName || '', input.toolInput);
|
|
802
|
-
// Inject agent dashboard for Task tool calls (debugging parallel agents)
|
|
803
|
-
if (input.toolName === "Task") {
|
|
804
|
-
const dashboard = getAgentDashboard(directory);
|
|
805
|
-
if (dashboard) {
|
|
806
|
-
const combined = enforcementResult.message
|
|
807
|
-
? `${enforcementResult.message}\n\n${dashboard}`
|
|
808
|
-
: dashboard;
|
|
809
|
-
return {
|
|
810
|
-
continue: true,
|
|
811
|
-
modifiedInput: delegationResult.modifiedInput,
|
|
812
|
-
message: combined,
|
|
813
|
-
};
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
return {
|
|
817
|
-
continue: true,
|
|
818
|
-
modifiedInput: delegationResult.modifiedInput,
|
|
819
|
-
...(enforcementResult.message ? { message: enforcementResult.message } : {}),
|
|
820
|
-
};
|
|
821
|
-
}
|
|
822
|
-
/**
|
|
823
|
-
* Process post-tool-use hook
|
|
824
|
-
*/
|
|
825
|
-
function getInvokedSkillName(toolInput) {
|
|
826
|
-
if (!toolInput || typeof toolInput !== "object") {
|
|
827
|
-
return null;
|
|
828
|
-
}
|
|
829
|
-
const input = toolInput;
|
|
830
|
-
const rawSkill = input.skill ??
|
|
831
|
-
input.skill_name ??
|
|
832
|
-
input.skillName ??
|
|
833
|
-
input.command ??
|
|
834
|
-
null;
|
|
835
|
-
if (typeof rawSkill !== "string" || rawSkill.trim().length === 0) {
|
|
836
|
-
return null;
|
|
837
|
-
}
|
|
838
|
-
const normalized = rawSkill.trim();
|
|
839
|
-
const namespaced = normalized.includes(":")
|
|
840
|
-
? normalized.split(":").at(-1)
|
|
841
|
-
: normalized;
|
|
842
|
-
return namespaced?.toLowerCase() || null;
|
|
843
|
-
}
|
|
844
|
-
async function processPostToolUse(input) {
|
|
845
|
-
const directory = resolveToWorktreeRoot(input.directory);
|
|
846
|
-
const messages = [];
|
|
847
|
-
// Ensure mode state activation also works when execution starts via Skill tool
|
|
848
|
-
// (e.g., ralplan consensus handoff into Skill("ultrapower:ralph")).
|
|
849
|
-
const toolName = (input.toolName || "").toLowerCase();
|
|
850
|
-
if (toolName === "skill") {
|
|
851
|
-
const skillName = getInvokedSkillName(input.toolInput);
|
|
852
|
-
if (skillName === "ralph") {
|
|
853
|
-
const { createRalphLoopHook } = await import("./ralph/index.js");
|
|
854
|
-
const promptText = typeof input.prompt === "string" && input.prompt.trim().length > 0
|
|
855
|
-
? input.prompt
|
|
856
|
-
: "Ralph loop activated via Skill tool";
|
|
857
|
-
const hook = createRalphLoopHook(directory);
|
|
858
|
-
hook.startLoop(input.sessionId, promptText);
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
// Run orchestrator post-tool processing with timeout
|
|
862
|
-
const orchestratorResult = await withTimeout(() => Promise.resolve(processOrchestratorPostTool({
|
|
863
|
-
toolName: input.toolName || "",
|
|
864
|
-
toolInput: input.toolInput || {},
|
|
865
|
-
sessionId: input.sessionId,
|
|
866
|
-
directory,
|
|
867
|
-
}, String(input.toolOutput ?? ""))), {
|
|
868
|
-
timeoutMs: 3000,
|
|
869
|
-
label: 'orchestrator-post-tool',
|
|
870
|
-
fallback: () => ({ continue: true })
|
|
871
|
-
}) || { continue: true };
|
|
872
|
-
if (orchestratorResult.message) {
|
|
873
|
-
messages.push(orchestratorResult.message);
|
|
874
|
-
}
|
|
875
|
-
// After Task completion, show updated agent dashboard
|
|
876
|
-
if (input.toolName === "Task") {
|
|
877
|
-
const dashboard = getAgentDashboard(directory);
|
|
878
|
-
if (dashboard) {
|
|
879
|
-
messages.push(dashboard);
|
|
880
|
-
}
|
|
881
|
-
}
|
|
882
|
-
// Non-blocking UsageTracker call (silent failure, must not block hook)
|
|
883
|
-
recordUsage(directory, {
|
|
884
|
-
toolName: input.toolName ?? '',
|
|
885
|
-
agentRole: extractAgentRole(input.toolName ?? '', input.toolInput),
|
|
886
|
-
skillName: extractSkillName(input.toolName ?? '', input.toolInput),
|
|
887
|
-
timestamp: Date.now(),
|
|
888
|
-
sessionId: input.sessionId ?? '',
|
|
889
|
-
}).catch(() => { });
|
|
890
|
-
if (messages.length > 0) {
|
|
891
|
-
return {
|
|
892
|
-
continue: true,
|
|
893
|
-
message: messages.join("\n\n"),
|
|
894
|
-
};
|
|
895
|
-
}
|
|
896
|
-
return { continue: true };
|
|
897
|
-
}
|
|
898
|
-
/**
|
|
899
|
-
* Process autopilot hook
|
|
900
|
-
* Manages autopilot state and injects phase prompts
|
|
901
|
-
*/
|
|
902
|
-
async function processAutopilot(input) {
|
|
903
|
-
const directory = resolveToWorktreeRoot(input.directory);
|
|
904
|
-
// Lazy-load autopilot module
|
|
905
|
-
const { readAutopilotState, getPhasePrompt } = await import("./autopilot/index.js");
|
|
906
|
-
const state = readAutopilotState(directory, input.sessionId);
|
|
907
|
-
if (!state || !state.active) {
|
|
908
|
-
return { continue: true };
|
|
909
|
-
}
|
|
910
|
-
// Check phase and inject appropriate prompt
|
|
911
|
-
const context = {
|
|
912
|
-
idea: state.originalIdea,
|
|
913
|
-
specPath: state.expansion.spec_path || ".omc/autopilot/spec.md",
|
|
914
|
-
planPath: state.planning.plan_path || ".omc/plans/autopilot-impl.md",
|
|
915
|
-
};
|
|
916
|
-
const phasePrompt = getPhasePrompt(state.phase, context);
|
|
917
|
-
if (phasePrompt) {
|
|
918
|
-
return {
|
|
919
|
-
continue: true,
|
|
920
|
-
message: `[AUTOPILOT - Phase: ${state.phase.toUpperCase()}]\n\n${phasePrompt}`,
|
|
921
|
-
};
|
|
922
|
-
}
|
|
923
|
-
return { continue: true };
|
|
924
|
-
}
|
|
925
|
-
/**
|
|
926
|
-
* Cached parsed OMC_SKIP_HOOKS for performance (env vars don't change during process lifetime)
|
|
927
|
-
*/
|
|
928
|
-
let _cachedSkipHooks = null;
|
|
929
|
-
function getSkipHooks() {
|
|
930
|
-
if (_cachedSkipHooks === null) {
|
|
931
|
-
_cachedSkipHooks =
|
|
932
|
-
process.env.OMC_SKIP_HOOKS?.split(",")
|
|
933
|
-
.map((s) => s.trim())
|
|
934
|
-
.filter(Boolean) ?? [];
|
|
935
|
-
}
|
|
936
|
-
return _cachedSkipHooks;
|
|
937
|
-
}
|
|
938
|
-
/**
|
|
939
|
-
* Reset the skip hooks cache (for testing only)
|
|
940
|
-
*/
|
|
941
|
-
export function resetSkipHooksCache() {
|
|
942
|
-
_cachedSkipHooks = null;
|
|
943
|
-
}
|
|
10
|
+
import { requiredKeysForHook, getSkipHooks, resetSkipHooksCache } from "./validation.js";
|
|
11
|
+
export { resetSkipHooksCache, requiredKeysForHook };
|
|
944
12
|
/**
|
|
945
13
|
* Main hook processor
|
|
946
14
|
* Routes to specific hook handler based on type
|
|
@@ -957,128 +25,18 @@ export async function processHook(hookType, rawInput) {
|
|
|
957
25
|
// Normalize snake_case fields from Claude Code to camelCase
|
|
958
26
|
const input = normalizeHookInput(rawInput, hookType);
|
|
959
27
|
try {
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
return await processStopContinuation(input);
|
|
965
|
-
case "ralph":
|
|
966
|
-
return await processRalph(input);
|
|
967
|
-
case "persistent-mode":
|
|
968
|
-
return await processPersistentMode(input);
|
|
969
|
-
case "session-start":
|
|
970
|
-
return await processSessionStart(input);
|
|
971
|
-
case "pre-tool-use":
|
|
972
|
-
return processPreToolUse(input);
|
|
973
|
-
case "post-tool-use":
|
|
974
|
-
return await processPostToolUse(input);
|
|
975
|
-
case "autopilot":
|
|
976
|
-
return await processAutopilot(input);
|
|
977
|
-
// Lazy-loaded async hook types
|
|
978
|
-
case "session-end": {
|
|
979
|
-
if (!validateHookInput(input, requiredKeysForHook("session-end"), "session-end")) {
|
|
980
|
-
return { continue: true };
|
|
981
|
-
}
|
|
982
|
-
const { handleSessionEnd } = await import("./session-end/index.js");
|
|
983
|
-
return await handleSessionEnd(input);
|
|
984
|
-
}
|
|
985
|
-
case "subagent-start": {
|
|
986
|
-
if (!validateHookInput(input, requiredKeysForHook("subagent-start"), "subagent-start")) {
|
|
987
|
-
return { continue: true };
|
|
988
|
-
}
|
|
989
|
-
const { processSubagentStart } = await import("./subagent-tracker/index.js");
|
|
990
|
-
// Reconstruct snake_case fields from normalized camelCase input.
|
|
991
|
-
// normalizeHookInput maps cwd→directory and session_id→sessionId,
|
|
992
|
-
// but SubagentStartInput expects the original snake_case field names.
|
|
993
|
-
const normalized = input;
|
|
994
|
-
const startInput = {
|
|
995
|
-
cwd: (normalized.directory ?? normalized.cwd),
|
|
996
|
-
session_id: (normalized.sessionId ?? normalized.session_id),
|
|
997
|
-
agent_id: normalized.agent_id,
|
|
998
|
-
agent_type: normalized.agent_type,
|
|
999
|
-
transcript_path: normalized.transcript_path,
|
|
1000
|
-
permission_mode: normalized.permission_mode,
|
|
1001
|
-
hook_event_name: "SubagentStart",
|
|
1002
|
-
prompt: normalized.prompt,
|
|
1003
|
-
model: normalized.model,
|
|
1004
|
-
};
|
|
1005
|
-
// recordAgentStart is already called inside processSubagentStart,
|
|
1006
|
-
// so we don't call it here to avoid duplicate session replay entries.
|
|
1007
|
-
return processSubagentStart(startInput);
|
|
1008
|
-
}
|
|
1009
|
-
case "subagent-stop": {
|
|
1010
|
-
if (!validateHookInput(input, requiredKeysForHook("subagent-stop"), "subagent-stop")) {
|
|
1011
|
-
return { continue: true };
|
|
1012
|
-
}
|
|
1013
|
-
const { processSubagentStop } = await import("./subagent-tracker/index.js");
|
|
1014
|
-
// Reconstruct snake_case fields from normalized camelCase input.
|
|
1015
|
-
// Same normalization mismatch as subagent-start: cwd→directory, session_id→sessionId.
|
|
1016
|
-
const normalizedStop = input;
|
|
1017
|
-
const stopInput = {
|
|
1018
|
-
cwd: (normalizedStop.directory ?? normalizedStop.cwd),
|
|
1019
|
-
session_id: (normalizedStop.sessionId ?? normalizedStop.session_id),
|
|
1020
|
-
agent_id: normalizedStop.agent_id,
|
|
1021
|
-
agent_type: normalizedStop.agent_type,
|
|
1022
|
-
transcript_path: normalizedStop.transcript_path,
|
|
1023
|
-
permission_mode: normalizedStop.permission_mode,
|
|
1024
|
-
hook_event_name: "SubagentStop",
|
|
1025
|
-
output: normalizedStop.output,
|
|
1026
|
-
success: normalizedStop.success,
|
|
1027
|
-
};
|
|
1028
|
-
// recordAgentStop is already called inside processSubagentStop,
|
|
1029
|
-
// so we don't call it here to avoid duplicate session replay entries.
|
|
1030
|
-
return processSubagentStop(stopInput);
|
|
1031
|
-
}
|
|
1032
|
-
case "pre-compact": {
|
|
1033
|
-
if (!validateHookInput(input, requiredKeysForHook("pre-compact"), "pre-compact")) {
|
|
1034
|
-
return { continue: true };
|
|
1035
|
-
}
|
|
1036
|
-
const { processPreCompact } = await import("./pre-compact/index.js");
|
|
1037
|
-
return await processPreCompact(input);
|
|
1038
|
-
}
|
|
1039
|
-
case "setup-init":
|
|
1040
|
-
case "setup-maintenance": {
|
|
1041
|
-
if (!validateHookInput(input, requiredKeysForHook(hookType), hookType)) {
|
|
1042
|
-
return { continue: true };
|
|
1043
|
-
}
|
|
1044
|
-
const { processSetup } = await import("./setup/index.js");
|
|
1045
|
-
return await processSetup({
|
|
1046
|
-
...input,
|
|
1047
|
-
trigger: hookType === "setup-init" ? "init" : "maintenance",
|
|
1048
|
-
hook_event_name: "Setup",
|
|
1049
|
-
});
|
|
1050
|
-
}
|
|
1051
|
-
case "permission-request": {
|
|
1052
|
-
if (!validateHookInput(input, requiredKeysForHook("permission-request"), "permission-request")) {
|
|
1053
|
-
return { continue: false };
|
|
1054
|
-
}
|
|
1055
|
-
const { handlePermissionRequest } = await import("./permission-handler/index.js");
|
|
1056
|
-
// normalizeHookInput converts snake_case to camelCase, but PermissionRequestInput
|
|
1057
|
-
// uses snake_case fields. Re-map to ensure correct field access.
|
|
1058
|
-
const normalized = input;
|
|
1059
|
-
const permInput = {
|
|
1060
|
-
session_id: (normalized.sessionId ?? normalized.session_id),
|
|
1061
|
-
cwd: (normalized.directory ?? normalized.cwd),
|
|
1062
|
-
tool_name: (normalized.toolName ?? normalized.tool_name),
|
|
1063
|
-
tool_input: (normalized.toolInput ?? normalized.tool_input),
|
|
1064
|
-
tool_use_id: (normalized.toolUseId ?? normalized.tool_use_id),
|
|
1065
|
-
transcript_path: (normalized.transcriptPath ?? normalized.transcript_path),
|
|
1066
|
-
permission_mode: (normalized.permissionMode ?? normalized.permission_mode),
|
|
1067
|
-
hook_event_name: 'PermissionRequest',
|
|
1068
|
-
};
|
|
1069
|
-
const result = await handlePermissionRequest(permInput);
|
|
1070
|
-
auditLogger.log({
|
|
1071
|
-
actor: 'agent',
|
|
1072
|
-
action: 'permission_request',
|
|
1073
|
-
resource: permInput.tool_name,
|
|
1074
|
-
result: result.continue ? 'success' : 'failure',
|
|
1075
|
-
metadata: { tool_use_id: permInput.tool_use_id, permission_mode: permInput.permission_mode }
|
|
1076
|
-
}).catch(() => { });
|
|
1077
|
-
return result;
|
|
1078
|
-
}
|
|
1079
|
-
default:
|
|
1080
|
-
return { continue: true };
|
|
28
|
+
// Try lazy-loaded handlers first
|
|
29
|
+
const handler = await loadHandler(hookType);
|
|
30
|
+
if (handler) {
|
|
31
|
+
return await handler(input);
|
|
1081
32
|
}
|
|
33
|
+
// Try route map
|
|
34
|
+
const routeHandler = HOOK_ROUTES[hookType];
|
|
35
|
+
if (routeHandler) {
|
|
36
|
+
return await routeHandler(input);
|
|
37
|
+
}
|
|
38
|
+
// Unknown hook type
|
|
39
|
+
return { continue: true };
|
|
1082
40
|
}
|
|
1083
41
|
catch (error) {
|
|
1084
42
|
console.error(`[hook-bridge] Error in ${hookType}:`, error);
|
|
@@ -1107,7 +65,6 @@ export async function processHook(hookType, rawInput) {
|
|
|
1107
65
|
}
|
|
1108
66
|
/**
|
|
1109
67
|
* CLI entry point for shell script invocation
|
|
1110
|
-
* Reads JSON from stdin, processes hook, writes JSON to stdout
|
|
1111
68
|
*/
|
|
1112
69
|
export async function main() {
|
|
1113
70
|
const args = process.argv.slice(2);
|
|
@@ -1116,23 +73,24 @@ export async function main() {
|
|
|
1116
73
|
console.error("Usage: node hook-bridge.mjs --hook=<type>");
|
|
1117
74
|
process.exit(1);
|
|
1118
75
|
}
|
|
1119
|
-
const
|
|
1120
|
-
if (!
|
|
76
|
+
const hookType = hookArg.slice("--hook=".length).trim();
|
|
77
|
+
if (!hookType) {
|
|
1121
78
|
console.error("Invalid hook argument format: missing hook type");
|
|
1122
79
|
process.exit(1);
|
|
1123
80
|
}
|
|
1124
|
-
const hookType = hookTypeRaw;
|
|
1125
|
-
// Read stdin
|
|
1126
81
|
const chunks = [];
|
|
1127
82
|
for await (const chunk of process.stdin) {
|
|
1128
83
|
chunks.push(chunk);
|
|
1129
84
|
}
|
|
1130
85
|
const inputStr = Buffer.concat(chunks).toString("utf-8");
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
86
|
+
let input = {};
|
|
87
|
+
try {
|
|
88
|
+
input = JSON.parse(inputStr);
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
// Invalid JSON, use empty object
|
|
92
|
+
}
|
|
1134
93
|
const output = await processHook(hookType, input);
|
|
1135
|
-
// Write output to stdout
|
|
1136
94
|
console.log(JSON.stringify(output));
|
|
1137
95
|
}
|
|
1138
96
|
// Run if called directly
|