oh-my-opencode 4.19.0 → 4.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.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 +6 -6
- package/README.ru.md +6 -6
- package/README.zh-cn.md +6 -6
- package/dist/agents/atlas/agent.d.ts +5 -3
- package/dist/agents/explore.d.ts +4 -2
- package/dist/agents/gpt-prompt-identity.d.ts +3 -0
- package/dist/agents/hephaestus/agent.d.ts +4 -2
- package/dist/agents/librarian.d.ts +4 -2
- package/dist/agents/metis.d.ts +4 -2
- package/dist/agents/momus.d.ts +3 -2
- package/dist/agents/multimodal-looker.d.ts +4 -2
- package/dist/agents/oracle.d.ts +4 -2
- package/dist/agents/sisyphus/claude-opus-5.d.ts +33 -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 +2 -0
- package/dist/agents/sisyphus-agent-factory.d.ts +5 -2
- package/dist/agents/sisyphus-junior/agent.d.ts +4 -1
- package/dist/agents/sisyphus-junior/gpt-5-5.d.ts +2 -2
- package/dist/agents/types.d.ts +2 -2
- package/dist/cli/index.js +23577 -19269
- package/dist/cli-node/index.js +23577 -19269
- package/dist/config/schema/agent-names.d.ts +26 -26
- package/dist/config/schema/agent-overrides.d.ts +400 -400
- package/dist/config/schema/browser-automation.d.ts +2 -2
- package/dist/config/schema/categories.d.ts +36 -36
- package/dist/config/schema/codegraph.d.ts +2 -0
- package/dist/config/schema/commands.d.ts +2 -2
- package/dist/config/schema/dynamic-context-pruning.d.ts +1 -1
- package/dist/config/schema/experimental.d.ts +1 -1
- package/dist/config/schema/fallback-models.d.ts +25 -25
- package/dist/config/schema/hooks.d.ts +43 -43
- package/dist/config/schema/internal/permission.d.ts +9 -9
- package/dist/config/schema/keyword-detector.d.ts +6 -6
- package/dist/config/schema/oh-my-opencode-config.d.ts +404 -402
- package/dist/config/schema/tmux.d.ts +6 -6
- package/dist/create-hooks.d.ts +35 -35
- package/dist/features/background-agent/spawner/tmux-callback-invoker.d.ts +11 -0
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/features/claude-tasks/types.d.ts +4 -4
- package/dist/features/team-mode/team-runtime/shutdown-helpers.d.ts +1 -1
- package/dist/features/team-mode/team-runtime/shutdown-test-fixtures.d.ts +4 -4
- package/dist/features/team-mode/tools/lifecycle-test-fixture.d.ts +42 -42
- package/dist/features/tmux-subagent/environment-eligibility.d.ts +2 -0
- package/dist/features/tmux-subagent/index.d.ts +1 -0
- package/dist/features/tmux-subagent/tracked-session-state.d.ts +1 -0
- package/dist/features/tui-sidebar/snapshot-schema.d.ts +6 -6
- package/dist/help/schema/acp.d.ts +3 -3
- package/dist/help/schema/doctor.d.ts +4 -4
- package/dist/help/schema/status.d.ts +3 -3
- package/dist/hooks/codegraph-bootstrap/hook.d.ts +3 -2
- package/dist/hooks/goal/types.d.ts +5 -5
- package/dist/hooks/non-interactive-env/constants.d.ts +4 -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/hooks/start-work/parse-user-request.d.ts +2 -0
- package/dist/hooks/start-work/worktree-block.d.ts +5 -0
- package/dist/index.js +27370 -21301
- package/dist/mcp/types.d.ts +3 -3
- package/dist/oh-my-opencode.schema.json +11 -0
- package/dist/plugin/chat-message/loop-commands.d.ts +1 -0
- package/dist/plugin/command-execute-before.d.ts +3 -3
- package/dist/plugin/hooks/create-core-hooks.d.ts +25 -25
- package/dist/shared/omo-process-sweep.d.ts +18 -0
- package/dist/shared/tmux/tmux-utils/environment.d.ts +1 -1
- package/dist/shared/tmux/tmux-utils.d.ts +1 -1
- package/dist/shared/typescript-native-source-parser.d.ts +7 -0
- package/dist/skills/coding-agent-sessions/SKILL.md +5 -2
- package/dist/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/dist/skills/coding-agent-sessions/references/senpi.md +15 -5
- package/dist/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
- package/dist/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +19 -10
- package/dist/skills/debugging/SKILL.md +2 -1
- package/dist/skills/debugging/references/methodology/03-flaky-triage.md +47 -0
- package/dist/skills/programming/SKILL.md +11 -1
- package/dist/skills/programming/references/logging.md +6 -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 +75 -11
- package/dist/skills/start-work/SKILL.md +12 -2
- package/dist/skills/ulw-plan/SKILL.md +21 -2
- package/dist/skills/ulw-plan/references/full-workflow.md +12 -1
- package/dist/skills/ulw-plan/references/intent-clear.md +1 -1
- package/dist/testing/create-plugin-module.d.ts +1 -0
- package/dist/tools/task/types.d.ts +10 -10
- package/dist/tui.js +23442 -19182
- 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 +62 -2
- 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 +72 -12
- 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/dist/cli.js +779 -385
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +302 -173
- 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 +23 -42
- 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 +17 -9
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +18 -25
- 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 +5 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-store-upgrade.test.ts +176 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +6 -1
- 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/provisioned-node-guard.test.ts +6 -0
- 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 +2 -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 +42 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +122 -10
- 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 +101 -64
- 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/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/directive.md +1 -1
- 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/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/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/plan.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +12 -7
- 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/ultrawork/SKILL.md +12 -7
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +21 -2
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +12 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +1 -1
- 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/directive.md +12 -7
- 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/SKILL.md +2 -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/shared/test/config-loader.test.ts +44 -0
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +5 -2
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/senpi.md +15 -5
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +19 -10
- package/packages/omo-codex/plugin/skills/debugging/SKILL.md +2 -1
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/03-flaky-triage.md +47 -0
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +11 -1
- package/packages/omo-codex/plugin/skills/programming/references/logging.md +6 -1
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +75 -11
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +12 -2
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +12 -7
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +2 -1
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +8 -6
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +21 -2
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +12 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +1 -1
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +9 -9
- 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/sync-skills-orchestration.test.mjs +22 -0
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +49 -5
- package/packages/omo-codex/scripts/install-marketplace-cache.test.mjs +4 -1
- package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +5 -2
- package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/packages/shared-skills/skills/coding-agent-sessions/references/senpi.md +15 -5
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +19 -10
- package/packages/shared-skills/skills/debugging/SKILL.md +2 -1
- package/packages/shared-skills/skills/debugging/references/methodology/03-flaky-triage.md +47 -0
- package/packages/shared-skills/skills/programming/SKILL.md +11 -1
- package/packages/shared-skills/skills/programming/references/logging.md +6 -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 +75 -11
- package/packages/shared-skills/skills/start-work/SKILL.md +12 -2
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +21 -2
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +12 -1
- package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +1 -1
|
@@ -158,16 +158,35 @@ function bufferFromChunk(chunk) {
|
|
|
158
158
|
|
|
159
159
|
// ../mcp-stdio-core/src/server.ts
|
|
160
160
|
var DEFAULT_IDLE_TIMEOUT_MS = 10 * 60000;
|
|
161
|
+
var DEFAULT_PARENT_POLL_INTERVAL_MS = 30000;
|
|
161
162
|
var noopLog = () => {};
|
|
163
|
+
function isProcessAlive(pid) {
|
|
164
|
+
try {
|
|
165
|
+
process.kill(pid, 0);
|
|
166
|
+
return true;
|
|
167
|
+
} catch (error) {
|
|
168
|
+
return !hasErrorCode(error, "ESRCH");
|
|
169
|
+
}
|
|
170
|
+
}
|
|
162
171
|
async function runJsonRpcStdioServer(config) {
|
|
163
172
|
const log = config.log ?? noopLog;
|
|
164
173
|
const idleTimeoutMs = config.idleTimeoutMs ?? DEFAULT_IDLE_TIMEOUT_MS;
|
|
165
|
-
|
|
174
|
+
let isClosed = false;
|
|
175
|
+
const idleTimer = createIdleTimer(idleTimeoutMs, log, () => {
|
|
176
|
+
isClosed = true;
|
|
177
|
+
config.onIdleTimeout?.();
|
|
178
|
+
});
|
|
179
|
+
const watchdog = createParentWatchdog(config.parentWatchdog, (parentPid, pollIntervalMs) => {
|
|
180
|
+
isClosed = true;
|
|
181
|
+
log("parent_exit", { parent_pid: parentPid, poll_interval_ms: pollIntervalMs });
|
|
182
|
+
config.onParentExit?.();
|
|
183
|
+
config.input.destroy();
|
|
184
|
+
});
|
|
166
185
|
log("stdio_started", { cwd: process.cwd(), idle_timeout_ms: idleTimeoutMs });
|
|
167
186
|
idleTimer.arm();
|
|
168
187
|
try {
|
|
169
188
|
for await (const message of readStdioJsonRpcMessages(config.input)) {
|
|
170
|
-
if (
|
|
189
|
+
if (isClosed)
|
|
171
190
|
break;
|
|
172
191
|
idleTimer.arm();
|
|
173
192
|
if (message.kind === "parse_error") {
|
|
@@ -178,8 +197,12 @@ async function runJsonRpcStdioServer(config) {
|
|
|
178
197
|
if (!await handleRequest(message, config, log))
|
|
179
198
|
break;
|
|
180
199
|
}
|
|
200
|
+
} catch (error) {
|
|
201
|
+
if (!(isClosed && hasErrorCode(error, "ERR_STREAM_PREMATURE_CLOSE")))
|
|
202
|
+
throw error;
|
|
181
203
|
} finally {
|
|
182
204
|
idleTimer.clear();
|
|
205
|
+
watchdog.clear();
|
|
183
206
|
log("stdio_stopped");
|
|
184
207
|
}
|
|
185
208
|
}
|
|
@@ -235,9 +258,33 @@ function isTerminalOutputError(error) {
|
|
|
235
258
|
return false;
|
|
236
259
|
return error.code === "EPIPE" || error.code === "ERR_STREAM_DESTROYED" || error.code === "ERR_STREAM_WRITE_AFTER_END";
|
|
237
260
|
}
|
|
238
|
-
function
|
|
261
|
+
function hasErrorCode(error, code) {
|
|
262
|
+
return error instanceof Error && "code" in error && error.code === code;
|
|
263
|
+
}
|
|
264
|
+
function createParentWatchdog(config, onDeadParent) {
|
|
265
|
+
if (config === undefined)
|
|
266
|
+
return { clear: () => {} };
|
|
267
|
+
const pollIntervalMs = config.pollIntervalMs ?? DEFAULT_PARENT_POLL_INTERVAL_MS;
|
|
268
|
+
if (pollIntervalMs <= 0)
|
|
269
|
+
return { clear: () => {} };
|
|
270
|
+
const parentPid = config.parentPid ?? process.ppid;
|
|
271
|
+
const probeAlive = config.probeAlive ?? isProcessAlive;
|
|
272
|
+
let fired = false;
|
|
273
|
+
const timer = setInterval(() => {
|
|
274
|
+
if (fired || probeAlive(parentPid))
|
|
275
|
+
return;
|
|
276
|
+
fired = true;
|
|
277
|
+
onDeadParent(parentPid, pollIntervalMs);
|
|
278
|
+
}, pollIntervalMs);
|
|
279
|
+
timer.unref();
|
|
280
|
+
return {
|
|
281
|
+
clear: () => {
|
|
282
|
+
clearInterval(timer);
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
function createIdleTimer(idleTimeoutMs, log, onTimeout) {
|
|
239
287
|
let timer = null;
|
|
240
|
-
let isClosed = false;
|
|
241
288
|
return {
|
|
242
289
|
arm: () => {
|
|
243
290
|
if (timer !== null)
|
|
@@ -245,9 +292,8 @@ function createIdleTimer(idleTimeoutMs, log, onIdleTimeout) {
|
|
|
245
292
|
if (idleTimeoutMs <= 0)
|
|
246
293
|
return;
|
|
247
294
|
timer = setTimeout(() => {
|
|
248
|
-
isClosed = true;
|
|
249
295
|
log("idle_timeout", { idle_timeout_ms: idleTimeoutMs });
|
|
250
|
-
|
|
296
|
+
onTimeout();
|
|
251
297
|
}, idleTimeoutMs);
|
|
252
298
|
timer.unref();
|
|
253
299
|
},
|
|
@@ -256,8 +302,7 @@ function createIdleTimer(idleTimeoutMs, log, onIdleTimeout) {
|
|
|
256
302
|
return;
|
|
257
303
|
clearTimeout(timer);
|
|
258
304
|
timer = null;
|
|
259
|
-
}
|
|
260
|
-
closed: () => isClosed
|
|
305
|
+
}
|
|
261
306
|
};
|
|
262
307
|
}
|
|
263
308
|
// ../lsp-core/src/lsp/client-wrapper.ts
|
|
@@ -3058,8 +3103,13 @@ class LspClient extends LspClientConnection {
|
|
|
3058
3103
|
if (!pushFallbackOnly)
|
|
3059
3104
|
continue;
|
|
3060
3105
|
const remainingMs = deadlineAt - Date.now();
|
|
3061
|
-
if (remainingMs <= 0)
|
|
3106
|
+
if (remainingMs <= 0) {
|
|
3107
|
+
if (!this.isDiagnosticPullSupported() && snapshot.publishGeneration === 0) {
|
|
3108
|
+
const cached = this.documents.getPullCache(snapshot);
|
|
3109
|
+
return { items: cached === null ? [] : [...cached.diagnostics] };
|
|
3110
|
+
}
|
|
3062
3111
|
return this.freshnessTimeout(absPath);
|
|
3112
|
+
}
|
|
3063
3113
|
const waitMs = push.status === "wait" ? Math.min(push.waitMs, remainingMs) : remainingMs;
|
|
3064
3114
|
await waitForDiagnosticsActivity(this.documents.waitForDiagnosticsActivity(snapshot, waitMs), signal);
|
|
3065
3115
|
}
|
|
@@ -5026,12 +5076,13 @@ async function handleLspMcpRequest(input, options = {}) {
|
|
|
5026
5076
|
}
|
|
5027
5077
|
return errorResponse(id, -32601, `Method not found: ${String(method)}`);
|
|
5028
5078
|
}
|
|
5029
|
-
async function runMcpStdioServer(input = process.stdin, output = process.stdout) {
|
|
5079
|
+
async function runMcpStdioServer(input = process.stdin, output = process.stdout, options = {}) {
|
|
5030
5080
|
const requestContext = createStandaloneMcpRequestContext();
|
|
5031
5081
|
await runJsonRpcStdioServer({
|
|
5032
5082
|
input,
|
|
5033
5083
|
output,
|
|
5034
5084
|
idleTimeoutMs: 0,
|
|
5085
|
+
parentWatchdog: options.parentWatchdog ?? {},
|
|
5035
5086
|
handler: (request) => runWithRequestContext(requestContext, () => handleLspMcpRequest(request)),
|
|
5036
5087
|
handlerOptions: undefined
|
|
5037
5088
|
});
|
|
@@ -2796,8 +2796,13 @@ class LspClient extends LspClientConnection {
|
|
|
2796
2796
|
if (!pushFallbackOnly)
|
|
2797
2797
|
continue;
|
|
2798
2798
|
const remainingMs = deadlineAt - Date.now();
|
|
2799
|
-
if (remainingMs <= 0)
|
|
2799
|
+
if (remainingMs <= 0) {
|
|
2800
|
+
if (!this.isDiagnosticPullSupported() && snapshot.publishGeneration === 0) {
|
|
2801
|
+
const cached = this.documents.getPullCache(snapshot);
|
|
2802
|
+
return { items: cached === null ? [] : [...cached.diagnostics] };
|
|
2803
|
+
}
|
|
2800
2804
|
return this.freshnessTimeout(absPath);
|
|
2805
|
+
}
|
|
2801
2806
|
const waitMs = push.status === "wait" ? Math.min(push.waitMs, remainingMs) : remainingMs;
|
|
2802
2807
|
await waitForDiagnosticsActivity(this.documents.waitForDiagnosticsActivity(snapshot, waitMs), signal);
|
|
2803
2808
|
}
|
|
@@ -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";
|
|
@@ -737,7 +737,11 @@ function defaultFileExists(filePath) {
|
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
function defaultVersionProbe(binaryPath) {
|
|
740
|
-
return String(execFileSync(binaryPath, ["--version"], {
|
|
740
|
+
return String(execFileSync(binaryPath, ["--version"], {
|
|
741
|
+
encoding: "utf8",
|
|
742
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
743
|
+
timeout: 5000
|
|
744
|
+
}));
|
|
741
745
|
}
|
|
742
746
|
function isAstGrepVersionOutput(output) {
|
|
743
747
|
return output.toLowerCase().includes("ast-grep");
|
|
@@ -751,8 +755,8 @@ function hasAstGrepVersion(binaryPath, runVersionProbeSync) {
|
|
|
751
755
|
return false;
|
|
752
756
|
}
|
|
753
757
|
}
|
|
754
|
-
function pathCommandCandidates(
|
|
755
|
-
return
|
|
758
|
+
function pathCommandCandidates() {
|
|
759
|
+
return ["ast-grep", "sg"];
|
|
756
760
|
}
|
|
757
761
|
function findSgBinarySync(options = {}) {
|
|
758
762
|
const env = options.env ?? process.env;
|
|
@@ -769,7 +773,7 @@ function findSgBinarySync(options = {}) {
|
|
|
769
773
|
if (fileExists(runtimeCandidate))
|
|
770
774
|
return runtimeCandidate;
|
|
771
775
|
}
|
|
772
|
-
for (const commandName of pathCommandCandidates(
|
|
776
|
+
for (const commandName of pathCommandCandidates()) {
|
|
773
777
|
const pathCandidate = which(commandName);
|
|
774
778
|
if (pathCandidate === null || !fileExists(pathCandidate))
|
|
775
779
|
continue;
|
|
@@ -864,7 +868,7 @@ async function defaultVersionProbe2(binaryPath) {
|
|
|
864
868
|
}
|
|
865
869
|
|
|
866
870
|
// 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";
|
|
871
|
+
import { copyFile as copyFile2, mkdir as mkdir7, readFile as readFile13, readdir as readdir5, rm as rm10, stat as stat5 } from "node:fs/promises";
|
|
868
872
|
import { join as join21 } from "node:path";
|
|
869
873
|
|
|
870
874
|
// ../src/install/link-cached-plugin-agents.ts
|
|
@@ -1457,6 +1461,10 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
|
|
|
1457
1461
|
{
|
|
1458
1462
|
previous: { model: "gpt-5.6-sol", effort: "xhigh" },
|
|
1459
1463
|
current: { model: "gpt-5.6-sol", effort: "max" }
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
previous: { model: "gpt-5.6-sol", effort: "max" },
|
|
1467
|
+
current: { model: "gpt-5.6-sol", effort: "high" }
|
|
1460
1468
|
}
|
|
1461
1469
|
]
|
|
1462
1470
|
],
|
|
@@ -1466,6 +1474,37 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
|
|
|
1466
1474
|
{
|
|
1467
1475
|
previous: { model: "gpt-5.6-sol", effort: "high" },
|
|
1468
1476
|
current: { model: "gpt-5.6-luna", effort: "max" }
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
previous: { model: "gpt-5.6-luna", effort: "max" },
|
|
1480
|
+
current: { model: "gpt-5.6-terra", effort: "high" }
|
|
1481
|
+
}
|
|
1482
|
+
]
|
|
1483
|
+
],
|
|
1484
|
+
[
|
|
1485
|
+
"lazycodex-worker-high",
|
|
1486
|
+
[
|
|
1487
|
+
{
|
|
1488
|
+
previous: { model: "gpt-5.6-sol", effort: "max" },
|
|
1489
|
+
current: { model: "gpt-5.6-sol", effort: "medium" }
|
|
1490
|
+
}
|
|
1491
|
+
]
|
|
1492
|
+
],
|
|
1493
|
+
[
|
|
1494
|
+
"lazycodex-code-reviewer",
|
|
1495
|
+
[
|
|
1496
|
+
{
|
|
1497
|
+
previous: { model: "gpt-5.6-sol", effort: "xhigh" },
|
|
1498
|
+
current: { model: "gpt-5.6-terra", effort: "medium" }
|
|
1499
|
+
}
|
|
1500
|
+
]
|
|
1501
|
+
],
|
|
1502
|
+
[
|
|
1503
|
+
"lazycodex-clone-fidelity-reviewer",
|
|
1504
|
+
[
|
|
1505
|
+
{
|
|
1506
|
+
previous: { model: "gpt-5.6-sol", effort: "xhigh" },
|
|
1507
|
+
current: { model: "gpt-5.6-terra", effort: "high" }
|
|
1469
1508
|
}
|
|
1470
1509
|
]
|
|
1471
1510
|
],
|
|
@@ -1484,6 +1523,10 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
|
|
|
1484
1523
|
{
|
|
1485
1524
|
previous: { model: "gpt-5.6-sol", effort: "xhigh" },
|
|
1486
1525
|
current: { model: "gpt-5.6-sol", effort: "high" }
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
previous: { model: "gpt-5.6-sol", effort: "high" },
|
|
1529
|
+
current: { model: "gpt-5.6-sol", effort: "low" }
|
|
1487
1530
|
}
|
|
1488
1531
|
]
|
|
1489
1532
|
]
|
|
@@ -2303,10 +2346,6 @@ async function existingNonSymlink(path) {
|
|
|
2303
2346
|
}
|
|
2304
2347
|
}
|
|
2305
2348
|
|
|
2306
|
-
// ../src/install/codex-config-toml.ts
|
|
2307
|
-
import { mkdir as mkdir6, readFile as readFile10 } from "node:fs/promises";
|
|
2308
|
-
import { dirname as dirname8 } from "node:path";
|
|
2309
|
-
|
|
2310
2349
|
// ../src/install/codex-config-agents.ts
|
|
2311
2350
|
var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE = ["codex-ultrawork-reviewer"];
|
|
2312
2351
|
var CURRENT_MANAGED_CODEX_AGENT_NAMES = [
|
|
@@ -2336,6 +2375,12 @@ function removeStaleManagedAgentBlocks(config, keepAgentNames) {
|
|
|
2336
2375
|
|
|
2337
2376
|
`);
|
|
2338
2377
|
}
|
|
2378
|
+
function hasForeignAgentRegistration(config, agentConfig) {
|
|
2379
|
+
const section = findTomlSection(config, `agents.${tomlKeySegment(agentConfig.name)}`);
|
|
2380
|
+
if (!section)
|
|
2381
|
+
return false;
|
|
2382
|
+
return !section.text.includes(`config_file = ${JSON.stringify(agentConfig.configFile)}`);
|
|
2383
|
+
}
|
|
2339
2384
|
function ensureAgentConfig(config, agentConfig) {
|
|
2340
2385
|
const header = `agents.${tomlKeySegment(agentConfig.name)}`;
|
|
2341
2386
|
const section = findTomlSection(config, header);
|
|
@@ -2350,6 +2395,10 @@ function tomlKeySegment(value) {
|
|
|
2350
2395
|
return /^[A-Za-z0-9_-]+$/.test(value) ? value : JSON.stringify(value);
|
|
2351
2396
|
}
|
|
2352
2397
|
|
|
2398
|
+
// ../src/install/codex-config-toml.ts
|
|
2399
|
+
import { mkdir as mkdir6, readFile as readFile10 } from "node:fs/promises";
|
|
2400
|
+
import { dirname as dirname8 } from "node:path";
|
|
2401
|
+
|
|
2353
2402
|
// ../src/install/codex-config-atomic-write.ts
|
|
2354
2403
|
import { lstat as lstat8, readlink as readlink4, realpath, rename as rename3, unlink, writeFile as writeFile6 } from "node:fs/promises";
|
|
2355
2404
|
import { basename as basename5, dirname as dirname6, isAbsolute as isAbsolute4, join as join15, resolve as resolve5 } from "node:path";
|
|
@@ -3520,13 +3569,15 @@ async function updateConfigStep(options, inputs, degraded) {
|
|
|
3520
3569
|
const configPath = join21(options.codexHome, "config.toml");
|
|
3521
3570
|
try {
|
|
3522
3571
|
await assertWritableConfigIfPresent(configPath);
|
|
3572
|
+
const existingConfig = await readConfigIfPresent(configPath);
|
|
3573
|
+
const agentConfigs = inputs.agentConfigs.filter((agentConfig) => !hasForeignAgentRegistration(existingConfig, agentConfig));
|
|
3523
3574
|
const trustedHookStates = await trustedHookStatesForPlugin({
|
|
3524
3575
|
marketplaceName: SETUP_MARKETPLACE_NAME,
|
|
3525
3576
|
pluginName: SETUP_PLUGIN_NAME,
|
|
3526
3577
|
pluginRoot: options.pluginRoot
|
|
3527
3578
|
});
|
|
3528
3579
|
await updateCodexConfig({
|
|
3529
|
-
agentConfigs
|
|
3580
|
+
agentConfigs,
|
|
3530
3581
|
autonomousPermissions: false,
|
|
3531
3582
|
configPath,
|
|
3532
3583
|
gitBashEnabled: inputs.gitBashEnabled,
|
|
@@ -3559,6 +3610,15 @@ async function assertWritableConfigIfPresent(configPath) {
|
|
|
3559
3610
|
function errorCode(error) {
|
|
3560
3611
|
return error instanceof Error && "code" in error && typeof error.code === "string" ? error.code : undefined;
|
|
3561
3612
|
}
|
|
3613
|
+
async function readConfigIfPresent(configPath) {
|
|
3614
|
+
try {
|
|
3615
|
+
return await readFile13(configPath, "utf8");
|
|
3616
|
+
} catch (error) {
|
|
3617
|
+
if (errorCode(error) === "ENOENT")
|
|
3618
|
+
return "";
|
|
3619
|
+
throw error;
|
|
3620
|
+
}
|
|
3621
|
+
}
|
|
3562
3622
|
async function linkComponentBinsStep(options, degraded) {
|
|
3563
3623
|
const binDir = resolveCodexInstallerBinDir({ codexHome: options.codexHome, env: options.env });
|
|
3564
3624
|
try {
|
|
@@ -3678,7 +3738,7 @@ function resolvePluginDataRoot(env) {
|
|
|
3678
3738
|
}
|
|
3679
3739
|
async function readPluginVersion(pluginRoot) {
|
|
3680
3740
|
try {
|
|
3681
|
-
const parsed = JSON.parse(await
|
|
3741
|
+
const parsed = JSON.parse(await readFile14(join22(pluginRoot, ".codex-plugin", "plugin.json"), "utf8"));
|
|
3682
3742
|
if (typeof parsed !== "object" || parsed === null)
|
|
3683
3743
|
return;
|
|
3684
3744
|
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.19.
|
|
11
|
+
"statusMessage": "(OmO 4.19.2) Checking Bootstrap Provisioning"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { copyFile, mkdir, readdir, rm, stat } from "node:fs/promises";
|
|
1
|
+
import { copyFile, mkdir, readFile, readdir, rm, stat } from "node:fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
|
|
4
4
|
// These relative imports resolve at BUILD time in the monorepo; esbuild
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
linkCachedPluginAgents,
|
|
11
11
|
} from "../../../../src/install/link-cached-plugin-agents.ts";
|
|
12
12
|
import { linkCachedPluginBins, linkRootRuntimeBin } from "../../../../src/install/codex-cache-bins.ts";
|
|
13
|
+
import { hasForeignAgentRegistration } from "../../../../src/install/codex-config-agents.ts";
|
|
13
14
|
import { updateCodexConfig } from "../../../../src/install/codex-config-toml.ts";
|
|
14
15
|
import { stampGitBashMcpEnv } from "../../../../src/install/codex-git-bash-mcp-env.ts";
|
|
15
16
|
import { trustedHookStatesForPlugin } from "../../../../src/install/codex-hook-trust.ts";
|
|
@@ -141,6 +142,16 @@ async function updateConfigStep(
|
|
|
141
142
|
const configPath = join(options.codexHome, "config.toml");
|
|
142
143
|
try {
|
|
143
144
|
await assertWritableConfigIfPresent(configPath);
|
|
145
|
+
// Orca mirrors the system [agents.*] entries into its runtime CODEX_HOME
|
|
146
|
+
// without copying the agents directory. Re-stamping our own registration
|
|
147
|
+
// for such a role would collide with the mirrored entry once Codex
|
|
148
|
+
// discovers <codexHome>/agents/<name>.toml (two different file paths for
|
|
149
|
+
// one role name -> upstream warning), so foreign pre-existing blocks are
|
|
150
|
+
// left untouched; directory discovery still loads the linked toml.
|
|
151
|
+
const existingConfig = await readConfigIfPresent(configPath);
|
|
152
|
+
const agentConfigs = inputs.agentConfigs.filter(
|
|
153
|
+
(agentConfig) => !hasForeignAgentRegistration(existingConfig, agentConfig),
|
|
154
|
+
);
|
|
144
155
|
// Re-stamping trusted hook hashes after an upgrade is what makes the
|
|
145
156
|
// next session's hooks trusted again once the user re-approved the
|
|
146
157
|
// bootstrap hook itself.
|
|
@@ -150,7 +161,7 @@ async function updateConfigStep(
|
|
|
150
161
|
pluginRoot: options.pluginRoot,
|
|
151
162
|
});
|
|
152
163
|
await updateCodexConfig({
|
|
153
|
-
agentConfigs
|
|
164
|
+
agentConfigs,
|
|
154
165
|
// Hard invariant: the bootstrap worker NEVER writes permission keys
|
|
155
166
|
// (approval/sandbox/network policies stay installer-flag-only).
|
|
156
167
|
autonomousPermissions: false,
|
|
@@ -189,6 +200,15 @@ function errorCode(error: unknown): string | undefined {
|
|
|
189
200
|
return error instanceof Error && "code" in error && typeof error.code === "string" ? error.code : undefined;
|
|
190
201
|
}
|
|
191
202
|
|
|
203
|
+
async function readConfigIfPresent(configPath: string): Promise<string> {
|
|
204
|
+
try {
|
|
205
|
+
return await readFile(configPath, "utf8");
|
|
206
|
+
} catch (error) {
|
|
207
|
+
if (errorCode(error) === "ENOENT") return "";
|
|
208
|
+
throw error;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
192
212
|
async function linkComponentBinsStep(options: WorkerSetupOptions, degraded: BootstrapDegradedEntry[]): Promise<void> {
|
|
193
213
|
const binDir = resolveCodexInstallerBinDir({ codexHome: options.codexHome, env: options.env });
|
|
194
214
|
try {
|