oh-my-opencode 4.18.2 → 4.19.1
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/.agents/command/omomomo.md +1 -1
- package/.agents/skills/omomomo/SKILL.md +1 -1
- package/.opencode/command/omomomo.md +1 -1
- package/README.ja.md +6 -6
- package/README.ko.md +6 -6
- package/README.md +8 -8
- package/README.ru.md +6 -6
- package/README.zh-cn.md +6 -6
- package/dist/agents/atlas/agent.d.ts +7 -6
- package/dist/agents/gpt-prompt-identity.d.ts +3 -0
- package/dist/agents/sisyphus/gpt-5-5.d.ts +1 -1
- package/dist/agents/sisyphus/gpt-task-system-guide.d.ts +1 -0
- package/dist/agents/sisyphus/index.d.ts +5 -0
- package/dist/agents/sisyphus/kimi-k3.d.ts +19 -0
- package/dist/agents/sisyphus-agent-factory.d.ts +1 -1
- package/dist/agents/sisyphus-junior/agent.d.ts +8 -4
- package/dist/agents/sisyphus-junior/gpt-5-5.d.ts +2 -2
- package/dist/agents/sisyphus-junior/index.d.ts +2 -0
- package/dist/agents/sisyphus-junior/kimi-k3.d.ts +12 -0
- package/dist/agents/types.d.ts +2 -2
- package/dist/cli/index.js +781 -215
- package/dist/cli-node/index.js +781 -215
- package/dist/config/index.d.ts +1 -1
- package/dist/config/schema/agent-overrides.d.ts +48 -48
- package/dist/config/schema/browser-automation.d.ts +1 -0
- package/dist/config/schema/categories.d.ts +6 -6
- package/dist/config/schema/codegraph.d.ts +2 -0
- package/dist/config/schema/commands.d.ts +1 -3
- package/dist/config/schema/default-mode.d.ts +1 -1
- package/dist/config/schema/fallback-models.d.ts +5 -5
- package/dist/config/schema/goal.d.ts +7 -0
- package/dist/config/schema/hooks.d.ts +1 -1
- package/dist/config/schema/oh-my-opencode-config.d.ts +56 -58
- package/dist/config/schema/ralph-loop.d.ts +1 -1
- package/dist/config/schema.d.ts +1 -1
- package/dist/create-hooks.d.ts +1 -1
- package/dist/features/builtin-commands/templates/goal.d.ts +1 -0
- package/dist/features/builtin-commands/templates/stop-continuation.d.ts +1 -1
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/hooks/auto-slash-command/executor.d.ts +1 -0
- package/dist/hooks/codegraph-bootstrap/hook.d.ts +3 -2
- package/dist/hooks/goal/command-arguments.d.ts +13 -0
- package/dist/hooks/goal/controller.d.ts +26 -0
- package/dist/hooks/goal/index.d.ts +23 -0
- package/dist/hooks/goal/prompt.d.ts +3 -0
- package/dist/hooks/goal/store.d.ts +8 -0
- package/dist/hooks/goal/tools.d.ts +10 -0
- package/dist/hooks/goal/types.d.ts +93 -0
- package/dist/hooks/goal/validation.d.ts +4 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/keyword-detector/hook.d.ts +1 -2
- package/dist/hooks/ralph-loop/types.d.ts +1 -1
- package/dist/hooks/sisyphus-junior-notepad/constants.d.ts +1 -1
- package/dist/hooks/start-work/notepad-scaffold.d.ts +10 -0
- package/dist/index.js +5398 -5109
- package/dist/oh-my-opencode.schema.json +34 -19
- package/dist/plugin/chat-message/loop-commands.d.ts +1 -1
- package/dist/plugin/chat-message/types.d.ts +23 -10
- package/dist/plugin/hooks/create-core-hooks.d.ts +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +3 -2
- package/dist/plugin/hooks/create-transform-hooks.d.ts +0 -2
- package/dist/plugin/stop-continuation.d.ts +2 -2
- package/dist/shared/omo-process-sweep.d.ts +18 -0
- package/dist/shared/system-directive.d.ts +0 -1
- package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +87 -0
- package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.ts +35 -5
- package/dist/skills/ulw-plan/SKILL.md +31 -8
- package/dist/skills/ulw-plan/references/full-workflow.md +117 -6
- package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
- package/dist/skills/ulw-research/SKILL.md +3 -3
- package/dist/testing/create-plugin-module.d.ts +1 -0
- package/dist/tools/delegate-task/types.d.ts +0 -1
- package/dist/tui.js +138 -80
- package/package.json +14 -14
- package/packages/git-bash-mcp/dist/cli.js +54 -8
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +60 -0
- package/packages/lsp-core/src/lsp/client.ts +14 -1
- package/packages/lsp-core/src/lsp/fixtures/diagnostics-freshness-contract-probe.ts +2 -2
- package/packages/lsp-core/src/mcp.ts +9 -0
- package/packages/lsp-daemon/dist/cli.js +319 -51
- package/packages/lsp-daemon/dist/client.js +136 -48
- package/packages/lsp-daemon/dist/daemon-client.d.ts +0 -10
- package/packages/lsp-daemon/dist/daemon-client.js +4 -34
- package/packages/lsp-daemon/dist/daemon-failure-result.d.ts +3 -0
- package/packages/lsp-daemon/dist/daemon-failure-result.js +38 -0
- package/packages/lsp-daemon/dist/daemon-request-error.d.ts +14 -0
- package/packages/lsp-daemon/dist/daemon-request-error.js +26 -0
- package/packages/lsp-daemon/dist/daemon-server.js +5 -1
- package/packages/lsp-daemon/dist/index.js +137 -48
- package/packages/lsp-daemon/dist/proxy.d.ts +2 -0
- package/packages/lsp-daemon/dist/proxy.js +1 -0
- package/packages/lsp-daemon/dist/version-reap.d.ts +26 -0
- package/packages/lsp-daemon/dist/version-reap.js +182 -0
- package/packages/lsp-tools-mcp/dist/cli.js +61 -10
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +6 -1
- package/packages/lsp-tools-mcp/dist/mcp.js +61 -10
- package/packages/lsp-tools-mcp/dist/tools.js +6 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +416 -25
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/src/setup.ts +22 -2
- package/packages/omo-codex/plugin/components/codegraph/AGENTS.md +7 -6
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +638 -267
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +178 -89
- package/packages/omo-codex/plugin/components/codegraph/package.json +2 -2
- package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +3 -1
- package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +3 -1
- package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +98 -32
- package/packages/omo-codex/plugin/components/codegraph/src/mcp-unavailable.ts +5 -0
- package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +15 -6
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +6 -2
- package/packages/omo-codex/plugin/components/codegraph/src/sweep-cli.ts +1 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-exclusion.test.ts +1 -1
- package/packages/omo-codex/plugin/components/codegraph/test/hook-store-upgrade.test.ts +148 -0
- package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +31 -2
- package/packages/omo-codex/plugin/components/codegraph/test/package-runtime.test.ts +1 -1
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge-lifecycle.test.ts +65 -1
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +3 -7
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-facade.test.ts +1 -1
- package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +57 -3
- package/packages/omo-codex/plugin/components/codegraph/test/serve-unavailable.test.ts +41 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +109 -8
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-node-support.test.ts +2 -2
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-flow.test.ts +43 -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/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/AGENTS.md +1 -0
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +80 -40
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/dist/cli.js +11 -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/post-compact-budget.ts +11 -0
- package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +60 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/AGENTS.md +8 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +147 -60
- 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/src/boulder-reader.ts +3 -71
- package/packages/omo-codex/plugin/components/start-work-continuation/src/plan-checklist.ts +171 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/test/boulder-reader.test.ts +198 -23
- package/packages/omo-codex/plugin/components/start-work-continuation/test/cli.test.ts +4 -3
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +6 -5
- package/packages/omo-codex/plugin/components/start-work-continuation/test/fixtures/plan-scaffold.md +15 -0
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- 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.md +10 -10
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-clone-fidelity-reviewer.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-high.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/momus.toml +3 -3
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +1 -1
- 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 +31 -8
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +117 -6
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
- package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook-trigger-policy.test.ts +42 -0
- package/packages/omo-codex/plugin/components/ulw-loop/README.md +6 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.d.ts +21 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.js +64 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +15 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-arg-parser.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +3 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.d.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +85 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.d.ts +0 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +13 -33
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +998 -593
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.js +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.js +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +10 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-batch.d.ts +15 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-batch.js +84 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.d.ts +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.js +81 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +7 -59
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +12 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/validation-batch.d.ts +9 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/validation-batch.js +122 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +8 -6
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-continuation.ts +84 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +13 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-arg-parser.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +3 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-steering.ts +49 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +13 -45
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/constants.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/goal-status.ts +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +4 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +20 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-verdicts.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-batch.ts +125 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-mutations.ts +59 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +6 -58
- package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +12 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/validation-batch.ts +122 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-continuation.test.ts +76 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-checkpoint-continuation.test.ts +111 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-steering-batch.test.ts +67 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-validation-batch.test.ts +57 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering-batch.test.ts +152 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +29 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/validation-batch-checkpoint.test.ts +147 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/validation-batch.test.ts +73 -0
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +2 -2
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +2 -2
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +2 -2
- package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +41 -41
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +32 -28
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +17 -45
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/toml-section-editor.mjs +455 -0
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +3 -18
- package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +43 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +35 -5
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +8 -6
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +31 -8
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +117 -6
- package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +11 -11
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +26 -0
- package/packages/omo-codex/plugin/test/bootstrap-setup.test.mjs +41 -0
- package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +2 -2
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +6 -6
- package/packages/omo-codex/plugin/test/multi-agent-v2-regression.test.mjs +3 -3
- package/packages/omo-codex/plugin/test/scaffold-plan.test.mjs +62 -0
- package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +271 -14
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +3 -18
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +0 -5
- package/packages/omo-codex/plugin/test/ulw-plan-review-state-contract.test.mjs +293 -0
- package/packages/omo-codex/scripts/install-config.test.mjs +10 -10
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +401 -22
- package/packages/omo-codex/scripts/install-generated-bundle.test.mjs +39 -2
- package/packages/omo-codex/scripts/install-marketplace-cache.test.mjs +4 -1
- package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +87 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.ts +35 -5
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +31 -8
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +117 -6
- package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
- package/packages/shared-skills/skills/ulw-research/SKILL.md +3 -3
- package/dist/features/builtin-commands/templates/ralph-loop.d.ts +0 -3
- package/dist/skills/ultraresearch/SKILL.md +0 -10
- package/packages/shared-skills/skills/lcx-contribute-bug-fix/SKILL.md +0 -273
- package/packages/shared-skills/skills/lcx-contribute-bug-fix/agents/openai.yaml +0 -12
- package/packages/shared-skills/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +0 -107
- package/packages/shared-skills/skills/lcx-doctor/SKILL.md +0 -128
- package/packages/shared-skills/skills/lcx-doctor/agents/openai.yaml +0 -11
- package/packages/shared-skills/skills/lcx-report-bug/SKILL.md +0 -268
- package/packages/shared-skills/skills/lcx-report-bug/agents/openai.yaml +0 -11
- package/packages/shared-skills/skills/ultraresearch/SKILL.md +0 -10
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-contribute-bug-fix/SKILL.md +0 -0
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-contribute-bug-fix/agents/openai.yaml +0 -0
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +0 -0
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-doctor/SKILL.md +0 -0
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-doctor/agents/openai.yaml +0 -0
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-report-bug/SKILL.md +0 -0
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-report-bug/agents/openai.yaml +0 -0
|
@@ -438,7 +438,7 @@ async function readOptionalFile(path) {
|
|
|
438
438
|
}
|
|
439
439
|
|
|
440
440
|
// components/bootstrap/src/worker.ts
|
|
441
|
-
import { appendFile as appendFile2, mkdir as mkdir8, readFile as
|
|
441
|
+
import { appendFile as appendFile2, mkdir as mkdir8, readFile as readFile14 } from "node:fs/promises";
|
|
442
442
|
import { homedir as homedir4 } from "node:os";
|
|
443
443
|
import { dirname as dirname9, join as join22, resolve as resolve7 } from "node:path";
|
|
444
444
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
@@ -864,7 +864,7 @@ async function defaultVersionProbe2(binaryPath) {
|
|
|
864
864
|
}
|
|
865
865
|
|
|
866
866
|
// components/bootstrap/src/setup.ts
|
|
867
|
-
import { copyFile as copyFile2, mkdir as mkdir7, readdir as readdir5, rm as rm10, stat as stat5 } from "node:fs/promises";
|
|
867
|
+
import { copyFile as copyFile2, mkdir as mkdir7, readFile as readFile13, readdir as readdir5, rm as rm10, stat as stat5 } from "node:fs/promises";
|
|
868
868
|
import { join as join21 } from "node:path";
|
|
869
869
|
|
|
870
870
|
// ../src/install/link-cached-plugin-agents.ts
|
|
@@ -882,9 +882,16 @@ function findTomlSection(config, header) {
|
|
|
882
882
|
const lines = config.match(/[^\n]*\n?|$/g) ?? [];
|
|
883
883
|
let offset = 0;
|
|
884
884
|
let start = -1;
|
|
885
|
+
let multilineQuote = null;
|
|
885
886
|
for (const line of lines) {
|
|
886
887
|
if (line.length === 0)
|
|
887
888
|
break;
|
|
889
|
+
const multilineScan = scanTomlMultilineLine(line, multilineQuote);
|
|
890
|
+
multilineQuote = multilineScan.nextQuote;
|
|
891
|
+
if (multilineScan.wasInside) {
|
|
892
|
+
offset += line.length;
|
|
893
|
+
continue;
|
|
894
|
+
}
|
|
888
895
|
const trimmed = line.trim();
|
|
889
896
|
if (start === -1) {
|
|
890
897
|
if (tomlTableHeaderMatches(trimmed, headerLine, targetHeaderPath))
|
|
@@ -899,8 +906,37 @@ function findTomlSection(config, header) {
|
|
|
899
906
|
return { start, end: config.length, text: config.slice(start) };
|
|
900
907
|
}
|
|
901
908
|
function replaceOrInsertSetting(config, section, key, value) {
|
|
902
|
-
const
|
|
903
|
-
|
|
909
|
+
const targetPath = parseTomlDottedKey(key);
|
|
910
|
+
if (!targetPath)
|
|
911
|
+
return config;
|
|
912
|
+
const lines = section.text.match(/[^\n]*\n?|$/g) ?? [];
|
|
913
|
+
let offset = 0;
|
|
914
|
+
let multilineQuote = null;
|
|
915
|
+
for (const line of lines) {
|
|
916
|
+
if (line.length === 0)
|
|
917
|
+
break;
|
|
918
|
+
const multilineScan = scanTomlMultilineLine(line, multilineQuote);
|
|
919
|
+
multilineQuote = multilineScan.nextQuote;
|
|
920
|
+
if (multilineScan.wasInside) {
|
|
921
|
+
offset += line.length;
|
|
922
|
+
continue;
|
|
923
|
+
}
|
|
924
|
+
const assignmentIndex = findUnquotedAssignment(line);
|
|
925
|
+
if (assignmentIndex < 0) {
|
|
926
|
+
offset += line.length;
|
|
927
|
+
continue;
|
|
928
|
+
}
|
|
929
|
+
const settingPath = parseTomlDottedKey(line.slice(0, assignmentIndex).trim());
|
|
930
|
+
if (!settingPath || !tomlPathMatches(settingPath, targetPath)) {
|
|
931
|
+
offset += line.length;
|
|
932
|
+
continue;
|
|
933
|
+
}
|
|
934
|
+
const replacement2 = replaceTomlAssignmentValue(line, assignmentIndex, value);
|
|
935
|
+
const assignmentEnd = multilineScan.nextQuote ? findTomlMultilineValueEnd(section.text, offset + line.length, multilineScan.nextQuote) : offset + line.length;
|
|
936
|
+
const sectionReplacement = section.text.slice(0, offset) + replacement2 + section.text.slice(assignmentEnd);
|
|
937
|
+
return config.slice(0, section.start) + sectionReplacement + config.slice(section.end);
|
|
938
|
+
}
|
|
939
|
+
const replacement = insertSetting(section.text, key, value);
|
|
904
940
|
return config.slice(0, section.start) + replacement + config.slice(section.end);
|
|
905
941
|
}
|
|
906
942
|
function removeSetting(config, section, key) {
|
|
@@ -920,6 +956,50 @@ function replaceOrInsertRootSetting(config, key, value) {
|
|
|
920
956
|
return replacement;
|
|
921
957
|
return `${replacement.trimEnd()}
|
|
922
958
|
|
|
959
|
+
${suffix.trimStart()}`;
|
|
960
|
+
}
|
|
961
|
+
function replaceOrInsertRootDottedSetting(config, keyPath, value) {
|
|
962
|
+
const targetPath = parseTomlDottedKey(keyPath);
|
|
963
|
+
if (!targetPath)
|
|
964
|
+
return config;
|
|
965
|
+
const lines = config.match(/[^\n]*\n?|$/g) ?? [];
|
|
966
|
+
let offset = 0;
|
|
967
|
+
let multilineQuote = null;
|
|
968
|
+
for (const line of lines) {
|
|
969
|
+
if (line.length === 0)
|
|
970
|
+
break;
|
|
971
|
+
const multilineScan = scanTomlMultilineLine(line, multilineQuote);
|
|
972
|
+
multilineQuote = multilineScan.nextQuote;
|
|
973
|
+
if (multilineScan.wasInside) {
|
|
974
|
+
offset += line.length;
|
|
975
|
+
continue;
|
|
976
|
+
}
|
|
977
|
+
if (isTomlTableHeaderLine(line))
|
|
978
|
+
break;
|
|
979
|
+
const assignmentIndex = findUnquotedAssignment(line);
|
|
980
|
+
if (assignmentIndex < 0) {
|
|
981
|
+
offset += line.length;
|
|
982
|
+
continue;
|
|
983
|
+
}
|
|
984
|
+
const settingPath = parseTomlDottedKey(line.slice(0, assignmentIndex).trim());
|
|
985
|
+
if (!settingPath || !tomlPathMatches(settingPath, targetPath)) {
|
|
986
|
+
offset += line.length;
|
|
987
|
+
continue;
|
|
988
|
+
}
|
|
989
|
+
const replacement2 = replaceTomlAssignmentValue(line, assignmentIndex, value);
|
|
990
|
+
const assignmentEnd = multilineScan.nextQuote ? findTomlMultilineValueEnd(config, offset + line.length, multilineScan.nextQuote) : offset + line.length;
|
|
991
|
+
return config.slice(0, offset) + replacement2 + config.slice(assignmentEnd);
|
|
992
|
+
}
|
|
993
|
+
const sectionStart = findFirstTableStart(config);
|
|
994
|
+
const root = config.slice(0, sectionStart).trimEnd();
|
|
995
|
+
const suffix = config.slice(sectionStart);
|
|
996
|
+
const replacement = `${root}${root.length > 0 ? `
|
|
997
|
+
` : ""}${keyPath} = ${value}
|
|
998
|
+
`;
|
|
999
|
+
if (suffix.length === 0)
|
|
1000
|
+
return replacement;
|
|
1001
|
+
return `${replacement.trimEnd()}
|
|
1002
|
+
|
|
923
1003
|
${suffix.trimStart()}`;
|
|
924
1004
|
}
|
|
925
1005
|
function appendBlock(config, block) {
|
|
@@ -932,9 +1012,16 @@ function appendBlock(config, block) {
|
|
|
932
1012
|
function findFirstTableStart(config) {
|
|
933
1013
|
const lines = config.match(/[^\n]*\n?|$/g) ?? [];
|
|
934
1014
|
let offset = 0;
|
|
1015
|
+
let multilineQuote = null;
|
|
935
1016
|
for (const line of lines) {
|
|
936
1017
|
if (line.length === 0)
|
|
937
1018
|
break;
|
|
1019
|
+
const multilineScan = scanTomlMultilineLine(line, multilineQuote);
|
|
1020
|
+
multilineQuote = multilineScan.nextQuote;
|
|
1021
|
+
if (multilineScan.wasInside) {
|
|
1022
|
+
offset += line.length;
|
|
1023
|
+
continue;
|
|
1024
|
+
}
|
|
938
1025
|
if (isTomlTableHeaderLine(line))
|
|
939
1026
|
return offset;
|
|
940
1027
|
offset += line.length;
|
|
@@ -972,6 +1059,131 @@ function isTomlTableHeaderLine(line) {
|
|
|
972
1059
|
const normalizedLine = stripUnquotedInlineComment(line).trim();
|
|
973
1060
|
return normalizedLine.startsWith("[") && normalizedLine.endsWith("]");
|
|
974
1061
|
}
|
|
1062
|
+
function scanTomlMultilineLine(line, currentQuote) {
|
|
1063
|
+
if (currentQuote) {
|
|
1064
|
+
return {
|
|
1065
|
+
wasInside: true,
|
|
1066
|
+
nextQuote: findTomlMultilineDelimiter(line, currentQuote, 0) === -1 ? currentQuote : null
|
|
1067
|
+
};
|
|
1068
|
+
}
|
|
1069
|
+
let quote = null;
|
|
1070
|
+
let index = 0;
|
|
1071
|
+
while (index < line.length) {
|
|
1072
|
+
const char = line[index];
|
|
1073
|
+
if (quote === '"') {
|
|
1074
|
+
if (char === "\\") {
|
|
1075
|
+
index += 2;
|
|
1076
|
+
continue;
|
|
1077
|
+
}
|
|
1078
|
+
if (char === '"')
|
|
1079
|
+
quote = null;
|
|
1080
|
+
index += 1;
|
|
1081
|
+
continue;
|
|
1082
|
+
}
|
|
1083
|
+
if (quote === "'") {
|
|
1084
|
+
if (char === "'")
|
|
1085
|
+
quote = null;
|
|
1086
|
+
index += 1;
|
|
1087
|
+
continue;
|
|
1088
|
+
}
|
|
1089
|
+
if (char === "#")
|
|
1090
|
+
break;
|
|
1091
|
+
const delimiter2 = line.startsWith('"""', index) ? '"""' : line.startsWith("'''", index) ? "'''" : null;
|
|
1092
|
+
if (delimiter2) {
|
|
1093
|
+
const closingIndex = findTomlMultilineDelimiter(line, delimiter2, index + delimiter2.length);
|
|
1094
|
+
return { wasInside: false, nextQuote: closingIndex === -1 ? delimiter2 : null };
|
|
1095
|
+
}
|
|
1096
|
+
if (char === '"' || char === "'")
|
|
1097
|
+
quote = char;
|
|
1098
|
+
index += 1;
|
|
1099
|
+
}
|
|
1100
|
+
return { wasInside: false, nextQuote: null };
|
|
1101
|
+
}
|
|
1102
|
+
function findTomlMultilineDelimiter(line, delimiter2, startIndex) {
|
|
1103
|
+
let index = line.indexOf(delimiter2, startIndex);
|
|
1104
|
+
while (index !== -1) {
|
|
1105
|
+
if (delimiter2 === "'''" || countPrecedingBackslashes(line, index) % 2 === 0)
|
|
1106
|
+
return index;
|
|
1107
|
+
index = line.indexOf(delimiter2, index + 1);
|
|
1108
|
+
}
|
|
1109
|
+
return -1;
|
|
1110
|
+
}
|
|
1111
|
+
function countPrecedingBackslashes(line, index) {
|
|
1112
|
+
let count = 0;
|
|
1113
|
+
let cursor = index - 1;
|
|
1114
|
+
while (cursor >= 0 && line[cursor] === "\\") {
|
|
1115
|
+
count += 1;
|
|
1116
|
+
cursor -= 1;
|
|
1117
|
+
}
|
|
1118
|
+
return count;
|
|
1119
|
+
}
|
|
1120
|
+
function findUnquotedAssignment(line) {
|
|
1121
|
+
return findUnquotedCharacter(line, "=", 0);
|
|
1122
|
+
}
|
|
1123
|
+
function findUnquotedComment(line, startIndex) {
|
|
1124
|
+
return findUnquotedCharacter(line, "#", startIndex);
|
|
1125
|
+
}
|
|
1126
|
+
function findUnquotedCharacter(line, target, startIndex) {
|
|
1127
|
+
let quote = null;
|
|
1128
|
+
let index = startIndex;
|
|
1129
|
+
while (index < line.length) {
|
|
1130
|
+
const char = line[index];
|
|
1131
|
+
if (quote === '"') {
|
|
1132
|
+
if (char === "\\") {
|
|
1133
|
+
index += 2;
|
|
1134
|
+
continue;
|
|
1135
|
+
}
|
|
1136
|
+
if (char === '"')
|
|
1137
|
+
quote = null;
|
|
1138
|
+
index += 1;
|
|
1139
|
+
continue;
|
|
1140
|
+
}
|
|
1141
|
+
if (quote === "'") {
|
|
1142
|
+
if (char === "'")
|
|
1143
|
+
quote = null;
|
|
1144
|
+
index += 1;
|
|
1145
|
+
continue;
|
|
1146
|
+
}
|
|
1147
|
+
if (char === '"' || char === "'") {
|
|
1148
|
+
quote = char;
|
|
1149
|
+
index += 1;
|
|
1150
|
+
continue;
|
|
1151
|
+
}
|
|
1152
|
+
if (char === target)
|
|
1153
|
+
return index;
|
|
1154
|
+
if (char === "#")
|
|
1155
|
+
return -1;
|
|
1156
|
+
index += 1;
|
|
1157
|
+
}
|
|
1158
|
+
return -1;
|
|
1159
|
+
}
|
|
1160
|
+
function tomlPathMatches(candidate, target) {
|
|
1161
|
+
return candidate.length === target.length && candidate.every((part, index) => part === target[index]);
|
|
1162
|
+
}
|
|
1163
|
+
function replaceTomlAssignmentValue(line, assignmentIndex, value) {
|
|
1164
|
+
const newline = line.endsWith(`
|
|
1165
|
+
`) ? `
|
|
1166
|
+
` : "";
|
|
1167
|
+
const lineBody = newline ? line.slice(0, -1) : line;
|
|
1168
|
+
const commentIndex = findUnquotedComment(lineBody, assignmentIndex + 1);
|
|
1169
|
+
const comment = commentIndex === -1 ? "" : ` ${lineBody.slice(commentIndex).trimStart()}`;
|
|
1170
|
+
return `${lineBody.slice(0, assignmentIndex + 1)} ${value}${comment}${newline}`;
|
|
1171
|
+
}
|
|
1172
|
+
function findTomlMultilineValueEnd(text, startOffset, quote) {
|
|
1173
|
+
const lines = text.slice(startOffset).match(/[^\n]*\n?|$/g) ?? [];
|
|
1174
|
+
let offset = startOffset;
|
|
1175
|
+
let currentQuote = quote;
|
|
1176
|
+
for (const line of lines) {
|
|
1177
|
+
if (line.length === 0)
|
|
1178
|
+
break;
|
|
1179
|
+
const scan = scanTomlMultilineLine(line, currentQuote);
|
|
1180
|
+
currentQuote = scan.nextQuote;
|
|
1181
|
+
offset += line.length;
|
|
1182
|
+
if (currentQuote === null)
|
|
1183
|
+
return offset;
|
|
1184
|
+
}
|
|
1185
|
+
return text.length;
|
|
1186
|
+
}
|
|
975
1187
|
function stripUnquotedInlineComment(line) {
|
|
976
1188
|
let quote = null;
|
|
977
1189
|
let index = 0;
|
|
@@ -1232,6 +1444,10 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
|
|
|
1232
1444
|
{
|
|
1233
1445
|
previous: { model: "gpt-5.5", effort: "xhigh" },
|
|
1234
1446
|
current: { model: "gpt-5.6-sol", effort: "ultra" }
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
previous: { model: "gpt-5.6-sol", effort: "ultra" },
|
|
1450
|
+
current: { model: "gpt-5.6-terra", effort: "high" }
|
|
1235
1451
|
}
|
|
1236
1452
|
]
|
|
1237
1453
|
],
|
|
@@ -1241,6 +1457,10 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
|
|
|
1241
1457
|
{
|
|
1242
1458
|
previous: { model: "gpt-5.6-sol", effort: "xhigh" },
|
|
1243
1459
|
current: { model: "gpt-5.6-sol", effort: "max" }
|
|
1460
|
+
},
|
|
1461
|
+
{
|
|
1462
|
+
previous: { model: "gpt-5.6-sol", effort: "max" },
|
|
1463
|
+
current: { model: "gpt-5.6-sol", effort: "high" }
|
|
1244
1464
|
}
|
|
1245
1465
|
]
|
|
1246
1466
|
],
|
|
@@ -1250,6 +1470,37 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
|
|
|
1250
1470
|
{
|
|
1251
1471
|
previous: { model: "gpt-5.6-sol", effort: "high" },
|
|
1252
1472
|
current: { model: "gpt-5.6-luna", effort: "max" }
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
previous: { model: "gpt-5.6-luna", effort: "max" },
|
|
1476
|
+
current: { model: "gpt-5.6-terra", effort: "high" }
|
|
1477
|
+
}
|
|
1478
|
+
]
|
|
1479
|
+
],
|
|
1480
|
+
[
|
|
1481
|
+
"lazycodex-worker-high",
|
|
1482
|
+
[
|
|
1483
|
+
{
|
|
1484
|
+
previous: { model: "gpt-5.6-sol", effort: "max" },
|
|
1485
|
+
current: { model: "gpt-5.6-sol", effort: "medium" }
|
|
1486
|
+
}
|
|
1487
|
+
]
|
|
1488
|
+
],
|
|
1489
|
+
[
|
|
1490
|
+
"lazycodex-code-reviewer",
|
|
1491
|
+
[
|
|
1492
|
+
{
|
|
1493
|
+
previous: { model: "gpt-5.6-sol", effort: "xhigh" },
|
|
1494
|
+
current: { model: "gpt-5.6-terra", effort: "medium" }
|
|
1495
|
+
}
|
|
1496
|
+
]
|
|
1497
|
+
],
|
|
1498
|
+
[
|
|
1499
|
+
"lazycodex-clone-fidelity-reviewer",
|
|
1500
|
+
[
|
|
1501
|
+
{
|
|
1502
|
+
previous: { model: "gpt-5.6-sol", effort: "xhigh" },
|
|
1503
|
+
current: { model: "gpt-5.6-terra", effort: "high" }
|
|
1253
1504
|
}
|
|
1254
1505
|
]
|
|
1255
1506
|
],
|
|
@@ -1268,6 +1519,10 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
|
|
|
1268
1519
|
{
|
|
1269
1520
|
previous: { model: "gpt-5.6-sol", effort: "xhigh" },
|
|
1270
1521
|
current: { model: "gpt-5.6-sol", effort: "high" }
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
previous: { model: "gpt-5.6-sol", effort: "high" },
|
|
1525
|
+
current: { model: "gpt-5.6-sol", effort: "low" }
|
|
1271
1526
|
}
|
|
1272
1527
|
]
|
|
1273
1528
|
]
|
|
@@ -2087,10 +2342,6 @@ async function existingNonSymlink(path) {
|
|
|
2087
2342
|
}
|
|
2088
2343
|
}
|
|
2089
2344
|
|
|
2090
|
-
// ../src/install/codex-config-toml.ts
|
|
2091
|
-
import { mkdir as mkdir6, readFile as readFile10 } from "node:fs/promises";
|
|
2092
|
-
import { dirname as dirname8 } from "node:path";
|
|
2093
|
-
|
|
2094
2345
|
// ../src/install/codex-config-agents.ts
|
|
2095
2346
|
var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE = ["codex-ultrawork-reviewer"];
|
|
2096
2347
|
var CURRENT_MANAGED_CODEX_AGENT_NAMES = [
|
|
@@ -2120,6 +2371,12 @@ function removeStaleManagedAgentBlocks(config, keepAgentNames) {
|
|
|
2120
2371
|
|
|
2121
2372
|
`);
|
|
2122
2373
|
}
|
|
2374
|
+
function hasForeignAgentRegistration(config, agentConfig) {
|
|
2375
|
+
const section = findTomlSection(config, `agents.${tomlKeySegment(agentConfig.name)}`);
|
|
2376
|
+
if (!section)
|
|
2377
|
+
return false;
|
|
2378
|
+
return !section.text.includes(`config_file = ${JSON.stringify(agentConfig.configFile)}`);
|
|
2379
|
+
}
|
|
2123
2380
|
function ensureAgentConfig(config, agentConfig) {
|
|
2124
2381
|
const header = `agents.${tomlKeySegment(agentConfig.name)}`;
|
|
2125
2382
|
const section = findTomlSection(config, header);
|
|
@@ -2134,6 +2391,10 @@ function tomlKeySegment(value) {
|
|
|
2134
2391
|
return /^[A-Za-z0-9_-]+$/.test(value) ? value : JSON.stringify(value);
|
|
2135
2392
|
}
|
|
2136
2393
|
|
|
2394
|
+
// ../src/install/codex-config-toml.ts
|
|
2395
|
+
import { mkdir as mkdir6, readFile as readFile10 } from "node:fs/promises";
|
|
2396
|
+
import { dirname as dirname8 } from "node:path";
|
|
2397
|
+
|
|
2137
2398
|
// ../src/install/codex-config-atomic-write.ts
|
|
2138
2399
|
import { lstat as lstat8, readlink as readlink4, realpath, rename as rename3, unlink, writeFile as writeFile6 } from "node:fs/promises";
|
|
2139
2400
|
import { basename as basename5, dirname as dirname6, isAbsolute as isAbsolute4, join as join15, resolve as resolve5 } from "node:path";
|
|
@@ -2195,13 +2456,137 @@ function delay(milliseconds) {
|
|
|
2195
2456
|
return new Promise((resolveDelay) => setTimeout(resolveDelay, milliseconds));
|
|
2196
2457
|
}
|
|
2197
2458
|
|
|
2459
|
+
// ../src/install/toml-setting-reader.ts
|
|
2460
|
+
function hasTomlSetting(config, keyPath) {
|
|
2461
|
+
const targetPath = parseTomlDottedKey(keyPath);
|
|
2462
|
+
if (!targetPath)
|
|
2463
|
+
return false;
|
|
2464
|
+
return hasTomlAssignment(config, (tablePath, settingPath) => {
|
|
2465
|
+
const fullPath = [...tablePath, ...settingPath];
|
|
2466
|
+
return fullPath.length === targetPath.length && fullPath.every((part, index) => part === targetPath[index]);
|
|
2467
|
+
});
|
|
2468
|
+
}
|
|
2469
|
+
function hasTomlRootDottedKeyPrefix(config, rootKey) {
|
|
2470
|
+
return hasTomlAssignment(config, (tablePath, settingPath) => tablePath.length === 0 && settingPath.length > 1 && settingPath[0] === rootKey);
|
|
2471
|
+
}
|
|
2472
|
+
function hasTomlAssignment(config, predicate) {
|
|
2473
|
+
let tablePath = [];
|
|
2474
|
+
let multilineQuote = null;
|
|
2475
|
+
for (const line of config.split(`
|
|
2476
|
+
`)) {
|
|
2477
|
+
const multilineScan = scanTomlMultilineLine(line, multilineQuote);
|
|
2478
|
+
multilineQuote = multilineScan.nextQuote;
|
|
2479
|
+
if (multilineScan.wasInside)
|
|
2480
|
+
continue;
|
|
2481
|
+
const normalizedLine = stripUnquotedInlineComment2(line).trim();
|
|
2482
|
+
if (normalizedLine.length === 0)
|
|
2483
|
+
continue;
|
|
2484
|
+
const headerPath = parseTomlTableHeader2(normalizedLine);
|
|
2485
|
+
if (headerPath) {
|
|
2486
|
+
tablePath = headerPath;
|
|
2487
|
+
continue;
|
|
2488
|
+
}
|
|
2489
|
+
if (isTomlTableHeaderLine2(normalizedLine)) {
|
|
2490
|
+
tablePath = null;
|
|
2491
|
+
continue;
|
|
2492
|
+
}
|
|
2493
|
+
if (!tablePath)
|
|
2494
|
+
continue;
|
|
2495
|
+
const assignmentIndex = findUnquotedAssignment2(normalizedLine);
|
|
2496
|
+
if (assignmentIndex < 0)
|
|
2497
|
+
continue;
|
|
2498
|
+
const settingPath = parseTomlDottedKey(normalizedLine.slice(0, assignmentIndex).trim());
|
|
2499
|
+
if (!settingPath)
|
|
2500
|
+
continue;
|
|
2501
|
+
if (predicate(tablePath, settingPath))
|
|
2502
|
+
return true;
|
|
2503
|
+
}
|
|
2504
|
+
return false;
|
|
2505
|
+
}
|
|
2506
|
+
function parseTomlTableHeader2(line) {
|
|
2507
|
+
if (!line.startsWith("[") || !line.endsWith("]") || line.startsWith("[["))
|
|
2508
|
+
return null;
|
|
2509
|
+
return parseTomlDottedKey(line.slice(1, -1).trim());
|
|
2510
|
+
}
|
|
2511
|
+
function isTomlTableHeaderLine2(line) {
|
|
2512
|
+
return line.startsWith("[") && line.endsWith("]");
|
|
2513
|
+
}
|
|
2514
|
+
function stripUnquotedInlineComment2(line) {
|
|
2515
|
+
let quote = null;
|
|
2516
|
+
let index = 0;
|
|
2517
|
+
while (index < line.length) {
|
|
2518
|
+
const char = line[index];
|
|
2519
|
+
if (quote === '"') {
|
|
2520
|
+
if (char === "\\") {
|
|
2521
|
+
index += 2;
|
|
2522
|
+
continue;
|
|
2523
|
+
}
|
|
2524
|
+
if (char === '"')
|
|
2525
|
+
quote = null;
|
|
2526
|
+
index += 1;
|
|
2527
|
+
continue;
|
|
2528
|
+
}
|
|
2529
|
+
if (quote === "'") {
|
|
2530
|
+
if (char === "'")
|
|
2531
|
+
quote = null;
|
|
2532
|
+
index += 1;
|
|
2533
|
+
continue;
|
|
2534
|
+
}
|
|
2535
|
+
if (char === '"' || char === "'") {
|
|
2536
|
+
quote = char;
|
|
2537
|
+
index += 1;
|
|
2538
|
+
continue;
|
|
2539
|
+
}
|
|
2540
|
+
if (char === "#")
|
|
2541
|
+
return line.slice(0, index);
|
|
2542
|
+
index += 1;
|
|
2543
|
+
}
|
|
2544
|
+
return line;
|
|
2545
|
+
}
|
|
2546
|
+
function findUnquotedAssignment2(line) {
|
|
2547
|
+
let quote = null;
|
|
2548
|
+
let index = 0;
|
|
2549
|
+
while (index < line.length) {
|
|
2550
|
+
const char = line[index];
|
|
2551
|
+
if (quote === '"') {
|
|
2552
|
+
if (char === "\\") {
|
|
2553
|
+
index += 2;
|
|
2554
|
+
continue;
|
|
2555
|
+
}
|
|
2556
|
+
if (char === '"')
|
|
2557
|
+
quote = null;
|
|
2558
|
+
index += 1;
|
|
2559
|
+
continue;
|
|
2560
|
+
}
|
|
2561
|
+
if (quote === "'") {
|
|
2562
|
+
if (char === "'")
|
|
2563
|
+
quote = null;
|
|
2564
|
+
index += 1;
|
|
2565
|
+
continue;
|
|
2566
|
+
}
|
|
2567
|
+
if (char === '"' || char === "'") {
|
|
2568
|
+
quote = char;
|
|
2569
|
+
index += 1;
|
|
2570
|
+
continue;
|
|
2571
|
+
}
|
|
2572
|
+
if (char === "=")
|
|
2573
|
+
return index;
|
|
2574
|
+
index += 1;
|
|
2575
|
+
}
|
|
2576
|
+
return -1;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2198
2579
|
// ../src/install/codex-config-features.ts
|
|
2199
2580
|
function ensureFeatureEnabled(config, featureName) {
|
|
2200
2581
|
const section = findTomlSection(config, "features");
|
|
2201
|
-
if (!section)
|
|
2582
|
+
if (!section) {
|
|
2583
|
+
if (hasTomlRootDottedKeyPrefix(config, "features")) {
|
|
2584
|
+
return replaceOrInsertRootDottedSetting(config, `features.${featureName}`, "true");
|
|
2585
|
+
}
|
|
2202
2586
|
return appendBlock(config, `[features]
|
|
2203
2587
|
${featureName} = true
|
|
2204
2588
|
`);
|
|
2589
|
+
}
|
|
2205
2590
|
return replaceOrInsertSetting(config, section, featureName, "true");
|
|
2206
2591
|
}
|
|
2207
2592
|
|
|
@@ -2269,7 +2654,7 @@ function ensureAutonomousPermissions(config) {
|
|
|
2269
2654
|
next = replaceOrInsertRootSetting(next, "sandbox_mode", JSON.stringify("danger-full-access"));
|
|
2270
2655
|
next = replaceOrInsertRootSetting(next, "network_access", JSON.stringify("enabled"));
|
|
2271
2656
|
for (const featureName of AUTONOMOUS_FEATURES) {
|
|
2272
|
-
next =
|
|
2657
|
+
next = ensureFeatureEnabled(next, featureName);
|
|
2273
2658
|
}
|
|
2274
2659
|
next = removeWindowsSandboxSetting(next);
|
|
2275
2660
|
next = ensureNoticeEnabled(next, "hide_full_access_warning");
|
|
@@ -2287,14 +2672,6 @@ function ensureNoticeEnabled(config, key) {
|
|
|
2287
2672
|
return appendNoticeBlock(config, key);
|
|
2288
2673
|
return replaceOrInsertSetting(config, section, key, "true");
|
|
2289
2674
|
}
|
|
2290
|
-
function ensureFeatureEnabled2(config, key) {
|
|
2291
|
-
const section = findTomlSection(config, "features");
|
|
2292
|
-
if (section === null)
|
|
2293
|
-
return appendBlock(config, `[features]
|
|
2294
|
-
${key} = true
|
|
2295
|
-
`);
|
|
2296
|
-
return replaceOrInsertSetting(config, section, key, "true");
|
|
2297
|
-
}
|
|
2298
2675
|
function appendNoticeBlock(config, key) {
|
|
2299
2676
|
return appendBlock(config, `[notice]
|
|
2300
2677
|
${key} = true
|
|
@@ -2366,7 +2743,7 @@ function readStringArraySetting(sectionText, key) {
|
|
|
2366
2743
|
const assignmentIndex = line.indexOf("=");
|
|
2367
2744
|
if (assignmentIndex === -1)
|
|
2368
2745
|
return null;
|
|
2369
|
-
return parseTomlStringArray(
|
|
2746
|
+
return parseTomlStringArray(stripUnquotedInlineComment3(line.slice(assignmentIndex + 1)).trim());
|
|
2370
2747
|
}
|
|
2371
2748
|
return null;
|
|
2372
2749
|
}
|
|
@@ -2410,7 +2787,7 @@ function parseTomlString(input, startIndex) {
|
|
|
2410
2787
|
}
|
|
2411
2788
|
return null;
|
|
2412
2789
|
}
|
|
2413
|
-
function
|
|
2790
|
+
function stripUnquotedInlineComment3(line) {
|
|
2414
2791
|
let quote = null;
|
|
2415
2792
|
let index = 0;
|
|
2416
2793
|
while (index < line.length) {
|
|
@@ -2624,24 +3001,27 @@ import { readFileSync } from "node:fs";
|
|
|
2624
3001
|
import { dirname as dirname7, isAbsolute as isAbsolute5, join as join17 } from "node:path";
|
|
2625
3002
|
var CODEX_AGENTS_HEADER = "agents";
|
|
2626
3003
|
var CODEX_MULTI_AGENT_V2_HEADER = "features.multi_agent_v2";
|
|
3004
|
+
var CODEX_MULTI_AGENT_V2_THREAD_LIMIT_KEY = `${CODEX_MULTI_AGENT_V2_HEADER}.max_concurrent_threads_per_session`;
|
|
2627
3005
|
var CODEX_SUBAGENT_THREAD_LIMIT = 1000;
|
|
3006
|
+
var CODEX_MULTI_AGENT_V2_THREAD_LIMIT = 16;
|
|
2628
3007
|
function ensureCodexMultiAgentV2Config(config, options = {}) {
|
|
2629
3008
|
const featureFlag = removeFeatureFlagSetting(config, "multi_agent_v2");
|
|
2630
3009
|
const v2Preferred = options.multiAgentVersion === "v2";
|
|
2631
3010
|
const modelKnown = options.multiAgentVersion != null || readRootModel(featureFlag.config) !== null;
|
|
2632
3011
|
const agentsConfig = v2Preferred ? removeAgentsMaxThreads(featureFlag.config) : modelKnown ? ensureAgentsMaxThreads(featureFlag.config) : raiseExistingAgentsMaxThreads(featureFlag.config);
|
|
2633
|
-
const maxThreadsValue = CODEX_SUBAGENT_THREAD_LIMIT.toString();
|
|
2634
3012
|
const preserveDisable = featureFlag.value === false && !v2Preferred;
|
|
2635
3013
|
const featureConfig = preserveDisable ? setMultiAgentV2Disable(agentsConfig) : v2Preferred ? removeMultiAgentV2Disable(agentsConfig) : agentsConfig;
|
|
3014
|
+
if (hasTomlSetting(featureConfig, CODEX_MULTI_AGENT_V2_THREAD_LIMIT_KEY))
|
|
3015
|
+
return featureConfig;
|
|
2636
3016
|
const section = findTomlSection(featureConfig, CODEX_MULTI_AGENT_V2_HEADER);
|
|
2637
3017
|
if (!section) {
|
|
2638
3018
|
const enabledSetting = preserveDisable ? `enabled = false
|
|
2639
3019
|
` : "";
|
|
2640
3020
|
return appendBlock(featureConfig, `[${CODEX_MULTI_AGENT_V2_HEADER}]
|
|
2641
|
-
${enabledSetting}max_concurrent_threads_per_session = ${
|
|
3021
|
+
${enabledSetting}max_concurrent_threads_per_session = ${CODEX_MULTI_AGENT_V2_THREAD_LIMIT}
|
|
2642
3022
|
`);
|
|
2643
3023
|
}
|
|
2644
|
-
return replaceOrInsertSetting(featureConfig, section, "max_concurrent_threads_per_session",
|
|
3024
|
+
return replaceOrInsertSetting(featureConfig, section, "max_concurrent_threads_per_session", CODEX_MULTI_AGENT_V2_THREAD_LIMIT.toString());
|
|
2645
3025
|
}
|
|
2646
3026
|
function resolveCodexMultiAgentVersion(config, configPath) {
|
|
2647
3027
|
const model = readRootModel(config);
|
|
@@ -3185,13 +3565,15 @@ async function updateConfigStep(options, inputs, degraded) {
|
|
|
3185
3565
|
const configPath = join21(options.codexHome, "config.toml");
|
|
3186
3566
|
try {
|
|
3187
3567
|
await assertWritableConfigIfPresent(configPath);
|
|
3568
|
+
const existingConfig = await readConfigIfPresent(configPath);
|
|
3569
|
+
const agentConfigs = inputs.agentConfigs.filter((agentConfig) => !hasForeignAgentRegistration(existingConfig, agentConfig));
|
|
3188
3570
|
const trustedHookStates = await trustedHookStatesForPlugin({
|
|
3189
3571
|
marketplaceName: SETUP_MARKETPLACE_NAME,
|
|
3190
3572
|
pluginName: SETUP_PLUGIN_NAME,
|
|
3191
3573
|
pluginRoot: options.pluginRoot
|
|
3192
3574
|
});
|
|
3193
3575
|
await updateCodexConfig({
|
|
3194
|
-
agentConfigs
|
|
3576
|
+
agentConfigs,
|
|
3195
3577
|
autonomousPermissions: false,
|
|
3196
3578
|
configPath,
|
|
3197
3579
|
gitBashEnabled: inputs.gitBashEnabled,
|
|
@@ -3224,6 +3606,15 @@ async function assertWritableConfigIfPresent(configPath) {
|
|
|
3224
3606
|
function errorCode(error) {
|
|
3225
3607
|
return error instanceof Error && "code" in error && typeof error.code === "string" ? error.code : undefined;
|
|
3226
3608
|
}
|
|
3609
|
+
async function readConfigIfPresent(configPath) {
|
|
3610
|
+
try {
|
|
3611
|
+
return await readFile13(configPath, "utf8");
|
|
3612
|
+
} catch (error) {
|
|
3613
|
+
if (errorCode(error) === "ENOENT")
|
|
3614
|
+
return "";
|
|
3615
|
+
throw error;
|
|
3616
|
+
}
|
|
3617
|
+
}
|
|
3227
3618
|
async function linkComponentBinsStep(options, degraded) {
|
|
3228
3619
|
const binDir = resolveCodexInstallerBinDir({ codexHome: options.codexHome, env: options.env });
|
|
3229
3620
|
try {
|
|
@@ -3343,7 +3734,7 @@ function resolvePluginDataRoot(env) {
|
|
|
3343
3734
|
}
|
|
3344
3735
|
async function readPluginVersion(pluginRoot) {
|
|
3345
3736
|
try {
|
|
3346
|
-
const parsed = JSON.parse(await
|
|
3737
|
+
const parsed = JSON.parse(await readFile14(join22(pluginRoot, ".codex-plugin", "plugin.json"), "utf8"));
|
|
3347
3738
|
if (typeof parsed !== "object" || parsed === null)
|
|
3348
3739
|
return;
|
|
3349
3740
|
const version = parsed["version"];
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
|
|
9
9
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
|
|
10
10
|
"timeout": 30,
|
|
11
|
-
"statusMessage": "(OmO 4.
|
|
11
|
+
"statusMessage": "(OmO 4.19.1) Checking Bootstrap Provisioning"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|