oh-my-opencode 4.19.4 → 5.0.0-beta.10
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/publish.md +44 -16
- package/.agents/skills/publish/SKILL.md +44 -16
- package/.agents/skills/work-with-pr/SKILL.md +37 -23
- package/.opencode/command/publish.md +44 -16
- package/.opencode/skills/work-with-pr/SKILL.md +37 -23
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +18 -6
- package/README.ru.md +1 -1
- package/README.zh-cn.md +1 -1
- package/bin/oh-my-opencode.js +14 -1
- package/bin/oh-my-opencode.test.ts +21 -0
- package/dist/agents/atlas/agent.d.ts +0 -1
- package/dist/agents/sisyphus/grok-4.d.ts +20 -0
- package/dist/agents/sisyphus/index.d.ts +2 -0
- package/dist/agents/sisyphus-agent-config.d.ts +6 -0
- package/dist/agents/sisyphus-agent-factory.d.ts +1 -1
- package/dist/agents/sisyphus-runtime-prompt-reconciler.d.ts +15 -4
- package/dist/agents/types.d.ts +2 -2
- package/dist/cli/index.js +1888 -807
- package/dist/cli/run/on-complete-hook.d.ts +2 -0
- package/dist/cli-node/index.js +1888 -807
- package/dist/config/schema/agent-overrides.d.ts +528 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +495 -0
- package/dist/features/monitor/batcher.d.ts +3 -1
- package/dist/features/monitor/manager-internals.d.ts +1 -0
- package/dist/features/monitor/output-injector-types.d.ts +2 -0
- package/dist/features/monitor/output-injector.d.ts +6 -0
- package/dist/hooks/atlas/final-wave-approval-gate.test-support.d.ts +50 -0
- package/dist/hooks/atlas/system-reminder-templates.d.ts +0 -1
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/unrecoverable-request-error.d.ts +9 -0
- package/dist/hooks/tool-pair-validator/hook.test-support.d.ts +29 -0
- package/dist/hooks/tool-pair-validator/tool-part-ids.d.ts +14 -5
- package/dist/hooks/tool-pair-validator/tool-result-repair.d.ts +4 -3
- package/dist/hooks/tool-pair-validator/types.d.ts +5 -22
- package/dist/index.js +3139 -2232
- package/dist/mcp/lsp.d.ts +1 -0
- package/dist/oh-my-opencode.schema.json +1466 -131
- package/dist/shared/normalize-sdk-response.d.ts +1 -0
- package/dist/shared/shell-env.d.ts +1 -1
- package/dist/shared/tmux/constants.d.ts +1 -1
- package/dist/skills/ast-grep/SOURCE +1 -1
- package/dist/skills/ast-grep/install.ps1 +2 -2
- package/dist/skills/ast-grep/install.sh +1 -1
- package/dist/skills/ast-grep/references/install.md +2 -2
- package/dist/skills/ast-grep/tests/smoke.sh +1 -1
- package/dist/skills/coding-agent-sessions/SKILL.md +3 -2
- package/dist/skills/coding-agent-sessions/references/all-platforms.md +1 -1
- package/dist/skills/coding-agent-sessions/references/senpi.md +4 -4
- package/dist/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
- package/dist/skills/frontend/SKILL.md +10 -7
- package/dist/skills/frontend/references/design/_INDEX.md +1 -0
- package/dist/skills/frontend/references/design/stylegallery.md +80 -0
- package/dist/skills/start-work/SKILL.md +54 -9
- package/dist/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
- package/dist/skills/ultimate-browsing/SKILL.md +2 -2
- package/dist/skills/ultimate-browsing/engine/AGENTS.md +179 -0
- package/dist/skills/ultimate-browsing/engine/__main__.py +8 -1
- package/dist/skills/ultimate-browsing/engine/bias_check.py +11 -0
- package/dist/skills/ultimate-browsing/engine/fetch_chain.py +90 -52
- package/dist/skills/ultimate-browsing/engine/result_schema.py +10 -1
- package/dist/skills/ultimate-browsing/engine/surrogate.py +214 -0
- package/dist/skills/ultimate-browsing/engine/surrogates.yaml +60 -0
- package/dist/skills/ultimate-browsing/engine/templates/package.json +1 -1
- package/dist/skills/ultimate-browsing/engine/tests/fixtures/amp_redirect_stub.html +7 -0
- package/dist/skills/ultimate-browsing/engine/tests/fixtures/search_interstitial.html +19 -0
- package/dist/skills/ultimate-browsing/engine/tests/fixtures/wayback_available.json +1 -0
- package/dist/skills/ultimate-browsing/engine/tests/fixtures/wayback_snapshot.html +1128 -0
- package/dist/skills/ultimate-browsing/engine/tests/test_surrogate.py +252 -0
- package/dist/skills/ultimate-browsing/engine/tests/test_surrogate_validators.py +78 -0
- package/dist/skills/ultimate-browsing/engine/validators.py +46 -0
- package/dist/skills/ultimate-browsing/engine/waf_detector.py +1 -1
- package/dist/skills/ultimate-browsing/engine/waf_profiles.yaml +10 -5
- package/dist/skills/ultimate-browsing/references/agent-reach/social.md +1 -1
- package/dist/skills/ultimate-browsing/references/chrome-stealth.md +13 -11
- package/dist/skills/ultimate-browsing/references/insane-search/README.md +4 -4
- package/dist/skills/ultimate-browsing/references/insane-search/cache-archive.md +51 -50
- package/dist/skills/ultimate-browsing/references/insane-search/fallback.md +1 -1
- package/dist/skills/ultimate-browsing/references/insane-search/jina.md +8 -2
- package/dist/skills/ultimate-browsing/references/insane-search/naver.md +1 -1
- package/dist/skills/ultimate-browsing/references/insane-search/twitter.md +3 -3
- package/dist/skills/ulw-plan/SKILL.md +3 -3
- package/dist/skills/ulw-plan/references/full-workflow.md +30 -6
- package/dist/skills/ulw-plan/references/intent-clear.md +2 -1
- package/dist/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
- package/dist/skills/ulw-research/SKILL.md +15 -10
- package/dist/tui.js +477 -36
- package/docs/reference/web-terminal-visual-qa.md +1 -1
- package/package.json +34 -24
- package/packages/lsp-core/src/lsp/client-diagnostics-concurrency.integration.test.ts +44 -0
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +0 -28
- package/packages/lsp-core/src/lsp/client-wrapper.test.ts +60 -7
- package/packages/lsp-core/src/lsp/client-wrapper.ts +69 -16
- package/packages/lsp-core/src/lsp/connection.ts +1 -1
- package/packages/lsp-core/src/lsp/workspace-edit-adversarial.test.ts +20 -1
- package/packages/lsp-core/src/tools/diagnostics.ts +3 -3
- package/packages/lsp-core/src/tools/navigation.ts +4 -2
- package/packages/lsp-core/src/tools/rename.ts +4 -2
- package/packages/lsp-core/src/tools/symbols.ts +1 -1
- package/packages/lsp-daemon/dist/cli.js +108 -40
- package/packages/lsp-daemon/dist/client.js +123 -55
- package/packages/lsp-daemon/dist/ensure-daemon.d.ts +1 -0
- package/packages/lsp-daemon/dist/ensure-daemon.js +18 -5
- package/packages/lsp-daemon/dist/index.js +111 -43
- package/packages/lsp-tools-mcp/dist/cli.js +77 -23
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +1 -1
- package/packages/lsp-tools-mcp/dist/mcp.js +77 -23
- package/packages/lsp-tools-mcp/dist/tools.js +77 -23
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +268 -92
- 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 +7 -7
- package/packages/omo-codex/plugin/components/bootstrap/src/worker.ts +3 -0
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +220 -10
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +220 -10
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- 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/lazycodex-executor-verify/test/codex-hook.test.ts +3 -17
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +135 -67
- 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/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules-priority.test.ts +11 -16
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +16 -23
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-budget.test.ts +9 -7
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-context.test.ts +0 -6
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-dedup.test.ts +6 -4
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-directive.test.ts +12 -9
- package/packages/omo-codex/plugin/components/rules/test/codex-hook.test.ts +28 -37
- package/packages/omo-codex/plugin/components/rules/test/formatter.test.ts +37 -69
- package/packages/omo-codex/plugin/components/rules/test/hook-output.test.ts +2 -3
- package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +1 -15
- package/packages/omo-codex/plugin/components/start-work-continuation/AGENTS.md +4 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/README.md +5 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +2 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +18 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/src/codex-hook.ts +21 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/test/cli.test.ts +0 -3
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +107 -16
- 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/teammode/test/thread-title-hook.test.ts +3 -9
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +24 -12
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +24 -12
- 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/CHANGELOG.md +2 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-qa-executor.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-low.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +9 -2
- 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 +9 -2
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +3 -3
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +30 -6
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +2 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +0 -136
- package/packages/omo-codex/plugin/components/ultrawork/test/skill-pointer.test.ts +0 -2
- package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/README.md +11 -11
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +9 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-reconciliation.js +1 -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 +9 -9
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +66 -66
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +2 -2
- 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 +5 -4
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/define-goal.md +108 -0
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +23 -25
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-reconciliation.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +9 -9
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-steering.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-continuation.test.ts +0 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-commands.test.ts +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-helpers.test.ts +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-steering-kind-guidance.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-hook.test.ts +2 -5
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/quality-gate-builder.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +7 -40
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-io.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-roles.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +4 -5
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +20 -20
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +4 -4
- package/packages/omo-codex/plugin/skills/ast-grep/SOURCE +1 -1
- package/packages/omo-codex/plugin/skills/ast-grep/install.ps1 +2 -2
- package/packages/omo-codex/plugin/skills/ast-grep/install.sh +1 -1
- package/packages/omo-codex/plugin/skills/ast-grep/references/install.md +2 -2
- package/packages/omo-codex/plugin/skills/ast-grep/tests/smoke.sh +1 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +3 -2
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +1 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/senpi.md +4 -4
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +10 -7
- package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/stylegallery.md +80 -0
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +54 -9
- package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
- package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +179 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/__main__.py +8 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/bias_check.py +11 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/fetch_chain.py +90 -52
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/result_schema.py +10 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/surrogate.py +214 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/surrogates.yaml +60 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +1 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/amp_redirect_stub.html +7 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/search_interstitial.html +19 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/wayback_available.json +1 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/wayback_snapshot.html +1128 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_surrogate.py +252 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_surrogate_validators.py +78 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/validators.py +46 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/waf_detector.py +1 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/waf_profiles.yaml +10 -5
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/social.md +1 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +13 -11
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/README.md +4 -4
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/cache-archive.md +51 -50
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/fallback.md +1 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/jina.md +8 -2
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/naver.md +1 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/twitter.md +3 -3
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +9 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +5 -4
- package/packages/omo-codex/plugin/skills/ulw-loop/references/define-goal.md +108 -0
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +23 -25
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +30 -6
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +2 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +15 -10
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +19 -173
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +4 -24
- package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +175 -13
- package/packages/omo-codex/plugin/test/aggregate.test.mjs +78 -2
- package/packages/omo-codex/plugin/test/auto-update-release-notes.test.mjs +19 -33
- package/packages/omo-codex/plugin/test/bootstrap-binlinks.test.mjs +12 -12
- package/packages/omo-codex/plugin/test/bootstrap-orchestration.test.mjs +36 -4
- package/packages/omo-codex/plugin/test/lcx-contribute-bug-fix-template.test.mjs +21 -27
- package/packages/omo-codex/plugin/test/scaffold-plan.test.mjs +0 -36
- package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +101 -0
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +4 -4
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +1 -119
- package/packages/omo-codex/plugin/test/teammode-archive-ambiguity.test.mjs +0 -40
- package/packages/omo-codex/plugin/test/teammode-communication.test.mjs +6 -62
- package/packages/omo-codex/plugin/test/teammode-thread-links.test.mjs +3 -36
- package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +0 -44
- package/packages/omo-codex/plugin/test/teammode-worktree.test.mjs +2 -6
- package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +0 -3
- package/packages/omo-codex/plugin/test/ulw-plan-review-state-contract.test.mjs +0 -3
- package/packages/omo-codex/scripts/install-bin-links.test.mjs +56 -2
- package/packages/omo-codex/scripts/install-delegated-command.test.mjs +6 -6
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +170 -78
- package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +7 -2
- package/packages/omo-codex/scripts/install-local-entrypoint.test.mjs +4 -4
- package/packages/omo-codex/scripts/install-local.test.mjs +5 -2
- package/packages/shared-skills/index.mjs +19 -1
- package/packages/shared-skills/skills/ast-grep/SOURCE +1 -1
- package/packages/shared-skills/skills/ast-grep/install.ps1 +2 -2
- package/packages/shared-skills/skills/ast-grep/install.sh +1 -1
- package/packages/shared-skills/skills/ast-grep/references/install.md +2 -2
- package/packages/shared-skills/skills/ast-grep/tests/smoke.sh +1 -1
- package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +3 -2
- package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +1 -1
- package/packages/shared-skills/skills/coding-agent-sessions/references/senpi.md +4 -4
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
- package/packages/shared-skills/skills/frontend/SKILL.md +10 -7
- package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -0
- package/packages/shared-skills/skills/frontend/references/design/stylegallery.md +80 -0
- package/packages/shared-skills/skills/start-work/SKILL.md +54 -9
- package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
- package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +2 -2
- package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +179 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/__main__.py +8 -1
- package/packages/shared-skills/skills/ultimate-browsing/engine/bias_check.py +11 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/fetch_chain.py +90 -52
- package/packages/shared-skills/skills/ultimate-browsing/engine/result_schema.py +10 -1
- package/packages/shared-skills/skills/ultimate-browsing/engine/surrogate.py +214 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/surrogates.yaml +60 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/fixtures/amp_redirect_stub.html +7 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/fixtures/search_interstitial.html +19 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/fixtures/wayback_available.json +1 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/fixtures/wayback_snapshot.html +1128 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_surrogate.py +252 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_surrogate_validators.py +78 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/validators.py +46 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/waf_detector.py +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/engine/waf_profiles.yaml +10 -5
- package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/social.md +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +13 -11
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/README.md +4 -4
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/cache-archive.md +51 -50
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/fallback.md +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/jina.md +8 -2
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/naver.md +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/twitter.md +3 -3
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +3 -3
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +30 -6
- package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +2 -1
- package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
- package/packages/shared-skills/skills/ulw-research/SKILL.md +15 -10
- package/postinstall.mjs +6 -0
- package/dist/tools/call-omo-agent/background-agent-executor.d.ts +0 -5
- package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +0 -92
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +0 -314
- package/packages/omo-codex/plugin/test/ulw-plan-scope-contract.test.mjs +0 -24
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
// omo-codex-install:1d8359e77ebe41655f091cd2e455f320cde2f9c681f0651797c47d8fdfa2dd76:73b0878485b4eee3443d4677abaa1155ef215b62b939e85584c64dbab100bfbc
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __returnValue = (v) => v;
|
|
4
5
|
function __exportSetter(name, newValue) {
|
|
@@ -96,20 +97,20 @@ var init_atomic_write = __esm(() => {
|
|
|
96
97
|
|
|
97
98
|
// packages/telemetry-core/src/activity-state.ts
|
|
98
99
|
import { existsSync as existsSync5, mkdirSync as mkdirSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
99
|
-
import { basename as basename7, join as
|
|
100
|
+
import { basename as basename7, join as join34 } from "node:path";
|
|
100
101
|
function resolveTelemetryStateDir(product, options = {}) {
|
|
101
102
|
const dataDir = resolveXdgDataDir(product.cacheDirName, {
|
|
102
103
|
env: options.env,
|
|
103
104
|
osProvider: options.osProvider
|
|
104
105
|
});
|
|
105
|
-
const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined :
|
|
106
|
+
const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join34(options.env.XDG_DATA_HOME, product.cacheDirName);
|
|
106
107
|
if (dataDir === xdgStateDir || xdgStateDir === undefined && basename7(dataDir) === product.cacheDirName) {
|
|
107
108
|
return dataDir;
|
|
108
109
|
}
|
|
109
|
-
return
|
|
110
|
+
return join34(dataDir, product.cacheDirName);
|
|
110
111
|
}
|
|
111
112
|
function getTelemetryActivityStateFilePath(stateDir) {
|
|
112
|
-
return
|
|
113
|
+
return join34(stateDir, POSTHOG_ACTIVITY_STATE_FILE);
|
|
113
114
|
}
|
|
114
115
|
function getDailyActiveCaptureState(input) {
|
|
115
116
|
const state = readPostHogActivityState(input.stateDir, input.diagnostics);
|
|
@@ -176,13 +177,13 @@ var init_activity_state = __esm(() => {
|
|
|
176
177
|
});
|
|
177
178
|
|
|
178
179
|
// packages/telemetry-core/src/constants.ts
|
|
179
|
-
var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com", DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74";
|
|
180
|
+
var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com", DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74", UNCONFIGURED_POSTHOG_API_KEY = "phc_REPLACE_ME_OMO_NATIVE";
|
|
180
181
|
|
|
181
182
|
// packages/telemetry-core/src/diagnostics.ts
|
|
182
183
|
import { appendFileSync, existsSync as existsSync6, mkdirSync as mkdirSync3, readFileSync as readFileSync3 } from "node:fs";
|
|
183
|
-
import { join as
|
|
184
|
+
import { join as join35 } from "node:path";
|
|
184
185
|
function getTelemetryDiagnosticsFilePath(diagnosticsDir) {
|
|
185
|
-
return
|
|
186
|
+
return join35(diagnosticsDir, DIAGNOSTICS_FILE_NAME);
|
|
186
187
|
}
|
|
187
188
|
function writeTelemetryDiagnostic(input, options) {
|
|
188
189
|
const now = options.now ?? new Date;
|
|
@@ -314,6 +315,9 @@ function shouldDisableTelemetry(input) {
|
|
|
314
315
|
const env = input.env ?? process.env;
|
|
315
316
|
const globalPrefix = input.globalEnvPrefix ?? "OMO";
|
|
316
317
|
const prefixes = Array.from(new Set([globalPrefix, input.productEnvPrefix]));
|
|
318
|
+
if (isDisableFlag(env["DO_NOT_TRACK"])) {
|
|
319
|
+
return true;
|
|
320
|
+
}
|
|
317
321
|
for (const prefix of prefixes) {
|
|
318
322
|
if (isDisableFlag(env[`${prefix}_DISABLE_POSTHOG`])) {
|
|
319
323
|
return true;
|
|
@@ -327,6 +331,13 @@ function shouldDisableTelemetry(input) {
|
|
|
327
331
|
function getTelemetryApiKey(env = process.env, defaultApiKey = DEFAULT_POSTHOG_API_KEY) {
|
|
328
332
|
return env["POSTHOG_API_KEY"]?.trim() ?? defaultApiKey;
|
|
329
333
|
}
|
|
334
|
+
function isConfiguredTelemetryApiKey(apiKey) {
|
|
335
|
+
const normalized = apiKey.trim();
|
|
336
|
+
return normalized.length > 0 && normalized !== UNCONFIGURED_POSTHOG_API_KEY;
|
|
337
|
+
}
|
|
338
|
+
function hasTelemetryApiKey(env, defaultApiKey) {
|
|
339
|
+
return isConfiguredTelemetryApiKey(getTelemetryApiKey(env, defaultApiKey));
|
|
340
|
+
}
|
|
330
341
|
function getTelemetryHost(env = process.env, defaultHost = DEFAULT_POSTHOG_HOST) {
|
|
331
342
|
return env["POSTHOG_HOST"]?.trim() || defaultHost;
|
|
332
343
|
}
|
|
@@ -336,17 +347,6 @@ var init_env = __esm(() => {
|
|
|
336
347
|
SEND_OPT_OUT_VALUES = ["0", "false", "no", "yes"];
|
|
337
348
|
});
|
|
338
349
|
|
|
339
|
-
// packages/telemetry-core/src/machine-id.ts
|
|
340
|
-
import { createHash as createHash3 } from "node:crypto";
|
|
341
|
-
import os2 from "node:os";
|
|
342
|
-
function getDefaultTelemetryOsProvider() {
|
|
343
|
-
return os2;
|
|
344
|
-
}
|
|
345
|
-
function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
|
|
346
|
-
return createHash3("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
|
|
347
|
-
}
|
|
348
|
-
var init_machine_id = () => {};
|
|
349
|
-
|
|
350
350
|
// node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
351
351
|
import { dirname as dirname10, posix as posix2, sep as sep7 } from "node:path";
|
|
352
352
|
function createModulerModifier() {
|
|
@@ -5721,6 +5721,17 @@ var init_index_node = __esm(() => {
|
|
|
5721
5721
|
};
|
|
5722
5722
|
});
|
|
5723
5723
|
|
|
5724
|
+
// packages/telemetry-core/src/machine-id.ts
|
|
5725
|
+
import { createHash as createHash3 } from "node:crypto";
|
|
5726
|
+
import os2 from "node:os";
|
|
5727
|
+
function getDefaultTelemetryOsProvider() {
|
|
5728
|
+
return os2;
|
|
5729
|
+
}
|
|
5730
|
+
function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
|
|
5731
|
+
return createHash3("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
|
|
5732
|
+
}
|
|
5733
|
+
var init_machine_id = () => {};
|
|
5734
|
+
|
|
5724
5735
|
// packages/telemetry-core/src/posthog-client.ts
|
|
5725
5736
|
class PostHogTelemetryTransport {
|
|
5726
5737
|
#client;
|
|
@@ -5742,7 +5753,7 @@ function createDefaultPostHogTransport(apiKey, options) {
|
|
|
5742
5753
|
}
|
|
5743
5754
|
function isTelemetryClientEnabled(input) {
|
|
5744
5755
|
const env = input.env ?? process.env;
|
|
5745
|
-
return !shouldDisableTelemetry({ env, productEnvPrefix: input.product.productEnvPrefix }) &&
|
|
5756
|
+
return !shouldDisableTelemetry({ env, productEnvPrefix: input.product.productEnvPrefix }) && hasTelemetryApiKey(env, input.product.defaultApiKey);
|
|
5746
5757
|
}
|
|
5747
5758
|
function createTelemetryClient(input) {
|
|
5748
5759
|
if (!isTelemetryClientEnabled(input)) {
|
|
@@ -5808,7 +5819,8 @@ function createTransport(input) {
|
|
|
5808
5819
|
flushAt: 1,
|
|
5809
5820
|
flushInterval: 0,
|
|
5810
5821
|
host: getTelemetryHost(env, input.product.defaultHost),
|
|
5811
|
-
disableGeoip: false
|
|
5822
|
+
disableGeoip: input.product.disableGeoip ?? false,
|
|
5823
|
+
...input.product.transportOptions
|
|
5812
5824
|
});
|
|
5813
5825
|
} catch (error) {
|
|
5814
5826
|
input.diagnostics?.({
|
|
@@ -5885,6 +5897,17 @@ var init_posthog_client = __esm(() => {
|
|
|
5885
5897
|
};
|
|
5886
5898
|
});
|
|
5887
5899
|
|
|
5900
|
+
// packages/telemetry-core/src/events.ts
|
|
5901
|
+
var ALLOWED_DOLLAR_KEYS;
|
|
5902
|
+
var init_events = __esm(() => {
|
|
5903
|
+
ALLOWED_DOLLAR_KEYS = new Set([
|
|
5904
|
+
"$os",
|
|
5905
|
+
"$os_version",
|
|
5906
|
+
"$process_person_profile",
|
|
5907
|
+
"$session_id"
|
|
5908
|
+
]);
|
|
5909
|
+
});
|
|
5910
|
+
|
|
5888
5911
|
// packages/telemetry-core/src/record-daily-active.ts
|
|
5889
5912
|
var init_record_daily_active = () => {};
|
|
5890
5913
|
|
|
@@ -5893,6 +5916,7 @@ var init_src = __esm(() => {
|
|
|
5893
5916
|
init_activity_state();
|
|
5894
5917
|
init_diagnostics();
|
|
5895
5918
|
init_env();
|
|
5919
|
+
init_events();
|
|
5896
5920
|
init_machine_id();
|
|
5897
5921
|
init_posthog_client();
|
|
5898
5922
|
init_record_daily_active();
|
|
@@ -5903,7 +5927,7 @@ var package_default;
|
|
|
5903
5927
|
var init_package = __esm(() => {
|
|
5904
5928
|
package_default = {
|
|
5905
5929
|
name: "@oh-my-opencode/omo-codex",
|
|
5906
|
-
version: "
|
|
5930
|
+
version: "5.0.0-beta.10",
|
|
5907
5931
|
type: "module",
|
|
5908
5932
|
private: true,
|
|
5909
5933
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -6122,8 +6146,8 @@ var init_telemetry = __esm(() => {
|
|
|
6122
6146
|
});
|
|
6123
6147
|
|
|
6124
6148
|
// packages/omo-codex/src/install/install-local-cli.ts
|
|
6125
|
-
import { readFile as
|
|
6126
|
-
import { dirname as dirname12, join as
|
|
6149
|
+
import { readFile as readFile23 } from "node:fs/promises";
|
|
6150
|
+
import { dirname as dirname12, join as join40, resolve as resolve10 } from "node:path";
|
|
6127
6151
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
6128
6152
|
|
|
6129
6153
|
// packages/utils/src/runtime/spawn.ts
|
|
@@ -6456,7 +6480,7 @@ var defaultRunCommand = async (command, args, options) => {
|
|
|
6456
6480
|
};
|
|
6457
6481
|
|
|
6458
6482
|
// packages/omo-codex/src/install/install-codex.ts
|
|
6459
|
-
import { join as
|
|
6483
|
+
import { join as join36, resolve as resolve9 } from "node:path";
|
|
6460
6484
|
import { existsSync as existsSync7 } from "node:fs";
|
|
6461
6485
|
import { homedir as homedir2 } from "node:os";
|
|
6462
6486
|
|
|
@@ -6627,6 +6651,7 @@ var LEGACY_CODEX_COMPONENT_BINS = [
|
|
|
6627
6651
|
{ name: "codex-telemetry", component: "telemetry" },
|
|
6628
6652
|
{ name: "codex-ultrawork", component: "ultrawork" }
|
|
6629
6653
|
];
|
|
6654
|
+
var LEGACY_CODEX_COMPONENT_BIN_NAMES = LEGACY_CODEX_COMPONENT_BINS.map((entry) => entry.name);
|
|
6630
6655
|
async function removeLegacyCodexComponentBins(binDir, platform) {
|
|
6631
6656
|
for (const entry of LEGACY_CODEX_COMPONENT_BINS) {
|
|
6632
6657
|
const linkPath = join3(binDir, platform === "win32" ? `${entry.name}.cmd` : entry.name);
|
|
@@ -6682,7 +6707,7 @@ function isNodeErrorWithCode2(error) {
|
|
|
6682
6707
|
// packages/omo-codex/src/install/codex-cache-runtime-wrapper.ts
|
|
6683
6708
|
import { join as join4 } from "node:path";
|
|
6684
6709
|
var RUNTIME_WRAPPER_MARKER = "OMO_GENERATED_RUNTIME_WRAPPER";
|
|
6685
|
-
function posixRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
6710
|
+
function posixRuntimeWrapper(binName, cliPath, codexHome, binDir, nodeCliPath) {
|
|
6686
6711
|
const ulwLoopBin = toPosixPath(join4(binDir, "omo-ulw-loop"));
|
|
6687
6712
|
const nodeCli = escapePosixDoubleQuoted(toPosixPath(nodeCliPath));
|
|
6688
6713
|
const escapedCliPath = escapePosixDoubleQuoted(toPosixPath(cliPath));
|
|
@@ -6692,6 +6717,8 @@ function posixRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
|
6692
6717
|
"#!/bin/sh",
|
|
6693
6718
|
`# ${RUNTIME_WRAPPER_MARKER}`,
|
|
6694
6719
|
`export CODEX_HOME="\${CODEX_HOME:-${escapedCodexHome}}"`,
|
|
6720
|
+
`export OMO_INVOCATION_NAME=${binName}`,
|
|
6721
|
+
"export OMO_EDITION=codex",
|
|
6695
6722
|
'if [ "$1" = "ulw-loop" ] && [ -x "' + escapedUlwLoopBin + '" ]; then',
|
|
6696
6723
|
" shift",
|
|
6697
6724
|
' exec "' + escapedUlwLoopBin + '" ulw-loop "$@"',
|
|
@@ -6715,11 +6742,11 @@ function posixRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
|
6715
6742
|
` if [ -f "${nodeCli}" ] && command -v node >/dev/null 2>&1; then`,
|
|
6716
6743
|
` exec node "${nodeCli}" "$@"`,
|
|
6717
6744
|
" fi",
|
|
6718
|
-
` echo "
|
|
6745
|
+
` echo "${binName}: bun runtime not found (checked PATH, ~/.bun/bin, /opt/homebrew/bin, /usr/local/bin) and the node fallback CLI is missing at ${nodeCli}; install bun from https://bun.sh, or reinstall ${binName} and force the fallback with OMO_RUNTIME=node" >&2`,
|
|
6719
6746
|
" exit 127",
|
|
6720
6747
|
"fi",
|
|
6721
6748
|
`if [ ! -f "${escapedCliPath}" ]; then`,
|
|
6722
|
-
` echo "
|
|
6749
|
+
` echo "${binName}: runtime target missing at ${escapedCliPath}; reinstall with: npx --yes lazycodex-ai@latest install --no-tui" >&2`,
|
|
6723
6750
|
" exit 1",
|
|
6724
6751
|
"fi",
|
|
6725
6752
|
`exec "$BUN_BINARY" "${escapedCliPath}" "$@"`,
|
|
@@ -6727,12 +6754,14 @@ function posixRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
|
6727
6754
|
].join(`
|
|
6728
6755
|
`);
|
|
6729
6756
|
}
|
|
6730
|
-
function windowsRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
6757
|
+
function windowsRuntimeWrapper(binName, cliPath, codexHome, binDir, nodeCliPath) {
|
|
6731
6758
|
const ulwLoopBin = join4(binDir, "omo-ulw-loop.cmd");
|
|
6732
6759
|
return [
|
|
6733
6760
|
"@echo off",
|
|
6734
6761
|
`rem ${RUNTIME_WRAPPER_MARKER}`,
|
|
6735
6762
|
`if not defined CODEX_HOME set "CODEX_HOME=${codexHome}"`,
|
|
6763
|
+
`set "OMO_INVOCATION_NAME=${binName}"`,
|
|
6764
|
+
'set "OMO_EDITION=codex"',
|
|
6736
6765
|
...windowsNodeDiscoveryLines(),
|
|
6737
6766
|
`if "%~1"=="ulw-loop" if exist "${ulwLoopBin}" (`,
|
|
6738
6767
|
" shift /1",
|
|
@@ -6750,11 +6779,11 @@ function windowsRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
|
6750
6779
|
` "%OMO_NODE_BINARY%" "${nodeCliPath}" %*`,
|
|
6751
6780
|
" exit /b %ERRORLEVEL%",
|
|
6752
6781
|
" )",
|
|
6753
|
-
` echo
|
|
6782
|
+
` echo ${binName}: bun runtime not found, no Node runtime was discovered from NODE_REPL_NODE_PATH or PATH, or the node fallback CLI is missing at ${nodeCliPath}; install bun from https://bun.sh or rerun LazyCodex install from Codex Desktop 1>&2`,
|
|
6754
6783
|
" exit /b 127",
|
|
6755
6784
|
")",
|
|
6756
6785
|
`if not exist "${cliPath}" (`,
|
|
6757
|
-
` echo
|
|
6786
|
+
` echo ${binName}: runtime target missing at ${cliPath}; reinstall with: npx --yes lazycodex-ai@latest install --no-tui 1>&2`,
|
|
6758
6787
|
" exit /b 1",
|
|
6759
6788
|
")",
|
|
6760
6789
|
`"%BUN_BINARY%" "${cliPath}" %*`,
|
|
@@ -6770,7 +6799,14 @@ function escapePosixDoubleQuoted(value) {
|
|
|
6770
6799
|
}
|
|
6771
6800
|
|
|
6772
6801
|
// packages/omo-codex/src/install/codex-cache-bins.ts
|
|
6773
|
-
var RESERVED_NESTED_BIN_NAMES = new Set([
|
|
6802
|
+
var RESERVED_NESTED_BIN_NAMES = new Set([
|
|
6803
|
+
"omo",
|
|
6804
|
+
"omo-agent-toolkit",
|
|
6805
|
+
"lazycodex",
|
|
6806
|
+
"lazycodex-ai",
|
|
6807
|
+
"oh-my-opencode",
|
|
6808
|
+
"oh-my-openagent"
|
|
6809
|
+
]);
|
|
6774
6810
|
async function linkCachedPluginBins(input) {
|
|
6775
6811
|
const binLinks = await discoverPackageBins(input.pluginRoot);
|
|
6776
6812
|
const platform = input.platform ?? process.platform;
|
|
@@ -6800,20 +6836,26 @@ async function removeCachedManagedNpmBinShims(pluginRoot) {
|
|
|
6800
6836
|
}
|
|
6801
6837
|
async function linkRootRuntimeBin(input) {
|
|
6802
6838
|
const cliPath = join5(input.repoRoot, "dist", "cli", "index.js");
|
|
6803
|
-
|
|
6839
|
+
const platform = input.platform ?? process.platform;
|
|
6840
|
+
const legacyPath = join5(input.binDir, platform === "win32" ? "omo.cmd" : "omo");
|
|
6841
|
+
if (!await isFile(cliPath)) {
|
|
6842
|
+
await removeGeneratedRuntimeWrapper(legacyPath);
|
|
6804
6843
|
return null;
|
|
6844
|
+
}
|
|
6845
|
+
const binName = "omo-agent-toolkit";
|
|
6805
6846
|
const nodeCliPath = join5(input.repoRoot, "dist", "cli-node", "index.js");
|
|
6806
|
-
const platform = input.platform ?? process.platform;
|
|
6807
6847
|
await mkdir(input.binDir, { recursive: true });
|
|
6808
6848
|
if (platform === "win32") {
|
|
6809
|
-
const linkPath2 = join5(input.binDir,
|
|
6810
|
-
await replaceRuntimeWrapper(linkPath2, windowsRuntimeWrapper(cliPath, input.codexHome, input.binDir, nodeCliPath));
|
|
6811
|
-
|
|
6849
|
+
const linkPath2 = join5(input.binDir, `${binName}.cmd`);
|
|
6850
|
+
await replaceRuntimeWrapper(linkPath2, windowsRuntimeWrapper(binName, cliPath, input.codexHome, input.binDir, nodeCliPath));
|
|
6851
|
+
await removeGeneratedRuntimeWrapper(legacyPath);
|
|
6852
|
+
return { name: binName, path: linkPath2, target: cliPath };
|
|
6812
6853
|
}
|
|
6813
|
-
const linkPath = join5(input.binDir,
|
|
6814
|
-
await replaceRuntimeWrapper(linkPath, posixRuntimeWrapper(cliPath, input.codexHome, input.binDir, nodeCliPath));
|
|
6854
|
+
const linkPath = join5(input.binDir, binName);
|
|
6855
|
+
await replaceRuntimeWrapper(linkPath, posixRuntimeWrapper(binName, cliPath, input.codexHome, input.binDir, nodeCliPath));
|
|
6815
6856
|
await chmod(linkPath, 493);
|
|
6816
|
-
|
|
6857
|
+
await removeGeneratedRuntimeWrapper(legacyPath);
|
|
6858
|
+
return { name: binName, path: linkPath, target: cliPath };
|
|
6817
6859
|
}
|
|
6818
6860
|
async function linkCachedPluginBin(binDir, link, platform) {
|
|
6819
6861
|
if (platform === "win32") {
|
|
@@ -6926,6 +6968,29 @@ async function replaceRuntimeWrapper(linkPath, content) {
|
|
|
6926
6968
|
await rm3(linkPath, { force: true });
|
|
6927
6969
|
await writeFile(linkPath, content);
|
|
6928
6970
|
}
|
|
6971
|
+
async function removeGeneratedRuntimeWrapper(path) {
|
|
6972
|
+
try {
|
|
6973
|
+
const entry = await lstat4(path);
|
|
6974
|
+
if (!entry.isFile() && !entry.isSymbolicLink())
|
|
6975
|
+
return;
|
|
6976
|
+
const content = await readGeneratedWrapperContent(path);
|
|
6977
|
+
if (content.includes(RUNTIME_WRAPPER_MARKER))
|
|
6978
|
+
await rm3(path, { force: true });
|
|
6979
|
+
} catch (error) {
|
|
6980
|
+
if (isNodeErrorWithCode(error) && error.code === "ENOENT")
|
|
6981
|
+
return;
|
|
6982
|
+
throw error;
|
|
6983
|
+
}
|
|
6984
|
+
}
|
|
6985
|
+
async function readGeneratedWrapperContent(path) {
|
|
6986
|
+
try {
|
|
6987
|
+
return await readFile3(path, "utf8");
|
|
6988
|
+
} catch (error) {
|
|
6989
|
+
if (isNodeErrorWithCode(error) && (error.code === "ENOENT" || error.code === "EISDIR"))
|
|
6990
|
+
return "";
|
|
6991
|
+
throw error;
|
|
6992
|
+
}
|
|
6993
|
+
}
|
|
6929
6994
|
async function existingNonRuntimeWrapper(path) {
|
|
6930
6995
|
try {
|
|
6931
6996
|
const stat3 = await lstat4(path);
|
|
@@ -10682,9 +10747,18 @@ function resolveCodexInstallerBinDir(input) {
|
|
|
10682
10747
|
return resolve8(homeDir, ".local", "bin");
|
|
10683
10748
|
}
|
|
10684
10749
|
|
|
10685
|
-
// packages/omo-codex/src/install/codex-
|
|
10686
|
-
import { readFile as readFile20, writeFile as writeFile11 } from "node:fs/promises";
|
|
10750
|
+
// packages/omo-codex/src/install/codex-installed-bin-dir.ts
|
|
10751
|
+
import { readFile as readFile20, readdir as readdir11, writeFile as writeFile11 } from "node:fs/promises";
|
|
10687
10752
|
import { join as join29 } from "node:path";
|
|
10753
|
+
var INSTALLED_BIN_DIR_MANIFEST = ".installed-bin-dir.json";
|
|
10754
|
+
async function writeInstalledCodexBinDir(input) {
|
|
10755
|
+
await writeFile11(join29(input.pluginRoot, INSTALLED_BIN_DIR_MANIFEST), `${JSON.stringify({ binDir: input.binDir }, null, 2)}
|
|
10756
|
+
`);
|
|
10757
|
+
}
|
|
10758
|
+
|
|
10759
|
+
// packages/omo-codex/src/install/codex-git-bash-hooks.ts
|
|
10760
|
+
import { readFile as readFile21, writeFile as writeFile12 } from "node:fs/promises";
|
|
10761
|
+
import { join as join30 } from "node:path";
|
|
10688
10762
|
var WINDOWS_ONLY_GIT_BASH_HOOKS = new Set([
|
|
10689
10763
|
"./hooks/pre-tool-use-recommending-git-bash-mcp.json",
|
|
10690
10764
|
"./hooks/post-compact-resetting-git-bash-mcp-reminder.json"
|
|
@@ -10692,22 +10766,22 @@ var WINDOWS_ONLY_GIT_BASH_HOOKS = new Set([
|
|
|
10692
10766
|
async function removeGitBashHooksOffWindows(input) {
|
|
10693
10767
|
if (input.platform === "win32")
|
|
10694
10768
|
return;
|
|
10695
|
-
const manifestPath =
|
|
10696
|
-
const parsed = JSON.parse(await
|
|
10769
|
+
const manifestPath = join30(input.pluginRoot, ".codex-plugin", "plugin.json");
|
|
10770
|
+
const parsed = JSON.parse(await readFile21(manifestPath, "utf8"));
|
|
10697
10771
|
if (!isPlainRecord(parsed) || !Array.isArray(parsed.hooks))
|
|
10698
10772
|
return;
|
|
10699
10773
|
const hooks = parsed.hooks.filter((hook) => typeof hook !== "string" || !WINDOWS_ONLY_GIT_BASH_HOOKS.has(hook));
|
|
10700
10774
|
if (hooks.length === parsed.hooks.length)
|
|
10701
10775
|
return;
|
|
10702
|
-
await
|
|
10776
|
+
await writeFile12(manifestPath, `${JSON.stringify({ ...parsed, hooks }, null, "\t")}
|
|
10703
10777
|
`);
|
|
10704
10778
|
}
|
|
10705
10779
|
|
|
10706
10780
|
// packages/omo-codex/src/install/omo-sot-migration.ts
|
|
10707
|
-
import { join as
|
|
10781
|
+
import { join as join31 } from "node:path";
|
|
10708
10782
|
async function seedAndMigrateOmoSot(input) {
|
|
10709
10783
|
const commandEnv = { ...input.env };
|
|
10710
|
-
const scriptPath =
|
|
10784
|
+
const scriptPath = join31(input.repoRoot, "packages", "omo-codex", "plugin", "scripts", "migrate-omo-sot.mjs");
|
|
10711
10785
|
try {
|
|
10712
10786
|
await input.runCommand(process.execPath, [scriptPath, "--seed"], {
|
|
10713
10787
|
cwd: input.repoRoot,
|
|
@@ -10721,6 +10795,11 @@ async function seedAndMigrateOmoSot(input) {
|
|
|
10721
10795
|
}
|
|
10722
10796
|
|
|
10723
10797
|
// packages/omo-codex/src/install/install-ast-grep-sg.ts
|
|
10798
|
+
import { join as join33 } from "node:path";
|
|
10799
|
+
|
|
10800
|
+
// packages/utils/src/ast-grep/install-script.ts
|
|
10801
|
+
import { spawn as spawn2 } from "node:child_process";
|
|
10802
|
+
import { existsSync as existsSync4 } from "node:fs";
|
|
10724
10803
|
import { join as join32 } from "node:path";
|
|
10725
10804
|
|
|
10726
10805
|
// packages/utils/src/ast-grep/sg-manifest.ts
|
|
@@ -10739,13 +10818,11 @@ function runtimeSlug(platform = process.platform, arch = process.arch) {
|
|
|
10739
10818
|
}
|
|
10740
10819
|
|
|
10741
10820
|
// packages/utils/src/ast-grep/install-script.ts
|
|
10742
|
-
import { spawn as spawn2 } from "node:child_process";
|
|
10743
|
-
import { existsSync as existsSync4 } from "node:fs";
|
|
10744
|
-
import { join as join31 } from "node:path";
|
|
10745
10821
|
var AST_GREP_BIN_DIR_ENV_KEY = "OMO_AST_GREP_BIN_DIR";
|
|
10822
|
+
var KILL_GRACE_MS = 1000;
|
|
10746
10823
|
var AST_GREP_INSTALL_TIMEOUT_MS = 30000;
|
|
10747
10824
|
function astGrepRuntimeDir(baseDir, platform = process.platform, arch = process.arch) {
|
|
10748
|
-
return
|
|
10825
|
+
return join32(baseDir, "runtime", "ast-grep", runtimeSlug(platform, arch));
|
|
10749
10826
|
}
|
|
10750
10827
|
function isMissingExecutable(error) {
|
|
10751
10828
|
if (!("code" in error))
|
|
@@ -10783,7 +10860,7 @@ function defaultSpawnProcess(command, args, options) {
|
|
|
10783
10860
|
};
|
|
10784
10861
|
}
|
|
10785
10862
|
function scriptPathForPlatform(skillDir, platform) {
|
|
10786
|
-
return
|
|
10863
|
+
return join32(skillDir, platform === "win32" ? "install.ps1" : "install.sh");
|
|
10787
10864
|
}
|
|
10788
10865
|
function invocationsForPlatform(scriptPath, platform) {
|
|
10789
10866
|
if (platform !== "win32")
|
|
@@ -10794,16 +10871,30 @@ function invocationsForPlatform(scriptPath, platform) {
|
|
|
10794
10871
|
async function runInvocation(input) {
|
|
10795
10872
|
const child = input.spawnProcess(input.invocation.command, input.invocation.args, { cwd: input.skillDir, env: input.env });
|
|
10796
10873
|
let timedOut = false;
|
|
10874
|
+
let terminateDeadline;
|
|
10875
|
+
let terminateDeadlineGrace;
|
|
10876
|
+
const killIgnored = new Promise((_, reject) => {
|
|
10877
|
+
terminateDeadline = () => reject(new Error("ast-grep install child ignored termination"));
|
|
10878
|
+
});
|
|
10797
10879
|
const timeout = setTimeout(() => {
|
|
10798
10880
|
timedOut = true;
|
|
10799
10881
|
child.kill();
|
|
10882
|
+
terminateDeadlineGrace = setTimeout(() => terminateDeadline?.(), KILL_GRACE_MS);
|
|
10800
10883
|
}, input.timeoutMs);
|
|
10801
|
-
timeout.unref?.();
|
|
10802
10884
|
try {
|
|
10803
|
-
const outcome = await child.outcome;
|
|
10804
|
-
|
|
10885
|
+
const outcome = await Promise.race([child.outcome, killIgnored]);
|
|
10886
|
+
if (timedOut)
|
|
10887
|
+
return { kind: "timed-out" };
|
|
10888
|
+
return outcome;
|
|
10889
|
+
} catch (error) {
|
|
10890
|
+
if (error instanceof Error && error.message.includes("ignored termination")) {
|
|
10891
|
+
return { kind: "spawn-error", error, missingExecutable: false };
|
|
10892
|
+
}
|
|
10893
|
+
throw error;
|
|
10805
10894
|
} finally {
|
|
10806
10895
|
clearTimeout(timeout);
|
|
10896
|
+
if (terminateDeadlineGrace !== undefined)
|
|
10897
|
+
clearTimeout(terminateDeadlineGrace);
|
|
10807
10898
|
}
|
|
10808
10899
|
}
|
|
10809
10900
|
function failedReason(outcome) {
|
|
@@ -10855,7 +10946,7 @@ async function installAstGrepForCodex(options) {
|
|
|
10855
10946
|
return;
|
|
10856
10947
|
const platform = options.platform ?? process.platform;
|
|
10857
10948
|
const targetDir = astGrepRuntimeDir(options.codexHome, platform, options.arch ?? process.arch);
|
|
10858
|
-
const skillDir =
|
|
10949
|
+
const skillDir = join33(plugin.path, "skills", "ast-grep");
|
|
10859
10950
|
const installer = options.installer ?? runAstGrepSkillInstall;
|
|
10860
10951
|
try {
|
|
10861
10952
|
const result = await installer({ platform, skillDir, targetDir });
|
|
@@ -10888,7 +10979,7 @@ async function runCodexInstaller(options = {}) {
|
|
|
10888
10979
|
const env2 = options.env ?? process.env;
|
|
10889
10980
|
const platform = options.platform ?? process.platform;
|
|
10890
10981
|
const repoRoot = resolve9(options.repoRoot ?? findRepoRoot({ importerDir: import.meta.dir, env: env2 }));
|
|
10891
|
-
const codexHome = resolve9(options.codexHome ?? env2.CODEX_HOME ??
|
|
10982
|
+
const codexHome = resolve9(options.codexHome ?? env2.CODEX_HOME ?? join36(homedir2(), ".codex"));
|
|
10892
10983
|
const projectDirectory = resolve9(options.projectDirectory ?? env2.OMO_CODEX_PROJECT ?? process.cwd());
|
|
10893
10984
|
const binDir = resolveCodexInstallerBinDir({ binDir: options.binDir, codexHome, env: env2 });
|
|
10894
10985
|
const runCommand = options.runCommand ?? defaultRunCommand;
|
|
@@ -10905,9 +10996,9 @@ async function runCodexInstaller(options = {}) {
|
|
|
10905
10996
|
if (!gitBashResolution.found) {
|
|
10906
10997
|
throw new Error(gitBashResolution.installHint);
|
|
10907
10998
|
}
|
|
10908
|
-
const codexPackageRoot =
|
|
10999
|
+
const codexPackageRoot = join36(repoRoot, "packages", "omo-codex");
|
|
10909
11000
|
const marketplace = await readMarketplace(repoRoot, {
|
|
10910
|
-
marketplacePath:
|
|
11001
|
+
marketplacePath: join36(codexPackageRoot, "marketplace.json")
|
|
10911
11002
|
});
|
|
10912
11003
|
const distributionManifest = await readDistributionManifest(repoRoot);
|
|
10913
11004
|
const installed = [];
|
|
@@ -10941,6 +11032,7 @@ async function runCodexInstaller(options = {}) {
|
|
|
10941
11032
|
if (marketplace.name === "sisyphuslabs" && plugin.name === "omo") {
|
|
10942
11033
|
await stampLazyCodexPluginVersion({ pluginRoot: plugin.path, version: version2 });
|
|
10943
11034
|
await writeLazyCodexInstallSnapshot({ pluginRoot: plugin.path, distributionManifest });
|
|
11035
|
+
await writeInstalledCodexBinDir({ pluginRoot: plugin.path, binDir });
|
|
10944
11036
|
await removeGitBashHooksOffWindows({ platform, pluginRoot: plugin.path });
|
|
10945
11037
|
}
|
|
10946
11038
|
const links = await linkCachedPluginBins({ binDir, pluginRoot: plugin.path, platform });
|
|
@@ -10952,7 +11044,7 @@ async function runCodexInstaller(options = {}) {
|
|
|
10952
11044
|
if (runtimeLink !== null)
|
|
10953
11045
|
log(`Linked ${runtimeLink.name} -> ${runtimeLink.target}`);
|
|
10954
11046
|
else
|
|
10955
|
-
log(`Warning: skipped the omo runtime wrapper because ${
|
|
11047
|
+
log(`Warning: skipped the omo-agent-toolkit runtime wrapper because ${join36(repoRoot, "dist", "cli", "index.js")} is missing; omo-agent-toolkit ulw-loop commands will be unavailable until a package shipping dist/cli is installed`);
|
|
10956
11048
|
}
|
|
10957
11049
|
pluginSources.push({ name: entry.name, sourcePath });
|
|
10958
11050
|
installed.push(plugin);
|
|
@@ -11015,13 +11107,13 @@ async function runCodexInstaller(options = {}) {
|
|
|
11015
11107
|
continue;
|
|
11016
11108
|
log(`Warning: deferred legacy Codex LSP daemon cleanup for v${cleanup.version}: ${cleanup.reason}`);
|
|
11017
11109
|
}
|
|
11018
|
-
const marketplaceRoot =
|
|
11110
|
+
const marketplaceRoot = join36(codexHome, "plugins", "cache", marketplace.name);
|
|
11019
11111
|
await writeCachedMarketplaceManifest({
|
|
11020
11112
|
marketplaceName: marketplace.name,
|
|
11021
11113
|
marketplaceRoot,
|
|
11022
11114
|
plugins: installed
|
|
11023
11115
|
});
|
|
11024
|
-
const configPath =
|
|
11116
|
+
const configPath = join36(codexHome, "config.toml");
|
|
11025
11117
|
await updateCodexConfig({
|
|
11026
11118
|
configPath,
|
|
11027
11119
|
repoRoot: codexPackageRoot,
|
|
@@ -11082,7 +11174,7 @@ function findRepoRootFromImporter(importerDir) {
|
|
|
11082
11174
|
for (let depth = 0;depth <= 7; depth += 1) {
|
|
11083
11175
|
if (isRepoRootWithCodexPlugin(current))
|
|
11084
11176
|
return current;
|
|
11085
|
-
for (const wrapperPackageRoot of [
|
|
11177
|
+
for (const wrapperPackageRoot of [join36(current, "node_modules", "oh-my-openagent"), join36(current, "oh-my-openagent")]) {
|
|
11086
11178
|
if (isRepoRootWithCodexPlugin(wrapperPackageRoot))
|
|
11087
11179
|
return wrapperPackageRoot;
|
|
11088
11180
|
}
|
|
@@ -11100,7 +11192,7 @@ function findRepoRoot(input) {
|
|
|
11100
11192
|
return findRepoRootFromImporter(input.importerDir);
|
|
11101
11193
|
}
|
|
11102
11194
|
function isRepoRootWithCodexPlugin(repoRoot) {
|
|
11103
|
-
return existsSync7(
|
|
11195
|
+
return existsSync7(join36(repoRoot, "packages", "omo-codex", "plugin", ".codex-plugin", "plugin.json"));
|
|
11104
11196
|
}
|
|
11105
11197
|
function codexMarketplaceSource(marketplaceRoot) {
|
|
11106
11198
|
return { sourceType: "local", source: marketplaceRoot };
|
|
@@ -11287,7 +11379,7 @@ async function runDelegatedOmoCommand(parsed, options) {
|
|
|
11287
11379
|
options.log(formatShellCommand(invocation.command, invocation.args));
|
|
11288
11380
|
return;
|
|
11289
11381
|
}
|
|
11290
|
-
const env2 = invocation.delegatesToOmo ? { ...process.env, OMO_INVOCATION_NAME: "omo", ...invocation.env } : { ...process.env, ...invocation.env };
|
|
11382
|
+
const env2 = invocation.delegatesToOmo ? { ...process.env, OMO_INVOCATION_NAME: "omo-agent-toolkit", ...invocation.env } : { ...process.env, ...invocation.env };
|
|
11291
11383
|
await options.runCommand(invocation.command, invocation.args, { cwd: options.cwd, env: env2 });
|
|
11292
11384
|
}
|
|
11293
11385
|
function buildDelegatedOmoInvocation(parsed) {
|
|
@@ -11307,7 +11399,7 @@ function buildDelegatedOmoInvocation(parsed) {
|
|
|
11307
11399
|
args2.push(`--repo-root=${parsed.repoRoot}`);
|
|
11308
11400
|
return { command: "npx", args: args2, delegatesToOmo: true };
|
|
11309
11401
|
}
|
|
11310
|
-
const args = ["--yes", "--package", "oh-my-openagent", "omo", parsed.command];
|
|
11402
|
+
const args = ["--yes", "--package", "oh-my-openagent", "omo-agent-toolkit", parsed.command];
|
|
11311
11403
|
if (parsed.command === "cleanup") {
|
|
11312
11404
|
args.push("--platform=codex", ...parsed.args);
|
|
11313
11405
|
} else {
|
|
@@ -11413,12 +11505,12 @@ function shellQuote(value) {
|
|
|
11413
11505
|
// packages/omo-codex/src/install/lazycodex-manual-update.ts
|
|
11414
11506
|
import { spawn as spawn3, spawnSync as spawnSync3 } from "node:child_process";
|
|
11415
11507
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
11416
|
-
import { dirname as dirname11, join as
|
|
11508
|
+
import { dirname as dirname11, join as join38 } from "node:path";
|
|
11417
11509
|
import { createInterface as createInterface2 } from "node:readline/promises";
|
|
11418
11510
|
import { fileURLToPath } from "node:url";
|
|
11419
11511
|
|
|
11420
11512
|
// packages/omo-codex/src/install/lazycodex-bun-global-paths.ts
|
|
11421
|
-
import { join as
|
|
11513
|
+
import { join as join37 } from "node:path";
|
|
11422
11514
|
function isBunGlobalEntrypointPath(invokedPath, env2) {
|
|
11423
11515
|
if (typeof invokedPath !== "string" || invokedPath.trim().length === 0)
|
|
11424
11516
|
return false;
|
|
@@ -11429,8 +11521,8 @@ function resolveBunGlobalRoots(env2) {
|
|
|
11429
11521
|
const bunInstallRoot = env2.BUN_INSTALL?.trim();
|
|
11430
11522
|
const homeRoot = env2.HOME?.trim();
|
|
11431
11523
|
return [
|
|
11432
|
-
...bunInstallRoot ? [
|
|
11433
|
-
...homeRoot ? [
|
|
11524
|
+
...bunInstallRoot ? [join37(bunInstallRoot, "bin"), join37(bunInstallRoot, "install", "global", "node_modules")] : [],
|
|
11525
|
+
...homeRoot ? [join37(homeRoot, ".bun", "bin"), join37(homeRoot, ".bun", "install", "global", "node_modules")] : []
|
|
11434
11526
|
].map(normalizePathForPrefix);
|
|
11435
11527
|
}
|
|
11436
11528
|
function normalizePathForPrefix(path2) {
|
|
@@ -11523,7 +11615,7 @@ function resolveCurrentVersion(env2) {
|
|
|
11523
11615
|
if (env2.LAZYCODEX_CURRENT_VERSION?.trim())
|
|
11524
11616
|
return env2.LAZYCODEX_CURRENT_VERSION.trim();
|
|
11525
11617
|
const pluginRoot = dirname11(dirname11(fileURLToPath(import.meta.url)));
|
|
11526
|
-
return readVersionManifest(resolveInstalledVersionPath(env2, pluginRoot)) ?? readVersionManifest(
|
|
11618
|
+
return readVersionManifest(resolveInstalledVersionPath(env2, pluginRoot)) ?? readVersionManifest(join38(pluginRoot, "..", "..", "..", "package.json")) ?? readVersionManifest(join38(pluginRoot, ".codex-plugin", "plugin.json"));
|
|
11527
11619
|
}
|
|
11528
11620
|
function resolveLatestVersion(env2) {
|
|
11529
11621
|
if (env2.LAZYCODEX_LATEST_VERSION?.trim())
|
|
@@ -11639,7 +11731,7 @@ function compareVersions(left, right) {
|
|
|
11639
11731
|
function resolveInstalledVersionPath(env2, pluginRoot) {
|
|
11640
11732
|
if (env2.LAZYCODEX_INSTALLED_VERSION_FILE?.trim())
|
|
11641
11733
|
return env2.LAZYCODEX_INSTALLED_VERSION_FILE.trim();
|
|
11642
|
-
return
|
|
11734
|
+
return join38(pluginRoot, INSTALLED_VERSION_FILE);
|
|
11643
11735
|
}
|
|
11644
11736
|
function readVersionManifest(path2) {
|
|
11645
11737
|
try {
|
|
@@ -11655,15 +11747,15 @@ function readVersionManifest(path2) {
|
|
|
11655
11747
|
}
|
|
11656
11748
|
}
|
|
11657
11749
|
// packages/omo-codex/src/install/codex-git-bash-mcp-env.ts
|
|
11658
|
-
import { readFile as
|
|
11659
|
-
import { join as
|
|
11750
|
+
import { readFile as readFile22, writeFile as writeFile13 } from "node:fs/promises";
|
|
11751
|
+
import { join as join39 } from "node:path";
|
|
11660
11752
|
var GIT_BASH_ENV_KEY2 = "OMO_CODEX_GIT_BASH_PATH";
|
|
11661
11753
|
var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", "./components/codegraph/dist/serve.js"]);
|
|
11662
11754
|
async function stampGitBashMcpEnv(input) {
|
|
11663
|
-
const manifestPath =
|
|
11755
|
+
const manifestPath = join39(input.pluginRoot, ".mcp.json");
|
|
11664
11756
|
if (!await fileExistsStrict(manifestPath))
|
|
11665
11757
|
return false;
|
|
11666
|
-
const parsed = JSON.parse(await
|
|
11758
|
+
const parsed = JSON.parse(await readFile22(manifestPath, "utf8"));
|
|
11667
11759
|
if (!isPlainRecord(parsed) || !isPlainRecord(parsed["mcpServers"]))
|
|
11668
11760
|
return false;
|
|
11669
11761
|
let changed = stampCodegraphMcpPath(parsed["mcpServers"], input.pluginRoot);
|
|
@@ -11681,7 +11773,7 @@ async function stampGitBashMcpEnv(input) {
|
|
|
11681
11773
|
}
|
|
11682
11774
|
if (!changed)
|
|
11683
11775
|
return false;
|
|
11684
|
-
await
|
|
11776
|
+
await writeFile13(manifestPath, `${JSON.stringify(parsed, null, "\t")}
|
|
11685
11777
|
`);
|
|
11686
11778
|
return true;
|
|
11687
11779
|
}
|
|
@@ -11693,7 +11785,7 @@ function stampCodegraphMcpPath(mcpServers, pluginRoot) {
|
|
|
11693
11785
|
const entrypoint = args[0];
|
|
11694
11786
|
if (typeof entrypoint !== "string" || !CODEGRAPH_RELATIVE_ARGS2.has(entrypoint))
|
|
11695
11787
|
return false;
|
|
11696
|
-
codegraphServer["args"] = [
|
|
11788
|
+
codegraphServer["args"] = [join39(pluginRoot, "components", "codegraph", "dist", "serve.js"), ...args.slice(1)];
|
|
11697
11789
|
return true;
|
|
11698
11790
|
}
|
|
11699
11791
|
|
|
@@ -11718,7 +11810,7 @@ async function runLazyCodexInstallLocalCli(input) {
|
|
|
11718
11810
|
return 0;
|
|
11719
11811
|
}
|
|
11720
11812
|
if (parsed.kind === "version") {
|
|
11721
|
-
const packageJson = JSON.parse(await
|
|
11813
|
+
const packageJson = JSON.parse(await readFile23(join40(input.defaultRepoRoot, "package.json"), "utf8"));
|
|
11722
11814
|
const version2 = typeof packageJson.version === "string" ? packageJson.version : "unknown";
|
|
11723
11815
|
input.log(`lazycodex-ai ${version2}`);
|
|
11724
11816
|
return 0;
|
|
@@ -77,8 +77,13 @@ test("#given sisyphuslabs lazycodex install #when installing locally #then stamp
|
|
|
77
77
|
assert.equal(manifest.version, "4.7.6");
|
|
78
78
|
assert.equal(packageJson.version, "4.7.6");
|
|
79
79
|
assert.equal(componentPackageJson.version, "4.7.6");
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
for (const statusMessage of [
|
|
81
|
+
hooks.hooks.PostToolUse[0].hooks[0].statusMessage,
|
|
82
|
+
componentHooks.hooks.UserPromptSubmit[0].hooks[0].statusMessage,
|
|
83
|
+
]) {
|
|
84
|
+
assert.match(statusMessage, /^\(OmO 4\.7\.6\) \S/);
|
|
85
|
+
assert.doesNotMatch(statusMessage, /0\.1\.0/);
|
|
86
|
+
}
|
|
82
87
|
assert.deepEqual(snapshot, {
|
|
83
88
|
packageName: "lazycodex-ai",
|
|
84
89
|
version: "4.7.6",
|