oh-my-opencode 4.12.0 → 4.13.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/README.md +1 -1
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/dist/agents/sisyphus-agent-factory.d.ts +9 -0
- package/dist/agents/sisyphus-runtime-prompt-reconciler.d.ts +31 -0
- package/dist/cli/index.js +916 -670
- package/dist/cli-node/index.js +916 -670
- package/dist/config/schema/codegraph.d.ts +1 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +2 -0
- package/dist/config/schema/runtime-fallback.d.ts +1 -0
- package/dist/features/background-agent/background-task-marker.d.ts +8 -0
- package/dist/features/background-agent/fallback-retry-handler.d.ts +1 -0
- package/dist/features/background-agent/manager.d.ts +1 -0
- package/dist/features/background-agent/parent-wake-dedupe.d.ts +1 -0
- package/dist/features/background-agent/parent-wake-notifier-types.d.ts +2 -0
- package/dist/features/background-agent/parent-wake-notifier.d.ts +1 -0
- package/dist/features/background-agent/parent-wake-window-recovery.d.ts +2 -0
- package/dist/hooks/runtime-fallback/auto-retry-dispatch.d.ts +2 -2
- package/dist/hooks/runtime-fallback/auto-retry-timeout.d.ts +2 -2
- package/dist/hooks/runtime-fallback/auto-retry.d.ts +1 -1
- package/dist/hooks/runtime-fallback/fallback-state-snapshot.d.ts +13 -0
- package/dist/hooks/runtime-fallback/types.d.ts +8 -0
- package/dist/index.js +1042 -640
- package/dist/oh-my-opencode.schema.json +8 -0
- package/dist/plugin/runtime-skill-resolver.d.ts +35 -0
- package/dist/plugin/skill-context.d.ts +9 -0
- package/dist/skills/frontend/ATTRIBUTION.md +32 -8
- package/dist/skills/frontend/references/design/airbnb.md +3 -0
- package/dist/skills/frontend/references/design/airtable.md +3 -0
- package/dist/skills/frontend/references/design/apple.md +3 -0
- package/dist/skills/frontend/references/design/binance.md +3 -0
- package/dist/skills/frontend/references/design/bmw.md +3 -0
- package/dist/skills/frontend/references/design/bugatti.md +3 -0
- package/dist/skills/frontend/references/design/cal.md +3 -0
- package/dist/skills/frontend/references/design/claude.md +3 -0
- package/dist/skills/frontend/references/design/clay.md +3 -0
- package/dist/skills/frontend/references/design/clickhouse.md +3 -0
- package/dist/skills/frontend/references/design/cohere.md +3 -0
- package/dist/skills/frontend/references/design/coinbase.md +3 -0
- package/dist/skills/frontend/references/design/composio.md +3 -0
- package/dist/skills/frontend/references/design/cursor.md +3 -0
- package/dist/skills/frontend/references/design/elevenlabs.md +3 -0
- package/dist/skills/frontend/references/design/expo.md +3 -0
- package/dist/skills/frontend/references/design/ferrari.md +3 -0
- package/dist/skills/frontend/references/design/figma.md +3 -0
- package/dist/skills/frontend/references/design/framer.md +3 -0
- package/dist/skills/frontend/references/design/hashicorp.md +3 -0
- package/dist/skills/frontend/references/design/ibm.md +3 -0
- package/dist/skills/frontend/references/design/imagegen-frontend-web.md +380 -79
- package/dist/skills/frontend/references/design/intercom.md +3 -0
- package/dist/skills/frontend/references/design/kraken.md +3 -0
- package/dist/skills/frontend/references/design/lamborghini.md +3 -0
- package/dist/skills/frontend/references/design/linear.app.md +3 -0
- package/dist/skills/frontend/references/design/lovable.md +3 -0
- package/dist/skills/frontend/references/design/mastercard.md +3 -0
- package/dist/skills/frontend/references/design/meta.md +3 -0
- package/dist/skills/frontend/references/design/minimax.md +3 -0
- package/dist/skills/frontend/references/design/mintlify.md +3 -0
- package/dist/skills/frontend/references/design/miro.md +3 -0
- package/dist/skills/frontend/references/design/mistral.ai.md +3 -0
- package/dist/skills/frontend/references/design/mongodb.md +3 -0
- package/dist/skills/frontend/references/design/nike.md +3 -0
- package/dist/skills/frontend/references/design/notion.md +3 -0
- package/dist/skills/frontend/references/design/nvidia.md +3 -0
- package/dist/skills/frontend/references/design/ollama.md +3 -0
- package/dist/skills/frontend/references/design/opencode.ai.md +3 -0
- package/dist/skills/frontend/references/design/pinterest.md +3 -0
- package/dist/skills/frontend/references/design/playstation.md +3 -0
- package/dist/skills/frontend/references/design/posthog.md +3 -0
- package/dist/skills/frontend/references/design/raycast.md +3 -0
- package/dist/skills/frontend/references/design/renault.md +3 -0
- package/dist/skills/frontend/references/design/replicate.md +3 -0
- package/dist/skills/frontend/references/design/resend.md +3 -0
- package/dist/skills/frontend/references/design/revolut.md +3 -0
- package/dist/skills/frontend/references/design/runwayml.md +3 -0
- package/dist/skills/frontend/references/design/sanity.md +3 -0
- package/dist/skills/frontend/references/design/sentry.md +3 -0
- package/dist/skills/frontend/references/design/shopify.md +3 -0
- package/dist/skills/frontend/references/design/spacex.md +3 -0
- package/dist/skills/frontend/references/design/spotify.md +3 -0
- package/dist/skills/frontend/references/design/starbucks.md +3 -0
- package/dist/skills/frontend/references/design/stitch-skill.md +1 -1
- package/dist/skills/frontend/references/design/stripe.md +3 -0
- package/dist/skills/frontend/references/design/supabase.md +3 -0
- package/dist/skills/frontend/references/design/superhuman.md +3 -0
- package/dist/skills/frontend/references/design/taste-skill.md +1188 -208
- package/dist/skills/frontend/references/design/tesla.md +3 -0
- package/dist/skills/frontend/references/design/theverge.md +3 -0
- package/dist/skills/frontend/references/design/together.ai.md +3 -0
- package/dist/skills/frontend/references/design/uber.md +3 -0
- package/dist/skills/frontend/references/design/vercel.md +3 -0
- package/dist/skills/frontend/references/design/vodafone.md +3 -0
- package/dist/skills/frontend/references/design/voltagent.md +3 -0
- package/dist/skills/frontend/references/design/warp.md +3 -0
- package/dist/skills/frontend/references/design/webflow.md +3 -0
- package/dist/skills/frontend/references/design/wired.md +3 -0
- package/dist/skills/frontend/references/design/wise.md +3 -0
- package/dist/skills/frontend/references/design/x.ai.md +3 -0
- package/dist/skills/frontend/references/design/zapier.md +3 -0
- package/dist/skills/frontend/references/ui-ux-db/README.md +501 -115
- package/dist/skills/frontend/references/ui-ux-db/data/charts.csv +26 -26
- package/dist/skills/frontend/references/ui-ux-db/data/colors.csv +162 -97
- package/dist/skills/frontend/references/ui-ux-db/data/icons.csv +105 -100
- package/dist/skills/frontend/references/ui-ux-db/data/landing.csv +22 -18
- package/dist/skills/frontend/references/ui-ux-db/data/products.csv +162 -97
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -53
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -56
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -53
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -54
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -54
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -51
- package/dist/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -50
- package/dist/skills/frontend/references/ui-ux-db/data/styles.csv +17 -0
- package/dist/skills/frontend/references/ui-ux-db/data/typography.csv +17 -1
- package/dist/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +162 -101
- package/dist/skills/frontend/references/ui-ux-db/data/web-interface.csv +30 -30
- package/dist/skills/frontend/references/ui-ux-db/scripts/core.py +31 -22
- package/dist/skills/frontend/references/ui-ux-db/scripts/design_system.py +150 -69
- package/dist/skills/frontend/references/ui-ux-db/scripts/search.py +3 -3
- package/dist/skills/lcx-doctor/SKILL.md +1 -1
- package/dist/skills/ultimate-browsing/ATTRIBUTION.md +105 -0
- package/dist/skills/ultimate-browsing/SKILL.md +140 -0
- package/dist/skills/ultimate-browsing/engine/__init__.py +24 -0
- package/dist/skills/ultimate-browsing/engine/__main__.py +106 -0
- package/dist/skills/ultimate-browsing/engine/bias_check.py +174 -0
- package/dist/skills/ultimate-browsing/engine/curl_probe.py +91 -0
- package/dist/skills/ultimate-browsing/engine/executor.py +192 -0
- package/dist/skills/ultimate-browsing/engine/fetch_chain.py +268 -0
- package/dist/skills/ultimate-browsing/engine/referers.py +15 -0
- package/dist/skills/ultimate-browsing/engine/result_schema.py +45 -0
- package/dist/skills/ultimate-browsing/engine/summary.py +37 -0
- package/dist/skills/ultimate-browsing/engine/templates/package.json +11 -0
- package/dist/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +129 -0
- package/dist/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +167 -0
- package/dist/skills/ultimate-browsing/engine/tests/test_fetch_chain.py +77 -0
- package/dist/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +282 -0
- package/dist/skills/ultimate-browsing/engine/url_transforms.py +98 -0
- package/dist/skills/ultimate-browsing/engine/validators.py +216 -0
- package/dist/skills/ultimate-browsing/engine/waf_detector.py +214 -0
- package/dist/skills/ultimate-browsing/engine/waf_profiles.yaml +162 -0
- package/dist/skills/ultimate-browsing/references/agent-reach/README.md +79 -0
- package/dist/skills/ultimate-browsing/references/agent-reach/career.md +29 -0
- package/dist/skills/ultimate-browsing/references/agent-reach/dev.md +62 -0
- package/dist/skills/ultimate-browsing/references/agent-reach/search.md +33 -0
- package/dist/skills/ultimate-browsing/references/agent-reach/social.md +207 -0
- package/dist/skills/ultimate-browsing/references/agent-reach/video.md +115 -0
- package/dist/skills/ultimate-browsing/references/agent-reach/web.md +76 -0
- package/dist/skills/ultimate-browsing/references/chrome-stealth.md +120 -0
- package/dist/skills/ultimate-browsing/references/insane-search/README.md +319 -0
- package/dist/skills/ultimate-browsing/references/insane-search/cache-archive.md +83 -0
- package/dist/skills/ultimate-browsing/references/insane-search/fallback.md +159 -0
- package/dist/skills/ultimate-browsing/references/insane-search/jina.md +130 -0
- package/dist/skills/ultimate-browsing/references/insane-search/json-api.md +133 -0
- package/dist/skills/ultimate-browsing/references/insane-search/media.md +123 -0
- package/dist/skills/ultimate-browsing/references/insane-search/metadata.md +116 -0
- package/dist/skills/ultimate-browsing/references/insane-search/naver.md +107 -0
- package/dist/skills/ultimate-browsing/references/insane-search/playwright.md +142 -0
- package/dist/skills/ultimate-browsing/references/insane-search/public-api.md +119 -0
- package/dist/skills/ultimate-browsing/references/insane-search/rss.md +123 -0
- package/dist/skills/ultimate-browsing/references/insane-search/tls-impersonate.md +186 -0
- package/dist/skills/ultimate-browsing/references/insane-search/twitter.md +104 -0
- package/dist/skills/ultimate-browsing/scripts/cookie_crypto.py +75 -0
- package/dist/skills/ultimate-browsing/scripts/cookie_domains.py +38 -0
- package/dist/skills/ultimate-browsing/scripts/cookie_paths.py +112 -0
- package/dist/skills/ultimate-browsing/scripts/extract_cookies.py +280 -0
- package/dist/skills/ultimate-browsing/scripts/tests/test_cookie_domain_filter.py +110 -0
- package/dist/skills/ultimate-browsing/scripts/tests/test_extract_cookies.py +245 -0
- package/dist/skills/ultraresearch/ATTRIBUTION.md +49 -0
- package/dist/skills/ultraresearch/SKILL.md +34 -6
- package/dist/skills/ulw-plan/SKILL.md +4 -1
- package/dist/tools/background-task/constants.d.ts +1 -1
- package/dist/tools/delegate-task/sync-task-deps.d.ts +8 -6
- package/dist/tools/skill-mcp/tools.d.ts +1 -1
- package/dist/tui.js +18 -4
- package/package.json +16 -14
- package/packages/omo-codex/THIRD-PARTY-NOTICES.md +27 -4
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +3 -1
- package/packages/omo-codex/plugin/README.md +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +134 -42
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/LICENSE +21 -0
- package/packages/omo-codex/plugin/components/codegraph/NODE-RUNTIME-LICENSES.md +2951 -0
- package/packages/omo-codex/plugin/components/codegraph/NOTICE +16 -0
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +633 -193
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +561 -44
- package/packages/omo-codex/plugin/components/codegraph/package.json +9 -3
- package/packages/omo-codex/plugin/components/codegraph/src/cli.ts +11 -0
- package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +12 -0
- package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +34 -0
- package/packages/omo-codex/plugin/components/codegraph/src/mcp-unavailable.ts +75 -0
- package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +66 -13
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +26 -12
- package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +50 -330
- package/packages/omo-codex/plugin/components/codegraph/test/package-runtime.test.ts +91 -0
- package/packages/omo-codex/plugin/components/codegraph/test/provisioned-node-guard.test.ts +2 -2
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-facade.test.ts +68 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve-node-support.test.ts +11 -1
- package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +48 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve-unavailable.test.ts +133 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +1 -112
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-node-support.test.ts +149 -0
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-trust-boundary.test.ts +63 -0
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-availability.test.ts +106 -0
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-flow.test.ts +150 -0
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- 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/dist/cli.js +3 -3
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/src/sparkshell-awareness.ts +3 -3
- package/packages/omo-codex/plugin/components/rules/test/sparkshell-awareness.test.ts +33 -9
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/dist/cli.js +94 -0
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +17 -0
- package/packages/omo-codex/plugin/components/teammode/package.json +26 -0
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/SKILL.md +59 -32
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-guide.mjs +17 -16
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-state.mjs +70 -3
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-worktree.mjs +113 -0
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team.mjs +63 -4
- package/packages/omo-codex/plugin/components/teammode/src/cli.ts +12 -0
- package/packages/omo-codex/plugin/components/teammode/src/codex-hook.ts +125 -0
- package/packages/omo-codex/plugin/components/teammode/test/thread-title-hook.test.ts +116 -0
- package/packages/omo-codex/plugin/components/teammode/tsconfig.json +25 -0
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +5 -4
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +24 -3
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +8 -7
- package/packages/omo-codex/plugin/components/ulw-loop/test/skill-contract.test.ts +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +17 -0
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +17 -0
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +129 -12
- package/packages/omo-codex/plugin/package.json +3 -2
- package/packages/omo-codex/plugin/scripts/auto-update-plan.mjs +133 -0
- package/packages/omo-codex/plugin/scripts/auto-update-release-notes.mjs +135 -0
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +33 -133
- package/packages/omo-codex/plugin/scripts/hook-status-message.mjs +1 -0
- package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +41 -0
- package/packages/omo-codex/plugin/shared/src/config-loader.ts +20 -2
- package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +16 -0
- package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +32 -8
- package/packages/omo-codex/plugin/skills/frontend/references/design/airbnb.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/airtable.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/apple.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/binance.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/bmw.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/bugatti.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/cal.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/claude.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/clay.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/clickhouse.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/cohere.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/coinbase.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/composio.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/cursor.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/elevenlabs.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/expo.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/ferrari.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/figma.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/framer.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/hashicorp.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/ibm.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/imagegen-frontend-web.md +380 -79
- package/packages/omo-codex/plugin/skills/frontend/references/design/intercom.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/kraken.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/lamborghini.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/linear.app.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/lovable.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/mastercard.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/meta.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/minimax.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/mintlify.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/miro.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/mistral.ai.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/mongodb.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/nike.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/notion.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/nvidia.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/ollama.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/opencode.ai.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/pinterest.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/playstation.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/posthog.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/raycast.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/renault.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/replicate.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/resend.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/revolut.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/runwayml.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/sanity.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/sentry.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/shopify.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/spacex.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/spotify.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/starbucks.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/stitch-skill.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/stripe.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/supabase.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/superhuman.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/taste-skill.md +1188 -208
- package/packages/omo-codex/plugin/skills/frontend/references/design/tesla.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/theverge.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/together.ai.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/uber.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/vercel.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/vodafone.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/voltagent.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/warp.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/webflow.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/wired.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/wise.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/x.ai.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/zapier.md +3 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/README.md +501 -115
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/charts.csv +26 -26
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/colors.csv +162 -97
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/icons.csv +105 -100
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/landing.csv +22 -18
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/products.csv +162 -97
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -53
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -56
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -53
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -54
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -54
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -51
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -50
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/styles.csv +17 -0
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/typography.csv +17 -1
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +162 -101
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/web-interface.csv +30 -30
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/scripts/core.py +31 -22
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/scripts/design_system.py +150 -69
- package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/scripts/search.py +3 -3
- package/packages/omo-codex/plugin/skills/lcx-doctor/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/teammode/SKILL.md +59 -32
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-guide.mjs +17 -16
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-state.mjs +70 -3
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-worktree.mjs +113 -0
- package/packages/omo-codex/plugin/skills/teammode/scripts/team.mjs +63 -4
- package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +105 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +140 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/agents/openai.yaml +2 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/__init__.py +24 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/__main__.py +106 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/bias_check.py +174 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/curl_probe.py +91 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/executor.py +192 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/fetch_chain.py +268 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/referers.py +15 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/result_schema.py +45 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/summary.py +37 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +11 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +129 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +167 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_fetch_chain.py +77 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +282 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/url_transforms.py +98 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/validators.py +216 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/waf_detector.py +214 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/waf_profiles.yaml +162 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/README.md +79 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/career.md +29 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/dev.md +62 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/search.md +33 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/social.md +207 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/video.md +115 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/web.md +76 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +120 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/README.md +319 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/cache-archive.md +83 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/fallback.md +159 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/jina.md +130 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/json-api.md +133 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/media.md +123 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/metadata.md +116 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/naver.md +107 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/playwright.md +142 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/public-api.md +119 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/rss.md +123 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/tls-impersonate.md +186 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/twitter.md +104 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/cookie_crypto.py +75 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/cookie_domains.py +38 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/cookie_paths.py +112 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/extract_cookies.py +280 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/tests/test_cookie_domain_filter.py +110 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/tests/test_extract_cookies.py +245 -0
- package/packages/omo-codex/plugin/skills/ultraresearch/ATTRIBUTION.md +49 -0
- package/packages/omo-codex/plugin/skills/ultraresearch/SKILL.md +34 -6
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +8 -7
- package/packages/omo-codex/plugin/test/aggregate-build.test.mjs +2 -1
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +36 -0
- package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +2 -1
- package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +1 -1
- package/packages/omo-codex/plugin/test/auto-update-release-notes.test.mjs +95 -0
- package/packages/omo-codex/plugin/test/auto-update-restart-notice.test.mjs +12 -3
- package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +1 -0
- package/packages/omo-codex/plugin/test/component-codegraph-mcp-smoke.test.mjs +76 -0
- package/packages/omo-codex/plugin/test/component-hook-contract-cases.mjs +24 -0
- package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +1 -0
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +1 -0
- package/packages/omo-codex/plugin/test/teammode-communication.test.mjs +87 -0
- package/packages/omo-codex/plugin/test/teammode-thread-title.test.mjs +169 -0
- package/packages/omo-codex/plugin/test/teammode-worktree.test.mjs +246 -0
- package/packages/omo-codex/plugin/test/ultraresearch-skill-contract.test.mjs +78 -0
- package/packages/omo-codex/scripts/install-cli-args.test.mjs +1 -1
- package/packages/omo-codex/scripts/install-config-git-bash.test.mjs +23 -0
- package/packages/omo-codex/scripts/install-delegated-command.test.mjs +76 -4
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +531 -214
- package/packages/omo-codex/scripts/install-local-entrypoint.test.mjs +40 -3
- package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +32 -8
- package/packages/shared-skills/skills/frontend/references/design/airbnb.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/airtable.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/apple.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/binance.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/bmw.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/bugatti.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/cal.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/claude.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/clay.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/clickhouse.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/cohere.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/coinbase.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/composio.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/cursor.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/elevenlabs.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/expo.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/ferrari.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/figma.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/framer.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/hashicorp.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/ibm.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/imagegen-frontend-web.md +380 -79
- package/packages/shared-skills/skills/frontend/references/design/intercom.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/kraken.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/lamborghini.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/linear.app.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/lovable.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/mastercard.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/meta.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/minimax.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/mintlify.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/miro.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/mistral.ai.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/mongodb.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/nike.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/notion.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/nvidia.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/ollama.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/opencode.ai.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/pinterest.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/playstation.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/posthog.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/raycast.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/renault.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/replicate.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/resend.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/revolut.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/runwayml.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/sanity.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/sentry.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/shopify.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/spacex.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/spotify.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/starbucks.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/stitch-skill.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/stripe.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/supabase.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/superhuman.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/taste-skill.md +1188 -208
- package/packages/shared-skills/skills/frontend/references/design/tesla.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/theverge.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/together.ai.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/uber.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/vercel.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/vodafone.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/voltagent.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/warp.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/webflow.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/wired.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/wise.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/x.ai.md +3 -0
- package/packages/shared-skills/skills/frontend/references/design/zapier.md +3 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/README.md +501 -115
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/charts.csv +26 -26
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/colors.csv +162 -97
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/icons.csv +105 -100
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/landing.csv +22 -18
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/products.csv +162 -97
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -53
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -56
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -53
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -54
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -54
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -51
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -50
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/styles.csv +17 -0
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/typography.csv +17 -1
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +162 -101
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/web-interface.csv +30 -30
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/scripts/core.py +31 -22
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/scripts/design_system.py +150 -69
- package/packages/shared-skills/skills/frontend/references/ui-ux-db/scripts/search.py +3 -3
- package/packages/shared-skills/skills/lcx-doctor/SKILL.md +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +105 -0
- package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +140 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/__init__.py +24 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/__main__.py +106 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/bias_check.py +174 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/curl_probe.py +91 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/executor.py +192 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/fetch_chain.py +268 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/referers.py +15 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/result_schema.py +45 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/summary.py +37 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +11 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +129 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +167 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_fetch_chain.py +77 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +282 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/url_transforms.py +98 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/validators.py +216 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/waf_detector.py +214 -0
- package/packages/shared-skills/skills/ultimate-browsing/engine/waf_profiles.yaml +162 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/README.md +79 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/career.md +29 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/dev.md +62 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/search.md +33 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/social.md +207 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/video.md +115 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/web.md +76 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +120 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/README.md +319 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/cache-archive.md +83 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/fallback.md +159 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/jina.md +130 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/json-api.md +133 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/media.md +123 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/metadata.md +116 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/naver.md +107 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/playwright.md +142 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/public-api.md +119 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/rss.md +123 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/tls-impersonate.md +186 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/twitter.md +104 -0
- package/packages/shared-skills/skills/ultimate-browsing/scripts/cookie_crypto.py +75 -0
- package/packages/shared-skills/skills/ultimate-browsing/scripts/cookie_domains.py +38 -0
- package/packages/shared-skills/skills/ultimate-browsing/scripts/cookie_paths.py +112 -0
- package/packages/shared-skills/skills/ultimate-browsing/scripts/extract_cookies.py +280 -0
- package/packages/shared-skills/skills/ultimate-browsing/scripts/tests/test_cookie_domain_filter.py +110 -0
- package/packages/shared-skills/skills/ultimate-browsing/scripts/tests/test_extract_cookies.py +245 -0
- package/packages/shared-skills/skills/ultraresearch/ATTRIBUTION.md +49 -0
- package/packages/shared-skills/skills/ultraresearch/SKILL.md +34 -6
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +4 -1
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.d.ts +0 -2
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.d.ts +0 -32
|
@@ -16,7 +16,7 @@ var __export = (target, all) => {
|
|
|
16
16
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
17
17
|
|
|
18
18
|
// packages/utils/src/xdg-data-dir.ts
|
|
19
|
-
import { accessSync, constants, mkdirSync } from "node:fs";
|
|
19
|
+
import { accessSync as accessSync2, constants as constants2, mkdirSync } from "node:fs";
|
|
20
20
|
import os from "node:os";
|
|
21
21
|
import path from "node:path";
|
|
22
22
|
function resolveXdgDataDir(appName, options = {}) {
|
|
@@ -28,7 +28,7 @@ function resolveXdgDataDir(appName, options = {}) {
|
|
|
28
28
|
function resolveWritableDirectory(preferredDir, fallbackSuffix, osProvider) {
|
|
29
29
|
try {
|
|
30
30
|
mkdirSync(preferredDir, { recursive: true });
|
|
31
|
-
|
|
31
|
+
accessSync2(preferredDir, constants2.W_OK);
|
|
32
32
|
return preferredDir;
|
|
33
33
|
} catch (error) {
|
|
34
34
|
if (!(error instanceof Error))
|
|
@@ -95,21 +95,21 @@ var init_atomic_write = __esm(() => {
|
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
// packages/telemetry-core/src/activity-state.ts
|
|
98
|
-
import { existsSync as
|
|
99
|
-
import { basename as
|
|
98
|
+
import { existsSync as existsSync5, mkdirSync as mkdirSync2, readFileSync } from "node:fs";
|
|
99
|
+
import { basename as basename6, join as join29 } from "node:path";
|
|
100
100
|
function resolveTelemetryStateDir(product, options = {}) {
|
|
101
101
|
const dataDir = resolveXdgDataDir(product.cacheDirName, {
|
|
102
102
|
env: options.env,
|
|
103
103
|
osProvider: options.osProvider
|
|
104
104
|
});
|
|
105
|
-
const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined :
|
|
106
|
-
if (dataDir === xdgStateDir || xdgStateDir === undefined &&
|
|
105
|
+
const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join29(options.env.XDG_DATA_HOME, product.cacheDirName);
|
|
106
|
+
if (dataDir === xdgStateDir || xdgStateDir === undefined && basename6(dataDir) === product.cacheDirName) {
|
|
107
107
|
return dataDir;
|
|
108
108
|
}
|
|
109
|
-
return
|
|
109
|
+
return join29(dataDir, product.cacheDirName);
|
|
110
110
|
}
|
|
111
111
|
function getTelemetryActivityStateFilePath(stateDir) {
|
|
112
|
-
return
|
|
112
|
+
return join29(stateDir, POSTHOG_ACTIVITY_STATE_FILE);
|
|
113
113
|
}
|
|
114
114
|
function getDailyActiveCaptureState(input) {
|
|
115
115
|
const state = readPostHogActivityState(input.stateDir, input.diagnostics);
|
|
@@ -134,7 +134,7 @@ function isPostHogActivityState(value) {
|
|
|
134
134
|
}
|
|
135
135
|
function readPostHogActivityState(stateDir, diagnostics) {
|
|
136
136
|
const stateFilePath = getTelemetryActivityStateFilePath(stateDir);
|
|
137
|
-
if (!
|
|
137
|
+
if (!existsSync5(stateFilePath)) {
|
|
138
138
|
return {};
|
|
139
139
|
}
|
|
140
140
|
try {
|
|
@@ -179,10 +179,10 @@ var init_activity_state = __esm(() => {
|
|
|
179
179
|
var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com", DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74";
|
|
180
180
|
|
|
181
181
|
// packages/telemetry-core/src/diagnostics.ts
|
|
182
|
-
import { appendFileSync, existsSync as
|
|
183
|
-
import { join as
|
|
182
|
+
import { appendFileSync, existsSync as existsSync6, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
183
|
+
import { join as join30 } from "node:path";
|
|
184
184
|
function getTelemetryDiagnosticsFilePath(diagnosticsDir) {
|
|
185
|
-
return
|
|
185
|
+
return join30(diagnosticsDir, DIAGNOSTICS_FILE_NAME);
|
|
186
186
|
}
|
|
187
187
|
function writeTelemetryDiagnostic(input, options) {
|
|
188
188
|
const now = options.now ?? new Date;
|
|
@@ -200,7 +200,7 @@ function writeTelemetryDiagnostic(input, options) {
|
|
|
200
200
|
}
|
|
201
201
|
function cleanupTelemetryDiagnostics(options) {
|
|
202
202
|
const diagnosticsFilePath = getTelemetryDiagnosticsFilePath(options.diagnosticsDir);
|
|
203
|
-
if (!
|
|
203
|
+
if (!existsSync6(diagnosticsFilePath)) {
|
|
204
204
|
return;
|
|
205
205
|
}
|
|
206
206
|
try {
|
|
@@ -348,7 +348,7 @@ function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetr
|
|
|
348
348
|
var init_machine_id = () => {};
|
|
349
349
|
|
|
350
350
|
// node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
351
|
-
import { dirname as
|
|
351
|
+
import { dirname as dirname8, posix, sep as sep7 } from "node:path";
|
|
352
352
|
function createModulerModifier() {
|
|
353
353
|
const getModuleFromFileName = createGetModuleFromFilename();
|
|
354
354
|
return async (frames) => {
|
|
@@ -357,7 +357,7 @@ function createModulerModifier() {
|
|
|
357
357
|
return frames;
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
360
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname8(process.argv[1]) : process.cwd(), isWindows = sep7 === "\\") {
|
|
361
361
|
const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
|
|
362
362
|
return (filename) => {
|
|
363
363
|
if (!filename)
|
|
@@ -5907,7 +5907,7 @@ var package_default;
|
|
|
5907
5907
|
var init_package = __esm(() => {
|
|
5908
5908
|
package_default = {
|
|
5909
5909
|
name: "@oh-my-opencode/omo-codex",
|
|
5910
|
-
version: "4.
|
|
5910
|
+
version: "4.13.0",
|
|
5911
5911
|
type: "module",
|
|
5912
5912
|
private: true,
|
|
5913
5913
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -6042,7 +6042,7 @@ function createPostHogClient(source, options = {}) {
|
|
|
6042
6042
|
osProvider: options.osProvider ?? resolveOsProvider(),
|
|
6043
6043
|
product: createCodexTelemetryProductConfig(),
|
|
6044
6044
|
source,
|
|
6045
|
-
transportFactory: options.transportFactory
|
|
6045
|
+
transportFactory: options.transportFactory ?? transportFactoryOverride ?? undefined
|
|
6046
6046
|
});
|
|
6047
6047
|
if (!client.enabled) {
|
|
6048
6048
|
return NO_OP_POSTHOG;
|
|
@@ -6093,7 +6093,7 @@ function __setActivityStateProviderForTesting(provider) {
|
|
|
6093
6093
|
function __resetActivityStateProviderForTesting() {
|
|
6094
6094
|
activityStateProviderOverride = null;
|
|
6095
6095
|
}
|
|
6096
|
-
var osProviderOverride2 = null, activityStateProviderOverride = null, NO_OP_POSTHOG;
|
|
6096
|
+
var osProviderOverride2 = null, activityStateProviderOverride = null, transportFactoryOverride = null, NO_OP_POSTHOG;
|
|
6097
6097
|
var init_posthog = __esm(() => {
|
|
6098
6098
|
init_src();
|
|
6099
6099
|
init_diagnostics2();
|
|
@@ -6127,7 +6127,7 @@ var init_telemetry = __esm(() => {
|
|
|
6127
6127
|
|
|
6128
6128
|
// packages/omo-codex/src/install/install-local-cli.ts
|
|
6129
6129
|
import { readFile as readFile19 } from "node:fs/promises";
|
|
6130
|
-
import { dirname as
|
|
6130
|
+
import { dirname as dirname10, join as join35, resolve as resolve11 } from "node:path";
|
|
6131
6131
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
6132
6132
|
|
|
6133
6133
|
// packages/utils/src/runtime/spawn.ts
|
|
@@ -6284,6 +6284,70 @@ function spawn(cmdOrOpts, opts) {
|
|
|
6284
6284
|
throw new Error("spawn requires a command");
|
|
6285
6285
|
return wrapNodeProcess(nodeSpawn(bin, args, createNodeSpawnOptions(options)));
|
|
6286
6286
|
}
|
|
6287
|
+
// packages/utils/src/runtime/which.ts
|
|
6288
|
+
import { accessSync, constants } from "node:fs";
|
|
6289
|
+
import { delimiter, join } from "node:path";
|
|
6290
|
+
var runtime2 = globalThis;
|
|
6291
|
+
function isUnsafeCommandName(commandName) {
|
|
6292
|
+
if (commandName.includes("/") || commandName.includes("\\"))
|
|
6293
|
+
return true;
|
|
6294
|
+
if (commandName === "." || commandName === ".." || commandName.includes(".."))
|
|
6295
|
+
return true;
|
|
6296
|
+
if (/^[a-zA-Z]:/.test(commandName))
|
|
6297
|
+
return true;
|
|
6298
|
+
if (commandName.includes("\x00"))
|
|
6299
|
+
return true;
|
|
6300
|
+
return false;
|
|
6301
|
+
}
|
|
6302
|
+
function isExecutable(filePath) {
|
|
6303
|
+
try {
|
|
6304
|
+
accessSync(filePath, process.platform === "win32" ? constants.F_OK : constants.X_OK);
|
|
6305
|
+
return true;
|
|
6306
|
+
} catch (error) {
|
|
6307
|
+
if (!(error instanceof Error) && Object.prototype.toString.call(error) !== "[object Error]") {
|
|
6308
|
+
throw error;
|
|
6309
|
+
}
|
|
6310
|
+
return false;
|
|
6311
|
+
}
|
|
6312
|
+
}
|
|
6313
|
+
function resolvePathValue() {
|
|
6314
|
+
if (process.platform === "win32")
|
|
6315
|
+
return process.env["Path"] ?? process.env["PATH"];
|
|
6316
|
+
return process.env["PATH"];
|
|
6317
|
+
}
|
|
6318
|
+
function getWindowsCandidates(commandName) {
|
|
6319
|
+
if (process.platform !== "win32")
|
|
6320
|
+
return [commandName];
|
|
6321
|
+
if (/\.[^\\/]+$/.test(commandName))
|
|
6322
|
+
return [commandName];
|
|
6323
|
+
return [commandName, `${commandName}.exe`, `${commandName}.cmd`, `${commandName}.bat`, `${commandName}.com`];
|
|
6324
|
+
}
|
|
6325
|
+
function bunWhich(commandName) {
|
|
6326
|
+
if (!commandName)
|
|
6327
|
+
return null;
|
|
6328
|
+
if (isUnsafeCommandName(commandName))
|
|
6329
|
+
return null;
|
|
6330
|
+
const candidateNames = getWindowsCandidates(commandName);
|
|
6331
|
+
for (const candidateName of candidateNames) {
|
|
6332
|
+
const resolvedPath = runtime2.Bun?.which(candidateName) ?? null;
|
|
6333
|
+
if (resolvedPath !== null)
|
|
6334
|
+
return resolvedPath;
|
|
6335
|
+
}
|
|
6336
|
+
const pathValue = resolvePathValue();
|
|
6337
|
+
if (!pathValue)
|
|
6338
|
+
return null;
|
|
6339
|
+
const pathEntries = pathValue.split(delimiter).filter((pathEntry) => pathEntry.length > 0);
|
|
6340
|
+
if (pathEntries.length === 0)
|
|
6341
|
+
return null;
|
|
6342
|
+
for (const pathEntry of pathEntries) {
|
|
6343
|
+
for (const candidateName of candidateNames) {
|
|
6344
|
+
const candidatePath = join(pathEntry, candidateName);
|
|
6345
|
+
if (isExecutable(candidatePath))
|
|
6346
|
+
return candidatePath;
|
|
6347
|
+
}
|
|
6348
|
+
}
|
|
6349
|
+
return null;
|
|
6350
|
+
}
|
|
6287
6351
|
// packages/utils/src/runtime/git-bash.ts
|
|
6288
6352
|
import { execFileSync } from "node:child_process";
|
|
6289
6353
|
import { existsSync } from "node:fs";
|
|
@@ -6395,13 +6459,13 @@ var defaultRunCommand = async (command, args, options) => {
|
|
|
6395
6459
|
};
|
|
6396
6460
|
|
|
6397
6461
|
// packages/omo-codex/src/install/install-codex.ts
|
|
6398
|
-
import { join as
|
|
6399
|
-
import { existsSync as
|
|
6462
|
+
import { join as join31, resolve as resolve10 } from "node:path";
|
|
6463
|
+
import { existsSync as existsSync7 } from "node:fs";
|
|
6400
6464
|
import { homedir as homedir2 } from "node:os";
|
|
6401
6465
|
|
|
6402
6466
|
// packages/omo-codex/src/install/codex-cache-bins.ts
|
|
6403
6467
|
import { chmod, lstat as lstat3, mkdir, readFile as readFile2, readdir, readlink as readlink2, rm as rm2, stat, symlink, writeFile } from "node:fs/promises";
|
|
6404
|
-
import { basename, isAbsolute, join as
|
|
6468
|
+
import { basename, isAbsolute, join as join4, relative, resolve, sep } from "node:path";
|
|
6405
6469
|
|
|
6406
6470
|
// packages/omo-codex/src/install/codex-cache-command-shim.ts
|
|
6407
6471
|
var COMMAND_SHIM_MARKER = ":: generated by oh-my-openagent Codex installer";
|
|
@@ -6427,7 +6491,7 @@ function isNodeErrorWithCode(error) {
|
|
|
6427
6491
|
|
|
6428
6492
|
// packages/omo-codex/src/install/codex-cache-legacy-bins.ts
|
|
6429
6493
|
import { lstat as lstat2, readFile, readlink, rm } from "node:fs/promises";
|
|
6430
|
-
import { join } from "node:path";
|
|
6494
|
+
import { join as join2 } from "node:path";
|
|
6431
6495
|
var LEGACY_CODEX_COMPONENT_BINS = [
|
|
6432
6496
|
{ name: "omo", component: "ulw-loop" },
|
|
6433
6497
|
{ name: "codex-comment-checker", component: "comment-checker" },
|
|
@@ -6439,7 +6503,7 @@ var LEGACY_CODEX_COMPONENT_BINS = [
|
|
|
6439
6503
|
];
|
|
6440
6504
|
async function removeLegacyCodexComponentBins(binDir, platform) {
|
|
6441
6505
|
for (const entry of LEGACY_CODEX_COMPONENT_BINS) {
|
|
6442
|
-
const linkPath =
|
|
6506
|
+
const linkPath = join2(binDir, platform === "win32" ? `${entry.name}.cmd` : entry.name);
|
|
6443
6507
|
await removeLegacyCodexComponentBin(linkPath, entry.component, platform);
|
|
6444
6508
|
}
|
|
6445
6509
|
}
|
|
@@ -6490,10 +6554,10 @@ function isNodeErrorWithCode2(error) {
|
|
|
6490
6554
|
}
|
|
6491
6555
|
|
|
6492
6556
|
// packages/omo-codex/src/install/codex-cache-runtime-wrapper.ts
|
|
6493
|
-
import { join as
|
|
6557
|
+
import { join as join3 } from "node:path";
|
|
6494
6558
|
var RUNTIME_WRAPPER_MARKER = "OMO_GENERATED_RUNTIME_WRAPPER";
|
|
6495
6559
|
function posixRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
6496
|
-
const ulwLoopBin = toPosixPath(
|
|
6560
|
+
const ulwLoopBin = toPosixPath(join3(binDir, "omo-ulw-loop"));
|
|
6497
6561
|
const nodeCli = escapePosixDoubleQuoted(toPosixPath(nodeCliPath));
|
|
6498
6562
|
const escapedCliPath = escapePosixDoubleQuoted(toPosixPath(cliPath));
|
|
6499
6563
|
const escapedCodexHome = escapePosixDoubleQuoted(toPosixPath(codexHome));
|
|
@@ -6539,7 +6603,7 @@ function posixRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
|
6539
6603
|
`);
|
|
6540
6604
|
}
|
|
6541
6605
|
function windowsRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
|
|
6542
|
-
const ulwLoopBin =
|
|
6606
|
+
const ulwLoopBin = join3(binDir, "omo-ulw-loop.cmd");
|
|
6543
6607
|
return [
|
|
6544
6608
|
"@echo off",
|
|
6545
6609
|
`rem ${RUNTIME_WRAPPER_MARKER}`,
|
|
@@ -6595,29 +6659,29 @@ async function linkCachedPluginBins(input) {
|
|
|
6595
6659
|
return linked;
|
|
6596
6660
|
}
|
|
6597
6661
|
async function linkRootRuntimeBin(input) {
|
|
6598
|
-
const cliPath =
|
|
6662
|
+
const cliPath = join4(input.repoRoot, "dist", "cli", "index.js");
|
|
6599
6663
|
if (!await isFile(cliPath))
|
|
6600
6664
|
return null;
|
|
6601
|
-
const nodeCliPath =
|
|
6665
|
+
const nodeCliPath = join4(input.repoRoot, "dist", "cli-node", "index.js");
|
|
6602
6666
|
const platform = input.platform ?? process.platform;
|
|
6603
6667
|
await mkdir(input.binDir, { recursive: true });
|
|
6604
6668
|
if (platform === "win32") {
|
|
6605
|
-
const linkPath2 =
|
|
6669
|
+
const linkPath2 = join4(input.binDir, "omo.cmd");
|
|
6606
6670
|
await replaceRuntimeWrapper(linkPath2, windowsRuntimeWrapper(cliPath, input.codexHome, input.binDir, nodeCliPath));
|
|
6607
6671
|
return { name: "omo", path: linkPath2, target: cliPath };
|
|
6608
6672
|
}
|
|
6609
|
-
const linkPath =
|
|
6673
|
+
const linkPath = join4(input.binDir, "omo");
|
|
6610
6674
|
await replaceRuntimeWrapper(linkPath, posixRuntimeWrapper(cliPath, input.codexHome, input.binDir, nodeCliPath));
|
|
6611
6675
|
await chmod(linkPath, 493);
|
|
6612
6676
|
return { name: "omo", path: linkPath, target: cliPath };
|
|
6613
6677
|
}
|
|
6614
6678
|
async function linkCachedPluginBin(binDir, link, platform) {
|
|
6615
6679
|
if (platform === "win32") {
|
|
6616
|
-
const linkPath2 =
|
|
6680
|
+
const linkPath2 = join4(binDir, `${link.name}.cmd`);
|
|
6617
6681
|
await replaceCommandShim(linkPath2, link.target);
|
|
6618
6682
|
return linkPath2;
|
|
6619
6683
|
}
|
|
6620
|
-
const linkPath =
|
|
6684
|
+
const linkPath = join4(binDir, link.name);
|
|
6621
6685
|
await replaceSymlink(linkPath, link.target);
|
|
6622
6686
|
return linkPath;
|
|
6623
6687
|
}
|
|
@@ -6638,14 +6702,14 @@ async function discoverPackageBins(root) {
|
|
|
6638
6702
|
async function collectPackageBins(directory, root, links) {
|
|
6639
6703
|
const entries = await readdir(directory, { withFileTypes: true });
|
|
6640
6704
|
if (entries.some((entry) => entry.isFile() && entry.name === "package.json")) {
|
|
6641
|
-
await appendPackageBinLinks(
|
|
6705
|
+
await appendPackageBinLinks(join4(directory, "package.json"), directory, root, links);
|
|
6642
6706
|
}
|
|
6643
6707
|
for (const entry of entries) {
|
|
6644
6708
|
if (!entry.isDirectory())
|
|
6645
6709
|
continue;
|
|
6646
6710
|
if (entry.name === "node_modules" || entry.name === ".git" || entry.name === "dist")
|
|
6647
6711
|
continue;
|
|
6648
|
-
const childPath =
|
|
6712
|
+
const childPath = join4(directory, entry.name);
|
|
6649
6713
|
if (!childPath.startsWith(root))
|
|
6650
6714
|
continue;
|
|
6651
6715
|
await collectPackageBins(childPath, root, links);
|
|
@@ -6760,11 +6824,11 @@ async function existingNonSymlink(path) {
|
|
|
6760
6824
|
}
|
|
6761
6825
|
// packages/omo-codex/src/install/codex-cache-install.ts
|
|
6762
6826
|
import { cp as cp2, mkdir as mkdir3, readFile as readFile7, rename, rm as rm3 } from "node:fs/promises";
|
|
6763
|
-
import { basename as basename2, dirname as dirname3, join as
|
|
6827
|
+
import { basename as basename2, dirname as dirname3, join as join10, sep as sep5 } from "node:path";
|
|
6764
6828
|
|
|
6765
6829
|
// packages/omo-codex/src/install/codex-cache-bundled-mcps.ts
|
|
6766
6830
|
import { cp, mkdir as mkdir2, readFile as readFile3, stat as stat2 } from "node:fs/promises";
|
|
6767
|
-
import { dirname, join as
|
|
6831
|
+
import { dirname, join as join5, resolve as resolve2 } from "node:path";
|
|
6768
6832
|
var BUNDLED_MCP_RUNTIMES = [
|
|
6769
6833
|
{
|
|
6770
6834
|
label: "Git Bash MCP",
|
|
@@ -6782,23 +6846,23 @@ var BUNDLED_MCP_RUNTIMES = [
|
|
|
6782
6846
|
}
|
|
6783
6847
|
];
|
|
6784
6848
|
async function copyBundledMcpRuntimeDists(input) {
|
|
6785
|
-
const sourceArgs = await readSourceMcpArgs(
|
|
6786
|
-
for (const
|
|
6787
|
-
if (!sourceArgs.has(
|
|
6849
|
+
const sourceArgs = await readSourceMcpArgs(join5(input.sourceRoot, ".mcp.json"));
|
|
6850
|
+
for (const runtime3 of BUNDLED_MCP_RUNTIMES) {
|
|
6851
|
+
if (!sourceArgs.has(runtime3.sourceArg))
|
|
6788
6852
|
continue;
|
|
6789
|
-
await copyBundledMcpRuntimeDist(input.pluginRoot, input.sourceRoot,
|
|
6853
|
+
await copyBundledMcpRuntimeDist(input.pluginRoot, input.sourceRoot, runtime3);
|
|
6790
6854
|
}
|
|
6791
6855
|
}
|
|
6792
6856
|
function resolveBundledMcpRuntimeArg(pluginRoot, arg) {
|
|
6793
|
-
const
|
|
6794
|
-
return
|
|
6857
|
+
const runtime3 = BUNDLED_MCP_RUNTIMES.find((candidate) => candidate.sourceArg === arg);
|
|
6858
|
+
return runtime3 ? join5(pluginRoot, runtime3.destinationArg) : null;
|
|
6795
6859
|
}
|
|
6796
|
-
async function copyBundledMcpRuntimeDist(pluginRoot, sourceRoot,
|
|
6797
|
-
const sourcePath = resolve2(sourceRoot,
|
|
6860
|
+
async function copyBundledMcpRuntimeDist(pluginRoot, sourceRoot, runtime3) {
|
|
6861
|
+
const sourcePath = resolve2(sourceRoot, runtime3.sourceDistFromPlugin);
|
|
6798
6862
|
if (!await isDirectory(sourcePath)) {
|
|
6799
|
-
throw new Error(`missing built ${
|
|
6863
|
+
throw new Error(`missing built ${runtime3.label} dist at ${sourcePath}`);
|
|
6800
6864
|
}
|
|
6801
|
-
const destinationPath =
|
|
6865
|
+
const destinationPath = join5(pluginRoot, runtime3.destinationDistFromPlugin);
|
|
6802
6866
|
await mkdir2(dirname(destinationPath), { recursive: true });
|
|
6803
6867
|
await cp(sourcePath, destinationPath, { recursive: true });
|
|
6804
6868
|
}
|
|
@@ -6837,10 +6901,10 @@ async function isDirectory(path) {
|
|
|
6837
6901
|
// packages/omo-codex/src/install/codex-cache-local-dependencies.ts
|
|
6838
6902
|
import { realpathSync } from "node:fs";
|
|
6839
6903
|
import { readFile as readFile4, readdir as readdir2, writeFile as writeFile2 } from "node:fs/promises";
|
|
6840
|
-
import { dirname as dirname2, isAbsolute as isAbsolute3, join as
|
|
6904
|
+
import { dirname as dirname2, isAbsolute as isAbsolute3, join as join7, relative as relative3, resolve as resolve4, sep as sep2 } from "node:path";
|
|
6841
6905
|
|
|
6842
6906
|
// packages/omo-codex/src/install/codex-cache-paths.ts
|
|
6843
|
-
import { isAbsolute as isAbsolute2, join as
|
|
6907
|
+
import { isAbsolute as isAbsolute2, join as join6, relative as relative2, resolve as resolve3 } from "node:path";
|
|
6844
6908
|
function resolveCachedRuntimePath(pluginRoot, sourceRoot, runtimePath) {
|
|
6845
6909
|
const targetPath = resolve3(pluginRoot, runtimePath);
|
|
6846
6910
|
if (isPathInside(targetPath, pluginRoot))
|
|
@@ -6863,7 +6927,7 @@ async function rewriteCachedPackageLocalFileDependencies(pluginRoot, sourceRoot)
|
|
|
6863
6927
|
if (!isPlainRecord(parsed))
|
|
6864
6928
|
continue;
|
|
6865
6929
|
const packageDir = dirname2(packageJsonPath);
|
|
6866
|
-
const sourcePackageDir =
|
|
6930
|
+
const sourcePackageDir = join7(sourceRoot, relative3(pluginRoot, packageDir));
|
|
6867
6931
|
let changed = false;
|
|
6868
6932
|
for (const field of ["dependencies", "optionalDependencies", "peerDependencies"]) {
|
|
6869
6933
|
const dependencies = parsed[field];
|
|
@@ -6901,7 +6965,7 @@ async function rewriteCachedPackageLocalFileDependencies(pluginRoot, sourceRoot)
|
|
|
6901
6965
|
`);
|
|
6902
6966
|
}
|
|
6903
6967
|
async function readPackageLock(pluginRoot) {
|
|
6904
|
-
const path =
|
|
6968
|
+
const path = join7(pluginRoot, "package-lock.json");
|
|
6905
6969
|
try {
|
|
6906
6970
|
const parsed = JSON.parse(await readFile4(path, "utf8"));
|
|
6907
6971
|
return { path, value: isPlainRecord(parsed) ? parsed : null, changed: false };
|
|
@@ -6962,14 +7026,14 @@ function canonicalizeExistingPath(path) {
|
|
|
6962
7026
|
async function collectPackageJsonPaths(directory, root, paths) {
|
|
6963
7027
|
const entries = await readdir2(directory, { withFileTypes: true });
|
|
6964
7028
|
if (entries.some((entry) => entry.isFile() && entry.name === "package.json")) {
|
|
6965
|
-
paths.push(
|
|
7029
|
+
paths.push(join7(directory, "package.json"));
|
|
6966
7030
|
}
|
|
6967
7031
|
for (const entry of entries) {
|
|
6968
7032
|
if (!entry.isDirectory())
|
|
6969
7033
|
continue;
|
|
6970
7034
|
if (entry.name === "node_modules" || entry.name === ".git" || entry.name === "dist")
|
|
6971
7035
|
continue;
|
|
6972
|
-
const childPath =
|
|
7036
|
+
const childPath = join7(directory, entry.name);
|
|
6973
7037
|
if (!isPathInside(childPath, root))
|
|
6974
7038
|
continue;
|
|
6975
7039
|
await collectPackageJsonPaths(childPath, root, paths);
|
|
@@ -6978,10 +7042,10 @@ async function collectPackageJsonPaths(directory, root, paths) {
|
|
|
6978
7042
|
|
|
6979
7043
|
// packages/omo-codex/src/install/codex-cache-mcp-manifest.ts
|
|
6980
7044
|
import { readFile as readFile5, writeFile as writeFile3 } from "node:fs/promises";
|
|
6981
|
-
import { join as
|
|
7045
|
+
import { join as join8, sep as sep3 } from "node:path";
|
|
6982
7046
|
var CODEGRAPH_RELATIVE_ARGS = new Set(["components/codegraph/dist/serve.js", "./components/codegraph/dist/serve.js"]);
|
|
6983
7047
|
async function rewriteCachedMcpManifest(pluginRoot, sourceRoot = pluginRoot) {
|
|
6984
|
-
const manifestPath =
|
|
7048
|
+
const manifestPath = join8(pluginRoot, ".mcp.json");
|
|
6985
7049
|
if (!await fileExistsStrict(manifestPath))
|
|
6986
7050
|
return;
|
|
6987
7051
|
const raw = await readFile5(manifestPath, "utf8");
|
|
@@ -7006,7 +7070,7 @@ async function rewriteCachedMcpManifest(pluginRoot, sourceRoot = pluginRoot) {
|
|
|
7006
7070
|
if (bundledMcpRuntimeArg !== null)
|
|
7007
7071
|
return bundledMcpRuntimeArg;
|
|
7008
7072
|
if (CODEGRAPH_RELATIVE_ARGS.has(arg))
|
|
7009
|
-
return
|
|
7073
|
+
return join8(pluginRoot, "components", "codegraph", "dist", "serve.js");
|
|
7010
7074
|
if (arg.startsWith("./") || arg.startsWith("../"))
|
|
7011
7075
|
return resolveCachedRuntimePath(pluginRoot, sourceRoot, arg);
|
|
7012
7076
|
return arg;
|
|
@@ -7021,7 +7085,7 @@ async function rewriteCachedMcpManifest(pluginRoot, sourceRoot = pluginRoot) {
|
|
|
7021
7085
|
`);
|
|
7022
7086
|
}
|
|
7023
7087
|
async function rewriteCachedManifestRoot(pluginRoot, fromRoot, toRoot) {
|
|
7024
|
-
const manifestPath =
|
|
7088
|
+
const manifestPath = join8(pluginRoot, ".mcp.json");
|
|
7025
7089
|
if (!await fileExistsStrict(manifestPath))
|
|
7026
7090
|
return;
|
|
7027
7091
|
const raw = await readFile5(manifestPath, "utf8");
|
|
@@ -7057,7 +7121,7 @@ async function rewriteCachedManifestRoot(pluginRoot, fromRoot, toRoot) {
|
|
|
7057
7121
|
|
|
7058
7122
|
// packages/omo-codex/src/install/codex-hook-targets.ts
|
|
7059
7123
|
import { readFile as readFile6 } from "node:fs/promises";
|
|
7060
|
-
import { join as
|
|
7124
|
+
import { join as join9, sep as sep4 } from "node:path";
|
|
7061
7125
|
var PLUGIN_ROOT_TARGET_PATTERN = /\$\{PLUGIN_ROOT\}[\\/]+([^"']+)/g;
|
|
7062
7126
|
async function findMissingHookCommandTargets(pluginRoot) {
|
|
7063
7127
|
const commands = [];
|
|
@@ -7074,7 +7138,7 @@ async function findMissingHookCommandTargets(pluginRoot) {
|
|
|
7074
7138
|
const targetSuffix = match[1];
|
|
7075
7139
|
if (targetSuffix === undefined)
|
|
7076
7140
|
continue;
|
|
7077
|
-
const target =
|
|
7141
|
+
const target = join9(pluginRoot, ...targetSuffix.split(/[\\/]+/));
|
|
7078
7142
|
if (seen.has(target))
|
|
7079
7143
|
continue;
|
|
7080
7144
|
seen.add(target);
|
|
@@ -7085,17 +7149,17 @@ async function findMissingHookCommandTargets(pluginRoot) {
|
|
|
7085
7149
|
return missing;
|
|
7086
7150
|
}
|
|
7087
7151
|
async function hookManifestPaths(pluginRoot) {
|
|
7088
|
-
const pluginManifestPath =
|
|
7152
|
+
const pluginManifestPath = join9(pluginRoot, ".codex-plugin", "plugin.json");
|
|
7089
7153
|
if (!await fileExistsStrict(pluginManifestPath))
|
|
7090
|
-
return [
|
|
7154
|
+
return [join9(pluginRoot, "hooks", "hooks.json")];
|
|
7091
7155
|
const parsed = JSON.parse(await readFile6(pluginManifestPath, "utf8"));
|
|
7092
7156
|
if (!isPlainRecord(parsed))
|
|
7093
7157
|
return [];
|
|
7094
7158
|
if (typeof parsed.hooks === "string" && parsed.hooks.trim() !== "") {
|
|
7095
|
-
return [
|
|
7159
|
+
return [join9(pluginRoot, stripDotSlash(parsed.hooks))];
|
|
7096
7160
|
}
|
|
7097
7161
|
if (Array.isArray(parsed.hooks)) {
|
|
7098
|
-
return parsed.hooks.filter((hookPath) => typeof hookPath === "string" && hookPath.trim() !== "").map((hookPath) =>
|
|
7162
|
+
return parsed.hooks.filter((hookPath) => typeof hookPath === "string" && hookPath.trim() !== "").map((hookPath) => join9(pluginRoot, stripDotSlash(hookPath)));
|
|
7099
7163
|
}
|
|
7100
7164
|
return [];
|
|
7101
7165
|
}
|
|
@@ -7131,7 +7195,7 @@ async function installCachedPlugin(input) {
|
|
|
7131
7195
|
await maybeRunNpmInstall(input.sourcePath, input.runCommand);
|
|
7132
7196
|
await maybeRunNpmBuild(input.sourcePath, input.runCommand);
|
|
7133
7197
|
}
|
|
7134
|
-
const targetPath =
|
|
7198
|
+
const targetPath = join10(input.codexHome, "plugins", "cache", input.marketplaceName, input.name, input.version);
|
|
7135
7199
|
const tempPath = createTempSiblingPath(targetPath);
|
|
7136
7200
|
await rm3(tempPath, { recursive: true, force: true });
|
|
7137
7201
|
try {
|
|
@@ -7139,6 +7203,8 @@ async function installCachedPlugin(input) {
|
|
|
7139
7203
|
await rewriteCachedPackageLocalFileDependencies(tempPath, input.sourcePath);
|
|
7140
7204
|
await copyBundledMcpRuntimeDists({ pluginRoot: tempPath, sourceRoot: input.sourcePath });
|
|
7141
7205
|
await maybeRunNpmInstall(tempPath, input.runCommand, ["ci", "--omit=dev"]);
|
|
7206
|
+
if (input.buildSource === false)
|
|
7207
|
+
await maybeRunNpmSyncSkills(tempPath, input.runCommand);
|
|
7142
7208
|
await rewriteCachedMcpManifest(tempPath, input.sourcePath);
|
|
7143
7209
|
await rewriteCachedManifestRoot(tempPath, tempPath, targetPath);
|
|
7144
7210
|
await assertHookCommandTargets(tempPath);
|
|
@@ -7150,14 +7216,14 @@ async function installCachedPlugin(input) {
|
|
|
7150
7216
|
return { name: input.name, version: input.version, path: targetPath };
|
|
7151
7217
|
}
|
|
7152
7218
|
async function maybeRunNpmInstall(cwd, runCommand, args = ["install"]) {
|
|
7153
|
-
if (!await fileExistsStrict(
|
|
7219
|
+
if (!await fileExistsStrict(join10(cwd, "package.json")))
|
|
7154
7220
|
return;
|
|
7155
7221
|
await runCommand("npm", args, { cwd });
|
|
7156
7222
|
}
|
|
7157
7223
|
async function maybeRunNpmBuild(cwd, runCommand) {
|
|
7158
|
-
if (!await fileExistsStrict(
|
|
7224
|
+
if (!await fileExistsStrict(join10(cwd, "package.json")))
|
|
7159
7225
|
return;
|
|
7160
|
-
const packageJson = JSON.parse(await readFile7(
|
|
7226
|
+
const packageJson = JSON.parse(await readFile7(join10(cwd, "package.json"), "utf8"));
|
|
7161
7227
|
if (!isPlainRecord(packageJson))
|
|
7162
7228
|
return;
|
|
7163
7229
|
const scripts = packageJson.scripts;
|
|
@@ -7165,11 +7231,22 @@ async function maybeRunNpmBuild(cwd, runCommand) {
|
|
|
7165
7231
|
return;
|
|
7166
7232
|
await runCommand("npm", ["run", "build"], { cwd });
|
|
7167
7233
|
}
|
|
7234
|
+
async function maybeRunNpmSyncSkills(cwd, runCommand) {
|
|
7235
|
+
if (!await fileExistsStrict(join10(cwd, "package.json")))
|
|
7236
|
+
return;
|
|
7237
|
+
const packageJson = JSON.parse(await readFile7(join10(cwd, "package.json"), "utf8"));
|
|
7238
|
+
if (!isPlainRecord(packageJson))
|
|
7239
|
+
return;
|
|
7240
|
+
const scripts = packageJson.scripts;
|
|
7241
|
+
if (!isPlainRecord(scripts) || typeof scripts["sync:skills"] !== "string")
|
|
7242
|
+
return;
|
|
7243
|
+
await runCommand("npm", ["run", "sync:skills"], { cwd });
|
|
7244
|
+
}
|
|
7168
7245
|
function createTempSiblingPath(targetPath) {
|
|
7169
|
-
return
|
|
7246
|
+
return join10(dirname3(targetPath), `.tmp-${basename2(targetPath)}-${process.pid}-${Date.now()}`);
|
|
7170
7247
|
}
|
|
7171
7248
|
function createBackupSiblingPath(targetPath) {
|
|
7172
|
-
return
|
|
7249
|
+
return join10(dirname3(targetPath), `.backup-${basename2(targetPath)}-${process.pid}-${Date.now()}`);
|
|
7173
7250
|
}
|
|
7174
7251
|
async function copyDirectory(sourcePath, targetPath) {
|
|
7175
7252
|
await mkdir3(dirname3(targetPath), { recursive: true });
|
|
@@ -7208,9 +7285,9 @@ function shouldCopyPluginPath(path, root) {
|
|
|
7208
7285
|
}
|
|
7209
7286
|
// packages/omo-codex/src/install/codex-cache-prune.ts
|
|
7210
7287
|
import { lstat as lstat4, readdir as readdir3, rm as rm4, stat as stat3 } from "node:fs/promises";
|
|
7211
|
-
import { join as
|
|
7288
|
+
import { join as join11 } from "node:path";
|
|
7212
7289
|
async function pruneMarketplaceCache(input) {
|
|
7213
|
-
const cacheRoot =
|
|
7290
|
+
const cacheRoot = join11(input.codexHome, "plugins", "cache", input.marketplaceName);
|
|
7214
7291
|
if (!await fileExistsStrict(cacheRoot))
|
|
7215
7292
|
return;
|
|
7216
7293
|
const keep = new Set(input.keepPluginNames);
|
|
@@ -7218,15 +7295,15 @@ async function pruneMarketplaceCache(input) {
|
|
|
7218
7295
|
for (const entry of entries) {
|
|
7219
7296
|
if (!entry.isDirectory() || keep.has(entry.name))
|
|
7220
7297
|
continue;
|
|
7221
|
-
await rm4(
|
|
7298
|
+
await rm4(join11(cacheRoot, entry.name), { recursive: true, force: true });
|
|
7222
7299
|
}
|
|
7223
7300
|
}
|
|
7224
7301
|
async function pruneMarketplacePluginCaches(input) {
|
|
7225
|
-
const cacheRoot =
|
|
7302
|
+
const cacheRoot = join11(input.codexHome, "plugins", "cache", input.marketplaceName);
|
|
7226
7303
|
if (!await fileExistsStrict(cacheRoot))
|
|
7227
7304
|
return;
|
|
7228
7305
|
for (const pluginName of input.pluginNames) {
|
|
7229
|
-
await rm4(
|
|
7306
|
+
await rm4(join11(cacheRoot, pluginName), { recursive: true, force: true });
|
|
7230
7307
|
}
|
|
7231
7308
|
const remainingEntries = await readCacheEntryNames(cacheRoot);
|
|
7232
7309
|
if (remainingEntries.length === 0) {
|
|
@@ -7273,11 +7350,11 @@ async function isBrokenCacheSymlink(path) {
|
|
|
7273
7350
|
}
|
|
7274
7351
|
// packages/omo-codex/src/install/codex-cached-marketplace-manifest.ts
|
|
7275
7352
|
import { mkdir as mkdir4, writeFile as writeFile4 } from "node:fs/promises";
|
|
7276
|
-
import { join as
|
|
7353
|
+
import { join as join12 } from "node:path";
|
|
7277
7354
|
async function writeCachedMarketplaceManifest(input) {
|
|
7278
|
-
const marketplaceDir =
|
|
7355
|
+
const marketplaceDir = join12(input.marketplaceRoot, ".agents", "plugins");
|
|
7279
7356
|
await mkdir4(marketplaceDir, { recursive: true });
|
|
7280
|
-
await writeFile4(
|
|
7357
|
+
await writeFile4(join12(marketplaceDir, "marketplace.json"), `${JSON.stringify({
|
|
7281
7358
|
name: input.marketplaceName,
|
|
7282
7359
|
plugins: input.plugins.map((plugin) => ({
|
|
7283
7360
|
name: plugin.name,
|
|
@@ -7290,7 +7367,7 @@ async function writeCachedMarketplaceManifest(input) {
|
|
|
7290
7367
|
// packages/omo-codex/src/install/codex-package-layout.ts
|
|
7291
7368
|
import { existsSync as existsSync2 } from "node:fs";
|
|
7292
7369
|
import { readFile as readFile8 } from "node:fs/promises";
|
|
7293
|
-
import { join as
|
|
7370
|
+
import { join as join13 } from "node:path";
|
|
7294
7371
|
var PACKAGED_CODEX_INSTALLER_NAMES = new Set([
|
|
7295
7372
|
"@code-yeongyu/lazycodex",
|
|
7296
7373
|
"@code-yeongyu/lazycodex-ai",
|
|
@@ -7300,9 +7377,9 @@ var PACKAGED_CODEX_INSTALLER_NAMES = new Set([
|
|
|
7300
7377
|
"oh-my-openagent"
|
|
7301
7378
|
]);
|
|
7302
7379
|
async function shouldBuildSourcePackages(repoRoot) {
|
|
7303
|
-
if (existsSync2(
|
|
7380
|
+
if (existsSync2(join13(repoRoot, "packages", "omo-opencode", "src", "index.ts")))
|
|
7304
7381
|
return true;
|
|
7305
|
-
const packageJsonPath =
|
|
7382
|
+
const packageJsonPath = join13(repoRoot, "package.json");
|
|
7306
7383
|
if (!existsSync2(packageJsonPath))
|
|
7307
7384
|
return true;
|
|
7308
7385
|
const packageJson = JSON.parse(await readFile8(packageJsonPath, "utf8"));
|
|
@@ -7318,6 +7395,7 @@ import { dirname as dirname5 } from "node:path";
|
|
|
7318
7395
|
// packages/omo-codex/src/install/toml-section-editor.ts
|
|
7319
7396
|
function findTomlSection(config, header) {
|
|
7320
7397
|
const headerLine = `[${header}]`;
|
|
7398
|
+
const targetHeaderPath = parseTomlDottedKey(header);
|
|
7321
7399
|
const lines = config.match(/[^\n]*\n?|$/g) ?? [];
|
|
7322
7400
|
let offset = 0;
|
|
7323
7401
|
let start = -1;
|
|
@@ -7326,7 +7404,7 @@ function findTomlSection(config, header) {
|
|
|
7326
7404
|
break;
|
|
7327
7405
|
const trimmed = line.trim();
|
|
7328
7406
|
if (start === -1) {
|
|
7329
|
-
if (trimmed
|
|
7407
|
+
if (tomlTableHeaderMatches(trimmed, headerLine, targetHeaderPath))
|
|
7330
7408
|
start = offset;
|
|
7331
7409
|
} else if (trimmed.startsWith("[") && trimmed.endsWith("]")) {
|
|
7332
7410
|
return { start, end: offset, text: config.slice(start, offset) };
|
|
@@ -7382,6 +7460,127 @@ function insertSetting(sectionText, key, value) {
|
|
|
7382
7460
|
function escapeRegExp(value) {
|
|
7383
7461
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
7384
7462
|
}
|
|
7463
|
+
function tomlTableHeaderMatches(line, headerLine, targetHeaderPath) {
|
|
7464
|
+
if (line === headerLine)
|
|
7465
|
+
return true;
|
|
7466
|
+
if (!targetHeaderPath)
|
|
7467
|
+
return false;
|
|
7468
|
+
const candidateHeaderPath = parseTomlTableHeader(line);
|
|
7469
|
+
if (!candidateHeaderPath || candidateHeaderPath.length !== targetHeaderPath.length)
|
|
7470
|
+
return false;
|
|
7471
|
+
return candidateHeaderPath.every((part, index) => part === targetHeaderPath[index]);
|
|
7472
|
+
}
|
|
7473
|
+
function parseTomlTableHeader(line) {
|
|
7474
|
+
if (!line.startsWith("[") || !line.endsWith("]") || line.startsWith("[["))
|
|
7475
|
+
return null;
|
|
7476
|
+
return parseTomlDottedKey(line.slice(1, -1).trim());
|
|
7477
|
+
}
|
|
7478
|
+
function parseTomlDottedKey(input) {
|
|
7479
|
+
const parts = [];
|
|
7480
|
+
let index = 0;
|
|
7481
|
+
while (index < input.length) {
|
|
7482
|
+
index = skipWhitespace(input, index);
|
|
7483
|
+
const parsedKey = parseTomlKeyPart(input, index);
|
|
7484
|
+
if (!parsedKey)
|
|
7485
|
+
return null;
|
|
7486
|
+
parts.push(parsedKey.value);
|
|
7487
|
+
index = skipWhitespace(input, parsedKey.nextIndex);
|
|
7488
|
+
if (index === input.length)
|
|
7489
|
+
return parts;
|
|
7490
|
+
if (input[index] !== ".")
|
|
7491
|
+
return null;
|
|
7492
|
+
index += 1;
|
|
7493
|
+
}
|
|
7494
|
+
return parts.length > 0 ? parts : null;
|
|
7495
|
+
}
|
|
7496
|
+
function parseTomlKeyPart(input, startIndex) {
|
|
7497
|
+
const quote = input[startIndex];
|
|
7498
|
+
if (quote === "'")
|
|
7499
|
+
return parseLiteralTomlString(input, startIndex);
|
|
7500
|
+
if (quote === '"')
|
|
7501
|
+
return parseBasicTomlString(input, startIndex);
|
|
7502
|
+
return parseBareTomlKey(input, startIndex);
|
|
7503
|
+
}
|
|
7504
|
+
function parseLiteralTomlString(input, startIndex) {
|
|
7505
|
+
let index = startIndex + 1;
|
|
7506
|
+
let value = "";
|
|
7507
|
+
while (index < input.length) {
|
|
7508
|
+
const char = input[index];
|
|
7509
|
+
if (char === "'")
|
|
7510
|
+
return { value, nextIndex: index + 1 };
|
|
7511
|
+
value += char;
|
|
7512
|
+
index += 1;
|
|
7513
|
+
}
|
|
7514
|
+
return null;
|
|
7515
|
+
}
|
|
7516
|
+
function parseBasicTomlString(input, startIndex) {
|
|
7517
|
+
let index = startIndex + 1;
|
|
7518
|
+
let value = "";
|
|
7519
|
+
while (index < input.length) {
|
|
7520
|
+
const char = input[index];
|
|
7521
|
+
if (char === '"')
|
|
7522
|
+
return { value, nextIndex: index + 1 };
|
|
7523
|
+
if (char !== "\\") {
|
|
7524
|
+
value += char;
|
|
7525
|
+
index += 1;
|
|
7526
|
+
continue;
|
|
7527
|
+
}
|
|
7528
|
+
const escaped = parseBasicTomlEscape(input, index);
|
|
7529
|
+
if (!escaped)
|
|
7530
|
+
return null;
|
|
7531
|
+
value += escaped.value;
|
|
7532
|
+
index = escaped.nextIndex;
|
|
7533
|
+
}
|
|
7534
|
+
return null;
|
|
7535
|
+
}
|
|
7536
|
+
function parseBasicTomlEscape(input, backslashIndex) {
|
|
7537
|
+
const escape = input[backslashIndex + 1];
|
|
7538
|
+
if (escape === undefined)
|
|
7539
|
+
return null;
|
|
7540
|
+
if (escape === "b")
|
|
7541
|
+
return { value: "\b", nextIndex: backslashIndex + 2 };
|
|
7542
|
+
if (escape === "t")
|
|
7543
|
+
return { value: "\t", nextIndex: backslashIndex + 2 };
|
|
7544
|
+
if (escape === "n")
|
|
7545
|
+
return { value: `
|
|
7546
|
+
`, nextIndex: backslashIndex + 2 };
|
|
7547
|
+
if (escape === "f")
|
|
7548
|
+
return { value: "\f", nextIndex: backslashIndex + 2 };
|
|
7549
|
+
if (escape === "r")
|
|
7550
|
+
return { value: "\r", nextIndex: backslashIndex + 2 };
|
|
7551
|
+
if (escape === '"')
|
|
7552
|
+
return { value: '"', nextIndex: backslashIndex + 2 };
|
|
7553
|
+
if (escape === "\\")
|
|
7554
|
+
return { value: "\\", nextIndex: backslashIndex + 2 };
|
|
7555
|
+
if (escape === "u")
|
|
7556
|
+
return parseUnicodeEscape(input, backslashIndex + 2, 4);
|
|
7557
|
+
if (escape === "U")
|
|
7558
|
+
return parseUnicodeEscape(input, backslashIndex + 2, 8);
|
|
7559
|
+
return null;
|
|
7560
|
+
}
|
|
7561
|
+
function parseUnicodeEscape(input, digitsStart, digitCount) {
|
|
7562
|
+
const digits = input.slice(digitsStart, digitsStart + digitCount);
|
|
7563
|
+
if (digits.length !== digitCount || !/^[0-9A-Fa-f]+$/.test(digits))
|
|
7564
|
+
return null;
|
|
7565
|
+
const codePoint = Number.parseInt(digits, 16);
|
|
7566
|
+
if (codePoint > 1114111)
|
|
7567
|
+
return null;
|
|
7568
|
+
return { value: String.fromCodePoint(codePoint), nextIndex: digitsStart + digitCount };
|
|
7569
|
+
}
|
|
7570
|
+
function parseBareTomlKey(input, startIndex) {
|
|
7571
|
+
let index = startIndex;
|
|
7572
|
+
while (index < input.length && /[A-Za-z0-9_-]/.test(input[index]))
|
|
7573
|
+
index += 1;
|
|
7574
|
+
if (index === startIndex)
|
|
7575
|
+
return null;
|
|
7576
|
+
return { value: input.slice(startIndex, index), nextIndex: index };
|
|
7577
|
+
}
|
|
7578
|
+
function skipWhitespace(input, startIndex) {
|
|
7579
|
+
let index = startIndex;
|
|
7580
|
+
while (index < input.length && /\s/.test(input[index]))
|
|
7581
|
+
index += 1;
|
|
7582
|
+
return index;
|
|
7583
|
+
}
|
|
7385
7584
|
|
|
7386
7585
|
// packages/omo-codex/src/install/codex-config-toml-sections.ts
|
|
7387
7586
|
function removeTomlSections(config, shouldRemove) {
|
|
@@ -7410,27 +7609,18 @@ function splitTomlSections(config) {
|
|
|
7410
7609
|
return sections;
|
|
7411
7610
|
}
|
|
7412
7611
|
function parsePluginHeaderKey(header) {
|
|
7413
|
-
const
|
|
7414
|
-
|
|
7415
|
-
return null;
|
|
7416
|
-
return parseLeadingJsonString(header.slice(prefix.length));
|
|
7612
|
+
const path = parseTomlDottedKey(header);
|
|
7613
|
+
return path?.[0] === "plugins" ? path[1] ?? null : null;
|
|
7417
7614
|
}
|
|
7418
7615
|
function parseAgentHeaderName(header) {
|
|
7419
|
-
const
|
|
7420
|
-
|
|
7421
|
-
return null;
|
|
7422
|
-
const key = header.slice(prefix.length);
|
|
7423
|
-
return key.startsWith('"') ? parseLeadingJsonString(key) : key;
|
|
7616
|
+
const path = parseTomlDottedKey(header);
|
|
7617
|
+
return path?.[0] === "agents" ? path[1] ?? null : null;
|
|
7424
7618
|
}
|
|
7425
|
-
function
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
return typeof parsed === "string" ? parsed : null;
|
|
7429
|
-
} catch (error) {
|
|
7430
|
-
if (error instanceof Error)
|
|
7431
|
-
return null;
|
|
7619
|
+
function parseHookStateHeaderKey(header) {
|
|
7620
|
+
const path = parseTomlDottedKey(header);
|
|
7621
|
+
if (path?.[0] !== "hooks" || path[1] !== "state")
|
|
7432
7622
|
return null;
|
|
7433
|
-
|
|
7623
|
+
return path[2] ?? null;
|
|
7434
7624
|
}
|
|
7435
7625
|
function parseTomlHeader(line) {
|
|
7436
7626
|
const trimmed = line.trim();
|
|
@@ -7438,25 +7628,6 @@ function parseTomlHeader(line) {
|
|
|
7438
7628
|
return null;
|
|
7439
7629
|
return trimmed.slice(1, -1);
|
|
7440
7630
|
}
|
|
7441
|
-
function parseLeadingJsonString(value) {
|
|
7442
|
-
if (!value.startsWith('"'))
|
|
7443
|
-
return parseJsonString(value);
|
|
7444
|
-
let escaped = false;
|
|
7445
|
-
for (let index = 1;index < value.length; index += 1) {
|
|
7446
|
-
const char = value[index];
|
|
7447
|
-
if (escaped) {
|
|
7448
|
-
escaped = false;
|
|
7449
|
-
continue;
|
|
7450
|
-
}
|
|
7451
|
-
if (char === "\\") {
|
|
7452
|
-
escaped = true;
|
|
7453
|
-
continue;
|
|
7454
|
-
}
|
|
7455
|
-
if (char === '"')
|
|
7456
|
-
return parseJsonString(value.slice(0, index + 1));
|
|
7457
|
-
}
|
|
7458
|
-
return null;
|
|
7459
|
-
}
|
|
7460
7631
|
|
|
7461
7632
|
// packages/omo-codex/src/install/codex-config-agents.ts
|
|
7462
7633
|
var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE = ["codex-ultrawork-reviewer"];
|
|
@@ -7500,12 +7671,12 @@ function tomlKeySegment(value) {
|
|
|
7500
7671
|
|
|
7501
7672
|
// packages/omo-codex/src/install/codex-config-atomic-write.ts
|
|
7502
7673
|
import { lstat as lstat5, readlink as readlink3, realpath, rename as rename2, unlink, writeFile as writeFile5 } from "node:fs/promises";
|
|
7503
|
-
import { basename as basename3, dirname as dirname4, isAbsolute as isAbsolute4, join as
|
|
7674
|
+
import { basename as basename3, dirname as dirname4, isAbsolute as isAbsolute4, join as join14, resolve as resolve5 } from "node:path";
|
|
7504
7675
|
var RENAME_RETRY_DELAYS_MS = [10, 25, 50];
|
|
7505
7676
|
var RETRIABLE_RENAME_CODES = new Set(["EPERM", "EBUSY"]);
|
|
7506
7677
|
async function writeFileAtomic(targetPath, data) {
|
|
7507
7678
|
const writeTarget = await resolveSymlinkTarget(targetPath);
|
|
7508
|
-
const temporaryPath =
|
|
7679
|
+
const temporaryPath = join14(dirname4(writeTarget), `.tmp-${basename3(writeTarget)}-${process.pid}-${Date.now()}`);
|
|
7509
7680
|
await writeFile5(temporaryPath, data);
|
|
7510
7681
|
try {
|
|
7511
7682
|
await renameWithRetry(temporaryPath, writeTarget);
|
|
@@ -7593,10 +7764,7 @@ function removeStaleMarketplacePluginBlocks(config, marketplaceName, keepPluginN
|
|
|
7593
7764
|
}
|
|
7594
7765
|
function removeStaleMarketplaceHookStateBlocks(config, marketplaceName, keepPluginNames) {
|
|
7595
7766
|
return removeTomlSections(config, (header) => {
|
|
7596
|
-
const
|
|
7597
|
-
if (!header.startsWith(prefix))
|
|
7598
|
-
return false;
|
|
7599
|
-
const hookKey = parseJsonString(header.slice(prefix.length));
|
|
7767
|
+
const hookKey = parseHookStateHeaderKey(header);
|
|
7600
7768
|
if (hookKey === null)
|
|
7601
7769
|
return false;
|
|
7602
7770
|
const separator = hookKey.indexOf(":");
|
|
@@ -7681,9 +7849,10 @@ enabled = true
|
|
|
7681
7849
|
function ensureOmoBuiltinMcpPolicies(config, input) {
|
|
7682
7850
|
if (input.marketplaceName !== "sisyphuslabs" || !input.pluginNames.includes("omo"))
|
|
7683
7851
|
return config;
|
|
7852
|
+
const codegraphEnabled = input.codegraphMcpEnabled ?? true;
|
|
7684
7853
|
const gitBashEnabled = (input.platform ?? process.platform) === "win32" && input.gitBashEnabled === true;
|
|
7685
7854
|
let nextConfig = ensurePluginMcpEnabled(config, "omo@sisyphuslabs", "context7", true);
|
|
7686
|
-
nextConfig = ensurePluginMcpEnabled(nextConfig, "omo@sisyphuslabs", "codegraph",
|
|
7855
|
+
nextConfig = ensurePluginMcpEnabled(nextConfig, "omo@sisyphuslabs", "codegraph", codegraphEnabled);
|
|
7687
7856
|
nextConfig = ensurePluginMcpEnabled(nextConfig, "omo@sisyphuslabs", "git_bash", gitBashEnabled);
|
|
7688
7857
|
return nextConfig;
|
|
7689
7858
|
}
|
|
@@ -7776,7 +7945,7 @@ function isRootSetting(line, key) {
|
|
|
7776
7945
|
|
|
7777
7946
|
// packages/omo-codex/src/install/codex-model-catalog.ts
|
|
7778
7947
|
import { readFile as readFile9 } from "node:fs/promises";
|
|
7779
|
-
import { join as
|
|
7948
|
+
import { join as join15 } from "node:path";
|
|
7780
7949
|
var FALLBACK_CODEX_MODEL_CATALOG = {
|
|
7781
7950
|
current: {
|
|
7782
7951
|
model: "gpt-5.5",
|
|
@@ -7795,7 +7964,7 @@ var FALLBACK_CODEX_MODEL_CATALOG = {
|
|
|
7795
7964
|
]
|
|
7796
7965
|
};
|
|
7797
7966
|
async function readCodexModelCatalog(codexPackageRoot) {
|
|
7798
|
-
const catalogPath =
|
|
7967
|
+
const catalogPath = join15(codexPackageRoot, "plugin", "model-catalog.json");
|
|
7799
7968
|
try {
|
|
7800
7969
|
const parsed = JSON.parse(await readFile9(catalogPath, "utf8"));
|
|
7801
7970
|
return parseCodexModelCatalog(parsed) ?? FALLBACK_CODEX_MODEL_CATALOG;
|
|
@@ -7926,7 +8095,7 @@ async function exists(path) {
|
|
|
7926
8095
|
// packages/omo-codex/src/install/codex-hook-trust.ts
|
|
7927
8096
|
import { createHash } from "node:crypto";
|
|
7928
8097
|
import { readFile as readFile11 } from "node:fs/promises";
|
|
7929
|
-
import { join as
|
|
8098
|
+
import { join as join16 } from "node:path";
|
|
7930
8099
|
var EVENT_LABELS = new Map([
|
|
7931
8100
|
["PreToolUse", "pre_tool_use"],
|
|
7932
8101
|
["PermissionRequest", "permission_request"],
|
|
@@ -7940,7 +8109,7 @@ var EVENT_LABELS = new Map([
|
|
|
7940
8109
|
["Stop", "stop"]
|
|
7941
8110
|
]);
|
|
7942
8111
|
async function trustedHookStatesForPlugin(input) {
|
|
7943
|
-
const manifestPath =
|
|
8112
|
+
const manifestPath = join16(input.pluginRoot, ".codex-plugin", "plugin.json");
|
|
7944
8113
|
if (!await exists2(manifestPath))
|
|
7945
8114
|
return [];
|
|
7946
8115
|
const manifest = JSON.parse(await readFile11(manifestPath, "utf8"));
|
|
@@ -7948,7 +8117,7 @@ async function trustedHookStatesForPlugin(input) {
|
|
|
7948
8117
|
return [];
|
|
7949
8118
|
const states = [];
|
|
7950
8119
|
for (const hookPath of hookManifestPaths2(manifest.hooks)) {
|
|
7951
|
-
const hooksPath =
|
|
8120
|
+
const hooksPath = join16(input.pluginRoot, hookPath);
|
|
7952
8121
|
if (!await exists2(hooksPath))
|
|
7953
8122
|
continue;
|
|
7954
8123
|
const parsed = JSON.parse(await readFile11(hooksPath, "utf8"));
|
|
@@ -8077,11 +8246,11 @@ function toCodexResolution(resolution) {
|
|
|
8077
8246
|
|
|
8078
8247
|
// packages/omo-codex/src/install/link-cached-plugin-agents.ts
|
|
8079
8248
|
import { copyFile, lstat as lstat7, mkdir as mkdir6, readFile as readFile13, readdir as readdir4, rm as rm6, writeFile as writeFile6 } from "node:fs/promises";
|
|
8080
|
-
import { basename as basename4, join as
|
|
8249
|
+
import { basename as basename4, join as join18 } from "node:path";
|
|
8081
8250
|
|
|
8082
8251
|
// packages/omo-codex/src/install/retired-managed-agent-purge.ts
|
|
8083
8252
|
import { lstat as lstat6, readFile as readFile12, rm as rm5 } from "node:fs/promises";
|
|
8084
|
-
import { join as
|
|
8253
|
+
import { join as join17 } from "node:path";
|
|
8085
8254
|
var RETIRED_MANAGED_AGENT_FILES = [
|
|
8086
8255
|
{
|
|
8087
8256
|
fileName: "codex-ultrawork-reviewer.toml",
|
|
@@ -8093,11 +8262,11 @@ var RETIRED_MANAGED_AGENT_FILES = [
|
|
|
8093
8262
|
}
|
|
8094
8263
|
];
|
|
8095
8264
|
async function purgeRetiredManagedAgentFiles(input) {
|
|
8096
|
-
const agentsDir =
|
|
8265
|
+
const agentsDir = join17(input.codexHome, "agents");
|
|
8097
8266
|
if (!await exists3(agentsDir))
|
|
8098
8267
|
return;
|
|
8099
8268
|
for (const retiredAgent of RETIRED_MANAGED_AGENT_FILES) {
|
|
8100
|
-
const agentPath =
|
|
8269
|
+
const agentPath = join17(agentsDir, retiredAgent.fileName);
|
|
8101
8270
|
if (!await exists3(agentPath))
|
|
8102
8271
|
continue;
|
|
8103
8272
|
const agentStat = await lstat6(agentPath);
|
|
@@ -8140,7 +8309,7 @@ function nodeErrorCode(error) {
|
|
|
8140
8309
|
// packages/omo-codex/src/install/link-cached-plugin-agents.ts
|
|
8141
8310
|
var MANIFEST_FILE = ".installed-agents.json";
|
|
8142
8311
|
async function capturePreservedAgentReasoning(input) {
|
|
8143
|
-
const agentsDir =
|
|
8312
|
+
const agentsDir = join18(input.codexHome, "agents");
|
|
8144
8313
|
if (!await exists4(agentsDir))
|
|
8145
8314
|
return new Map;
|
|
8146
8315
|
const preserved = new Map;
|
|
@@ -8148,7 +8317,7 @@ async function capturePreservedAgentReasoning(input) {
|
|
|
8148
8317
|
for (const entry of agentEntries) {
|
|
8149
8318
|
if (!entry.name.endsWith(".toml"))
|
|
8150
8319
|
continue;
|
|
8151
|
-
const content = await readTextIfExists2(
|
|
8320
|
+
const content = await readTextIfExists2(join18(agentsDir, entry.name));
|
|
8152
8321
|
if (content === null)
|
|
8153
8322
|
continue;
|
|
8154
8323
|
const effort = extractReasoningEffort(content);
|
|
@@ -8158,7 +8327,7 @@ async function capturePreservedAgentReasoning(input) {
|
|
|
8158
8327
|
return preserved;
|
|
8159
8328
|
}
|
|
8160
8329
|
async function capturePreservedAgentServiceTier(input) {
|
|
8161
|
-
const agentsDir =
|
|
8330
|
+
const agentsDir = join18(input.codexHome, "agents");
|
|
8162
8331
|
if (!await exists4(agentsDir))
|
|
8163
8332
|
return new Map;
|
|
8164
8333
|
const preserved = new Map;
|
|
@@ -8166,7 +8335,7 @@ async function capturePreservedAgentServiceTier(input) {
|
|
|
8166
8335
|
for (const entry of agentEntries) {
|
|
8167
8336
|
if (!entry.name.endsWith(".toml"))
|
|
8168
8337
|
continue;
|
|
8169
|
-
const content = await readTextIfExists2(
|
|
8338
|
+
const content = await readTextIfExists2(join18(agentsDir, entry.name));
|
|
8170
8339
|
if (content === null)
|
|
8171
8340
|
continue;
|
|
8172
8341
|
preserved.set(agentNameFromToml(entry.name), extractServiceTier(content));
|
|
@@ -8180,13 +8349,13 @@ async function linkCachedPluginAgents(input) {
|
|
|
8180
8349
|
await writeManifest(input.pluginRoot, []);
|
|
8181
8350
|
return [];
|
|
8182
8351
|
}
|
|
8183
|
-
const agentsDir =
|
|
8352
|
+
const agentsDir = join18(input.codexHome, "agents");
|
|
8184
8353
|
await mkdir6(agentsDir, { recursive: true });
|
|
8185
8354
|
const linked = [];
|
|
8186
8355
|
for (const agentPath of bundledAgents) {
|
|
8187
8356
|
const agentFileName = basename4(agentPath);
|
|
8188
8357
|
const agentName = agentNameFromToml(agentFileName);
|
|
8189
|
-
const linkPath =
|
|
8358
|
+
const linkPath = join18(agentsDir, agentFileName);
|
|
8190
8359
|
await replaceWithCopy(linkPath, agentPath);
|
|
8191
8360
|
await restorePreservedReasoning({
|
|
8192
8361
|
agentName,
|
|
@@ -8216,7 +8385,7 @@ async function restorePreservedServiceTier(input) {
|
|
|
8216
8385
|
await writeFile6(input.linkPath, replacement.content);
|
|
8217
8386
|
}
|
|
8218
8387
|
async function discoverBundledAgents(pluginRoot) {
|
|
8219
|
-
const componentsRoot =
|
|
8388
|
+
const componentsRoot = join18(pluginRoot, "components");
|
|
8220
8389
|
if (!await exists4(componentsRoot))
|
|
8221
8390
|
return [];
|
|
8222
8391
|
const componentEntries = await readdir4(componentsRoot, { withFileTypes: true });
|
|
@@ -8224,14 +8393,14 @@ async function discoverBundledAgents(pluginRoot) {
|
|
|
8224
8393
|
for (const entry of componentEntries) {
|
|
8225
8394
|
if (!entry.isDirectory())
|
|
8226
8395
|
continue;
|
|
8227
|
-
const agentsRoot =
|
|
8396
|
+
const agentsRoot = join18(componentsRoot, entry.name, "agents");
|
|
8228
8397
|
if (!await exists4(agentsRoot))
|
|
8229
8398
|
continue;
|
|
8230
8399
|
const agentEntries = await readdir4(agentsRoot, { withFileTypes: true });
|
|
8231
8400
|
for (const file2 of agentEntries) {
|
|
8232
8401
|
if (!file2.isFile() || !file2.name.endsWith(".toml"))
|
|
8233
8402
|
continue;
|
|
8234
|
-
agents.push(
|
|
8403
|
+
agents.push(join18(agentsRoot, file2.name));
|
|
8235
8404
|
}
|
|
8236
8405
|
}
|
|
8237
8406
|
agents.sort();
|
|
@@ -8251,7 +8420,7 @@ async function prepareReplacement(linkPath) {
|
|
|
8251
8420
|
await rm6(linkPath, { force: true });
|
|
8252
8421
|
}
|
|
8253
8422
|
async function writeManifest(pluginRoot, agentPaths) {
|
|
8254
|
-
const manifestPath =
|
|
8423
|
+
const manifestPath = join18(pluginRoot, MANIFEST_FILE);
|
|
8255
8424
|
const payload = { agents: [...agentPaths].sort() };
|
|
8256
8425
|
await writeFile6(manifestPath, `${JSON.stringify(payload, null, "\t")}
|
|
8257
8426
|
`);
|
|
@@ -8290,7 +8459,7 @@ function extractTopLevelStringSetting(content, key) {
|
|
|
8290
8459
|
const rawValue = topLevelStringSettingRawValue(line, key);
|
|
8291
8460
|
if (rawValue === undefined)
|
|
8292
8461
|
continue;
|
|
8293
|
-
const parsed =
|
|
8462
|
+
const parsed = parseJsonString(rawValue);
|
|
8294
8463
|
if (parsed !== null)
|
|
8295
8464
|
return parsed;
|
|
8296
8465
|
}
|
|
@@ -8351,7 +8520,7 @@ function isSectionHeader2(line) {
|
|
|
8351
8520
|
function agentNameFromToml(fileName) {
|
|
8352
8521
|
return fileName.endsWith(".toml") ? fileName.slice(0, -".toml".length) : fileName;
|
|
8353
8522
|
}
|
|
8354
|
-
function
|
|
8523
|
+
function parseJsonString(value) {
|
|
8355
8524
|
try {
|
|
8356
8525
|
const parsed = JSON.parse(value);
|
|
8357
8526
|
return typeof parsed === "string" ? parsed : null;
|
|
@@ -8379,10 +8548,10 @@ function nodeErrorCode2(error) {
|
|
|
8379
8548
|
|
|
8380
8549
|
// packages/omo-codex/src/install/codex-marketplace.ts
|
|
8381
8550
|
import { readFile as readFile14 } from "node:fs/promises";
|
|
8382
|
-
import { join as
|
|
8551
|
+
import { join as join19 } from "node:path";
|
|
8383
8552
|
var DEFAULT_MARKETPLACE_PATH = "packages/omo-codex/marketplace.json";
|
|
8384
8553
|
async function readMarketplace(repoRoot, options) {
|
|
8385
|
-
const marketplacePath = options?.marketplacePath ??
|
|
8554
|
+
const marketplacePath = options?.marketplacePath ?? join19(repoRoot, DEFAULT_MARKETPLACE_PATH);
|
|
8386
8555
|
const raw = await readFile14(marketplacePath, "utf8");
|
|
8387
8556
|
const parsed = JSON.parse(raw);
|
|
8388
8557
|
if (!isPlainRecord(parsed))
|
|
@@ -8401,10 +8570,10 @@ async function readMarketplace(repoRoot, options) {
|
|
|
8401
8570
|
function resolvePluginSource(repoRoot, plugin, options) {
|
|
8402
8571
|
const sourcePath = localSourcePath(options?.pathOverride ?? plugin.source);
|
|
8403
8572
|
const relativePath = sourcePath.slice(2);
|
|
8404
|
-
return
|
|
8573
|
+
return join19(repoRoot, ...relativePath.split(/[\\/]/));
|
|
8405
8574
|
}
|
|
8406
8575
|
async function readPluginManifest(pluginRoot) {
|
|
8407
|
-
const raw = await readFile14(
|
|
8576
|
+
const raw = await readFile14(join19(pluginRoot, ".codex-plugin", "plugin.json"), "utf8");
|
|
8408
8577
|
const parsed = JSON.parse(raw);
|
|
8409
8578
|
if (!isPlainRecord(parsed))
|
|
8410
8579
|
throw new Error(`${pluginRoot} plugin.json must be an object`);
|
|
@@ -8486,7 +8655,7 @@ function validateLocalSourcePath(path) {
|
|
|
8486
8655
|
|
|
8487
8656
|
// packages/omo-codex/src/install/codex-marketplace-snapshot.ts
|
|
8488
8657
|
import { cp as cp3, mkdir as mkdir7, rename as rename3, rm as rm7, writeFile as writeFile7 } from "node:fs/promises";
|
|
8489
|
-
import { join as
|
|
8658
|
+
import { join as join20, sep as sep6 } from "node:path";
|
|
8490
8659
|
var INSTALLED_MARKETPLACES_DIR = ".tmp/marketplaces";
|
|
8491
8660
|
async function writeInstalledMarketplaceSnapshot(input) {
|
|
8492
8661
|
const marketplaceRoot = installedMarketplaceRoot(input.codexHome, input.marketplace.name);
|
|
@@ -8499,21 +8668,21 @@ async function writeInstalledMarketplaceSnapshot(input) {
|
|
|
8499
8668
|
return snapshotPlugins;
|
|
8500
8669
|
}
|
|
8501
8670
|
function installedMarketplaceRoot(codexHome, marketplaceName) {
|
|
8502
|
-
return
|
|
8671
|
+
return join20(codexHome, INSTALLED_MARKETPLACES_DIR, marketplaceName);
|
|
8503
8672
|
}
|
|
8504
8673
|
async function writeMarketplaceManifest(marketplaceRoot, marketplace) {
|
|
8505
|
-
const manifestDir =
|
|
8674
|
+
const manifestDir = join20(marketplaceRoot, ".agents", "plugins");
|
|
8506
8675
|
await mkdir7(manifestDir, { recursive: true });
|
|
8507
|
-
const tempPath =
|
|
8676
|
+
const tempPath = join20(manifestDir, `.marketplace-${process.pid}-${Date.now()}.json.tmp`);
|
|
8508
8677
|
await writeFile7(tempPath, `${JSON.stringify(marketplace, null, "\t")}
|
|
8509
8678
|
`);
|
|
8510
|
-
await rename3(tempPath,
|
|
8679
|
+
await rename3(tempPath, join20(manifestDir, "marketplace.json"));
|
|
8511
8680
|
}
|
|
8512
8681
|
async function writeSnapshotPlugin(marketplaceRoot, plugin) {
|
|
8513
|
-
const pluginsDir =
|
|
8682
|
+
const pluginsDir = join20(marketplaceRoot, "plugins");
|
|
8514
8683
|
await mkdir7(pluginsDir, { recursive: true });
|
|
8515
|
-
const targetPath =
|
|
8516
|
-
const tempPath =
|
|
8684
|
+
const targetPath = join20(pluginsDir, plugin.name);
|
|
8685
|
+
const tempPath = join20(pluginsDir, `.tmp-${plugin.name}-${process.pid}-${Date.now()}`);
|
|
8517
8686
|
await rm7(tempPath, { recursive: true, force: true });
|
|
8518
8687
|
await cp3(plugin.sourcePath, tempPath, {
|
|
8519
8688
|
recursive: true,
|
|
@@ -8535,10 +8704,10 @@ function shouldCopyMarketplaceSourcePath(path, root) {
|
|
|
8535
8704
|
|
|
8536
8705
|
// packages/omo-codex/src/install/lazycodex-version-stamp.ts
|
|
8537
8706
|
import { readdir as readdir5, readFile as readFile15, writeFile as writeFile8 } from "node:fs/promises";
|
|
8538
|
-
import { join as
|
|
8707
|
+
import { join as join21 } from "node:path";
|
|
8539
8708
|
async function readDistributionManifest(repoRoot) {
|
|
8540
8709
|
try {
|
|
8541
|
-
const parsed = JSON.parse(await readFile15(
|
|
8710
|
+
const parsed = JSON.parse(await readFile15(join21(repoRoot, "package.json"), "utf8"));
|
|
8542
8711
|
if (!isPlainRecord(parsed) || typeof parsed.version !== "string" || parsed.version.trim().length === 0)
|
|
8543
8712
|
return;
|
|
8544
8713
|
return {
|
|
@@ -8558,19 +8727,19 @@ function resolveLazyCodexPluginVersion(input) {
|
|
|
8558
8727
|
return input.manifestVersion ?? "local";
|
|
8559
8728
|
}
|
|
8560
8729
|
async function stampLazyCodexPluginVersion(input) {
|
|
8561
|
-
const manifestPath =
|
|
8730
|
+
const manifestPath = join21(input.pluginRoot, ".codex-plugin", "plugin.json");
|
|
8562
8731
|
const hookPaths = await readPluginHookPaths(manifestPath);
|
|
8563
8732
|
await stampJsonVersion(manifestPath, input.version);
|
|
8564
|
-
await stampJsonVersion(
|
|
8733
|
+
await stampJsonVersion(join21(input.pluginRoot, "package.json"), input.version);
|
|
8565
8734
|
for (const hookPath of hookPaths) {
|
|
8566
|
-
await stampHookStatusMessages(
|
|
8735
|
+
await stampHookStatusMessages(join21(input.pluginRoot, hookPath), input.version);
|
|
8567
8736
|
}
|
|
8568
8737
|
await stampComponentVersions(input);
|
|
8569
8738
|
}
|
|
8570
8739
|
async function writeLazyCodexInstallSnapshot(input) {
|
|
8571
8740
|
if (input.distributionManifest === undefined)
|
|
8572
8741
|
return;
|
|
8573
|
-
await writeFile8(
|
|
8742
|
+
await writeFile8(join21(input.pluginRoot, "lazycodex-install.json"), `${JSON.stringify({
|
|
8574
8743
|
packageName: input.distributionManifest.name,
|
|
8575
8744
|
version: input.distributionManifest.version
|
|
8576
8745
|
}, null, "\t")}
|
|
@@ -8627,16 +8796,16 @@ async function stampHookStatusMessages(path, version) {
|
|
|
8627
8796
|
async function stampComponentVersions(input) {
|
|
8628
8797
|
let entries;
|
|
8629
8798
|
try {
|
|
8630
|
-
entries = await readdir5(
|
|
8799
|
+
entries = await readdir5(join21(input.pluginRoot, "components"));
|
|
8631
8800
|
} catch (error) {
|
|
8632
8801
|
if (error instanceof Error)
|
|
8633
8802
|
return;
|
|
8634
8803
|
throw error;
|
|
8635
8804
|
}
|
|
8636
8805
|
for (const entry of entries) {
|
|
8637
|
-
const componentRoot =
|
|
8638
|
-
await stampJsonVersion(
|
|
8639
|
-
await stampHookStatusMessages(
|
|
8806
|
+
const componentRoot = join21(input.pluginRoot, "components", entry);
|
|
8807
|
+
await stampJsonVersion(join21(componentRoot, "package.json"), input.version);
|
|
8808
|
+
await stampHookStatusMessages(join21(componentRoot, "hooks", "hooks.json"), input.version);
|
|
8640
8809
|
}
|
|
8641
8810
|
}
|
|
8642
8811
|
function stampHookGroups(hooks, version) {
|
|
@@ -8662,7 +8831,7 @@ function stampHookStatusMessage(hook, version) {
|
|
|
8662
8831
|
|
|
8663
8832
|
// packages/omo-codex/src/install/codex-project-local-cleanup.ts
|
|
8664
8833
|
import { copyFile as copyFile2, lstat as lstat8, readFile as readFile16, writeFile as writeFile9 } from "node:fs/promises";
|
|
8665
|
-
import { dirname as dirname6, join as
|
|
8834
|
+
import { dirname as dirname6, join as join22, resolve as resolve6 } from "node:path";
|
|
8666
8835
|
var LEGACY_AGENT_CONFLICT_KEYS = ["max_threads"];
|
|
8667
8836
|
var PROJECT_LOCAL_ARTIFACT_PATHS = [
|
|
8668
8837
|
".codex/hooks.json",
|
|
@@ -8765,17 +8934,17 @@ async function findProjectLocalCodexConfigs(startDirectory, codexHome) {
|
|
|
8765
8934
|
if (startDirectoryStat !== null && !startDirectoryStat.isDirectory()) {
|
|
8766
8935
|
throw new ProjectLocalCleanupStartDirectoryError(startDirectory);
|
|
8767
8936
|
}
|
|
8768
|
-
const codexHomeConfigPath = codexHome === undefined ? null :
|
|
8937
|
+
const codexHomeConfigPath = codexHome === undefined ? null : join22(resolve6(codexHome), "config.toml");
|
|
8769
8938
|
let current = resolve6(startDirectory);
|
|
8770
8939
|
const configPathsFromCwd = [];
|
|
8771
8940
|
while (true) {
|
|
8772
|
-
const configPath =
|
|
8941
|
+
const configPath = join22(current, ".codex", "config.toml");
|
|
8773
8942
|
if (await isRegularProjectLocalConfig(current, configPath)) {
|
|
8774
8943
|
if (codexHomeConfigPath === null || resolve6(configPath) !== codexHomeConfigPath) {
|
|
8775
8944
|
configPathsFromCwd.push(configPath);
|
|
8776
8945
|
}
|
|
8777
8946
|
}
|
|
8778
|
-
if (await exists5(
|
|
8947
|
+
if (await exists5(join22(current, ".git"))) {
|
|
8779
8948
|
return configPathsFromCwd.length === 0 ? null : {
|
|
8780
8949
|
projectRoot: current,
|
|
8781
8950
|
configPaths: [...configPathsFromCwd].reverse(),
|
|
@@ -8795,7 +8964,7 @@ async function findProjectLocalCodexConfigs(startDirectory, codexHome) {
|
|
|
8795
8964
|
}
|
|
8796
8965
|
}
|
|
8797
8966
|
async function isRegularProjectLocalConfig(directory, configPath) {
|
|
8798
|
-
const codexDirStat = await maybeLstat(
|
|
8967
|
+
const codexDirStat = await maybeLstat(join22(directory, ".codex"));
|
|
8799
8968
|
if (codexDirStat === null || !codexDirStat.isDirectory() || codexDirStat.isSymbolicLink())
|
|
8800
8969
|
return false;
|
|
8801
8970
|
const configStat = await maybeLstat(configPath);
|
|
@@ -8815,7 +8984,7 @@ async function collectProjectLocalArtifacts(projectRoots) {
|
|
|
8815
8984
|
const seenPaths = new Set;
|
|
8816
8985
|
for (const projectRoot of projectRoots) {
|
|
8817
8986
|
for (const relativePath of PROJECT_LOCAL_ARTIFACT_PATHS) {
|
|
8818
|
-
const artifactPath =
|
|
8987
|
+
const artifactPath = join22(projectRoot, relativePath);
|
|
8819
8988
|
if (seenPaths.has(artifactPath))
|
|
8820
8989
|
continue;
|
|
8821
8990
|
const entryStat = await maybeLstat(artifactPath);
|
|
@@ -8892,11 +9061,11 @@ function formatUnknownError(error) {
|
|
|
8892
9061
|
// packages/omo-codex/src/install/lsp-daemon-reaper.ts
|
|
8893
9062
|
import { readFile as readFile17, readdir as readdir6, rm as rm8 } from "node:fs/promises";
|
|
8894
9063
|
import { connect } from "node:net";
|
|
8895
|
-
import { join as
|
|
9064
|
+
import { join as join23 } from "node:path";
|
|
8896
9065
|
async function reapLspDaemons(codexHome, deps = {}) {
|
|
8897
9066
|
const killProcess = deps.killProcess ?? sendSigterm;
|
|
8898
9067
|
const isDaemonLive = deps.isDaemonLive ?? probeSocketLive;
|
|
8899
|
-
const daemonRoot =
|
|
9068
|
+
const daemonRoot = join23(codexHome, "codex-lsp", "daemon");
|
|
8900
9069
|
const reaped = [];
|
|
8901
9070
|
let entries;
|
|
8902
9071
|
try {
|
|
@@ -8905,9 +9074,9 @@ async function reapLspDaemons(codexHome, deps = {}) {
|
|
|
8905
9074
|
return reaped;
|
|
8906
9075
|
}
|
|
8907
9076
|
for (const entry of entries) {
|
|
8908
|
-
const versionDir =
|
|
8909
|
-
const pid = await readPidFile(
|
|
8910
|
-
const socketPath = await readEndpointFile(
|
|
9077
|
+
const versionDir = join23(daemonRoot, entry);
|
|
9078
|
+
const pid = await readPidFile(join23(versionDir, "daemon.pid"));
|
|
9079
|
+
const socketPath = await readEndpointFile(join23(versionDir, "daemon.endpoint"));
|
|
8911
9080
|
if (pid !== null && socketPath !== null && await isDaemonLive(socketPath) && killProcess(pid)) {
|
|
8912
9081
|
reaped.push(pid);
|
|
8913
9082
|
}
|
|
@@ -8961,7 +9130,7 @@ function sendSigterm(pid) {
|
|
|
8961
9130
|
|
|
8962
9131
|
// packages/omo-codex/src/install/codex-installer-bin-dir.ts
|
|
8963
9132
|
import { homedir } from "node:os";
|
|
8964
|
-
import { join as
|
|
9133
|
+
import { join as join24, resolve as resolve7 } from "node:path";
|
|
8965
9134
|
function resolveCodexInstallerBinDir(input) {
|
|
8966
9135
|
const explicitBinDir = input.binDir ?? input.env?.CODEX_LOCAL_BIN_DIR;
|
|
8967
9136
|
if (explicitBinDir !== undefined && explicitBinDir.trim().length > 0)
|
|
@@ -8970,15 +9139,15 @@ function resolveCodexInstallerBinDir(input) {
|
|
|
8970
9139
|
const defaultCodexHome = resolve7(homeDir, ".codex");
|
|
8971
9140
|
const resolvedCodexHome = resolve7(input.codexHome);
|
|
8972
9141
|
if (resolvedCodexHome !== defaultCodexHome)
|
|
8973
|
-
return
|
|
9142
|
+
return join24(resolvedCodexHome, "bin");
|
|
8974
9143
|
return resolve7(homeDir, ".local", "bin");
|
|
8975
9144
|
}
|
|
8976
9145
|
|
|
8977
9146
|
// packages/omo-codex/src/install/omo-sot-migration.ts
|
|
8978
|
-
import { join as
|
|
9147
|
+
import { join as join25 } from "node:path";
|
|
8979
9148
|
async function seedAndMigrateOmoSot(input) {
|
|
8980
9149
|
const commandEnv = { ...input.env };
|
|
8981
|
-
const scriptPath =
|
|
9150
|
+
const scriptPath = join25(input.repoRoot, "packages", "omo-codex", "plugin", "scripts", "migrate-omo-sot.mjs");
|
|
8982
9151
|
try {
|
|
8983
9152
|
await input.runCommand(process.execPath, [scriptPath, "--seed"], {
|
|
8984
9153
|
cwd: input.repoRoot,
|
|
@@ -8992,7 +9161,7 @@ async function seedAndMigrateOmoSot(input) {
|
|
|
8992
9161
|
}
|
|
8993
9162
|
|
|
8994
9163
|
// packages/omo-codex/src/install/install-ast-grep-sg.ts
|
|
8995
|
-
import { join as
|
|
9164
|
+
import { join as join28 } from "node:path";
|
|
8996
9165
|
|
|
8997
9166
|
// packages/utils/src/deep-merge.ts
|
|
8998
9167
|
var DANGEROUS_KEYS = new Set(["__proto__", "constructor", "prototype"]);
|
|
@@ -11964,11 +12133,11 @@ function runtimeSlug(platform = process.platform, arch = process.arch) {
|
|
|
11964
12133
|
// packages/utils/src/ast-grep/install-script.ts
|
|
11965
12134
|
import { spawn as spawn3 } from "node:child_process";
|
|
11966
12135
|
import { existsSync as existsSync3 } from "node:fs";
|
|
11967
|
-
import { join as
|
|
12136
|
+
import { join as join26 } from "node:path";
|
|
11968
12137
|
var AST_GREP_BIN_DIR_ENV_KEY = "OMO_AST_GREP_BIN_DIR";
|
|
11969
12138
|
var AST_GREP_INSTALL_TIMEOUT_MS = 30000;
|
|
11970
12139
|
function astGrepRuntimeDir(baseDir, platform = process.platform, arch = process.arch) {
|
|
11971
|
-
return
|
|
12140
|
+
return join26(baseDir, "runtime", "ast-grep", runtimeSlug(platform, arch));
|
|
11972
12141
|
}
|
|
11973
12142
|
function isMissingExecutable(error) {
|
|
11974
12143
|
if (!("code" in error))
|
|
@@ -12006,7 +12175,7 @@ function defaultSpawnProcess(command, args, options) {
|
|
|
12006
12175
|
};
|
|
12007
12176
|
}
|
|
12008
12177
|
function scriptPathForPlatform(skillDir, platform) {
|
|
12009
|
-
return
|
|
12178
|
+
return join26(skillDir, platform === "win32" ? "install.ps1" : "install.sh");
|
|
12010
12179
|
}
|
|
12011
12180
|
function invocationsForPlatform(scriptPath, platform) {
|
|
12012
12181
|
if (platform !== "win32")
|
|
@@ -12063,13 +12232,111 @@ async function runAstGrepSkillInstall(options) {
|
|
|
12063
12232
|
return { kind: "failed", reason: String(error) };
|
|
12064
12233
|
}
|
|
12065
12234
|
}
|
|
12235
|
+
// packages/utils/src/codegraph/node-support.ts
|
|
12236
|
+
var CODEGRAPH_MIN_NODE_MAJOR = 20;
|
|
12237
|
+
var CODEGRAPH_BLOCKED_NODE_MAJOR = 25;
|
|
12238
|
+
var CODEGRAPH_UNSAFE_NODE_ENV = "CODEGRAPH_ALLOW_UNSAFE_NODE";
|
|
12239
|
+
var CODEGRAPH_NODE_BIN_ENV = "CODEGRAPH_NODE_BIN";
|
|
12240
|
+
function evaluateCodegraphNodeSupport(options = {}) {
|
|
12241
|
+
const nodeVersion = options.nodeVersion ?? process.versions.node;
|
|
12242
|
+
const env = options.env ?? process.env;
|
|
12243
|
+
const override = (env[CODEGRAPH_UNSAFE_NODE_ENV]?.trim().length ?? 0) > 0;
|
|
12244
|
+
const major = parseNodeMajor(nodeVersion);
|
|
12245
|
+
if (major >= CODEGRAPH_BLOCKED_NODE_MAJOR) {
|
|
12246
|
+
return { major, override, reason: "too-new", supported: override };
|
|
12247
|
+
}
|
|
12248
|
+
if (major < CODEGRAPH_MIN_NODE_MAJOR) {
|
|
12249
|
+
return { major, override, reason: "too-old", supported: override };
|
|
12250
|
+
}
|
|
12251
|
+
return { major, override, supported: true };
|
|
12252
|
+
}
|
|
12253
|
+
function parseNodeMajor(version) {
|
|
12254
|
+
const normalized = version.startsWith("v") ? version.slice(1) : version;
|
|
12255
|
+
const major = Number.parseInt(normalized.split(".")[0] ?? "", 10);
|
|
12256
|
+
return Number.isNaN(major) ? 0 : major;
|
|
12257
|
+
}
|
|
12066
12258
|
// packages/utils/src/codegraph/provision.ts
|
|
12067
12259
|
import { execFile } from "node:child_process";
|
|
12068
12260
|
import { promisify } from "node:util";
|
|
12069
12261
|
var execFileAsync = promisify(execFile);
|
|
12070
12262
|
// packages/utils/src/codegraph/resolve.ts
|
|
12263
|
+
import { existsSync as existsSync4 } from "node:fs";
|
|
12264
|
+
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
12265
|
+
import { basename as basename5, dirname as dirname7, join as join27 } from "node:path";
|
|
12071
12266
|
import { createRequire } from "node:module";
|
|
12267
|
+
var CODEGRAPH_NODE_CANDIDATES = ["node24", "node22", "node20", "node"];
|
|
12072
12268
|
var requireFromHere = createRequire(import.meta.url);
|
|
12269
|
+
function defaultNodeVersion(nodePath) {
|
|
12270
|
+
if (nodePath === process.execPath && isNodeExecutableName(nodePath))
|
|
12271
|
+
return process.versions.node;
|
|
12272
|
+
try {
|
|
12273
|
+
const result = spawnSync2(nodePath, ["--version"], {
|
|
12274
|
+
encoding: "utf8",
|
|
12275
|
+
timeout: 2000,
|
|
12276
|
+
windowsHide: true
|
|
12277
|
+
});
|
|
12278
|
+
if (result.error !== undefined || result.status !== 0)
|
|
12279
|
+
return null;
|
|
12280
|
+
const version = `${result.stdout}
|
|
12281
|
+
${result.stderr}`.trim().split(/\s+/)[0];
|
|
12282
|
+
return version === undefined || version.length === 0 ? null : version;
|
|
12283
|
+
} catch (error) {
|
|
12284
|
+
if (error instanceof Error)
|
|
12285
|
+
return null;
|
|
12286
|
+
throw error;
|
|
12287
|
+
}
|
|
12288
|
+
}
|
|
12289
|
+
function isNodeExecutableName(filePath) {
|
|
12290
|
+
const executable = basename5(filePath).toLowerCase();
|
|
12291
|
+
return executable === "node" || executable === "node.exe" || /^node\d+(\.exe)?$/.test(executable);
|
|
12292
|
+
}
|
|
12293
|
+
function looksLikePath(command) {
|
|
12294
|
+
return command.includes("/") || command.includes("\\") || /^[a-zA-Z]:/.test(command);
|
|
12295
|
+
}
|
|
12296
|
+
function resolveConfiguredNodeRuntime(configured, fileExists, which2) {
|
|
12297
|
+
if (looksLikePath(configured))
|
|
12298
|
+
return fileExists(configured) ? configured : null;
|
|
12299
|
+
return which2(configured);
|
|
12300
|
+
}
|
|
12301
|
+
function supportsCodegraphNodeRuntime(nodePath, env, nodeVersion) {
|
|
12302
|
+
const version = nodeVersion(nodePath);
|
|
12303
|
+
if (version === null)
|
|
12304
|
+
return false;
|
|
12305
|
+
return evaluateCodegraphNodeSupport({ env, nodeVersion: version }).supported;
|
|
12306
|
+
}
|
|
12307
|
+
function defaultNodeRuntime(env, fileExists, which2, nodeVersion) {
|
|
12308
|
+
const configured = env[CODEGRAPH_NODE_BIN_ENV]?.trim();
|
|
12309
|
+
if (configured !== undefined && configured.length > 0) {
|
|
12310
|
+
const resolved = resolveConfiguredNodeRuntime(configured, fileExists, which2);
|
|
12311
|
+
return resolved !== null && supportsCodegraphNodeRuntime(resolved, env, nodeVersion) ? resolved : null;
|
|
12312
|
+
}
|
|
12313
|
+
const candidates = [
|
|
12314
|
+
...isNodeExecutableName(process.execPath) ? [process.execPath] : [],
|
|
12315
|
+
...CODEGRAPH_NODE_CANDIDATES.map((commandName) => which2(commandName)).filter((candidate) => candidate !== null)
|
|
12316
|
+
];
|
|
12317
|
+
const seen = new Set;
|
|
12318
|
+
for (const candidate of candidates) {
|
|
12319
|
+
if (seen.has(candidate))
|
|
12320
|
+
continue;
|
|
12321
|
+
seen.add(candidate);
|
|
12322
|
+
if (supportsCodegraphNodeRuntime(candidate, env, nodeVersion))
|
|
12323
|
+
return candidate;
|
|
12324
|
+
}
|
|
12325
|
+
return null;
|
|
12326
|
+
}
|
|
12327
|
+
function resolveCodegraphNodeRuntime(options = {}) {
|
|
12328
|
+
const env = options.env ?? process.env;
|
|
12329
|
+
return defaultNodeRuntime(env, options.fileExists ?? existsSync4, options.which ?? bunWhich, options.nodeVersion ?? defaultNodeVersion);
|
|
12330
|
+
}
|
|
12331
|
+
function resolveCodegraphNodeSupport(options = {}) {
|
|
12332
|
+
const env = options.env ?? process.env;
|
|
12333
|
+
const nodeVersion = options.nodeVersion ?? defaultNodeVersion;
|
|
12334
|
+
const runtime3 = resolveCodegraphNodeRuntime({ ...options, env, nodeVersion });
|
|
12335
|
+
if (runtime3 === null) {
|
|
12336
|
+
return evaluateCodegraphNodeSupport({ env, nodeVersion: "0.0.0" });
|
|
12337
|
+
}
|
|
12338
|
+
return evaluateCodegraphNodeSupport({ env, nodeVersion: nodeVersion(runtime3) ?? "0.0.0" });
|
|
12339
|
+
}
|
|
12073
12340
|
// packages/utils/src/command-executor/execute-command.ts
|
|
12074
12341
|
import { exec } from "node:child_process";
|
|
12075
12342
|
import { promisify as promisify2 } from "node:util";
|
|
@@ -12774,7 +13041,7 @@ async function installAstGrepForCodex(options) {
|
|
|
12774
13041
|
return;
|
|
12775
13042
|
const platform = options.platform ?? process.platform;
|
|
12776
13043
|
const targetDir = astGrepRuntimeDir(options.codexHome, platform, options.arch ?? process.arch);
|
|
12777
|
-
const skillDir =
|
|
13044
|
+
const skillDir = join28(plugin.path, "skills", "ast-grep");
|
|
12778
13045
|
const installer = options.installer ?? runAstGrepSkillInstall;
|
|
12779
13046
|
try {
|
|
12780
13047
|
const result = await installer({ platform, skillDir, targetDir });
|
|
@@ -12807,7 +13074,7 @@ async function runCodexInstaller(options = {}) {
|
|
|
12807
13074
|
const env3 = options.env ?? process.env;
|
|
12808
13075
|
const platform = options.platform ?? process.platform;
|
|
12809
13076
|
const repoRoot = resolve10(options.repoRoot ?? findRepoRoot({ importerDir: import.meta.dir, env: env3 }));
|
|
12810
|
-
const codexHome = resolve10(options.codexHome ?? env3.CODEX_HOME ??
|
|
13077
|
+
const codexHome = resolve10(options.codexHome ?? env3.CODEX_HOME ?? join31(homedir2(), ".codex"));
|
|
12811
13078
|
const projectDirectory = resolve10(options.projectDirectory ?? env3.OMO_CODEX_PROJECT ?? process.cwd());
|
|
12812
13079
|
const binDir = resolveCodexInstallerBinDir({ binDir: options.binDir, codexHome, env: env3 });
|
|
12813
13080
|
const runCommand = options.runCommand ?? defaultRunCommand;
|
|
@@ -12825,9 +13092,9 @@ async function runCodexInstaller(options = {}) {
|
|
|
12825
13092
|
if (!gitBashResolution.found) {
|
|
12826
13093
|
throw new Error(gitBashResolution.installHint);
|
|
12827
13094
|
}
|
|
12828
|
-
const codexPackageRoot =
|
|
13095
|
+
const codexPackageRoot = join31(repoRoot, "packages", "omo-codex");
|
|
12829
13096
|
const marketplace = await readMarketplace(repoRoot, {
|
|
12830
|
-
marketplacePath:
|
|
13097
|
+
marketplacePath: join31(codexPackageRoot, "marketplace.json")
|
|
12831
13098
|
});
|
|
12832
13099
|
const distributionManifest = await readDistributionManifest(repoRoot);
|
|
12833
13100
|
const installed = [];
|
|
@@ -12869,7 +13136,7 @@ async function runCodexInstaller(options = {}) {
|
|
|
12869
13136
|
if (runtimeLink !== null)
|
|
12870
13137
|
log2(`Linked ${runtimeLink.name} -> ${runtimeLink.target}`);
|
|
12871
13138
|
else
|
|
12872
|
-
log2(`Warning: skipped the omo runtime wrapper because ${
|
|
13139
|
+
log2(`Warning: skipped the omo runtime wrapper because ${join31(repoRoot, "dist", "cli", "index.js")} is missing; omo sparkshell/ulw-loop commands will be unavailable until a package shipping dist/cli is installed`);
|
|
12873
13140
|
}
|
|
12874
13141
|
pluginSources.push({ name: entry.name, sourcePath });
|
|
12875
13142
|
installed.push(plugin);
|
|
@@ -12922,13 +13189,13 @@ async function runCodexInstaller(options = {}) {
|
|
|
12922
13189
|
});
|
|
12923
13190
|
}
|
|
12924
13191
|
await reapLspDaemons(codexHome).catch(() => []);
|
|
12925
|
-
const marketplaceRoot =
|
|
13192
|
+
const marketplaceRoot = join31(codexHome, "plugins", "cache", marketplace.name);
|
|
12926
13193
|
await writeCachedMarketplaceManifest({
|
|
12927
13194
|
marketplaceName: marketplace.name,
|
|
12928
13195
|
marketplaceRoot,
|
|
12929
13196
|
plugins: installed
|
|
12930
13197
|
});
|
|
12931
|
-
const configPath =
|
|
13198
|
+
const configPath = join31(codexHome, "config.toml");
|
|
12932
13199
|
await updateCodexConfig({
|
|
12933
13200
|
configPath,
|
|
12934
13201
|
repoRoot: codexPackageRoot,
|
|
@@ -12936,6 +13203,7 @@ async function runCodexInstaller(options = {}) {
|
|
|
12936
13203
|
marketplaceSource: codexMarketplaceSource(marketplaceRoot),
|
|
12937
13204
|
pluginNames: marketplace.plugins.map((plugin) => plugin.name),
|
|
12938
13205
|
platform,
|
|
13206
|
+
codegraphMcpEnabled: options.codegraphMcpEnabled ?? resolveCodegraphNodeSupport({ env: env3 }).supported,
|
|
12939
13207
|
gitBashEnabled: platform === "win32" && gitBashResolution.found,
|
|
12940
13208
|
trustedHookStates,
|
|
12941
13209
|
agentConfigs: [...agentConfigs.values()].sort((left, right) => left.name.localeCompare(right.name)),
|
|
@@ -12987,7 +13255,7 @@ function findRepoRootFromImporter(importerDir) {
|
|
|
12987
13255
|
for (let depth = 0;depth <= 7; depth += 1) {
|
|
12988
13256
|
if (isRepoRootWithCodexPlugin(current))
|
|
12989
13257
|
return current;
|
|
12990
|
-
for (const wrapperPackageRoot of [
|
|
13258
|
+
for (const wrapperPackageRoot of [join31(current, "node_modules", "oh-my-openagent"), join31(current, "oh-my-openagent")]) {
|
|
12991
13259
|
if (isRepoRootWithCodexPlugin(wrapperPackageRoot))
|
|
12992
13260
|
return wrapperPackageRoot;
|
|
12993
13261
|
}
|
|
@@ -13005,7 +13273,7 @@ function findRepoRoot(input) {
|
|
|
13005
13273
|
return findRepoRootFromImporter(input.importerDir);
|
|
13006
13274
|
}
|
|
13007
13275
|
function isRepoRootWithCodexPlugin(repoRoot) {
|
|
13008
|
-
return
|
|
13276
|
+
return existsSync7(join31(repoRoot, "packages", "omo-codex", "plugin", ".codex-plugin", "plugin.json"));
|
|
13009
13277
|
}
|
|
13010
13278
|
function codexMarketplaceSource(marketplaceRoot) {
|
|
13011
13279
|
return { sourceType: "local", source: marketplaceRoot };
|
|
@@ -13175,22 +13443,28 @@ function formatLazyCodexInstallHelp() {
|
|
|
13175
13443
|
"`uninstall` removes managed Codex Light state; `cleanup` is a backward-compatible alias.",
|
|
13176
13444
|
"`update` refreshes the installed Codex Light edition in place.",
|
|
13177
13445
|
"",
|
|
13178
|
-
`
|
|
13446
|
+
`Commands supported by lazycodex-ai: ${passthrough}.`,
|
|
13447
|
+
"`doctor` runs the Codex LazyCodex doctor workflow; other pass-through commands delegate to the omo CLI."
|
|
13179
13448
|
].join(`
|
|
13180
13449
|
`);
|
|
13181
13450
|
}
|
|
13182
13451
|
|
|
13183
13452
|
// packages/omo-codex/src/install/lazycodex-delegated-command.ts
|
|
13184
13453
|
async function runDelegatedOmoCommand(parsed, options) {
|
|
13454
|
+
if (parsed.command === "doctor" && process.env.LAZYCODEX_DOCTOR_LCX_ACTIVE === "1") {
|
|
13455
|
+
throw new Error("Refusing recursive lazycodex doctor invocation from inside $omo:lcx-doctor");
|
|
13456
|
+
}
|
|
13185
13457
|
const invocation = buildDelegatedOmoInvocation(parsed);
|
|
13186
13458
|
if (parsed.dryRun) {
|
|
13187
|
-
options.log(
|
|
13459
|
+
options.log(formatShellCommand(invocation.command, invocation.args));
|
|
13188
13460
|
return;
|
|
13189
13461
|
}
|
|
13190
|
-
const env3 = { ...process.env, OMO_INVOCATION_NAME: "omo" };
|
|
13462
|
+
const env3 = invocation.delegatesToOmo ? { ...process.env, OMO_INVOCATION_NAME: "omo", ...invocation.env } : { ...process.env, ...invocation.env };
|
|
13191
13463
|
await options.runCommand(invocation.command, invocation.args, { cwd: options.cwd, env: env3 });
|
|
13192
13464
|
}
|
|
13193
13465
|
function buildDelegatedOmoInvocation(parsed) {
|
|
13466
|
+
if (parsed.command === "doctor")
|
|
13467
|
+
return buildLazyCodexDoctorInvocation(parsed.args);
|
|
13194
13468
|
const args = ["--yes", "--package", "oh-my-openagent", "omo", parsed.command];
|
|
13195
13469
|
if (parsed.command === "install") {
|
|
13196
13470
|
args.push("--platform=codex");
|
|
@@ -13209,18 +13483,61 @@ function buildDelegatedOmoInvocation(parsed) {
|
|
|
13209
13483
|
} else {
|
|
13210
13484
|
args.push(...parsed.args);
|
|
13211
13485
|
}
|
|
13212
|
-
return { command: "npx", args };
|
|
13486
|
+
return { command: "npx", args, delegatesToOmo: true };
|
|
13487
|
+
}
|
|
13488
|
+
function buildLazyCodexDoctorInvocation(doctorArgs) {
|
|
13489
|
+
return {
|
|
13490
|
+
command: "codex",
|
|
13491
|
+
args: [
|
|
13492
|
+
"exec",
|
|
13493
|
+
"--ephemeral",
|
|
13494
|
+
"--sandbox",
|
|
13495
|
+
"read-only",
|
|
13496
|
+
"--skip-git-repo-check",
|
|
13497
|
+
"--cd",
|
|
13498
|
+
".",
|
|
13499
|
+
buildLazyCodexDoctorPrompt(doctorArgs)
|
|
13500
|
+
],
|
|
13501
|
+
delegatesToOmo: false,
|
|
13502
|
+
env: {
|
|
13503
|
+
LAZYCODEX_DOCTOR_LCX_ACTIVE: "1"
|
|
13504
|
+
}
|
|
13505
|
+
};
|
|
13506
|
+
}
|
|
13507
|
+
function buildLazyCodexDoctorPrompt(doctorArgs) {
|
|
13508
|
+
return [
|
|
13509
|
+
"Use $omo:lcx-doctor to diagnose this LazyCodex/Codex installation.",
|
|
13510
|
+
"This command is already the lazycodex doctor surface; never invoke lazycodex doctor from inside the doctor workflow.",
|
|
13511
|
+
"Sync the latest LazyCodex and OpenAI Codex sources into /tmp, inventory the local installation,",
|
|
13512
|
+
"probe the Codex plugin/cache/hooks/MCP state, and report PASS/WARN/FAIL findings with evidence and remediations.",
|
|
13513
|
+
buildDoctorOutputInstruction(doctorArgs),
|
|
13514
|
+
doctorArgs.length > 0 ? `Requested doctor arguments: ${doctorArgs.join(" ")}` : "Requested doctor arguments: none"
|
|
13515
|
+
].join(" ");
|
|
13516
|
+
}
|
|
13517
|
+
function buildDoctorOutputInstruction(doctorArgs) {
|
|
13518
|
+
if (doctorArgs.includes("--json")) {
|
|
13519
|
+
return "Return exactly one JSON object with summary, environment, checks, remediations, and knownIssues fields; do not wrap it in Markdown.";
|
|
13520
|
+
}
|
|
13521
|
+
return "Return the standard Markdown LazyCodex Doctor Report.";
|
|
13522
|
+
}
|
|
13523
|
+
function formatShellCommand(command, args) {
|
|
13524
|
+
return [command, ...args].map(shellQuote).join(" ");
|
|
13525
|
+
}
|
|
13526
|
+
function shellQuote(value) {
|
|
13527
|
+
if (/^[A-Za-z0-9_/:=.,@%+-]+$/.test(value))
|
|
13528
|
+
return value;
|
|
13529
|
+
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
13213
13530
|
}
|
|
13214
13531
|
|
|
13215
13532
|
// packages/omo-codex/src/install/lazycodex-manual-update.ts
|
|
13216
|
-
import { spawn as spawn4, spawnSync as
|
|
13533
|
+
import { spawn as spawn4, spawnSync as spawnSync3 } from "node:child_process";
|
|
13217
13534
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
13218
|
-
import { dirname as
|
|
13535
|
+
import { dirname as dirname9, join as join33 } from "node:path";
|
|
13219
13536
|
import { createInterface as createInterface2 } from "node:readline/promises";
|
|
13220
13537
|
import { fileURLToPath } from "node:url";
|
|
13221
13538
|
|
|
13222
13539
|
// packages/omo-codex/src/install/lazycodex-bun-global-paths.ts
|
|
13223
|
-
import { join as
|
|
13540
|
+
import { join as join32 } from "node:path";
|
|
13224
13541
|
function isBunGlobalEntrypointPath(invokedPath, env3) {
|
|
13225
13542
|
if (typeof invokedPath !== "string" || invokedPath.trim().length === 0)
|
|
13226
13543
|
return false;
|
|
@@ -13231,8 +13548,8 @@ function resolveBunGlobalRoots(env3) {
|
|
|
13231
13548
|
const bunInstallRoot = env3.BUN_INSTALL?.trim();
|
|
13232
13549
|
const homeRoot = env3.HOME?.trim();
|
|
13233
13550
|
return [
|
|
13234
|
-
...bunInstallRoot ? [
|
|
13235
|
-
...homeRoot ? [
|
|
13551
|
+
...bunInstallRoot ? [join32(bunInstallRoot, "bin"), join32(bunInstallRoot, "install", "global", "node_modules")] : [],
|
|
13552
|
+
...homeRoot ? [join32(homeRoot, ".bun", "bin"), join32(homeRoot, ".bun", "install", "global", "node_modules")] : []
|
|
13236
13553
|
].map(normalizePathForPrefix);
|
|
13237
13554
|
}
|
|
13238
13555
|
function normalizePathForPrefix(path2) {
|
|
@@ -13324,13 +13641,13 @@ function resolveArgs(env3) {
|
|
|
13324
13641
|
function resolveCurrentVersion(env3) {
|
|
13325
13642
|
if (env3.LAZYCODEX_CURRENT_VERSION?.trim())
|
|
13326
13643
|
return env3.LAZYCODEX_CURRENT_VERSION.trim();
|
|
13327
|
-
const pluginRoot =
|
|
13328
|
-
return readVersionManifest(resolveInstalledVersionPath(env3, pluginRoot)) ?? readVersionManifest(
|
|
13644
|
+
const pluginRoot = dirname9(dirname9(fileURLToPath(import.meta.url)));
|
|
13645
|
+
return readVersionManifest(resolveInstalledVersionPath(env3, pluginRoot)) ?? readVersionManifest(join33(pluginRoot, "..", "..", "..", "package.json")) ?? readVersionManifest(join33(pluginRoot, ".codex-plugin", "plugin.json"));
|
|
13329
13646
|
}
|
|
13330
13647
|
function resolveLatestVersion(env3) {
|
|
13331
13648
|
if (env3.LAZYCODEX_LATEST_VERSION?.trim())
|
|
13332
13649
|
return env3.LAZYCODEX_LATEST_VERSION.trim();
|
|
13333
|
-
const result =
|
|
13650
|
+
const result = spawnSync3("npm", ["view", "lazycodex-ai", "version", "--silent"], {
|
|
13334
13651
|
encoding: "utf8",
|
|
13335
13652
|
stdio: ["ignore", "pipe", "ignore"]
|
|
13336
13653
|
});
|
|
@@ -13358,7 +13675,7 @@ ${trustCommand}`);
|
|
|
13358
13675
|
${trustCommand}`);
|
|
13359
13676
|
}
|
|
13360
13677
|
function resolveKnownBunGlobalUntrustedPackages(env3) {
|
|
13361
|
-
const result =
|
|
13678
|
+
const result = spawnSync3(BUN_UPDATE_COMMAND, BUN_GLOBAL_UNTRUSTED_ARGS, {
|
|
13362
13679
|
encoding: "utf8",
|
|
13363
13680
|
env: env3,
|
|
13364
13681
|
stdio: ["ignore", "pipe", "ignore"]
|
|
@@ -13441,7 +13758,7 @@ function compareVersions(left, right) {
|
|
|
13441
13758
|
function resolveInstalledVersionPath(env3, pluginRoot) {
|
|
13442
13759
|
if (env3.LAZYCODEX_INSTALLED_VERSION_FILE?.trim())
|
|
13443
13760
|
return env3.LAZYCODEX_INSTALLED_VERSION_FILE.trim();
|
|
13444
|
-
return
|
|
13761
|
+
return join33(pluginRoot, INSTALLED_VERSION_FILE);
|
|
13445
13762
|
}
|
|
13446
13763
|
function readVersionManifest(path2) {
|
|
13447
13764
|
try {
|
|
@@ -13458,11 +13775,11 @@ function readVersionManifest(path2) {
|
|
|
13458
13775
|
}
|
|
13459
13776
|
// packages/omo-codex/src/install/codex-git-bash-mcp-env.ts
|
|
13460
13777
|
import { readFile as readFile18, writeFile as writeFile10 } from "node:fs/promises";
|
|
13461
|
-
import { join as
|
|
13778
|
+
import { join as join34 } from "node:path";
|
|
13462
13779
|
var GIT_BASH_ENV_KEY2 = "OMO_CODEX_GIT_BASH_PATH";
|
|
13463
13780
|
var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", "./components/codegraph/dist/serve.js"]);
|
|
13464
13781
|
async function stampGitBashMcpEnv(input) {
|
|
13465
|
-
const manifestPath =
|
|
13782
|
+
const manifestPath = join34(input.pluginRoot, ".mcp.json");
|
|
13466
13783
|
if (!await fileExistsStrict(manifestPath))
|
|
13467
13784
|
return false;
|
|
13468
13785
|
const parsed = JSON.parse(await readFile18(manifestPath, "utf8"));
|
|
@@ -13495,7 +13812,7 @@ function stampCodegraphMcpPath(mcpServers, pluginRoot) {
|
|
|
13495
13812
|
const entrypoint = args[0];
|
|
13496
13813
|
if (typeof entrypoint !== "string" || !CODEGRAPH_RELATIVE_ARGS2.has(entrypoint))
|
|
13497
13814
|
return false;
|
|
13498
|
-
codegraphServer["args"] = [
|
|
13815
|
+
codegraphServer["args"] = [join34(pluginRoot, "components", "codegraph", "dist", "serve.js"), ...args.slice(1)];
|
|
13499
13816
|
return true;
|
|
13500
13817
|
}
|
|
13501
13818
|
|
|
@@ -13504,7 +13821,7 @@ async function installMarketplaceLocally(options = {}) {
|
|
|
13504
13821
|
return runCodexInstaller(options);
|
|
13505
13822
|
}
|
|
13506
13823
|
function resolveDefaultRepoRootForEntrypoint(entrypointPath) {
|
|
13507
|
-
return resolve11(
|
|
13824
|
+
return resolve11(dirname10(entrypointPath), "..", "..", "..");
|
|
13508
13825
|
}
|
|
13509
13826
|
function resolveDefaultRepoRoot() {
|
|
13510
13827
|
return resolveDefaultRepoRootForEntrypoint(fileURLToPath2(import.meta.url));
|
|
@@ -13516,7 +13833,7 @@ async function runLazyCodexInstallLocalCli(input) {
|
|
|
13516
13833
|
return 0;
|
|
13517
13834
|
}
|
|
13518
13835
|
if (parsed.kind === "version") {
|
|
13519
|
-
const packageJson = JSON.parse(await readFile19(
|
|
13836
|
+
const packageJson = JSON.parse(await readFile19(join35(input.defaultRepoRoot, "package.json"), "utf8"));
|
|
13520
13837
|
const version2 = typeof packageJson.version === "string" ? packageJson.version : "unknown";
|
|
13521
13838
|
input.log(`lazycodex-ai ${version2}`);
|
|
13522
13839
|
return 0;
|