oh-my-opencode 4.8.0 → 4.9.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/dist/agents/prometheus/system-prompt.d.ts +1 -1
- package/dist/agents/sisyphus/claude-fable-5.d.ts +19 -0
- package/dist/agents/sisyphus/claude-opus-4-7.d.ts +3 -1
- package/dist/agents/sisyphus/claude-opus-4-8.d.ts +19 -0
- package/dist/agents/sisyphus/index.d.ts +4 -0
- package/dist/agents/types.d.ts +2 -2
- package/dist/cli/doctor/checks/codex.d.ts +1 -0
- package/dist/cli/doctor/checks/tools-gh.d.ts +8 -1
- package/dist/cli/doctor/index.d.ts +1 -0
- package/dist/cli/doctor/types.d.ts +2 -0
- package/dist/cli/index.js +1922 -785
- package/dist/cli/install-codex/codex-config-permissions.d.ts +1 -1
- package/dist/cli/install-codex/codex-config-plugins.d.ts +1 -0
- package/dist/cli/install-codex/codex-config-toml.d.ts +1 -0
- package/dist/cli/install-codex/codex-installer-bin-dir.d.ts +8 -0
- package/dist/cli/install-codex/codex-multi-agent-v2-config.d.ts +11 -0
- package/dist/cli/install-codex/install-codex.d.ts +1 -8
- package/dist/cli/install-codex/lsp-daemon-reaper.d.ts +5 -0
- package/dist/cli/run/runnable-agent-resolver.d.ts +11 -0
- package/dist/cli/sparkshell-condense.d.ts +10 -0
- package/dist/cli/sparkshell-parse.d.ts +3 -0
- package/dist/cli/sparkshell-session-context.d.ts +20 -0
- package/dist/cli/sparkshell-spark.d.ts +23 -0
- package/dist/cli/sparkshell.d.ts +8 -1
- package/dist/cli-node/index.js +92552 -0
- package/dist/config/schema/agent-names.d.ts +2 -0
- package/dist/config/schema/hooks.d.ts +0 -2
- package/dist/config/schema/keyword-detector.d.ts +0 -6
- package/dist/config/schema/oh-my-opencode-config.d.ts +2 -4
- package/dist/create-hooks.d.ts +0 -2
- package/dist/features/background-agent/parent-wake-dedupe.d.ts +2 -0
- package/dist/features/background-agent/parent-wake-flush-runner.d.ts +2 -0
- package/dist/features/background-agent/parent-wake-prompt-dispatch.d.ts +1 -0
- package/dist/features/background-agent/parent-wake-session-history.d.ts +4 -0
- package/dist/features/background-agent/parent-wake-session-inspector.d.ts +1 -0
- package/dist/features/builtin-commands/templates/handoff.d.ts +1 -1
- package/dist/features/builtin-skills/index.d.ts +1 -1
- package/dist/features/builtin-skills/skills.d.ts +4 -0
- package/dist/features/opencode-runtime-skills/source-server.d.ts +16 -1
- package/dist/features/opencode-skill-loader/skill-definition-record.d.ts +2 -0
- package/dist/features/team-mode/tools/lifecycle-test-fixture.d.ts +2 -0
- package/dist/features/team-mode/types.d.ts +1 -0
- package/dist/features/tmux-subagent/failed-readiness-cache.d.ts +28 -0
- package/dist/features/tmux-subagent/manager.d.ts +1 -9
- package/dist/features/tmux-subagent/resolve-server-url.d.ts +3 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +1 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/keyword-detector/constants.d.ts +0 -4
- package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +1 -1
- package/dist/index.js +9001 -1795
- package/dist/oh-my-opencode.schema.json +2 -4
- package/dist/plugin/chat-params.d.ts +1 -8
- package/dist/plugin/hooks/create-core-hooks.d.ts +0 -2
- package/dist/plugin/hooks/create-session-hooks.d.ts +0 -2
- package/dist/plugin/hooks/create-transform-hooks.d.ts +1 -2
- package/dist/plugin/messages-transform.d.ts +0 -1
- package/dist/shared/model-availability.d.ts +10 -2
- package/package.json +25 -18
- package/packages/ast-grep-mcp/dist/cli.js +2 -10
- package/packages/git-bash-mcp/dist/cli.js +11 -4
- package/packages/lsp-daemon/dist/cli.d.ts +2 -0
- package/packages/lsp-daemon/dist/cli.js +3711 -0
- package/packages/lsp-daemon/dist/daemon-client.d.ts +19 -0
- package/packages/lsp-daemon/dist/daemon-client.js +114 -0
- package/packages/lsp-daemon/dist/daemon-server.d.ts +12 -0
- package/packages/lsp-daemon/dist/daemon-server.js +106 -0
- package/packages/lsp-daemon/dist/ensure-daemon.d.ts +21 -0
- package/packages/lsp-daemon/dist/ensure-daemon.js +97 -0
- package/packages/lsp-daemon/dist/index.d.ts +5 -0
- package/packages/lsp-daemon/dist/index.js +3573 -0
- package/packages/lsp-daemon/dist/lock.d.ts +7 -0
- package/packages/lsp-daemon/dist/lock.js +61 -0
- package/packages/lsp-daemon/dist/package.json +6 -0
- package/packages/lsp-daemon/dist/paths.d.ts +11 -0
- package/packages/lsp-daemon/dist/paths.js +49 -0
- package/packages/lsp-daemon/dist/proxy.d.ts +10 -0
- package/packages/lsp-daemon/dist/proxy.js +61 -0
- package/packages/lsp-daemon/dist/request-routing.d.ts +9 -0
- package/packages/lsp-daemon/dist/request-routing.js +44 -0
- package/packages/lsp-daemon/dist/run-daemon.d.ts +1 -0
- package/packages/lsp-daemon/dist/run-daemon.js +11 -0
- package/packages/lsp-daemon/dist/socket-jsonrpc.d.ts +5 -0
- package/packages/lsp-daemon/dist/socket-jsonrpc.js +25 -0
- package/packages/lsp-daemon/package.json +38 -0
- package/packages/lsp-tools-mcp/dist/cli.js +0 -0
- package/packages/lsp-tools-mcp/dist/lsp/client-wrapper.js +40 -17
- package/packages/lsp-tools-mcp/dist/lsp/client.js +11 -9
- package/packages/lsp-tools-mcp/dist/lsp/config-loader.js +5 -5
- package/packages/lsp-tools-mcp/dist/lsp/directory-diagnostics.js +5 -3
- package/packages/lsp-tools-mcp/dist/lsp/effective-extension.d.ts +1 -0
- package/packages/lsp-tools-mcp/dist/lsp/effective-extension.js +8 -0
- package/packages/lsp-tools-mcp/dist/lsp/infer-extension.js +3 -2
- package/packages/lsp-tools-mcp/dist/lsp/language-mappings.js +1 -0
- package/packages/lsp-tools-mcp/dist/lsp/server-definitions.js +12 -0
- package/packages/lsp-tools-mcp/dist/lsp/server-install-state.d.ts +12 -0
- package/packages/lsp-tools-mcp/dist/lsp/server-install-state.js +51 -0
- package/packages/lsp-tools-mcp/dist/lsp/workspace-edit.js +2 -1
- package/packages/lsp-tools-mcp/dist/request-context.d.ts +7 -0
- package/packages/lsp-tools-mcp/dist/request-context.js +14 -0
- package/packages/lsp-tools-mcp/dist/tools.js +44 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +46 -33
- package/packages/omo-codex/plugin/.mcp.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/dist/apply-patch.d.ts +7 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/apply-patch.js +173 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/cli.js +10 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/codex-hook.d.ts +22 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/codex-hook.js +165 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/core-values.d.ts +1 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/core-values.js +1 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/core.d.ts +5 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/core.js +4 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/hook-input.d.ts +6 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/hook-input.js +10 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/record.d.ts +2 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/record.js +11 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/request-extractor.d.ts +3 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/request-extractor.js +104 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/runner.d.ts +26 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/runner.js +144 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/types.d.ts +43 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/types.js +1 -0
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/git-bash/dist/cli.js +29 -0
- package/packages/omo-codex/plugin/components/git-bash/dist/codex-hook.d.ts +28 -0
- package/packages/omo-codex/plugin/components/git-bash/dist/codex-hook.js +137 -0
- package/packages/omo-codex/plugin/components/git-bash/dist/index.d.ts +1 -0
- package/packages/omo-codex/plugin/components/git-bash/dist/index.js +1 -0
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +5 -2
- package/packages/omo-codex/plugin/components/lsp/.mcp.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +42 -0
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook-cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook-cli.js +40 -0
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.d.ts +16 -0
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.js +180 -0
- package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.d.ts +12 -0
- package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.js +95 -0
- package/packages/omo-codex/plugin/components/lsp/dist/mutated-file-paths.d.ts +6 -0
- package/packages/omo-codex/plugin/components/lsp/dist/mutated-file-paths.js +79 -0
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +7 -7
- package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-daemon.mjs +68 -0
- package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-tools.mjs +45 -22
- package/packages/omo-codex/plugin/components/lsp/src/cli.ts +1 -1
- package/packages/omo-codex/plugin/components/lsp/src/codex-hook-cli.ts +1 -1
- package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +6 -2
- package/packages/omo-codex/plugin/components/lsp/src/lsp-session-state.ts +4 -0
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook-unavailable.test.ts +68 -0
- package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +8 -20
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +69 -96
- package/packages/omo-codex/plugin/components/rules/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/rules/dist/cli.js +118 -0
- package/packages/omo-codex/plugin/components/rules/dist/codex-hook-options.d.ts +5 -0
- package/packages/omo-codex/plugin/components/rules/dist/codex-hook-options.js +1 -0
- package/packages/omo-codex/plugin/components/rules/dist/codex-hook.d.ts +47 -0
- package/packages/omo-codex/plugin/components/rules/dist/codex-hook.js +127 -0
- package/packages/omo-codex/plugin/components/rules/dist/config.d.ts +2 -0
- package/packages/omo-codex/plugin/components/rules/dist/config.js +100 -0
- package/packages/omo-codex/plugin/components/rules/dist/context-pressure.d.ts +2 -0
- package/packages/omo-codex/plugin/components/rules/dist/context-pressure.js +26 -0
- package/packages/omo-codex/plugin/components/rules/dist/debug-log.d.ts +8 -0
- package/packages/omo-codex/plugin/components/rules/dist/debug-log.js +36 -0
- package/packages/omo-codex/plugin/components/rules/dist/dynamic-target-fingerprints.d.ts +7 -0
- package/packages/omo-codex/plugin/components/rules/dist/dynamic-target-fingerprints.js +65 -0
- package/packages/omo-codex/plugin/components/rules/dist/event-budget.d.ts +3 -0
- package/packages/omo-codex/plugin/components/rules/dist/event-budget.js +14 -0
- package/packages/omo-codex/plugin/components/rules/dist/hook-output.d.ts +2 -0
- package/packages/omo-codex/plugin/components/rules/dist/hook-output.js +24 -0
- package/packages/omo-codex/plugin/components/rules/dist/path-utils.d.ts +4 -0
- package/packages/omo-codex/plugin/components/rules/dist/path-utils.js +24 -0
- package/packages/omo-codex/plugin/components/rules/dist/persistent-cache.d.ts +13 -0
- package/packages/omo-codex/plugin/components/rules/dist/persistent-cache.js +172 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-budget.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-budget.js +74 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-claim.d.ts +4 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-claim.js +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-directive.d.ts +1 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-directive.js +32 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-state.d.ts +13 -0
- package/packages/omo-codex/plugin/components/rules/dist/post-compact-state.js +29 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/cache.d.ts +9 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/cache.js +51 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/constants.d.ts +70 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/constants.js +101 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-cache.d.ts +5 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-cache.js +60 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-loader.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-loader.js +61 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-loader.d.ts +7 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-loader.js +60 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-paths.d.ts +11 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-paths.js +75 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-static-loader.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-static-loader.js +29 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-types.d.ts +44 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine-types.js +1 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine.d.ts +5 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/engine.js +85 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/errors.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/errors.js +12 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-cache.d.ts +14 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-cache.js +51 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-paths.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-paths.js +33 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-sources.d.ts +5 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder-sources.js +40 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder.d.ts +28 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/finder.js +146 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/formatter.d.ts +7 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/formatter.js +112 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/matcher.d.ts +18 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/matcher.js +93 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/ordering.d.ts +3 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/ordering.js +27 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser-frontmatter.d.ts +7 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser-frontmatter.js +30 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser-yaml.d.ts +2 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser-yaml.js +237 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser.d.ts +3 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/parser.js +31 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/plugin-root.d.ts +1 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/plugin-root.js +48 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/project-root.d.ts +1 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/project-root.js +23 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/scanner.d.ts +14 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/scanner.js +111 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/sources.d.ts +3 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/sources.js +9 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/truncator.d.ts +18 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/truncator.js +59 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/types.d.ts +126 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules/types.js +8 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules-engine-factory.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/rules-engine-factory.js +20 -0
- package/packages/omo-codex/plugin/components/rules/dist/session-state-lock.d.ts +3 -0
- package/packages/omo-codex/plugin/components/rules/dist/session-state-lock.js +41 -0
- package/packages/omo-codex/plugin/components/rules/dist/sparkshell-awareness.d.ts +10 -0
- package/packages/omo-codex/plugin/components/rules/dist/sparkshell-awareness.js +90 -0
- package/packages/omo-codex/plugin/components/rules/dist/static-injection.d.ts +3 -0
- package/packages/omo-codex/plugin/components/rules/dist/static-injection.js +128 -0
- package/packages/omo-codex/plugin/components/rules/dist/tool-paths.d.ts +6 -0
- package/packages/omo-codex/plugin/components/rules/dist/tool-paths.js +168 -0
- package/packages/omo-codex/plugin/components/rules/dist/transcript-rule-filter.d.ts +4 -0
- package/packages/omo-codex/plugin/components/rules/dist/transcript-rule-filter.js +49 -0
- package/packages/omo-codex/plugin/components/rules/dist/transcript-search.d.ts +4 -0
- package/packages/omo-codex/plugin/components/rules/dist/transcript-search.js +91 -0
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/src/codex-hook.ts +4 -2
- package/packages/omo-codex/plugin/components/rules/src/config.ts +13 -0
- package/packages/omo-codex/plugin/components/rules/src/event-budget.ts +17 -0
- package/packages/omo-codex/plugin/components/rules/src/persistent-cache.ts +4 -1
- package/packages/omo-codex/plugin/components/rules/src/post-compact-directive.ts +39 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/constants.ts +16 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/engine.ts +8 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/formatter.ts +7 -8
- package/packages/omo-codex/plugin/components/rules/src/rules/truncator.ts +17 -0
- package/packages/omo-codex/plugin/components/rules/src/rules/types.ts +4 -0
- package/packages/omo-codex/plugin/components/rules/src/sparkshell-awareness.ts +53 -4
- package/packages/omo-codex/plugin/components/rules/src/static-injection.ts +127 -7
- package/packages/omo-codex/plugin/components/rules/src/transcript-rule-filter.ts +9 -1
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +4 -2
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-budget.test.ts +7 -2
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-context.test.ts +9 -9
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-dedup.test.ts +10 -4
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-directive.test.ts +241 -0
- package/packages/omo-codex/plugin/components/rules/test/event-budget.test.ts +168 -0
- package/packages/omo-codex/plugin/components/rules/test/formatter.test.ts +20 -0
- package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +4 -0
- package/packages/omo-codex/plugin/components/rules/test/sparkshell-awareness.test.ts +86 -3
- package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +15 -15
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/boulder-reader.d.ts +16 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/boulder-reader.js +146 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +49 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/codex-hook.d.ts +2 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/codex-hook.js +80 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/directive.d.ts +1 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/directive.js +2 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/index.d.ts +5 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/index.js +3 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/types.d.ts +20 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/types.js +1 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +24 -2
- package/packages/omo-codex/plugin/components/telemetry/dist/atomic-write.d.ts +1 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/atomic-write.js +18 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +62 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/codex-hook.d.ts +15 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/codex-hook.js +42 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/data-path.d.ts +10 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/data-path.js +35 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/diagnostics.d.ts +12 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/diagnostics.js +108 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/env-flags.d.ts +4 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/env-flags.js +31 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog-activity-state.d.ts +8 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog-activity-state.js +68 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.d.ts +21 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +133 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/product-identity.d.ts +8 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/product-identity.js +29 -0
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +5 -13
- package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +61 -185
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +122 -117
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +48 -0
- package/packages/omo-codex/plugin/components/ultrawork/dist/codex-hook.d.ts +7 -0
- package/packages/omo-codex/plugin/components/ultrawork/dist/codex-hook.js +122 -0
- package/packages/omo-codex/plugin/components/ultrawork/dist/directive.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ultrawork/dist/directive.js +2 -0
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +20 -11
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +17 -11
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +2 -5
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +0 -71
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.d.ts +16 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +200 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-arg-parser.d.ts +17 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-arg-parser.js +97 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.d.ts +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +183 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +55 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.d.ts +12 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +145 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +39 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.d.ts +13 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +100 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.d.ts +26 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.js +97 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.d.ts +28 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +145 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/command-types.d.ts +34 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/command-types.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.d.ts +16 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.js +41 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +95 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.d.ts +31 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.js +119 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.d.ts +12 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.js +69 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.d.ts +16 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +59 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.d.ts +48 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +119 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +8 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +89 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.js +123 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.d.ts +16 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.js +70 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/runtime.d.ts +10 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/runtime.js +13 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-types.d.ts +63 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-types.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +292 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/types.d.ts +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/types.js +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +14 -14
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +24 -25
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +17 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +95 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +0 -96
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate.test.ts +23 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/skill-contract.test.ts +46 -0
- package/packages/omo-codex/plugin/hooks/hooks.json +16 -16
- package/packages/omo-codex/plugin/package-lock.json +10 -9
- package/packages/omo-codex/plugin/package.json +27 -26
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +64 -15
- package/packages/omo-codex/plugin/scripts/build-bundled-mcp-runtimes.mjs +16 -0
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +104 -0
- package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +23 -6
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +23 -11
- package/packages/omo-codex/plugin/scripts/sync-version.mjs +94 -0
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +9 -9
- package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/SKILL.md +16 -1
- package/packages/omo-codex/plugin/skills/lcx-doctor/SKILL.md +93 -0
- package/packages/omo-codex/plugin/skills/lcx-doctor/agents/openai.yaml +11 -0
- package/packages/omo-codex/plugin/skills/lcx-report-bug/SKILL.md +17 -13
- package/packages/omo-codex/plugin/skills/lsp-setup/SKILL.md +139 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/bash/README.md +60 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/c-cpp/README.md +61 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/csharp/README.md +71 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/dart/README.md +48 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/elixir/README.md +51 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/go/README.md +57 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/haskell/README.md +57 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/java/README.md +57 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/julia/README.md +60 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/kotlin/README.md +59 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/lua/README.md +66 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/php/README.md +62 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/python/README.md +71 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/ruby/README.md +53 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/rust/README.md +59 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/swift/README.md +51 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/terraform/README.md +62 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/typescript/README.md +77 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/yaml/README.md +70 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/references/zig/README.md +49 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/scripts/detect-lsp.ts +210 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/scripts/lsp-server-table.ts +177 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/scripts/tsconfig.json +17 -0
- package/packages/omo-codex/plugin/skills/lsp-setup/scripts/verify-lsp.ts +147 -0
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +9 -9
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +10 -10
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +20 -22
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +38 -61
- package/packages/omo-codex/plugin/skills/ultraresearch/SKILL.md +135 -677
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +14 -14
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +24 -25
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +20 -11
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +17 -11
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +9 -9
- package/packages/omo-codex/plugin/test/aggregate-build.test.mjs +2 -1
- package/packages/omo-codex/plugin/test/aggregate-mcp.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +5 -5
- package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +6 -6
- package/packages/omo-codex/plugin/test/auto-update-restart-notice.test.mjs +194 -0
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +17 -0
- package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +15 -44
- package/packages/omo-codex/plugin/test/lsp-prebuild-layouts.test.mjs +140 -0
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +261 -0
- package/packages/omo-codex/plugin/test/start-work-skill.test.mjs +9 -31
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +68 -4
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +119 -0
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +11 -112
- package/packages/omo-codex/plugin/test/sync-version.test.mjs +68 -0
- package/packages/omo-codex/plugin/test/ultraresearch-skill-contract.test.mjs +126 -0
- package/packages/omo-codex/plugin/test/ulw-plan-skill.test.mjs +2 -2
- package/packages/omo-codex/scripts/install/bin-dir.mjs +20 -0
- package/packages/omo-codex/scripts/install/bin-links.mjs +43 -6
- package/packages/omo-codex/scripts/install/cache.mjs +4 -0
- package/packages/omo-codex/scripts/install/config.mjs +5 -3
- package/packages/omo-codex/scripts/install/delegated-command.mjs +5 -1
- package/packages/omo-codex/scripts/install/git-bash-mcp-env.mjs +28 -0
- package/packages/omo-codex/scripts/install/git-bash.mjs +12 -4
- package/packages/omo-codex/scripts/install/git-bash.test.mjs +39 -4
- package/packages/omo-codex/scripts/install/hook-targets.mjs +46 -0
- package/packages/omo-codex/scripts/install/multi-agent-v2-config.mjs +22 -10
- package/packages/omo-codex/scripts/install/process.mjs +1 -0
- package/packages/omo-codex/scripts/install-bin-links.test.mjs +131 -3
- package/packages/omo-codex/scripts/install-config-git-bash.test.mjs +91 -0
- package/packages/omo-codex/scripts/install-config.test.mjs +50 -44
- package/packages/omo-codex/scripts/install-delegated-command.test.mjs +78 -0
- package/packages/omo-codex/scripts/install-git-bash-mcp-env.test.mjs +93 -0
- package/packages/omo-codex/scripts/install-hook-targets.test.mjs +100 -0
- package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +3 -1
- package/packages/omo-codex/scripts/install-local.mjs +7 -18
- package/packages/omo-codex/scripts/install-local.test.mjs +34 -1
- package/packages/shared-skills/skills/lcx-contribute-bug-fix/SKILL.md +16 -1
- package/packages/shared-skills/skills/lcx-doctor/SKILL.md +93 -0
- package/packages/shared-skills/skills/lcx-doctor/agents/openai.yaml +11 -0
- package/packages/shared-skills/skills/lcx-report-bug/SKILL.md +17 -13
- package/packages/shared-skills/skills/lsp-setup/SKILL.md +139 -0
- package/packages/shared-skills/skills/lsp-setup/references/bash/README.md +60 -0
- package/packages/shared-skills/skills/lsp-setup/references/c-cpp/README.md +61 -0
- package/packages/shared-skills/skills/lsp-setup/references/csharp/README.md +71 -0
- package/packages/shared-skills/skills/lsp-setup/references/dart/README.md +48 -0
- package/packages/shared-skills/skills/lsp-setup/references/elixir/README.md +51 -0
- package/packages/shared-skills/skills/lsp-setup/references/go/README.md +57 -0
- package/packages/shared-skills/skills/lsp-setup/references/haskell/README.md +57 -0
- package/packages/shared-skills/skills/lsp-setup/references/java/README.md +57 -0
- package/packages/shared-skills/skills/lsp-setup/references/julia/README.md +60 -0
- package/packages/shared-skills/skills/lsp-setup/references/kotlin/README.md +59 -0
- package/packages/shared-skills/skills/lsp-setup/references/lua/README.md +66 -0
- package/packages/shared-skills/skills/lsp-setup/references/php/README.md +62 -0
- package/packages/shared-skills/skills/lsp-setup/references/python/README.md +71 -0
- package/packages/shared-skills/skills/lsp-setup/references/ruby/README.md +53 -0
- package/packages/shared-skills/skills/lsp-setup/references/rust/README.md +59 -0
- package/packages/shared-skills/skills/lsp-setup/references/swift/README.md +51 -0
- package/packages/shared-skills/skills/lsp-setup/references/terraform/README.md +62 -0
- package/packages/shared-skills/skills/lsp-setup/references/typescript/README.md +77 -0
- package/packages/shared-skills/skills/lsp-setup/references/yaml/README.md +70 -0
- package/packages/shared-skills/skills/lsp-setup/references/zig/README.md +49 -0
- package/packages/shared-skills/skills/lsp-setup/scripts/detect-lsp.ts +210 -0
- package/packages/shared-skills/skills/lsp-setup/scripts/lsp-server-table.ts +177 -0
- package/packages/shared-skills/skills/lsp-setup/scripts/tsconfig.json +17 -0
- package/packages/shared-skills/skills/lsp-setup/scripts/verify-lsp.ts +147 -0
- package/packages/shared-skills/skills/remove-ai-slops/SKILL.md +1 -1
- package/packages/shared-skills/skills/review-work/SKILL.md +10 -14
- package/packages/shared-skills/skills/start-work/SKILL.md +30 -59
- package/packages/shared-skills/skills/ultraresearch/SKILL.md +126 -667
- package/dist/hooks/anthropic-effort/hook.d.ts +0 -26
- package/dist/hooks/anthropic-effort/index.d.ts +0 -1
- package/dist/hooks/keyword-detector/analyze/default.d.ts +0 -12
- package/dist/hooks/keyword-detector/analyze/index.d.ts +0 -1
- package/dist/hooks/keyword-detector/search/default.d.ts +0 -12
- package/dist/hooks/keyword-detector/search/index.d.ts +0 -1
- package/dist/hooks/thinking-block-validator/hook.d.ts +0 -12
- package/dist/hooks/thinking-block-validator/index.d.ts +0 -1
- package/packages/omo-codex/plugin/components/ultrawork/test/directive-contract.test.ts +0 -18
- package/packages/omo-codex/plugin/test/global-review-debug-gate.test.mjs +0 -29
- package/packages/omo-codex/plugin/test/subagent-guidance.test.mjs +0 -151
|
@@ -4,109 +4,18 @@ import { dirname, join } from "node:path";
|
|
|
4
4
|
import test from "node:test";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { sharedSkillsRootPath } from "@oh-my-opencode/shared-skills";
|
|
7
|
+
import {
|
|
8
|
+
CONTEXT_PRESSURE_SKILL_BUDGET_BYTES,
|
|
9
|
+
assertPackagedContentMatches,
|
|
10
|
+
componentSkillSources,
|
|
11
|
+
expectedSkills,
|
|
12
|
+
listSkillFiles,
|
|
13
|
+
removeCodexCompatibilityGuidance,
|
|
14
|
+
removeCodexSkillOverlays,
|
|
15
|
+
} from "./sync-skills-test-support.mjs";
|
|
7
16
|
|
|
8
17
|
const root = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
9
18
|
const repoRoot = join(root, "..", "..", "..");
|
|
10
|
-
const CONTEXT_PRESSURE_SKILL_BUDGET_BYTES = 25_000;
|
|
11
|
-
|
|
12
|
-
const expectedSkills = [
|
|
13
|
-
"comment-checker",
|
|
14
|
-
"debugging",
|
|
15
|
-
"frontend-ui-ux",
|
|
16
|
-
"git-master",
|
|
17
|
-
"init-deep",
|
|
18
|
-
"lcx-contribute-bug-fix",
|
|
19
|
-
"lcx-report-bug",
|
|
20
|
-
"lsp",
|
|
21
|
-
"programming",
|
|
22
|
-
"refactor",
|
|
23
|
-
"remove-ai-slops",
|
|
24
|
-
"review-work",
|
|
25
|
-
"rules",
|
|
26
|
-
"start-work",
|
|
27
|
-
"ultraresearch",
|
|
28
|
-
"ulw-loop",
|
|
29
|
-
"ulw-plan",
|
|
30
|
-
"visual-qa",
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
const componentSkillSources = [
|
|
34
|
-
["comment-checker", "components/comment-checker/skills/comment-checker"],
|
|
35
|
-
["lsp", "components/lsp/skills/lsp"],
|
|
36
|
-
["rules", "components/rules/skills/rules"],
|
|
37
|
-
["ulw-loop", "components/ulw-loop/skills/ulw-loop"],
|
|
38
|
-
["ulw-plan", "components/ultrawork/skills/ulw-plan"],
|
|
39
|
-
];
|
|
40
|
-
|
|
41
|
-
const codexCompatibilityEndMarkers = [
|
|
42
|
-
"For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `wait_agent` timeout only means no new mailbox update arrived. Treat a running child or latest `WORKING:` message as alive. Do not use `list_agents` as a polling loop. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.\n\n",
|
|
43
|
-
"Codex full-history forks inherit parent context, so role-specific behavior must be described in a self-contained `message` and usually should use a non-full-history fork mode such as `fork_turns=\"none\"`. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.\n\n",
|
|
44
|
-
"When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.\n\n",
|
|
45
|
-
"When translating `load_skills=[...]`, name the skills inside the spawned agent's `message`. If a code block below conflicts with this section, this section wins.\n\n",
|
|
46
|
-
];
|
|
47
|
-
|
|
48
|
-
function removeCodexCompatibilityGuidance(content) {
|
|
49
|
-
const start = content.indexOf("## Codex Harness Tool Compatibility\n\n");
|
|
50
|
-
if (start === -1) return content;
|
|
51
|
-
const endMarker = codexCompatibilityEndMarkers.find((marker) => content.indexOf(marker, start) !== -1);
|
|
52
|
-
assert.notEqual(endMarker, undefined, "Codex compatibility guidance block is missing its terminator");
|
|
53
|
-
const end = content.indexOf(endMarker, start);
|
|
54
|
-
assert.notEqual(end, -1, "Codex compatibility guidance block is missing its terminator");
|
|
55
|
-
return `${content.slice(0, start)}${content.slice(end + endMarker.length)}`;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const startWorkOriginalCompletion = `When all top-level checkboxes in \`## TODOs\` and \`## Final Verification Wave\` are complete:
|
|
59
|
-
|
|
60
|
-
1. Run the plan's final verification commands.
|
|
61
|
-
2. If worktree mode was used, sync \`.omo/\` state back to the main repo, merge or hand off exactly as requested, and remove the worktree only after successful merge or explicit handoff.
|
|
62
|
-
3. Remove or mark the Boulder work as completed.
|
|
63
|
-
4. Print an \`ORCHESTRATION COMPLETE\` block with the plan path, verification commands, artifacts, and cleanup receipts.`;
|
|
64
|
-
|
|
65
|
-
const startWorkCodexCompletion = `When all top-level checkboxes in \`## TODOs\` and \`## Final Verification Wave\` are complete:
|
|
66
|
-
|
|
67
|
-
1. Run the plan's final verification commands.
|
|
68
|
-
2. Complete the **Global Review and Debugging Gate** before any completion claim, PR handoff, or branch handoff:
|
|
69
|
-
- Invoke the \`review-work\` skill with the final diff, changed files, user goal, constraints, run command, and verification evidence. All five review lanes must return PASS. A timeout, missing deliverable, ack-only child, \`BLOCKED:\`, or inconclusive lane is a gate failure, not approval.
|
|
70
|
-
- Run a debugging-oriented runtime audit even when the review passes: name at least three plausible failure hypotheses for the changed surface, run the distinguishing checks against the actual artifact, and append the ruled-out or confirmed result to \`.omo/start-work/ledger.jsonl\`.
|
|
71
|
-
- If any review lane or debugging hypothesis fails, invoke the \`debugging\` skill, confirm root cause with runtime evidence, add the minimal failing test or reproduction, fix it, rerun the affected verification, then rerun the Global Review and Debugging Gate.
|
|
72
|
-
- Evidence hygiene is mandatory: redact or mask secrets and sensitive user data before writing \`.omo/start-work/ledger.jsonl\`, a PR body, or a handoff. Never include raw tokens, credentials, auth headers, cookies, API keys, env dumps, private logs, or PII; use concise summaries, lengths, hashes, or short non-sensitive prefixes instead.
|
|
73
|
-
- If the work includes creating, updating, or handing off a PR, refresh \`git status\` and the PR/branch state after the gate, and include only redacted review/debugging evidence in the PR body or handoff.
|
|
74
|
-
3. If worktree mode was used, sync \`.omo/\` state back to the main repo, merge or hand off exactly as requested, and remove the worktree only after successful merge or explicit handoff.
|
|
75
|
-
4. Remove or mark the Boulder work as completed.
|
|
76
|
-
5. Print an \`ORCHESTRATION COMPLETE\` block with the plan path, verification commands, Global Review and Debugging Gate verdict, artifacts, and cleanup receipts.`;
|
|
77
|
-
|
|
78
|
-
const startWorkOriginalHardRule = "- No completion claim while an applicable ultraqa adversarial class was never probed. Each applicable class needs a captured observable result; each skipped class needs a one-line not-applicable reason in the ledger.\n- No unprefixed session ids in Boulder state. Codex sessions are always `codex:<session_id>`.";
|
|
79
|
-
|
|
80
|
-
const startWorkCodexHardRule = "- No completion claim while an applicable ultraqa adversarial class was never probed. Each applicable class needs a captured observable result; each skipped class needs a one-line not-applicable reason in the ledger.\n- No `ORCHESTRATION COMPLETE`, final response, PR creation, or PR handoff before the Global Review and Debugging Gate passes with recorded evidence.\n- No unprefixed session ids in Boulder state. Codex sessions are always `codex:<session_id>`.";
|
|
81
|
-
|
|
82
|
-
const reviewWorkCodexGatePattern =
|
|
83
|
-
/\nWhen `review-work` is used as a final implementation, PR, or `\$start-work`\ngate, it is blocking\. A timeout, missing deliverable, ack-only response,\nexplicit `BLOCKED:`, or inconclusive lane is not a pass\. Treat that lane as\nfailed, investigate the underlying uncertainty with the `debugging` skill when\nruntime behavior may be wrong, fix with evidence, and rerun the affected lane\nbefore claiming completion or handing off a PR\.\n\nReview evidence must be safe to share\. Redact or mask secrets and sensitive\nuser data before including evidence in logs, PR bodies, or handoffs\. Never\ninclude raw tokens, credentials, auth headers, cookies, API keys, env dumps,\nprivate logs, or PII; summarize with lengths, hashes, and short non-sensitive\nprefixes when identity is needed\.\n/;
|
|
84
|
-
|
|
85
|
-
function removeCodexSkillOverlays(skillName, content) {
|
|
86
|
-
if (skillName === "start-work") {
|
|
87
|
-
return content
|
|
88
|
-
.replace(startWorkCodexCompletion, startWorkOriginalCompletion)
|
|
89
|
-
.replace(startWorkCodexHardRule, startWorkOriginalHardRule);
|
|
90
|
-
}
|
|
91
|
-
if (skillName === "review-work") {
|
|
92
|
-
return content.replace(reviewWorkCodexGatePattern, "");
|
|
93
|
-
}
|
|
94
|
-
return content;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
async function listSkillFiles(dir) {
|
|
98
|
-
const entries = await readdir(dir, { withFileTypes: true });
|
|
99
|
-
const files = [];
|
|
100
|
-
for (const entry of entries) {
|
|
101
|
-
if (entry.isDirectory()) {
|
|
102
|
-
const nested = await listSkillFiles(join(dir, entry.name));
|
|
103
|
-
for (const nestedPath of nested) files.push(join(entry.name, nestedPath));
|
|
104
|
-
} else {
|
|
105
|
-
files.push(entry.name);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return files.sort();
|
|
109
|
-
}
|
|
110
19
|
|
|
111
20
|
async function readPackagedSkillFile(...segments) {
|
|
112
21
|
const path = join(root, "skills", ...segments);
|
|
@@ -114,12 +23,6 @@ async function readPackagedSkillFile(...segments) {
|
|
|
114
23
|
return { path, content };
|
|
115
24
|
}
|
|
116
25
|
|
|
117
|
-
function assertPackagedContentMatches({ path, content }, requirements) {
|
|
118
|
-
for (const [label, pattern] of requirements) {
|
|
119
|
-
assert.match(content, pattern, `${path} missing packaged skill contract: ${label}`);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
26
|
test("#given synced aggregate Codex skills #when inspected #then component and shared skills are present", async () => {
|
|
124
27
|
// given
|
|
125
28
|
const skillsRoot = join(root, "skills");
|
|
@@ -225,7 +128,6 @@ test("#given synced ulw-loop skill #when Codex hint metadata is inspected #then
|
|
|
225
128
|
|
|
226
129
|
// then
|
|
227
130
|
assert.match(skill, /^---\r?\nname: ulw-loop\r?\n/m);
|
|
228
|
-
assert.match(skill, /Goal-like loop that uses ultrawork mode to decompose work into systematic, evidence-bound steps\./);
|
|
229
131
|
assert.match(interfaceMetadata, /display_name: "ulw-loop \(omo\)"/);
|
|
230
132
|
assert.doesNotMatch(interfaceMetadata, /ulw-loop \/ ulw-loop/);
|
|
231
133
|
assert.match(interfaceMetadata, /short_description: "Goal-like ultrawork loop for systematic decomposition"/);
|
|
@@ -273,15 +175,12 @@ test("#given synced ulw-loop skill #when worker guidance is inspected #then cont
|
|
|
273
175
|
const syncedSkill = await readFile(join(root, "skills", "ulw-loop", "SKILL.md"), "utf8");
|
|
274
176
|
const syncedWorkflow = await readFile(join(root, "skills", "ulw-loop", "references", "full-workflow.md"), "utf8");
|
|
275
177
|
const requiredPatterns = [
|
|
276
|
-
["
|
|
277
|
-
["status polling warning", /polling loop/],
|
|
278
|
-
["large payload replay risk", /replay large payloads/],
|
|
178
|
+
["multi_agent_v1.wait_agent ref", /multi_agent_v1\.wait_agent/],
|
|
279
179
|
["local spawned-name tracking", /Track spawned agent names locally/],
|
|
280
180
|
["wait_agent mailbox path", /wait_agent.*mailbox signals/],
|
|
281
181
|
["progress status contract", /WORKING:/],
|
|
282
|
-
["single list_agents reassurance", /single `list_agents`/],
|
|
283
182
|
["long-running plan/reviewer background guidance", /Plan and reviewer agents may run for a long time/],
|
|
284
|
-
["bounded plan/reviewer polling", /
|
|
183
|
+
["bounded plan/reviewer polling", /multi_agent_v1\.wait_agent.*cycles/],
|
|
285
184
|
["single long wait guard", /single long blocking wait/],
|
|
286
185
|
["git-master checkpointing", /git-master/],
|
|
287
186
|
["touched-path commit-style probe", /touched-path commit history/],
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { mkdir, mkdtemp, readFile, writeFile } from "node:fs/promises";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import test from "node:test";
|
|
6
|
+
|
|
7
|
+
import { manifestTargets, resolveAuthoritativeVersion, syncVersion } from "../scripts/sync-version.mjs";
|
|
8
|
+
|
|
9
|
+
async function makeTempDir() {
|
|
10
|
+
return mkdtemp(join(tmpdir(), "omo-codex-sync-version-"));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async function writeJson(path, value) {
|
|
14
|
+
await mkdir(join(path, ".."), { recursive: true });
|
|
15
|
+
await writeFile(path, `${JSON.stringify(value, null, "\t")}\n`);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async function readJson(path) {
|
|
19
|
+
return JSON.parse(await readFile(path, "utf8"));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async function scaffoldPlugin(repoRoot, rootVersion) {
|
|
23
|
+
await writeJson(join(repoRoot, "package.json"), { name: "oh-my-opencode", version: rootVersion });
|
|
24
|
+
const pluginRoot = join(repoRoot, "packages", "omo-codex", "plugin");
|
|
25
|
+
await writeJson(join(repoRoot, "packages", "omo-codex", "package.json"), { name: "@oh-my-opencode/omo-codex", version: "0.1.0" });
|
|
26
|
+
await writeJson(join(pluginRoot, "package.json"), { name: "@sisyphuslabs/omo-codex-plugin", version: "0.1.0" });
|
|
27
|
+
await writeJson(join(pluginRoot, ".codex-plugin", "plugin.json"), { name: "omo", version: "0.1.0" });
|
|
28
|
+
await writeJson(join(pluginRoot, "components", "rules", "package.json"), { name: "@code-yeongyu/codex-rules", version: "0.1.0" });
|
|
29
|
+
await writeJson(join(pluginRoot, "components", "rules", ".codex-plugin", "plugin.json"), { hooks: "./hooks/hooks.json" });
|
|
30
|
+
return pluginRoot;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
test("#given LAZYCODEX_RELEASE_VERSION env #when resolving authoritative version #then the env value wins", async () => {
|
|
34
|
+
const version = await resolveAuthoritativeVersion({ env: { LAZYCODEX_RELEASE_VERSION: "9.9.9" }, repoRoot: "/nonexistent" });
|
|
35
|
+
assert.equal(version, "9.9.9");
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test("#given no env override #when resolving authoritative version #then root package.json version is used", async () => {
|
|
39
|
+
const repoRoot = await makeTempDir();
|
|
40
|
+
await writeJson(join(repoRoot, "package.json"), { name: "oh-my-opencode", version: "4.8.1" });
|
|
41
|
+
const version = await resolveAuthoritativeVersion({ env: {}, repoRoot });
|
|
42
|
+
assert.equal(version, "4.8.1");
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test("#given drifted Codex manifests #when syncing version from root #then all versioned manifests match and version-less files are left alone", async () => {
|
|
46
|
+
const repoRoot = await makeTempDir();
|
|
47
|
+
const pluginRoot = await scaffoldPlugin(repoRoot, "4.8.1");
|
|
48
|
+
|
|
49
|
+
const result = await syncVersion({ pluginRoot, env: {}, repoRoot });
|
|
50
|
+
|
|
51
|
+
assert.equal(result.version, "4.8.1");
|
|
52
|
+
for (const target of manifestTargets(pluginRoot, [join(pluginRoot, "components", "rules", "package.json")])) {
|
|
53
|
+
assert.equal((await readJson(target)).version, "4.8.1", `expected ${target} to be stamped`);
|
|
54
|
+
}
|
|
55
|
+
// the version-less component plugin.json must not gain a version field
|
|
56
|
+
const versionlessManifest = await readJson(join(pluginRoot, "components", "rules", ".codex-plugin", "plugin.json"));
|
|
57
|
+
assert.equal("version" in versionlessManifest, false);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
test("#given already coherent manifests #when syncing again #then nothing is rewritten", async () => {
|
|
61
|
+
const repoRoot = await makeTempDir();
|
|
62
|
+
const pluginRoot = await scaffoldPlugin(repoRoot, "4.8.1");
|
|
63
|
+
|
|
64
|
+
await syncVersion({ pluginRoot, env: {}, repoRoot });
|
|
65
|
+
const second = await syncVersion({ pluginRoot, env: {}, repoRoot });
|
|
66
|
+
|
|
67
|
+
assert.equal(second.changed.length, 0);
|
|
68
|
+
});
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import test from "node:test";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { sharedSkillsRootPath } from "@oh-my-opencode/shared-skills";
|
|
7
|
+
|
|
8
|
+
const root = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
9
|
+
|
|
10
|
+
async function readUltraresearchCopies() {
|
|
11
|
+
const sharedPath = join(sharedSkillsRootPath(), "ultraresearch", "SKILL.md");
|
|
12
|
+
const packagedPath = join(root, "skills", "ultraresearch", "SKILL.md");
|
|
13
|
+
return [
|
|
14
|
+
{ label: "shared", path: sharedPath, content: await readFile(sharedPath, "utf8") },
|
|
15
|
+
{ label: "packaged", path: packagedPath, content: await readFile(packagedPath, "utf8") },
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function frontmatterDescription(content) {
|
|
20
|
+
const match = content.match(/^---\r?\n[\s\S]*?\bdescription:\s*"([\s\S]*?)"\r?\n[\s\S]*?---/);
|
|
21
|
+
assert.notEqual(match, null, "SKILL.md frontmatter description not found");
|
|
22
|
+
return match[1];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
test("#given ultraresearch skill #when scanned for non-English content #then it contains no Hangul", async () => {
|
|
26
|
+
for (const copy of await readUltraresearchCopies()) {
|
|
27
|
+
assert.doesNotMatch(
|
|
28
|
+
copy.content,
|
|
29
|
+
/[ᄀ-ᇿ-가-힣]/,
|
|
30
|
+
`${copy.label} copy contains Hangul characters`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test("#given ultraresearch description #when activation policy is inspected #then it gates on explicit research demands only", async () => {
|
|
36
|
+
for (const copy of await readUltraresearchCopies()) {
|
|
37
|
+
const description = frontmatterDescription(copy.content);
|
|
38
|
+
assert.match(description, /explicit/i, `${copy.label}: description must gate activation on explicit demand`);
|
|
39
|
+
assert.match(
|
|
40
|
+
description,
|
|
41
|
+
/ultra-precise investigation/i,
|
|
42
|
+
`${copy.label}: description must name the ultra-precise investigation trigger`,
|
|
43
|
+
);
|
|
44
|
+
assert.match(description, /\bresearch\b/i, `${copy.label}: description must name the research trigger`);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
test("#given ultraresearch body #when authority is inspected #then it takes precedence over exploration-bounding instructions", async () => {
|
|
49
|
+
for (const copy of await readUltraresearchCopies()) {
|
|
50
|
+
assert.match(
|
|
51
|
+
copy.content,
|
|
52
|
+
/exploration-bounding|exploration (?:caps|budgets|limits)/i,
|
|
53
|
+
`${copy.label}: body must name the exploration-bounding instructions it overrides`,
|
|
54
|
+
);
|
|
55
|
+
assert.match(
|
|
56
|
+
copy.content,
|
|
57
|
+
/supersede|override|do(?:es)? not (?:bind|apply)/i,
|
|
58
|
+
`${copy.label}: body must state precedence while the mode is active`,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test("#given ultraresearch worker protocol #when EXPAND flow is inspected #then markers travel as message text and workers never write files", async () => {
|
|
64
|
+
for (const copy of await readUltraresearchCopies()) {
|
|
65
|
+
assert.match(copy.content, /EXPAND/, `${copy.label}: body must keep the EXPAND marker protocol`);
|
|
66
|
+
assert.match(
|
|
67
|
+
copy.content,
|
|
68
|
+
/(?:reply|message|response) text|end (?:its|the|your) (?:reply|response|final message)/i,
|
|
69
|
+
`${copy.label}: EXPAND markers must be returned as message text`,
|
|
70
|
+
);
|
|
71
|
+
assert.match(
|
|
72
|
+
copy.content,
|
|
73
|
+
/read-only|cannot write files|never ask (?:a )?worker(?:s)? to write/i,
|
|
74
|
+
`${copy.label}: body must state the read-only worker constraint`,
|
|
75
|
+
);
|
|
76
|
+
assert.doesNotMatch(
|
|
77
|
+
copy.content,
|
|
78
|
+
/APPEND (?:your )?findings to \$SESSION_DIR/i,
|
|
79
|
+
`${copy.label}: workers must not be instructed to append session-dir files`,
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
test("#given ultraresearch journaling #when ownership is inspected #then the orchestrator owns the session journal", async () => {
|
|
85
|
+
for (const copy of await readUltraresearchCopies()) {
|
|
86
|
+
assert.match(
|
|
87
|
+
copy.content,
|
|
88
|
+
/orchestrator[\s\S]{0,200}journal|journal[\s\S]{0,200}orchestrator/i,
|
|
89
|
+
`${copy.label}: body must assign session-journal writes to the orchestrator`,
|
|
90
|
+
);
|
|
91
|
+
assert.match(copy.content, /SESSION_DIR/, `${copy.label}: body must keep the session directory protocol`);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
test("#given ultraresearch expansion loop #when stop rules are inspected #then convergence rules and a depth cap are stated", async () => {
|
|
96
|
+
for (const copy of await readUltraresearchCopies()) {
|
|
97
|
+
assert.match(copy.content, /converg/i, `${copy.label}: body must define convergence`);
|
|
98
|
+
assert.match(copy.content, /depth/i, `${copy.label}: body must define an expansion depth cap`);
|
|
99
|
+
assert.match(
|
|
100
|
+
copy.content,
|
|
101
|
+
/minimum (?:of )?(?:2|two) expansion waves|at least (?:2|two) expansion waves/i,
|
|
102
|
+
`${copy.label}: body must require a minimum of two expansion waves before convergence`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
test("#given ultraresearch under ultrawork #when coexistence is inspected #then marker and done-definition conflicts are resolved", async () => {
|
|
108
|
+
for (const copy of await readUltraresearchCopies()) {
|
|
109
|
+
assert.match(copy.content, /ultrawork|\bulw\b/i, `${copy.label}: body must address ultrawork coexistence`);
|
|
110
|
+
assert.match(
|
|
111
|
+
copy.content,
|
|
112
|
+
/first(?:-| )line/i,
|
|
113
|
+
`${copy.label}: body must resolve the first-line activation marker conflict`,
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
test("#given ultraresearch worker sizing #when spawn guidance is inspected #then capable-model and high-effort routing is stated", async () => {
|
|
119
|
+
for (const copy of await readUltraresearchCopies()) {
|
|
120
|
+
assert.match(
|
|
121
|
+
copy.content,
|
|
122
|
+
/capable model|high(?:est)? (?:reasoning )?effort/i,
|
|
123
|
+
`${copy.label}: body must route research workers to a capable model or high effort`,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
@@ -16,7 +16,7 @@ test("#given ulw-plan skill #when inspected #then it is a Codex-native planner t
|
|
|
16
16
|
// then
|
|
17
17
|
assert.match(skill, /^---\r?\nname: ulw-plan\r?\n/m);
|
|
18
18
|
assert.match(skill, /references\/full-workflow\.md/);
|
|
19
|
-
assert.match(skill, /spawn_agent\(\{[^)]*"
|
|
19
|
+
assert.match(skill, /multi_agent_v1\.spawn_agent\(\{[^)]*"fork_context":false/);
|
|
20
20
|
assert.doesNotMatch(skill, opencodeOnlyToolPattern);
|
|
21
21
|
});
|
|
22
22
|
|
|
@@ -37,7 +37,7 @@ test("#given ulw-plan full workflow reference #when inspected #then it documents
|
|
|
37
37
|
// then
|
|
38
38
|
assert.match(workflow, /\.omo\/plans\/<slug>\.md/);
|
|
39
39
|
assert.match(workflow, /[Aa]pproval gate/);
|
|
40
|
-
assert.match(workflow, /spawn_agent\(\{[^)]*"
|
|
40
|
+
assert.match(workflow, /multi_agent_v1\.spawn_agent\(\{[^)]*"fork_context":false/);
|
|
41
41
|
assert.doesNotMatch(workflow, opencodeOnlyToolPattern);
|
|
42
42
|
assert.doesNotMatch(workflow, /Proceeding to plan generation/);
|
|
43
43
|
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { homedir } from "node:os";
|
|
2
|
+
import { join, resolve } from "node:path";
|
|
3
|
+
|
|
4
|
+
export function resolveCodexInstallerBinDir(options = {}) {
|
|
5
|
+
const homeDir = resolve(options.homeDir ?? homedir());
|
|
6
|
+
const env = options.env ?? process.env;
|
|
7
|
+
const explicitBinDir = nonEmptyEnvValue(env, "CODEX_LOCAL_BIN_DIR");
|
|
8
|
+
if (explicitBinDir !== undefined) return explicitBinDir;
|
|
9
|
+
|
|
10
|
+
const codexHome = resolve(options.codexHome ?? nonEmptyEnvValue(env, "CODEX_HOME") ?? join(homeDir, ".codex"));
|
|
11
|
+
const defaultCodexHome = resolve(join(homeDir, ".codex"));
|
|
12
|
+
return codexHome === defaultCodexHome ? join(homeDir, ".local", "bin") : join(codexHome, "bin");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function nonEmptyEnvValue(env, key) {
|
|
16
|
+
const value = env[key];
|
|
17
|
+
if (typeof value !== "string") return undefined;
|
|
18
|
+
const trimmed = value.trim();
|
|
19
|
+
return trimmed.length === 0 ? undefined : trimmed;
|
|
20
|
+
}
|
|
@@ -22,16 +22,17 @@ export async function linkCachedPluginBins({ binDir, pluginRoot, platform = proc
|
|
|
22
22
|
export async function linkRootRuntimeBin({ binDir, codexHome, repoRoot, platform = process.platform }) {
|
|
23
23
|
const cliPath = join(repoRoot, "dist", "cli", "index.js");
|
|
24
24
|
if (!(await isFile(cliPath))) return null;
|
|
25
|
+
const nodeCliPath = join(repoRoot, "dist", "cli-node", "index.js");
|
|
25
26
|
|
|
26
27
|
await mkdir(binDir, { recursive: true });
|
|
27
28
|
if (platform === "win32") {
|
|
28
29
|
const linkPath = join(binDir, "omo.cmd");
|
|
29
|
-
await replaceRuntimeWrapper(linkPath, windowsRuntimeWrapper(cliPath, codexHome, binDir));
|
|
30
|
+
await replaceRuntimeWrapper(linkPath, windowsRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath));
|
|
30
31
|
return { name: "omo", path: linkPath, target: cliPath };
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
const linkPath = join(binDir, "omo");
|
|
34
|
-
await replaceRuntimeWrapper(linkPath, posixRuntimeWrapper(cliPath, codexHome, binDir));
|
|
35
|
+
await replaceRuntimeWrapper(linkPath, posixRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath));
|
|
35
36
|
await chmod(linkPath, 0o755);
|
|
36
37
|
return { name: "omo", path: linkPath, target: cliPath };
|
|
37
38
|
}
|
|
@@ -162,24 +163,46 @@ async function existingNonRuntimeWrapper(path) {
|
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
165
|
|
|
165
|
-
function posixRuntimeWrapper(cliPath, codexHome, binDir) {
|
|
166
|
+
function posixRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
166
167
|
const ulwLoopBin = join(binDir, "omo-ulw-loop");
|
|
168
|
+
const nodeCli = escapePosixDoubleQuoted(nodeCliPath);
|
|
167
169
|
return [
|
|
168
170
|
"#!/bin/sh",
|
|
169
171
|
`# ${RUNTIME_WRAPPER_MARKER}`,
|
|
170
172
|
`export CODEX_HOME="\${CODEX_HOME:-${escapePosixDoubleQuoted(codexHome)}}"`,
|
|
171
173
|
'export OMO_SPARKSHELL_APP_SERVER_SOCKET="${OMO_SPARKSHELL_APP_SERVER_SOCKET:-$CODEX_HOME/app-server-control/app-server-control.sock}"',
|
|
172
|
-
'BUN_BINARY="${BUN_BINARY:-bun}"',
|
|
173
174
|
'if [ "$1" = "ulw-loop" ] && [ -x "' + escapePosixDoubleQuoted(ulwLoopBin) + '" ]; then',
|
|
174
175
|
" shift",
|
|
175
176
|
' exec "' + escapePosixDoubleQuoted(ulwLoopBin) + '" "$@"',
|
|
176
177
|
"fi",
|
|
178
|
+
`if [ "\${OMO_RUNTIME:-}" = "node" ] && [ -f "${nodeCli}" ]; then`,
|
|
179
|
+
` exec node "${nodeCli}" "$@"`,
|
|
180
|
+
"fi",
|
|
181
|
+
'BUN_BINARY="${BUN_BINARY:-}"',
|
|
182
|
+
'if [ -z "$BUN_BINARY" ] && command -v bun >/dev/null 2>&1; then',
|
|
183
|
+
" BUN_BINARY=bun",
|
|
184
|
+
"fi",
|
|
185
|
+
'if [ -z "$BUN_BINARY" ]; then',
|
|
186
|
+
' for omo_bun_candidate in "$HOME/.bun/bin/bun" /opt/homebrew/bin/bun /usr/local/bin/bun; do',
|
|
187
|
+
' if [ -x "$omo_bun_candidate" ]; then',
|
|
188
|
+
' BUN_BINARY="$omo_bun_candidate"',
|
|
189
|
+
" break",
|
|
190
|
+
" fi",
|
|
191
|
+
" done",
|
|
192
|
+
"fi",
|
|
193
|
+
'if [ -z "$BUN_BINARY" ]; then',
|
|
194
|
+
` if [ -f "${nodeCli}" ] && command -v node >/dev/null 2>&1; then`,
|
|
195
|
+
` exec node "${nodeCli}" "$@"`,
|
|
196
|
+
" fi",
|
|
197
|
+
` echo "omo: bun runtime not found (checked PATH, ~/.bun/bin, /opt/homebrew/bin, /usr/local/bin) and the node fallback CLI is missing at ${nodeCli}; install bun from https://bun.sh, or reinstall omo and force the fallback with OMO_RUNTIME=node" >&2`,
|
|
198
|
+
" exit 127",
|
|
199
|
+
"fi",
|
|
177
200
|
`exec "$BUN_BINARY" "${escapePosixDoubleQuoted(cliPath)}" "$@"`,
|
|
178
201
|
"",
|
|
179
202
|
].join("\n");
|
|
180
203
|
}
|
|
181
204
|
|
|
182
|
-
function windowsRuntimeWrapper(cliPath, codexHome, binDir) {
|
|
205
|
+
function windowsRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
183
206
|
const ulwLoopBin = join(binDir, "omo-ulw-loop.cmd");
|
|
184
207
|
return [
|
|
185
208
|
"@echo off",
|
|
@@ -191,7 +214,21 @@ function windowsRuntimeWrapper(cliPath, codexHome, binDir) {
|
|
|
191
214
|
` "${ulwLoopBin}" %*`,
|
|
192
215
|
" exit /b %ERRORLEVEL%",
|
|
193
216
|
")",
|
|
194
|
-
`if
|
|
217
|
+
`if "%OMO_RUNTIME%"=="node" if exist "${nodeCliPath}" (`,
|
|
218
|
+
` node "${nodeCliPath}" %*`,
|
|
219
|
+
" exit /b %ERRORLEVEL%",
|
|
220
|
+
")",
|
|
221
|
+
'if not defined BUN_BINARY where bun >nul 2>nul && set "BUN_BINARY=bun"',
|
|
222
|
+
'if not defined BUN_BINARY if exist "%USERPROFILE%\\.bun\\bin\\bun.exe" set "BUN_BINARY=%USERPROFILE%\\.bun\\bin\\bun.exe"',
|
|
223
|
+
"if not defined BUN_BINARY (",
|
|
224
|
+
` if exist "${nodeCliPath}" (`,
|
|
225
|
+
` node "${nodeCliPath}" %*`,
|
|
226
|
+
" exit /b %ERRORLEVEL%",
|
|
227
|
+
" )",
|
|
228
|
+
` echo omo: bun runtime not found and the node fallback CLI is missing at ${nodeCliPath}; install bun from https://bun.sh or reinstall omo and force OMO_RUNTIME=node 1>&2`,
|
|
229
|
+
" exit /b 127",
|
|
230
|
+
")",
|
|
231
|
+
`"%BUN_BINARY%" "${cliPath}" %*`,
|
|
195
232
|
"",
|
|
196
233
|
].join("\r\n");
|
|
197
234
|
}
|
|
@@ -2,6 +2,8 @@ import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "nod
|
|
|
2
2
|
import { realpathSync } from "node:fs";
|
|
3
3
|
import { cp, mkdir, readFile, readdir, rename, rm, writeFile } from "node:fs/promises";
|
|
4
4
|
|
|
5
|
+
import { stampGitBashMcpEnv } from "./git-bash-mcp-env.mjs";
|
|
6
|
+
import { assertHookCommandTargets } from "./hook-targets.mjs";
|
|
5
7
|
import { createCachedMcpRuntimeArgRewriter } from "./mcp-runtime-cache.mjs";
|
|
6
8
|
import { exists, isRecord } from "./utils.mjs";
|
|
7
9
|
export { linkCachedPluginBins, linkRootRuntimeBin } from "./bin-links.mjs";
|
|
@@ -20,7 +22,9 @@ export async function installCachedPlugin({ buildSource = true, codexHome, marke
|
|
|
20
22
|
await rewriteCachedPackageLocalFileDependencies(tempPath, sourcePath);
|
|
21
23
|
await maybeRunNpmInstall(tempPath, runCommand, ["ci", "--omit=dev"]);
|
|
22
24
|
await rewriteCachedMcpManifest(tempPath, sourcePath);
|
|
25
|
+
await stampGitBashMcpEnv({ pluginRoot: tempPath });
|
|
23
26
|
await rewriteCachedManifestRoot(tempPath, tempPath, targetPath);
|
|
27
|
+
await assertHookCommandTargets(tempPath);
|
|
24
28
|
await promoteDirectory(tempPath, targetPath, renameDirectory);
|
|
25
29
|
} catch (error) {
|
|
26
30
|
await rm(tempPath, { recursive: true, force: true });
|
|
@@ -29,6 +29,7 @@ export async function updateCodexConfig({
|
|
|
29
29
|
trustedHookStates = [],
|
|
30
30
|
agentConfigs = [],
|
|
31
31
|
autonomousPermissions = false,
|
|
32
|
+
gitBashEnabled = false,
|
|
32
33
|
}) {
|
|
33
34
|
await mkdir(dirname(configPath), { recursive: true });
|
|
34
35
|
let config = "";
|
|
@@ -53,7 +54,7 @@ export async function updateCodexConfig({
|
|
|
53
54
|
for (const pluginName of pluginNames) {
|
|
54
55
|
config = ensurePluginEnabled(config, `${pluginName}@${marketplaceName}`);
|
|
55
56
|
}
|
|
56
|
-
config = ensureOmoBuiltinMcpPolicies(config, { marketplaceName, pluginNames, platform });
|
|
57
|
+
config = ensureOmoBuiltinMcpPolicies(config, { marketplaceName, pluginNames, platform, gitBashEnabled });
|
|
57
58
|
for (const state of trustedHookStates) {
|
|
58
59
|
config = ensureHookTrusted(config, state.key, state.trustedHash);
|
|
59
60
|
}
|
|
@@ -154,10 +155,10 @@ function ensurePluginMcpEnabled(config, pluginKey, serverName, enabled) {
|
|
|
154
155
|
return replaceOrInsertSetting(config, section, "enabled", enabledValue);
|
|
155
156
|
}
|
|
156
157
|
|
|
157
|
-
function ensureOmoBuiltinMcpPolicies(config, { marketplaceName, pluginNames, platform }) {
|
|
158
|
+
function ensureOmoBuiltinMcpPolicies(config, { marketplaceName, pluginNames, platform, gitBashEnabled }) {
|
|
158
159
|
if (marketplaceName !== "sisyphuslabs" || !pluginNames.includes("omo")) return config;
|
|
159
160
|
let nextConfig = ensurePluginMcpEnabled(config, "omo@sisyphuslabs", "context7", true);
|
|
160
|
-
nextConfig = ensurePluginMcpEnabled(nextConfig, "omo@sisyphuslabs", "git_bash", platform === "win32");
|
|
161
|
+
nextConfig = ensurePluginMcpEnabled(nextConfig, "omo@sisyphuslabs", "git_bash", platform === "win32" && gitBashEnabled === true);
|
|
161
162
|
return nextConfig;
|
|
162
163
|
}
|
|
163
164
|
|
|
@@ -253,3 +254,4 @@ function parseJsonString(value) {
|
|
|
253
254
|
return null;
|
|
254
255
|
}
|
|
255
256
|
}
|
|
257
|
+
|
|
@@ -4,7 +4,11 @@ export async function runDelegatedOmoCommand(parsed, options) {
|
|
|
4
4
|
options.log(`${invocation.command} ${invocation.args.join(" ")}`);
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
// The lazycodex wrapper sets OMO_INVOCATION_NAME=lazycodex to route into this
|
|
8
|
+
// Codex installer path. The delegated `omo` process must NOT inherit that name,
|
|
9
|
+
// otherwise it re-enters the lazycodex installer and recurses forever.
|
|
10
|
+
const env = { ...process.env, OMO_INVOCATION_NAME: "omo" };
|
|
11
|
+
await options.runCommand(invocation.command, invocation.args, { cwd: options.cwd, env });
|
|
8
12
|
}
|
|
9
13
|
|
|
10
14
|
export function buildDelegatedOmoInvocation(parsed) {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
|
|
4
|
+
import { exists, isRecord } from "./utils.mjs";
|
|
5
|
+
|
|
6
|
+
const GIT_BASH_ENV_KEY = "OMO_CODEX_GIT_BASH_PATH";
|
|
7
|
+
|
|
8
|
+
// Codex spawns plugin MCP servers with a restricted environment, so a user's
|
|
9
|
+
// OMO_CODEX_GIT_BASH_PATH never reaches the git_bash server unless the cached
|
|
10
|
+
// manifest forwards it explicitly.
|
|
11
|
+
export async function stampGitBashMcpEnv({ pluginRoot, env = process.env, platform = process.platform }) {
|
|
12
|
+
if (platform !== "win32") return false;
|
|
13
|
+
const override = typeof env[GIT_BASH_ENV_KEY] === "string" ? env[GIT_BASH_ENV_KEY].trim() : "";
|
|
14
|
+
if (override === "") return false;
|
|
15
|
+
|
|
16
|
+
const manifestPath = join(pluginRoot, ".mcp.json");
|
|
17
|
+
if (!(await exists(manifestPath))) return false;
|
|
18
|
+
const parsed = JSON.parse(await readFile(manifestPath, "utf8"));
|
|
19
|
+
if (!isRecord(parsed) || !isRecord(parsed.mcpServers) || !isRecord(parsed.mcpServers.git_bash)) return false;
|
|
20
|
+
|
|
21
|
+
const server = parsed.mcpServers.git_bash;
|
|
22
|
+
const serverEnv = isRecord(server.env) ? server.env : {};
|
|
23
|
+
if (serverEnv[GIT_BASH_ENV_KEY] === override) return false;
|
|
24
|
+
|
|
25
|
+
server.env = { ...serverEnv, [GIT_BASH_ENV_KEY]: override };
|
|
26
|
+
await writeFile(manifestPath, `${JSON.stringify(parsed, null, "\t")}\n`);
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
@@ -8,13 +8,13 @@ const PROGRAM_FILES_X86_GIT_BASH = "C:\\Program Files (x86)\\Git\\bin\\bash.exe"
|
|
|
8
8
|
const WINGET_INSTALL_ARGS = ["install", "--id", "Git.Git", "-e", "--source", "winget"];
|
|
9
9
|
|
|
10
10
|
export function resolveGitBash({ platform, env, exists, where }) {
|
|
11
|
-
if (platform !== "win32") return { found: true, path: null, source: "not-required" };
|
|
11
|
+
if (platform !== "win32") return { found: true, path: null, source: "not-required", checkedPaths: [] };
|
|
12
12
|
|
|
13
13
|
const checkedPaths = [];
|
|
14
14
|
const envPath = nonEmptyEnvValue(env, GIT_BASH_ENV_KEY);
|
|
15
15
|
if (envPath !== undefined) {
|
|
16
16
|
checkedPaths.push(envPath);
|
|
17
|
-
if (isBashExePath(envPath) && exists(envPath)) return { found: true, path: envPath, source: "env" };
|
|
17
|
+
if (isBashExePath(envPath) && exists(envPath)) return { found: true, path: envPath, source: "env", checkedPaths };
|
|
18
18
|
return missingGitBash(checkedPaths);
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -23,14 +23,15 @@ export function resolveGitBash({ platform, env, exists, where }) {
|
|
|
23
23
|
{ path: PROGRAM_FILES_X86_GIT_BASH, source: "program-files-x86" },
|
|
24
24
|
]) {
|
|
25
25
|
checkedPaths.push(candidate.path);
|
|
26
|
-
if (exists(candidate.path)) return { found: true, path: candidate.path, source: candidate.source };
|
|
26
|
+
if (exists(candidate.path)) return { found: true, path: candidate.path, source: candidate.source, checkedPaths };
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
for (const pathCandidate of where("bash")) {
|
|
30
30
|
const candidate = pathCandidate.trim();
|
|
31
31
|
if (candidate.length === 0) continue;
|
|
32
32
|
checkedPaths.push(candidate);
|
|
33
|
-
if (
|
|
33
|
+
if (isKnownNonGitBashLauncher(candidate)) continue;
|
|
34
|
+
if (isBashExePath(candidate) && exists(candidate)) return { found: true, path: candidate, source: "path", checkedPaths };
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
return missingGitBash(checkedPaths);
|
|
@@ -86,6 +87,13 @@ function isBashExePath(path) {
|
|
|
86
87
|
return path.toLowerCase().endsWith("bash.exe");
|
|
87
88
|
}
|
|
88
89
|
|
|
90
|
+
const NON_GIT_BASH_LAUNCHER_DIR_SEGMENTS = ["\\windows\\system32\\", "\\microsoft\\windowsapps\\"];
|
|
91
|
+
|
|
92
|
+
function isKnownNonGitBashLauncher(path) {
|
|
93
|
+
const normalized = path.replaceAll("/", "\\").toLowerCase();
|
|
94
|
+
return NON_GIT_BASH_LAUNCHER_DIR_SEGMENTS.some((segment) => normalized.includes(segment));
|
|
95
|
+
}
|
|
96
|
+
|
|
89
97
|
function whereCommand(command) {
|
|
90
98
|
try {
|
|
91
99
|
return execFileSync("where", [command], { encoding: "utf8" })
|