oh-my-opencode 4.15.0 → 4.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/doctor/checks/tui-plugin-config.d.ts +4 -4
- package/dist/cli/index.js +1149 -1040
- package/dist/cli/install-senpi/index.d.ts +1 -0
- package/dist/cli/run/poll-for-completion.d.ts +4 -0
- package/dist/cli/run/session-resolver.d.ts +1 -0
- package/dist/cli/senpi-platform-flag.d.ts +4 -0
- package/dist/cli/types.d.ts +2 -1
- package/dist/cli-node/index.js +1149 -1040
- package/dist/features/background-agent/manager.d.ts +16 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/aggressive-truncation-strategy.d.ts +1 -0
- package/dist/index.js +1334 -1146
- package/dist/skills/debugging/references/methodology/06-fix.md +6 -0
- package/dist/skills/frontend/ATTRIBUTION.md +13 -3
- package/dist/skills/frontend/SKILL.md +8 -3
- package/dist/skills/frontend/references/design/README.md +1 -1
- package/dist/skills/frontend/references/design/_INDEX.md +1 -1
- package/dist/skills/frontend/references/design/lazyweb.md +77 -0
- package/dist/skills/frontend/references/design/stitch-design-example.md +121 -0
- package/dist/skills/frontend/references/designpowers/EVIDENCE.md +10 -2
- package/dist/skills/frontend/references/designpowers/UPSTREAM.md +1 -1
- package/dist/skills/programming/SKILL.md +10 -1
- package/dist/skills/programming/references/logging.md +91 -0
- package/dist/skills/ulw-plan/SKILL.md +5 -5
- package/dist/skills/ulw-plan/references/full-workflow.md +7 -7
- package/dist/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/dist/skills/ulw-research/ATTRIBUTION.md +2 -2
- package/dist/skills/ulw-research/SKILL.md +28 -7
- package/dist/tools/skill/description-formatter.d.ts +1 -0
- package/dist/tools/skill/description-formatter.test-support.d.ts +9 -0
- package/dist/tools/skill/zauc-mocks-skill-tools/test-support.d.ts +25 -0
- package/dist/tui.js +121 -419
- package/package.json +32 -15
- package/packages/git-bash-mcp/dist/cli.js +2 -2
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/AGENTS.md +55 -0
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +212 -117
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/AGENTS.md +51 -0
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +936 -248
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +233 -135
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/src/cache-gc.ts +29 -0
- package/packages/omo-codex/plugin/components/codegraph/src/cli.ts +13 -0
- package/packages/omo-codex/plugin/components/codegraph/src/hook-sweep.ts +25 -0
- package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +3 -1
- package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +30 -1
- package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +16 -2
- package/packages/omo-codex/plugin/components/codegraph/src/sweep-cli.ts +80 -0
- package/packages/omo-codex/plugin/components/codegraph/test/cache-gc.test.ts +34 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-exclusion.test.ts +107 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-registration.test.ts +26 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-sweep.test.ts +29 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +8 -21
- package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +108 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve-built-wrapper.test.ts +76 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +17 -111
- package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +1 -1
- package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +45 -67
- package/packages/omo-codex/plugin/components/codegraph/test/sweep-cli.test.ts +56 -0
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/AGENTS.md +31 -0
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/AGENTS.md +45 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +37 -102
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/AGENTS.md +46 -0
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +6 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +6 -0
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +5 -2
- package/packages/omo-codex/plugin/components/ultrawork/CHANGELOG.md +2 -0
- package/packages/omo-codex/plugin/components/ultrawork/README.md +3 -3
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +51 -2
- package/packages/omo-codex/plugin/components/ultrawork/package.json +2 -1
- package/packages/omo-codex/plugin/components/ultrawork/scripts/sync-directive.mjs +14 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +380 -0
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +5 -2
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +4 -4
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +5 -3
- package/packages/omo-codex/plugin/components/ultrawork/src/skill-pointer.ts +56 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +4 -4
- package/packages/omo-codex/plugin/components/ultrawork/test/directive-source.test.ts +12 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +1 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/skill-pointer.test.ts +82 -0
- package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +56 -5
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +5 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.d.ts +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.js +5 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-skill-pointer.d.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-skill-pointer.js +46 -0
- 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 +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +5 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-directive.ts +9 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-skill-pointer.ts +55 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +49 -0
- package/packages/omo-codex/plugin/package-lock.json +13 -13
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/auto-update-plan.mjs +147 -2
- package/packages/omo-codex/plugin/scripts/auto-update-release-notes.mjs +33 -0
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +48 -10
- package/packages/omo-codex/plugin/scripts/build-components.mjs +63 -17
- package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +10 -3
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +19 -0
- package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +18 -0
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/06-fix.md +6 -0
- package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +13 -3
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +8 -3
- package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/lazyweb.md +77 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/stitch-design-example.md +121 -0
- package/packages/omo-codex/plugin/skills/frontend/references/designpowers/EVIDENCE.md +10 -2
- package/packages/omo-codex/plugin/skills/frontend/references/designpowers/UPSTREAM.md +1 -1
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +10 -1
- package/packages/omo-codex/plugin/skills/programming/references/logging.md +91 -0
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +380 -0
- package/packages/omo-codex/plugin/skills/ultrawork/agents/openai.yaml +2 -0
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +5 -2
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +4 -4
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/ATTRIBUTION.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +31 -10
- package/packages/omo-codex/plugin/test/auto-update-release-notes.test.mjs +32 -0
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +153 -3
- package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +20 -1
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +39 -10
- package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +56 -0
- package/packages/omo-codex/plugin/test/ulw-research-epistemic-contract.test.mjs +98 -0
- package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +25 -7
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +612 -4193
- package/packages/shared-skills/skills/debugging/references/methodology/06-fix.md +6 -0
- package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +13 -3
- package/packages/shared-skills/skills/frontend/SKILL.md +8 -3
- package/packages/shared-skills/skills/frontend/references/design/README.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/lazyweb.md +77 -0
- package/packages/shared-skills/skills/frontend/references/design/stitch-design-example.md +121 -0
- package/packages/shared-skills/skills/frontend/references/designpowers/EVIDENCE.md +10 -2
- package/packages/shared-skills/skills/frontend/references/designpowers/UPSTREAM.md +1 -1
- package/packages/shared-skills/skills/programming/SKILL.md +10 -1
- package/packages/shared-skills/skills/programming/references/logging.md +91 -0
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +5 -5
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +7 -7
- package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/packages/shared-skills/skills/ulw-research/ATTRIBUTION.md +2 -2
- package/packages/shared-skills/skills/ulw-research/SKILL.md +28 -7
- package/packages/omo-codex/plugin/skills/ultraresearch/SKILL.md +0 -10
- package/packages/omo-codex/plugin/skills/ultraresearch/agents/openai.yaml +0 -2
- /package/dist/skills/frontend/references/designpowers/vendor/skills/accessible-content/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/adaptive-interfaces/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/cognitive-accessibility/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/design-debate/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/design-debt-tracker/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/design-handoff/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/design-md/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/design-retrospective/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/design-review/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/design-system-alignment/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/designpowers-critique/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/heuristic-evaluation/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/inclusive-personas/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/inspiration-scouting/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/interaction-design/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/motion-choreography/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/research-planning/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/responsive-patterns/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/synthetic-user-testing/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/taste-feedback/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/taste-report/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/token-architecture/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/ui-composition/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/usability-testing/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/verification-before-shipping/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/voice-and-tone/{SKILL.md → reference.md} +0 -0
- /package/dist/skills/frontend/references/designpowers/vendor/skills/writing-design-plans/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/accessible-content/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/adaptive-interfaces/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/cognitive-accessibility/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-debate/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-debt-tracker/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-handoff/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-md/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-retrospective/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-review/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-system-alignment/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/designpowers-critique/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/heuristic-evaluation/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/inclusive-personas/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/inspiration-scouting/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/interaction-design/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/motion-choreography/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/research-planning/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/responsive-patterns/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/synthetic-user-testing/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/taste-feedback/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/taste-report/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/token-architecture/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/ui-composition/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/usability-testing/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/verification-before-shipping/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/voice-and-tone/{SKILL.md → reference.md} +0 -0
- /package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/writing-design-plans/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/accessible-content/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/adaptive-interfaces/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/cognitive-accessibility/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-debate/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-debt-tracker/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-handoff/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-md/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-retrospective/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-review/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-system-alignment/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/designpowers-critique/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/heuristic-evaluation/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/inclusive-personas/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/inspiration-scouting/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/interaction-design/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/motion-choreography/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/research-planning/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/responsive-patterns/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/synthetic-user-testing/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/taste-feedback/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/taste-report/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/token-architecture/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/ui-composition/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/usability-testing/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/verification-before-shipping/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/voice-and-tone/{SKILL.md → reference.md} +0 -0
- /package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/writing-design-plans/{SKILL.md → reference.md} +0 -0
|
@@ -146,8 +146,8 @@ async function downloadFromManifest(options) {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
// components/bootstrap/src/hook.ts
|
|
149
|
-
import { spawn
|
|
150
|
-
import { stat as
|
|
149
|
+
import { spawn } from "node:child_process";
|
|
150
|
+
import { stat as stat6 } from "node:fs/promises";
|
|
151
151
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
152
152
|
|
|
153
153
|
// scripts/auto-update-state.mjs
|
|
@@ -438,9 +438,9 @@ 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 readFile13 } from "node:fs/promises";
|
|
442
442
|
import { homedir as homedir4 } from "node:os";
|
|
443
|
-
import { dirname as
|
|
443
|
+
import { dirname as dirname8, join as join20, resolve as resolve7 } from "node:path";
|
|
444
444
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
445
445
|
|
|
446
446
|
// components/bootstrap/src/provision.ts
|
|
@@ -493,6 +493,7 @@ function runtimeSlug(platform = process.platform, arch = process.arch) {
|
|
|
493
493
|
function sgBinaryName(platform = process.platform) {
|
|
494
494
|
return normalizeRuntimePlatform(platform) === "win32" ? "sg.exe" : "sg";
|
|
495
495
|
}
|
|
496
|
+
|
|
496
497
|
// ../../utils/src/ast-grep/sg-provisioner.ts
|
|
497
498
|
import { createHash as createHash2, randomUUID as randomUUID2 } from "node:crypto";
|
|
498
499
|
import { chmod, mkdir as mkdir3, rename as rename2, rm as rm3, writeFile as writeFile2 } from "node:fs/promises";
|
|
@@ -644,6 +645,7 @@ async function provisionSgBinary(options) {
|
|
|
644
645
|
throw new SgProvisionError("write_failed", `failed to provision ast-grep ${SG_PINNED_VERSION} into ${targetDir}: ${describeFailure2(error)}`, { cause: error });
|
|
645
646
|
}
|
|
646
647
|
}
|
|
648
|
+
|
|
647
649
|
// ../../utils/src/ast-grep/sg-resolver.ts
|
|
648
650
|
import { execFileSync } from "node:child_process";
|
|
649
651
|
import { existsSync, statSync } from "node:fs";
|
|
@@ -781,6 +783,7 @@ function findSgBinarySync(options = {}) {
|
|
|
781
783
|
return null;
|
|
782
784
|
}
|
|
783
785
|
}
|
|
786
|
+
|
|
784
787
|
// components/bootstrap/src/provision.ts
|
|
785
788
|
var SG_PROVISION_COMPONENT = "ast_grep";
|
|
786
789
|
var SG_FORCE_PROVISION_ENV_KEY = "OMO_BOOTSTRAP_FORCE_PROVISION";
|
|
@@ -861,8 +864,8 @@ async function defaultVersionProbe2(binaryPath) {
|
|
|
861
864
|
}
|
|
862
865
|
|
|
863
866
|
// components/bootstrap/src/setup.ts
|
|
864
|
-
import { copyFile as copyFile2, mkdir as mkdir7, readdir as
|
|
865
|
-
import { join as
|
|
867
|
+
import { copyFile as copyFile2, mkdir as mkdir7, readdir as readdir4, rm as rm10, stat as stat5 } from "node:fs/promises";
|
|
868
|
+
import { join as join19 } from "node:path";
|
|
866
869
|
|
|
867
870
|
// ../src/install/link-cached-plugin-agents.ts
|
|
868
871
|
import { copyFile, lstat as lstat2, mkdir as mkdir4, readFile as readFile5, readdir, rm as rm6, writeFile as writeFile3 } from "node:fs/promises";
|
|
@@ -1167,8 +1170,8 @@ function nodeErrorCode2(error) {
|
|
|
1167
1170
|
}
|
|
1168
1171
|
|
|
1169
1172
|
// ../src/install/codex-cache-bins.ts
|
|
1170
|
-
import { chmod as chmod2, lstat as
|
|
1171
|
-
import { basename as basename4, isAbsolute as
|
|
1173
|
+
import { chmod as chmod2, lstat as lstat6, mkdir as mkdir5, readFile as readFile8, readdir as readdir3, readlink as readlink3, rm as rm9, stat as stat4, symlink, writeFile as writeFile4 } from "node:fs/promises";
|
|
1174
|
+
import { basename as basename4, isAbsolute as isAbsolute3, join as join13, relative as relative2, resolve as resolve4, sep } from "node:path";
|
|
1172
1175
|
|
|
1173
1176
|
// ../src/install/codex-cache-command-shim.ts
|
|
1174
1177
|
var COMMAND_SHIM_MARKER = ":: generated by oh-my-openagent Codex installer";
|
|
@@ -1211,6 +1214,10 @@ function windowsCommandShim(targetPath) {
|
|
|
1211
1214
|
`);
|
|
1212
1215
|
}
|
|
1213
1216
|
|
|
1217
|
+
// ../src/install/codex-cache-dangling-bins.ts
|
|
1218
|
+
import { lstat as lstat4, readFile as readFile6, readdir as readdir2, readlink, rm as rm7, stat as stat3 } from "node:fs/promises";
|
|
1219
|
+
import { dirname as dirname5, isAbsolute as isAbsolute2, join as join10, resolve as resolve3 } from "node:path";
|
|
1220
|
+
|
|
1214
1221
|
// ../src/install/codex-cache-fs.ts
|
|
1215
1222
|
import { lstat as lstat3 } from "node:fs/promises";
|
|
1216
1223
|
async function fileExistsStrict(path) {
|
|
@@ -1230,9 +1237,96 @@ function isNodeErrorWithCode(error) {
|
|
|
1230
1237
|
return typeof error === "object" && error !== null && "code" in error;
|
|
1231
1238
|
}
|
|
1232
1239
|
|
|
1240
|
+
// ../src/install/codex-cache-dangling-bins.ts
|
|
1241
|
+
async function removeDanglingManagedComponentBins(binDir, platform, managedBinNames) {
|
|
1242
|
+
const entries = await readdir2(binDir, { withFileTypes: true });
|
|
1243
|
+
for (const entry of entries) {
|
|
1244
|
+
const binName = managedBinNameForEntry(entry.name, platform);
|
|
1245
|
+
if (binName === null || !managedBinNames.has(binName))
|
|
1246
|
+
continue;
|
|
1247
|
+
const linkPath = join10(binDir, entry.name);
|
|
1248
|
+
if (platform === "win32") {
|
|
1249
|
+
await removeDanglingGeneratedCommandShim(linkPath);
|
|
1250
|
+
continue;
|
|
1251
|
+
}
|
|
1252
|
+
await removeDanglingManagedSymlink(linkPath);
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
function managedBinNameForEntry(name, platform) {
|
|
1256
|
+
if (platform === "win32")
|
|
1257
|
+
return name.endsWith(".cmd") ? name.slice(0, -4) : null;
|
|
1258
|
+
return name;
|
|
1259
|
+
}
|
|
1260
|
+
async function removeDanglingManagedSymlink(linkPath) {
|
|
1261
|
+
try {
|
|
1262
|
+
const linkStat = await lstat4(linkPath);
|
|
1263
|
+
if (!linkStat.isSymbolicLink())
|
|
1264
|
+
return;
|
|
1265
|
+
const linkTarget = await readlink(linkPath);
|
|
1266
|
+
const target = isAbsolute2(linkTarget) ? linkTarget : resolve3(dirname5(linkPath), linkTarget);
|
|
1267
|
+
if (!await isFileSystemEntry(target) && isManagedComponentBinTarget(target))
|
|
1268
|
+
await rm7(linkPath, { force: true });
|
|
1269
|
+
} catch (error) {
|
|
1270
|
+
if (isNodeErrorWithCode(error) && error.code === "ENOENT")
|
|
1271
|
+
return;
|
|
1272
|
+
throw error;
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
async function removeDanglingGeneratedCommandShim(linkPath) {
|
|
1276
|
+
try {
|
|
1277
|
+
const linkStat = await lstat4(linkPath);
|
|
1278
|
+
if (!linkStat.isFile())
|
|
1279
|
+
return;
|
|
1280
|
+
const content = await readFile6(linkPath, "utf8");
|
|
1281
|
+
if (!content.includes(COMMAND_SHIM_MARKER))
|
|
1282
|
+
return;
|
|
1283
|
+
const target = extractCommandShimTarget(content);
|
|
1284
|
+
if (target !== null && !await isFileSystemEntry(target) && isManagedComponentBinTarget(target))
|
|
1285
|
+
await rm7(linkPath, { force: true });
|
|
1286
|
+
} catch (error) {
|
|
1287
|
+
if (isNodeErrorWithCode(error) && error.code === "ENOENT")
|
|
1288
|
+
return;
|
|
1289
|
+
throw error;
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
async function isFileSystemEntry(path) {
|
|
1293
|
+
try {
|
|
1294
|
+
await stat3(path);
|
|
1295
|
+
return true;
|
|
1296
|
+
} catch (error) {
|
|
1297
|
+
if (isNodeErrorWithCode(error) && error.code === "ENOENT")
|
|
1298
|
+
return false;
|
|
1299
|
+
throw error;
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
function extractCommandShimTarget(content) {
|
|
1303
|
+
const match = /"([^"\r\n]+components[\\/][^"\r\n]+[\\/]dist[\\/]cli\.js)" %\*/.exec(content);
|
|
1304
|
+
return match?.[1] ?? null;
|
|
1305
|
+
}
|
|
1306
|
+
function isManagedComponentBinTarget(target) {
|
|
1307
|
+
const parts = target.split(/[\\/]+/);
|
|
1308
|
+
const suffix = parts.slice(-4);
|
|
1309
|
+
return suffix[0] === "components" && suffix[2] === "dist" && suffix[3] === "cli.js" && (hasOmoPluginCachePrefix(parts, parts.length - 4) || hasOmoCodexPluginPrefix(parts, parts.length - 4));
|
|
1310
|
+
}
|
|
1311
|
+
function hasOmoPluginCachePrefix(parts, endExclusive) {
|
|
1312
|
+
for (let index = 0;index < endExclusive - 4; index += 1) {
|
|
1313
|
+
if (parts[index] === "plugins" && parts[index + 1] === "cache" && parts[index + 2] === "sisyphuslabs" && parts[index + 3] === "omo") {
|
|
1314
|
+
return index + 4 < endExclusive;
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
return false;
|
|
1318
|
+
}
|
|
1319
|
+
function hasOmoCodexPluginPrefix(parts, endExclusive) {
|
|
1320
|
+
for (let index = 0;index <= endExclusive - 3; index += 1) {
|
|
1321
|
+
if (parts[index] === "packages" && parts[index + 1] === "omo-codex" && parts[index + 2] === "plugin")
|
|
1322
|
+
return true;
|
|
1323
|
+
}
|
|
1324
|
+
return false;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1233
1327
|
// ../src/install/codex-cache-legacy-bins.ts
|
|
1234
|
-
import { lstat as
|
|
1235
|
-
import { join as
|
|
1328
|
+
import { lstat as lstat5, readFile as readFile7, readlink as readlink2, rm as rm8 } from "node:fs/promises";
|
|
1329
|
+
import { join as join11 } from "node:path";
|
|
1236
1330
|
var LEGACY_CODEX_COMPONENT_BINS = [
|
|
1237
1331
|
{ name: "omo", component: "ulw-loop" },
|
|
1238
1332
|
{ name: "codex-comment-checker", component: "comment-checker" },
|
|
@@ -1244,26 +1338,26 @@ var LEGACY_CODEX_COMPONENT_BINS = [
|
|
|
1244
1338
|
];
|
|
1245
1339
|
async function removeLegacyCodexComponentBins(binDir, platform) {
|
|
1246
1340
|
for (const entry of LEGACY_CODEX_COMPONENT_BINS) {
|
|
1247
|
-
const linkPath =
|
|
1341
|
+
const linkPath = join11(binDir, platform === "win32" ? `${entry.name}.cmd` : entry.name);
|
|
1248
1342
|
await removeLegacyCodexComponentBin(linkPath, entry.component, platform);
|
|
1249
1343
|
}
|
|
1250
1344
|
}
|
|
1251
1345
|
async function removeLegacyCodexComponentBin(linkPath, component, platform) {
|
|
1252
1346
|
try {
|
|
1253
|
-
const
|
|
1347
|
+
const stat4 = await lstat5(linkPath);
|
|
1254
1348
|
if (platform !== "win32") {
|
|
1255
|
-
if (!
|
|
1349
|
+
if (!stat4.isSymbolicLink())
|
|
1256
1350
|
return;
|
|
1257
|
-
const target = await
|
|
1351
|
+
const target = await readlink2(linkPath);
|
|
1258
1352
|
if (isManagedLegacyComponentTarget(target, component))
|
|
1259
|
-
await
|
|
1353
|
+
await rm8(linkPath, { force: true });
|
|
1260
1354
|
return;
|
|
1261
1355
|
}
|
|
1262
|
-
if (!
|
|
1356
|
+
if (!stat4.isFile())
|
|
1263
1357
|
return;
|
|
1264
|
-
const content = await
|
|
1358
|
+
const content = await readFile7(linkPath, "utf8");
|
|
1265
1359
|
if (content.includes(COMMAND_SHIM_MARKER))
|
|
1266
|
-
await
|
|
1360
|
+
await rm8(linkPath, { force: true });
|
|
1267
1361
|
} catch (error) {
|
|
1268
1362
|
if (isNodeErrorWithCode2(error) && error.code === "ENOENT")
|
|
1269
1363
|
return;
|
|
@@ -1274,7 +1368,7 @@ function isManagedLegacyComponentTarget(target, component) {
|
|
|
1274
1368
|
const parts = target.split(/[\\/]+/);
|
|
1275
1369
|
const suffixStart = parts.length - 4;
|
|
1276
1370
|
const suffix = parts.slice(-4);
|
|
1277
|
-
return suffix[0] === "components" && suffix[1] === component && suffix[2] === "dist" && suffix[3] === "cli.js" && (hasPluginCachePrefix(parts, suffixStart) ||
|
|
1371
|
+
return suffix[0] === "components" && suffix[1] === component && suffix[2] === "dist" && suffix[3] === "cli.js" && (hasPluginCachePrefix(parts, suffixStart) || hasOmoCodexPluginPrefix2(parts, suffixStart));
|
|
1278
1372
|
}
|
|
1279
1373
|
function hasPluginCachePrefix(parts, endExclusive) {
|
|
1280
1374
|
for (let index = 0;index < endExclusive - 1; index += 1) {
|
|
@@ -1283,7 +1377,7 @@ function hasPluginCachePrefix(parts, endExclusive) {
|
|
|
1283
1377
|
}
|
|
1284
1378
|
return false;
|
|
1285
1379
|
}
|
|
1286
|
-
function
|
|
1380
|
+
function hasOmoCodexPluginPrefix2(parts, endExclusive) {
|
|
1287
1381
|
for (let index = 0;index <= endExclusive - 3; index += 1) {
|
|
1288
1382
|
if (parts[index] === "packages" && parts[index + 1] === "omo-codex" && parts[index + 2] === "plugin")
|
|
1289
1383
|
return true;
|
|
@@ -1295,10 +1389,10 @@ function isNodeErrorWithCode2(error) {
|
|
|
1295
1389
|
}
|
|
1296
1390
|
|
|
1297
1391
|
// ../src/install/codex-cache-runtime-wrapper.ts
|
|
1298
|
-
import { join as
|
|
1392
|
+
import { join as join12 } from "node:path";
|
|
1299
1393
|
var RUNTIME_WRAPPER_MARKER = "OMO_GENERATED_RUNTIME_WRAPPER";
|
|
1300
1394
|
function posixRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
1301
|
-
const ulwLoopBin = toPosixPath(
|
|
1395
|
+
const ulwLoopBin = toPosixPath(join12(binDir, "omo-ulw-loop"));
|
|
1302
1396
|
const nodeCli = escapePosixDoubleQuoted(toPosixPath(nodeCliPath));
|
|
1303
1397
|
const escapedCliPath = escapePosixDoubleQuoted(toPosixPath(cliPath));
|
|
1304
1398
|
const escapedCodexHome = escapePosixDoubleQuoted(toPosixPath(codexHome));
|
|
@@ -1343,7 +1437,7 @@ function posixRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
|
1343
1437
|
`);
|
|
1344
1438
|
}
|
|
1345
1439
|
function windowsRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
1346
|
-
const ulwLoopBin =
|
|
1440
|
+
const ulwLoopBin = join12(binDir, "omo-ulw-loop.cmd");
|
|
1347
1441
|
return [
|
|
1348
1442
|
"@echo off",
|
|
1349
1443
|
`rem ${RUNTIME_WRAPPER_MARKER}`,
|
|
@@ -1391,6 +1485,7 @@ async function linkCachedPluginBins(input) {
|
|
|
1391
1485
|
const platform = input.platform ?? process.platform;
|
|
1392
1486
|
await mkdir5(input.binDir, { recursive: true });
|
|
1393
1487
|
await removeLegacyCodexComponentBins(input.binDir, platform);
|
|
1488
|
+
await removeDanglingManagedComponentBins(input.binDir, platform, new Set(binLinks.map((link) => link.name)));
|
|
1394
1489
|
const linked = [];
|
|
1395
1490
|
for (const link of binLinks) {
|
|
1396
1491
|
const linkPath = await linkCachedPluginBin(input.binDir, link, platform);
|
|
@@ -1399,35 +1494,35 @@ async function linkCachedPluginBins(input) {
|
|
|
1399
1494
|
return linked;
|
|
1400
1495
|
}
|
|
1401
1496
|
async function linkRootRuntimeBin(input) {
|
|
1402
|
-
const cliPath =
|
|
1497
|
+
const cliPath = join13(input.repoRoot, "dist", "cli", "index.js");
|
|
1403
1498
|
if (!await isFile2(cliPath))
|
|
1404
1499
|
return null;
|
|
1405
|
-
const nodeCliPath =
|
|
1500
|
+
const nodeCliPath = join13(input.repoRoot, "dist", "cli-node", "index.js");
|
|
1406
1501
|
const platform = input.platform ?? process.platform;
|
|
1407
1502
|
await mkdir5(input.binDir, { recursive: true });
|
|
1408
1503
|
if (platform === "win32") {
|
|
1409
|
-
const linkPath2 =
|
|
1504
|
+
const linkPath2 = join13(input.binDir, "omo.cmd");
|
|
1410
1505
|
await replaceRuntimeWrapper(linkPath2, windowsRuntimeWrapper(cliPath, input.codexHome, input.binDir, nodeCliPath));
|
|
1411
1506
|
return { name: "omo", path: linkPath2, target: cliPath };
|
|
1412
1507
|
}
|
|
1413
|
-
const linkPath =
|
|
1508
|
+
const linkPath = join13(input.binDir, "omo");
|
|
1414
1509
|
await replaceRuntimeWrapper(linkPath, posixRuntimeWrapper(cliPath, input.codexHome, input.binDir, nodeCliPath));
|
|
1415
1510
|
await chmod2(linkPath, 493);
|
|
1416
1511
|
return { name: "omo", path: linkPath, target: cliPath };
|
|
1417
1512
|
}
|
|
1418
1513
|
async function linkCachedPluginBin(binDir, link, platform) {
|
|
1419
1514
|
if (platform === "win32") {
|
|
1420
|
-
const linkPath2 =
|
|
1515
|
+
const linkPath2 = join13(binDir, `${link.name}.cmd`);
|
|
1421
1516
|
await replaceCommandShim(linkPath2, link.target);
|
|
1422
1517
|
return linkPath2;
|
|
1423
1518
|
}
|
|
1424
|
-
const linkPath =
|
|
1519
|
+
const linkPath = join13(binDir, link.name);
|
|
1425
1520
|
await replaceSymlink(linkPath, link.target);
|
|
1426
1521
|
return linkPath;
|
|
1427
1522
|
}
|
|
1428
1523
|
async function isFile2(path) {
|
|
1429
1524
|
try {
|
|
1430
|
-
return (await
|
|
1525
|
+
return (await stat4(path)).isFile();
|
|
1431
1526
|
} catch (error) {
|
|
1432
1527
|
if (isNodeErrorWithCode(error) && error.code === "ENOENT")
|
|
1433
1528
|
return false;
|
|
@@ -1440,23 +1535,23 @@ async function discoverPackageBins(root) {
|
|
|
1440
1535
|
return links;
|
|
1441
1536
|
}
|
|
1442
1537
|
async function collectPackageBins(directory, root, links) {
|
|
1443
|
-
const entries = await
|
|
1538
|
+
const entries = await readdir3(directory, { withFileTypes: true });
|
|
1444
1539
|
if (entries.some((entry) => entry.isFile() && entry.name === "package.json")) {
|
|
1445
|
-
await appendPackageBinLinks(
|
|
1540
|
+
await appendPackageBinLinks(join13(directory, "package.json"), directory, root, links);
|
|
1446
1541
|
}
|
|
1447
1542
|
for (const entry of entries) {
|
|
1448
1543
|
if (!entry.isDirectory())
|
|
1449
1544
|
continue;
|
|
1450
1545
|
if (entry.name === "node_modules" || entry.name === ".git" || entry.name === "dist")
|
|
1451
1546
|
continue;
|
|
1452
|
-
const childPath =
|
|
1547
|
+
const childPath = join13(directory, entry.name);
|
|
1453
1548
|
if (!childPath.startsWith(root))
|
|
1454
1549
|
continue;
|
|
1455
1550
|
await collectPackageBins(childPath, root, links);
|
|
1456
1551
|
}
|
|
1457
1552
|
}
|
|
1458
1553
|
async function appendPackageBinLinks(packageJsonPath, packageRoot, root, links) {
|
|
1459
|
-
const packageJson = JSON.parse(await
|
|
1554
|
+
const packageJson = JSON.parse(await readFile8(packageJsonPath, "utf8"));
|
|
1460
1555
|
if (!isPlainRecord(packageJson))
|
|
1461
1556
|
return;
|
|
1462
1557
|
const packageName = packageJson.name;
|
|
@@ -1491,10 +1586,10 @@ function isReservedNestedBinName(name, packageRoot, root) {
|
|
|
1491
1586
|
function resolvePackageBinTarget(packageRoot, target) {
|
|
1492
1587
|
if (target.includes("\x00"))
|
|
1493
1588
|
throw new Error("Package bin target must stay inside package root");
|
|
1494
|
-
const root =
|
|
1495
|
-
const resolvedTarget =
|
|
1589
|
+
const root = resolve4(packageRoot);
|
|
1590
|
+
const resolvedTarget = resolve4(root, target);
|
|
1496
1591
|
const relativeTarget = relative2(root, resolvedTarget);
|
|
1497
|
-
if (relativeTarget === "" || relativeTarget !== ".." && !relativeTarget.startsWith(`..${sep}`) && !
|
|
1592
|
+
if (relativeTarget === "" || relativeTarget !== ".." && !relativeTarget.startsWith(`..${sep}`) && !isAbsolute3(relativeTarget)) {
|
|
1498
1593
|
return resolvedTarget;
|
|
1499
1594
|
}
|
|
1500
1595
|
throw new Error("Package bin target must stay inside package root");
|
|
@@ -1502,7 +1597,7 @@ function resolvePackageBinTarget(packageRoot, target) {
|
|
|
1502
1597
|
async function replaceSymlink(linkPath, targetPath) {
|
|
1503
1598
|
if (await existingNonSymlink(linkPath))
|
|
1504
1599
|
throw new Error(`${linkPath} already exists and is not a symlink`);
|
|
1505
|
-
await
|
|
1600
|
+
await rm9(linkPath, { force: true });
|
|
1506
1601
|
await symlink(targetPath, linkPath);
|
|
1507
1602
|
}
|
|
1508
1603
|
async function replaceCommandShim(linkPath, targetPath) {
|
|
@@ -1513,17 +1608,17 @@ async function replaceCommandShim(linkPath, targetPath) {
|
|
|
1513
1608
|
async function replaceRuntimeWrapper(linkPath, content) {
|
|
1514
1609
|
if (await existingNonRuntimeWrapper(linkPath))
|
|
1515
1610
|
throw new Error(`${linkPath} already exists and is not a generated OMO runtime wrapper`);
|
|
1516
|
-
await
|
|
1611
|
+
await rm9(linkPath, { force: true });
|
|
1517
1612
|
await writeFile4(linkPath, content);
|
|
1518
1613
|
}
|
|
1519
1614
|
async function existingNonRuntimeWrapper(path) {
|
|
1520
1615
|
try {
|
|
1521
|
-
const
|
|
1522
|
-
if (
|
|
1616
|
+
const stat5 = await lstat6(path);
|
|
1617
|
+
if (stat5.isSymbolicLink())
|
|
1523
1618
|
return false;
|
|
1524
|
-
if (!
|
|
1619
|
+
if (!stat5.isFile())
|
|
1525
1620
|
return true;
|
|
1526
|
-
const content = await
|
|
1621
|
+
const content = await readFile8(path, "utf8");
|
|
1527
1622
|
return !content.includes(RUNTIME_WRAPPER_MARKER);
|
|
1528
1623
|
} catch (error) {
|
|
1529
1624
|
if (isNodeErrorWithCode(error) && error.code === "ENOENT")
|
|
@@ -1533,10 +1628,10 @@ async function existingNonRuntimeWrapper(path) {
|
|
|
1533
1628
|
}
|
|
1534
1629
|
async function existingNonShim(path) {
|
|
1535
1630
|
try {
|
|
1536
|
-
const
|
|
1537
|
-
if (!
|
|
1631
|
+
const stat5 = await lstat6(path);
|
|
1632
|
+
if (!stat5.isFile())
|
|
1538
1633
|
return true;
|
|
1539
|
-
const content = await
|
|
1634
|
+
const content = await readFile8(path, "utf8");
|
|
1540
1635
|
if (content.includes(COMMAND_SHIM_MARKER))
|
|
1541
1636
|
return false;
|
|
1542
1637
|
throw new Error(`${path} already exists and is not a generated command shim`);
|
|
@@ -1548,10 +1643,10 @@ async function existingNonShim(path) {
|
|
|
1548
1643
|
}
|
|
1549
1644
|
async function existingNonSymlink(path) {
|
|
1550
1645
|
try {
|
|
1551
|
-
const
|
|
1552
|
-
if (!
|
|
1646
|
+
const stat5 = await lstat6(path);
|
|
1647
|
+
if (!stat5.isSymbolicLink())
|
|
1553
1648
|
return true;
|
|
1554
|
-
await
|
|
1649
|
+
await readlink3(path);
|
|
1555
1650
|
return false;
|
|
1556
1651
|
} catch (error) {
|
|
1557
1652
|
if (isNodeErrorWithCode(error) && error.code === "ENOENT")
|
|
@@ -1561,8 +1656,8 @@ async function existingNonSymlink(path) {
|
|
|
1561
1656
|
}
|
|
1562
1657
|
|
|
1563
1658
|
// ../src/install/codex-config-toml.ts
|
|
1564
|
-
import { mkdir as mkdir6, readFile as
|
|
1565
|
-
import { dirname as
|
|
1659
|
+
import { mkdir as mkdir6, readFile as readFile10 } from "node:fs/promises";
|
|
1660
|
+
import { dirname as dirname7 } from "node:path";
|
|
1566
1661
|
|
|
1567
1662
|
// ../src/install/toml-section-editor.ts
|
|
1568
1663
|
function findTomlSection(config, header) {
|
|
@@ -1920,13 +2015,13 @@ function tomlKeySegment(value) {
|
|
|
1920
2015
|
}
|
|
1921
2016
|
|
|
1922
2017
|
// ../src/install/codex-config-atomic-write.ts
|
|
1923
|
-
import { lstat as
|
|
1924
|
-
import { basename as basename5, dirname as
|
|
2018
|
+
import { lstat as lstat7, readlink as readlink4, realpath, rename as rename3, unlink, writeFile as writeFile5 } from "node:fs/promises";
|
|
2019
|
+
import { basename as basename5, dirname as dirname6, isAbsolute as isAbsolute4, join as join14, resolve as resolve5 } from "node:path";
|
|
1925
2020
|
var RENAME_RETRY_DELAYS_MS = [10, 25, 50];
|
|
1926
2021
|
var RETRIABLE_RENAME_CODES = new Set(["EPERM", "EBUSY"]);
|
|
1927
2022
|
async function writeFileAtomic(targetPath, data) {
|
|
1928
2023
|
const writeTarget = await resolveSymlinkTarget(targetPath);
|
|
1929
|
-
const temporaryPath =
|
|
2024
|
+
const temporaryPath = join14(dirname6(writeTarget), `.tmp-${basename5(writeTarget)}-${process.pid}-${Date.now()}`);
|
|
1930
2025
|
await writeFile5(temporaryPath, data);
|
|
1931
2026
|
try {
|
|
1932
2027
|
await renameWithRetry(temporaryPath, writeTarget);
|
|
@@ -1941,7 +2036,7 @@ async function writeFileAtomic(targetPath, data) {
|
|
|
1941
2036
|
}
|
|
1942
2037
|
async function resolveSymlinkTarget(targetPath) {
|
|
1943
2038
|
try {
|
|
1944
|
-
const linkStats = await
|
|
2039
|
+
const linkStats = await lstat7(targetPath);
|
|
1945
2040
|
if (!linkStats.isSymbolicLink())
|
|
1946
2041
|
return targetPath;
|
|
1947
2042
|
} catch (error) {
|
|
@@ -1954,8 +2049,8 @@ async function resolveSymlinkTarget(targetPath) {
|
|
|
1954
2049
|
} catch (error) {
|
|
1955
2050
|
if (!(error instanceof Error))
|
|
1956
2051
|
throw error;
|
|
1957
|
-
const linkValue = await
|
|
1958
|
-
return
|
|
2052
|
+
const linkValue = await readlink4(targetPath);
|
|
2053
|
+
return isAbsolute4(linkValue) ? linkValue : resolve5(dirname6(targetPath), linkValue);
|
|
1959
2054
|
}
|
|
1960
2055
|
}
|
|
1961
2056
|
async function renameWithRetry(fromPath, toPath) {
|
|
@@ -2296,8 +2391,8 @@ function isRootSetting(line, key) {
|
|
|
2296
2391
|
}
|
|
2297
2392
|
|
|
2298
2393
|
// ../src/install/codex-model-catalog.ts
|
|
2299
|
-
import { readFile as
|
|
2300
|
-
import { join as
|
|
2394
|
+
import { readFile as readFile9 } from "node:fs/promises";
|
|
2395
|
+
import { join as join15 } from "node:path";
|
|
2301
2396
|
var FALLBACK_CODEX_MODEL_CATALOG = {
|
|
2302
2397
|
current: {
|
|
2303
2398
|
model: "gpt-5.5",
|
|
@@ -2316,9 +2411,9 @@ var FALLBACK_CODEX_MODEL_CATALOG = {
|
|
|
2316
2411
|
]
|
|
2317
2412
|
};
|
|
2318
2413
|
async function readCodexModelCatalog(codexPackageRoot) {
|
|
2319
|
-
const catalogPath =
|
|
2414
|
+
const catalogPath = join15(codexPackageRoot, "plugin", "model-catalog.json");
|
|
2320
2415
|
try {
|
|
2321
|
-
const parsed = JSON.parse(await
|
|
2416
|
+
const parsed = JSON.parse(await readFile9(catalogPath, "utf8"));
|
|
2322
2417
|
return parseCodexModelCatalog(parsed) ?? FALLBACK_CODEX_MODEL_CATALOG;
|
|
2323
2418
|
} catch (error) {
|
|
2324
2419
|
if (error instanceof Error)
|
|
@@ -2452,10 +2547,15 @@ function readBooleanSetting(sectionText, key) {
|
|
|
2452
2547
|
|
|
2453
2548
|
// ../src/install/codex-config-toml.ts
|
|
2454
2549
|
async function updateCodexConfig(input) {
|
|
2455
|
-
await mkdir6(
|
|
2456
|
-
let config
|
|
2457
|
-
|
|
2458
|
-
config = await
|
|
2550
|
+
await mkdir6(dirname7(input.configPath), { recursive: true });
|
|
2551
|
+
let config;
|
|
2552
|
+
try {
|
|
2553
|
+
config = await readFile10(input.configPath, "utf8");
|
|
2554
|
+
} catch (error) {
|
|
2555
|
+
if (!isMissingFileError(error))
|
|
2556
|
+
throw error;
|
|
2557
|
+
config = "";
|
|
2558
|
+
}
|
|
2459
2559
|
const pluginSet = new Set(input.pluginNames);
|
|
2460
2560
|
for (const legacyMarketplaceName of legacyMarketplaceNames(input.marketplaceName)) {
|
|
2461
2561
|
config = removeMarketplaceBlock(config, legacyMarketplaceName);
|
|
@@ -2489,27 +2589,20 @@ async function updateCodexConfig(input) {
|
|
|
2489
2589
|
await writeFileAtomic(input.configPath, `${config.trimEnd()}
|
|
2490
2590
|
`);
|
|
2491
2591
|
}
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
await readFile9(path, "utf8");
|
|
2495
|
-
return true;
|
|
2496
|
-
} catch (error) {
|
|
2497
|
-
if (error instanceof Error)
|
|
2498
|
-
return false;
|
|
2499
|
-
return false;
|
|
2500
|
-
}
|
|
2592
|
+
function isMissingFileError(error) {
|
|
2593
|
+
return error instanceof Error && "code" in error && error.code === "ENOENT";
|
|
2501
2594
|
}
|
|
2502
2595
|
|
|
2503
2596
|
// ../src/install/codex-git-bash-mcp-env.ts
|
|
2504
|
-
import { readFile as
|
|
2505
|
-
import { join as
|
|
2597
|
+
import { readFile as readFile11, writeFile as writeFile6 } from "node:fs/promises";
|
|
2598
|
+
import { join as join16 } from "node:path";
|
|
2506
2599
|
var GIT_BASH_ENV_KEY = "OMO_CODEX_GIT_BASH_PATH";
|
|
2507
2600
|
var CODEGRAPH_RELATIVE_ARGS = new Set(["components/codegraph/dist/serve.js", "./components/codegraph/dist/serve.js"]);
|
|
2508
2601
|
async function stampGitBashMcpEnv(input) {
|
|
2509
|
-
const manifestPath =
|
|
2602
|
+
const manifestPath = join16(input.pluginRoot, ".mcp.json");
|
|
2510
2603
|
if (!await fileExistsStrict(manifestPath))
|
|
2511
2604
|
return false;
|
|
2512
|
-
const parsed = JSON.parse(await
|
|
2605
|
+
const parsed = JSON.parse(await readFile11(manifestPath, "utf8"));
|
|
2513
2606
|
if (!isPlainRecord(parsed) || !isPlainRecord(parsed["mcpServers"]))
|
|
2514
2607
|
return false;
|
|
2515
2608
|
let changed = stampCodegraphMcpPath(parsed["mcpServers"], input.pluginRoot);
|
|
@@ -2539,14 +2632,14 @@ function stampCodegraphMcpPath(mcpServers, pluginRoot) {
|
|
|
2539
2632
|
const entrypoint = args[0];
|
|
2540
2633
|
if (typeof entrypoint !== "string" || !CODEGRAPH_RELATIVE_ARGS.has(entrypoint))
|
|
2541
2634
|
return false;
|
|
2542
|
-
codegraphServer["args"] = [
|
|
2635
|
+
codegraphServer["args"] = [join16(pluginRoot, "components", "codegraph", "dist", "serve.js"), ...args.slice(1)];
|
|
2543
2636
|
return true;
|
|
2544
2637
|
}
|
|
2545
2638
|
|
|
2546
2639
|
// ../src/install/codex-hook-trust.ts
|
|
2547
2640
|
import { createHash as createHash3 } from "node:crypto";
|
|
2548
|
-
import { readFile as
|
|
2549
|
-
import { join as
|
|
2641
|
+
import { readFile as readFile12 } from "node:fs/promises";
|
|
2642
|
+
import { join as join17 } from "node:path";
|
|
2550
2643
|
var EVENT_LABELS = new Map([
|
|
2551
2644
|
["PreToolUse", "pre_tool_use"],
|
|
2552
2645
|
["PermissionRequest", "permission_request"],
|
|
@@ -2560,18 +2653,18 @@ var EVENT_LABELS = new Map([
|
|
|
2560
2653
|
["Stop", "stop"]
|
|
2561
2654
|
]);
|
|
2562
2655
|
async function trustedHookStatesForPlugin(input) {
|
|
2563
|
-
const manifestPath =
|
|
2564
|
-
if (!await
|
|
2656
|
+
const manifestPath = join17(input.pluginRoot, ".codex-plugin", "plugin.json");
|
|
2657
|
+
if (!await exists3(manifestPath))
|
|
2565
2658
|
return [];
|
|
2566
|
-
const manifest = JSON.parse(await
|
|
2659
|
+
const manifest = JSON.parse(await readFile12(manifestPath, "utf8"));
|
|
2567
2660
|
if (!isPlainRecord(manifest))
|
|
2568
2661
|
return [];
|
|
2569
2662
|
const states = [];
|
|
2570
2663
|
for (const hookPath of hookManifestPaths(manifest.hooks)) {
|
|
2571
|
-
const hooksPath =
|
|
2572
|
-
if (!await
|
|
2664
|
+
const hooksPath = join17(input.pluginRoot, hookPath);
|
|
2665
|
+
if (!await exists3(hooksPath))
|
|
2573
2666
|
continue;
|
|
2574
|
-
const parsed = JSON.parse(await
|
|
2667
|
+
const parsed = JSON.parse(await readFile12(hooksPath, "utf8"));
|
|
2575
2668
|
if (!isPlainRecord(parsed) || !isPlainRecord(parsed.hooks))
|
|
2576
2669
|
continue;
|
|
2577
2670
|
states.push(...trustedHookStatesForHooksFile({
|
|
@@ -2652,9 +2745,9 @@ function canonicalJson(value) {
|
|
|
2652
2745
|
function stripDotSlash(value) {
|
|
2653
2746
|
return value.startsWith("./") ? value.slice(2) : value;
|
|
2654
2747
|
}
|
|
2655
|
-
async function
|
|
2748
|
+
async function exists3(path) {
|
|
2656
2749
|
try {
|
|
2657
|
-
await
|
|
2750
|
+
await readFile12(path, "utf8");
|
|
2658
2751
|
return true;
|
|
2659
2752
|
} catch (error) {
|
|
2660
2753
|
if (error instanceof Error)
|
|
@@ -2665,18 +2758,19 @@ async function exists4(path) {
|
|
|
2665
2758
|
|
|
2666
2759
|
// ../src/install/codex-installer-bin-dir.ts
|
|
2667
2760
|
import { homedir as homedir3 } from "node:os";
|
|
2668
|
-
import { join as
|
|
2761
|
+
import { join as join18, resolve as resolve6 } from "node:path";
|
|
2669
2762
|
function resolveCodexInstallerBinDir(input) {
|
|
2670
2763
|
const explicitBinDir = input.binDir ?? input.env?.CODEX_LOCAL_BIN_DIR;
|
|
2671
2764
|
if (explicitBinDir !== undefined && explicitBinDir.trim().length > 0)
|
|
2672
|
-
return
|
|
2765
|
+
return resolve6(explicitBinDir.trim());
|
|
2673
2766
|
const homeDir = input.homeDir ?? homedir3();
|
|
2674
|
-
const defaultCodexHome =
|
|
2675
|
-
const resolvedCodexHome =
|
|
2767
|
+
const defaultCodexHome = resolve6(homeDir, ".codex");
|
|
2768
|
+
const resolvedCodexHome = resolve6(input.codexHome);
|
|
2676
2769
|
if (resolvedCodexHome !== defaultCodexHome)
|
|
2677
|
-
return
|
|
2678
|
-
return
|
|
2770
|
+
return join18(resolvedCodexHome, "bin");
|
|
2771
|
+
return resolve6(homeDir, ".local", "bin");
|
|
2679
2772
|
}
|
|
2773
|
+
|
|
2680
2774
|
// ../../utils/src/runtime/git-bash.ts
|
|
2681
2775
|
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
2682
2776
|
import { existsSync as existsSync2 } from "node:fs";
|
|
@@ -2759,13 +2853,14 @@ function whereCommand(command) {
|
|
|
2759
2853
|
throw error;
|
|
2760
2854
|
}
|
|
2761
2855
|
}
|
|
2856
|
+
|
|
2762
2857
|
// ../src/install/git-bash.ts
|
|
2763
2858
|
var resolveGitBashForCurrentProcess2 = (input = {}) => {
|
|
2764
2859
|
return toCodexResolution(resolveGitBashForCurrentProcess(input));
|
|
2765
2860
|
};
|
|
2766
2861
|
async function prepareGitBashForInstall(input) {
|
|
2767
|
-
const
|
|
2768
|
-
const initialResolution =
|
|
2862
|
+
const resolve7 = input.resolveGitBash ?? (() => resolveGitBashForCurrentProcess2({ platform: input.platform, env: input.env }));
|
|
2863
|
+
const initialResolution = resolve7();
|
|
2769
2864
|
return initialResolution;
|
|
2770
2865
|
}
|
|
2771
2866
|
function toCodexResolution(resolution) {
|
|
@@ -2828,9 +2923,9 @@ async function resolveGitBashStep(options, degraded) {
|
|
|
2828
2923
|
return false;
|
|
2829
2924
|
}
|
|
2830
2925
|
async function linkBundledAgentsStep(options) {
|
|
2831
|
-
const agentsTarget =
|
|
2926
|
+
const agentsTarget = join19(options.codexHome, "agents");
|
|
2832
2927
|
try {
|
|
2833
|
-
const stageRoot =
|
|
2928
|
+
const stageRoot = join19(options.pluginData, "bootstrap", "agents-stage");
|
|
2834
2929
|
await stageBundledAgents(options.pluginRoot, stageRoot);
|
|
2835
2930
|
const preservedReasoning = await capturePreservedAgentReasoning({ codexHome: options.codexHome });
|
|
2836
2931
|
const preservedServiceTier = await capturePreservedAgentServiceTier({ codexHome: options.codexHome });
|
|
@@ -2856,23 +2951,23 @@ async function linkBundledAgentsStep(options) {
|
|
|
2856
2951
|
}
|
|
2857
2952
|
}
|
|
2858
2953
|
async function stageBundledAgents(pluginRoot, stageRoot) {
|
|
2859
|
-
await
|
|
2954
|
+
await rm10(stageRoot, { force: true, recursive: true });
|
|
2860
2955
|
await mkdir7(stageRoot, { recursive: true });
|
|
2861
|
-
const componentsRoot =
|
|
2956
|
+
const componentsRoot = join19(pluginRoot, "components");
|
|
2862
2957
|
for (const componentName of await directoryNames(componentsRoot)) {
|
|
2863
|
-
const agentsDir =
|
|
2958
|
+
const agentsDir = join19(componentsRoot, componentName, "agents");
|
|
2864
2959
|
const agentFiles = (await fileNames(agentsDir)).filter((name) => name.endsWith(".toml"));
|
|
2865
2960
|
if (agentFiles.length === 0)
|
|
2866
2961
|
continue;
|
|
2867
|
-
const stagedAgentsDir =
|
|
2962
|
+
const stagedAgentsDir = join19(stageRoot, "components", componentName, "agents");
|
|
2868
2963
|
await mkdir7(stagedAgentsDir, { recursive: true });
|
|
2869
2964
|
for (const agentFile of agentFiles) {
|
|
2870
|
-
await copyFile2(
|
|
2965
|
+
await copyFile2(join19(agentsDir, agentFile), join19(stagedAgentsDir, agentFile));
|
|
2871
2966
|
}
|
|
2872
2967
|
}
|
|
2873
2968
|
}
|
|
2874
2969
|
async function updateConfigStep(options, inputs, degraded) {
|
|
2875
|
-
const configPath =
|
|
2970
|
+
const configPath = join19(options.codexHome, "config.toml");
|
|
2876
2971
|
try {
|
|
2877
2972
|
await assertWritableConfigIfPresent(configPath);
|
|
2878
2973
|
const trustedHookStates = await trustedHookStatesForPlugin({
|
|
@@ -2903,7 +2998,7 @@ async function updateConfigStep(options, inputs, degraded) {
|
|
|
2903
2998
|
}
|
|
2904
2999
|
async function assertWritableConfigIfPresent(configPath) {
|
|
2905
3000
|
try {
|
|
2906
|
-
if (((await
|
|
3001
|
+
if (((await stat5(configPath)).mode & 146) === 0)
|
|
2907
3002
|
throw new Error(`${configPath} has no write permission bits set`);
|
|
2908
3003
|
} catch (error) {
|
|
2909
3004
|
if (errorCode(error) === "ENOENT")
|
|
@@ -2928,7 +3023,7 @@ async function linkComponentBinsStep(options, degraded) {
|
|
|
2928
3023
|
await linkRuntimeWrapperStep(options, binDir, degraded);
|
|
2929
3024
|
}
|
|
2930
3025
|
async function linkRuntimeWrapperStep(options, binDir, degraded) {
|
|
2931
|
-
const cliPath =
|
|
3026
|
+
const cliPath = join19(options.pluginRoot, "dist", "cli", "index.js");
|
|
2932
3027
|
try {
|
|
2933
3028
|
const linked = await linkRootRuntimeBin({
|
|
2934
3029
|
binDir,
|
|
@@ -2961,7 +3056,7 @@ async function stampGitBashEnvStep(options, degraded) {
|
|
|
2961
3056
|
degraded.push({
|
|
2962
3057
|
component: "git-bash-env",
|
|
2963
3058
|
hint: BOOTSTRAP_DOCTOR_HINT,
|
|
2964
|
-
reason: `failed to stamp ${
|
|
3059
|
+
reason: `failed to stamp ${join19(options.pluginRoot, ".mcp.json")}: ${errorMessage(error)}`
|
|
2965
3060
|
});
|
|
2966
3061
|
}
|
|
2967
3062
|
}
|
|
@@ -2973,7 +3068,7 @@ async function fileNames(root) {
|
|
|
2973
3068
|
}
|
|
2974
3069
|
async function entryNames(root, keep) {
|
|
2975
3070
|
try {
|
|
2976
|
-
const entries = await
|
|
3071
|
+
const entries = await readdir4(root, { withFileTypes: true });
|
|
2977
3072
|
return entries.filter((entry) => keep(entry)).map((entry) => entry.name).sort();
|
|
2978
3073
|
} catch (error) {
|
|
2979
3074
|
if (error instanceof Error && "code" in error && error.code === "ENOENT")
|
|
@@ -3029,11 +3124,11 @@ function resolvePluginDataRoot(env) {
|
|
|
3029
3124
|
const fromEnv = env["PLUGIN_DATA"]?.trim();
|
|
3030
3125
|
if (fromEnv !== undefined && fromEnv.length > 0)
|
|
3031
3126
|
return fromEnv;
|
|
3032
|
-
return
|
|
3127
|
+
return join20(homedir4(), ".local", "share", "lazycodex");
|
|
3033
3128
|
}
|
|
3034
3129
|
async function readPluginVersion(pluginRoot) {
|
|
3035
3130
|
try {
|
|
3036
|
-
const parsed = JSON.parse(await
|
|
3131
|
+
const parsed = JSON.parse(await readFile13(join20(pluginRoot, ".codex-plugin", "plugin.json"), "utf8"));
|
|
3037
3132
|
if (typeof parsed !== "object" || parsed === null)
|
|
3038
3133
|
return;
|
|
3039
3134
|
const version = parsed["version"];
|
|
@@ -3100,7 +3195,7 @@ async function runBootstrapWorker(options = {}) {
|
|
|
3100
3195
|
degraded.push({
|
|
3101
3196
|
component: "bootstrap",
|
|
3102
3197
|
hint: BOOTSTRAP_DOCTOR_HINT,
|
|
3103
|
-
reason: `plugin version unresolved from ${
|
|
3198
|
+
reason: `plugin version unresolved from ${join20(pluginRoot, ".codex-plugin", "plugin.json")}`
|
|
3104
3199
|
});
|
|
3105
3200
|
}
|
|
3106
3201
|
for (const step of steps) {
|
|
@@ -3139,12 +3234,12 @@ function resolvePluginRoot(env) {
|
|
|
3139
3234
|
const fromEnv = env["PLUGIN_ROOT"]?.trim();
|
|
3140
3235
|
if (fromEnv !== undefined && fromEnv.length > 0)
|
|
3141
3236
|
return fromEnv;
|
|
3142
|
-
return
|
|
3237
|
+
return resolve7(dirname8(fileURLToPath2(import.meta.url)), "..", "..", "..");
|
|
3143
3238
|
}
|
|
3144
3239
|
async function appendBootstrapLog(pluginData, now, event, details) {
|
|
3145
3240
|
try {
|
|
3146
|
-
const logPath =
|
|
3147
|
-
await mkdir8(
|
|
3241
|
+
const logPath = join20(pluginData, "bootstrap", "bootstrap.log");
|
|
3242
|
+
await mkdir8(dirname8(logPath), { recursive: true });
|
|
3148
3243
|
await appendFile2(logPath, `${JSON.stringify({ timestamp: new Date(now).toISOString(), event, ...details })}
|
|
3149
3244
|
`);
|
|
3150
3245
|
} catch {}
|
|
@@ -3214,7 +3309,7 @@ async function executeSessionStartHook(options) {
|
|
|
3214
3309
|
return { action: "spawned", exitCode: 0 };
|
|
3215
3310
|
}
|
|
3216
3311
|
function spawnDetachedWorker(invocation) {
|
|
3217
|
-
const child =
|
|
3312
|
+
const child = spawn(invocation.command, [...invocation.args], {
|
|
3218
3313
|
detached: true,
|
|
3219
3314
|
env: invocation.env,
|
|
3220
3315
|
stdio: "ignore"
|
|
@@ -3226,7 +3321,7 @@ function defaultWorkerCliPath() {
|
|
|
3226
3321
|
}
|
|
3227
3322
|
async function isLockFresh(lockPath, now) {
|
|
3228
3323
|
try {
|
|
3229
|
-
const lockStat = await
|
|
3324
|
+
const lockStat = await stat6(lockPath);
|
|
3230
3325
|
return now - lockStat.mtimeMs < DEFAULT_LOCK_STALE_MS;
|
|
3231
3326
|
} catch {
|
|
3232
3327
|
return false;
|