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,6 +4,7 @@ import { tmpdir } from "node:os";
|
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
5
|
import test from "node:test";
|
|
6
6
|
|
|
7
|
+
import { forceDisableMultiAgentV2 } from "../scripts/migrate-codex-config/multi-agent-v2-guard.mjs";
|
|
7
8
|
import { ensureCodexReasoningConfig, migrateCodexConfig } from "../scripts/migrate-codex-config.mjs";
|
|
8
9
|
|
|
9
10
|
test("#given stale root reasoning config #when ensuring config #then replaces stale values without duplicate keys", () => {
|
|
@@ -192,6 +193,9 @@ test("#given user-customized Codex model config #when migrating #then user value
|
|
|
192
193
|
'model_reasoning_effort = "medium"',
|
|
193
194
|
'plan_mode_reasoning_effort = "medium"',
|
|
194
195
|
"",
|
|
196
|
+
"[features.multi_agent_v2]",
|
|
197
|
+
"enabled = false",
|
|
198
|
+
"",
|
|
195
199
|
].join("\n"),
|
|
196
200
|
);
|
|
197
201
|
|
|
@@ -325,6 +329,9 @@ test("#given config already matches current catalog #when catalog version advanc
|
|
|
325
329
|
'model_reasoning_effort = "high"',
|
|
326
330
|
'plan_mode_reasoning_effort = "xhigh"',
|
|
327
331
|
"",
|
|
332
|
+
"[features.multi_agent_v2]",
|
|
333
|
+
"enabled = false",
|
|
334
|
+
"",
|
|
328
335
|
].join("\n"),
|
|
329
336
|
);
|
|
330
337
|
await writeFile(
|
|
@@ -361,6 +368,260 @@ test("#given config already matches current catalog #when catalog version advanc
|
|
|
361
368
|
assert.equal(state.files[configPath].catalogVersion, "test.role-only");
|
|
362
369
|
});
|
|
363
370
|
|
|
371
|
+
test("#given multi_agent_v2 enabled #when forcing disable #then flips the flag to false", () => {
|
|
372
|
+
const config = [
|
|
373
|
+
'model = "gpt-5.5"',
|
|
374
|
+
'model_reasoning_effort = "high"',
|
|
375
|
+
"",
|
|
376
|
+
"[features.multi_agent_v2]",
|
|
377
|
+
"enabled = true",
|
|
378
|
+
"max_concurrent_threads_per_session = 10000",
|
|
379
|
+
"",
|
|
380
|
+
].join("\n");
|
|
381
|
+
|
|
382
|
+
const result = forceDisableMultiAgentV2(config);
|
|
383
|
+
|
|
384
|
+
assert.match(result, /enabled = false/);
|
|
385
|
+
assert.doesNotMatch(result, /enabled = true/);
|
|
386
|
+
assert.match(result, /max_concurrent_threads_per_session = 10000/);
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
test("#given no multi_agent_v2 section #when forcing disable #then appends a disabled section", () => {
|
|
390
|
+
const config = [
|
|
391
|
+
'model = "gpt-5.5"',
|
|
392
|
+
'model_reasoning_effort = "high"',
|
|
393
|
+
"",
|
|
394
|
+
"[features]",
|
|
395
|
+
"plugins = true",
|
|
396
|
+
"",
|
|
397
|
+
].join("\n");
|
|
398
|
+
|
|
399
|
+
const result = forceDisableMultiAgentV2(config);
|
|
400
|
+
|
|
401
|
+
assert.match(result, /\[features\.multi_agent_v2\]\nenabled = false\n/);
|
|
402
|
+
assert.match(result, /plugins = true/);
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
test("#given multi_agent_v2 section without enabled key #when forcing disable #then inserts enabled = false", () => {
|
|
406
|
+
const config = [
|
|
407
|
+
'model = "gpt-5.5"',
|
|
408
|
+
"",
|
|
409
|
+
"[features.multi_agent_v2]",
|
|
410
|
+
"max_concurrent_threads_per_session = 10000",
|
|
411
|
+
"",
|
|
412
|
+
].join("\n");
|
|
413
|
+
|
|
414
|
+
const result = forceDisableMultiAgentV2(config);
|
|
415
|
+
|
|
416
|
+
assert.match(result, /\[features\.multi_agent_v2\]\nenabled = false\n/);
|
|
417
|
+
assert.match(result, /max_concurrent_threads_per_session = 10000/);
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
test("#given [features] boolean shorthand multi_agent_v2 = true #when forcing disable #then removes it and appends a disabled section", () => {
|
|
421
|
+
const config = [
|
|
422
|
+
'model = "gpt-5.5"',
|
|
423
|
+
"",
|
|
424
|
+
"[features]",
|
|
425
|
+
"plugins = true",
|
|
426
|
+
"multi_agent_v2 = true",
|
|
427
|
+
"",
|
|
428
|
+
].join("\n");
|
|
429
|
+
|
|
430
|
+
const result = forceDisableMultiAgentV2(config);
|
|
431
|
+
|
|
432
|
+
assert.doesNotMatch(result, /^multi_agent_v2\s*=/m);
|
|
433
|
+
assert.match(result, /\[features\.multi_agent_v2\]\nenabled = false\n/);
|
|
434
|
+
assert.match(result, /plugins = true/);
|
|
435
|
+
});
|
|
436
|
+
|
|
437
|
+
test("#given multi_agent_v2 enabled #when forcing disable #then annotates the managed section with the upstream issue and opt-out", () => {
|
|
438
|
+
const config = [
|
|
439
|
+
'model = "gpt-5.5"',
|
|
440
|
+
"",
|
|
441
|
+
"[features.multi_agent_v2]",
|
|
442
|
+
"enabled = true",
|
|
443
|
+
"",
|
|
444
|
+
].join("\n");
|
|
445
|
+
|
|
446
|
+
const result = forceDisableMultiAgentV2(config);
|
|
447
|
+
|
|
448
|
+
assert.match(result, /openai\/codex#26753/);
|
|
449
|
+
assert.match(result, /LAZYCODEX_CONFIG_MIGRATION_DISABLED=1/);
|
|
450
|
+
assert.match(result, /^#[^\n]*\n(?:#[^\n]*\n)*\[features\.multi_agent_v2\]/m);
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
test("#given no multi_agent_v2 section #when forcing disable #then annotates the appended section", () => {
|
|
454
|
+
const config = ['model = "gpt-5.5"', ""].join("\n");
|
|
455
|
+
|
|
456
|
+
const result = forceDisableMultiAgentV2(config);
|
|
457
|
+
|
|
458
|
+
assert.match(result, /openai\/codex#26753/);
|
|
459
|
+
assert.match(result, /^#[^\n]*\n(?:#[^\n]*\n)*\[features\.multi_agent_v2\]\nenabled = false\n/m);
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
test("#given an annotated managed section #when forcing disable runs again #then does not duplicate the comment", () => {
|
|
463
|
+
const config = ['model = "gpt-5.5"', "", "[features.multi_agent_v2]", "enabled = true", ""].join("\n");
|
|
464
|
+
|
|
465
|
+
const annotated = forceDisableMultiAgentV2(config);
|
|
466
|
+
const rerun = forceDisableMultiAgentV2(`${annotated.replace("enabled = false", "enabled = true")}`);
|
|
467
|
+
|
|
468
|
+
const markers = rerun.match(/openai\/codex#26753/g) ?? [];
|
|
469
|
+
assert.equal(markers.length, 1);
|
|
470
|
+
assert.match(rerun, /enabled = false/);
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
test("#given [features] boolean shorthand multi_agent_v2 = false #when forcing disable #then returns config unchanged", () => {
|
|
474
|
+
const config = [
|
|
475
|
+
'model = "gpt-5.5"',
|
|
476
|
+
"",
|
|
477
|
+
"[features]",
|
|
478
|
+
"multi_agent_v2 = false",
|
|
479
|
+
"",
|
|
480
|
+
].join("\n");
|
|
481
|
+
|
|
482
|
+
const result = forceDisableMultiAgentV2(config);
|
|
483
|
+
|
|
484
|
+
assert.equal(result, config);
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
test("#given multi_agent_v2 already disabled #when forcing disable #then returns config unchanged", () => {
|
|
488
|
+
const config = [
|
|
489
|
+
'model = "gpt-5.5"',
|
|
490
|
+
'model_reasoning_effort = "high"',
|
|
491
|
+
"",
|
|
492
|
+
"[features.multi_agent_v2]",
|
|
493
|
+
"enabled = false",
|
|
494
|
+
"max_concurrent_threads_per_session = 10000",
|
|
495
|
+
"",
|
|
496
|
+
].join("\n");
|
|
497
|
+
|
|
498
|
+
const result = forceDisableMultiAgentV2(config);
|
|
499
|
+
|
|
500
|
+
assert.equal(result, config);
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
test("#given global config without multi_agent_v2 section #when full migration runs #then writes a disabled section on disk", async () => {
|
|
504
|
+
const root = await mkdtemp(join(tmpdir(), "lazycodex-multi-agent-v2-guard-"));
|
|
505
|
+
const codexHome = join(root, "codex-home");
|
|
506
|
+
await mkdir(codexHome, { recursive: true });
|
|
507
|
+
const configPath = join(codexHome, "config.toml");
|
|
508
|
+
await writeFile(
|
|
509
|
+
configPath,
|
|
510
|
+
[
|
|
511
|
+
'model = "gpt-5.5"',
|
|
512
|
+
'model_reasoning_effort = "high"',
|
|
513
|
+
"",
|
|
514
|
+
].join("\n"),
|
|
515
|
+
);
|
|
516
|
+
|
|
517
|
+
const result = await migrateCodexConfig({
|
|
518
|
+
env: { CODEX_HOME: codexHome, LAZYCODEX_MODEL_CATALOG_STATE_PATH: join(root, "model-state.json") },
|
|
519
|
+
cwd: root,
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
assert.deepEqual(result.changed, [configPath]);
|
|
523
|
+
const content = await readFile(configPath, "utf8");
|
|
524
|
+
assert.match(content, /\[features\.multi_agent_v2\]\nenabled = false\n/);
|
|
525
|
+
});
|
|
526
|
+
|
|
527
|
+
test("#given global config with forced multi_agent_v2 #when full migration runs #then disables it on disk", async () => {
|
|
528
|
+
const root = await mkdtemp(join(tmpdir(), "lazycodex-multi-agent-v2-guard-"));
|
|
529
|
+
const codexHome = join(root, "codex-home");
|
|
530
|
+
await mkdir(codexHome, { recursive: true });
|
|
531
|
+
const configPath = join(codexHome, "config.toml");
|
|
532
|
+
await writeFile(
|
|
533
|
+
configPath,
|
|
534
|
+
[
|
|
535
|
+
'model = "gpt-5.5"',
|
|
536
|
+
'model_reasoning_effort = "high"',
|
|
537
|
+
"",
|
|
538
|
+
"[features.multi_agent_v2]",
|
|
539
|
+
"enabled = true",
|
|
540
|
+
"max_concurrent_threads_per_session = 10000",
|
|
541
|
+
"",
|
|
542
|
+
].join("\n"),
|
|
543
|
+
);
|
|
544
|
+
|
|
545
|
+
const result = await migrateCodexConfig({
|
|
546
|
+
env: { CODEX_HOME: codexHome, LAZYCODEX_MODEL_CATALOG_STATE_PATH: join(root, "model-state.json") },
|
|
547
|
+
cwd: root,
|
|
548
|
+
});
|
|
549
|
+
|
|
550
|
+
assert.deepEqual(result.changed, [configPath]);
|
|
551
|
+
const content = await readFile(configPath, "utf8");
|
|
552
|
+
assert.match(content, /enabled = false/);
|
|
553
|
+
assert.doesNotMatch(content, /enabled = true/);
|
|
554
|
+
});
|
|
555
|
+
|
|
556
|
+
test("#given enabled = true with an inline comment #when forcing disable #then flips to false and preserves the comment", () => {
|
|
557
|
+
const config = ["[features.multi_agent_v2]", "enabled = true # tuned by me", ""].join("\n");
|
|
558
|
+
|
|
559
|
+
const result = forceDisableMultiAgentV2(config);
|
|
560
|
+
|
|
561
|
+
assert.match(result, /^enabled = false # tuned by me$/m);
|
|
562
|
+
assert.doesNotMatch(result, /enabled = true/);
|
|
563
|
+
assert.equal((result.match(/^\s*enabled\s*=/gm) ?? []).length, 1);
|
|
564
|
+
assert.equal((result.match(/\[features\.multi_agent_v2\]/g) ?? []).length, 1);
|
|
565
|
+
});
|
|
566
|
+
|
|
567
|
+
test("#given a section header with an inline comment #when forcing disable #then patches in place without duplicating the table", () => {
|
|
568
|
+
const config = ["[features.multi_agent_v2] # pinned by me", "enabled = true", ""].join("\n");
|
|
569
|
+
|
|
570
|
+
const result = forceDisableMultiAgentV2(config);
|
|
571
|
+
|
|
572
|
+
assert.equal((result.match(/\[features\.multi_agent_v2\]/g) ?? []).length, 1);
|
|
573
|
+
assert.match(result, /enabled = false/);
|
|
574
|
+
assert.doesNotMatch(result, /enabled = true/);
|
|
575
|
+
assert.match(result, /# pinned by me/);
|
|
576
|
+
});
|
|
577
|
+
|
|
578
|
+
test("#given an already-guarded commented config #when re-running #then output is byte-identical", () => {
|
|
579
|
+
const configA = ["[features.multi_agent_v2]", "enabled = true # tuned by me", ""].join("\n");
|
|
580
|
+
const configB = ["[features.multi_agent_v2] # pinned by me", "enabled = true", ""].join("\n");
|
|
581
|
+
|
|
582
|
+
const firstA = forceDisableMultiAgentV2(configA);
|
|
583
|
+
const rerunA = forceDisableMultiAgentV2(firstA);
|
|
584
|
+
assert.equal(rerunA, firstA);
|
|
585
|
+
|
|
586
|
+
const firstB = forceDisableMultiAgentV2(configB);
|
|
587
|
+
const rerunB = forceDisableMultiAgentV2(firstB);
|
|
588
|
+
assert.equal(rerunB, firstB);
|
|
589
|
+
});
|
|
590
|
+
|
|
591
|
+
test("#given user-disabled with an inline comment #when forcing disable #then returns config unchanged", () => {
|
|
592
|
+
const config = ["[features.multi_agent_v2]", "enabled = false # I turned this off myself", ""].join("\n");
|
|
593
|
+
|
|
594
|
+
const result = forceDisableMultiAgentV2(config);
|
|
595
|
+
|
|
596
|
+
assert.equal(result, config);
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
test("#given [features] shorthand true with an inline comment #when forcing disable #then removes the shorthand and appends one disabled table", () => {
|
|
600
|
+
const config = ["[features]", "plugins = true", "multi_agent_v2 = true # legacy", ""].join("\n");
|
|
601
|
+
|
|
602
|
+
const result = forceDisableMultiAgentV2(config);
|
|
603
|
+
|
|
604
|
+
assert.doesNotMatch(result, /^\s*multi_agent_v2\s*=/m);
|
|
605
|
+
assert.equal((result.match(/\[features\.multi_agent_v2\]/g) ?? []).length, 1);
|
|
606
|
+
assert.match(result, /\[features\.multi_agent_v2\]\nenabled = false\n/);
|
|
607
|
+
assert.match(result, /plugins = true/);
|
|
608
|
+
});
|
|
609
|
+
|
|
610
|
+
test("#given a following section header with an inline comment #when inserting enabled=false #then does not leak into the next section", () => {
|
|
611
|
+
const config = [
|
|
612
|
+
"[features.multi_agent_v2]",
|
|
613
|
+
"max_concurrent_threads_per_session = 2",
|
|
614
|
+
"[mcp_servers.x] # note",
|
|
615
|
+
"enabled = true",
|
|
616
|
+
"",
|
|
617
|
+
].join("\n");
|
|
618
|
+
|
|
619
|
+
const result = forceDisableMultiAgentV2(config);
|
|
620
|
+
|
|
621
|
+
assert.match(result, /\[features\.multi_agent_v2\]\nenabled = false\n/);
|
|
622
|
+
assert.match(result, /\[mcp_servers\.x\][^\n]*\nenabled = true/);
|
|
623
|
+
});
|
|
624
|
+
|
|
364
625
|
async function canCreateSymlink(type) {
|
|
365
626
|
const root = await mkdtemp(join(tmpdir(), "lazycodex-symlink-capability-"));
|
|
366
627
|
const target = join(root, "target");
|
|
@@ -43,33 +43,6 @@ test("#given start-work skill without selectable plan #when inspected #then boot
|
|
|
43
43
|
assert.deepEqual(missing, []);
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
test("#given worker done claim #when start-work contract is inspected #then adversarial verification gates fully done", async () => {
|
|
47
|
-
// given
|
|
48
|
-
const missing = [];
|
|
49
|
-
|
|
50
|
-
// when
|
|
51
|
-
for (const skillPath of startWorkSkillPaths) {
|
|
52
|
-
const skill = await readFile(skillPath, "utf8");
|
|
53
|
-
if (
|
|
54
|
-
!/DoneClaim/i.test(skill) ||
|
|
55
|
-
!/worker done claim/i.test(skill) ||
|
|
56
|
-
!/stale_state/.test(skill) ||
|
|
57
|
-
!/misleading_success_output/.test(skill) ||
|
|
58
|
-
!/dirty_worktree/.test(skill) ||
|
|
59
|
-
!/Plan reread/i.test(skill) ||
|
|
60
|
-
!/Manual-QA/i.test(skill) ||
|
|
61
|
-
!/Adversarial QA/i.test(skill) ||
|
|
62
|
-
!/Cleanup/i.test(skill) ||
|
|
63
|
-
!/Only after verification passes/i.test(skill)
|
|
64
|
-
) {
|
|
65
|
-
missing.push(skillPath);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// then
|
|
70
|
-
assert.deepEqual(missing, []);
|
|
71
|
-
});
|
|
72
|
-
|
|
73
46
|
test("#given packaged start-work completion surfaces #when inspected #then global review and debugging gate blocks completion", async () => {
|
|
74
47
|
// given
|
|
75
48
|
const [startWorkSkill, reviewWorkSkill, hephaestusRule] = await Promise.all([
|
|
@@ -83,13 +56,18 @@ test("#given packaged start-work completion surfaces #when inspected #then globa
|
|
|
83
56
|
assert.match(startWorkSkill, /\breview-work\b/);
|
|
84
57
|
assert.match(startWorkSkill, /\bdebugging\b/);
|
|
85
58
|
assert.match(startWorkSkill, /inconclusive/i);
|
|
86
|
-
assert.match(startWorkSkill, /redact|mask/i);
|
|
87
|
-
assert.match(startWorkSkill, /raw (?:tokens|credentials|auth headers|cookies)/i);
|
|
88
|
-
assert.match(startWorkSkill, /ORCHESTRATION COMPLETE/);
|
|
89
59
|
assert.match(reviewWorkSkill, /debugging/i);
|
|
90
60
|
assert.match(reviewWorkSkill, /inconclusive/i);
|
|
91
61
|
assert.match(hephaestusRule, /Global Review and Debugging Gate/);
|
|
92
|
-
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
test("#given start-work skill #when echo discipline is inspected #then the ultraqa class list is enumerated once and the budget holds", async () => {
|
|
65
|
+
// given
|
|
66
|
+
const skill = await readFile(startWorkSkillPaths[0], "utf8");
|
|
67
|
+
|
|
68
|
+
// then
|
|
69
|
+
assert.equal((skill.match(/malformed input/g) ?? []).length, 1);
|
|
70
|
+
assert.ok(skill.split(/\s+/).filter(Boolean).length <= 1924);
|
|
93
71
|
});
|
|
94
72
|
|
|
95
73
|
test("#given start-work continuation hook #when inspected #then it remains Boulder-only without planning bootstrap logic", async () => {
|
|
@@ -58,7 +58,7 @@ call_omo_agent(subagent_type="explore", prompt="inspect")
|
|
|
58
58
|
|
|
59
59
|
Older variant guidance.
|
|
60
60
|
|
|
61
|
-
When translating \`load_skills=[...]\`, name the skills inside the spawned agent's \`message\`.
|
|
61
|
+
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.
|
|
62
62
|
|
|
63
63
|
---
|
|
64
64
|
|
|
@@ -103,6 +103,71 @@ call_omo_agent(subagent_type="explore", prompt="inspect")
|
|
|
103
103
|
assert.equal(adapted, content);
|
|
104
104
|
});
|
|
105
105
|
|
|
106
|
+
test("#given early generated stale Codex compatibility guidance #when adapting a skill #then it is replaced", () => {
|
|
107
|
+
// given
|
|
108
|
+
const content = `---
|
|
109
|
+
name: example
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Codex Harness Tool Compatibility
|
|
113
|
+
|
|
114
|
+
This skill may include examples copied from the OpenCode harness. In Codex, do not call OpenCode-only tools such as \`call_omo_agent(...)\`, \`task(...)\`, \`background_output(...)\`, or \`team_*(...)\` literally. Translate those examples to Codex native tools:
|
|
115
|
+
|
|
116
|
+
| OpenCode example | Codex tool to use |
|
|
117
|
+
| --- | --- |
|
|
118
|
+
| \`call_omo_agent(subagent_type="explore", ...)\` | \`spawn_agent({"task_name":"...","message":"TASK: act as an explorer. ...","fork_turns":"none"})\` |
|
|
119
|
+
| \`background_output(task_id="...")\` | \`wait_agent(...)\` for mailbox signals; after a timeout, run one \`list_agents\` check for the named child if reassurance is needed |
|
|
120
|
+
|
|
121
|
+
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.
|
|
122
|
+
|
|
123
|
+
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.
|
|
124
|
+
|
|
125
|
+
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.
|
|
126
|
+
|
|
127
|
+
# Example Skill
|
|
128
|
+
|
|
129
|
+
call_omo_agent(subagent_type="explore", prompt="inspect")
|
|
130
|
+
`;
|
|
131
|
+
|
|
132
|
+
// when
|
|
133
|
+
const adapted = insertCodexCompatibilityGuidance(content);
|
|
134
|
+
|
|
135
|
+
// then
|
|
136
|
+
assert.match(adapted, /multi_agent_v1\.spawn_agent/);
|
|
137
|
+
assert.match(adapted, /fork_context":false/);
|
|
138
|
+
assert.match(adapted, /"agent_type":"explorer"/);
|
|
139
|
+
assert.match(adapted, /multi_agent_v1\.wait_agent/);
|
|
140
|
+
assert.doesNotMatch(adapted, /fork_turns="none"/);
|
|
141
|
+
assert.doesNotMatch(adapted, /list_agents/);
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
test("#given generated guidance before a template export #when adapting a skill #then the export wrapper is preserved", () => {
|
|
145
|
+
// given
|
|
146
|
+
const content = `---
|
|
147
|
+
name: refactor
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Codex Harness Tool Compatibility
|
|
151
|
+
|
|
152
|
+
Older variant guidance.
|
|
153
|
+
|
|
154
|
+
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.
|
|
155
|
+
|
|
156
|
+
export const REFACTOR_TEMPLATE = \`# Refactor
|
|
157
|
+
|
|
158
|
+
call_omo_agent(subagent_type="explore", prompt="inspect")
|
|
159
|
+
\`
|
|
160
|
+
`;
|
|
161
|
+
|
|
162
|
+
// when
|
|
163
|
+
const adapted = insertCodexCompatibilityGuidance(content);
|
|
164
|
+
|
|
165
|
+
// then
|
|
166
|
+
assert.match(adapted, /export const REFACTOR_TEMPLATE = `# Refactor/);
|
|
167
|
+
assert.match(adapted, /multi_agent_v1\.spawn_agent/);
|
|
168
|
+
assert.doesNotMatch(adapted, /Older variant guidance/);
|
|
169
|
+
});
|
|
170
|
+
|
|
106
171
|
test("#given synced aggregate Codex skills #when they describe background orchestration #then liveness is framed as progress rather than timeout failure", async () => {
|
|
107
172
|
// given
|
|
108
173
|
const orchestrationPattern = /\b(?:run_in_background|background_output|wait_agent)\b/;
|
|
@@ -110,8 +175,7 @@ test("#given synced aggregate Codex skills #when they describe background orches
|
|
|
110
175
|
["working progress message", /WORKING:/],
|
|
111
176
|
["blocked progress message", /BLOCKED:/],
|
|
112
177
|
["mailbox timeout framing", /timeout only means no new mailbox update arrived/],
|
|
113
|
-
["
|
|
114
|
-
["polling-loop guard", /Do not use `list_agents` as a polling loop|Do NOT use `list_agents` as a polling loop/],
|
|
178
|
+
["multi_agent_v1.wait_agent ref", /multi_agent_v1\.wait_agent/],
|
|
115
179
|
["explicit fallback conditions", /Fallback only when|Mark a file for retry only when/],
|
|
116
180
|
];
|
|
117
181
|
const bannedPatterns = [
|
|
@@ -148,5 +212,5 @@ test("#given review-work skill #when some lanes do not finish #then aggregate re
|
|
|
148
212
|
assert.match(content, /Overall Verdict: PASSED \/ FAILED \/ INCONCLUSIVE/);
|
|
149
213
|
assert.match(content, /PASS\/FAIL\/INCONCLUSIVE \| HIGH\/MED\/LOW/);
|
|
150
214
|
assert.match(content, /Do not spin in repeated/);
|
|
151
|
-
assert.match(content, /Do not use `
|
|
215
|
+
assert.match(content, /Do not use `multi_agent_v1\.send_input` as an interrupt/);
|
|
152
216
|
});
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { readdir } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
|
|
5
|
+
export const CONTEXT_PRESSURE_SKILL_BUDGET_BYTES = 25_000;
|
|
6
|
+
|
|
7
|
+
export const expectedSkills = [
|
|
8
|
+
"comment-checker",
|
|
9
|
+
"debugging",
|
|
10
|
+
"frontend-ui-ux",
|
|
11
|
+
"git-master",
|
|
12
|
+
"init-deep",
|
|
13
|
+
"lcx-contribute-bug-fix",
|
|
14
|
+
"lcx-doctor",
|
|
15
|
+
"lcx-report-bug",
|
|
16
|
+
"lsp",
|
|
17
|
+
"lsp-setup",
|
|
18
|
+
"programming",
|
|
19
|
+
"refactor",
|
|
20
|
+
"remove-ai-slops",
|
|
21
|
+
"review-work",
|
|
22
|
+
"rules",
|
|
23
|
+
"start-work",
|
|
24
|
+
"ultraresearch",
|
|
25
|
+
"ulw-loop",
|
|
26
|
+
"ulw-plan",
|
|
27
|
+
"visual-qa",
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
export const componentSkillSources = [
|
|
31
|
+
["comment-checker", "components/comment-checker/skills/comment-checker"],
|
|
32
|
+
["lsp", "components/lsp/skills/lsp"],
|
|
33
|
+
["rules", "components/rules/skills/rules"],
|
|
34
|
+
["ulw-loop", "components/ulw-loop/skills/ulw-loop"],
|
|
35
|
+
["ulw-plan", "components/ultrawork/skills/ulw-plan"],
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
const codexCompatibilityEndMarkers = [
|
|
39
|
+
"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 `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.\n\n",
|
|
40
|
+
"Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. 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",
|
|
41
|
+
"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",
|
|
42
|
+
"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",
|
|
43
|
+
"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",
|
|
44
|
+
"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",
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
export function removeCodexCompatibilityGuidance(content) {
|
|
48
|
+
const start = content.indexOf("## Codex Harness Tool Compatibility\n\n");
|
|
49
|
+
if (start === -1) return content;
|
|
50
|
+
const structuralEndPattern = /\n(?:---|export\s+const\s+|#{1,6}\s)/g;
|
|
51
|
+
structuralEndPattern.lastIndex = start + "## Codex Harness Tool Compatibility\n\n".length;
|
|
52
|
+
const structuralEnd = structuralEndPattern.exec(content);
|
|
53
|
+
if (structuralEnd) return `${content.slice(0, start)}${content.slice(structuralEnd.index + 1)}`;
|
|
54
|
+
|
|
55
|
+
const endMarker = codexCompatibilityEndMarkers.find((marker) => content.indexOf(marker, start) !== -1);
|
|
56
|
+
assert.notEqual(endMarker, undefined, "Codex compatibility guidance block is missing its terminator");
|
|
57
|
+
const end = content.indexOf(endMarker, start);
|
|
58
|
+
assert.notEqual(end, -1, "Codex compatibility guidance block is missing its terminator");
|
|
59
|
+
return `${content.slice(0, start)}${content.slice(end + endMarker.length)}`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const startWorkOriginalCompletion = `When all top-level checkboxes in \`## TODOs\` and \`## Final Verification Wave\` are complete:
|
|
63
|
+
|
|
64
|
+
1. Run the plan's final verification commands.
|
|
65
|
+
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.
|
|
66
|
+
3. Remove or mark the Boulder work as completed.
|
|
67
|
+
4. Print an \`ORCHESTRATION COMPLETE\` block with the plan path, verification commands, artifacts, and cleanup receipts.`;
|
|
68
|
+
|
|
69
|
+
const startWorkCodexCompletion = `When all top-level checkboxes in \`## TODOs\` and \`## Final Verification Wave\` are complete:
|
|
70
|
+
|
|
71
|
+
1. Run the plan's final verification commands.
|
|
72
|
+
2. Complete the **Global Review and Debugging Gate** before any completion claim, PR handoff, or branch handoff:
|
|
73
|
+
- 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.
|
|
74
|
+
- 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\`.
|
|
75
|
+
- 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.
|
|
76
|
+
- 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.
|
|
77
|
+
- 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.
|
|
78
|
+
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.
|
|
79
|
+
4. Remove or mark the Boulder work as completed.
|
|
80
|
+
5. Print an \`ORCHESTRATION COMPLETE\` block with the plan path, verification commands, Global Review and Debugging Gate verdict, artifacts, and cleanup receipts.`;
|
|
81
|
+
|
|
82
|
+
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>`.";
|
|
83
|
+
|
|
84
|
+
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>`.";
|
|
85
|
+
|
|
86
|
+
const reviewWorkCodexGatePattern =
|
|
87
|
+
/\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/;
|
|
88
|
+
|
|
89
|
+
export function removeCodexSkillOverlays(skillName, content) {
|
|
90
|
+
if (skillName === "start-work") {
|
|
91
|
+
return content
|
|
92
|
+
.replace(startWorkCodexCompletion, startWorkOriginalCompletion)
|
|
93
|
+
.replace(startWorkCodexHardRule, startWorkOriginalHardRule);
|
|
94
|
+
}
|
|
95
|
+
if (skillName === "review-work") {
|
|
96
|
+
return content.replace(reviewWorkCodexGatePattern, "");
|
|
97
|
+
}
|
|
98
|
+
return content;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export async function listSkillFiles(dir) {
|
|
102
|
+
const entries = await readdir(dir, { withFileTypes: true });
|
|
103
|
+
const files = [];
|
|
104
|
+
for (const entry of entries) {
|
|
105
|
+
if (entry.isDirectory()) {
|
|
106
|
+
const nested = await listSkillFiles(join(dir, entry.name));
|
|
107
|
+
for (const nestedPath of nested) files.push(join(entry.name, nestedPath));
|
|
108
|
+
} else {
|
|
109
|
+
files.push(entry.name);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return files.sort();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function assertPackagedContentMatches({ path, content }, requirements) {
|
|
116
|
+
for (const [label, pattern] of requirements) {
|
|
117
|
+
assert.match(content, pattern, `${path} missing packaged skill contract: ${label}`);
|
|
118
|
+
}
|
|
119
|
+
}
|