@stanco323/oh-my-claude-code 4.10.3 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +65 -18
- package/bridge/cli.cjs +3030 -1784
- package/bridge/mcp-server.cjs +128 -98
- package/bridge/runtime-cli.cjs +174 -136
- package/bridge/team-bridge.cjs +102 -96
- package/bridge/team-mcp.cjs +40 -29
- package/bridge/team.js +102 -88
- package/dist/__tests__/auto-update.test.js +8 -9
- package/dist/__tests__/auto-update.test.js.map +1 -1
- package/dist/__tests__/cli-config-stop-callback.test.js +26 -0
- package/dist/__tests__/cli-config-stop-callback.test.js.map +1 -1
- package/dist/__tests__/config-dir.test.d.ts +2 -0
- package/dist/__tests__/config-dir.test.d.ts.map +1 -0
- package/dist/__tests__/config-dir.test.js +184 -0
- package/dist/__tests__/config-dir.test.js.map +1 -0
- package/dist/__tests__/delegation-enforcement-levels.test.js +45 -1
- package/dist/__tests__/delegation-enforcement-levels.test.js.map +1 -1
- package/dist/__tests__/doctor-conflicts.test.js +9 -7
- package/dist/__tests__/doctor-conflicts.test.js.map +1 -1
- package/dist/__tests__/hooks-command-escaping.test.js +17 -10
- package/dist/__tests__/hooks-command-escaping.test.js.map +1 -1
- package/dist/__tests__/hud/cli-diagnostic.test.js +1 -1
- package/dist/__tests__/hud/cli-diagnostic.test.js.map +1 -1
- package/dist/__tests__/hud/usage-api-lock.test.js +5 -5
- package/dist/__tests__/hud/usage-api-lock.test.js.map +1 -1
- package/dist/__tests__/hud/usage-api-stale.test.js +2 -2
- package/dist/__tests__/hud/usage-api-stale.test.js.map +1 -1
- package/dist/__tests__/hud/usage-api.test.js +98 -0
- package/dist/__tests__/hud/usage-api.test.js.map +1 -1
- package/dist/__tests__/hud-api-key-source.test.js +2 -2
- package/dist/__tests__/hud-api-key-source.test.js.map +1 -1
- package/dist/__tests__/hud-marketplace-resolution.test.js +3 -1
- package/dist/__tests__/hud-marketplace-resolution.test.js.map +1 -1
- package/dist/__tests__/hud-windows.test.js +7 -6
- package/dist/__tests__/hud-windows.test.js.map +1 -1
- package/dist/__tests__/installer-omc-reference.test.js +122 -6
- package/dist/__tests__/installer-omc-reference.test.js.map +1 -1
- package/dist/__tests__/installer.test.js +33 -9
- package/dist/__tests__/installer.test.js.map +1 -1
- package/dist/__tests__/omc-tools-server.test.js +5 -5
- package/dist/__tests__/pre-tool-enforcer.test.js +34 -14
- package/dist/__tests__/pre-tool-enforcer.test.js.map +1 -1
- package/dist/__tests__/preemptive-compaction-hook.test.d.ts +2 -0
- package/dist/__tests__/preemptive-compaction-hook.test.d.ts.map +1 -0
- package/dist/__tests__/preemptive-compaction-hook.test.js +163 -0
- package/dist/__tests__/preemptive-compaction-hook.test.js.map +1 -0
- package/dist/__tests__/purge-stale-cache.test.js +1 -1
- package/dist/__tests__/purge-stale-cache.test.js.map +1 -1
- package/dist/__tests__/release-generation.test.d.ts +2 -0
- package/dist/__tests__/release-generation.test.d.ts.map +1 -0
- package/dist/__tests__/release-generation.test.js +79 -0
- package/dist/__tests__/release-generation.test.js.map +1 -0
- package/dist/__tests__/runtime-guidance-plan-ralph.test.d.ts +2 -0
- package/dist/__tests__/runtime-guidance-plan-ralph.test.d.ts.map +1 -0
- package/dist/__tests__/runtime-guidance-plan-ralph.test.js +87 -0
- package/dist/__tests__/runtime-guidance-plan-ralph.test.js.map +1 -0
- package/dist/__tests__/session-history-search.test.js +31 -3
- package/dist/__tests__/session-history-search.test.js.map +1 -1
- package/dist/__tests__/setup-claude-md-script.test.js +9 -1
- package/dist/__tests__/setup-claude-md-script.test.js.map +1 -1
- package/dist/__tests__/setup-no-plugin-flag.test.d.ts +2 -0
- package/dist/__tests__/setup-no-plugin-flag.test.d.ts.map +1 -0
- package/dist/__tests__/setup-no-plugin-flag.test.js +15 -0
- package/dist/__tests__/setup-no-plugin-flag.test.js.map +1 -0
- package/dist/__tests__/shared-memory.test.js +40 -2
- package/dist/__tests__/shared-memory.test.js.map +1 -1
- package/dist/__tests__/skills.test.js +45 -1
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/cli/__tests__/launch.test.js +48 -14
- package/dist/cli/__tests__/launch.test.js.map +1 -1
- package/dist/cli/commands/__tests__/team-role-shorthand.test.d.ts +2 -0
- package/dist/cli/commands/__tests__/team-role-shorthand.test.d.ts.map +1 -0
- package/dist/cli/commands/__tests__/team-role-shorthand.test.js +63 -0
- package/dist/cli/commands/__tests__/team-role-shorthand.test.js.map +1 -0
- package/dist/cli/commands/__tests__/team.test.js +21 -0
- package/dist/cli/commands/__tests__/team.test.js.map +1 -1
- package/dist/cli/commands/adapt.d.ts.map +1 -1
- package/dist/cli/commands/adapt.js.map +1 -1
- package/dist/cli/commands/doctor-conflicts.js +1 -1
- package/dist/cli/commands/doctor-conflicts.js.map +1 -1
- package/dist/cli/commands/team.d.ts.map +1 -1
- package/dist/cli/commands/team.js +30 -17
- package/dist/cli/commands/team.js.map +1 -1
- package/dist/cli/index.js +16 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/launch.d.ts.map +1 -1
- package/dist/cli/launch.js +22 -14
- package/dist/cli/launch.js.map +1 -1
- package/dist/commands/index.js +1 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/constants/names.d.ts +1 -0
- package/dist/constants/names.d.ts.map +1 -1
- package/dist/constants/names.js +1 -0
- package/dist/constants/names.js.map +1 -1
- package/dist/features/auto-update.d.ts.map +1 -1
- package/dist/features/auto-update.js +4 -4
- package/dist/features/auto-update.js.map +1 -1
- package/dist/features/background-agent/manager.js +1 -1
- package/dist/features/background-agent/manager.js.map +1 -1
- package/dist/features/builtin-skills/runtime-guidance.d.ts.map +1 -1
- package/dist/features/builtin-skills/runtime-guidance.js +35 -3
- package/dist/features/builtin-skills/runtime-guidance.js.map +1 -1
- package/dist/features/builtin-skills/skills.d.ts.map +1 -1
- package/dist/features/builtin-skills/skills.js +53 -1
- package/dist/features/builtin-skills/skills.js.map +1 -1
- package/dist/features/session-history-search/index.d.ts.map +1 -1
- package/dist/features/session-history-search/index.js +1 -4
- package/dist/features/session-history-search/index.js.map +1 -1
- package/dist/hooks/__tests__/bridge-routing.test.js +4 -0
- package/dist/hooks/__tests__/bridge-routing.test.js.map +1 -1
- package/dist/hooks/__tests__/bridge.test.js +42 -1
- package/dist/hooks/__tests__/bridge.test.js.map +1 -1
- package/dist/hooks/auto-slash-command/executor.js +2 -2
- package/dist/hooks/auto-slash-command/executor.js.map +1 -1
- package/dist/hooks/autopilot/enforcement.d.ts.map +1 -1
- package/dist/hooks/autopilot/enforcement.js +20 -4
- package/dist/hooks/autopilot/enforcement.js.map +1 -1
- package/dist/hooks/bridge.d.ts +15 -0
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +38 -1
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/factcheck/__tests__/factcheck.test.js +6 -5
- package/dist/hooks/factcheck/__tests__/factcheck.test.js.map +1 -1
- package/dist/hooks/factcheck/config.d.ts +2 -2
- package/dist/hooks/factcheck/config.d.ts.map +1 -1
- package/dist/hooks/factcheck/config.js +6 -4
- package/dist/hooks/factcheck/config.js.map +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/learner/auto-invoke.js +1 -1
- package/dist/hooks/learner/auto-invoke.js.map +1 -1
- package/dist/hooks/learner/config.js +1 -1
- package/dist/hooks/learner/config.js.map +1 -1
- package/dist/hooks/learner/constants.js +1 -1
- package/dist/hooks/learner/constants.js.map +1 -1
- package/dist/hooks/omc-orchestrator/constants.d.ts +1 -1
- package/dist/hooks/omc-orchestrator/constants.d.ts.map +1 -1
- package/dist/hooks/omc-orchestrator/constants.js +2 -2
- package/dist/hooks/omc-orchestrator/constants.js.map +1 -1
- package/dist/hooks/omc-orchestrator/index.d.ts.map +1 -1
- package/dist/hooks/omc-orchestrator/index.js +10 -7
- package/dist/hooks/omc-orchestrator/index.js.map +1 -1
- package/dist/hooks/permission-handler/index.js +1 -1
- package/dist/hooks/permission-handler/index.js.map +1 -1
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +21 -4
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.js +91 -0
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.js.map +1 -1
- package/dist/hooks/rules-injector/constants.d.ts +0 -2
- package/dist/hooks/rules-injector/constants.d.ts.map +1 -1
- package/dist/hooks/rules-injector/constants.js +0 -2
- package/dist/hooks/rules-injector/constants.js.map +1 -1
- package/dist/hooks/rules-injector/finder.d.ts +3 -3
- package/dist/hooks/rules-injector/finder.d.ts.map +1 -1
- package/dist/hooks/rules-injector/finder.js +7 -6
- package/dist/hooks/rules-injector/finder.js.map +1 -1
- package/dist/hooks/rules-injector/index.d.ts +1 -1
- package/dist/hooks/rules-injector/index.d.ts.map +1 -1
- package/dist/hooks/rules-injector/index.js +3 -6
- package/dist/hooks/rules-injector/index.js.map +1 -1
- package/dist/hooks/setup/__tests__/stdin-symlink.test.d.ts +2 -0
- package/dist/hooks/setup/__tests__/stdin-symlink.test.d.ts.map +1 -0
- package/dist/hooks/setup/__tests__/stdin-symlink.test.js +184 -0
- package/dist/hooks/setup/__tests__/stdin-symlink.test.js.map +1 -0
- package/dist/hooks/setup/index.d.ts +13 -0
- package/dist/hooks/setup/index.d.ts.map +1 -1
- package/dist/hooks/setup/index.js +100 -2
- package/dist/hooks/setup/index.js.map +1 -1
- package/dist/hooks/skill-bridge.cjs +19 -13
- package/dist/hooks/subagent-tracker/index.d.ts.map +1 -1
- package/dist/hooks/subagent-tracker/index.js +7 -3
- package/dist/hooks/subagent-tracker/index.js.map +1 -1
- package/dist/hooks/todo-continuation/index.js +1 -1
- package/dist/hooks/todo-continuation/index.js.map +1 -1
- package/dist/hooks/wiki/__tests__/ingest.test.d.ts +5 -0
- package/dist/hooks/wiki/__tests__/ingest.test.d.ts.map +1 -0
- package/dist/hooks/wiki/__tests__/ingest.test.js +180 -0
- package/dist/hooks/wiki/__tests__/ingest.test.js.map +1 -0
- package/dist/hooks/wiki/__tests__/lint.test.d.ts +5 -0
- package/dist/hooks/wiki/__tests__/lint.test.d.ts.map +1 -0
- package/dist/hooks/wiki/__tests__/lint.test.js +162 -0
- package/dist/hooks/wiki/__tests__/lint.test.js.map +1 -0
- package/dist/hooks/wiki/__tests__/query.test.d.ts +5 -0
- package/dist/hooks/wiki/__tests__/query.test.d.ts.map +1 -0
- package/dist/hooks/wiki/__tests__/query.test.js +119 -0
- package/dist/hooks/wiki/__tests__/query.test.js.map +1 -0
- package/dist/hooks/wiki/__tests__/session-hooks.test.d.ts +5 -0
- package/dist/hooks/wiki/__tests__/session-hooks.test.d.ts.map +1 -0
- package/dist/hooks/wiki/__tests__/session-hooks.test.js +40 -0
- package/dist/hooks/wiki/__tests__/session-hooks.test.js.map +1 -0
- package/dist/hooks/wiki/__tests__/storage.test.d.ts +5 -0
- package/dist/hooks/wiki/__tests__/storage.test.d.ts.map +1 -0
- package/dist/hooks/wiki/__tests__/storage.test.js +277 -0
- package/dist/hooks/wiki/__tests__/storage.test.js.map +1 -0
- package/dist/hooks/wiki/index.d.ts +13 -0
- package/dist/hooks/wiki/index.d.ts.map +1 -0
- package/dist/hooks/wiki/index.js +16 -0
- package/dist/hooks/wiki/index.js.map +1 -0
- package/dist/hooks/wiki/ingest.d.ts +20 -0
- package/dist/hooks/wiki/ingest.d.ts.map +1 -0
- package/dist/hooks/wiki/ingest.js +115 -0
- package/dist/hooks/wiki/ingest.js.map +1 -0
- package/dist/hooks/wiki/lint.d.ts +25 -0
- package/dist/hooks/wiki/lint.d.ts.map +1 -0
- package/dist/hooks/wiki/lint.js +166 -0
- package/dist/hooks/wiki/lint.js.map +1 -0
- package/dist/hooks/wiki/query.d.ts +27 -0
- package/dist/hooks/wiki/query.d.ts.map +1 -0
- package/dist/hooks/wiki/query.js +97 -0
- package/dist/hooks/wiki/query.js.map +1 -0
- package/dist/hooks/wiki/session-hooks.d.ts +42 -0
- package/dist/hooks/wiki/session-hooks.d.ts.map +1 -0
- package/dist/hooks/wiki/session-hooks.js +228 -0
- package/dist/hooks/wiki/session-hooks.js.map +1 -0
- package/dist/hooks/wiki/storage.d.ts +73 -0
- package/dist/hooks/wiki/storage.d.ts.map +1 -0
- package/dist/hooks/wiki/storage.js +343 -0
- package/dist/hooks/wiki/storage.js.map +1 -0
- package/dist/hooks/wiki/types.d.ts +136 -0
- package/dist/hooks/wiki/types.d.ts.map +1 -0
- package/dist/hooks/wiki/types.js +19 -0
- package/dist/hooks/wiki/types.js.map +1 -0
- package/dist/hud/custom-rate-provider.js +1 -1
- package/dist/hud/custom-rate-provider.js.map +1 -1
- package/dist/hud/elements/api-key-source.js +1 -1
- package/dist/hud/elements/api-key-source.js.map +1 -1
- package/dist/hud/index.js +1 -1
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/state.js +1 -1
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/usage-api.d.ts.map +1 -1
- package/dist/hud/usage-api.js +6 -2
- package/dist/hud/usage-api.js.map +1 -1
- package/dist/installer/__tests__/standalone-hook-reconcile.test.js +3 -0
- package/dist/installer/__tests__/standalone-hook-reconcile.test.js.map +1 -1
- package/dist/installer/hooks.d.ts +0 -2
- package/dist/installer/hooks.d.ts.map +1 -1
- package/dist/installer/hooks.js +1 -5
- package/dist/installer/hooks.js.map +1 -1
- package/dist/installer/index.d.ts +3 -0
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +176 -32
- package/dist/installer/index.js.map +1 -1
- package/dist/installer/mcp-registry.js +2 -2
- package/dist/installer/mcp-registry.js.map +1 -1
- package/dist/lib/release-generation.d.ts +20 -0
- package/dist/lib/release-generation.d.ts.map +1 -0
- package/dist/lib/release-generation.js +198 -0
- package/dist/lib/release-generation.js.map +1 -0
- package/dist/lib/shared-memory.d.ts +2 -1
- package/dist/lib/shared-memory.d.ts.map +1 -1
- package/dist/lib/shared-memory.js +4 -2
- package/dist/lib/shared-memory.js.map +1 -1
- package/dist/lib/worktree-paths.d.ts.map +1 -1
- package/dist/lib/worktree-paths.js +36 -10
- package/dist/lib/worktree-paths.js.map +1 -1
- package/dist/mcp/omc-tools-server.d.ts +2 -0
- package/dist/mcp/omc-tools-server.d.ts.map +1 -1
- package/dist/mcp/omc-tools-server.js +9 -2
- package/dist/mcp/omc-tools-server.js.map +1 -1
- package/dist/notifications/__tests__/config-merge.test.js +1 -1
- package/dist/notifications/__tests__/config-merge.test.js.map +1 -1
- package/dist/notifications/__tests__/profiles.test.js +1 -1
- package/dist/notifications/__tests__/profiles.test.js.map +1 -1
- package/dist/notifications/config.js +1 -1
- package/dist/notifications/config.js.map +1 -1
- package/dist/notifications/hook-config.js +1 -1
- package/dist/notifications/hook-config.js.map +1 -1
- package/dist/openclaw/__tests__/config.test.js +1 -1
- package/dist/openclaw/__tests__/config.test.js.map +1 -1
- package/dist/openclaw/config.js +1 -1
- package/dist/openclaw/config.js.map +1 -1
- package/dist/skills/__tests__/mingw-escape.test.js +1 -1
- package/dist/skills/__tests__/mingw-escape.test.js.map +1 -1
- package/dist/team/__tests__/api-interop.dispatch.test.js +2 -1
- package/dist/team/__tests__/api-interop.dispatch.test.js.map +1 -1
- package/dist/team/__tests__/bridge-integration.test.js +5 -3
- package/dist/team/__tests__/bridge-integration.test.js.map +1 -1
- package/dist/team/__tests__/edge-cases.test.js +6 -7
- package/dist/team/__tests__/edge-cases.test.js.map +1 -1
- package/dist/team/__tests__/inbox-outbox.test.js +2 -2
- package/dist/team/__tests__/inbox-outbox.test.js.map +1 -1
- package/dist/team/__tests__/message-router.test.js +6 -5
- package/dist/team/__tests__/message-router.test.js.map +1 -1
- package/dist/team/__tests__/outbox-reader.test.js +2 -2
- package/dist/team/__tests__/outbox-reader.test.js.map +1 -1
- package/dist/team/__tests__/runtime-v2.dispatch.test.js +4 -4
- package/dist/team/__tests__/runtime-v2.dispatch.test.js.map +1 -1
- package/dist/team/__tests__/shell-affinity.test.js +16 -0
- package/dist/team/__tests__/shell-affinity.test.js.map +1 -1
- package/dist/team/__tests__/team-registration.test.js +3 -2
- package/dist/team/__tests__/team-registration.test.js.map +1 -1
- package/dist/team/__tests__/team-status.test.js +3 -3
- package/dist/team/__tests__/team-status.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +6 -1
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/bridge-entry.js +1 -1
- package/dist/team/bridge-entry.js.map +1 -1
- package/dist/team/inbox-outbox.js +1 -1
- package/dist/team/inbox-outbox.js.map +1 -1
- package/dist/team/message-router.js +1 -1
- package/dist/team/message-router.js.map +1 -1
- package/dist/team/outbox-reader.js +1 -1
- package/dist/team/outbox-reader.js.map +1 -1
- package/dist/team/runtime-v2.d.ts.map +1 -1
- package/dist/team/runtime-v2.js +6 -17
- package/dist/team/runtime-v2.js.map +1 -1
- package/dist/team/task-file-ops.js +1 -1
- package/dist/team/task-file-ops.js.map +1 -1
- package/dist/team/team-registration.js +1 -1
- package/dist/team/team-registration.js.map +1 -1
- package/dist/team/team-status.js +1 -1
- package/dist/team/team-status.js.map +1 -1
- package/dist/team/tmux-session.d.ts +1 -1
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +39 -4
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/unified-team.js +1 -1
- package/dist/team/unified-team.js.map +1 -1
- package/dist/tools/shared-memory-tools.d.ts.map +1 -1
- package/dist/tools/shared-memory-tools.js +2 -1
- package/dist/tools/shared-memory-tools.js.map +1 -1
- package/dist/tools/skills-tools.d.ts.map +1 -1
- package/dist/tools/skills-tools.js +3 -2
- package/dist/tools/skills-tools.js.map +1 -1
- package/dist/tools/wiki-tools.d.ts +74 -0
- package/dist/tools/wiki-tools.d.ts.map +1 -0
- package/dist/tools/wiki-tools.js +370 -0
- package/dist/tools/wiki-tools.js.map +1 -0
- package/dist/utils/config-dir.d.ts +21 -1
- package/dist/utils/config-dir.d.ts.map +1 -1
- package/dist/utils/config-dir.js +45 -4
- package/dist/utils/config-dir.js.map +1 -1
- package/dist/utils/paths.d.ts +0 -5
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +1 -8
- package/dist/utils/paths.js.map +1 -1
- package/docs/CLAUDE.md +1 -1
- package/hooks/hooks.json +15 -0
- package/package.json +1 -1
- package/scripts/cleanup-orphans.mjs +2 -2
- package/scripts/context-guard-stop.mjs +10 -4
- package/scripts/find-node.sh +13 -1
- package/scripts/keyword-detector.mjs +9 -2
- package/scripts/lib/config-dir.cjs +31 -0
- package/scripts/lib/config-dir.mjs +29 -0
- package/scripts/lib/config-dir.sh +18 -0
- package/scripts/lib/pre-tool-enforcer-preflight.mjs +63 -0
- package/scripts/persistent-mode.cjs +29 -6
- package/scripts/persistent-mode.mjs +24 -4
- package/scripts/plugin-setup.mjs +18 -7
- package/scripts/post-tool-verifier.mjs +200 -7
- package/scripts/pre-tool-enforcer.mjs +15 -56
- package/scripts/release.ts +158 -224
- package/scripts/session-start.mjs +6 -4
- package/scripts/session-summary.mjs +6 -1
- package/scripts/setup-claude-md.sh +4 -2
- package/scripts/setup-progress.sh +4 -1
- package/scripts/skill-injector.mjs +2 -1
- package/scripts/sync-version.sh +3 -3
- package/scripts/test-pr25.sh +9 -5
- package/scripts/uninstall.sh +5 -2
- package/scripts/wiki-pre-compact.mjs +17 -0
- package/scripts/wiki-session-end.mjs +17 -0
- package/scripts/wiki-session-start.mjs +17 -0
- package/skills/cancel/SKILL.md +4 -4
- package/skills/configure-notifications/SKILL.md +12 -12
- package/skills/hud/SKILL.md +4 -4
- package/skills/learner/SKILL.md +1 -1
- package/skills/omc-doctor/SKILL.md +25 -25
- package/skills/omc-setup/SKILL.md +1 -1
- package/skills/omc-setup/phases/02-configure.md +2 -2
- package/skills/omc-setup/phases/03-integrations.md +7 -7
- package/skills/omc-setup/phases/04-welcome.md +3 -3
- package/skills/ralph/SKILL.md +6 -2
- package/skills/skill/SKILL.md +9 -9
- package/skills/team/SKILL.md +1 -1
- package/skills/wiki/SKILL.md +67 -0
- package/templates/hooks/keyword-detector.mjs +4 -2
- package/templates/hooks/lib/config-dir.mjs +29 -0
- package/templates/hooks/persistent-mode.mjs +24 -4
- package/templates/hooks/session-start.mjs +7 -4
package/bridge/mcp-server.cjs
CHANGED
|
@@ -2245,8 +2245,8 @@ var require_resolve = __commonJS({
|
|
|
2245
2245
|
}
|
|
2246
2246
|
return count;
|
|
2247
2247
|
}
|
|
2248
|
-
function getFullPath(resolver, id = "",
|
|
2249
|
-
if (
|
|
2248
|
+
function getFullPath(resolver, id = "", normalize5) {
|
|
2249
|
+
if (normalize5 !== false)
|
|
2250
2250
|
id = normalizeId(id);
|
|
2251
2251
|
const p = resolver.parse(id);
|
|
2252
2252
|
return _getFullPath(resolver, p);
|
|
@@ -3586,27 +3586,27 @@ var require_fast_uri = __commonJS({
|
|
|
3586
3586
|
"use strict";
|
|
3587
3587
|
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
|
|
3588
3588
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
3589
|
-
function
|
|
3589
|
+
function normalize5(uri, options) {
|
|
3590
3590
|
if (typeof uri === "string") {
|
|
3591
3591
|
uri = /** @type {T} */
|
|
3592
|
-
serialize(
|
|
3592
|
+
serialize(parse7(uri, options), options);
|
|
3593
3593
|
} else if (typeof uri === "object") {
|
|
3594
3594
|
uri = /** @type {T} */
|
|
3595
|
-
|
|
3595
|
+
parse7(serialize(uri, options), options);
|
|
3596
3596
|
}
|
|
3597
3597
|
return uri;
|
|
3598
3598
|
}
|
|
3599
3599
|
function resolve7(baseURI, relativeURI, options) {
|
|
3600
3600
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
3601
|
-
const resolved = resolveComponent(
|
|
3601
|
+
const resolved = resolveComponent(parse7(baseURI, schemelessOptions), parse7(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
3602
3602
|
schemelessOptions.skipEscape = true;
|
|
3603
3603
|
return serialize(resolved, schemelessOptions);
|
|
3604
3604
|
}
|
|
3605
3605
|
function resolveComponent(base, relative5, options, skipNormalization) {
|
|
3606
3606
|
const target = {};
|
|
3607
3607
|
if (!skipNormalization) {
|
|
3608
|
-
base =
|
|
3609
|
-
relative5 =
|
|
3608
|
+
base = parse7(serialize(base, options), options);
|
|
3609
|
+
relative5 = parse7(serialize(relative5, options), options);
|
|
3610
3610
|
}
|
|
3611
3611
|
options = options || {};
|
|
3612
3612
|
if (!options.tolerant && relative5.scheme) {
|
|
@@ -3658,13 +3658,13 @@ var require_fast_uri = __commonJS({
|
|
|
3658
3658
|
function equal(uriA, uriB, options) {
|
|
3659
3659
|
if (typeof uriA === "string") {
|
|
3660
3660
|
uriA = unescape(uriA);
|
|
3661
|
-
uriA = serialize(normalizeComponentEncoding(
|
|
3661
|
+
uriA = serialize(normalizeComponentEncoding(parse7(uriA, options), true), { ...options, skipEscape: true });
|
|
3662
3662
|
} else if (typeof uriA === "object") {
|
|
3663
3663
|
uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
|
|
3664
3664
|
}
|
|
3665
3665
|
if (typeof uriB === "string") {
|
|
3666
3666
|
uriB = unescape(uriB);
|
|
3667
|
-
uriB = serialize(normalizeComponentEncoding(
|
|
3667
|
+
uriB = serialize(normalizeComponentEncoding(parse7(uriB, options), true), { ...options, skipEscape: true });
|
|
3668
3668
|
} else if (typeof uriB === "object") {
|
|
3669
3669
|
uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
|
|
3670
3670
|
}
|
|
@@ -3733,7 +3733,7 @@ var require_fast_uri = __commonJS({
|
|
|
3733
3733
|
return uriTokens.join("");
|
|
3734
3734
|
}
|
|
3735
3735
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
3736
|
-
function
|
|
3736
|
+
function parse7(uri, opts) {
|
|
3737
3737
|
const options = Object.assign({}, opts);
|
|
3738
3738
|
const parsed = {
|
|
3739
3739
|
scheme: void 0,
|
|
@@ -3822,12 +3822,12 @@ var require_fast_uri = __commonJS({
|
|
|
3822
3822
|
}
|
|
3823
3823
|
var fastUri = {
|
|
3824
3824
|
SCHEMES,
|
|
3825
|
-
normalize:
|
|
3825
|
+
normalize: normalize5,
|
|
3826
3826
|
resolve: resolve7,
|
|
3827
3827
|
resolveComponent,
|
|
3828
3828
|
equal,
|
|
3829
3829
|
serialize,
|
|
3830
|
-
parse:
|
|
3830
|
+
parse: parse7
|
|
3831
3831
|
};
|
|
3832
3832
|
module2.exports = fastUri;
|
|
3833
3833
|
module2.exports.default = fastUri;
|
|
@@ -19862,15 +19862,41 @@ var lspTools = [
|
|
|
19862
19862
|
|
|
19863
19863
|
// src/tools/ast-tools.ts
|
|
19864
19864
|
var import_fs10 = require("fs");
|
|
19865
|
-
var
|
|
19865
|
+
var import_path12 = require("path");
|
|
19866
19866
|
var import_module = require("module");
|
|
19867
19867
|
|
|
19868
19868
|
// src/lib/worktree-paths.ts
|
|
19869
19869
|
var import_crypto = require("crypto");
|
|
19870
19870
|
var import_child_process5 = require("child_process");
|
|
19871
19871
|
var import_fs7 = require("fs");
|
|
19872
|
-
var
|
|
19872
|
+
var import_os2 = require("os");
|
|
19873
|
+
var import_path9 = require("path");
|
|
19874
|
+
|
|
19875
|
+
// src/utils/config-dir.ts
|
|
19873
19876
|
var import_path8 = require("path");
|
|
19877
|
+
var import_os = require("os");
|
|
19878
|
+
function stripTrailingSep(p) {
|
|
19879
|
+
if (!p.endsWith(import_path8.sep)) {
|
|
19880
|
+
return p;
|
|
19881
|
+
}
|
|
19882
|
+
return p === (0, import_path8.parse)(p).root ? p : p.slice(0, -1);
|
|
19883
|
+
}
|
|
19884
|
+
function getClaudeConfigDir() {
|
|
19885
|
+
const home = (0, import_os.homedir)();
|
|
19886
|
+
const configured = process.env.CLAUDE_CONFIG_DIR?.trim();
|
|
19887
|
+
if (!configured) {
|
|
19888
|
+
return stripTrailingSep((0, import_path8.normalize)((0, import_path8.join)(home, ".claude")));
|
|
19889
|
+
}
|
|
19890
|
+
if (configured === "~") {
|
|
19891
|
+
return stripTrailingSep((0, import_path8.normalize)(home));
|
|
19892
|
+
}
|
|
19893
|
+
if (configured.startsWith("~/") || configured.startsWith("~\\")) {
|
|
19894
|
+
return stripTrailingSep((0, import_path8.normalize)((0, import_path8.join)(home, configured.slice(2))));
|
|
19895
|
+
}
|
|
19896
|
+
return stripTrailingSep((0, import_path8.normalize)(configured));
|
|
19897
|
+
}
|
|
19898
|
+
|
|
19899
|
+
// src/lib/worktree-paths.ts
|
|
19874
19900
|
var OmcPaths = {
|
|
19875
19901
|
ROOT: ".omc",
|
|
19876
19902
|
STATE: ".omc/state",
|
|
@@ -19921,7 +19947,7 @@ function validatePath(inputPath) {
|
|
|
19921
19947
|
if (inputPath.includes("..")) {
|
|
19922
19948
|
throw new Error(`Invalid path: path traversal not allowed (${inputPath})`);
|
|
19923
19949
|
}
|
|
19924
|
-
if (inputPath.startsWith("~") || (0,
|
|
19950
|
+
if (inputPath.startsWith("~") || (0, import_path9.isAbsolute)(inputPath)) {
|
|
19925
19951
|
throw new Error(`Invalid path: absolute paths not allowed (${inputPath})`);
|
|
19926
19952
|
}
|
|
19927
19953
|
}
|
|
@@ -19940,7 +19966,7 @@ function getProjectIdentifier(worktreeRoot) {
|
|
|
19940
19966
|
source = root;
|
|
19941
19967
|
}
|
|
19942
19968
|
const hash = (0, import_crypto.createHash)("sha256").update(source).digest("hex").slice(0, 16);
|
|
19943
|
-
const dirName = (0,
|
|
19969
|
+
const dirName = (0, import_path9.basename)(root).replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
19944
19970
|
return `${dirName}-${hash}`;
|
|
19945
19971
|
}
|
|
19946
19972
|
function getOmcRoot(worktreeRoot) {
|
|
@@ -19948,8 +19974,8 @@ function getOmcRoot(worktreeRoot) {
|
|
|
19948
19974
|
if (customDir) {
|
|
19949
19975
|
const root2 = worktreeRoot || getWorktreeRoot() || process.cwd();
|
|
19950
19976
|
const projectId = getProjectIdentifier(root2);
|
|
19951
|
-
const centralizedPath = (0,
|
|
19952
|
-
const legacyPath = (0,
|
|
19977
|
+
const centralizedPath = (0, import_path9.join)(customDir, projectId);
|
|
19978
|
+
const legacyPath = (0, import_path9.join)(root2, OmcPaths.ROOT);
|
|
19953
19979
|
const warningKey = `${legacyPath}:${centralizedPath}`;
|
|
19954
19980
|
if (!dualDirWarnings.has(warningKey) && (0, import_fs7.existsSync)(legacyPath) && (0, import_fs7.existsSync)(centralizedPath)) {
|
|
19955
19981
|
dualDirWarnings.add(warningKey);
|
|
@@ -19960,14 +19986,14 @@ function getOmcRoot(worktreeRoot) {
|
|
|
19960
19986
|
return centralizedPath;
|
|
19961
19987
|
}
|
|
19962
19988
|
const root = worktreeRoot || getWorktreeRoot() || process.cwd();
|
|
19963
|
-
return (0,
|
|
19989
|
+
return (0, import_path9.join)(root, OmcPaths.ROOT);
|
|
19964
19990
|
}
|
|
19965
19991
|
function resolveOmcPath(relativePath, worktreeRoot) {
|
|
19966
19992
|
validatePath(relativePath);
|
|
19967
19993
|
const omcDir = getOmcRoot(worktreeRoot);
|
|
19968
|
-
const fullPath = (0,
|
|
19969
|
-
const relativeToOmc = (0,
|
|
19970
|
-
if (relativeToOmc.startsWith("..") || relativeToOmc.startsWith(
|
|
19994
|
+
const fullPath = (0, import_path9.normalize)((0, import_path9.resolve)(omcDir, relativePath));
|
|
19995
|
+
const relativeToOmc = (0, import_path9.relative)(omcDir, fullPath);
|
|
19996
|
+
if (relativeToOmc.startsWith("..") || relativeToOmc.startsWith(import_path9.sep + "..")) {
|
|
19971
19997
|
throw new Error(`Path escapes omc boundary: ${relativePath}`);
|
|
19972
19998
|
}
|
|
19973
19999
|
return fullPath;
|
|
@@ -19979,15 +20005,19 @@ function resolveStatePath(stateName, worktreeRoot) {
|
|
|
19979
20005
|
function ensureOmcDir(relativePath, worktreeRoot) {
|
|
19980
20006
|
const fullPath = resolveOmcPath(relativePath, worktreeRoot);
|
|
19981
20007
|
if (!(0, import_fs7.existsSync)(fullPath)) {
|
|
19982
|
-
|
|
20008
|
+
try {
|
|
20009
|
+
(0, import_fs7.mkdirSync)(fullPath, { recursive: true });
|
|
20010
|
+
} catch (err) {
|
|
20011
|
+
if (err.code !== "EEXIST") throw err;
|
|
20012
|
+
}
|
|
19983
20013
|
}
|
|
19984
20014
|
return fullPath;
|
|
19985
20015
|
}
|
|
19986
20016
|
function getWorktreeNotepadPath(worktreeRoot) {
|
|
19987
|
-
return (0,
|
|
20017
|
+
return (0, import_path9.join)(getOmcRoot(worktreeRoot), "notepad.md");
|
|
19988
20018
|
}
|
|
19989
20019
|
function getWorktreeProjectMemoryPath(worktreeRoot) {
|
|
19990
|
-
return (0,
|
|
20020
|
+
return (0, import_path9.join)(getOmcRoot(worktreeRoot), "project-memory.json");
|
|
19991
20021
|
}
|
|
19992
20022
|
var SESSION_ID_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,255}$/;
|
|
19993
20023
|
function validateSessionId(sessionId) {
|
|
@@ -20008,10 +20038,10 @@ function resolveSessionStatePath(stateName, sessionId, worktreeRoot) {
|
|
|
20008
20038
|
}
|
|
20009
20039
|
function getSessionStateDir(sessionId, worktreeRoot) {
|
|
20010
20040
|
validateSessionId(sessionId);
|
|
20011
|
-
return (0,
|
|
20041
|
+
return (0, import_path9.join)(getOmcRoot(worktreeRoot), "state", "sessions", sessionId);
|
|
20012
20042
|
}
|
|
20013
20043
|
function listSessionIds(worktreeRoot) {
|
|
20014
|
-
const sessionsDir = (0,
|
|
20044
|
+
const sessionsDir = (0, import_path9.join)(getOmcRoot(worktreeRoot), "state", "sessions");
|
|
20015
20045
|
if (!(0, import_fs7.existsSync)(sessionsDir)) {
|
|
20016
20046
|
return [];
|
|
20017
20047
|
}
|
|
@@ -20025,13 +20055,17 @@ function listSessionIds(worktreeRoot) {
|
|
|
20025
20055
|
function ensureSessionStateDir(sessionId, worktreeRoot) {
|
|
20026
20056
|
const sessionDir = getSessionStateDir(sessionId, worktreeRoot);
|
|
20027
20057
|
if (!(0, import_fs7.existsSync)(sessionDir)) {
|
|
20028
|
-
|
|
20058
|
+
try {
|
|
20059
|
+
(0, import_fs7.mkdirSync)(sessionDir, { recursive: true });
|
|
20060
|
+
} catch (err) {
|
|
20061
|
+
if (err.code !== "EEXIST") throw err;
|
|
20062
|
+
}
|
|
20029
20063
|
}
|
|
20030
20064
|
return sessionDir;
|
|
20031
20065
|
}
|
|
20032
20066
|
function resolveToWorktreeRoot(directory) {
|
|
20033
20067
|
if (directory) {
|
|
20034
|
-
const resolved = (0,
|
|
20068
|
+
const resolved = (0, import_path9.resolve)(directory);
|
|
20035
20069
|
const root = getWorktreeRoot(resolved);
|
|
20036
20070
|
if (root) return root;
|
|
20037
20071
|
console.error("[worktree] non-git directory provided, falling back to process root", {
|
|
@@ -20045,7 +20079,7 @@ function validateWorkingDirectory(workingDirectory) {
|
|
|
20045
20079
|
if (!workingDirectory) {
|
|
20046
20080
|
return trustedRoot;
|
|
20047
20081
|
}
|
|
20048
|
-
const resolved = (0,
|
|
20082
|
+
const resolved = (0, import_path9.resolve)(workingDirectory);
|
|
20049
20083
|
let trustedRootReal;
|
|
20050
20084
|
try {
|
|
20051
20085
|
trustedRootReal = (0, import_fs7.realpathSync)(trustedRoot);
|
|
@@ -20076,8 +20110,8 @@ function validateWorkingDirectory(workingDirectory) {
|
|
|
20076
20110
|
} catch {
|
|
20077
20111
|
throw new Error(`workingDirectory '${workingDirectory}' does not exist or is not accessible.`);
|
|
20078
20112
|
}
|
|
20079
|
-
const rel = (0,
|
|
20080
|
-
if (rel.startsWith("..") || (0,
|
|
20113
|
+
const rel = (0, import_path9.relative)(trustedRootReal, resolvedReal);
|
|
20114
|
+
if (rel.startsWith("..") || (0, import_path9.isAbsolute)(rel)) {
|
|
20081
20115
|
throw new Error(`workingDirectory '${workingDirectory}' is outside the trusted worktree root '${trustedRoot}'.`);
|
|
20082
20116
|
}
|
|
20083
20117
|
return trustedRoot;
|
|
@@ -20085,17 +20119,17 @@ function validateWorkingDirectory(workingDirectory) {
|
|
|
20085
20119
|
|
|
20086
20120
|
// src/lib/security-config.ts
|
|
20087
20121
|
var import_fs9 = require("fs");
|
|
20088
|
-
var
|
|
20122
|
+
var import_path11 = require("path");
|
|
20089
20123
|
|
|
20090
20124
|
// src/utils/paths.ts
|
|
20091
|
-
var
|
|
20125
|
+
var import_path10 = require("path");
|
|
20092
20126
|
var import_fs8 = require("fs");
|
|
20093
|
-
var
|
|
20094
|
-
function
|
|
20127
|
+
var import_os3 = require("os");
|
|
20128
|
+
function getConfigDir() {
|
|
20095
20129
|
if (process.platform === "win32") {
|
|
20096
|
-
return process.env.APPDATA || (0,
|
|
20130
|
+
return process.env.APPDATA || (0, import_path10.join)((0, import_os3.homedir)(), "AppData", "Roaming");
|
|
20097
20131
|
}
|
|
20098
|
-
return process.env.XDG_CONFIG_HOME || (0,
|
|
20132
|
+
return process.env.XDG_CONFIG_HOME || (0, import_path10.join)((0, import_os3.homedir)(), ".config");
|
|
20099
20133
|
}
|
|
20100
20134
|
var STALE_THRESHOLD_MS = 24 * 60 * 60 * 1e3;
|
|
20101
20135
|
|
|
@@ -20121,8 +20155,8 @@ var STRICT_OVERRIDES = {
|
|
|
20121
20155
|
var cachedConfig = null;
|
|
20122
20156
|
function loadSecurityFromConfigFiles() {
|
|
20123
20157
|
const paths = [
|
|
20124
|
-
(0,
|
|
20125
|
-
(0,
|
|
20158
|
+
(0, import_path11.join)(process.cwd(), ".claude", "omc.jsonc"),
|
|
20159
|
+
(0, import_path11.join)(getConfigDir(), "claude-omc", "config.jsonc")
|
|
20126
20160
|
];
|
|
20127
20161
|
for (const configPath of paths) {
|
|
20128
20162
|
if (!(0, import_fs9.existsSync)(configPath)) continue;
|
|
@@ -20198,15 +20232,15 @@ async function getSgModule() {
|
|
|
20198
20232
|
return sgModule;
|
|
20199
20233
|
}
|
|
20200
20234
|
function validateToolPath(inputPath) {
|
|
20201
|
-
const resolved = (0,
|
|
20235
|
+
const resolved = (0, import_path12.resolve)(inputPath);
|
|
20202
20236
|
if (!isToolPathRestricted()) {
|
|
20203
20237
|
return resolved;
|
|
20204
20238
|
}
|
|
20205
20239
|
const projectRoot = getWorktreeRoot() || process.cwd();
|
|
20206
|
-
const normalizedRoot = (0,
|
|
20207
|
-
const normalizedPath = (0,
|
|
20208
|
-
const rel = (0,
|
|
20209
|
-
if (rel.startsWith("..") || (0,
|
|
20240
|
+
const normalizedRoot = (0, import_path12.normalize)(projectRoot);
|
|
20241
|
+
const normalizedPath = (0, import_path12.normalize)(resolved);
|
|
20242
|
+
const rel = (0, import_path12.relative)(normalizedRoot, normalizedPath);
|
|
20243
|
+
if (rel.startsWith("..") || (0, import_path12.isAbsolute)(rel)) {
|
|
20210
20244
|
throw new Error(
|
|
20211
20245
|
`Path restricted: '${inputPath}' is outside the project root '${projectRoot}'. Disable via security.restrictToolPaths in .claude/omc.jsonc or unset OMC_SECURITY.`
|
|
20212
20246
|
);
|
|
@@ -20298,7 +20332,7 @@ function getFilesForLanguage(dirPath, language, maxFiles = 1e3) {
|
|
|
20298
20332
|
const entries = (0, import_fs10.readdirSync)(dir, { withFileTypes: true });
|
|
20299
20333
|
for (const entry of entries) {
|
|
20300
20334
|
if (files.length >= maxFiles) return;
|
|
20301
|
-
const fullPath = (0,
|
|
20335
|
+
const fullPath = (0, import_path12.join)(dir, entry.name);
|
|
20302
20336
|
if (entry.isDirectory()) {
|
|
20303
20337
|
if (![
|
|
20304
20338
|
"node_modules",
|
|
@@ -20312,7 +20346,7 @@ function getFilesForLanguage(dirPath, language, maxFiles = 1e3) {
|
|
|
20312
20346
|
walk(fullPath);
|
|
20313
20347
|
}
|
|
20314
20348
|
} else if (entry.isFile()) {
|
|
20315
|
-
const ext = (0,
|
|
20349
|
+
const ext = (0, import_path12.extname)(entry.name).toLowerCase();
|
|
20316
20350
|
if (extensions.includes(ext)) {
|
|
20317
20351
|
files.push(fullPath);
|
|
20318
20352
|
}
|
|
@@ -20321,7 +20355,7 @@ function getFilesForLanguage(dirPath, language, maxFiles = 1e3) {
|
|
|
20321
20355
|
} catch {
|
|
20322
20356
|
}
|
|
20323
20357
|
}
|
|
20324
|
-
const resolvedPath = (0,
|
|
20358
|
+
const resolvedPath = (0, import_path12.resolve)(dirPath);
|
|
20325
20359
|
let stat;
|
|
20326
20360
|
try {
|
|
20327
20361
|
stat = (0, import_fs10.statSync)(resolvedPath);
|
|
@@ -22317,7 +22351,7 @@ var pythonReplTool = {
|
|
|
22317
22351
|
|
|
22318
22352
|
// src/tools/state-tools.ts
|
|
22319
22353
|
var import_fs14 = require("fs");
|
|
22320
|
-
var
|
|
22354
|
+
var import_path15 = require("path");
|
|
22321
22355
|
|
|
22322
22356
|
// src/lib/payload-limits.ts
|
|
22323
22357
|
var DEFAULT_PAYLOAD_LIMITS = {
|
|
@@ -22378,7 +22412,7 @@ function validatePayload(payload, limits = {}) {
|
|
|
22378
22412
|
|
|
22379
22413
|
// src/lib/mode-state-io.ts
|
|
22380
22414
|
var import_fs12 = require("fs");
|
|
22381
|
-
var
|
|
22415
|
+
var import_path13 = require("path");
|
|
22382
22416
|
function getStateSessionOwner(state) {
|
|
22383
22417
|
if (!state || typeof state !== "object") {
|
|
22384
22418
|
return void 0;
|
|
@@ -22421,7 +22455,7 @@ function findSessionOwnedStateFiles(mode, sessionId, directory) {
|
|
|
22421
22455
|
|
|
22422
22456
|
// src/hooks/mode-registry/index.ts
|
|
22423
22457
|
var import_fs13 = require("fs");
|
|
22424
|
-
var
|
|
22458
|
+
var import_path14 = require("path");
|
|
22425
22459
|
|
|
22426
22460
|
// src/lib/mode-names.ts
|
|
22427
22461
|
var MODE_NAMES = {
|
|
@@ -22498,19 +22532,19 @@ var MODE_CONFIGS = {
|
|
|
22498
22532
|
};
|
|
22499
22533
|
var EXCLUSIVE_MODES = [MODE_NAMES.AUTOPILOT];
|
|
22500
22534
|
function getStateDir(cwd) {
|
|
22501
|
-
return (0,
|
|
22535
|
+
return (0, import_path14.join)(getOmcRoot(cwd), "state");
|
|
22502
22536
|
}
|
|
22503
22537
|
function getStateFilePath(cwd, mode, sessionId) {
|
|
22504
22538
|
const config2 = MODE_CONFIGS[mode];
|
|
22505
22539
|
if (sessionId) {
|
|
22506
22540
|
return resolveSessionStatePath(mode, sessionId, cwd);
|
|
22507
22541
|
}
|
|
22508
|
-
return (0,
|
|
22542
|
+
return (0, import_path14.join)(getStateDir(cwd), config2.stateFile);
|
|
22509
22543
|
}
|
|
22510
22544
|
function getMarkerFilePath(cwd, mode) {
|
|
22511
22545
|
const config2 = MODE_CONFIGS[mode];
|
|
22512
22546
|
if (!config2.markerFile) return null;
|
|
22513
|
-
return (0,
|
|
22547
|
+
return (0, import_path14.join)(getStateDir(cwd), config2.markerFile);
|
|
22514
22548
|
}
|
|
22515
22549
|
function isJsonModeActive(cwd, mode, sessionId) {
|
|
22516
22550
|
const config2 = MODE_CONFIGS[mode];
|
|
@@ -22699,7 +22733,7 @@ function readTeamNamesFromStateFile(statePath) {
|
|
|
22699
22733
|
}
|
|
22700
22734
|
}
|
|
22701
22735
|
function pruneMissionBoardTeams(root, teamNames) {
|
|
22702
|
-
const missionStatePath = (0,
|
|
22736
|
+
const missionStatePath = (0, import_path15.join)(getOmcRoot(root), "state", "mission-state.json");
|
|
22703
22737
|
if (!(0, import_fs14.existsSync)(missionStatePath)) return 0;
|
|
22704
22738
|
try {
|
|
22705
22739
|
const parsed = JSON.parse((0, import_fs14.readFileSync)(missionStatePath, "utf-8"));
|
|
@@ -22726,7 +22760,7 @@ function pruneMissionBoardTeams(root, teamNames) {
|
|
|
22726
22760
|
}
|
|
22727
22761
|
}
|
|
22728
22762
|
function cleanupTeamRuntimeState(root, teamNames) {
|
|
22729
|
-
const teamStateRoot = (0,
|
|
22763
|
+
const teamStateRoot = (0, import_path15.join)(getOmcRoot(root), "state", "team");
|
|
22730
22764
|
if (!(0, import_fs14.existsSync)(teamStateRoot)) return 0;
|
|
22731
22765
|
const shouldRemoveAll = teamNames == null;
|
|
22732
22766
|
let removed = 0;
|
|
@@ -22741,7 +22775,7 @@ function cleanupTeamRuntimeState(root, teamNames) {
|
|
|
22741
22775
|
for (const teamName of teamNames ?? []) {
|
|
22742
22776
|
if (!teamName) continue;
|
|
22743
22777
|
try {
|
|
22744
|
-
(0, import_fs14.rmSync)((0,
|
|
22778
|
+
(0, import_fs14.rmSync)((0, import_path15.join)(teamStateRoot, teamName), { recursive: true, force: true });
|
|
22745
22779
|
removed += 1;
|
|
22746
22780
|
} catch {
|
|
22747
22781
|
}
|
|
@@ -22758,7 +22792,7 @@ function getLegacyStateFileCandidates(mode, root) {
|
|
|
22758
22792
|
const normalizedName = mode.endsWith("-state") ? mode : `${mode}-state`;
|
|
22759
22793
|
const candidates = [
|
|
22760
22794
|
getStatePath(mode, root),
|
|
22761
|
-
(0,
|
|
22795
|
+
(0, import_path15.join)(getOmcRoot(root), `${normalizedName}.json`)
|
|
22762
22796
|
];
|
|
22763
22797
|
return [...new Set(candidates)];
|
|
22764
22798
|
}
|
|
@@ -23148,7 +23182,7 @@ var stateClearTool = {
|
|
|
23148
23182
|
mode,
|
|
23149
23183
|
source: "state_clear"
|
|
23150
23184
|
};
|
|
23151
|
-
const legacySignalPath = (0,
|
|
23185
|
+
const legacySignalPath = (0, import_path15.join)(root, "state", "cancel-signal-state.json");
|
|
23152
23186
|
try {
|
|
23153
23187
|
atomicWriteJsonSync(legacySignalPath, cancelSignalPayload);
|
|
23154
23188
|
} catch {
|
|
@@ -23536,7 +23570,7 @@ var stateTools = [
|
|
|
23536
23570
|
|
|
23537
23571
|
// src/hooks/notepad/index.ts
|
|
23538
23572
|
var import_fs16 = require("fs");
|
|
23539
|
-
var
|
|
23573
|
+
var import_path16 = require("path");
|
|
23540
23574
|
|
|
23541
23575
|
// src/lib/file-lock.ts
|
|
23542
23576
|
var import_fs15 = require("fs");
|
|
@@ -23707,7 +23741,7 @@ function getSectionRegexSet(header) {
|
|
|
23707
23741
|
return SECTION_REGEXES[header] ?? createSectionRegexSet(header);
|
|
23708
23742
|
}
|
|
23709
23743
|
function getNotepadPath(directory) {
|
|
23710
|
-
return (0,
|
|
23744
|
+
return (0, import_path16.join)(getOmcRoot(directory), NOTEPAD_FILENAME);
|
|
23711
23745
|
}
|
|
23712
23746
|
function initNotepad(directory) {
|
|
23713
23747
|
const omcDir = getOmcRoot(directory);
|
|
@@ -24231,7 +24265,7 @@ var notepadTools = [
|
|
|
24231
24265
|
];
|
|
24232
24266
|
|
|
24233
24267
|
// src/hooks/project-memory/index.ts
|
|
24234
|
-
var
|
|
24268
|
+
var import_path24 = __toESM(require("path"), 1);
|
|
24235
24269
|
|
|
24236
24270
|
// src/features/context-injector/collector.ts
|
|
24237
24271
|
var PRIORITY_ORDER = {
|
|
@@ -24342,17 +24376,17 @@ var contextCollector = new ContextCollector();
|
|
|
24342
24376
|
|
|
24343
24377
|
// src/hooks/rules-injector/finder.ts
|
|
24344
24378
|
var import_fs17 = require("fs");
|
|
24345
|
-
var
|
|
24379
|
+
var import_path18 = require("path");
|
|
24346
24380
|
|
|
24347
24381
|
// src/hooks/rules-injector/constants.ts
|
|
24348
|
-
var
|
|
24349
|
-
var
|
|
24350
|
-
var OMC_STORAGE_DIR = (0,
|
|
24351
|
-
var RULES_INJECTOR_STORAGE = (0,
|
|
24382
|
+
var import_path17 = require("path");
|
|
24383
|
+
var import_os4 = require("os");
|
|
24384
|
+
var OMC_STORAGE_DIR = (0, import_path17.join)((0, import_os4.homedir)(), ".omc");
|
|
24385
|
+
var RULES_INJECTOR_STORAGE = (0, import_path17.join)(OMC_STORAGE_DIR, "rules-injector");
|
|
24352
24386
|
|
|
24353
24387
|
// src/hooks/project-memory/storage.ts
|
|
24354
24388
|
var import_promises = __toESM(require("fs/promises"), 1);
|
|
24355
|
-
var
|
|
24389
|
+
var import_path19 = __toESM(require("path"), 1);
|
|
24356
24390
|
|
|
24357
24391
|
// src/hooks/project-memory/constants.ts
|
|
24358
24392
|
var CACHE_EXPIRY_MS = 24 * 60 * 60 * 1e3;
|
|
@@ -24376,7 +24410,7 @@ async function loadProjectMemory(projectRoot) {
|
|
|
24376
24410
|
}
|
|
24377
24411
|
async function saveProjectMemory(projectRoot, memory) {
|
|
24378
24412
|
const memoryPath = getMemoryPath(projectRoot);
|
|
24379
|
-
const omcDir =
|
|
24413
|
+
const omcDir = import_path19.default.dirname(memoryPath);
|
|
24380
24414
|
try {
|
|
24381
24415
|
await import_promises.default.mkdir(omcDir, { recursive: true });
|
|
24382
24416
|
await atomicWriteJson(memoryPath, memory);
|
|
@@ -24392,17 +24426,17 @@ async function withProjectMemoryLock(projectRoot, fn) {
|
|
|
24392
24426
|
|
|
24393
24427
|
// src/hooks/project-memory/detector.ts
|
|
24394
24428
|
var import_promises3 = __toESM(require("fs/promises"), 1);
|
|
24395
|
-
var
|
|
24429
|
+
var import_path21 = __toESM(require("path"), 1);
|
|
24396
24430
|
|
|
24397
24431
|
// src/hooks/project-memory/directory-mapper.ts
|
|
24398
24432
|
var import_promises2 = __toESM(require("fs/promises"), 1);
|
|
24399
|
-
var
|
|
24433
|
+
var import_path20 = __toESM(require("path"), 1);
|
|
24400
24434
|
|
|
24401
24435
|
// src/hooks/project-memory/formatter.ts
|
|
24402
|
-
var
|
|
24436
|
+
var import_path23 = __toESM(require("path"), 1);
|
|
24403
24437
|
|
|
24404
24438
|
// src/hooks/project-memory/hot-path-tracker.ts
|
|
24405
|
-
var
|
|
24439
|
+
var import_path22 = __toESM(require("path"), 1);
|
|
24406
24440
|
|
|
24407
24441
|
// src/hooks/project-memory/directive-detector.ts
|
|
24408
24442
|
function addDirective(directives, newDirective) {
|
|
@@ -24784,20 +24818,20 @@ var memoryTools = [
|
|
|
24784
24818
|
|
|
24785
24819
|
// src/tools/trace-tools.ts
|
|
24786
24820
|
var import_fs20 = require("fs");
|
|
24787
|
-
var
|
|
24821
|
+
var import_path27 = require("path");
|
|
24788
24822
|
|
|
24789
24823
|
// src/hooks/subagent-tracker/session-replay.ts
|
|
24790
24824
|
var import_fs18 = require("fs");
|
|
24791
|
-
var
|
|
24825
|
+
var import_path25 = require("path");
|
|
24792
24826
|
var REPLAY_PREFIX = "agent-replay-";
|
|
24793
24827
|
var MAX_REPLAY_SIZE_BYTES = 5 * 1024 * 1024;
|
|
24794
24828
|
function getReplayFilePath(directory, sessionId) {
|
|
24795
|
-
const stateDir = (0,
|
|
24829
|
+
const stateDir = (0, import_path25.join)(getOmcRoot(directory), "state");
|
|
24796
24830
|
if (!(0, import_fs18.existsSync)(stateDir)) {
|
|
24797
24831
|
(0, import_fs18.mkdirSync)(stateDir, { recursive: true });
|
|
24798
24832
|
}
|
|
24799
24833
|
const safeId = sessionId.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
24800
|
-
return (0,
|
|
24834
|
+
return (0, import_path25.join)(stateDir, `${REPLAY_PREFIX}${safeId}.jsonl`);
|
|
24801
24835
|
}
|
|
24802
24836
|
function readReplayEvents(directory, sessionId) {
|
|
24803
24837
|
const filePath = getReplayFilePath(directory, sessionId);
|
|
@@ -24976,14 +25010,10 @@ function getReplaySummary(directory, sessionId) {
|
|
|
24976
25010
|
// src/features/session-history-search/index.ts
|
|
24977
25011
|
var import_child_process10 = require("child_process");
|
|
24978
25012
|
var import_fs19 = require("fs");
|
|
24979
|
-
var
|
|
24980
|
-
var import_path25 = require("path");
|
|
25013
|
+
var import_path26 = require("path");
|
|
24981
25014
|
var import_readline = require("readline");
|
|
24982
25015
|
var DEFAULT_LIMIT = 10;
|
|
24983
25016
|
var DEFAULT_CONTEXT_CHARS = 120;
|
|
24984
|
-
function getClaudeConfigDir() {
|
|
24985
|
-
return process.env.CLAUDE_CONFIG_DIR || (0, import_path25.join)((0, import_os4.homedir)(), ".claude");
|
|
24986
|
-
}
|
|
24987
25017
|
function compactWhitespace(text) {
|
|
24988
25018
|
return text.replace(/\s+/g, " ").trim();
|
|
24989
25019
|
}
|
|
@@ -25021,16 +25051,16 @@ function getMainRepoRoot(projectRoot) {
|
|
|
25021
25051
|
encoding: "utf-8",
|
|
25022
25052
|
stdio: ["pipe", "pipe", "pipe"]
|
|
25023
25053
|
}).trim();
|
|
25024
|
-
const absoluteCommonDir = (0,
|
|
25025
|
-
const mainRepoRoot = (0,
|
|
25054
|
+
const absoluteCommonDir = (0, import_path26.resolve)(projectRoot, gitCommonDir);
|
|
25055
|
+
const mainRepoRoot = (0, import_path26.dirname)(absoluteCommonDir);
|
|
25026
25056
|
return mainRepoRoot === projectRoot ? null : mainRepoRoot;
|
|
25027
25057
|
} catch {
|
|
25028
25058
|
return null;
|
|
25029
25059
|
}
|
|
25030
25060
|
}
|
|
25031
25061
|
function getClaudeWorktreeParent(projectRoot) {
|
|
25032
|
-
const marker = `${(0,
|
|
25033
|
-
const normalizedRoot = (0,
|
|
25062
|
+
const marker = `${(0, import_path26.normalize)("/.claude/worktrees/")}`;
|
|
25063
|
+
const normalizedRoot = (0, import_path26.normalize)(projectRoot);
|
|
25034
25064
|
const idx = normalizedRoot.indexOf(marker);
|
|
25035
25065
|
if (idx === -1) return null;
|
|
25036
25066
|
return normalizedRoot.slice(0, idx) || null;
|
|
@@ -25050,7 +25080,7 @@ function listJsonlFiles(rootDir) {
|
|
|
25050
25080
|
continue;
|
|
25051
25081
|
}
|
|
25052
25082
|
for (const entry of entries) {
|
|
25053
|
-
const fullPath = (0,
|
|
25083
|
+
const fullPath = (0, import_path26.join)(current, entry.name);
|
|
25054
25084
|
if (entry.isDirectory()) {
|
|
25055
25085
|
stack.push(fullPath);
|
|
25056
25086
|
continue;
|
|
@@ -25084,21 +25114,21 @@ function buildCurrentProjectTargets(projectRoot) {
|
|
|
25084
25114
|
if (claudeWorktreeParent) projectRoots.add(claudeWorktreeParent);
|
|
25085
25115
|
const targets = [];
|
|
25086
25116
|
for (const root of projectRoots) {
|
|
25087
|
-
const encodedDir = (0,
|
|
25117
|
+
const encodedDir = (0, import_path26.join)(claudeDir, "projects", encodeProjectPath(root));
|
|
25088
25118
|
for (const filePath of listJsonlFiles(encodedDir)) {
|
|
25089
25119
|
targets.push({ filePath, sourceType: "project-transcript" });
|
|
25090
25120
|
}
|
|
25091
25121
|
}
|
|
25092
|
-
const legacyTranscriptsDir = (0,
|
|
25122
|
+
const legacyTranscriptsDir = (0, import_path26.join)(claudeDir, "transcripts");
|
|
25093
25123
|
for (const filePath of listJsonlFiles(legacyTranscriptsDir)) {
|
|
25094
25124
|
targets.push({ filePath, sourceType: "legacy-transcript" });
|
|
25095
25125
|
}
|
|
25096
25126
|
const omcRoot = getOmcRoot(projectRoot);
|
|
25097
|
-
const sessionSummariesDir = (0,
|
|
25127
|
+
const sessionSummariesDir = (0, import_path26.join)(omcRoot, "sessions");
|
|
25098
25128
|
for (const filePath of listJsonlFiles(sessionSummariesDir)) {
|
|
25099
25129
|
targets.push({ filePath, sourceType: "omc-session-summary" });
|
|
25100
25130
|
}
|
|
25101
|
-
const replayDir = (0,
|
|
25131
|
+
const replayDir = (0, import_path26.join)(omcRoot, "state");
|
|
25102
25132
|
if ((0, import_fs19.existsSync)(replayDir)) {
|
|
25103
25133
|
for (const filePath of listJsonlFiles(replayDir)) {
|
|
25104
25134
|
if (filePath.includes("agent-replay-") && filePath.endsWith(".jsonl")) {
|
|
@@ -25111,10 +25141,10 @@ function buildCurrentProjectTargets(projectRoot) {
|
|
|
25111
25141
|
function buildAllProjectTargets() {
|
|
25112
25142
|
const claudeDir = getClaudeConfigDir();
|
|
25113
25143
|
const targets = [];
|
|
25114
|
-
for (const filePath of listJsonlFiles((0,
|
|
25144
|
+
for (const filePath of listJsonlFiles((0, import_path26.join)(claudeDir, "projects"))) {
|
|
25115
25145
|
targets.push({ filePath, sourceType: "project-transcript" });
|
|
25116
25146
|
}
|
|
25117
|
-
for (const filePath of listJsonlFiles((0,
|
|
25147
|
+
for (const filePath of listJsonlFiles((0, import_path26.join)(claudeDir, "transcripts"))) {
|
|
25118
25148
|
targets.push({ filePath, sourceType: "legacy-transcript" });
|
|
25119
25149
|
}
|
|
25120
25150
|
return uniqueSortedTargets(targets);
|
|
@@ -25123,9 +25153,9 @@ function isWithinProject(projectPath, projectRoots) {
|
|
|
25123
25153
|
if (!projectPath) {
|
|
25124
25154
|
return false;
|
|
25125
25155
|
}
|
|
25126
|
-
const normalizedProjectPath = (0,
|
|
25156
|
+
const normalizedProjectPath = (0, import_path26.normalize)((0, import_path26.resolve)(projectPath));
|
|
25127
25157
|
return projectRoots.some((root) => {
|
|
25128
|
-
const normalizedRoot = (0,
|
|
25158
|
+
const normalizedRoot = (0, import_path26.normalize)((0, import_path26.resolve)(root));
|
|
25129
25159
|
return normalizedProjectPath === normalizedRoot || normalizedProjectPath.startsWith(`${normalizedRoot}/`);
|
|
25130
25160
|
});
|
|
25131
25161
|
}
|
|
@@ -25440,12 +25470,12 @@ var sessionSearchTool = {
|
|
|
25440
25470
|
// src/tools/trace-tools.ts
|
|
25441
25471
|
var REPLAY_PREFIX2 = "agent-replay-";
|
|
25442
25472
|
function findLatestSessionId(directory) {
|
|
25443
|
-
const stateDir = (0,
|
|
25473
|
+
const stateDir = (0, import_path27.join)(directory, ".omc", "state");
|
|
25444
25474
|
try {
|
|
25445
25475
|
const files = (0, import_fs20.readdirSync)(stateDir).filter((f) => f.startsWith(REPLAY_PREFIX2) && f.endsWith(".jsonl")).map((f) => ({
|
|
25446
25476
|
name: f,
|
|
25447
25477
|
sessionId: f.slice(REPLAY_PREFIX2.length, -".jsonl".length),
|
|
25448
|
-
mtime: (0, import_fs20.statSync)((0,
|
|
25478
|
+
mtime: (0, import_fs20.statSync)((0, import_path27.join)(stateDir, f)).mtimeMs
|
|
25449
25479
|
})).sort((a, b) => b.mtime - a.mtime);
|
|
25450
25480
|
return files.length > 0 ? files[0].sessionId : null;
|
|
25451
25481
|
} catch {
|