oh-my-opencode 4.12.1 → 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 +896 -669
- package/dist/cli-node/index.js +896 -669
- 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 +708 -413
- 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 +23 -4
- package/dist/skills/ulw-plan/SKILL.md +4 -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 +9 -1
- package/package.json +16 -14
- package/packages/omo-codex/THIRD-PARTY-NOTICES.md +27 -4
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -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 +323 -39
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +292 -19
- package/packages/omo-codex/plugin/components/codegraph/package.json +9 -3
- package/packages/omo-codex/plugin/components/codegraph/src/mcp-unavailable.ts +75 -0
- package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +29 -13
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +20 -7
- package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +1 -243
- 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 +1 -1
- 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-unavailable.test.ts +133 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +1 -113
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-node-support.test.ts +8 -1
- 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/package.json +1 -1
- 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/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/package-lock.json +112 -13
- package/packages/omo-codex/plugin/package.json +2 -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/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 +23 -4
- 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/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-codegraph-mcp-smoke.test.mjs +76 -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 +30 -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 +520 -216
- 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 +23 -4
- 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
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
codex-codegraph adapts the CodeGraph MCP runtime for the Codex plugin surface.
|
|
2
|
+
|
|
3
|
+
This component optionally installs @colbymchenry/codegraph@1.0.1. That package
|
|
4
|
+
selects platform bundles for darwin, linux, and win32 on arm64 and x64. The
|
|
5
|
+
CodeGraph packages declare MIT license metadata.
|
|
6
|
+
|
|
7
|
+
The selected CodeGraph platform bundles may include a Node.js v24.16.0 runtime
|
|
8
|
+
plus vendored JavaScript dependencies and tree-sitter WASM payloads. Node.js
|
|
9
|
+
runtime license and bundled third-party license text is included in this
|
|
10
|
+
component at NODE-RUNTIME-LICENSES.md. Vendored JavaScript dependencies and WASM
|
|
11
|
+
payloads retain the license files included inside the selected CodeGraph
|
|
12
|
+
platform package under lib/node_modules/.
|
|
13
|
+
|
|
14
|
+
This NOTICE is self-contained for the marketplace plugin payload. The wider
|
|
15
|
+
Codex distribution also records these details in its aggregate third-party
|
|
16
|
+
notices.
|
|
@@ -8,7 +8,7 @@ import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
|
8
8
|
|
|
9
9
|
// components/codegraph/src/hook.ts
|
|
10
10
|
import { spawn } from "node:child_process";
|
|
11
|
-
import { homedir as
|
|
11
|
+
import { homedir as homedir9 } from "node:os";
|
|
12
12
|
import { cwd as processCwd2, env as processEnv2, stdin as processStdin, stdout as processStdout } from "node:process";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
|
|
@@ -204,6 +204,9 @@ function isRecord(value) {
|
|
|
204
204
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
// shared/src/config-loader.ts
|
|
208
|
+
import { homedir as homedir4 } from "node:os";
|
|
209
|
+
|
|
207
210
|
// ../../utils/src/omo-config/loader.ts
|
|
208
211
|
import { existsSync as existsSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
209
212
|
import { homedir as homedir3 } from "node:os";
|
|
@@ -1429,35 +1432,49 @@ function loadOmoConfig(options) {
|
|
|
1429
1432
|
|
|
1430
1433
|
// shared/src/config-loader.ts
|
|
1431
1434
|
function getCodexOmoConfig(options = {}) {
|
|
1435
|
+
const env = options.env ?? process.env;
|
|
1436
|
+
const homeDir = resolveHomeDir(options);
|
|
1432
1437
|
const result = loadOmoConfig({
|
|
1433
1438
|
...options.cwd === undefined ? {} : { cwd: options.cwd },
|
|
1434
|
-
|
|
1435
|
-
|
|
1439
|
+
env,
|
|
1440
|
+
homeDir,
|
|
1436
1441
|
harness: "codex"
|
|
1437
1442
|
});
|
|
1443
|
+
const trustedConfig = loadOmoConfig({
|
|
1444
|
+
cwd: homeDir,
|
|
1445
|
+
env,
|
|
1446
|
+
homeDir,
|
|
1447
|
+
harness: "codex"
|
|
1448
|
+
});
|
|
1449
|
+
const trustedCodegraphInstallDir = trustedConfig.config.codegraph?.install_dir;
|
|
1438
1450
|
return {
|
|
1439
1451
|
...result.config,
|
|
1440
1452
|
sources: result.sources,
|
|
1453
|
+
...trustedCodegraphInstallDir === undefined ? {} : { trustedCodegraphInstallDir },
|
|
1441
1454
|
warnings: result.warnings
|
|
1442
1455
|
};
|
|
1443
1456
|
}
|
|
1457
|
+
function resolveHomeDir(options) {
|
|
1458
|
+
const env = options.env ?? process.env;
|
|
1459
|
+
return options.homeDir ?? env["HOME"] ?? env["USERPROFILE"] ?? homedir4();
|
|
1460
|
+
}
|
|
1444
1461
|
|
|
1445
1462
|
// components/codegraph/src/session-start-worker.ts
|
|
1446
1463
|
import { execFile as execFile2 } from "node:child_process";
|
|
1447
1464
|
import { appendFileSync as appendFileSync2, existsSync as existsSync6, mkdirSync as mkdirSync2 } from "node:fs";
|
|
1448
|
-
import { homedir as
|
|
1465
|
+
import { homedir as homedir8 } from "node:os";
|
|
1449
1466
|
import { extname, join as join7 } from "node:path";
|
|
1450
1467
|
import { cwd as processCwd, env as processEnv, stderr as processStderr } from "node:process";
|
|
1451
1468
|
|
|
1452
1469
|
// ../../utils/src/codegraph/env.ts
|
|
1453
|
-
import { homedir as
|
|
1470
|
+
import { homedir as homedir5 } from "node:os";
|
|
1454
1471
|
import { join as join3 } from "node:path";
|
|
1455
1472
|
var CODEGRAPH_INSTALL_DIR_ENV = "CODEGRAPH_INSTALL_DIR";
|
|
1456
1473
|
var CODEGRAPH_NO_DOWNLOAD_ENV = "CODEGRAPH_NO_DOWNLOAD";
|
|
1457
1474
|
var CODEGRAPH_TELEMETRY_ENV = "CODEGRAPH_TELEMETRY";
|
|
1458
1475
|
var DO_NOT_TRACK_ENV = "DO_NOT_TRACK";
|
|
1459
1476
|
function buildCodegraphEnv(options = {}) {
|
|
1460
|
-
const homeDir = options.homeDir ??
|
|
1477
|
+
const homeDir = options.homeDir ?? homedir5();
|
|
1461
1478
|
return {
|
|
1462
1479
|
[CODEGRAPH_INSTALL_DIR_ENV]: join3(homeDir, ".omo", "codegraph"),
|
|
1463
1480
|
[CODEGRAPH_NO_DOWNLOAD_ENV]: "1",
|
|
@@ -1500,7 +1517,7 @@ import { createHash as createHash2, randomUUID } from "node:crypto";
|
|
|
1500
1517
|
import { execFile } from "node:child_process";
|
|
1501
1518
|
import { chmod, mkdir, readdir, readFile, rename, rm, rmdir, stat, writeFile } from "node:fs/promises";
|
|
1502
1519
|
import { existsSync as existsSync4 } from "node:fs";
|
|
1503
|
-
import { homedir as
|
|
1520
|
+
import { homedir as homedir6, hostname } from "node:os";
|
|
1504
1521
|
import { basename as basename2, join as join4 } from "node:path";
|
|
1505
1522
|
import { promisify } from "node:util";
|
|
1506
1523
|
|
|
@@ -1553,7 +1570,7 @@ function markerPath(installDir, version) {
|
|
|
1553
1570
|
return join4(installDir, ".provisioned", `codegraph-${version}.json`);
|
|
1554
1571
|
}
|
|
1555
1572
|
function defaultInstallDir() {
|
|
1556
|
-
return join4(
|
|
1573
|
+
return join4(homedir6(), ".omo", "codegraph");
|
|
1557
1574
|
}
|
|
1558
1575
|
function sha256(bytes) {
|
|
1559
1576
|
return createHash2("sha256").update(bytes).digest("hex");
|
|
@@ -1716,7 +1733,7 @@ async function ensureCodegraphProvisioned(options) {
|
|
|
1716
1733
|
|
|
1717
1734
|
// ../../utils/src/codegraph/resolve.ts
|
|
1718
1735
|
import { existsSync as existsSync5 } from "node:fs";
|
|
1719
|
-
import { homedir as
|
|
1736
|
+
import { homedir as homedir7 } from "node:os";
|
|
1720
1737
|
import { spawnSync } from "node:child_process";
|
|
1721
1738
|
import { basename as basename3, dirname as dirname2, join as join6 } from "node:path";
|
|
1722
1739
|
import { createRequire } from "node:module";
|
|
@@ -1896,7 +1913,7 @@ function resolveCodegraphCommand(options = {}) {
|
|
|
1896
1913
|
if (bundled !== null && runtime2 !== null) {
|
|
1897
1914
|
return { argsPrefix: [bundled], command: runtime2, exists: true, source: "bundled" };
|
|
1898
1915
|
}
|
|
1899
|
-
const provisioned = options.provisioned?.() ?? defaultProvisionedBin(options.homeDir ??
|
|
1916
|
+
const provisioned = options.provisioned?.() ?? defaultProvisionedBin(options.homeDir ?? homedir7(), fileExists);
|
|
1900
1917
|
if (provisioned !== null && fileExists(provisioned)) {
|
|
1901
1918
|
return { argsPrefix: [], command: provisioned, exists: true, source: "provisioned" };
|
|
1902
1919
|
}
|
|
@@ -1923,7 +1940,7 @@ var defaultDeps = {
|
|
|
1923
1940
|
};
|
|
1924
1941
|
async function runCodegraphSessionStartWorker(options = {}) {
|
|
1925
1942
|
const env = options.env ?? processEnv;
|
|
1926
|
-
const homeDir =
|
|
1943
|
+
const homeDir = resolveHomeDir2(env);
|
|
1927
1944
|
const projectRoot = options.cwd ?? env[SESSION_START_CWD_ENV] ?? processCwd();
|
|
1928
1945
|
const config = options.config ?? getCodexOmoConfig({ cwd: projectRoot, env, homeDir });
|
|
1929
1946
|
const logOutcome = options.logOutcome ?? ((outcome) => appendOutcome(homeDir, outcome));
|
|
@@ -1931,7 +1948,11 @@ async function runCodegraphSessionStartWorker(options = {}) {
|
|
|
1931
1948
|
return finish("skipped-disabled", { projectRoot }, logOutcome);
|
|
1932
1949
|
}
|
|
1933
1950
|
const nodeSupport = evaluateCodegraphNodeSupport({ env, nodeVersion: options.nodeVersion });
|
|
1934
|
-
|
|
1951
|
+
const bootstrapConfig = {
|
|
1952
|
+
...config.codegraph ?? {},
|
|
1953
|
+
...config.trustedCodegraphInstallDir === undefined ? {} : { trustedCodegraphInstallDir: config.trustedCodegraphInstallDir }
|
|
1954
|
+
};
|
|
1955
|
+
return runBootstrap(projectRoot, bootstrapConfig, env, homeDir, nodeSupport, { ...defaultDeps, ...options.deps }, logOutcome);
|
|
1935
1956
|
}
|
|
1936
1957
|
async function runBootstrap(projectRoot, config, env, homeDir, nodeSupport, deps, logOutcome) {
|
|
1937
1958
|
try {
|
|
@@ -1944,7 +1965,7 @@ async function runBootstrap(projectRoot, config, env, homeDir, nodeSupport, deps
|
|
|
1944
1965
|
}
|
|
1945
1966
|
deps.prepareWorkspace(projectRoot, { homeDir });
|
|
1946
1967
|
deps.ensureGitignored(projectRoot);
|
|
1947
|
-
const codegraphEnv = config
|
|
1968
|
+
const codegraphEnv = codegraphEnvForConfig(config, homeDir);
|
|
1948
1969
|
const status = await deps.runCommand(projectRoot, command.resolution.command, [...command.resolution.argsPrefix, "status", "--json"], { env: codegraphEnv, timeoutMs: COMMAND_TIMEOUT_MS });
|
|
1949
1970
|
const decision = decideStartupAction(status);
|
|
1950
1971
|
if (decision.kind === "skip")
|
|
@@ -1961,7 +1982,8 @@ function finish(action, detail, logOutcome) {
|
|
|
1961
1982
|
return { action };
|
|
1962
1983
|
}
|
|
1963
1984
|
async function resolveOrProvisionCommand(deps, config, env, homeDir, nodeSupport) {
|
|
1964
|
-
const
|
|
1985
|
+
const trustedInstallDir = config.trustedCodegraphInstallDir;
|
|
1986
|
+
const resolved = deps.resolveCommand({ env, homeDir, provisioned: () => provisionedBinFromInstallDir(trustedInstallDir) });
|
|
1965
1987
|
if (resolved.exists && canUseResolvedCommand(resolved, nodeSupport)) {
|
|
1966
1988
|
return { kind: "resolved", resolution: resolved };
|
|
1967
1989
|
}
|
|
@@ -1969,13 +1991,17 @@ async function resolveOrProvisionCommand(deps, config, env, homeDir, nodeSupport
|
|
|
1969
1991
|
return { kind: "unsupported-node" };
|
|
1970
1992
|
if (config.auto_provision === false)
|
|
1971
1993
|
return { error: "codegraph binary unavailable and auto_provision is disabled", kind: "unavailable", source: resolved.source };
|
|
1972
|
-
const installDir =
|
|
1973
|
-
const provisioned = await deps.ensureProvisioned({ installDir, lockDir: join7(installDir, "locks"), version: CODEGRAPH_VERSION });
|
|
1994
|
+
const installDir = trustedInstallDir ?? join7(homeDir, ".omo", "codegraph");
|
|
1995
|
+
const provisioned = await deps.ensureProvisioned({ installDir, lockDir: join7(installDir, ".locks"), version: CODEGRAPH_VERSION });
|
|
1974
1996
|
if (!provisioned.provisioned || provisioned.binPath === undefined) {
|
|
1975
1997
|
return { error: provisioned.error ?? "provisioning did not produce a binary", kind: "unavailable", source: resolved.source };
|
|
1976
1998
|
}
|
|
1977
1999
|
return { kind: "resolved", resolution: { argsPrefix: [], command: provisioned.binPath, exists: true, source: "provisioned" } };
|
|
1978
2000
|
}
|
|
2001
|
+
function codegraphEnvForConfig(config, homeDir) {
|
|
2002
|
+
const env = buildCodegraphEnv({ homeDir });
|
|
2003
|
+
return config.trustedCodegraphInstallDir === undefined ? env : { ...env, CODEGRAPH_INSTALL_DIR: config.trustedCodegraphInstallDir };
|
|
2004
|
+
}
|
|
1979
2005
|
function canUseResolvedCommand(resolved, nodeSupport) {
|
|
1980
2006
|
return !codegraphCommandRequiresSupportedLocalNode(resolved) || nodeSupport.supported;
|
|
1981
2007
|
}
|
|
@@ -2061,8 +2087,8 @@ function resolveExitCode(error) {
|
|
|
2061
2087
|
function toOutputText(value) {
|
|
2062
2088
|
return Buffer.isBuffer(value) ? value.toString("utf8") : value;
|
|
2063
2089
|
}
|
|
2064
|
-
function
|
|
2065
|
-
return env["HOME"] ?? env["USERPROFILE"] ??
|
|
2090
|
+
function resolveHomeDir2(env) {
|
|
2091
|
+
return env["HOME"] ?? env["USERPROFILE"] ?? homedir8();
|
|
2066
2092
|
}
|
|
2067
2093
|
function parseJson(text) {
|
|
2068
2094
|
try {
|
|
@@ -2089,7 +2115,7 @@ async function executeCodegraphSessionStartHook(options = {}) {
|
|
|
2089
2115
|
const env = options.env ?? processEnv2;
|
|
2090
2116
|
const input = await readHookInput(options.stdin ?? processStdin);
|
|
2091
2117
|
const projectRoot = resolveProjectRoot(input, options.cwd ?? processCwd2());
|
|
2092
|
-
const homeDir =
|
|
2118
|
+
const homeDir = resolveHomeDir3(env);
|
|
2093
2119
|
const config = options.config ?? getCodexOmoConfig({ cwd: projectRoot, env, homeDir });
|
|
2094
2120
|
if (config.codegraph?.enabled === false) {
|
|
2095
2121
|
return { action: "skipped-disabled", exitCode: 0 };
|
|
@@ -2105,7 +2131,7 @@ async function executeCodegraphSessionStartHook(options = {}) {
|
|
|
2105
2131
|
async function executeCodegraphPostToolUseHook(options = {}) {
|
|
2106
2132
|
const env = options.env ?? processEnv2;
|
|
2107
2133
|
const input = await readHookInput(options.stdin ?? processStdin);
|
|
2108
|
-
const output = runCodegraphPostToolUseHook(input, { homeDir:
|
|
2134
|
+
const output = runCodegraphPostToolUseHook(input, { homeDir: resolveHomeDir3(env) });
|
|
2109
2135
|
if (output.length === 0)
|
|
2110
2136
|
return { action: "skipped", exitCode: 0 };
|
|
2111
2137
|
(options.stdout ?? processStdout).write(output);
|
|
@@ -2140,8 +2166,8 @@ function spawnDetachedWorker(invocation) {
|
|
|
2140
2166
|
const child = spawn(invocation.command, [...invocation.args], { detached: true, env: invocation.env, stdio: "ignore" });
|
|
2141
2167
|
child.unref();
|
|
2142
2168
|
}
|
|
2143
|
-
function
|
|
2144
|
-
return env["HOME"] ?? env["USERPROFILE"] ??
|
|
2169
|
+
function resolveHomeDir3(env) {
|
|
2170
|
+
return env["HOME"] ?? env["USERPROFILE"] ?? homedir9();
|
|
2145
2171
|
}
|
|
2146
2172
|
function resolveProjectRoot(input, fallback) {
|
|
2147
2173
|
if (!isRecord4(input))
|
|
@@ -2178,15 +2204,265 @@ function defaultWorkerCliPath() {
|
|
|
2178
2204
|
// components/codegraph/src/serve.ts
|
|
2179
2205
|
import { spawn as spawn2 } from "node:child_process";
|
|
2180
2206
|
import { existsSync as existsSync7, realpathSync as realpathSync2 } from "node:fs";
|
|
2181
|
-
import { homedir as
|
|
2207
|
+
import { homedir as homedir10 } from "node:os";
|
|
2182
2208
|
import { basename as basename4, extname as extname2, join as join8, resolve as resolve3 } from "node:path";
|
|
2183
2209
|
import {
|
|
2184
2210
|
cwd as processCwd3,
|
|
2185
2211
|
env as processEnv3,
|
|
2186
2212
|
execPath as processExecPath,
|
|
2187
|
-
|
|
2213
|
+
stdin as processStdin2,
|
|
2214
|
+
stderr as processStderr2,
|
|
2215
|
+
stdout as processStdout2
|
|
2188
2216
|
} from "node:process";
|
|
2189
2217
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
2218
|
+
|
|
2219
|
+
// ../../mcp-stdio-core/src/record.ts
|
|
2220
|
+
function isPlainRecord(value) {
|
|
2221
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2222
|
+
}
|
|
2223
|
+
// ../../mcp-stdio-core/src/responses.ts
|
|
2224
|
+
function successResponse(id, result) {
|
|
2225
|
+
return { jsonrpc: "2.0", id, result };
|
|
2226
|
+
}
|
|
2227
|
+
function errorResponse(id, code, message, data) {
|
|
2228
|
+
return { jsonrpc: "2.0", id, error: data === undefined ? { code, message } : { code, message, data } };
|
|
2229
|
+
}
|
|
2230
|
+
function jsonRpcId(value) {
|
|
2231
|
+
return typeof value === "string" || typeof value === "number" || value === null ? value : null;
|
|
2232
|
+
}
|
|
2233
|
+
// ../../mcp-stdio-core/src/transport.ts
|
|
2234
|
+
var HEADER_SEPARATOR = Buffer.from(`\r
|
|
2235
|
+
\r
|
|
2236
|
+
`);
|
|
2237
|
+
async function* readStdioJsonRpcMessages(input) {
|
|
2238
|
+
let buffer = Buffer.alloc(0);
|
|
2239
|
+
for await (const chunk of input) {
|
|
2240
|
+
buffer = Buffer.concat([buffer, bufferFromChunk(chunk)]);
|
|
2241
|
+
while (true) {
|
|
2242
|
+
const result = readNextMessage(buffer);
|
|
2243
|
+
if (result.kind === "incomplete")
|
|
2244
|
+
break;
|
|
2245
|
+
buffer = result.remaining;
|
|
2246
|
+
if (result.message)
|
|
2247
|
+
yield result.message;
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
const trailing = buffer.toString("utf8").trim();
|
|
2251
|
+
if (trailing.length > 0) {
|
|
2252
|
+
yield parseJsonPayload(trailing, "line");
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
function writeStdioJsonRpcResponse(output, response, responseMode) {
|
|
2256
|
+
const body = JSON.stringify(response);
|
|
2257
|
+
if (responseMode === "framed") {
|
|
2258
|
+
output.write(`Content-Length: ${Buffer.byteLength(body, "utf8")}\r
|
|
2259
|
+
\r
|
|
2260
|
+
${body}`);
|
|
2261
|
+
return;
|
|
2262
|
+
}
|
|
2263
|
+
output.write(`${body}
|
|
2264
|
+
`);
|
|
2265
|
+
}
|
|
2266
|
+
function readNextMessage(buffer) {
|
|
2267
|
+
if (buffer.length === 0)
|
|
2268
|
+
return { kind: "incomplete" };
|
|
2269
|
+
return startsWithContentLength(buffer) ? readFramedMessage(buffer) : readLineMessage(buffer);
|
|
2270
|
+
}
|
|
2271
|
+
function readLineMessage(buffer) {
|
|
2272
|
+
const newlineIndex = buffer.indexOf(10);
|
|
2273
|
+
if (newlineIndex === -1)
|
|
2274
|
+
return { kind: "incomplete" };
|
|
2275
|
+
const line = buffer.subarray(0, newlineIndex).toString("utf8").replace(/\r$/, "");
|
|
2276
|
+
if (line.trim().length === 0) {
|
|
2277
|
+
return { kind: "complete", remaining: buffer.subarray(newlineIndex + 1) };
|
|
2278
|
+
}
|
|
2279
|
+
return {
|
|
2280
|
+
kind: "complete",
|
|
2281
|
+
message: parseJsonPayload(line, "line"),
|
|
2282
|
+
remaining: buffer.subarray(newlineIndex + 1)
|
|
2283
|
+
};
|
|
2284
|
+
}
|
|
2285
|
+
function readFramedMessage(buffer) {
|
|
2286
|
+
const separatorIndex = buffer.indexOf(HEADER_SEPARATOR);
|
|
2287
|
+
if (separatorIndex === -1)
|
|
2288
|
+
return { kind: "incomplete" };
|
|
2289
|
+
const headers = buffer.subarray(0, separatorIndex).toString("ascii");
|
|
2290
|
+
const contentLength = parseContentLength(headers);
|
|
2291
|
+
const bodyStart = separatorIndex + HEADER_SEPARATOR.length;
|
|
2292
|
+
if (contentLength === undefined) {
|
|
2293
|
+
return {
|
|
2294
|
+
kind: "complete",
|
|
2295
|
+
message: {
|
|
2296
|
+
kind: "parse_error",
|
|
2297
|
+
message: "Missing or invalid Content-Length header",
|
|
2298
|
+
responseMode: "framed"
|
|
2299
|
+
},
|
|
2300
|
+
remaining: buffer.subarray(bodyStart)
|
|
2301
|
+
};
|
|
2302
|
+
}
|
|
2303
|
+
const bodyEnd = bodyStart + contentLength;
|
|
2304
|
+
if (buffer.length < bodyEnd)
|
|
2305
|
+
return { kind: "incomplete" };
|
|
2306
|
+
const body = buffer.subarray(bodyStart, bodyEnd).toString("utf8");
|
|
2307
|
+
return {
|
|
2308
|
+
kind: "complete",
|
|
2309
|
+
message: parseJsonPayload(body, "framed"),
|
|
2310
|
+
remaining: buffer.subarray(bodyEnd)
|
|
2311
|
+
};
|
|
2312
|
+
}
|
|
2313
|
+
function startsWithContentLength(buffer) {
|
|
2314
|
+
const prefix = buffer.subarray(0, "content-length:".length).toString("ascii").toLowerCase();
|
|
2315
|
+
return prefix === "content-length:";
|
|
2316
|
+
}
|
|
2317
|
+
function parseContentLength(headers) {
|
|
2318
|
+
for (const line of headers.split(`\r
|
|
2319
|
+
`)) {
|
|
2320
|
+
const match = /^content-length:\s*(\d+)$/i.exec(line);
|
|
2321
|
+
if (match === null)
|
|
2322
|
+
continue;
|
|
2323
|
+
const value = match[1];
|
|
2324
|
+
if (value === undefined)
|
|
2325
|
+
return;
|
|
2326
|
+
return Number(value);
|
|
2327
|
+
}
|
|
2328
|
+
return;
|
|
2329
|
+
}
|
|
2330
|
+
function parseJsonPayload(payload, responseMode) {
|
|
2331
|
+
try {
|
|
2332
|
+
return { kind: "request", payload: JSON.parse(payload), responseMode };
|
|
2333
|
+
} catch (error) {
|
|
2334
|
+
return { kind: "parse_error", message: error instanceof Error ? error.message : String(error), responseMode };
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
function bufferFromChunk(chunk) {
|
|
2338
|
+
if (Buffer.isBuffer(chunk))
|
|
2339
|
+
return chunk;
|
|
2340
|
+
if (typeof chunk === "string")
|
|
2341
|
+
return Buffer.from(chunk);
|
|
2342
|
+
throw new TypeError(`Unsupported stdio chunk type: ${typeof chunk}`);
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
// ../../mcp-stdio-core/src/server.ts
|
|
2346
|
+
var DEFAULT_IDLE_TIMEOUT_MS = 10 * 60000;
|
|
2347
|
+
var noopLog = () => {};
|
|
2348
|
+
async function runJsonRpcStdioServer(config) {
|
|
2349
|
+
const log = config.log ?? noopLog;
|
|
2350
|
+
const idleTimeoutMs = config.idleTimeoutMs ?? DEFAULT_IDLE_TIMEOUT_MS;
|
|
2351
|
+
const idleTimer = createIdleTimer(idleTimeoutMs, log, config.onIdleTimeout);
|
|
2352
|
+
log("stdio_started", { cwd: process.cwd(), idle_timeout_ms: idleTimeoutMs });
|
|
2353
|
+
idleTimer.arm();
|
|
2354
|
+
try {
|
|
2355
|
+
for await (const message of readStdioJsonRpcMessages(config.input)) {
|
|
2356
|
+
if (idleTimer.closed())
|
|
2357
|
+
break;
|
|
2358
|
+
idleTimer.arm();
|
|
2359
|
+
if (message.kind === "parse_error") {
|
|
2360
|
+
handleParseError(message, config, log);
|
|
2361
|
+
continue;
|
|
2362
|
+
}
|
|
2363
|
+
await handleRequest(message, config, log);
|
|
2364
|
+
}
|
|
2365
|
+
} finally {
|
|
2366
|
+
idleTimer.clear();
|
|
2367
|
+
log("stdio_stopped");
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
function handleParseError(message, config, log) {
|
|
2371
|
+
log("parse_error", { message: message.message });
|
|
2372
|
+
const response = config.parseErrorResponse?.(message.message) ?? errorResponse(null, -32700, "Parse error", message.message);
|
|
2373
|
+
if (response !== undefined) {
|
|
2374
|
+
writeStdioJsonRpcResponse(config.output, response, message.responseMode);
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
async function handleRequest(message, config, log) {
|
|
2378
|
+
const parsed = message.payload;
|
|
2379
|
+
const id = isPlainRecord(parsed) ? jsonRpcId(parsed["id"]) : null;
|
|
2380
|
+
const method = isPlainRecord(parsed) && typeof parsed["method"] === "string" ? parsed["method"] : null;
|
|
2381
|
+
log("request", { id: id === null ? null : String(id), method });
|
|
2382
|
+
try {
|
|
2383
|
+
const response = await config.handler(parsed, config.handlerOptions);
|
|
2384
|
+
if (response === undefined)
|
|
2385
|
+
return;
|
|
2386
|
+
writeStdioJsonRpcResponse(config.output, response, message.responseMode);
|
|
2387
|
+
log("response", { id: String(response.id), method, is_error: response.error !== undefined });
|
|
2388
|
+
} catch (error) {
|
|
2389
|
+
if (config.onHandlerError === undefined)
|
|
2390
|
+
throw error;
|
|
2391
|
+
config.onHandlerError(error);
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
function createIdleTimer(idleTimeoutMs, log, onIdleTimeout) {
|
|
2395
|
+
let timer = null;
|
|
2396
|
+
let isClosed = false;
|
|
2397
|
+
return {
|
|
2398
|
+
arm: () => {
|
|
2399
|
+
if (timer !== null)
|
|
2400
|
+
clearTimeout(timer);
|
|
2401
|
+
if (idleTimeoutMs <= 0)
|
|
2402
|
+
return;
|
|
2403
|
+
timer = setTimeout(() => {
|
|
2404
|
+
isClosed = true;
|
|
2405
|
+
log("idle_timeout", { idle_timeout_ms: idleTimeoutMs });
|
|
2406
|
+
onIdleTimeout?.();
|
|
2407
|
+
}, idleTimeoutMs);
|
|
2408
|
+
timer.unref();
|
|
2409
|
+
},
|
|
2410
|
+
clear: () => {
|
|
2411
|
+
if (timer === null)
|
|
2412
|
+
return;
|
|
2413
|
+
clearTimeout(timer);
|
|
2414
|
+
timer = null;
|
|
2415
|
+
},
|
|
2416
|
+
closed: () => isClosed
|
|
2417
|
+
};
|
|
2418
|
+
}
|
|
2419
|
+
// components/codegraph/src/mcp-unavailable.ts
|
|
2420
|
+
async function runUnavailableCodegraphMcpServer(options) {
|
|
2421
|
+
await runJsonRpcStdioServer({
|
|
2422
|
+
handler: handleUnavailableCodegraphMcpRequest,
|
|
2423
|
+
handlerOptions: {
|
|
2424
|
+
reason: options.reason.trim(),
|
|
2425
|
+
serverVersion: options.serverVersion
|
|
2426
|
+
},
|
|
2427
|
+
input: options.input,
|
|
2428
|
+
output: options.output
|
|
2429
|
+
});
|
|
2430
|
+
}
|
|
2431
|
+
async function handleUnavailableCodegraphMcpRequest(input, options) {
|
|
2432
|
+
if (!isPlainRecord(input)) {
|
|
2433
|
+
return errorResponse(null, -32600, "Invalid Request");
|
|
2434
|
+
}
|
|
2435
|
+
const id = jsonRpcId(input["id"]);
|
|
2436
|
+
const method = input["method"];
|
|
2437
|
+
if (method === "notifications/initialized")
|
|
2438
|
+
return;
|
|
2439
|
+
if (method === "ping")
|
|
2440
|
+
return successResponse(id, {});
|
|
2441
|
+
if (method === "initialize") {
|
|
2442
|
+
return successResponse(id, {
|
|
2443
|
+
capabilities: { tools: { listChanged: false } },
|
|
2444
|
+
protocolVersion: requestedProtocolVersion(input["params"]),
|
|
2445
|
+
serverInfo: { name: "codegraph", version: options.serverVersion }
|
|
2446
|
+
});
|
|
2447
|
+
}
|
|
2448
|
+
if (method === "tools/list") {
|
|
2449
|
+
return successResponse(id, { tools: [] });
|
|
2450
|
+
}
|
|
2451
|
+
if (method === "tools/call") {
|
|
2452
|
+
return successResponse(id, {
|
|
2453
|
+
content: [{ text: options.reason, type: "text" }],
|
|
2454
|
+
isError: true
|
|
2455
|
+
});
|
|
2456
|
+
}
|
|
2457
|
+
return errorResponse(id, -32601, `Method not found: ${String(method)}`);
|
|
2458
|
+
}
|
|
2459
|
+
function requestedProtocolVersion(params) {
|
|
2460
|
+
if (!isPlainRecord(params) || typeof params["protocolVersion"] !== "string")
|
|
2461
|
+
return "2024-11-05";
|
|
2462
|
+
return params["protocolVersion"];
|
|
2463
|
+
}
|
|
2464
|
+
|
|
2465
|
+
// components/codegraph/src/serve.ts
|
|
2190
2466
|
var CODEGRAPH_SKIP_HINT = `CodeGraph MCP skipped: codegraph binary not found. Install CodeGraph or set OMO_CODEGRAPH_BIN.
|
|
2191
2467
|
`;
|
|
2192
2468
|
var CODEGRAPH_DISABLED_HINT = `CodeGraph MCP skipped: disabled by OMO SOT config. Set [codex].codegraph.enabled=true to enable it.
|
|
@@ -2196,43 +2472,41 @@ var WINDOWS_CMD_EXTENSIONS2 = new Set([".bat", ".cmd"]);
|
|
|
2196
2472
|
var WINDOWS_NODE_SCRIPT_EXTENSIONS = new Set([".cjs", ".js", ".mjs"]);
|
|
2197
2473
|
async function runCodegraphServe(options = {}) {
|
|
2198
2474
|
const env = options.env ?? processEnv3;
|
|
2199
|
-
const homeDir = options.homeDir ??
|
|
2475
|
+
const homeDir = options.homeDir ?? homedir10();
|
|
2200
2476
|
const config = options.config ?? getCodexOmoConfig({ cwd: options.cwd ?? processCwd3(), env, homeDir });
|
|
2201
2477
|
const codegraphConfig = config.codegraph ?? {};
|
|
2202
2478
|
if (codegraphConfig.enabled === false) {
|
|
2203
|
-
|
|
2204
|
-
return 1;
|
|
2479
|
+
return runUnavailableMcp(CODEGRAPH_DISABLED_HINT, options);
|
|
2205
2480
|
}
|
|
2481
|
+
const trustedInstallDir = config.trustedCodegraphInstallDir;
|
|
2206
2482
|
const resolutionOptions = {
|
|
2207
2483
|
env,
|
|
2208
2484
|
homeDir,
|
|
2209
|
-
provisioned: () => provisionedBinFromInstallDir2(
|
|
2485
|
+
provisioned: () => provisionedBinFromInstallDir2(trustedInstallDir)
|
|
2210
2486
|
};
|
|
2211
2487
|
let resolution = options.resolve?.(resolutionOptions) ?? resolveCodegraphCommand(resolutionOptions);
|
|
2212
2488
|
const nodeSupport = evaluateCodegraphNodeSupport({ env, nodeVersion: options.nodeVersion });
|
|
2213
2489
|
if (!resolution.exists || shouldSkipResolvedCommand(resolution, options.commandExists ?? existsSync7)) {
|
|
2214
2490
|
if (resolution.source === "path" && !nodeSupport.supported) {
|
|
2215
|
-
|
|
2216
|
-
return 1;
|
|
2491
|
+
return runUnavailableMcp(buildCodegraphNodeSkipHint(nodeSupport), options);
|
|
2217
2492
|
}
|
|
2218
2493
|
const provisioned = await provisionMissingCodegraph({
|
|
2219
2494
|
config: codegraphConfig,
|
|
2220
2495
|
ensureProvisioned: options.ensureProvisioned ?? ensureCodegraphProvisioned,
|
|
2221
2496
|
homeDir,
|
|
2222
|
-
resolution
|
|
2497
|
+
resolution,
|
|
2498
|
+
...trustedInstallDir === undefined ? {} : { trustedInstallDir }
|
|
2223
2499
|
});
|
|
2224
2500
|
if (provisioned === null) {
|
|
2225
|
-
|
|
2226
|
-
return 1;
|
|
2501
|
+
return runUnavailableMcp(CODEGRAPH_SKIP_HINT, options);
|
|
2227
2502
|
}
|
|
2228
2503
|
resolution = provisioned;
|
|
2229
2504
|
}
|
|
2230
2505
|
if (codegraphCommandRequiresSupportedLocalNode(resolution) && !nodeSupport.supported) {
|
|
2231
|
-
|
|
2232
|
-
return 1;
|
|
2506
|
+
return runUnavailableMcp(buildCodegraphNodeSkipHint(nodeSupport), options);
|
|
2233
2507
|
}
|
|
2234
2508
|
const runProcess = options.runProcess ?? runChildProcess;
|
|
2235
|
-
const codegraphEnv =
|
|
2509
|
+
const codegraphEnv = codegraphEnvForConfig2(trustedInstallDir, homeDir, options.buildEnv);
|
|
2236
2510
|
const mergedEnv = {
|
|
2237
2511
|
...env,
|
|
2238
2512
|
...codegraphEnv
|
|
@@ -2242,12 +2516,22 @@ async function runCodegraphServe(options = {}) {
|
|
|
2242
2516
|
stdio: "inherit"
|
|
2243
2517
|
});
|
|
2244
2518
|
}
|
|
2519
|
+
async function runUnavailableMcp(reason, options) {
|
|
2520
|
+
(options.stderr ?? processStderr2).write(reason);
|
|
2521
|
+
await runUnavailableCodegraphMcpServer({
|
|
2522
|
+
input: options.stdin ?? processStdin2,
|
|
2523
|
+
output: options.stdout ?? processStdout2,
|
|
2524
|
+
reason,
|
|
2525
|
+
serverVersion: CODEGRAPH_VERSION2
|
|
2526
|
+
});
|
|
2527
|
+
return 0;
|
|
2528
|
+
}
|
|
2245
2529
|
async function provisionMissingCodegraph(options) {
|
|
2246
2530
|
if (options.resolution.source === "env")
|
|
2247
2531
|
return null;
|
|
2248
2532
|
if (options.config.auto_provision === false)
|
|
2249
2533
|
return null;
|
|
2250
|
-
const installDir = options.
|
|
2534
|
+
const installDir = options.trustedInstallDir ?? join8(options.homeDir, ".omo", "codegraph");
|
|
2251
2535
|
const result = await options.ensureProvisioned({
|
|
2252
2536
|
installDir,
|
|
2253
2537
|
lockDir: join8(installDir, ".locks"),
|
|
@@ -2267,9 +2551,9 @@ function shouldSkipResolvedCommand(resolution, commandExists) {
|
|
|
2267
2551
|
function looksLikePath2(command) {
|
|
2268
2552
|
return command.includes("/") || command.includes("\\");
|
|
2269
2553
|
}
|
|
2270
|
-
function
|
|
2554
|
+
function codegraphEnvForConfig2(trustedInstallDir, homeDir, buildEnv) {
|
|
2271
2555
|
const env = buildEnv?.({ homeDir }) ?? buildCodegraphEnv({ homeDir });
|
|
2272
|
-
return
|
|
2556
|
+
return trustedInstallDir === undefined ? env : { ...env, CODEGRAPH_INSTALL_DIR: trustedInstallDir };
|
|
2273
2557
|
}
|
|
2274
2558
|
function provisionedBinFromInstallDir2(installDir) {
|
|
2275
2559
|
if (installDir === undefined)
|