oh-my-opencode 4.15.1 → 4.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/doctor/checks/tui-plugin-config.d.ts +4 -4
- package/dist/cli/index.js +673 -678
- package/dist/cli/install-senpi/index.d.ts +1 -0
- package/dist/cli/run/poll-for-completion.d.ts +4 -0
- package/dist/cli/run/session-resolver.d.ts +1 -0
- package/dist/cli/senpi-platform-flag.d.ts +4 -0
- package/dist/cli/types.d.ts +2 -1
- package/dist/cli-node/index.js +673 -678
- package/dist/features/background-agent/manager.d.ts +16 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/aggressive-truncation-strategy.d.ts +1 -0
- package/dist/index.js +1334 -1146
- package/dist/skills/debugging/references/methodology/06-fix.md +6 -0
- package/dist/skills/frontend/ATTRIBUTION.md +10 -1
- package/dist/skills/frontend/SKILL.md +8 -3
- package/dist/skills/frontend/references/design/README.md +1 -1
- package/dist/skills/frontend/references/design/_INDEX.md +1 -1
- package/dist/skills/frontend/references/design/lazyweb.md +77 -0
- package/dist/skills/frontend/references/design/stitch-design-example.md +121 -0
- package/dist/skills/programming/SKILL.md +10 -1
- package/dist/skills/programming/references/logging.md +91 -0
- package/dist/skills/ulw-plan/SKILL.md +5 -5
- package/dist/skills/ulw-plan/references/full-workflow.md +7 -7
- package/dist/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/dist/skills/ulw-research/ATTRIBUTION.md +2 -2
- package/dist/skills/ulw-research/SKILL.md +28 -7
- package/dist/tools/skill/description-formatter.d.ts +1 -0
- package/dist/tools/skill/description-formatter.test-support.d.ts +9 -0
- package/dist/tools/skill/zauc-mocks-skill-tools/test-support.d.ts +25 -0
- package/dist/tui.js +121 -419
- package/package.json +32 -15
- package/packages/git-bash-mcp/dist/cli.js +2 -2
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/AGENTS.md +55 -0
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +19 -16
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/AGENTS.md +51 -0
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +936 -248
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +233 -135
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/src/cache-gc.ts +29 -0
- package/packages/omo-codex/plugin/components/codegraph/src/cli.ts +13 -0
- package/packages/omo-codex/plugin/components/codegraph/src/hook-sweep.ts +25 -0
- package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +3 -1
- package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +30 -1
- package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +16 -2
- package/packages/omo-codex/plugin/components/codegraph/src/sweep-cli.ts +80 -0
- package/packages/omo-codex/plugin/components/codegraph/test/cache-gc.test.ts +34 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-exclusion.test.ts +107 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-registration.test.ts +26 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-sweep.test.ts +29 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +8 -21
- package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +108 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve-built-wrapper.test.ts +76 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +17 -111
- package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +1 -1
- package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +45 -67
- package/packages/omo-codex/plugin/components/codegraph/test/sweep-cli.test.ts +56 -0
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/AGENTS.md +31 -0
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/AGENTS.md +45 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +37 -102
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/AGENTS.md +46 -0
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +6 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +6 -0
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +5 -2
- package/packages/omo-codex/plugin/components/ultrawork/CHANGELOG.md +2 -0
- package/packages/omo-codex/plugin/components/ultrawork/README.md +3 -3
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +51 -2
- package/packages/omo-codex/plugin/components/ultrawork/package.json +2 -1
- package/packages/omo-codex/plugin/components/ultrawork/scripts/sync-directive.mjs +14 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +380 -0
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +5 -2
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +4 -4
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +5 -3
- package/packages/omo-codex/plugin/components/ultrawork/src/skill-pointer.ts +56 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +4 -4
- package/packages/omo-codex/plugin/components/ultrawork/test/directive-source.test.ts +12 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +1 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/skill-pointer.test.ts +82 -0
- package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +56 -5
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +5 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.d.ts +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.js +5 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-skill-pointer.d.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-skill-pointer.js +46 -0
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +5 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-directive.ts +9 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-skill-pointer.ts +55 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +49 -0
- package/packages/omo-codex/plugin/package-lock.json +13 -13
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/build-components.mjs +63 -17
- package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +10 -3
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +1 -0
- package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +18 -0
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/06-fix.md +6 -0
- package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +10 -1
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +8 -3
- package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/lazyweb.md +77 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/stitch-design-example.md +121 -0
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +10 -1
- package/packages/omo-codex/plugin/skills/programming/references/logging.md +91 -0
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +380 -0
- package/packages/omo-codex/plugin/skills/ultrawork/agents/openai.yaml +2 -0
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +5 -2
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +4 -4
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/ATTRIBUTION.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +28 -7
- package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +2 -0
- package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +56 -0
- package/packages/omo-codex/plugin/test/ulw-research-epistemic-contract.test.mjs +98 -0
- package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +6 -6
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +259 -3954
- package/packages/shared-skills/skills/debugging/references/methodology/06-fix.md +6 -0
- package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +10 -1
- package/packages/shared-skills/skills/frontend/SKILL.md +8 -3
- package/packages/shared-skills/skills/frontend/references/design/README.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/lazyweb.md +77 -0
- package/packages/shared-skills/skills/frontend/references/design/stitch-design-example.md +121 -0
- package/packages/shared-skills/skills/programming/SKILL.md +10 -1
- package/packages/shared-skills/skills/programming/references/logging.md +91 -0
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +5 -5
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +7 -7
- package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/packages/shared-skills/skills/ulw-research/ATTRIBUTION.md +2 -2
- package/packages/shared-skills/skills/ulw-research/SKILL.md +28 -7
package/dist/cli-node/index.js
CHANGED
|
@@ -2146,7 +2146,7 @@ var package_default;
|
|
|
2146
2146
|
var init_package = __esm(() => {
|
|
2147
2147
|
package_default = {
|
|
2148
2148
|
name: "oh-my-opencode",
|
|
2149
|
-
version: "4.
|
|
2149
|
+
version: "4.16.0",
|
|
2150
2150
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
2151
2151
|
main: "./dist/index.js",
|
|
2152
2152
|
types: "dist/index.d.ts",
|
|
@@ -2160,6 +2160,7 @@ var init_package = __esm(() => {
|
|
|
2160
2160
|
"packages/lsp-core",
|
|
2161
2161
|
"packages/utils",
|
|
2162
2162
|
"packages/model-core",
|
|
2163
|
+
"packages/omo-config-core",
|
|
2163
2164
|
"packages/prompts-core",
|
|
2164
2165
|
"packages/comment-checker-core",
|
|
2165
2166
|
"packages/hashline-core",
|
|
@@ -2173,6 +2174,10 @@ var init_package = __esm(() => {
|
|
|
2173
2174
|
"packages/agents-md-core",
|
|
2174
2175
|
"packages/shared-skills",
|
|
2175
2176
|
"packages/omo-codex",
|
|
2177
|
+
"packages/omo-senpi",
|
|
2178
|
+
"packages/senpi-task",
|
|
2179
|
+
"packages/pi-goal",
|
|
2180
|
+
"packages/pi-webfetch",
|
|
2176
2181
|
"packages/omo-opencode"
|
|
2177
2182
|
],
|
|
2178
2183
|
bin: {
|
|
@@ -2229,6 +2234,7 @@ var init_package = __esm(() => {
|
|
|
2229
2234
|
"packages/omo-codex/plugin/.codex-plugin",
|
|
2230
2235
|
"!packages/omo-codex/plugin/node_modules",
|
|
2231
2236
|
"!packages/omo-codex/plugin/**/node_modules",
|
|
2237
|
+
"!packages/omo-codex/plugin/components/workflow-selector",
|
|
2232
2238
|
"packages/omo-codex/scripts",
|
|
2233
2239
|
"!packages/omo-codex/scripts/install"
|
|
2234
2240
|
],
|
|
@@ -2242,10 +2248,11 @@ var init_package = __esm(() => {
|
|
|
2242
2248
|
"./schema.json": "./dist/oh-my-opencode.schema.json"
|
|
2243
2249
|
},
|
|
2244
2250
|
scripts: {
|
|
2245
|
-
build: "bun run
|
|
2251
|
+
build: "bun run script/build.ts",
|
|
2246
2252
|
"build:cli-node": "bun run script/build-cli-node.ts",
|
|
2247
2253
|
"build:codex-install": "bun run script/build-codex-install.ts",
|
|
2248
2254
|
"build:codex-plugin": "npm --prefix packages/omo-codex/plugin ci && bun run --cwd packages/omo-codex/plugin build",
|
|
2255
|
+
"build:senpi-plugin": "node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/sync-skills.mjs && node packages/omo-senpi/plugin/scripts/embed-directive.mjs --check",
|
|
2249
2256
|
"build:materialize-frontend": "node packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs --strict",
|
|
2250
2257
|
"build:shared-skills-assets": "bun run build:materialize-frontend && rm -rf dist/skills && cp -R packages/shared-skills/skills dist/skills",
|
|
2251
2258
|
"build:lsp-tools-mcp": "npm --prefix packages/lsp-tools-mcp ci && npm --prefix packages/lsp-tools-mcp run build",
|
|
@@ -2262,10 +2269,11 @@ var init_package = __esm(() => {
|
|
|
2262
2269
|
prepublishOnly: "bun run clean && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && bun run build",
|
|
2263
2270
|
"test:model-capabilities": "bun test packages/model-core/src/model-capability-aliases.test.ts packages/model-core/src/model-capability-guardrails.test.ts packages/model-core/src/model-capabilities.test.ts packages/omo-opencode/src/cli/doctor/checks/model-resolution.test.ts --bail",
|
|
2264
2271
|
typecheck: "tsgo --noEmit && bun run typecheck:script && bun run typecheck:packages",
|
|
2265
|
-
"typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/delegate-core/tsconfig.json && tsgo --noEmit -p packages/mcp-stdio-core/tsconfig.json && tsgo --noEmit -p packages/mcp-client-core/tsconfig.json && tsgo --noEmit -p packages/git-bash-mcp/tsconfig.json && tsgo --noEmit -p packages/lsp-core/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/prompts-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/hashline-core/tsconfig.json && tsgo --noEmit -p packages/tmux-core/tsconfig.json && tsgo --noEmit -p packages/team-core/tsconfig.json && tsgo --noEmit -p packages/openclaw-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/telemetry-core/tsconfig.json && tsgo --noEmit -p packages/claude-code-compat-core/tsconfig.json && tsgo --noEmit -p packages/skills-loader-core/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json && tsgo --noEmit -p packages/omo-codex/plugin/shared/tsconfig.json && tsgo --noEmit -p packages/omo-codex/tsconfig.json && tsgo --noEmit -p packages/omo-opencode/tsconfig.json",
|
|
2272
|
+
"typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/delegate-core/tsconfig.json && tsgo --noEmit -p packages/mcp-stdio-core/tsconfig.json && tsgo --noEmit -p packages/mcp-client-core/tsconfig.json && tsgo --noEmit -p packages/git-bash-mcp/tsconfig.json && tsgo --noEmit -p packages/lsp-core/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/omo-config-core/tsconfig.json && tsgo --noEmit -p packages/prompts-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/hashline-core/tsconfig.json && tsgo --noEmit -p packages/tmux-core/tsconfig.json && tsgo --noEmit -p packages/team-core/tsconfig.json && tsgo --noEmit -p packages/openclaw-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/telemetry-core/tsconfig.json && tsgo --noEmit -p packages/claude-code-compat-core/tsconfig.json && tsgo --noEmit -p packages/skills-loader-core/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json && tsgo --noEmit -p packages/omo-codex/plugin/shared/tsconfig.json && tsgo --noEmit -p packages/omo-codex/tsconfig.json && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && tsgo --noEmit -p packages/senpi-task/tsconfig.json && tsgo --noEmit -p packages/pi-goal/tsconfig.json && tsgo --noEmit -p packages/pi-webfetch/tsconfig.json && tsgo --noEmit -p packages/omo-opencode/tsconfig.json",
|
|
2266
2273
|
"typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
|
|
2267
2274
|
test: "bun test",
|
|
2268
2275
|
"test:codex": "bun run build:codex-install && bun run build:git-bash-mcp && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && npm --prefix packages/lsp-tools-mcp test && npm --prefix packages/omo-codex/plugin ci && bun run --cwd packages/omo-codex/plugin build && npm --prefix packages/omo-codex/plugin/components/codegraph run typecheck && npm --prefix packages/omo-codex/plugin/components/codegraph test && node scripts/check-third-party-notices.mjs --ship && bun test packages/omo-opencode/src/cli/cli-installer.platform.test.ts packages/omo-codex/src/install/codex-cache.test.ts packages/omo-codex/src/install/codex-cleanup.test.ts packages/omo-codex/src/install/codex-config-agent-cleanup.test.ts packages/omo-codex/src/install/codex-config-autonomous-features.test.ts packages/omo-codex/src/install/codex-config-reasoning.test.ts packages/omo-codex/src/install/codex-config-toml.test.ts packages/omo-codex/src/install/codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex.test.ts packages/omo-codex/src/install/install-codex-packaged.test.ts packages/omo-codex/src/install/link-cached-plugin-agents.test.ts packages/omo-codex/src/**/*.test.ts packages/utils/src/jsonc-parser.test.ts packages/utils/src/frontmatter.test.ts packages/hashline-core/src/hash-computation.test.ts packages/hashline-core/src/smoke-untested-modules.test.ts packages/rules-engine/src/index.test.ts packages/rules-engine/src/security-boundary.test.ts packages/agents-md-core/src/injector.test.ts packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts && node --test packages/omo-codex/plugin/test/*.test.mjs packages/omo-codex/scripts/install-cache-copy.test.mjs packages/omo-codex/scripts/install-cli-args.test.mjs packages/omo-codex/scripts/install-delegated-command.test.mjs packages/omo-codex/scripts/install-config-autonomous-features.test.mjs packages/omo-codex/scripts/install-config-autonomous.test.mjs packages/omo-codex/scripts/install-config-reasoning.test.mjs packages/omo-codex/scripts/install-config.test.mjs packages/omo-codex/scripts/install-hook-targets.test.mjs packages/omo-codex/scripts/install-project-local-cleanup.test.mjs packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs packages/omo-codex/scripts/install-local-entrypoint.test.mjs packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs packages/omo-codex/scripts/install-local.test.mjs packages/omo-codex/scripts/install-marketplace-cache.test.mjs packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs packages/omo-codex/scripts/install-mcp-runtime.test.mjs packages/omo-codex/scripts/install-packaged-local.test.mjs packages/omo-codex/scripts/install-generated-bundle.test.mjs packages/omo-codex/scripts/install-agent-links.test.mjs packages/omo-codex/scripts/install-bin-links.test.mjs",
|
|
2276
|
+
"test:senpi": "node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/sync-skills.mjs && node packages/omo-senpi/plugin/scripts/embed-directive.mjs --check && bun test packages/omo-senpi",
|
|
2269
2277
|
"test:windows-codex": "bun run test:codex",
|
|
2270
2278
|
"build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build"
|
|
2271
2279
|
},
|
|
@@ -2324,7 +2332,12 @@ var init_package = __esm(() => {
|
|
|
2324
2332
|
"@oh-my-opencode/team-core": "workspace:*",
|
|
2325
2333
|
"@oh-my-opencode/openclaw-core": "workspace:*",
|
|
2326
2334
|
"@oh-my-opencode/model-core": "workspace:*",
|
|
2335
|
+
"@oh-my-opencode/omo-config-core": "workspace:*",
|
|
2327
2336
|
"@oh-my-opencode/omo-codex": "workspace:*",
|
|
2337
|
+
"@oh-my-opencode/omo-senpi": "workspace:*",
|
|
2338
|
+
"@oh-my-opencode/senpi-task": "workspace:*",
|
|
2339
|
+
"@oh-my-opencode/pi-goal": "workspace:*",
|
|
2340
|
+
"@oh-my-opencode/pi-webfetch": "workspace:*",
|
|
2328
2341
|
"@oh-my-opencode/prompts-core": "workspace:*",
|
|
2329
2342
|
"@oh-my-opencode/rules-engine": "workspace:*",
|
|
2330
2343
|
"@oh-my-opencode/shared-skills": "workspace:*",
|
|
@@ -2337,20 +2350,24 @@ var init_package = __esm(() => {
|
|
|
2337
2350
|
typescript: "^6.0.3"
|
|
2338
2351
|
},
|
|
2339
2352
|
optionalDependencies: {
|
|
2340
|
-
"oh-my-opencode-darwin-arm64": "4.
|
|
2341
|
-
"oh-my-opencode-darwin-x64": "4.
|
|
2342
|
-
"oh-my-opencode-darwin-x64-baseline": "4.
|
|
2343
|
-
"oh-my-opencode-linux-arm64": "4.
|
|
2344
|
-
"oh-my-opencode-linux-arm64-musl": "4.
|
|
2345
|
-
"oh-my-opencode-linux-x64": "4.
|
|
2346
|
-
"oh-my-opencode-linux-x64-baseline": "4.
|
|
2347
|
-
"oh-my-opencode-linux-x64-musl": "4.
|
|
2348
|
-
"oh-my-opencode-linux-x64-musl-baseline": "4.
|
|
2349
|
-
"oh-my-opencode-windows-arm64": "4.
|
|
2350
|
-
"oh-my-opencode-windows-x64": "4.
|
|
2351
|
-
"oh-my-opencode-windows-x64-baseline": "4.
|
|
2353
|
+
"oh-my-opencode-darwin-arm64": "4.16.0",
|
|
2354
|
+
"oh-my-opencode-darwin-x64": "4.16.0",
|
|
2355
|
+
"oh-my-opencode-darwin-x64-baseline": "4.16.0",
|
|
2356
|
+
"oh-my-opencode-linux-arm64": "4.16.0",
|
|
2357
|
+
"oh-my-opencode-linux-arm64-musl": "4.16.0",
|
|
2358
|
+
"oh-my-opencode-linux-x64": "4.16.0",
|
|
2359
|
+
"oh-my-opencode-linux-x64-baseline": "4.16.0",
|
|
2360
|
+
"oh-my-opencode-linux-x64-musl": "4.16.0",
|
|
2361
|
+
"oh-my-opencode-linux-x64-musl-baseline": "4.16.0",
|
|
2362
|
+
"oh-my-opencode-windows-arm64": "4.16.0",
|
|
2363
|
+
"oh-my-opencode-windows-x64": "4.16.0",
|
|
2364
|
+
"oh-my-opencode-windows-x64-baseline": "4.16.0"
|
|
2352
2365
|
},
|
|
2353
2366
|
overrides: {
|
|
2367
|
+
"@earendil-works/pi-agent-core": "0.80.3",
|
|
2368
|
+
"@earendil-works/pi-ai": "0.80.3",
|
|
2369
|
+
"@earendil-works/pi-coding-agent": "0.80.3",
|
|
2370
|
+
"@earendil-works/pi-tui": "0.80.3",
|
|
2354
2371
|
hono: "^4.12.18",
|
|
2355
2372
|
"@hono/node-server": "^1.19.13",
|
|
2356
2373
|
"express-rate-limit": "^8.5.1",
|
|
@@ -2530,14 +2547,10 @@ var init_config_section_parser = __esm(() => {
|
|
|
2530
2547
|
});
|
|
2531
2548
|
|
|
2532
2549
|
// packages/utils/src/env-expansion.ts
|
|
2533
|
-
var init_env_expansion =
|
|
2534
|
-
init_deep_merge();
|
|
2535
|
-
});
|
|
2550
|
+
var init_env_expansion = () => {};
|
|
2536
2551
|
|
|
2537
2552
|
// packages/utils/src/snake-case.ts
|
|
2538
|
-
var init_snake_case =
|
|
2539
|
-
init_deep_merge();
|
|
2540
|
-
});
|
|
2553
|
+
var init_snake_case = () => {};
|
|
2541
2554
|
|
|
2542
2555
|
// packages/utils/src/record-type-guard.ts
|
|
2543
2556
|
function isRecord(value) {
|
|
@@ -5635,6 +5648,7 @@ var init_port_utils = () => {};
|
|
|
5635
5648
|
|
|
5636
5649
|
// packages/utils/src/tool-name.ts
|
|
5637
5650
|
var init_tool_name = () => {};
|
|
5651
|
+
|
|
5638
5652
|
// node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
5639
5653
|
function createScanner(text, ignoreTrivia = false) {
|
|
5640
5654
|
const len = text.length;
|
|
@@ -7116,27 +7130,13 @@ function log(message, data) {
|
|
|
7116
7130
|
var sharedSubunitLogger = () => {};
|
|
7117
7131
|
|
|
7118
7132
|
// packages/utils/src/omo-config.ts
|
|
7119
|
-
var
|
|
7120
|
-
var init_omo_config = __esm(() => {
|
|
7121
|
-
HARNESS_IDS = ["codex", "opencode", "omo"];
|
|
7122
|
-
});
|
|
7123
|
-
|
|
7124
|
-
// packages/utils/src/omo-config/env-overrides.ts
|
|
7125
|
-
var init_env_overrides = () => {};
|
|
7133
|
+
var init_omo_config = () => {};
|
|
7126
7134
|
|
|
7127
7135
|
// packages/utils/src/omo-config/resolve.ts
|
|
7128
7136
|
var init_resolve = () => {};
|
|
7129
7137
|
|
|
7130
7138
|
// packages/utils/src/omo-config/loader.ts
|
|
7131
|
-
var
|
|
7132
|
-
var init_loader = __esm(() => {
|
|
7133
|
-
init_deep_merge();
|
|
7134
|
-
init_jsonc_parser();
|
|
7135
|
-
init_omo_config();
|
|
7136
|
-
init_env_overrides();
|
|
7137
|
-
init_resolve();
|
|
7138
|
-
HARNESS_BLOCK_KEYS = HARNESS_IDS.map((harness) => `[${harness}]`);
|
|
7139
|
-
});
|
|
7139
|
+
var init_loader = () => {};
|
|
7140
7140
|
|
|
7141
7141
|
// packages/utils/src/archive-entry-validator.ts
|
|
7142
7142
|
var init_archive_entry_validator = () => {};
|
|
@@ -7161,9 +7161,7 @@ function sgBinaryName(platform = process.platform) {
|
|
|
7161
7161
|
var init_sg_manifest = () => {};
|
|
7162
7162
|
|
|
7163
7163
|
// packages/utils/src/ast-grep/sg-provisioner.ts
|
|
7164
|
-
var init_sg_provisioner =
|
|
7165
|
-
init_sg_manifest();
|
|
7166
|
-
});
|
|
7164
|
+
var init_sg_provisioner = () => {};
|
|
7167
7165
|
|
|
7168
7166
|
// packages/utils/src/ast-grep/types.ts
|
|
7169
7167
|
var SG_PATH_ENV_KEY = "OMO_AST_GREP_SG_PATH";
|
|
@@ -7422,6 +7420,7 @@ var init_env = __esm(() => {
|
|
|
7422
7420
|
"CODEGRAPH_ALLOW_UNSAFE_NODE",
|
|
7423
7421
|
"CODEGRAPH_BIN",
|
|
7424
7422
|
"CODEGRAPH_FAKE_LOG",
|
|
7423
|
+
"CODEGRAPH_NO_DAEMON",
|
|
7425
7424
|
"CODEGRAPH_NODE_BIN",
|
|
7426
7425
|
"OMO_CODEGRAPH_BIN",
|
|
7427
7426
|
"OMO_CODEGRAPH_PROJECT_CWD",
|
|
@@ -7433,9 +7432,7 @@ var init_env = __esm(() => {
|
|
|
7433
7432
|
var init_workspace = () => {};
|
|
7434
7433
|
|
|
7435
7434
|
// packages/utils/src/codegraph/guidance.ts
|
|
7436
|
-
var init_guidance =
|
|
7437
|
-
init_workspace();
|
|
7438
|
-
});
|
|
7435
|
+
var init_guidance = () => {};
|
|
7439
7436
|
|
|
7440
7437
|
// packages/utils/src/codegraph/node-support.ts
|
|
7441
7438
|
function evaluateCodegraphNodeSupport(options = {}) {
|
|
@@ -7458,18 +7455,17 @@ function parseNodeMajor(version) {
|
|
|
7458
7455
|
}
|
|
7459
7456
|
var CODEGRAPH_MIN_NODE_MAJOR = 20, CODEGRAPH_BLOCKED_NODE_MAJOR = 25, CODEGRAPH_UNSAFE_NODE_ENV = "CODEGRAPH_ALLOW_UNSAFE_NODE", CODEGRAPH_NODE_BIN_ENV = "CODEGRAPH_NODE_BIN";
|
|
7460
7457
|
|
|
7461
|
-
// packages/utils/src/codegraph/manifest.ts
|
|
7462
|
-
var init_manifest = () => {};
|
|
7463
|
-
|
|
7464
7458
|
// packages/utils/src/codegraph/provision.ts
|
|
7465
7459
|
import { execFile } from "node:child_process";
|
|
7466
7460
|
import { promisify } from "node:util";
|
|
7467
7461
|
var execFileAsync;
|
|
7468
7462
|
var init_provision = __esm(() => {
|
|
7469
|
-
init_manifest();
|
|
7470
7463
|
execFileAsync = promisify(execFile);
|
|
7471
7464
|
});
|
|
7472
7465
|
|
|
7466
|
+
// packages/utils/src/codegraph/process-sweep.ts
|
|
7467
|
+
var init_process_sweep = () => {};
|
|
7468
|
+
|
|
7473
7469
|
// packages/utils/src/codegraph/resolve.ts
|
|
7474
7470
|
import { existsSync as existsSync7 } from "node:fs";
|
|
7475
7471
|
import { spawnSync } from "node:child_process";
|
|
@@ -7567,56 +7563,16 @@ var init_codegraph = __esm(() => {
|
|
|
7567
7563
|
init_env();
|
|
7568
7564
|
init_guidance();
|
|
7569
7565
|
init_provision();
|
|
7566
|
+
init_process_sweep();
|
|
7570
7567
|
init_resolve2();
|
|
7571
7568
|
init_workspace();
|
|
7572
7569
|
});
|
|
7573
7570
|
|
|
7574
|
-
// packages/utils/src/command-executor/home-directory.ts
|
|
7575
|
-
var init_home_directory = () => {};
|
|
7576
|
-
|
|
7577
|
-
// packages/utils/src/command-executor/shell-path.ts
|
|
7578
|
-
var init_shell_path = () => {};
|
|
7579
|
-
|
|
7580
|
-
// packages/utils/src/command-executor/execute-hook-command.ts
|
|
7581
|
-
var init_execute_hook_command = __esm(() => {
|
|
7582
|
-
init_home_directory();
|
|
7583
|
-
init_shell_path();
|
|
7584
|
-
});
|
|
7585
|
-
|
|
7586
|
-
// packages/utils/src/command-executor/execute-command.ts
|
|
7587
|
-
import { exec } from "node:child_process";
|
|
7588
|
-
import { promisify as promisify2 } from "node:util";
|
|
7589
|
-
var execAsync;
|
|
7590
|
-
var init_execute_command = __esm(() => {
|
|
7591
|
-
execAsync = promisify2(exec);
|
|
7592
|
-
});
|
|
7593
|
-
|
|
7594
|
-
// packages/utils/src/command-executor/embedded-commands.ts
|
|
7595
|
-
var init_embedded_commands = () => {};
|
|
7596
|
-
|
|
7597
|
-
// packages/utils/src/command-executor/resolve-commands-in-text.ts
|
|
7598
|
-
var init_resolve_commands_in_text = __esm(() => {
|
|
7599
|
-
init_execute_command();
|
|
7600
|
-
init_embedded_commands();
|
|
7601
|
-
});
|
|
7602
|
-
|
|
7603
7571
|
// packages/utils/src/command-executor.ts
|
|
7604
|
-
var init_command_executor =
|
|
7605
|
-
|
|
7606
|
-
init_execute_command();
|
|
7607
|
-
init_resolve_commands_in_text();
|
|
7608
|
-
});
|
|
7609
|
-
// packages/utils/src/git-worktree/parse-status-porcelain.ts
|
|
7610
|
-
var init_parse_status_porcelain = () => {};
|
|
7611
|
-
// packages/utils/src/git-worktree/collect-git-diff-stats.ts
|
|
7612
|
-
var init_collect_git_diff_stats = __esm(() => {
|
|
7613
|
-
init_parse_status_porcelain();
|
|
7614
|
-
});
|
|
7572
|
+
var init_command_executor = () => {};
|
|
7573
|
+
|
|
7615
7574
|
// packages/utils/src/git-worktree/index.ts
|
|
7616
|
-
var init_git_worktree =
|
|
7617
|
-
init_parse_status_porcelain();
|
|
7618
|
-
init_collect_git_diff_stats();
|
|
7619
|
-
});
|
|
7575
|
+
var init_git_worktree = () => {};
|
|
7620
7576
|
|
|
7621
7577
|
// packages/utils/src/internal-initiator-marker.ts
|
|
7622
7578
|
function hasInternalInitiatorMarker(text) {
|
|
@@ -8037,12 +7993,9 @@ var init_config_migration = __esm(() => {
|
|
|
8037
7993
|
|
|
8038
7994
|
// packages/utils/src/migration.ts
|
|
8039
7995
|
var init_migration = __esm(() => {
|
|
8040
|
-
init_agent_names();
|
|
8041
|
-
init_hook_names();
|
|
8042
|
-
init_model_versions();
|
|
8043
|
-
init_agent_category();
|
|
8044
7996
|
init_config_migration();
|
|
8045
7997
|
});
|
|
7998
|
+
|
|
8046
7999
|
// packages/utils/src/prompt-async-gate/route-resolver.ts
|
|
8047
8000
|
function identityRoute(client) {
|
|
8048
8001
|
return { client, route: "in-process", reason: "identity" };
|
|
@@ -9104,7 +9057,6 @@ var init_prompt_async_gate = __esm(() => {
|
|
|
9104
9057
|
init_route_resolver();
|
|
9105
9058
|
init_session_idle_settle();
|
|
9106
9059
|
init_queue();
|
|
9107
|
-
init_recent_dispatches();
|
|
9108
9060
|
init_reservations();
|
|
9109
9061
|
init_session_idle_dispatch();
|
|
9110
9062
|
init_semantic_dedupe();
|
|
@@ -9137,39 +9089,8 @@ function isAmbiguousPostDispatchPromptFailure(result) {
|
|
|
9137
9089
|
return result.dispatchAttempted === true && isAmbiguousPromptDispatchFailure(result.error);
|
|
9138
9090
|
}
|
|
9139
9091
|
|
|
9140
|
-
// packages/utils/src/zip-entry-listing/python-zip-entry-listing.ts
|
|
9141
|
-
var init_python_zip_entry_listing = __esm(() => {
|
|
9142
|
-
init_runtime();
|
|
9143
|
-
});
|
|
9144
|
-
|
|
9145
|
-
// packages/utils/src/zip-entry-listing/powershell-zip-entry-listing.ts
|
|
9146
|
-
var init_powershell_zip_entry_listing = __esm(() => {
|
|
9147
|
-
init_runtime();
|
|
9148
|
-
});
|
|
9149
|
-
|
|
9150
|
-
// packages/utils/src/zip-entry-listing/tar-zip-entry-listing.ts
|
|
9151
|
-
var init_tar_zip_entry_listing = __esm(() => {
|
|
9152
|
-
init_runtime();
|
|
9153
|
-
});
|
|
9154
|
-
|
|
9155
|
-
// packages/utils/src/zip-entry-listing/read-zip-symlink-target.ts
|
|
9156
|
-
var init_read_zip_symlink_target = __esm(() => {
|
|
9157
|
-
init_runtime();
|
|
9158
|
-
});
|
|
9159
|
-
|
|
9160
|
-
// packages/utils/src/zip-entry-listing/zipinfo-zip-entry-listing.ts
|
|
9161
|
-
var init_zipinfo_zip_entry_listing = __esm(() => {
|
|
9162
|
-
init_runtime();
|
|
9163
|
-
init_read_zip_symlink_target();
|
|
9164
|
-
});
|
|
9165
|
-
|
|
9166
9092
|
// packages/utils/src/zip-entry-listing.ts
|
|
9167
|
-
var init_zip_entry_listing =
|
|
9168
|
-
init_python_zip_entry_listing();
|
|
9169
|
-
init_powershell_zip_entry_listing();
|
|
9170
|
-
init_tar_zip_entry_listing();
|
|
9171
|
-
init_zipinfo_zip_entry_listing();
|
|
9172
|
-
});
|
|
9093
|
+
var init_zip_entry_listing = () => {};
|
|
9173
9094
|
|
|
9174
9095
|
// packages/utils/src/index.ts
|
|
9175
9096
|
var init_src = __esm(() => {
|
|
@@ -9817,10 +9738,7 @@ var init_model_capability_heuristics = __esm(() => {
|
|
|
9817
9738
|
});
|
|
9818
9739
|
|
|
9819
9740
|
// packages/model-core/src/model-capability-guardrails.ts
|
|
9820
|
-
var init_model_capability_guardrails =
|
|
9821
|
-
init_model_capability_aliases();
|
|
9822
|
-
init_model_requirements();
|
|
9823
|
-
});
|
|
9741
|
+
var init_model_capability_guardrails = () => {};
|
|
9824
9742
|
|
|
9825
9743
|
// packages/model-core/src/model-settings-compatibility.ts
|
|
9826
9744
|
function downgradeWithinLadder(value, allowed, ladder) {
|
|
@@ -9955,6 +9873,7 @@ var init_model_settings_compatibility = __esm(() => {
|
|
|
9955
9873
|
VARIANT_LADDER = ["low", "medium", "high", "xhigh", "max"];
|
|
9956
9874
|
REASONING_LADDER = ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
9957
9875
|
});
|
|
9876
|
+
|
|
9958
9877
|
// packages/model-core/src/provider-model-id-transform.ts
|
|
9959
9878
|
function inferSubProvider(model) {
|
|
9960
9879
|
if (model.startsWith("claude-"))
|
|
@@ -10014,11 +9933,6 @@ var init_provider_model_id_transform = __esm(() => {
|
|
|
10014
9933
|
GEMINI_3_FLASH_PREVIEW = /gemini-3-flash(?!-)/g;
|
|
10015
9934
|
});
|
|
10016
9935
|
|
|
10017
|
-
// packages/model-core/src/model-resolution-pipeline.ts
|
|
10018
|
-
var init_model_resolution_pipeline = __esm(() => {
|
|
10019
|
-
init_provider_model_id_transform();
|
|
10020
|
-
});
|
|
10021
|
-
|
|
10022
9936
|
// packages/model-core/src/known-variants.ts
|
|
10023
9937
|
var KNOWN_VARIANTS;
|
|
10024
9938
|
var init_known_variants = __esm(() => {
|
|
@@ -10035,9 +9949,6 @@ var init_known_variants = __esm(() => {
|
|
|
10035
9949
|
]);
|
|
10036
9950
|
});
|
|
10037
9951
|
|
|
10038
|
-
// packages/model-core/src/connected-providers-cache.ts
|
|
10039
|
-
var init_connected_providers_cache = () => {};
|
|
10040
|
-
|
|
10041
9952
|
// packages/model-core/src/model-resolver.ts
|
|
10042
9953
|
function normalizeFallbackModels(models) {
|
|
10043
9954
|
if (!models)
|
|
@@ -10046,11 +9957,8 @@ function normalizeFallbackModels(models) {
|
|
|
10046
9957
|
return [models];
|
|
10047
9958
|
return models;
|
|
10048
9959
|
}
|
|
10049
|
-
var init_model_resolver =
|
|
10050
|
-
|
|
10051
|
-
init_known_variants();
|
|
10052
|
-
init_connected_providers_cache();
|
|
10053
|
-
});
|
|
9960
|
+
var init_model_resolver = () => {};
|
|
9961
|
+
|
|
10054
9962
|
// packages/model-core/src/model-string-parser.ts
|
|
10055
9963
|
var KNOWN_VARIANTS2;
|
|
10056
9964
|
var init_model_string_parser = __esm(() => {
|
|
@@ -10066,16 +9974,13 @@ var init_model_string_parser = __esm(() => {
|
|
|
10066
9974
|
"thinking"
|
|
10067
9975
|
]);
|
|
10068
9976
|
});
|
|
9977
|
+
|
|
10069
9978
|
// packages/model-core/src/fallback-chain-from-models.ts
|
|
10070
|
-
var init_fallback_chain_from_models =
|
|
10071
|
-
init_model_resolver();
|
|
10072
|
-
init_known_variants();
|
|
10073
|
-
});
|
|
9979
|
+
var init_fallback_chain_from_models = () => {};
|
|
10074
9980
|
|
|
10075
9981
|
// packages/model-core/src/model-error-classifier.ts
|
|
10076
9982
|
var RETRYABLE_ERROR_NAMES, STOP_ERROR_NAMES, NON_RETRYABLE_ERROR_NAMES;
|
|
10077
9983
|
var init_model_error_classifier = __esm(() => {
|
|
10078
|
-
init_connected_providers_cache();
|
|
10079
9984
|
RETRYABLE_ERROR_NAMES = new Set([
|
|
10080
9985
|
"providermodelnotfounderror",
|
|
10081
9986
|
"ratelimiterror",
|
|
@@ -10106,21 +10011,13 @@ var init_runtime_fallback_auto_retry_signal = () => {};
|
|
|
10106
10011
|
var init_runtime_fallback_error_shape = () => {};
|
|
10107
10012
|
|
|
10108
10013
|
// packages/model-core/src/runtime-fallback-error-classifier.ts
|
|
10109
|
-
var init_runtime_fallback_error_classifier =
|
|
10110
|
-
init_runtime_fallback_auto_retry_signal();
|
|
10111
|
-
init_runtime_fallback_error_shape();
|
|
10112
|
-
init_runtime_fallback_error_shape();
|
|
10113
|
-
});
|
|
10014
|
+
var init_runtime_fallback_error_classifier = () => {};
|
|
10114
10015
|
|
|
10115
10016
|
// packages/model-core/src/provider-exhaustion-fallback-policy.ts
|
|
10116
|
-
var init_provider_exhaustion_fallback_policy =
|
|
10117
|
-
init_runtime_fallback_error_classifier();
|
|
10118
|
-
});
|
|
10017
|
+
var init_provider_exhaustion_fallback_policy = () => {};
|
|
10119
10018
|
|
|
10120
10019
|
// packages/model-core/src/runtime-fallback-model.ts
|
|
10121
|
-
var init_runtime_fallback_model =
|
|
10122
|
-
init_model_string_parser();
|
|
10123
|
-
});
|
|
10020
|
+
var init_runtime_fallback_model = () => {};
|
|
10124
10021
|
|
|
10125
10022
|
// packages/model-core/src/model-capabilities/supplemental-entries.ts
|
|
10126
10023
|
var SUPPLEMENTAL_MODEL_CAPABILITIES;
|
|
@@ -10527,11 +10424,11 @@ async function fetchModelCapabilitiesSnapshot(args = {}) {
|
|
|
10527
10424
|
};
|
|
10528
10425
|
}
|
|
10529
10426
|
var MODELS_DEV_SOURCE_URL = "https://models.dev/api.json";
|
|
10427
|
+
|
|
10530
10428
|
// packages/model-core/src/index.ts
|
|
10531
10429
|
var init_src2 = __esm(() => {
|
|
10532
10430
|
init_model_resolver();
|
|
10533
10431
|
init_provider_model_id_transform();
|
|
10534
|
-
init_model_resolution_pipeline();
|
|
10535
10432
|
init_model_requirements();
|
|
10536
10433
|
init_model_family_detectors();
|
|
10537
10434
|
init_model_capability_aliases();
|
|
@@ -10552,19 +10449,13 @@ var init_src2 = __esm(() => {
|
|
|
10552
10449
|
});
|
|
10553
10450
|
|
|
10554
10451
|
// packages/omo-opencode/src/shared/model-sanitizer.ts
|
|
10555
|
-
var init_model_sanitizer =
|
|
10556
|
-
init_src2();
|
|
10557
|
-
});
|
|
10452
|
+
var init_model_sanitizer = () => {};
|
|
10558
10453
|
|
|
10559
10454
|
// packages/omo-opencode/src/shared/snake-case.ts
|
|
10560
|
-
var init_snake_case2 =
|
|
10561
|
-
init_src();
|
|
10562
|
-
});
|
|
10455
|
+
var init_snake_case2 = () => {};
|
|
10563
10456
|
|
|
10564
10457
|
// packages/omo-opencode/src/shared/tool-name.ts
|
|
10565
|
-
var init_tool_name2 =
|
|
10566
|
-
init_src();
|
|
10567
|
-
});
|
|
10458
|
+
var init_tool_name2 = () => {};
|
|
10568
10459
|
|
|
10569
10460
|
// packages/omo-opencode/src/shared/pattern-matcher.ts
|
|
10570
10461
|
var regexCache;
|
|
@@ -10572,9 +10463,7 @@ var init_pattern_matcher = __esm(() => {
|
|
|
10572
10463
|
regexCache = new Map;
|
|
10573
10464
|
});
|
|
10574
10465
|
// packages/omo-opencode/src/shared/deep-merge.ts
|
|
10575
|
-
var init_deep_merge2 =
|
|
10576
|
-
init_src();
|
|
10577
|
-
});
|
|
10466
|
+
var init_deep_merge2 = () => {};
|
|
10578
10467
|
|
|
10579
10468
|
// packages/omo-opencode/src/shared/file-utils.ts
|
|
10580
10469
|
var init_file_utils2 = __esm(() => {
|
|
@@ -10582,9 +10471,7 @@ var init_file_utils2 = __esm(() => {
|
|
|
10582
10471
|
});
|
|
10583
10472
|
|
|
10584
10473
|
// packages/omo-opencode/src/shared/context-limit-resolver.ts
|
|
10585
|
-
var init_context_limit_resolver2 =
|
|
10586
|
-
init_src2();
|
|
10587
|
-
});
|
|
10474
|
+
var init_context_limit_resolver2 = () => {};
|
|
10588
10475
|
|
|
10589
10476
|
// packages/omo-opencode/src/shared/normalize-sdk-response.ts
|
|
10590
10477
|
function normalizeSDKResponse(response, fallback, options) {
|
|
@@ -10975,9 +10862,7 @@ function isGpt5_5Model(model) {
|
|
|
10975
10862
|
const modelName = extractModelName(model).toLowerCase();
|
|
10976
10863
|
return modelName.includes("gpt-5.5") || modelName.includes("gpt-5-5");
|
|
10977
10864
|
}
|
|
10978
|
-
var init_types =
|
|
10979
|
-
init_src2();
|
|
10980
|
-
});
|
|
10865
|
+
var init_types = () => {};
|
|
10981
10866
|
|
|
10982
10867
|
// packages/omo-opencode/src/tools/delegate-task/openai-categories.ts
|
|
10983
10868
|
function resolveDeepCategoryPromptAppend(model) {
|
|
@@ -11481,9 +11366,7 @@ var init_zip_extractor = __esm(() => {
|
|
|
11481
11366
|
});
|
|
11482
11367
|
|
|
11483
11368
|
// packages/omo-opencode/src/shared/bun-file-shim.ts
|
|
11484
|
-
var init_bun_file_shim =
|
|
11485
|
-
init_runtime();
|
|
11486
|
-
});
|
|
11369
|
+
var init_bun_file_shim = () => {};
|
|
11487
11370
|
|
|
11488
11371
|
// packages/omo-opencode/src/shared/binary-downloader.ts
|
|
11489
11372
|
import { chmodSync, existsSync as existsSync12, mkdirSync as mkdirSync4, unlinkSync as unlinkSync3 } from "node:fs";
|
|
@@ -11645,9 +11528,7 @@ function detectShellType() {
|
|
|
11645
11528
|
}
|
|
11646
11529
|
return process.platform === "win32" ? "cmd" : "unix";
|
|
11647
11530
|
}
|
|
11648
|
-
var init_shell_env =
|
|
11649
|
-
init_src();
|
|
11650
|
-
});
|
|
11531
|
+
var init_shell_env = () => {};
|
|
11651
11532
|
|
|
11652
11533
|
// packages/omo-opencode/src/shared/system-directive.ts
|
|
11653
11534
|
var init_system_directive = () => {};
|
|
@@ -11738,8 +11619,8 @@ var init_json_file_cache_store = __esm(() => {
|
|
|
11738
11619
|
});
|
|
11739
11620
|
|
|
11740
11621
|
// packages/omo-opencode/src/shared/connected-providers-cache.ts
|
|
11741
|
-
var
|
|
11742
|
-
__export(
|
|
11622
|
+
var exports_connected_providers_cache = {};
|
|
11623
|
+
__export(exports_connected_providers_cache, {
|
|
11743
11624
|
writeProviderModelsCache: () => writeProviderModelsCache,
|
|
11744
11625
|
updateConnectedProvidersCache: () => updateConnectedProvidersCache,
|
|
11745
11626
|
readProviderModelsCache: () => readProviderModelsCache,
|
|
@@ -11914,7 +11795,7 @@ function findProviderModelMetadata(providerID, modelID, cache = defaultConnected
|
|
|
11914
11795
|
return;
|
|
11915
11796
|
}
|
|
11916
11797
|
var providerModelsCacheWrittenInCurrentProcess = false, CONNECTED_PROVIDERS_CACHE_FILE = "connected-providers.json", PROVIDER_MODELS_CACHE_FILE = "provider-models.json", defaultConnectedProvidersCacheStore, readConnectedProvidersCache, hasConnectedProvidersCache, readProviderModelsCache, hasProviderModelsCache, writeProviderModelsCache, updateConnectedProvidersCache, _resetMemCacheForTesting;
|
|
11917
|
-
var
|
|
11798
|
+
var init_connected_providers_cache = __esm(() => {
|
|
11918
11799
|
init_src();
|
|
11919
11800
|
init_logger2();
|
|
11920
11801
|
init_data_path();
|
|
@@ -11934,18 +11815,15 @@ var init_connected_providers_cache2 = __esm(() => {
|
|
|
11934
11815
|
// packages/omo-opencode/src/shared/model-resolver.ts
|
|
11935
11816
|
var init_model_resolver2 = __esm(() => {
|
|
11936
11817
|
init_src2();
|
|
11937
|
-
|
|
11818
|
+
init_connected_providers_cache();
|
|
11938
11819
|
});
|
|
11939
11820
|
|
|
11940
11821
|
// packages/omo-opencode/src/shared/model-normalization.ts
|
|
11941
|
-
var init_model_normalization =
|
|
11942
|
-
init_src2();
|
|
11943
|
-
});
|
|
11822
|
+
var init_model_normalization = () => {};
|
|
11944
11823
|
|
|
11945
11824
|
// packages/omo-opencode/src/shared/model-resolution-pipeline.ts
|
|
11946
|
-
var
|
|
11947
|
-
|
|
11948
|
-
init_connected_providers_cache2();
|
|
11825
|
+
var init_model_resolution_pipeline = __esm(() => {
|
|
11826
|
+
init_connected_providers_cache();
|
|
11949
11827
|
});
|
|
11950
11828
|
|
|
11951
11829
|
// packages/omo-opencode/src/shared/model-availability.ts
|
|
@@ -11961,7 +11839,7 @@ function isModelCacheAvailable() {
|
|
|
11961
11839
|
var init_model_availability = __esm(() => {
|
|
11962
11840
|
init_logger2();
|
|
11963
11841
|
init_data_path();
|
|
11964
|
-
|
|
11842
|
+
init_connected_providers_cache();
|
|
11965
11843
|
});
|
|
11966
11844
|
|
|
11967
11845
|
// packages/omo-opencode/src/generated/model-capabilities.generated.json
|
|
@@ -62061,12 +61939,12 @@ function getModelCapabilities2(input) {
|
|
|
62061
61939
|
return getModelCapabilities({
|
|
62062
61940
|
...input,
|
|
62063
61941
|
bundledSnapshot: input.bundledSnapshot ?? getBundledModelCapabilitiesSnapshotForRuntime(),
|
|
62064
|
-
providerCache: input.providerCache ??
|
|
61942
|
+
providerCache: input.providerCache ?? exports_connected_providers_cache
|
|
62065
61943
|
});
|
|
62066
61944
|
}
|
|
62067
61945
|
var init_model_capabilities2 = __esm(() => {
|
|
62068
61946
|
init_src2();
|
|
62069
|
-
|
|
61947
|
+
init_connected_providers_cache();
|
|
62070
61948
|
init_model_capabilities_generated();
|
|
62071
61949
|
});
|
|
62072
61950
|
|
|
@@ -62120,13 +61998,11 @@ var init_model_capabilities_cache = __esm(() => {
|
|
|
62120
61998
|
});
|
|
62121
61999
|
|
|
62122
62000
|
// packages/omo-opencode/src/shared/model-settings-compatibility.ts
|
|
62123
|
-
var init_model_settings_compatibility2 =
|
|
62124
|
-
init_src2();
|
|
62125
|
-
});
|
|
62001
|
+
var init_model_settings_compatibility2 = () => {};
|
|
62126
62002
|
|
|
62127
62003
|
// packages/omo-opencode/src/shared/fallback-model-availability.ts
|
|
62128
62004
|
var init_fallback_model_availability = __esm(() => {
|
|
62129
|
-
|
|
62005
|
+
init_connected_providers_cache();
|
|
62130
62006
|
init_logger2();
|
|
62131
62007
|
init_model_availability();
|
|
62132
62008
|
});
|
|
@@ -62334,10 +62210,10 @@ var init_constants3 = __esm(() => {
|
|
|
62334
62210
|
SESSION_TIMEOUT_MS = 60 * 60 * 1000;
|
|
62335
62211
|
SESSION_MISSING_GRACE_MS = 30 * 1000;
|
|
62336
62212
|
});
|
|
62213
|
+
|
|
62337
62214
|
// packages/tmux-core/src/runner.ts
|
|
62338
|
-
var init_runner =
|
|
62339
|
-
|
|
62340
|
-
});
|
|
62215
|
+
var init_runner = () => {};
|
|
62216
|
+
|
|
62341
62217
|
// packages/tmux-core/src/tmux-utils/server-health.ts
|
|
62342
62218
|
var SERVER_RUNNING_KEY;
|
|
62343
62219
|
var init_server_health = __esm(() => {
|
|
@@ -62345,63 +62221,37 @@ var init_server_health = __esm(() => {
|
|
|
62345
62221
|
});
|
|
62346
62222
|
|
|
62347
62223
|
// packages/tmux-core/src/tmux-utils/pane-dimensions.ts
|
|
62348
|
-
var init_pane_dimensions =
|
|
62349
|
-
init_runner();
|
|
62350
|
-
});
|
|
62224
|
+
var init_pane_dimensions = () => {};
|
|
62351
62225
|
|
|
62352
62226
|
// packages/tmux-core/src/tmux-utils/pane-command.ts
|
|
62353
|
-
var init_pane_command =
|
|
62354
|
-
init_src();
|
|
62355
|
-
});
|
|
62227
|
+
var init_pane_command = () => {};
|
|
62356
62228
|
|
|
62357
62229
|
// packages/tmux-core/src/tmux-utils/pane-spawn.ts
|
|
62358
|
-
var init_pane_spawn =
|
|
62359
|
-
|
|
62360
|
-
init_pane_command();
|
|
62361
|
-
});
|
|
62230
|
+
var init_pane_spawn = () => {};
|
|
62231
|
+
|
|
62362
62232
|
// packages/tmux-core/src/tmux-utils/pane-replace.ts
|
|
62363
|
-
var init_pane_replace =
|
|
62364
|
-
init_pane_command();
|
|
62365
|
-
});
|
|
62233
|
+
var init_pane_replace = () => {};
|
|
62366
62234
|
|
|
62367
62235
|
// packages/tmux-core/src/tmux-utils/pane-activate.ts
|
|
62368
|
-
var init_pane_activate =
|
|
62369
|
-
init_runner();
|
|
62370
|
-
init_pane_command();
|
|
62371
|
-
});
|
|
62236
|
+
var init_pane_activate = () => {};
|
|
62372
62237
|
|
|
62373
62238
|
// packages/tmux-core/src/tmux-utils/window-spawn.ts
|
|
62374
|
-
var init_window_spawn =
|
|
62375
|
-
init_server_health();
|
|
62376
|
-
init_pane_command();
|
|
62377
|
-
});
|
|
62239
|
+
var init_window_spawn = () => {};
|
|
62378
62240
|
|
|
62379
62241
|
// packages/tmux-core/src/tmux-utils/session-spawn.ts
|
|
62380
|
-
var init_session_spawn =
|
|
62381
|
-
init_server_health();
|
|
62382
|
-
init_pane_command();
|
|
62383
|
-
});
|
|
62242
|
+
var init_session_spawn = () => {};
|
|
62384
62243
|
|
|
62385
62244
|
// packages/tmux-core/src/tmux-utils/session-kill.ts
|
|
62386
|
-
var init_session_kill =
|
|
62387
|
-
init_runner();
|
|
62388
|
-
});
|
|
62245
|
+
var init_session_kill = () => {};
|
|
62389
62246
|
|
|
62390
62247
|
// packages/tmux-core/src/tmux-utils/stale-session-sweep.ts
|
|
62391
|
-
var init_stale_session_sweep =
|
|
62392
|
-
init_runner();
|
|
62393
|
-
init_session_kill();
|
|
62394
|
-
});
|
|
62248
|
+
var init_stale_session_sweep = () => {};
|
|
62395
62249
|
|
|
62396
62250
|
// packages/tmux-core/src/tmux-utils/layout.ts
|
|
62397
|
-
var init_layout =
|
|
62398
|
-
init_runner();
|
|
62399
|
-
});
|
|
62251
|
+
var init_layout = () => {};
|
|
62400
62252
|
|
|
62401
62253
|
// packages/tmux-core/src/tmux-utils/spawn-process.ts
|
|
62402
|
-
var init_spawn_process =
|
|
62403
|
-
init_runtime();
|
|
62404
|
-
});
|
|
62254
|
+
var init_spawn_process = () => {};
|
|
62405
62255
|
|
|
62406
62256
|
// packages/tmux-core/src/tmux-utils.ts
|
|
62407
62257
|
var init_tmux_utils = __esm(() => {
|
|
@@ -62428,34 +62278,22 @@ var init_src3 = __esm(() => {
|
|
|
62428
62278
|
});
|
|
62429
62279
|
|
|
62430
62280
|
// packages/omo-opencode/src/shared/tmux/constants.ts
|
|
62431
|
-
var init_constants4 =
|
|
62432
|
-
init_src3();
|
|
62433
|
-
});
|
|
62281
|
+
var init_constants4 = () => {};
|
|
62434
62282
|
|
|
62435
62283
|
// packages/omo-opencode/src/shared/tmux/cmux-detect.ts
|
|
62436
|
-
var init_cmux_detect =
|
|
62437
|
-
init_src3();
|
|
62438
|
-
});
|
|
62284
|
+
var init_cmux_detect = () => {};
|
|
62439
62285
|
|
|
62440
62286
|
// packages/omo-opencode/src/shared/tmux/runner.ts
|
|
62441
|
-
var init_runner2 =
|
|
62442
|
-
init_src3();
|
|
62443
|
-
});
|
|
62287
|
+
var init_runner2 = () => {};
|
|
62444
62288
|
|
|
62445
62289
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/environment.ts
|
|
62446
|
-
var init_environment =
|
|
62447
|
-
init_src3();
|
|
62448
|
-
});
|
|
62290
|
+
var init_environment = () => {};
|
|
62449
62291
|
|
|
62450
62292
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/server-health.ts
|
|
62451
|
-
var init_server_health2 =
|
|
62452
|
-
init_src3();
|
|
62453
|
-
});
|
|
62293
|
+
var init_server_health2 = () => {};
|
|
62454
62294
|
|
|
62455
62295
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/pane-dimensions.ts
|
|
62456
|
-
var init_pane_dimensions2 =
|
|
62457
|
-
init_src3();
|
|
62458
|
-
});
|
|
62296
|
+
var init_pane_dimensions2 = () => {};
|
|
62459
62297
|
|
|
62460
62298
|
// packages/omo-opencode/src/shared/bun-which-shim.ts
|
|
62461
62299
|
var init_bun_which_shim = __esm(() => {
|
|
@@ -62480,61 +62318,46 @@ var init_adapter_deps = __esm(() => {
|
|
|
62480
62318
|
|
|
62481
62319
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/pane-spawn.ts
|
|
62482
62320
|
var init_pane_spawn2 = __esm(() => {
|
|
62483
|
-
init_src3();
|
|
62484
62321
|
init_adapter_deps();
|
|
62485
62322
|
});
|
|
62486
62323
|
|
|
62487
62324
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/pane-close.ts
|
|
62488
|
-
var init_pane_close =
|
|
62489
|
-
init_src3();
|
|
62490
|
-
});
|
|
62325
|
+
var init_pane_close = () => {};
|
|
62491
62326
|
|
|
62492
62327
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/pane-replace.ts
|
|
62493
62328
|
var init_pane_replace2 = __esm(() => {
|
|
62494
|
-
init_src3();
|
|
62495
62329
|
init_adapter_deps();
|
|
62496
62330
|
});
|
|
62497
62331
|
|
|
62498
62332
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/pane-activate.ts
|
|
62499
62333
|
var init_pane_activate2 = __esm(() => {
|
|
62500
|
-
init_src3();
|
|
62501
62334
|
init_adapter_deps();
|
|
62502
62335
|
});
|
|
62503
62336
|
|
|
62504
62337
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/window-spawn.ts
|
|
62505
62338
|
var init_window_spawn2 = __esm(() => {
|
|
62506
|
-
init_src3();
|
|
62507
62339
|
init_adapter_deps();
|
|
62508
62340
|
});
|
|
62509
62341
|
|
|
62510
62342
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/session-spawn.ts
|
|
62511
62343
|
var init_session_spawn2 = __esm(() => {
|
|
62512
|
-
init_src3();
|
|
62513
62344
|
init_adapter_deps();
|
|
62514
62345
|
});
|
|
62515
62346
|
|
|
62516
62347
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/session-kill.ts
|
|
62517
|
-
var init_session_kill2 =
|
|
62518
|
-
init_src3();
|
|
62519
|
-
});
|
|
62348
|
+
var init_session_kill2 = () => {};
|
|
62520
62349
|
|
|
62521
62350
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/stale-session-sweep.ts
|
|
62522
|
-
var init_stale_session_sweep2 =
|
|
62523
|
-
init_src3();
|
|
62524
|
-
});
|
|
62351
|
+
var init_stale_session_sweep2 = () => {};
|
|
62525
62352
|
|
|
62526
62353
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/stale-attach-pane-sweep.ts
|
|
62527
62354
|
var init_stale_attach_pane_sweep = () => {};
|
|
62528
62355
|
|
|
62529
62356
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/pane-command.ts
|
|
62530
|
-
var init_pane_command2 =
|
|
62531
|
-
init_src3();
|
|
62532
|
-
});
|
|
62357
|
+
var init_pane_command2 = () => {};
|
|
62533
62358
|
|
|
62534
62359
|
// packages/omo-opencode/src/shared/tmux/tmux-utils/layout.ts
|
|
62535
|
-
var init_layout2 =
|
|
62536
|
-
init_src3();
|
|
62537
|
-
});
|
|
62360
|
+
var init_layout2 = () => {};
|
|
62538
62361
|
|
|
62539
62362
|
// packages/omo-opencode/src/shared/tmux/tmux-utils.ts
|
|
62540
62363
|
var init_tmux_utils2 = __esm(() => {
|
|
@@ -64906,7 +64729,6 @@ var init_prompt_failure_classifier = () => {};
|
|
|
64906
64729
|
|
|
64907
64730
|
// packages/omo-opencode/src/shared/model-suggestion-retry.ts
|
|
64908
64731
|
var init_model_suggestion_retry = __esm(() => {
|
|
64909
|
-
init_src2();
|
|
64910
64732
|
init_logger2();
|
|
64911
64733
|
init_prompt_async_gate2();
|
|
64912
64734
|
init_prompt_failure_classifier();
|
|
@@ -64914,7 +64736,6 @@ var init_model_suggestion_retry = __esm(() => {
|
|
|
64914
64736
|
|
|
64915
64737
|
// packages/omo-opencode/src/shared/opencode-provider-auth.ts
|
|
64916
64738
|
var init_opencode_provider_auth = __esm(() => {
|
|
64917
|
-
init_src();
|
|
64918
64739
|
init_data_path();
|
|
64919
64740
|
init_logger2();
|
|
64920
64741
|
});
|
|
@@ -65045,9 +64866,7 @@ var init_logger3 = __esm(() => {
|
|
|
65045
64866
|
});
|
|
65046
64867
|
|
|
65047
64868
|
// packages/claude-code-compat-core/src/shared/contains-path.ts
|
|
65048
|
-
var init_contains_path3 =
|
|
65049
|
-
init_src();
|
|
65050
|
-
});
|
|
64869
|
+
var init_contains_path3 = () => {};
|
|
65051
64870
|
|
|
65052
64871
|
// packages/claude-code-compat-core/src/features/claude-code-plugin-loader/scope-filter.ts
|
|
65053
64872
|
var init_scope_filter = __esm(() => {
|
|
@@ -65109,19 +64928,13 @@ var init_discovery = __esm(() => {
|
|
|
65109
64928
|
});
|
|
65110
64929
|
|
|
65111
64930
|
// packages/claude-code-compat-core/src/shared/frontmatter.ts
|
|
65112
|
-
var init_frontmatter3 =
|
|
65113
|
-
init_src();
|
|
65114
|
-
});
|
|
64931
|
+
var init_frontmatter3 = () => {};
|
|
65115
64932
|
|
|
65116
64933
|
// packages/claude-code-compat-core/src/shared/file-utils.ts
|
|
65117
|
-
var init_file_utils3 =
|
|
65118
|
-
init_src();
|
|
65119
|
-
});
|
|
64934
|
+
var init_file_utils3 = () => {};
|
|
65120
64935
|
|
|
65121
64936
|
// packages/claude-code-compat-core/src/shared/model-sanitizer.ts
|
|
65122
|
-
var init_model_sanitizer2 =
|
|
65123
|
-
init_src2();
|
|
65124
|
-
});
|
|
64937
|
+
var init_model_sanitizer2 = () => {};
|
|
65125
64938
|
// packages/claude-code-compat-core/src/features/claude-code-plugin-loader/command-loader.ts
|
|
65126
64939
|
var init_command_loader = __esm(() => {
|
|
65127
64940
|
init_frontmatter3();
|
|
@@ -65142,14 +64955,10 @@ var init_skill_loader = __esm(() => {
|
|
|
65142
64955
|
init_logger3();
|
|
65143
64956
|
});
|
|
65144
64957
|
// packages/claude-code-compat-core/src/shared/model-format-normalizer.ts
|
|
65145
|
-
var init_model_format_normalizer =
|
|
65146
|
-
init_src2();
|
|
65147
|
-
});
|
|
64958
|
+
var init_model_format_normalizer = () => {};
|
|
65148
64959
|
|
|
65149
64960
|
// packages/claude-code-compat-core/src/shared/model-normalization.ts
|
|
65150
|
-
var init_model_normalization2 =
|
|
65151
|
-
init_src2();
|
|
65152
|
-
});
|
|
64961
|
+
var init_model_normalization2 = () => {};
|
|
65153
64962
|
|
|
65154
64963
|
// packages/claude-code-compat-core/src/features/claude-code-agent-loader/claude-model-mapper.ts
|
|
65155
64964
|
var ANTHROPIC_PREFIX = "anthropic/", CLAUDE_CODE_ALIAS_MAP;
|
|
@@ -65179,7 +64988,6 @@ var init_configure_allowed_env_vars = __esm(() => {
|
|
|
65179
64988
|
|
|
65180
64989
|
// packages/claude-code-compat-core/src/features/claude-code-mcp-loader/env-expander.ts
|
|
65181
64990
|
var init_env_expander = __esm(() => {
|
|
65182
|
-
init_src();
|
|
65183
64991
|
init_logger3();
|
|
65184
64992
|
init_configure_allowed_env_vars();
|
|
65185
64993
|
});
|
|
@@ -65195,9 +65003,7 @@ var init_transformer = __esm(() => {
|
|
|
65195
65003
|
});
|
|
65196
65004
|
|
|
65197
65005
|
// packages/claude-code-compat-core/src/shared/bun-file-shim.ts
|
|
65198
|
-
var init_bun_file_shim2 =
|
|
65199
|
-
init_runtime();
|
|
65200
|
-
});
|
|
65006
|
+
var init_bun_file_shim2 = () => {};
|
|
65201
65007
|
|
|
65202
65008
|
// packages/claude-code-compat-core/src/features/claude-code-plugin-loader/mcp-server-loader.ts
|
|
65203
65009
|
var init_mcp_server_loader = __esm(() => {
|
|
@@ -65349,9 +65155,7 @@ var init_legacy_workspace_migration = __esm(() => {
|
|
|
65349
65155
|
init_logger2();
|
|
65350
65156
|
});
|
|
65351
65157
|
// packages/omo-opencode/src/shared/model-string-parser.ts
|
|
65352
|
-
var init_model_string_parser2 =
|
|
65353
|
-
init_src2();
|
|
65354
|
-
});
|
|
65158
|
+
var init_model_string_parser2 = () => {};
|
|
65355
65159
|
|
|
65356
65160
|
// packages/omo-opencode/src/shared/excluded-dirs.ts
|
|
65357
65161
|
var EXCLUDED_DIR_NAMES, EXCLUDED_DIRS;
|
|
@@ -65376,15 +65180,13 @@ var init_excluded_dirs = __esm(() => {
|
|
|
65376
65180
|
});
|
|
65377
65181
|
|
|
65378
65182
|
// packages/omo-opencode/src/shared/replace-tool-args.ts
|
|
65379
|
-
var init_replace_tool_args =
|
|
65380
|
-
init_src();
|
|
65381
|
-
});
|
|
65183
|
+
var init_replace_tool_args = () => {};
|
|
65382
65184
|
|
|
65383
65185
|
// packages/omo-opencode/src/shared/index.ts
|
|
65384
65186
|
var init_shared = __esm(() => {
|
|
65385
65187
|
init_model_normalization();
|
|
65386
65188
|
init_model_resolver2();
|
|
65387
|
-
|
|
65189
|
+
init_model_resolution_pipeline();
|
|
65388
65190
|
init_session_category_registry();
|
|
65389
65191
|
init_model_string_parser2();
|
|
65390
65192
|
init_excluded_dirs();
|
|
@@ -65425,7 +65227,7 @@ var init_shared = __esm(() => {
|
|
|
65425
65227
|
init_model_capabilities_cache();
|
|
65426
65228
|
init_model_settings_compatibility2();
|
|
65427
65229
|
init_fallback_model_availability();
|
|
65428
|
-
|
|
65230
|
+
init_connected_providers_cache();
|
|
65429
65231
|
init_context_limit_resolver2();
|
|
65430
65232
|
init_session_utils();
|
|
65431
65233
|
init_event_session_id();
|
|
@@ -72672,11 +72474,7 @@ var init_posthog_client = __esm(() => {
|
|
|
72672
72474
|
});
|
|
72673
72475
|
|
|
72674
72476
|
// packages/telemetry-core/src/record-daily-active.ts
|
|
72675
|
-
var init_record_daily_active =
|
|
72676
|
-
init_activity_state();
|
|
72677
|
-
init_posthog_client();
|
|
72678
|
-
init_machine_id();
|
|
72679
|
-
});
|
|
72477
|
+
var init_record_daily_active = () => {};
|
|
72680
72478
|
|
|
72681
72479
|
// packages/telemetry-core/src/index.ts
|
|
72682
72480
|
var init_src4 = __esm(() => {
|
|
@@ -72693,7 +72491,7 @@ var package_default2;
|
|
|
72693
72491
|
var init_package2 = __esm(() => {
|
|
72694
72492
|
package_default2 = {
|
|
72695
72493
|
name: "@oh-my-opencode/omo-codex",
|
|
72696
|
-
version: "4.
|
|
72494
|
+
version: "4.16.0",
|
|
72697
72495
|
type: "module",
|
|
72698
72496
|
private: true,
|
|
72699
72497
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -73040,7 +72838,7 @@ function stripJsonComments(json2) {
|
|
|
73040
72838
|
|
|
73041
72839
|
// packages/omo-opencode/src/hooks/auto-update-checker/checker/local-dev-path.ts
|
|
73042
72840
|
import * as fs6 from "node:fs";
|
|
73043
|
-
import { fileURLToPath as
|
|
72841
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
73044
72842
|
function isLocalDevMode(directory) {
|
|
73045
72843
|
return getLocalDevPath(directory) !== null;
|
|
73046
72844
|
}
|
|
@@ -73058,7 +72856,7 @@ function getLocalDevPath(directory) {
|
|
|
73058
72856
|
if (!ACCEPTED_PACKAGE_NAMES2.some((name) => entry.includes(name)))
|
|
73059
72857
|
continue;
|
|
73060
72858
|
try {
|
|
73061
|
-
return
|
|
72859
|
+
return fileURLToPath3(entry);
|
|
73062
72860
|
} catch (error51) {
|
|
73063
72861
|
if (!(error51 instanceof Error)) {
|
|
73064
72862
|
throw error51;
|
|
@@ -73183,7 +72981,7 @@ var init_plugin_entry = __esm(() => {
|
|
|
73183
72981
|
// packages/omo-opencode/src/hooks/auto-update-checker/checker/cached-version.ts
|
|
73184
72982
|
import * as fs10 from "node:fs";
|
|
73185
72983
|
import * as path11 from "node:path";
|
|
73186
|
-
import { fileURLToPath as
|
|
72984
|
+
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
73187
72985
|
function readPackageVersion(packageJsonPath) {
|
|
73188
72986
|
const content = fs10.readFileSync(packageJsonPath, "utf-8");
|
|
73189
72987
|
const pkg = JSON.parse(content);
|
|
@@ -73193,7 +72991,7 @@ function getCachedVersion(options = {}) {
|
|
|
73193
72991
|
const packageJsonCandidates = options.packageJsonCandidates ?? INSTALLED_PACKAGE_JSON_CANDIDATES;
|
|
73194
72992
|
const findPackageJson = options.findPackageJson ?? findPackageJsonUp;
|
|
73195
72993
|
try {
|
|
73196
|
-
const currentDir = options.currentDir === undefined ? path11.dirname(
|
|
72994
|
+
const currentDir = options.currentDir === undefined ? path11.dirname(fileURLToPath4(import.meta.url)) : options.currentDir;
|
|
73197
72995
|
if (currentDir) {
|
|
73198
72996
|
const pkgPath = findPackageJson(currentDir);
|
|
73199
72997
|
if (pkgPath) {
|
|
@@ -73662,20 +73460,20 @@ var init_update_toasts = __esm(() => {
|
|
|
73662
73460
|
});
|
|
73663
73461
|
|
|
73664
73462
|
// packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
|
|
73665
|
-
import { existsSync as
|
|
73666
|
-
import { dirname as
|
|
73667
|
-
import { fileURLToPath as
|
|
73463
|
+
import { existsSync as existsSync49 } from "node:fs";
|
|
73464
|
+
import { dirname as dirname27, join as join69 } from "node:path";
|
|
73465
|
+
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
73668
73466
|
function defaultGetModuleHostingWorkspace() {
|
|
73669
73467
|
try {
|
|
73670
|
-
const currentDir =
|
|
73468
|
+
const currentDir = dirname27(fileURLToPath5(import.meta.url));
|
|
73671
73469
|
const pkgJsonPath = findPackageJsonUp(currentDir);
|
|
73672
73470
|
if (!pkgJsonPath)
|
|
73673
73471
|
return null;
|
|
73674
|
-
const pkgDir =
|
|
73675
|
-
const nodeModulesDir =
|
|
73472
|
+
const pkgDir = dirname27(pkgJsonPath);
|
|
73473
|
+
const nodeModulesDir = dirname27(pkgDir);
|
|
73676
73474
|
if (nodeModulesDir.split(/[\\/]/).pop() !== "node_modules")
|
|
73677
73475
|
return null;
|
|
73678
|
-
return
|
|
73476
|
+
return dirname27(nodeModulesDir);
|
|
73679
73477
|
} catch (error51) {
|
|
73680
73478
|
if (error51 instanceof Error) {
|
|
73681
73479
|
return null;
|
|
@@ -73816,8 +73614,8 @@ var init_background_update_check = __esm(() => {
|
|
|
73816
73614
|
init_package_json_locator();
|
|
73817
73615
|
init_update_toasts();
|
|
73818
73616
|
defaultDeps4 = {
|
|
73819
|
-
existsSync:
|
|
73820
|
-
join:
|
|
73617
|
+
existsSync: existsSync49,
|
|
73618
|
+
join: join69,
|
|
73821
73619
|
runBunInstallWithDetails,
|
|
73822
73620
|
log: log2,
|
|
73823
73621
|
getOpenCodeCacheDir,
|
|
@@ -73907,7 +73705,7 @@ async function updateAndShowConnectedProvidersCacheStatus(ctx) {
|
|
|
73907
73705
|
}
|
|
73908
73706
|
var CACHE_UPDATE_TIMEOUT_MS = 1e4;
|
|
73909
73707
|
var init_connected_providers_status = __esm(() => {
|
|
73910
|
-
|
|
73708
|
+
init_connected_providers_cache();
|
|
73911
73709
|
init_model_availability();
|
|
73912
73710
|
init_logger2();
|
|
73913
73711
|
});
|
|
@@ -73980,7 +73778,7 @@ async function showSpinnerToast(ctx, version3, message) {
|
|
|
73980
73778
|
duration: frameInterval + 50
|
|
73981
73779
|
}
|
|
73982
73780
|
}).catch(ignoreToastError);
|
|
73983
|
-
await new Promise((
|
|
73781
|
+
await new Promise((resolve20) => setTimeout(resolve20, frameInterval));
|
|
73984
73782
|
}
|
|
73985
73783
|
}
|
|
73986
73784
|
var SISYPHUS_SPINNER;
|
|
@@ -74166,6 +73964,9 @@ function formatConfigSummary(config) {
|
|
|
74166
73964
|
if (config.hasCodex) {
|
|
74167
73965
|
lines.push(` ${SYMBOLS.info} Codex autonomous mode: ${config.codexAutonomous ? "enabled" : "disabled"}`);
|
|
74168
73966
|
}
|
|
73967
|
+
if (config.hasSenpi) {
|
|
73968
|
+
lines.push(` ${SYMBOLS.info} Senpi adapter: enabled`);
|
|
73969
|
+
}
|
|
74169
73970
|
if (!config.hasOpenCode)
|
|
74170
73971
|
return lines.join(`
|
|
74171
73972
|
`);
|
|
@@ -74321,6 +74122,7 @@ function argsToConfig(args) {
|
|
|
74321
74122
|
const platform = resolvePlatform(args);
|
|
74322
74123
|
const hasOpenCode = platform === "opencode" || platform === "both";
|
|
74323
74124
|
const hasCodex = platform === "codex" || platform === "both";
|
|
74125
|
+
const hasSenpi = platform === "senpi";
|
|
74324
74126
|
return {
|
|
74325
74127
|
platform,
|
|
74326
74128
|
hasOpenCode,
|
|
@@ -74330,6 +74132,7 @@ function argsToConfig(args) {
|
|
|
74330
74132
|
hasGemini: hasOpenCode && args.gemini === "yes",
|
|
74331
74133
|
hasCopilot: hasOpenCode && args.copilot === "yes",
|
|
74332
74134
|
hasCodex,
|
|
74135
|
+
hasSenpi,
|
|
74333
74136
|
hasOpencodeZen: hasOpenCode && args.opencodeZen === "yes",
|
|
74334
74137
|
hasZaiCodingPlan: hasOpenCode && args.zaiCodingPlan === "yes",
|
|
74335
74138
|
hasKimiForCoding: hasOpenCode && args.kimiForCoding === "yes",
|
|
@@ -76602,9 +76405,14 @@ function readBooleanSetting(sectionText, key) {
|
|
|
76602
76405
|
// packages/omo-codex/src/install/codex-config-toml.ts
|
|
76603
76406
|
async function updateCodexConfig(input) {
|
|
76604
76407
|
await mkdir5(dirname15(input.configPath), { recursive: true });
|
|
76605
|
-
let config
|
|
76606
|
-
|
|
76408
|
+
let config;
|
|
76409
|
+
try {
|
|
76607
76410
|
config = await readFile11(input.configPath, "utf8");
|
|
76411
|
+
} catch (error) {
|
|
76412
|
+
if (!isMissingFileError(error))
|
|
76413
|
+
throw error;
|
|
76414
|
+
config = "";
|
|
76415
|
+
}
|
|
76608
76416
|
const pluginSet = new Set(input.pluginNames);
|
|
76609
76417
|
for (const legacyMarketplaceName of legacyMarketplaceNames(input.marketplaceName)) {
|
|
76610
76418
|
config = removeMarketplaceBlock(config, legacyMarketplaceName);
|
|
@@ -76638,15 +76446,8 @@ async function updateCodexConfig(input) {
|
|
|
76638
76446
|
await writeFileAtomic(input.configPath, `${config.trimEnd()}
|
|
76639
76447
|
`);
|
|
76640
76448
|
}
|
|
76641
|
-
|
|
76642
|
-
|
|
76643
|
-
await readFile11(path7, "utf8");
|
|
76644
|
-
return true;
|
|
76645
|
-
} catch (error) {
|
|
76646
|
-
if (error instanceof Error)
|
|
76647
|
-
return false;
|
|
76648
|
-
return false;
|
|
76649
|
-
}
|
|
76449
|
+
function isMissingFileError(error) {
|
|
76450
|
+
return error instanceof Error && "code" in error && error.code === "ENOENT";
|
|
76650
76451
|
}
|
|
76651
76452
|
|
|
76652
76453
|
// packages/omo-codex/src/install/codex-hook-trust.ts
|
|
@@ -76667,7 +76468,7 @@ var EVENT_LABELS = new Map([
|
|
|
76667
76468
|
]);
|
|
76668
76469
|
async function trustedHookStatesForPlugin(input) {
|
|
76669
76470
|
const manifestPath = join39(input.pluginRoot, ".codex-plugin", "plugin.json");
|
|
76670
|
-
if (!await
|
|
76471
|
+
if (!await exists(manifestPath))
|
|
76671
76472
|
return [];
|
|
76672
76473
|
const manifest = JSON.parse(await readFile12(manifestPath, "utf8"));
|
|
76673
76474
|
if (!isPlainRecord3(manifest))
|
|
@@ -76675,7 +76476,7 @@ async function trustedHookStatesForPlugin(input) {
|
|
|
76675
76476
|
const states = [];
|
|
76676
76477
|
for (const hookPath of hookManifestPaths2(manifest.hooks)) {
|
|
76677
76478
|
const hooksPath = join39(input.pluginRoot, hookPath);
|
|
76678
|
-
if (!await
|
|
76479
|
+
if (!await exists(hooksPath))
|
|
76679
76480
|
continue;
|
|
76680
76481
|
const parsed = JSON.parse(await readFile12(hooksPath, "utf8"));
|
|
76681
76482
|
if (!isPlainRecord3(parsed) || !isPlainRecord3(parsed.hooks))
|
|
@@ -76758,7 +76559,7 @@ function canonicalJson(value) {
|
|
|
76758
76559
|
function stripDotSlash2(value) {
|
|
76759
76560
|
return value.startsWith("./") ? value.slice(2) : value;
|
|
76760
76561
|
}
|
|
76761
|
-
async function
|
|
76562
|
+
async function exists(path7) {
|
|
76762
76563
|
try {
|
|
76763
76564
|
await readFile12(path7, "utf8");
|
|
76764
76565
|
return true;
|
|
@@ -76818,11 +76619,11 @@ var RETIRED_MANAGED_AGENT_FILES = [
|
|
|
76818
76619
|
];
|
|
76819
76620
|
async function purgeRetiredManagedAgentFiles(input) {
|
|
76820
76621
|
const agentsDir = join40(input.codexHome, "agents");
|
|
76821
|
-
if (!await
|
|
76622
|
+
if (!await exists2(agentsDir))
|
|
76822
76623
|
return;
|
|
76823
76624
|
for (const retiredAgent of RETIRED_MANAGED_AGENT_FILES) {
|
|
76824
76625
|
const agentPath = join40(agentsDir, retiredAgent.fileName);
|
|
76825
|
-
if (!await
|
|
76626
|
+
if (!await exists2(agentPath))
|
|
76826
76627
|
continue;
|
|
76827
76628
|
const agentStat = await lstat7(agentPath);
|
|
76828
76629
|
if (agentStat.isDirectory() && !agentStat.isSymbolicLink())
|
|
@@ -76845,7 +76646,7 @@ async function readTextIfExists(path7) {
|
|
|
76845
76646
|
throw error;
|
|
76846
76647
|
}
|
|
76847
76648
|
}
|
|
76848
|
-
async function
|
|
76649
|
+
async function exists2(path7) {
|
|
76849
76650
|
try {
|
|
76850
76651
|
await lstat7(path7);
|
|
76851
76652
|
return true;
|
|
@@ -76865,7 +76666,7 @@ function nodeErrorCode(error) {
|
|
|
76865
76666
|
var MANIFEST_FILE = ".installed-agents.json";
|
|
76866
76667
|
async function capturePreservedAgentReasoning(input) {
|
|
76867
76668
|
const agentsDir = join41(input.codexHome, "agents");
|
|
76868
|
-
if (!await
|
|
76669
|
+
if (!await exists3(agentsDir))
|
|
76869
76670
|
return new Map;
|
|
76870
76671
|
const preserved = new Map;
|
|
76871
76672
|
const agentEntries = await readdir6(agentsDir, { withFileTypes: true });
|
|
@@ -76883,7 +76684,7 @@ async function capturePreservedAgentReasoning(input) {
|
|
|
76883
76684
|
}
|
|
76884
76685
|
async function capturePreservedAgentServiceTier(input) {
|
|
76885
76686
|
const agentsDir = join41(input.codexHome, "agents");
|
|
76886
|
-
if (!await
|
|
76687
|
+
if (!await exists3(agentsDir))
|
|
76887
76688
|
return new Map;
|
|
76888
76689
|
const preserved = new Map;
|
|
76889
76690
|
const agentEntries = await readdir6(agentsDir, { withFileTypes: true });
|
|
@@ -76941,7 +76742,7 @@ async function restorePreservedServiceTier(input) {
|
|
|
76941
76742
|
}
|
|
76942
76743
|
async function discoverBundledAgents(pluginRoot) {
|
|
76943
76744
|
const componentsRoot = join41(pluginRoot, "components");
|
|
76944
|
-
if (!await
|
|
76745
|
+
if (!await exists3(componentsRoot))
|
|
76945
76746
|
return [];
|
|
76946
76747
|
const componentEntries = await readdir6(componentsRoot, { withFileTypes: true });
|
|
76947
76748
|
const agents = [];
|
|
@@ -76949,7 +76750,7 @@ async function discoverBundledAgents(pluginRoot) {
|
|
|
76949
76750
|
if (!entry.isDirectory())
|
|
76950
76751
|
continue;
|
|
76951
76752
|
const agentsRoot = join41(componentsRoot, entry.name, "agents");
|
|
76952
|
-
if (!await
|
|
76753
|
+
if (!await exists3(agentsRoot))
|
|
76953
76754
|
continue;
|
|
76954
76755
|
const agentEntries = await readdir6(agentsRoot, { withFileTypes: true });
|
|
76955
76756
|
for (const file2 of agentEntries) {
|
|
@@ -76966,7 +76767,7 @@ async function replaceWithCopy(linkPath, target) {
|
|
|
76966
76767
|
await copyFile(target, linkPath);
|
|
76967
76768
|
}
|
|
76968
76769
|
async function prepareReplacement(linkPath) {
|
|
76969
|
-
if (!await
|
|
76770
|
+
if (!await exists3(linkPath))
|
|
76970
76771
|
return;
|
|
76971
76772
|
const entryStat = await lstat8(linkPath);
|
|
76972
76773
|
if (entryStat.isDirectory() && !entryStat.isSymbolicLink()) {
|
|
@@ -77085,7 +76886,7 @@ function parseJsonString(value) {
|
|
|
77085
76886
|
return null;
|
|
77086
76887
|
}
|
|
77087
76888
|
}
|
|
77088
|
-
async function
|
|
76889
|
+
async function exists3(path7) {
|
|
77089
76890
|
try {
|
|
77090
76891
|
await lstat8(path7);
|
|
77091
76892
|
return true;
|
|
@@ -77527,7 +77328,7 @@ async function findProjectLocalCodexConfigs(startDirectory, codexHome) {
|
|
|
77527
77328
|
configPathsFromCwd.push(configPath);
|
|
77528
77329
|
}
|
|
77529
77330
|
}
|
|
77530
|
-
if (await
|
|
77331
|
+
if (await exists4(join45(current, ".git"))) {
|
|
77531
77332
|
return configPathsFromCwd.length === 0 ? null : {
|
|
77532
77333
|
projectRoot: current,
|
|
77533
77334
|
configPaths: [...configPathsFromCwd].reverse(),
|
|
@@ -77608,7 +77409,7 @@ async function maybeLstat(path7) {
|
|
|
77608
77409
|
throw error;
|
|
77609
77410
|
}
|
|
77610
77411
|
}
|
|
77611
|
-
async function
|
|
77412
|
+
async function exists4(path7) {
|
|
77612
77413
|
return await maybeLstat(path7) !== null;
|
|
77613
77414
|
}
|
|
77614
77415
|
function nodeErrorCode3(error) {
|
|
@@ -78012,19 +77813,19 @@ async function detectCodexInstallation(input = {}) {
|
|
|
78012
77813
|
const platform = input.platform ?? process.platform;
|
|
78013
77814
|
const env3 = input.env ?? process.env;
|
|
78014
77815
|
const homeDir = input.homeDir ?? homedir7();
|
|
78015
|
-
const
|
|
77816
|
+
const exists5 = input.exists ?? existsSync31;
|
|
78016
77817
|
const which2 = input.which ?? bunWhich;
|
|
78017
77818
|
const checkedPaths = [CODEX_PATH_CHECK_LABEL];
|
|
78018
77819
|
const cliPath = nonEmptyValue2(which2("codex"));
|
|
78019
77820
|
if (cliPath !== undefined)
|
|
78020
77821
|
return { found: true, source: "cli", path: cliPath };
|
|
78021
77822
|
if (platform === "darwin") {
|
|
78022
|
-
return detectMacCodexInstallation({ homeDir, exists:
|
|
77823
|
+
return detectMacCodexInstallation({ homeDir, exists: exists5, checkedPaths });
|
|
78023
77824
|
}
|
|
78024
77825
|
if (platform === "win32") {
|
|
78025
77826
|
return detectWindowsCodexInstallation({
|
|
78026
77827
|
env: env3,
|
|
78027
|
-
exists:
|
|
77828
|
+
exists: exists5,
|
|
78028
77829
|
checkedPaths,
|
|
78029
77830
|
runCommand: input.runCommand ?? defaultRunCommand2
|
|
78030
77831
|
});
|
|
@@ -78357,7 +78158,7 @@ async function walkForManagedBootstrapDirs(directory, depth, results) {
|
|
|
78357
78158
|
const childPath = join54(directory, entry.name);
|
|
78358
78159
|
if (isManagedBootstrapOwnerName(entry.name)) {
|
|
78359
78160
|
const bootstrapDir = join54(childPath, "bootstrap");
|
|
78360
|
-
if (await
|
|
78161
|
+
if (await exists5(bootstrapDir))
|
|
78361
78162
|
results.push(bootstrapDir);
|
|
78362
78163
|
continue;
|
|
78363
78164
|
}
|
|
@@ -78405,7 +78206,7 @@ async function collectInstalledAgentPaths(codexHome, configPath) {
|
|
|
78405
78206
|
join54(codexHome, ".tmp", "marketplaces", "sisyphuslabs", "plugins", "omo", INSTALLED_AGENTS_MANIFEST)
|
|
78406
78207
|
];
|
|
78407
78208
|
const versionRoot = join54(codexHome, "plugins", "cache", "sisyphuslabs", "omo");
|
|
78408
|
-
if (await
|
|
78209
|
+
if (await exists5(versionRoot)) {
|
|
78409
78210
|
const entries = await readdir9(versionRoot, { withFileTypes: true });
|
|
78410
78211
|
for (const entry of entries) {
|
|
78411
78212
|
if (entry.isDirectory())
|
|
@@ -78424,13 +78225,13 @@ async function collectInstalledAgentPaths(codexHome, configPath) {
|
|
|
78424
78225
|
return [...paths].sort();
|
|
78425
78226
|
}
|
|
78426
78227
|
async function readManagedAgentPathsFromConfig(codexHome, configPath) {
|
|
78427
|
-
if (!await
|
|
78228
|
+
if (!await exists5(configPath))
|
|
78428
78229
|
return [];
|
|
78429
78230
|
const config = await readFile20(configPath, "utf8");
|
|
78430
78231
|
return MANAGED_CODEX_AGENT_NAMES2.filter((agentName) => config.includes(`config_file = ${JSON.stringify(`./agents/${agentName}.toml`)}`)).map((agentName) => join54(codexHome, "agents", `${agentName}.toml`));
|
|
78431
78232
|
}
|
|
78432
78233
|
async function readInstalledAgentManifest(manifestPath) {
|
|
78433
|
-
if (!await
|
|
78234
|
+
if (!await exists5(manifestPath))
|
|
78434
78235
|
return [];
|
|
78435
78236
|
const parsed = JSON.parse(await readFile20(manifestPath, "utf8"));
|
|
78436
78237
|
if (!isPlainRecord3(parsed) || !Array.isArray(parsed.agents))
|
|
@@ -78469,7 +78270,7 @@ function isSafeManagedAgentPath(agentsDir, path7) {
|
|
|
78469
78270
|
return false;
|
|
78470
78271
|
return MANAGED_CODEX_AGENT_NAMES2.some((agentName) => fileName === `${agentName}.toml`);
|
|
78471
78272
|
}
|
|
78472
|
-
async function
|
|
78273
|
+
async function exists5(path7) {
|
|
78473
78274
|
return await maybeLstat2(path7) !== null;
|
|
78474
78275
|
}
|
|
78475
78276
|
async function maybeLstat2(path7) {
|
|
@@ -78488,8 +78289,158 @@ function nodeErrorCode5(error) {
|
|
|
78488
78289
|
}
|
|
78489
78290
|
// packages/omo-codex/src/install/codex-git-bash-mcp-env.ts
|
|
78490
78291
|
var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", "./components/codegraph/dist/serve.js"]);
|
|
78491
|
-
// packages/omo-
|
|
78292
|
+
// packages/omo-senpi/src/install/install-senpi.ts
|
|
78492
78293
|
import { execFile as execFile3 } from "node:child_process";
|
|
78294
|
+
import { constants as constants7, existsSync as existsSync32 } from "node:fs";
|
|
78295
|
+
import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile21, rename as rename5, writeFile as writeFile11 } from "node:fs/promises";
|
|
78296
|
+
import { homedir as homedir9 } from "node:os";
|
|
78297
|
+
import { dirname as dirname20, join as join55, resolve as resolve18 } from "node:path";
|
|
78298
|
+
import { fileURLToPath } from "node:url";
|
|
78299
|
+
import { promisify as promisify2 } from "node:util";
|
|
78300
|
+
var execFileAsync2 = promisify2(execFile3);
|
|
78301
|
+
var REQUIRED_PLUGIN_ARTIFACTS = [
|
|
78302
|
+
join55("extensions", "omo.js"),
|
|
78303
|
+
join55("skills", "ultrawork", "SKILL.md"),
|
|
78304
|
+
join55("skills", "ulw-loop", "SKILL.md")
|
|
78305
|
+
];
|
|
78306
|
+
async function runSenpiInstaller(options = {}) {
|
|
78307
|
+
const context = resolveInstallContext(options);
|
|
78308
|
+
await ensurePluginArtifacts(context);
|
|
78309
|
+
const settings = await readSettings(context.settingsPath);
|
|
78310
|
+
const before = JSON.stringify(settings);
|
|
78311
|
+
const packages = dedupePackages(readPackages(settings));
|
|
78312
|
+
if (!packages.includes(context.pluginPath))
|
|
78313
|
+
packages.push(context.pluginPath);
|
|
78314
|
+
settings.packages = packages;
|
|
78315
|
+
const backupPath = await writeSettingsAtomically(context.settingsPath, settings);
|
|
78316
|
+
return {
|
|
78317
|
+
ok: true,
|
|
78318
|
+
action: "install",
|
|
78319
|
+
agentDir: context.agentDir,
|
|
78320
|
+
settingsPath: context.settingsPath,
|
|
78321
|
+
pluginPath: context.pluginPath,
|
|
78322
|
+
changed: JSON.stringify(settings) !== before,
|
|
78323
|
+
backupPath
|
|
78324
|
+
};
|
|
78325
|
+
}
|
|
78326
|
+
function resolveInstallContext(options) {
|
|
78327
|
+
const env3 = options.env ?? process.env;
|
|
78328
|
+
const repoRoot = resolve18(options.repoRoot ?? findRepoRoot2(dirname20(fileURLToPath(import.meta.url))));
|
|
78329
|
+
const agentDir = resolve18(options.agentDir ?? env3.SENPI_CODING_AGENT_DIR ?? join55(homedir9(), ".senpi", "agent"));
|
|
78330
|
+
const pluginPath = resolve18(options.pluginPath ?? join55(repoRoot, "packages", "omo-senpi", "plugin"));
|
|
78331
|
+
return {
|
|
78332
|
+
env: env3,
|
|
78333
|
+
repoRoot,
|
|
78334
|
+
agentDir,
|
|
78335
|
+
settingsPath: join55(agentDir, "settings.json"),
|
|
78336
|
+
pluginPath,
|
|
78337
|
+
runCommand: options.runCommand ?? defaultRunCommand3
|
|
78338
|
+
};
|
|
78339
|
+
}
|
|
78340
|
+
async function ensurePluginArtifacts(context) {
|
|
78341
|
+
const missing = await hasMissingPluginArtifact(context.pluginPath);
|
|
78342
|
+
if (!missing)
|
|
78343
|
+
return;
|
|
78344
|
+
await context.runCommand("node", [join55(context.pluginPath, "scripts", "build-extension.mjs")], { cwd: context.repoRoot });
|
|
78345
|
+
await context.runCommand("node", [join55(context.pluginPath, "scripts", "sync-skills.mjs")], { cwd: context.repoRoot });
|
|
78346
|
+
}
|
|
78347
|
+
async function hasMissingPluginArtifact(pluginPath) {
|
|
78348
|
+
for (const artifact of REQUIRED_PLUGIN_ARTIFACTS) {
|
|
78349
|
+
if (!await fileExists(join55(pluginPath, artifact)))
|
|
78350
|
+
return true;
|
|
78351
|
+
}
|
|
78352
|
+
return false;
|
|
78353
|
+
}
|
|
78354
|
+
async function defaultRunCommand3(command, args, options) {
|
|
78355
|
+
const result = await execFileAsync2(command, [...args], { cwd: options.cwd });
|
|
78356
|
+
if (result.stderr.trim().length > 0)
|
|
78357
|
+
process.stderr.write(result.stderr);
|
|
78358
|
+
if (result.stdout.trim().length > 0)
|
|
78359
|
+
process.stdout.write(result.stdout);
|
|
78360
|
+
}
|
|
78361
|
+
async function readSettings(settingsPath) {
|
|
78362
|
+
let raw;
|
|
78363
|
+
try {
|
|
78364
|
+
raw = await readFile21(settingsPath, "utf8");
|
|
78365
|
+
} catch (error) {
|
|
78366
|
+
if (isErrno(error, "ENOENT"))
|
|
78367
|
+
return {};
|
|
78368
|
+
throw error;
|
|
78369
|
+
}
|
|
78370
|
+
const parsed = JSON.parse(raw);
|
|
78371
|
+
if (!isPlainObject3(parsed))
|
|
78372
|
+
throw new Error(`${settingsPath} must contain a JSON object`);
|
|
78373
|
+
return parsed;
|
|
78374
|
+
}
|
|
78375
|
+
function readPackages(settings) {
|
|
78376
|
+
const packages = settings.packages;
|
|
78377
|
+
if (packages === undefined)
|
|
78378
|
+
return [];
|
|
78379
|
+
if (!Array.isArray(packages) || !packages.every((entry) => typeof entry === "string")) {
|
|
78380
|
+
throw new Error("Senpi settings packages must be an array of strings");
|
|
78381
|
+
}
|
|
78382
|
+
return packages;
|
|
78383
|
+
}
|
|
78384
|
+
function dedupePackages(packages) {
|
|
78385
|
+
return [...new Set(packages)];
|
|
78386
|
+
}
|
|
78387
|
+
async function writeSettingsAtomically(settingsPath, settings) {
|
|
78388
|
+
await mkdir9(dirname20(settingsPath), { recursive: true });
|
|
78389
|
+
const backupPath = await nextBackupPath(settingsPath);
|
|
78390
|
+
if (await fileExists(settingsPath)) {
|
|
78391
|
+
await copyFile3(settingsPath, backupPath);
|
|
78392
|
+
} else {
|
|
78393
|
+
await writeFile11(backupPath, `{}
|
|
78394
|
+
`, "utf8");
|
|
78395
|
+
}
|
|
78396
|
+
const tempPath = `${settingsPath}.${process.pid}.${Date.now()}.tmp`;
|
|
78397
|
+
await writeFile11(tempPath, `${JSON.stringify(settings, null, 2)}
|
|
78398
|
+
`, "utf8");
|
|
78399
|
+
await rename5(tempPath, settingsPath);
|
|
78400
|
+
return backupPath;
|
|
78401
|
+
}
|
|
78402
|
+
async function nextBackupPath(settingsPath) {
|
|
78403
|
+
for (let index = 0;index < 1000; index += 1) {
|
|
78404
|
+
const suffix = index === 0 ? "" : `-${index}`;
|
|
78405
|
+
const candidate = `${settingsPath}.${timestampForBackup()}${suffix}.backup`;
|
|
78406
|
+
if (!await fileExists(candidate))
|
|
78407
|
+
return candidate;
|
|
78408
|
+
}
|
|
78409
|
+
throw new Error(`Unable to allocate backup path for ${settingsPath}`);
|
|
78410
|
+
}
|
|
78411
|
+
function timestampForBackup() {
|
|
78412
|
+
return new Date().toISOString().replace(/[-:.]/g, "");
|
|
78413
|
+
}
|
|
78414
|
+
function findRepoRoot2(importerDir) {
|
|
78415
|
+
let current = importerDir;
|
|
78416
|
+
for (let depth = 0;depth <= 7; depth += 1) {
|
|
78417
|
+
if (fileExistsSync(join55(current, "packages", "omo-senpi", "plugin", "package.json")))
|
|
78418
|
+
return current;
|
|
78419
|
+
current = resolve18(current, "..");
|
|
78420
|
+
}
|
|
78421
|
+
throw new Error("Unable to locate packages/omo-senpi/plugin/package.json from installer module");
|
|
78422
|
+
}
|
|
78423
|
+
function isPlainObject3(value) {
|
|
78424
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
78425
|
+
}
|
|
78426
|
+
async function fileExists(path7) {
|
|
78427
|
+
try {
|
|
78428
|
+
await access(path7, constants7.F_OK);
|
|
78429
|
+
return true;
|
|
78430
|
+
} catch (error) {
|
|
78431
|
+
if (isErrno(error, "ENOENT"))
|
|
78432
|
+
return false;
|
|
78433
|
+
throw error;
|
|
78434
|
+
}
|
|
78435
|
+
}
|
|
78436
|
+
function fileExistsSync(path7) {
|
|
78437
|
+
return existsSync32(path7);
|
|
78438
|
+
}
|
|
78439
|
+
function isErrno(error, code) {
|
|
78440
|
+
return error instanceof Error && "code" in error && error.code === code;
|
|
78441
|
+
}
|
|
78442
|
+
// packages/omo-opencode/src/cli/star-request.ts
|
|
78443
|
+
import { execFile as execFile4 } from "node:child_process";
|
|
78493
78444
|
import { promisify as promisify3 } from "node:util";
|
|
78494
78445
|
var STAR_REPOSITORIES = [
|
|
78495
78446
|
"code-yeongyu/oh-my-openagent",
|
|
@@ -78498,11 +78449,12 @@ var STAR_REPOSITORIES = [
|
|
|
78498
78449
|
var PLATFORM_REPOSITORIES = {
|
|
78499
78450
|
opencode: ["code-yeongyu/oh-my-openagent"],
|
|
78500
78451
|
codex: STAR_REPOSITORIES,
|
|
78501
|
-
both: STAR_REPOSITORIES
|
|
78452
|
+
both: STAR_REPOSITORIES,
|
|
78453
|
+
senpi: STAR_REPOSITORIES
|
|
78502
78454
|
};
|
|
78503
|
-
var
|
|
78455
|
+
var execFileAsync3 = promisify3(execFile4);
|
|
78504
78456
|
async function runGitHubStarCommand(repository) {
|
|
78505
|
-
await
|
|
78457
|
+
await execFileAsync3("gh", ["api", "--silent", "--method", "PUT", `/user/starred/${repository}`]);
|
|
78506
78458
|
}
|
|
78507
78459
|
async function starGitHubRepositories(platform = "both", runCommand = runGitHubStarCommand) {
|
|
78508
78460
|
const results = [];
|
|
@@ -78521,23 +78473,23 @@ async function starGitHubRepositories(platform = "both", runCommand = runGitHubS
|
|
|
78521
78473
|
init_provider_availability();
|
|
78522
78474
|
|
|
78523
78475
|
// packages/omo-opencode/src/cli/config-manager/add-tui-plugin-to-tui-config.ts
|
|
78524
|
-
import { existsSync as
|
|
78525
|
-
import { join as
|
|
78476
|
+
import { existsSync as existsSync34, mkdirSync as mkdirSync10, readFileSync as readFileSync16 } from "node:fs";
|
|
78477
|
+
import { join as join57 } from "node:path";
|
|
78526
78478
|
|
|
78527
78479
|
// packages/omo-opencode/src/cli/doctor/checks/tui-plugin-config.ts
|
|
78528
78480
|
init_shared();
|
|
78529
|
-
import { existsSync as
|
|
78530
|
-
import { join as
|
|
78481
|
+
import { existsSync as existsSync33, readFileSync as readFileSync15 } from "node:fs";
|
|
78482
|
+
import { join as join56 } from "node:path";
|
|
78531
78483
|
var TUI_SUBPATH = "tui";
|
|
78532
78484
|
var TUI_EXPORT_SUBPATH = `./${TUI_SUBPATH}`;
|
|
78533
78485
|
function fileEntryPackageJsonPath(entry) {
|
|
78534
78486
|
let path7 = entry.slice("file:".length);
|
|
78535
78487
|
if (path7.startsWith("//"))
|
|
78536
78488
|
path7 = path7.slice(2);
|
|
78537
|
-
return
|
|
78489
|
+
return join56(path7, "package.json");
|
|
78538
78490
|
}
|
|
78539
78491
|
function packageJsonExportsTui(pkgJsonPath) {
|
|
78540
|
-
if (!
|
|
78492
|
+
if (!existsSync33(pkgJsonPath))
|
|
78541
78493
|
return null;
|
|
78542
78494
|
try {
|
|
78543
78495
|
const parsed = JSON.parse(readFileSync15(pkgJsonPath, "utf-8"));
|
|
@@ -78557,9 +78509,9 @@ function packageJsonExportsTui(pkgJsonPath) {
|
|
|
78557
78509
|
}
|
|
78558
78510
|
}
|
|
78559
78511
|
function packageNameFromServerEntry(entry) {
|
|
78560
|
-
if (entry === PLUGIN_NAME || entry.startsWith(`${PLUGIN_NAME}@`))
|
|
78512
|
+
if (typeof entry === "string" && (entry === PLUGIN_NAME || entry.startsWith(`${PLUGIN_NAME}@`)))
|
|
78561
78513
|
return PLUGIN_NAME;
|
|
78562
|
-
if (entry === LEGACY_PLUGIN_NAME || entry.startsWith(`${LEGACY_PLUGIN_NAME}@`))
|
|
78514
|
+
if (typeof entry === "string" && (entry === LEGACY_PLUGIN_NAME || entry.startsWith(`${LEGACY_PLUGIN_NAME}@`)))
|
|
78563
78515
|
return LEGACY_PLUGIN_NAME;
|
|
78564
78516
|
return null;
|
|
78565
78517
|
}
|
|
@@ -78567,19 +78519,19 @@ function isPackagePluginEntry(entry) {
|
|
|
78567
78519
|
return packageNameFromServerEntry(entry) !== null;
|
|
78568
78520
|
}
|
|
78569
78521
|
function packageExportsTuiForServerEntry(entry) {
|
|
78570
|
-
if (entry.startsWith("file:"))
|
|
78522
|
+
if (typeof entry === "string" && entry.startsWith("file:"))
|
|
78571
78523
|
return packageJsonExportsTui(fileEntryPackageJsonPath(entry));
|
|
78572
78524
|
const packageName = packageNameFromServerEntry(entry);
|
|
78573
78525
|
if (packageName === null)
|
|
78574
78526
|
return null;
|
|
78575
|
-
return packageJsonExportsTui(
|
|
78527
|
+
return packageJsonExportsTui(join56(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));
|
|
78576
78528
|
}
|
|
78577
78529
|
function isOurFilePluginEntry(entry) {
|
|
78578
|
-
if (!entry.startsWith("file:"))
|
|
78530
|
+
if (typeof entry !== "string" || !entry.startsWith("file:"))
|
|
78579
78531
|
return false;
|
|
78580
78532
|
try {
|
|
78581
78533
|
const pkgJsonPath = fileEntryPackageJsonPath(entry);
|
|
78582
|
-
if (!
|
|
78534
|
+
if (!existsSync33(pkgJsonPath))
|
|
78583
78535
|
return false;
|
|
78584
78536
|
const parsed = JSON.parse(readFileSync15(pkgJsonPath, "utf-8"));
|
|
78585
78537
|
return typeof parsed.name === "string" && ACCEPTED_PACKAGE_NAMES.includes(parsed.name);
|
|
@@ -78592,37 +78544,29 @@ function isOurFilePluginEntry(entry) {
|
|
|
78592
78544
|
}
|
|
78593
78545
|
}
|
|
78594
78546
|
function isServerPluginEntry(entry) {
|
|
78595
|
-
if (entry === PLUGIN_NAME || entry.startsWith(`${PLUGIN_NAME}@`))
|
|
78547
|
+
if (typeof entry === "string" && (entry === PLUGIN_NAME || entry.startsWith(`${PLUGIN_NAME}@`)))
|
|
78596
78548
|
return true;
|
|
78597
|
-
if (entry === LEGACY_PLUGIN_NAME || entry.startsWith(`${LEGACY_PLUGIN_NAME}@`))
|
|
78549
|
+
if (typeof entry === "string" && (entry === LEGACY_PLUGIN_NAME || entry.startsWith(`${LEGACY_PLUGIN_NAME}@`)))
|
|
78598
78550
|
return true;
|
|
78599
|
-
if (entry.startsWith("file:") && isOurFilePluginEntry(entry))
|
|
78551
|
+
if (typeof entry === "string" && entry.startsWith("file:") && isOurFilePluginEntry(entry))
|
|
78600
78552
|
return true;
|
|
78601
78553
|
return false;
|
|
78602
78554
|
}
|
|
78603
78555
|
function isTuiPluginEntry(entry) {
|
|
78604
|
-
|
|
78605
|
-
return true;
|
|
78606
|
-
if (entry.startsWith("file:") && isOurFilePluginEntry(entry))
|
|
78607
|
-
return true;
|
|
78608
|
-
return false;
|
|
78556
|
+
return typeof entry === "string" && (isPackagePluginEntry(entry) || entry.startsWith("file:") && isOurFilePluginEntry(entry));
|
|
78609
78557
|
}
|
|
78610
78558
|
function isNamedTuiPluginEntry(entry) {
|
|
78611
78559
|
const canonicalPrefix = `${PLUGIN_NAME}/${TUI_SUBPATH}`;
|
|
78612
78560
|
const legacyPrefix = `${LEGACY_PLUGIN_NAME}/${TUI_SUBPATH}`;
|
|
78613
|
-
|
|
78614
|
-
return true;
|
|
78615
|
-
if (entry === legacyPrefix || entry.startsWith(`${legacyPrefix}@`))
|
|
78616
|
-
return true;
|
|
78617
|
-
return false;
|
|
78561
|
+
return typeof entry === "string" && (entry === canonicalPrefix || entry.startsWith(`${canonicalPrefix}@`) || entry === legacyPrefix || entry.startsWith(`${legacyPrefix}@`));
|
|
78618
78562
|
}
|
|
78619
78563
|
function isCanonicalNamedTuiPluginEntry(entry) {
|
|
78620
78564
|
const canonicalPrefix = `${PLUGIN_NAME}/${TUI_SUBPATH}`;
|
|
78621
|
-
return entry === canonicalPrefix || entry.startsWith(`${canonicalPrefix}@`);
|
|
78565
|
+
return typeof entry === "string" && (entry === canonicalPrefix || entry.startsWith(`${canonicalPrefix}@`));
|
|
78622
78566
|
}
|
|
78623
78567
|
function detectServerPluginRegistration() {
|
|
78624
78568
|
const paths = getOpenCodeConfigPaths({ binary: "opencode", version: null });
|
|
78625
|
-
const configPath =
|
|
78569
|
+
const configPath = existsSync33(paths.configJsonc) ? paths.configJsonc : existsSync33(paths.configJson) ? paths.configJson : null;
|
|
78626
78570
|
if (!configPath) {
|
|
78627
78571
|
return { registered: false, configPath: null, entry: null, packageExportsTui: null };
|
|
78628
78572
|
}
|
|
@@ -78645,8 +78589,8 @@ function detectServerPluginRegistration() {
|
|
|
78645
78589
|
}
|
|
78646
78590
|
}
|
|
78647
78591
|
function detectTuiPluginRegistration() {
|
|
78648
|
-
const tuiJsonPath =
|
|
78649
|
-
if (!
|
|
78592
|
+
const tuiJsonPath = join56(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");
|
|
78593
|
+
if (!existsSync33(tuiJsonPath)) {
|
|
78650
78594
|
return {
|
|
78651
78595
|
registered: false,
|
|
78652
78596
|
configPath: tuiJsonPath,
|
|
@@ -78801,11 +78745,11 @@ function readConfig(path7) {
|
|
|
78801
78745
|
return null;
|
|
78802
78746
|
}
|
|
78803
78747
|
function readServerConfig(configDir) {
|
|
78804
|
-
const jsoncPath =
|
|
78805
|
-
if (
|
|
78748
|
+
const jsoncPath = join57(configDir, "opencode.jsonc");
|
|
78749
|
+
if (existsSync34(jsoncPath))
|
|
78806
78750
|
return readConfig(jsoncPath);
|
|
78807
|
-
const jsonPath =
|
|
78808
|
-
if (
|
|
78751
|
+
const jsonPath = join57(configDir, "opencode.json");
|
|
78752
|
+
if (existsSync34(jsonPath))
|
|
78809
78753
|
return readConfig(jsonPath);
|
|
78810
78754
|
return null;
|
|
78811
78755
|
}
|
|
@@ -78825,7 +78769,7 @@ function desiredTuiEntry(serverEntry) {
|
|
|
78825
78769
|
return null;
|
|
78826
78770
|
}
|
|
78827
78771
|
function readTuiConfig(tuiJsonPath) {
|
|
78828
|
-
if (!
|
|
78772
|
+
if (!existsSync34(tuiJsonPath)) {
|
|
78829
78773
|
return { config: {}, malformed: false };
|
|
78830
78774
|
}
|
|
78831
78775
|
const config = readConfig(tuiJsonPath);
|
|
@@ -78846,7 +78790,7 @@ function ensureTuiPluginEntry(opts = {}) {
|
|
|
78846
78790
|
if (!desiredEntry) {
|
|
78847
78791
|
return { changed: false, reason: "no-server-entry" };
|
|
78848
78792
|
}
|
|
78849
|
-
const tuiJsonPath =
|
|
78793
|
+
const tuiJsonPath = join57(configDir, "tui.json");
|
|
78850
78794
|
const { config, malformed } = readTuiConfig(tuiJsonPath);
|
|
78851
78795
|
if (malformed) {
|
|
78852
78796
|
return { changed: false, reason: "malformed" };
|
|
@@ -78861,13 +78805,13 @@ function ensureTuiPluginEntry(opts = {}) {
|
|
|
78861
78805
|
}
|
|
78862
78806
|
|
|
78863
78807
|
// packages/omo-opencode/src/cli/install-ast-grep-sg.ts
|
|
78864
|
-
import { homedir as
|
|
78865
|
-
import { join as
|
|
78808
|
+
import { homedir as homedir10 } from "node:os";
|
|
78809
|
+
import { join as join58 } from "node:path";
|
|
78866
78810
|
|
|
78867
78811
|
// packages/shared-skills/index.mjs
|
|
78868
|
-
import { fileURLToPath } from "node:url";
|
|
78812
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
78869
78813
|
function sharedSkillsRootPath() {
|
|
78870
|
-
return
|
|
78814
|
+
return fileURLToPath2(new URL("./skills/", import.meta.url));
|
|
78871
78815
|
}
|
|
78872
78816
|
|
|
78873
78817
|
// packages/omo-opencode/src/cli/install-ast-grep-sg.ts
|
|
@@ -78881,9 +78825,9 @@ function describeResult2(result) {
|
|
|
78881
78825
|
}
|
|
78882
78826
|
async function installAstGrepForOpenCode(options = {}) {
|
|
78883
78827
|
const platform = options.platform ?? process.platform;
|
|
78884
|
-
const baseDir =
|
|
78828
|
+
const baseDir = join58(options.homeDir ?? homedir10(), ".omo");
|
|
78885
78829
|
const targetDir = astGrepRuntimeDir(baseDir, platform, options.arch ?? process.arch);
|
|
78886
|
-
const skillDir =
|
|
78830
|
+
const skillDir = join58(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");
|
|
78887
78831
|
const installer = options.installer ?? runAstGrepSkillInstall;
|
|
78888
78832
|
try {
|
|
78889
78833
|
const result = await installer({ platform, skillDir, targetDir });
|
|
@@ -79004,6 +78948,18 @@ async function runCliInstaller(args, version2) {
|
|
|
79004
78948
|
}
|
|
79005
78949
|
console.log();
|
|
79006
78950
|
}
|
|
78951
|
+
if (config.hasSenpi) {
|
|
78952
|
+
printInfo("Installing Senpi harness adapter...");
|
|
78953
|
+
try {
|
|
78954
|
+
const senpiResult = await runSenpiInstaller();
|
|
78955
|
+
printSuccess(`Senpi adapter installed ${SYMBOLS.arrow} ${import_picocolors3.default.dim(senpiResult.settingsPath)}`);
|
|
78956
|
+
} catch (error) {
|
|
78957
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
78958
|
+
printError(`Senpi install failed: ${message}`);
|
|
78959
|
+
return 1;
|
|
78960
|
+
}
|
|
78961
|
+
console.log();
|
|
78962
|
+
}
|
|
79007
78963
|
printInfo("Anonymous telemetry is enabled by default. Disable it with OMO_SEND_ANONYMOUS_TELEMETRY=0 or OMO_DISABLE_POSTHOG=1.");
|
|
79008
78964
|
printInfo("Docs: docs/legal/privacy-policy.md and docs/legal/terms-of-service.md");
|
|
79009
78965
|
console.log();
|
|
@@ -79285,7 +79241,7 @@ var stringVisibleTrimSpacesRight = (string) => {
|
|
|
79285
79241
|
}
|
|
79286
79242
|
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
79287
79243
|
};
|
|
79288
|
-
var
|
|
79244
|
+
var exec = (string, columns, options = {}) => {
|
|
79289
79245
|
if (options.trim !== false && string.trim() === "") {
|
|
79290
79246
|
return "";
|
|
79291
79247
|
}
|
|
@@ -79395,7 +79351,7 @@ var exec2 = (string, columns, options = {}) => {
|
|
|
79395
79351
|
};
|
|
79396
79352
|
var CRLF_OR_LF = /\r?\n/;
|
|
79397
79353
|
function wrapAnsi(string, columns, options) {
|
|
79398
|
-
return String(string).normalize().split(CRLF_OR_LF).map((line) =>
|
|
79354
|
+
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join(`
|
|
79399
79355
|
`);
|
|
79400
79356
|
}
|
|
79401
79357
|
|
|
@@ -80369,6 +80325,21 @@ var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
|
80369
80325
|
|
|
80370
80326
|
// packages/omo-opencode/src/cli/tui-install-prompts.ts
|
|
80371
80327
|
init_model_fallback();
|
|
80328
|
+
|
|
80329
|
+
// packages/omo-opencode/src/cli/senpi-platform-flag.ts
|
|
80330
|
+
var SENPI_PLATFORM_ENV_FLAG = "OMO_ENABLE_SENPI_PLATFORM";
|
|
80331
|
+
function isSenpiPlatformEnabled(env3 = process.env) {
|
|
80332
|
+
const value = env3[SENPI_PLATFORM_ENV_FLAG]?.trim().toLowerCase();
|
|
80333
|
+
return value === "1" || value === "true";
|
|
80334
|
+
}
|
|
80335
|
+
function availableInstallPlatforms(env3 = process.env) {
|
|
80336
|
+
const platforms = ["opencode", "codex", "both"];
|
|
80337
|
+
if (isSenpiPlatformEnabled(env3))
|
|
80338
|
+
platforms.push("senpi");
|
|
80339
|
+
return platforms;
|
|
80340
|
+
}
|
|
80341
|
+
|
|
80342
|
+
// packages/omo-opencode/src/cli/tui-install-prompts.ts
|
|
80372
80343
|
async function selectOrCancel(params) {
|
|
80373
80344
|
if (!process.stdin.isTTY || !process.stdout.isTTY)
|
|
80374
80345
|
return null;
|
|
@@ -80389,6 +80360,9 @@ async function promptInstallPlatform(initialValue = "opencode") {
|
|
|
80389
80360
|
{ value: "codex", label: "Codex", hint: "Install Codex harness adapter only" },
|
|
80390
80361
|
{ value: "both", label: "Both", hint: "Install OpenCode plugin and Codex adapter" }
|
|
80391
80362
|
];
|
|
80363
|
+
if (isSenpiPlatformEnabled()) {
|
|
80364
|
+
options.push({ value: "senpi", label: "Senpi", hint: "Install Senpi harness adapter only" });
|
|
80365
|
+
}
|
|
80392
80366
|
return selectOrCancel({
|
|
80393
80367
|
message: "Which platform do you want to install?",
|
|
80394
80368
|
options,
|
|
@@ -80398,6 +80372,7 @@ async function promptInstallPlatform(initialValue = "opencode") {
|
|
|
80398
80372
|
async function promptInstallConfig(detected, platform, codexAutonomousOverride) {
|
|
80399
80373
|
const hasOpenCode = platform === "opencode" || platform === "both";
|
|
80400
80374
|
const hasCodex = platform === "codex" || platform === "both";
|
|
80375
|
+
const hasSenpi = platform === "senpi";
|
|
80401
80376
|
const codexAutonomous = await resolveCodexAutonomous(hasCodex, codexAutonomousOverride);
|
|
80402
80377
|
if (codexAutonomous === null)
|
|
80403
80378
|
return null;
|
|
@@ -80411,6 +80386,7 @@ async function promptInstallConfig(detected, platform, codexAutonomousOverride)
|
|
|
80411
80386
|
hasGemini: false,
|
|
80412
80387
|
hasCopilot: false,
|
|
80413
80388
|
hasCodex,
|
|
80389
|
+
hasSenpi,
|
|
80414
80390
|
hasOpencodeZen: false,
|
|
80415
80391
|
hasZaiCodingPlan: false,
|
|
80416
80392
|
hasKimiForCoding: false,
|
|
@@ -80553,6 +80529,7 @@ async function promptInstallConfig(detected, platform, codexAutonomousOverride)
|
|
|
80553
80529
|
hasGemini: gemini === "yes",
|
|
80554
80530
|
hasCopilot: copilot === "yes",
|
|
80555
80531
|
hasCodex,
|
|
80532
|
+
hasSenpi,
|
|
80556
80533
|
hasOpencodeZen: opencodeZen === "yes",
|
|
80557
80534
|
hasZaiCodingPlan: zaiCodingPlan === "yes",
|
|
80558
80535
|
hasKimiForCoding: kimiForCoding === "yes",
|
|
@@ -80682,6 +80659,19 @@ async function runTuiInstaller(args, version2) {
|
|
|
80682
80659
|
R2.warn(`Codex install failed (OpenCode install remains successful): ${message}`);
|
|
80683
80660
|
}
|
|
80684
80661
|
}
|
|
80662
|
+
if (config.hasSenpi) {
|
|
80663
|
+
spinner.start("Installing Senpi harness adapter");
|
|
80664
|
+
try {
|
|
80665
|
+
const senpiResult = await runSenpiInstaller();
|
|
80666
|
+
spinner.stop(`Senpi adapter installed to ${import_picocolors4.default.cyan(senpiResult.settingsPath)}`);
|
|
80667
|
+
} catch (error) {
|
|
80668
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
80669
|
+
spinner.stop(`Senpi install failed ${import_picocolors4.default.yellow("[!]")}`);
|
|
80670
|
+
R2.error(`Senpi install failed: ${message}`);
|
|
80671
|
+
fe(import_picocolors4.default.red("Installation failed."));
|
|
80672
|
+
return 1;
|
|
80673
|
+
}
|
|
80674
|
+
}
|
|
80685
80675
|
R2.success(import_picocolors4.default.bold(isUpdate ? "Configuration updated!" : "Installation complete!"));
|
|
80686
80676
|
if (config.hasOpenCode) {
|
|
80687
80677
|
R2.message(`Run ${import_picocolors4.default.cyan("opencode")} to start!`);
|
|
@@ -80729,7 +80719,7 @@ async function runTuiInstaller(args, version2) {
|
|
|
80729
80719
|
|
|
80730
80720
|
// packages/omo-opencode/src/cli/install.ts
|
|
80731
80721
|
var VERSION = package_default.version;
|
|
80732
|
-
async function
|
|
80722
|
+
async function install3(args) {
|
|
80733
80723
|
return args.tui ? runTuiInstaller(args, VERSION) : runCliInstaller(args, VERSION);
|
|
80734
80724
|
}
|
|
80735
80725
|
// packages/omo-opencode/src/cli/cleanup.ts
|
|
@@ -81532,7 +81522,7 @@ async function processEvents(ctx, stream, state) {
|
|
|
81532
81522
|
}
|
|
81533
81523
|
// packages/omo-opencode/src/plugin-config/layered-config-loader.ts
|
|
81534
81524
|
import * as fs5 from "fs";
|
|
81535
|
-
import { homedir as
|
|
81525
|
+
import { homedir as homedir11 } from "node:os";
|
|
81536
81526
|
import * as path7 from "path";
|
|
81537
81527
|
|
|
81538
81528
|
// node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
@@ -82166,7 +82156,7 @@ __export(exports_util, {
|
|
|
82166
82156
|
jsonStringifyReplacer: () => jsonStringifyReplacer,
|
|
82167
82157
|
joinValues: () => joinValues,
|
|
82168
82158
|
issue: () => issue,
|
|
82169
|
-
isPlainObject: () =>
|
|
82159
|
+
isPlainObject: () => isPlainObject4,
|
|
82170
82160
|
isObject: () => isObject2,
|
|
82171
82161
|
hexToUint8Array: () => hexToUint8Array,
|
|
82172
82162
|
getSizableOrigin: () => getSizableOrigin,
|
|
@@ -82348,7 +82338,7 @@ var allowsEval = /* @__PURE__ */ cached(() => {
|
|
|
82348
82338
|
return false;
|
|
82349
82339
|
}
|
|
82350
82340
|
});
|
|
82351
|
-
function
|
|
82341
|
+
function isPlainObject4(o) {
|
|
82352
82342
|
if (isObject2(o) === false)
|
|
82353
82343
|
return false;
|
|
82354
82344
|
const ctor = o.constructor;
|
|
@@ -82365,7 +82355,7 @@ function isPlainObject3(o) {
|
|
|
82365
82355
|
return true;
|
|
82366
82356
|
}
|
|
82367
82357
|
function shallowClone(o) {
|
|
82368
|
-
if (
|
|
82358
|
+
if (isPlainObject4(o))
|
|
82369
82359
|
return { ...o };
|
|
82370
82360
|
if (Array.isArray(o))
|
|
82371
82361
|
return [...o];
|
|
@@ -82569,7 +82559,7 @@ function omit(schema, mask) {
|
|
|
82569
82559
|
return clone(schema, def);
|
|
82570
82560
|
}
|
|
82571
82561
|
function extend(schema, shape) {
|
|
82572
|
-
if (!
|
|
82562
|
+
if (!isPlainObject4(shape)) {
|
|
82573
82563
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
82574
82564
|
}
|
|
82575
82565
|
const checks = schema._zod.def.checks;
|
|
@@ -82592,7 +82582,7 @@ function extend(schema, shape) {
|
|
|
82592
82582
|
return clone(schema, def);
|
|
82593
82583
|
}
|
|
82594
82584
|
function safeExtend(schema, shape) {
|
|
82595
|
-
if (!
|
|
82585
|
+
if (!isPlainObject4(shape)) {
|
|
82596
82586
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
82597
82587
|
}
|
|
82598
82588
|
const def = mergeDefs(schema._zod.def, {
|
|
@@ -84935,7 +84925,7 @@ function mergeValues(a, b2) {
|
|
|
84935
84925
|
if (a instanceof Date && b2 instanceof Date && +a === +b2) {
|
|
84936
84926
|
return { valid: true, data: a };
|
|
84937
84927
|
}
|
|
84938
|
-
if (
|
|
84928
|
+
if (isPlainObject4(a) && isPlainObject4(b2)) {
|
|
84939
84929
|
const bKeys = Object.keys(b2);
|
|
84940
84930
|
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
84941
84931
|
const newObj = { ...a, ...b2 };
|
|
@@ -85121,7 +85111,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
85121
85111
|
$ZodType.init(inst, def);
|
|
85122
85112
|
inst._zod.parse = (payload, ctx) => {
|
|
85123
85113
|
const input = payload.value;
|
|
85124
|
-
if (!
|
|
85114
|
+
if (!isPlainObject4(input)) {
|
|
85125
85115
|
payload.issues.push({
|
|
85126
85116
|
expected: "record",
|
|
85127
85117
|
code: "invalid_type",
|
|
@@ -96273,18 +96263,18 @@ var RuntimeFallbackConfigSchema = exports_external.object({
|
|
|
96273
96263
|
});
|
|
96274
96264
|
|
|
96275
96265
|
// packages/team-core/src/config.ts
|
|
96276
|
-
var TeamModeConfigSchema =
|
|
96277
|
-
enabled:
|
|
96278
|
-
tmux_visualization:
|
|
96279
|
-
max_parallel_members:
|
|
96280
|
-
max_members:
|
|
96281
|
-
max_messages_per_run:
|
|
96282
|
-
max_wall_clock_minutes:
|
|
96283
|
-
max_member_turns:
|
|
96284
|
-
base_dir:
|
|
96285
|
-
message_payload_max_bytes:
|
|
96286
|
-
recipient_unread_max_bytes:
|
|
96287
|
-
mailbox_poll_interval_ms:
|
|
96266
|
+
var TeamModeConfigSchema = object({
|
|
96267
|
+
enabled: boolean2().default(false),
|
|
96268
|
+
tmux_visualization: boolean2().default(false),
|
|
96269
|
+
max_parallel_members: number2().int().min(1).max(8).default(4),
|
|
96270
|
+
max_members: number2().int().min(1).max(8).default(8),
|
|
96271
|
+
max_messages_per_run: number2().int().min(1).default(1e4),
|
|
96272
|
+
max_wall_clock_minutes: number2().int().min(1).default(120),
|
|
96273
|
+
max_member_turns: number2().int().min(1).default(500),
|
|
96274
|
+
base_dir: string2().optional(),
|
|
96275
|
+
message_payload_max_bytes: number2().int().min(1024).default(32768),
|
|
96276
|
+
recipient_unread_max_bytes: number2().int().min(1024).default(262144),
|
|
96277
|
+
mailbox_poll_interval_ms: number2().int().min(500).default(3000)
|
|
96288
96278
|
});
|
|
96289
96279
|
// packages/omo-opencode/src/config/schema/skills.ts
|
|
96290
96280
|
var SkillSourceSchema = exports_external.union([
|
|
@@ -96691,7 +96681,7 @@ function loadConfigFromPath(configPath, _ctx) {
|
|
|
96691
96681
|
|
|
96692
96682
|
// packages/omo-opencode/src/plugin-config/layered-config-loader.ts
|
|
96693
96683
|
function resolveHomeDirectory() {
|
|
96694
|
-
return process.env.HOME ?? process.env.USERPROFILE ??
|
|
96684
|
+
return process.env.HOME ?? process.env.USERPROFILE ?? homedir11();
|
|
96695
96685
|
}
|
|
96696
96686
|
function resolveConfigPathAfterLegacyMigration(detectedPath) {
|
|
96697
96687
|
if (!path7.basename(detectedPath).startsWith(LEGACY_CONFIG_BASENAME)) {
|
|
@@ -96832,7 +96822,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
|
96832
96822
|
// packages/omo-opencode/src/cli/run/opencode-binary-resolver.ts
|
|
96833
96823
|
init_bun_which_shim();
|
|
96834
96824
|
init_spawn_with_windows_hide();
|
|
96835
|
-
import { delimiter as delimiter2, dirname as
|
|
96825
|
+
import { delimiter as delimiter2, dirname as dirname22, posix as posix4, win32 as win324 } from "node:path";
|
|
96836
96826
|
var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
|
|
96837
96827
|
var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
|
|
96838
96828
|
function getCommandCandidates(platform) {
|
|
@@ -96890,7 +96880,7 @@ async function findWorkingOpencodeBinary(pathEnv = process.env.PATH, probe2 = ca
|
|
|
96890
96880
|
return null;
|
|
96891
96881
|
}
|
|
96892
96882
|
function buildPathWithBinaryFirst(pathEnv, binaryPath) {
|
|
96893
|
-
const preferredDir =
|
|
96883
|
+
const preferredDir = dirname22(binaryPath);
|
|
96894
96884
|
const existing = (pathEnv ?? "").split(delimiter2).filter((entry) => entry.length > 0 && entry !== preferredDir);
|
|
96895
96885
|
return [preferredDir, ...existing].join(delimiter2);
|
|
96896
96886
|
}
|
|
@@ -97032,6 +97022,7 @@ var SESSION_CREATE_MAX_RETRIES = 3;
|
|
|
97032
97022
|
var SESSION_CREATE_RETRY_DELAY_MS = 1000;
|
|
97033
97023
|
async function resolveSession(options) {
|
|
97034
97024
|
const { client: client3, sessionId, directory } = options;
|
|
97025
|
+
const retryDelayMs = options.retryDelayMs ?? SESSION_CREATE_RETRY_DELAY_MS;
|
|
97035
97026
|
if (sessionId) {
|
|
97036
97027
|
const res = await client3.session.get({
|
|
97037
97028
|
path: { id: sessionId },
|
|
@@ -97056,9 +97047,9 @@ async function resolveSession(options) {
|
|
|
97056
97047
|
console.error(import_picocolors12.default.yellow(`Session create attempt ${attempt}/${SESSION_CREATE_MAX_RETRIES} failed:`));
|
|
97057
97048
|
console.error(import_picocolors12.default.dim(` Error: ${serializeError2(res.error)}`));
|
|
97058
97049
|
if (attempt < SESSION_CREATE_MAX_RETRIES) {
|
|
97059
|
-
const delay2 =
|
|
97050
|
+
const delay2 = retryDelayMs * attempt;
|
|
97060
97051
|
console.log(import_picocolors12.default.dim(` Retrying in ${delay2}ms...`));
|
|
97061
|
-
await new Promise((
|
|
97052
|
+
await new Promise((resolve19) => setTimeout(resolve19, delay2));
|
|
97062
97053
|
}
|
|
97063
97054
|
continue;
|
|
97064
97055
|
}
|
|
@@ -97067,9 +97058,9 @@ async function resolveSession(options) {
|
|
|
97067
97058
|
}
|
|
97068
97059
|
console.error(import_picocolors12.default.yellow(`Session create attempt ${attempt}/${SESSION_CREATE_MAX_RETRIES}: No session ID returned`));
|
|
97069
97060
|
if (attempt < SESSION_CREATE_MAX_RETRIES) {
|
|
97070
|
-
const delay2 =
|
|
97061
|
+
const delay2 = retryDelayMs * attempt;
|
|
97071
97062
|
console.log(import_picocolors12.default.dim(` Retrying in ${delay2}ms...`));
|
|
97072
|
-
await new Promise((
|
|
97063
|
+
await new Promise((resolve19) => setTimeout(resolve19, delay2));
|
|
97073
97064
|
}
|
|
97074
97065
|
}
|
|
97075
97066
|
throw new Error("Failed to create session after all retries");
|
|
@@ -97282,7 +97273,7 @@ var BOULDER_STATE_PATH = `${BOULDER_DIR}/${BOULDER_FILE}`;
|
|
|
97282
97273
|
var NOTEPAD_DIR = "notepads";
|
|
97283
97274
|
var NOTEPAD_BASE_PATH = `${BOULDER_DIR}/${NOTEPAD_DIR}`;
|
|
97284
97275
|
// packages/boulder-state/src/top-level-task.ts
|
|
97285
|
-
import { existsSync as
|
|
97276
|
+
import { existsSync as existsSync37, readFileSync as readFileSync18 } from "node:fs";
|
|
97286
97277
|
var TODO_HEADING_PATTERN = /^##\s+TODOs\b/i;
|
|
97287
97278
|
var FINAL_VERIFICATION_HEADING_PATTERN = /^##\s+Final Verification Wave\b/i;
|
|
97288
97279
|
var SECOND_LEVEL_HEADING_PATTERN = /^##\s+/;
|
|
@@ -97305,7 +97296,7 @@ function buildTaskRef(section, taskLabel) {
|
|
|
97305
97296
|
};
|
|
97306
97297
|
}
|
|
97307
97298
|
function readCurrentTopLevelTask(planPath) {
|
|
97308
|
-
if (!
|
|
97299
|
+
if (!existsSync37(planPath)) {
|
|
97309
97300
|
return null;
|
|
97310
97301
|
}
|
|
97311
97302
|
try {
|
|
@@ -97334,13 +97325,13 @@ function readCurrentTopLevelTask(planPath) {
|
|
|
97334
97325
|
}
|
|
97335
97326
|
}
|
|
97336
97327
|
// packages/boulder-state/src/storage/path.ts
|
|
97337
|
-
import { existsSync as
|
|
97338
|
-
import { isAbsolute as isAbsolute11, join as
|
|
97328
|
+
import { existsSync as existsSync38 } from "node:fs";
|
|
97329
|
+
import { isAbsolute as isAbsolute11, join as join60, relative as relative8, resolve as resolve19 } from "node:path";
|
|
97339
97330
|
function getBoulderFilePath(directory) {
|
|
97340
|
-
return
|
|
97331
|
+
return join60(directory, BOULDER_DIR, BOULDER_FILE);
|
|
97341
97332
|
}
|
|
97342
97333
|
function resolveTrackedPath(baseDirectory, trackedPath) {
|
|
97343
|
-
return isAbsolute11(trackedPath) ?
|
|
97334
|
+
return isAbsolute11(trackedPath) ? resolve19(trackedPath) : resolve19(baseDirectory, trackedPath);
|
|
97344
97335
|
}
|
|
97345
97336
|
function resolveBoulderPlanPath(directory, state) {
|
|
97346
97337
|
const absolutePlanPath = resolveTrackedPath(directory, state.active_plan);
|
|
@@ -97348,20 +97339,20 @@ function resolveBoulderPlanPath(directory, state) {
|
|
|
97348
97339
|
if (!worktreePath) {
|
|
97349
97340
|
return absolutePlanPath;
|
|
97350
97341
|
}
|
|
97351
|
-
const absoluteDirectory =
|
|
97342
|
+
const absoluteDirectory = resolve19(directory);
|
|
97352
97343
|
const relativePlanPath = relative8(absoluteDirectory, absolutePlanPath);
|
|
97353
97344
|
if (relativePlanPath.length === 0 || relativePlanPath.startsWith("..") || isAbsolute11(relativePlanPath)) {
|
|
97354
97345
|
return absolutePlanPath;
|
|
97355
97346
|
}
|
|
97356
97347
|
const absoluteWorktreePath = resolveTrackedPath(directory, worktreePath);
|
|
97357
|
-
const worktreePlanPath =
|
|
97358
|
-
return
|
|
97348
|
+
const worktreePlanPath = resolve19(absoluteWorktreePath, relativePlanPath);
|
|
97349
|
+
return existsSync38(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
|
|
97359
97350
|
}
|
|
97360
97351
|
function resolveBoulderPlanPathForWork(directory, work) {
|
|
97361
97352
|
return resolveBoulderPlanPath(directory, work);
|
|
97362
97353
|
}
|
|
97363
97354
|
// packages/boulder-state/src/storage/plan-progress.ts
|
|
97364
|
-
import { existsSync as
|
|
97355
|
+
import { existsSync as existsSync39, readFileSync as readFileSync19, readdirSync as readdirSync5, statSync as statSync5 } from "node:fs";
|
|
97365
97356
|
var TODO_HEADING_PATTERN2 = /^##\s+TODOs\b/i;
|
|
97366
97357
|
var FINAL_VERIFICATION_HEADING_PATTERN2 = /^##\s+Final Verification Wave\b/i;
|
|
97367
97358
|
var SECOND_LEVEL_HEADING_PATTERN2 = /^##\s+/;
|
|
@@ -97370,7 +97361,7 @@ var CHECKED_CHECKBOX_PATTERN = /^(\s*)[-*]\s*\[[xX]\]\s*(.+)$/;
|
|
|
97370
97361
|
var TODO_TASK_PATTERN2 = /^\d+\.\s+/;
|
|
97371
97362
|
var FINAL_WAVE_TASK_PATTERN2 = /^F\d+\.\s+/i;
|
|
97372
97363
|
function getPlanProgress(planPath) {
|
|
97373
|
-
if (!
|
|
97364
|
+
if (!existsSync39(planPath)) {
|
|
97374
97365
|
return { total: 0, completed: 0, isComplete: false };
|
|
97375
97366
|
}
|
|
97376
97367
|
try {
|
|
@@ -97490,10 +97481,10 @@ function selectMirrorWork(state) {
|
|
|
97490
97481
|
return sorted[0] ?? null;
|
|
97491
97482
|
}
|
|
97492
97483
|
// packages/boulder-state/src/storage/read-state.ts
|
|
97493
|
-
import { existsSync as
|
|
97484
|
+
import { existsSync as existsSync40, readFileSync as readFileSync20 } from "node:fs";
|
|
97494
97485
|
function readBoulderState(directory) {
|
|
97495
97486
|
const filePath = getBoulderFilePath(directory);
|
|
97496
|
-
if (!
|
|
97487
|
+
if (!existsSync40(filePath)) {
|
|
97497
97488
|
return null;
|
|
97498
97489
|
}
|
|
97499
97490
|
try {
|
|
@@ -97558,21 +97549,19 @@ function getBoulderWorks(state) {
|
|
|
97558
97549
|
}
|
|
97559
97550
|
return [buildWorkFromMirror(state)];
|
|
97560
97551
|
}
|
|
97561
|
-
// packages/omo-opencode/src/features/boulder-state/format-duration.ts
|
|
97562
|
-
init_src();
|
|
97563
97552
|
// packages/omo-opencode/src/features/claude-code-session-state/index.ts
|
|
97564
97553
|
init_state();
|
|
97565
97554
|
// packages/omo-opencode/src/features/run-continuation-state/constants.ts
|
|
97566
97555
|
var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
|
|
97567
97556
|
// packages/omo-opencode/src/features/run-continuation-state/storage.ts
|
|
97568
|
-
import { existsSync as
|
|
97569
|
-
import { join as
|
|
97557
|
+
import { existsSync as existsSync41, mkdirSync as mkdirSync11, readFileSync as readFileSync21, rmSync as rmSync2, writeFileSync as writeFileSync6 } from "node:fs";
|
|
97558
|
+
import { join as join61 } from "node:path";
|
|
97570
97559
|
function getMarkerPath(directory, sessionID) {
|
|
97571
|
-
return
|
|
97560
|
+
return join61(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
|
|
97572
97561
|
}
|
|
97573
97562
|
function readContinuationMarker(directory, sessionID) {
|
|
97574
97563
|
const markerPath = getMarkerPath(directory, sessionID);
|
|
97575
|
-
if (!
|
|
97564
|
+
if (!existsSync41(markerPath))
|
|
97576
97565
|
return null;
|
|
97577
97566
|
try {
|
|
97578
97567
|
const raw = readFileSync21(markerPath, "utf-8");
|
|
@@ -97641,7 +97630,7 @@ async function isSessionInBoulderLineage(input) {
|
|
|
97641
97630
|
init_shared();
|
|
97642
97631
|
init_compaction_marker();
|
|
97643
97632
|
import { readFileSync as readFileSync22, readdirSync as readdirSync6 } from "node:fs";
|
|
97644
|
-
import { join as
|
|
97633
|
+
import { join as join62 } from "node:path";
|
|
97645
97634
|
var defaultSessionLastAgentDeps = {
|
|
97646
97635
|
getMessageDir,
|
|
97647
97636
|
isSqliteBackend,
|
|
@@ -97701,7 +97690,7 @@ async function getLastAgentFromSession(sessionID, client3, deps = {}) {
|
|
|
97701
97690
|
try {
|
|
97702
97691
|
const messages = readdirSync6(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {
|
|
97703
97692
|
try {
|
|
97704
|
-
const content = readFileSync22(
|
|
97693
|
+
const content = readFileSync22(join62(messageDir, fileName), "utf-8");
|
|
97705
97694
|
const parsed = JSON.parse(content);
|
|
97706
97695
|
return {
|
|
97707
97696
|
fileName,
|
|
@@ -97744,8 +97733,8 @@ init_agent_display_names();
|
|
|
97744
97733
|
|
|
97745
97734
|
// packages/omo-opencode/src/hooks/ralph-loop/storage.ts
|
|
97746
97735
|
init_frontmatter2();
|
|
97747
|
-
import { existsSync as
|
|
97748
|
-
import { dirname as
|
|
97736
|
+
import { existsSync as existsSync42, readFileSync as readFileSync23, writeFileSync as writeFileSync7, unlinkSync as unlinkSync5, mkdirSync as mkdirSync12 } from "node:fs";
|
|
97737
|
+
import { dirname as dirname23, join as join63 } from "node:path";
|
|
97749
97738
|
|
|
97750
97739
|
// packages/omo-opencode/src/hooks/ralph-loop/constants.ts
|
|
97751
97740
|
var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
|
|
@@ -97754,11 +97743,11 @@ var DEFAULT_COMPLETION_PROMISE = "DONE";
|
|
|
97754
97743
|
|
|
97755
97744
|
// packages/omo-opencode/src/hooks/ralph-loop/storage.ts
|
|
97756
97745
|
function getStateFilePath(directory, customPath) {
|
|
97757
|
-
return customPath ?
|
|
97746
|
+
return customPath ? join63(directory, customPath) : join63(directory, DEFAULT_STATE_FILE);
|
|
97758
97747
|
}
|
|
97759
97748
|
function readState(directory, customPath) {
|
|
97760
97749
|
const filePath = getStateFilePath(directory, customPath);
|
|
97761
|
-
if (!
|
|
97750
|
+
if (!existsSync42(filePath)) {
|
|
97762
97751
|
return null;
|
|
97763
97752
|
}
|
|
97764
97753
|
try {
|
|
@@ -97987,13 +97976,15 @@ async function pollForCompletion(ctx, eventState, abortController, options = {})
|
|
|
97987
97976
|
const eventWatchdogMs = options.eventWatchdogMs ?? DEFAULT_EVENT_WATCHDOG_MS;
|
|
97988
97977
|
const secondaryMeaningfulWorkTimeoutMs = options.secondaryMeaningfulWorkTimeoutMs ?? DEFAULT_SECONDARY_MEANINGFUL_WORK_TIMEOUT_MS;
|
|
97989
97978
|
const requireMeaningfulWork = options.requireMeaningfulWork ?? false;
|
|
97979
|
+
const now = options.now ?? Date.now;
|
|
97980
|
+
const sleep = options.sleep ?? ((ms) => new Promise((resolve20) => setTimeout(resolve20, ms)));
|
|
97990
97981
|
let consecutiveCompleteChecks = 0;
|
|
97991
97982
|
let errorCycleCount = 0;
|
|
97992
97983
|
let firstWorkTimestamp = null;
|
|
97993
97984
|
let secondaryTimeoutChecked = false;
|
|
97994
|
-
const pollStartTimestamp =
|
|
97985
|
+
const pollStartTimestamp = now();
|
|
97995
97986
|
while (!abortController.signal.aborted) {
|
|
97996
|
-
await
|
|
97987
|
+
await sleep(pollIntervalMs);
|
|
97997
97988
|
if (abortController.signal.aborted) {
|
|
97998
97989
|
return 130;
|
|
97999
97990
|
}
|
|
@@ -98019,7 +98010,7 @@ Session ended with error: ${eventState.lastError}`));
|
|
|
98019
98010
|
}
|
|
98020
98011
|
let mainSessionStatus = null;
|
|
98021
98012
|
if (eventState.lastEventTimestamp !== null) {
|
|
98022
|
-
const timeSinceLastEvent =
|
|
98013
|
+
const timeSinceLastEvent = now() - eventState.lastEventTimestamp;
|
|
98023
98014
|
if (timeSinceLastEvent > eventWatchdogMs) {
|
|
98024
98015
|
console.log(import_picocolors15.default.yellow(`
|
|
98025
98016
|
No events for ${Math.round(timeSinceLastEvent / 1000)}s, verifying session status...`));
|
|
@@ -98029,7 +98020,7 @@ Session ended with error: ${eventState.lastError}`));
|
|
|
98029
98020
|
} else if (mainSessionStatus === "busy" || mainSessionStatus === "retry") {
|
|
98030
98021
|
eventState.mainSessionIdle = false;
|
|
98031
98022
|
}
|
|
98032
|
-
eventState.lastEventTimestamp =
|
|
98023
|
+
eventState.lastEventTimestamp = now();
|
|
98033
98024
|
}
|
|
98034
98025
|
}
|
|
98035
98026
|
if (mainSessionStatus === null) {
|
|
@@ -98049,12 +98040,12 @@ Session ended with error: ${eventState.lastError}`));
|
|
|
98049
98040
|
continue;
|
|
98050
98041
|
}
|
|
98051
98042
|
if (!eventState.hasReceivedMeaningfulWork) {
|
|
98052
|
-
if (
|
|
98043
|
+
if (now() - pollStartTimestamp < minStabilizationMs) {
|
|
98053
98044
|
consecutiveCompleteChecks = 0;
|
|
98054
98045
|
continue;
|
|
98055
98046
|
}
|
|
98056
98047
|
if (requireMeaningfulWork) {
|
|
98057
|
-
if (
|
|
98048
|
+
if (now() - pollStartTimestamp <= secondaryMeaningfulWorkTimeoutMs) {
|
|
98058
98049
|
consecutiveCompleteChecks = 0;
|
|
98059
98050
|
continue;
|
|
98060
98051
|
}
|
|
@@ -98068,7 +98059,7 @@ Session ended with error: ${eventState.lastError}`));
|
|
|
98068
98059
|
Session never produced assistant output, tool activity, or reasoning after the prompt started.`));
|
|
98069
98060
|
return 1;
|
|
98070
98061
|
}
|
|
98071
|
-
if (
|
|
98062
|
+
if (now() - pollStartTimestamp > secondaryMeaningfulWorkTimeoutMs && !secondaryTimeoutChecked) {
|
|
98072
98063
|
secondaryTimeoutChecked = true;
|
|
98073
98064
|
const hasActiveWork = await hasActiveSessionWork(ctx);
|
|
98074
98065
|
if (hasActiveWork) {
|
|
@@ -98079,9 +98070,9 @@ Session never produced assistant output, tool activity, or reasoning after the p
|
|
|
98079
98070
|
}
|
|
98080
98071
|
} else {
|
|
98081
98072
|
if (firstWorkTimestamp === null) {
|
|
98082
|
-
firstWorkTimestamp =
|
|
98073
|
+
firstWorkTimestamp = now();
|
|
98083
98074
|
}
|
|
98084
|
-
if (
|
|
98075
|
+
if (now() - firstWorkTimestamp < minStabilizationMs) {
|
|
98085
98076
|
consecutiveCompleteChecks = 0;
|
|
98086
98077
|
continue;
|
|
98087
98078
|
}
|
|
@@ -98151,7 +98142,7 @@ function createAbortError() {
|
|
|
98151
98142
|
return error51;
|
|
98152
98143
|
}
|
|
98153
98144
|
function sleep(delayMs) {
|
|
98154
|
-
return new Promise((
|
|
98145
|
+
return new Promise((resolve20) => setTimeout(resolve20, delayMs));
|
|
98155
98146
|
}
|
|
98156
98147
|
function hasPromptStartEvidence(eventState) {
|
|
98157
98148
|
return eventState.mainSessionStarted || eventState.hasReceivedMeaningfulWork || eventState.messageCount > 0 || eventState.currentTool !== null;
|
|
@@ -98526,7 +98517,7 @@ var EVENT_PROCESSOR_SHUTDOWN_TIMEOUT_MS = 2000;
|
|
|
98526
98517
|
async function waitForEventProcessorShutdown(eventProcessor, timeoutMs = EVENT_PROCESSOR_SHUTDOWN_TIMEOUT_MS) {
|
|
98527
98518
|
const completed = await Promise.race([
|
|
98528
98519
|
eventProcessor.then(() => true),
|
|
98529
|
-
new Promise((
|
|
98520
|
+
new Promise((resolve20) => setTimeout(() => resolve20(false), timeoutMs))
|
|
98530
98521
|
]);
|
|
98531
98522
|
}
|
|
98532
98523
|
async function run(options) {
|
|
@@ -98829,14 +98820,14 @@ async function getLocalVersion(options = {}) {
|
|
|
98829
98820
|
}
|
|
98830
98821
|
}
|
|
98831
98822
|
// packages/omo-opencode/src/cli/doctor/checks/system.ts
|
|
98832
|
-
import { existsSync as
|
|
98823
|
+
import { existsSync as existsSync53, readFileSync as readFileSync33 } from "node:fs";
|
|
98833
98824
|
|
|
98834
98825
|
// packages/omo-opencode/src/cli/doctor/checks/system-binary.ts
|
|
98835
98826
|
init_extract_semver();
|
|
98836
98827
|
init_bun_which_shim();
|
|
98837
|
-
import { existsSync as
|
|
98838
|
-
import { homedir as
|
|
98839
|
-
import { join as
|
|
98828
|
+
import { existsSync as existsSync50, accessSync as accessSync4, constants as constants10 } from "node:fs";
|
|
98829
|
+
import { homedir as homedir14 } from "node:os";
|
|
98830
|
+
import { join as join70 } from "node:path";
|
|
98840
98831
|
|
|
98841
98832
|
// packages/omo-opencode/src/cli/doctor/framework/spawn-with-timeout.ts
|
|
98842
98833
|
init_spawn_with_windows_hide();
|
|
@@ -98875,8 +98866,8 @@ async function spawnWithTimeout(command, options, timeoutMs = DEFAULT_SPAWN_TIME
|
|
|
98875
98866
|
const stdoutPromise = readSpawnStream(proc.stdout);
|
|
98876
98867
|
const stderrPromise = readSpawnStream(proc.stderr);
|
|
98877
98868
|
let timer;
|
|
98878
|
-
const timeoutPromise = new Promise((
|
|
98879
|
-
timer = setTimeout(() =>
|
|
98869
|
+
const timeoutPromise = new Promise((resolve20) => {
|
|
98870
|
+
timer = setTimeout(() => resolve20("timeout"), timeoutMs);
|
|
98880
98871
|
});
|
|
98881
98872
|
const processPromise = (async () => {
|
|
98882
98873
|
await proc.exited;
|
|
@@ -98913,7 +98904,7 @@ async function spawnWithTimeout(command, options, timeoutMs = DEFAULT_SPAWN_TIME
|
|
|
98913
98904
|
var WINDOWS_EXECUTABLE_EXTS = [".exe", ".cmd", ".bat", ".ps1"];
|
|
98914
98905
|
function isExecutable2(path14) {
|
|
98915
98906
|
try {
|
|
98916
|
-
accessSync4(path14,
|
|
98907
|
+
accessSync4(path14, constants10.X_OK);
|
|
98917
98908
|
return true;
|
|
98918
98909
|
} catch (error51) {
|
|
98919
98910
|
if (error51 instanceof Error) {
|
|
@@ -98923,22 +98914,22 @@ function isExecutable2(path14) {
|
|
|
98923
98914
|
}
|
|
98924
98915
|
}
|
|
98925
98916
|
function getDesktopAppPaths(platform) {
|
|
98926
|
-
const home =
|
|
98917
|
+
const home = homedir14();
|
|
98927
98918
|
switch (platform) {
|
|
98928
98919
|
case "darwin":
|
|
98929
98920
|
return [
|
|
98930
98921
|
"/Applications/OpenCode.app/Contents/MacOS/OpenCode",
|
|
98931
|
-
|
|
98922
|
+
join70(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
|
|
98932
98923
|
];
|
|
98933
98924
|
case "win32": {
|
|
98934
98925
|
const programFiles = process.env.ProgramFiles;
|
|
98935
98926
|
const localAppData = process.env.LOCALAPPDATA;
|
|
98936
98927
|
const paths = [];
|
|
98937
98928
|
if (programFiles) {
|
|
98938
|
-
paths.push(
|
|
98929
|
+
paths.push(join70(programFiles, "OpenCode", "OpenCode.exe"));
|
|
98939
98930
|
}
|
|
98940
98931
|
if (localAppData) {
|
|
98941
|
-
paths.push(
|
|
98932
|
+
paths.push(join70(localAppData, "OpenCode", "OpenCode.exe"));
|
|
98942
98933
|
}
|
|
98943
98934
|
return paths;
|
|
98944
98935
|
}
|
|
@@ -98946,8 +98937,8 @@ function getDesktopAppPaths(platform) {
|
|
|
98946
98937
|
return [
|
|
98947
98938
|
"/usr/bin/opencode",
|
|
98948
98939
|
"/usr/lib/opencode/opencode",
|
|
98949
|
-
|
|
98950
|
-
|
|
98940
|
+
join70(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
|
|
98941
|
+
join70(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
|
|
98951
98942
|
];
|
|
98952
98943
|
default:
|
|
98953
98944
|
return [];
|
|
@@ -98959,7 +98950,7 @@ function buildVersionCommand(binaryPath, platform) {
|
|
|
98959
98950
|
}
|
|
98960
98951
|
return [binaryPath, "--version"];
|
|
98961
98952
|
}
|
|
98962
|
-
function findDesktopBinary(platform = process.platform, checkExists =
|
|
98953
|
+
function findDesktopBinary(platform = process.platform, checkExists = existsSync50) {
|
|
98963
98954
|
for (const desktopPath of getDesktopAppPaths(platform)) {
|
|
98964
98955
|
if (checkExists(desktopPath)) {
|
|
98965
98956
|
return { binary: "opencode", path: desktopPath };
|
|
@@ -98967,7 +98958,7 @@ function findDesktopBinary(platform = process.platform, checkExists = existsSync
|
|
|
98967
98958
|
}
|
|
98968
98959
|
return null;
|
|
98969
98960
|
}
|
|
98970
|
-
async function findOpenCodeBinary(platform = process.platform, checkExists =
|
|
98961
|
+
async function findOpenCodeBinary(platform = process.platform, checkExists = existsSync50) {
|
|
98971
98962
|
for (const binary of OPENCODE_BINARIES2) {
|
|
98972
98963
|
const path14 = bunWhich(binary);
|
|
98973
98964
|
if (path14 && checkExists(path14)) {
|
|
@@ -98979,7 +98970,7 @@ async function findOpenCodeBinary(platform = process.platform, checkExists = exi
|
|
|
98979
98970
|
const candidates = getCommandCandidates2(platform);
|
|
98980
98971
|
for (const entry of pathEnv.split(delimiter3).filter(Boolean)) {
|
|
98981
98972
|
for (const command of candidates) {
|
|
98982
|
-
const fullPath =
|
|
98973
|
+
const fullPath = join70(entry, command);
|
|
98983
98974
|
if (checkExists(fullPath) && isExecutable2(fullPath)) {
|
|
98984
98975
|
return { binary: command, path: fullPath };
|
|
98985
98976
|
}
|
|
@@ -99025,12 +99016,12 @@ function compareVersions3(current, minimum) {
|
|
|
99025
99016
|
|
|
99026
99017
|
// packages/omo-opencode/src/cli/doctor/checks/system-plugin.ts
|
|
99027
99018
|
init_shared();
|
|
99028
|
-
import { existsSync as
|
|
99019
|
+
import { existsSync as existsSync51, readFileSync as readFileSync31 } from "node:fs";
|
|
99029
99020
|
function detectConfigPath() {
|
|
99030
99021
|
const paths = getOpenCodeConfigPaths({ binary: "opencode", version: null });
|
|
99031
|
-
if (
|
|
99022
|
+
if (existsSync51(paths.configJsonc))
|
|
99032
99023
|
return paths.configJsonc;
|
|
99033
|
-
if (
|
|
99024
|
+
if (existsSync51(paths.configJson))
|
|
99034
99025
|
return paths.configJson;
|
|
99035
99026
|
return null;
|
|
99036
99027
|
}
|
|
@@ -99118,36 +99109,36 @@ init_file_utils2();
|
|
|
99118
99109
|
init_checker();
|
|
99119
99110
|
init_auto_update_checker();
|
|
99120
99111
|
init_package_json_locator();
|
|
99121
|
-
import { existsSync as
|
|
99112
|
+
import { existsSync as existsSync52, readFileSync as readFileSync32, readdirSync as readdirSync8 } from "node:fs";
|
|
99122
99113
|
import { createRequire as createRequire3 } from "node:module";
|
|
99123
|
-
import { homedir as
|
|
99124
|
-
import { join as
|
|
99125
|
-
import { fileURLToPath as
|
|
99114
|
+
import { homedir as homedir15 } from "node:os";
|
|
99115
|
+
import { join as join71 } from "node:path";
|
|
99116
|
+
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
99126
99117
|
init_shared();
|
|
99127
99118
|
function getPlatformDefaultCacheDir(platform = process.platform) {
|
|
99128
99119
|
if (platform === "darwin")
|
|
99129
|
-
return
|
|
99120
|
+
return join71(homedir15(), "Library", "Caches");
|
|
99130
99121
|
if (platform === "win32")
|
|
99131
|
-
return process.env.LOCALAPPDATA ??
|
|
99132
|
-
return
|
|
99122
|
+
return process.env.LOCALAPPDATA ?? join71(homedir15(), "AppData", "Local");
|
|
99123
|
+
return join71(homedir15(), ".cache");
|
|
99133
99124
|
}
|
|
99134
99125
|
function resolveOpenCodeCacheDir() {
|
|
99135
99126
|
const xdgCacheHome = process.env.XDG_CACHE_HOME;
|
|
99136
99127
|
if (xdgCacheHome)
|
|
99137
|
-
return
|
|
99128
|
+
return join71(xdgCacheHome, "opencode");
|
|
99138
99129
|
const fromShared = getOpenCodeCacheDir();
|
|
99139
|
-
const platformDefault =
|
|
99140
|
-
if (
|
|
99130
|
+
const platformDefault = join71(getPlatformDefaultCacheDir(), "opencode");
|
|
99131
|
+
if (existsSync52(fromShared) || !existsSync52(platformDefault))
|
|
99141
99132
|
return fromShared;
|
|
99142
99133
|
return platformDefault;
|
|
99143
99134
|
}
|
|
99144
99135
|
function resolveExistingDir(dirPath) {
|
|
99145
|
-
if (!
|
|
99136
|
+
if (!existsSync52(dirPath))
|
|
99146
99137
|
return dirPath;
|
|
99147
99138
|
return resolveSymlink(dirPath);
|
|
99148
99139
|
}
|
|
99149
99140
|
function readPackageJson(filePath) {
|
|
99150
|
-
if (!
|
|
99141
|
+
if (!existsSync52(filePath))
|
|
99151
99142
|
return null;
|
|
99152
99143
|
try {
|
|
99153
99144
|
const content = readFileSync32(filePath, "utf-8");
|
|
@@ -99168,26 +99159,26 @@ function normalizeVersion(value) {
|
|
|
99168
99159
|
function createPackageCandidates(rootDir) {
|
|
99169
99160
|
return ACCEPTED_PACKAGE_NAMES.map((packageName) => ({
|
|
99170
99161
|
packageName,
|
|
99171
|
-
installedPackagePath:
|
|
99162
|
+
installedPackagePath: join71(rootDir, "node_modules", packageName, "package.json")
|
|
99172
99163
|
}));
|
|
99173
99164
|
}
|
|
99174
99165
|
function createTaggedInstallCandidates(rootDir) {
|
|
99175
|
-
const packagesDir =
|
|
99176
|
-
if (!
|
|
99166
|
+
const packagesDir = join71(rootDir, "packages");
|
|
99167
|
+
if (!existsSync52(packagesDir))
|
|
99177
99168
|
return [];
|
|
99178
99169
|
const candidates = [];
|
|
99179
99170
|
for (const entryName of readdirSync8(packagesDir).sort()) {
|
|
99180
99171
|
const packageName = ACCEPTED_PACKAGE_NAMES.find((name) => entryName.startsWith(`${name}@`));
|
|
99181
99172
|
if (packageName === undefined)
|
|
99182
99173
|
continue;
|
|
99183
|
-
const installDir =
|
|
99174
|
+
const installDir = join71(packagesDir, entryName);
|
|
99184
99175
|
candidates.push({
|
|
99185
99176
|
cacheDir: installDir,
|
|
99186
|
-
cachePackagePath:
|
|
99177
|
+
cachePackagePath: join71(installDir, "package.json"),
|
|
99187
99178
|
packageCandidates: [
|
|
99188
99179
|
{
|
|
99189
99180
|
packageName,
|
|
99190
|
-
installedPackagePath:
|
|
99181
|
+
installedPackagePath: join71(installDir, "node_modules", packageName, "package.json")
|
|
99191
99182
|
}
|
|
99192
99183
|
]
|
|
99193
99184
|
});
|
|
@@ -99195,7 +99186,7 @@ function createTaggedInstallCandidates(rootDir) {
|
|
|
99195
99186
|
return candidates;
|
|
99196
99187
|
}
|
|
99197
99188
|
function selectInstalledPackage(candidate) {
|
|
99198
|
-
return candidate.packageCandidates.find((packageCandidate) =>
|
|
99189
|
+
return candidate.packageCandidates.find((packageCandidate) => existsSync52(packageCandidate.installedPackagePath)) ?? candidate.packageCandidates[0];
|
|
99199
99190
|
}
|
|
99200
99191
|
function getExpectedVersion(cachePackage, packageName) {
|
|
99201
99192
|
return normalizeVersion(cachePackage?.dependencies?.[packageName]) ?? normalizeVersion(cachePackage?.dependencies?.[PACKAGE_NAME]);
|
|
@@ -99206,14 +99197,14 @@ function resolveInstalledPackageJsonPath() {
|
|
|
99206
99197
|
for (const packageName of ACCEPTED_PACKAGE_NAMES) {
|
|
99207
99198
|
try {
|
|
99208
99199
|
const packageJsonPath = require2.resolve(`${packageName}/package.json`);
|
|
99209
|
-
if (
|
|
99200
|
+
if (existsSync52(packageJsonPath)) {
|
|
99210
99201
|
return { packageName, packageJsonPath };
|
|
99211
99202
|
}
|
|
99212
99203
|
} catch {
|
|
99213
99204
|
continue;
|
|
99214
99205
|
}
|
|
99215
99206
|
}
|
|
99216
|
-
const ownPackageJsonPath = findPackageJsonUp(
|
|
99207
|
+
const ownPackageJsonPath = findPackageJsonUp(fileURLToPath6(import.meta.url));
|
|
99217
99208
|
if (ownPackageJsonPath) {
|
|
99218
99209
|
return { packageName: PACKAGE_NAME, packageJsonPath: ownPackageJsonPath };
|
|
99219
99210
|
}
|
|
@@ -99232,22 +99223,22 @@ function getLoadedPluginVersion() {
|
|
|
99232
99223
|
const candidates = [
|
|
99233
99224
|
{
|
|
99234
99225
|
cacheDir: configDir,
|
|
99235
|
-
cachePackagePath:
|
|
99226
|
+
cachePackagePath: join71(configDir, "package.json"),
|
|
99236
99227
|
packageCandidates: createPackageCandidates(configDir)
|
|
99237
99228
|
},
|
|
99238
99229
|
...createTaggedInstallCandidates(configDir),
|
|
99239
99230
|
{
|
|
99240
99231
|
cacheDir,
|
|
99241
|
-
cachePackagePath:
|
|
99232
|
+
cachePackagePath: join71(cacheDir, "package.json"),
|
|
99242
99233
|
packageCandidates: createPackageCandidates(cacheDir)
|
|
99243
99234
|
},
|
|
99244
99235
|
...createTaggedInstallCandidates(cacheDir)
|
|
99245
99236
|
];
|
|
99246
|
-
const selectedCandidate = candidates.find((candidate) => candidate.packageCandidates.some((packageCandidate) =>
|
|
99237
|
+
const selectedCandidate = candidates.find((candidate) => candidate.packageCandidates.some((packageCandidate) => existsSync52(packageCandidate.installedPackagePath))) ?? candidates[0];
|
|
99247
99238
|
const { cacheDir: selectedDir, cachePackagePath } = selectedCandidate;
|
|
99248
99239
|
const selectedPackage = selectInstalledPackage(selectedCandidate);
|
|
99249
99240
|
const candidateInstalledPath = selectedPackage.installedPackagePath;
|
|
99250
|
-
const candidateExists =
|
|
99241
|
+
const candidateExists = existsSync52(candidateInstalledPath);
|
|
99251
99242
|
const resolvedFallback = candidateExists ? null : resolveInstalledPackageJsonPath();
|
|
99252
99243
|
const installedPackagePath = resolvedFallback?.packageJsonPath ?? candidateInstalledPath;
|
|
99253
99244
|
const resolvedPackageName = resolvedFallback?.packageName ?? selectedPackage.packageName;
|
|
@@ -99283,7 +99274,7 @@ var defaultDeps6 = {
|
|
|
99283
99274
|
getLoadedPluginVersion,
|
|
99284
99275
|
getLatestPluginVersion,
|
|
99285
99276
|
getSuggestedInstallTag,
|
|
99286
|
-
configExists:
|
|
99277
|
+
configExists: existsSync53,
|
|
99287
99278
|
readConfigFile: (path14) => readFileSync33(path14, "utf-8"),
|
|
99288
99279
|
parseConfigContent: (content) => parseJsonc(content)
|
|
99289
99280
|
};
|
|
@@ -99430,12 +99421,12 @@ async function checkSystem(deps = defaultDeps6) {
|
|
|
99430
99421
|
// packages/omo-opencode/src/config/validate.ts
|
|
99431
99422
|
init_src();
|
|
99432
99423
|
import { readFileSync as readFileSync34 } from "node:fs";
|
|
99433
|
-
import { homedir as
|
|
99434
|
-
import { dirname as
|
|
99424
|
+
import { homedir as homedir16 } from "node:os";
|
|
99425
|
+
import { dirname as dirname28, relative as relative9 } from "node:path";
|
|
99435
99426
|
init_shared();
|
|
99436
99427
|
init_plugin_identity();
|
|
99437
99428
|
function resolveHomeDirectory2() {
|
|
99438
|
-
return process.env.HOME ?? process.env.USERPROFILE ??
|
|
99429
|
+
return process.env.HOME ?? process.env.USERPROFILE ?? homedir16();
|
|
99439
99430
|
}
|
|
99440
99431
|
function discoverConfigInDirectory(configDir) {
|
|
99441
99432
|
const detected = detectPluginConfigFile(configDir, {
|
|
@@ -99455,7 +99446,7 @@ function discoverProjectLayersNearestFirst(directory) {
|
|
|
99455
99446
|
const stopDirectory = containsPath(homeDirectory, directory) ? homeDirectory : directory;
|
|
99456
99447
|
return findProjectOpencodePluginConfigFiles(directory, stopDirectory).map((configPath) => ({
|
|
99457
99448
|
path: configPath,
|
|
99458
|
-
configDir:
|
|
99449
|
+
configDir: dirname28(configPath)
|
|
99459
99450
|
}));
|
|
99460
99451
|
}
|
|
99461
99452
|
function shortPath(configPath) {
|
|
@@ -99479,7 +99470,7 @@ function parseLayerConfig(configPath) {
|
|
|
99479
99470
|
if (!isPlainRecord(rawConfig)) {
|
|
99480
99471
|
return {
|
|
99481
99472
|
path: configPath,
|
|
99482
|
-
configDir:
|
|
99473
|
+
configDir: dirname28(configPath),
|
|
99483
99474
|
config: null,
|
|
99484
99475
|
messages: [`${shortPath(configPath)}: <root>: Expected object`]
|
|
99485
99476
|
};
|
|
@@ -99487,7 +99478,7 @@ function parseLayerConfig(configPath) {
|
|
|
99487
99478
|
const result = OhMyOpenCodeConfigSchema.safeParse(rawConfig);
|
|
99488
99479
|
return {
|
|
99489
99480
|
path: configPath,
|
|
99490
|
-
configDir:
|
|
99481
|
+
configDir: dirname28(configPath),
|
|
99491
99482
|
config: result.success ? result.data : parseConfigPartially(rawConfig),
|
|
99492
99483
|
messages: schemaMessages(configPath, rawConfig)
|
|
99493
99484
|
};
|
|
@@ -99497,7 +99488,7 @@ function parseLayerConfig(configPath) {
|
|
|
99497
99488
|
}
|
|
99498
99489
|
return {
|
|
99499
99490
|
path: configPath,
|
|
99500
|
-
configDir:
|
|
99491
|
+
configDir: dirname28(configPath),
|
|
99501
99492
|
config: null,
|
|
99502
99493
|
messages: [`${shortPath(configPath)}: ${error51.message}`]
|
|
99503
99494
|
};
|
|
@@ -99543,23 +99534,23 @@ function validatePluginConfig(directory) {
|
|
|
99543
99534
|
|
|
99544
99535
|
// packages/omo-opencode/src/cli/doctor/checks/model-resolution-cache.ts
|
|
99545
99536
|
init_shared();
|
|
99546
|
-
import { existsSync as
|
|
99547
|
-
import { homedir as
|
|
99548
|
-
import { join as
|
|
99537
|
+
import { existsSync as existsSync54, readFileSync as readFileSync35 } from "node:fs";
|
|
99538
|
+
import { homedir as homedir17 } from "node:os";
|
|
99539
|
+
import { join as join72 } from "node:path";
|
|
99549
99540
|
function getUserConfigDir2() {
|
|
99550
99541
|
const xdgConfig = process.env.XDG_CONFIG_HOME;
|
|
99551
99542
|
if (xdgConfig)
|
|
99552
|
-
return
|
|
99553
|
-
return
|
|
99543
|
+
return join72(xdgConfig, "opencode");
|
|
99544
|
+
return join72(homedir17(), ".config", "opencode");
|
|
99554
99545
|
}
|
|
99555
99546
|
function loadCustomProviderNames() {
|
|
99556
99547
|
const configDir = getUserConfigDir2();
|
|
99557
99548
|
const candidatePaths = [
|
|
99558
|
-
|
|
99559
|
-
|
|
99549
|
+
join72(configDir, "opencode.json"),
|
|
99550
|
+
join72(configDir, "opencode.jsonc")
|
|
99560
99551
|
];
|
|
99561
99552
|
for (const configPath of candidatePaths) {
|
|
99562
|
-
if (!
|
|
99553
|
+
if (!existsSync54(configPath))
|
|
99563
99554
|
continue;
|
|
99564
99555
|
try {
|
|
99565
99556
|
const content = readFileSync35(configPath, "utf-8");
|
|
@@ -99577,9 +99568,9 @@ function loadCustomProviderNames() {
|
|
|
99577
99568
|
return [];
|
|
99578
99569
|
}
|
|
99579
99570
|
function loadAvailableModelsFromCache() {
|
|
99580
|
-
const cacheFile =
|
|
99571
|
+
const cacheFile = join72(getOpenCodeCacheDir(), "models.json");
|
|
99581
99572
|
const customProviders = loadCustomProviderNames();
|
|
99582
|
-
if (!
|
|
99573
|
+
if (!existsSync54(cacheFile)) {
|
|
99583
99574
|
if (customProviders.length > 0) {
|
|
99584
99575
|
return { providers: customProviders, modelCount: 0, cacheExists: true };
|
|
99585
99576
|
}
|
|
@@ -99614,8 +99605,8 @@ init_model_capabilities2();
|
|
|
99614
99605
|
init_shared();
|
|
99615
99606
|
init_plugin_identity();
|
|
99616
99607
|
import { readFileSync as readFileSync36 } from "node:fs";
|
|
99617
|
-
import { join as
|
|
99618
|
-
var PROJECT_CONFIG_DIR =
|
|
99608
|
+
import { join as join73 } from "node:path";
|
|
99609
|
+
var PROJECT_CONFIG_DIR = join73(process.cwd(), ".opencode");
|
|
99619
99610
|
function loadOmoConfig() {
|
|
99620
99611
|
const projectDetected = detectPluginConfigFile(PROJECT_CONFIG_DIR, {
|
|
99621
99612
|
basenames: [CONFIG_BASENAME],
|
|
@@ -99653,7 +99644,7 @@ function loadOmoConfig() {
|
|
|
99653
99644
|
|
|
99654
99645
|
// packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
|
|
99655
99646
|
init_shared();
|
|
99656
|
-
import { join as
|
|
99647
|
+
import { join as join74 } from "node:path";
|
|
99657
99648
|
|
|
99658
99649
|
// packages/omo-opencode/src/cli/doctor/checks/model-resolution-variant.ts
|
|
99659
99650
|
function formatModelWithVariant(model, variant) {
|
|
@@ -99695,7 +99686,7 @@ function formatCapabilityResolutionLabel(mode) {
|
|
|
99695
99686
|
}
|
|
99696
99687
|
function buildModelResolutionDetails(options) {
|
|
99697
99688
|
const details = [];
|
|
99698
|
-
const cacheFile =
|
|
99689
|
+
const cacheFile = join74(getOpenCodeCacheDir(), "models.json");
|
|
99699
99690
|
details.push("═══ Available Models (from cache) ═══");
|
|
99700
99691
|
details.push("");
|
|
99701
99692
|
if (options.available.cacheExists) {
|
|
@@ -99971,28 +99962,28 @@ async function checkConfig() {
|
|
|
99971
99962
|
|
|
99972
99963
|
// packages/omo-opencode/src/cli/doctor/checks/dependencies.ts
|
|
99973
99964
|
init_src();
|
|
99974
|
-
import { existsSync as
|
|
99965
|
+
import { existsSync as existsSync55 } from "node:fs";
|
|
99975
99966
|
import { createRequire as createRequire4 } from "node:module";
|
|
99976
|
-
import { homedir as
|
|
99977
|
-
import { dirname as
|
|
99967
|
+
import { homedir as homedir19 } from "node:os";
|
|
99968
|
+
import { dirname as dirname29, join as join76 } from "node:path";
|
|
99978
99969
|
|
|
99979
99970
|
// packages/omo-opencode/src/hooks/comment-checker/downloader.ts
|
|
99980
|
-
import { join as
|
|
99981
|
-
import { homedir as
|
|
99971
|
+
import { join as join75 } from "path";
|
|
99972
|
+
import { homedir as homedir18, tmpdir as tmpdir3 } from "os";
|
|
99982
99973
|
init_binary_downloader();
|
|
99983
99974
|
init_logger2();
|
|
99984
99975
|
init_plugin_identity();
|
|
99985
99976
|
var DEBUG = process.env.COMMENT_CHECKER_DEBUG === "1";
|
|
99986
|
-
var DEBUG_FILE =
|
|
99977
|
+
var DEBUG_FILE = join75(tmpdir3(), "comment-checker-debug.log");
|
|
99987
99978
|
function getCacheDir2() {
|
|
99988
99979
|
if (process.platform === "win32") {
|
|
99989
99980
|
const localAppData = process.env.LOCALAPPDATA || process.env.APPDATA;
|
|
99990
|
-
const base2 = localAppData ||
|
|
99991
|
-
return
|
|
99981
|
+
const base2 = localAppData || join75(homedir18(), "AppData", "Local");
|
|
99982
|
+
return join75(base2, CACHE_DIR_NAME, "bin");
|
|
99992
99983
|
}
|
|
99993
99984
|
const xdgCache = process.env.XDG_CACHE_HOME;
|
|
99994
|
-
const base = xdgCache ||
|
|
99995
|
-
return
|
|
99985
|
+
const base = xdgCache || join75(homedir18(), ".cache");
|
|
99986
|
+
return join75(base, CACHE_DIR_NAME, "bin");
|
|
99996
99987
|
}
|
|
99997
99988
|
function getBinaryName() {
|
|
99998
99989
|
return process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
|
|
@@ -100042,7 +100033,7 @@ async function getBinaryVersion(binary) {
|
|
|
100042
100033
|
}
|
|
100043
100034
|
}
|
|
100044
100035
|
async function checkAstGrepCli() {
|
|
100045
|
-
const runtimeDir = astGrepRuntimeDir(
|
|
100036
|
+
const runtimeDir = astGrepRuntimeDir(join76(homedir19(), ".omo"));
|
|
100046
100037
|
const sgPath = findSgBinarySync({ runtimeDir });
|
|
100047
100038
|
if (sgPath === null) {
|
|
100048
100039
|
return {
|
|
@@ -100071,12 +100062,12 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
|
|
|
100071
100062
|
const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
|
|
100072
100063
|
const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
|
|
100073
100064
|
try {
|
|
100074
|
-
const packageDir = baseDirOverride ??
|
|
100075
|
-
const vendorPath =
|
|
100076
|
-
if (
|
|
100065
|
+
const packageDir = baseDirOverride ?? dirname29(resolvePackageJsonPath());
|
|
100066
|
+
const vendorPath = join76(packageDir, "vendor", platformKey, binaryName);
|
|
100067
|
+
if (existsSync55(vendorPath))
|
|
100077
100068
|
return vendorPath;
|
|
100078
|
-
const binPath =
|
|
100079
|
-
if (
|
|
100069
|
+
const binPath = join76(packageDir, "bin", binaryName);
|
|
100070
|
+
if (existsSync55(binPath))
|
|
100080
100071
|
return binPath;
|
|
100081
100072
|
} catch (error51) {
|
|
100082
100073
|
if (!(error51 instanceof Error) && !isModuleResolutionFailure(error51))
|
|
@@ -100221,12 +100212,12 @@ async function getGhCliInfo(dependencies = {}) {
|
|
|
100221
100212
|
|
|
100222
100213
|
// packages/omo-opencode/src/cli/doctor/checks/tools-lsp.ts
|
|
100223
100214
|
import { readFileSync as readFileSync37 } from "node:fs";
|
|
100224
|
-
import { join as
|
|
100215
|
+
import { join as join77 } from "node:path";
|
|
100225
100216
|
|
|
100226
100217
|
// packages/omo-opencode/src/mcp/lsp.ts
|
|
100227
|
-
import { existsSync as
|
|
100228
|
-
import { delimiter as delimiter3, dirname as
|
|
100229
|
-
import { fileURLToPath as
|
|
100218
|
+
import { existsSync as existsSync56 } from "node:fs";
|
|
100219
|
+
import { delimiter as delimiter3, dirname as dirname30, resolve as resolve21 } from "node:path";
|
|
100220
|
+
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
100230
100221
|
|
|
100231
100222
|
// packages/omo-opencode/src/mcp/cli-suffix.ts
|
|
100232
100223
|
function normalizeCliPath(path14) {
|
|
@@ -100272,7 +100263,7 @@ function resolveRuntimeExecutable(commandName, options = {}) {
|
|
|
100272
100263
|
}
|
|
100273
100264
|
|
|
100274
100265
|
// packages/omo-opencode/src/mcp/shared/ancestor-cli-resolver.ts
|
|
100275
|
-
import { resolve as
|
|
100266
|
+
import { resolve as resolve20 } from "node:path";
|
|
100276
100267
|
function resolveJavaScriptRuntime(resolveExecutable) {
|
|
100277
100268
|
const node = resolveExecutable("node");
|
|
100278
100269
|
return node.available ? node : resolveExecutable("bun");
|
|
@@ -100280,9 +100271,9 @@ function resolveJavaScriptRuntime(resolveExecutable) {
|
|
|
100280
100271
|
function createAncestorCliCandidates(options) {
|
|
100281
100272
|
const candidates = [];
|
|
100282
100273
|
const seenPaths = new Set;
|
|
100283
|
-
let currentDirectory =
|
|
100274
|
+
let currentDirectory = resolve20(options.startDirectory);
|
|
100284
100275
|
while (true) {
|
|
100285
|
-
const distCliPath =
|
|
100276
|
+
const distCliPath = resolve20(currentDirectory, options.packageRel, options.distCliRel);
|
|
100286
100277
|
if (!seenPaths.has(distCliPath)) {
|
|
100287
100278
|
const runtime5 = resolveJavaScriptRuntime(options.resolveExecutable);
|
|
100288
100279
|
seenPaths.add(distCliPath);
|
|
@@ -100294,7 +100285,7 @@ function createAncestorCliCandidates(options) {
|
|
|
100294
100285
|
runtimeAvailable: runtime5.available
|
|
100295
100286
|
});
|
|
100296
100287
|
}
|
|
100297
|
-
const sourceCliPath =
|
|
100288
|
+
const sourceCliPath = resolve20(currentDirectory, options.packageRel, options.sourceCliRel);
|
|
100298
100289
|
if (!seenPaths.has(sourceCliPath)) {
|
|
100299
100290
|
const runtime5 = options.resolveExecutable("bun");
|
|
100300
100291
|
const sourceCandidateAvailable = options.isSourceCandidateAvailable?.({
|
|
@@ -100311,7 +100302,7 @@ function createAncestorCliCandidates(options) {
|
|
|
100311
100302
|
runtimeAvailable: runtime5.available
|
|
100312
100303
|
});
|
|
100313
100304
|
}
|
|
100314
|
-
const parentDirectory =
|
|
100305
|
+
const parentDirectory = resolve20(currentDirectory, "..");
|
|
100315
100306
|
if (parentDirectory === currentDirectory)
|
|
100316
100307
|
return candidates;
|
|
100317
100308
|
currentDirectory = parentDirectory;
|
|
@@ -100347,7 +100338,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
|
|
|
100347
100338
|
].join(";");
|
|
100348
100339
|
function getModuleDirectory(moduleUrl) {
|
|
100349
100340
|
try {
|
|
100350
|
-
return
|
|
100341
|
+
return dirname30(fileURLToPath7(moduleUrl));
|
|
100351
100342
|
} catch (error51) {
|
|
100352
100343
|
if (!(error51 instanceof Error))
|
|
100353
100344
|
throw error51;
|
|
@@ -100355,23 +100346,23 @@ function getModuleDirectory(moduleUrl) {
|
|
|
100355
100346
|
}
|
|
100356
100347
|
}
|
|
100357
100348
|
function findBootstrapRoot(candidates, pathExists) {
|
|
100358
|
-
return candidates.find((candidate) => pathExists(
|
|
100349
|
+
return candidates.find((candidate) => pathExists(resolve21(candidate.root, "package.json")))?.root ?? process.cwd();
|
|
100359
100350
|
}
|
|
100360
100351
|
function createBootstrapCandidate(root, pathExists, resolveExecutable) {
|
|
100361
100352
|
const runtime5 = resolveJavaScriptRuntime(resolveExecutable);
|
|
100362
100353
|
const bun = resolveExecutable("bun");
|
|
100363
100354
|
const npm = resolveExecutable("npm");
|
|
100364
|
-
const packageManifestPath =
|
|
100355
|
+
const packageManifestPath = resolve21(root, PACKAGE_REL, "package.json");
|
|
100365
100356
|
return {
|
|
100366
100357
|
command: [runtime5.command, "-e", LSP_BOOTSTRAP_SCRIPT, root, npm.command, bun.command],
|
|
100367
100358
|
root,
|
|
100368
|
-
path:
|
|
100359
|
+
path: resolve21(root, PACKAGE_REL, DIST_CLI_REL),
|
|
100369
100360
|
exists: runtime5.available && npm.available && pathExists(packageManifestPath),
|
|
100370
100361
|
runtimeAvailable: runtime5.available
|
|
100371
100362
|
};
|
|
100372
100363
|
}
|
|
100373
100364
|
function resolveLspCommand(options = {}) {
|
|
100374
|
-
const pathExists = options.exists ??
|
|
100365
|
+
const pathExists = options.exists ?? existsSync56;
|
|
100375
100366
|
const resolveExecutable = options.resolveExecutable ?? resolveRuntimeExecutable;
|
|
100376
100367
|
const moduleDirectory = getModuleDirectory(options.moduleUrl ?? import.meta.url);
|
|
100377
100368
|
const candidates = moduleDirectory ? createAncestorCliCandidates({
|
|
@@ -100381,7 +100372,7 @@ function resolveLspCommand(options = {}) {
|
|
|
100381
100372
|
sourceCliRel: SOURCE_CLI_REL,
|
|
100382
100373
|
pathExists,
|
|
100383
100374
|
resolveExecutable,
|
|
100384
|
-
isSourceCandidateAvailable: ({ root }) => pathExists(
|
|
100375
|
+
isSourceCandidateAvailable: ({ root }) => pathExists(resolve21(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL))
|
|
100385
100376
|
}) : [];
|
|
100386
100377
|
const distCandidate = candidates.find((candidate) => hasCliSuffix(candidate.path, DIST_CLI_REL) && candidate.exists);
|
|
100387
100378
|
if (distCandidate) {
|
|
@@ -100428,7 +100419,7 @@ function readOmoConfig(configDirectory) {
|
|
|
100428
100419
|
}
|
|
100429
100420
|
function isLspMcpDisabled(options) {
|
|
100430
100421
|
const userConfigDirectory = options.configDirectory ?? getOpenCodeConfigDir({ binary: "opencode" });
|
|
100431
|
-
const projectConfigDirectory =
|
|
100422
|
+
const projectConfigDirectory = join77(options.cwd ?? process.cwd(), ".opencode");
|
|
100432
100423
|
const userConfig = readOmoConfig(userConfigDirectory);
|
|
100433
100424
|
const projectConfig = readOmoConfig(projectConfigDirectory);
|
|
100434
100425
|
const disabledMcps = new Set([
|
|
@@ -100447,21 +100438,21 @@ function getInstalledLspServers(options = {}) {
|
|
|
100447
100438
|
|
|
100448
100439
|
// packages/omo-opencode/src/cli/doctor/checks/tools-mcp.ts
|
|
100449
100440
|
init_shared();
|
|
100450
|
-
import { existsSync as
|
|
100451
|
-
import { homedir as
|
|
100452
|
-
import { join as
|
|
100441
|
+
import { existsSync as existsSync57, readFileSync as readFileSync38 } from "node:fs";
|
|
100442
|
+
import { homedir as homedir20 } from "node:os";
|
|
100443
|
+
import { join as join78 } from "node:path";
|
|
100453
100444
|
var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
|
|
100454
100445
|
function getMcpConfigPaths() {
|
|
100455
100446
|
return [
|
|
100456
|
-
|
|
100457
|
-
|
|
100458
|
-
|
|
100447
|
+
join78(homedir20(), ".claude", ".mcp.json"),
|
|
100448
|
+
join78(process.cwd(), ".mcp.json"),
|
|
100449
|
+
join78(process.cwd(), ".claude", ".mcp.json")
|
|
100459
100450
|
];
|
|
100460
100451
|
}
|
|
100461
100452
|
function loadUserMcpConfig() {
|
|
100462
100453
|
const servers = {};
|
|
100463
100454
|
for (const configPath of getMcpConfigPaths()) {
|
|
100464
|
-
if (!
|
|
100455
|
+
if (!existsSync57(configPath))
|
|
100465
100456
|
continue;
|
|
100466
100457
|
try {
|
|
100467
100458
|
const content = readFileSync38(configPath, "utf-8");
|
|
@@ -100599,12 +100590,12 @@ async function checkTools() {
|
|
|
100599
100590
|
|
|
100600
100591
|
// packages/omo-opencode/src/cli/doctor/checks/telemetry.ts
|
|
100601
100592
|
init_src4();
|
|
100602
|
-
import { existsSync as
|
|
100593
|
+
import { existsSync as existsSync58, readFileSync as readFileSync39 } from "node:fs";
|
|
100603
100594
|
function isTelemetryState(value) {
|
|
100604
100595
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
100605
100596
|
}
|
|
100606
100597
|
function readLastActiveDay(stateFilePath) {
|
|
100607
|
-
if (!
|
|
100598
|
+
if (!existsSync58(stateFilePath)) {
|
|
100608
100599
|
return "never";
|
|
100609
100600
|
}
|
|
100610
100601
|
let parsed;
|
|
@@ -100667,17 +100658,17 @@ async function probeBinary(cmd, args, spawnImpl) {
|
|
|
100667
100658
|
}
|
|
100668
100659
|
|
|
100669
100660
|
// packages/team-core/src/team-registry/paths.ts
|
|
100670
|
-
import { homedir as
|
|
100661
|
+
import { homedir as homedir21 } from "node:os";
|
|
100671
100662
|
import path14 from "node:path";
|
|
100672
100663
|
function resolveBaseDir(config3) {
|
|
100673
|
-
return expandHomeDirectory(config3.base_dir ?? path14.join(
|
|
100664
|
+
return expandHomeDirectory(config3.base_dir ?? path14.join(homedir21(), ".omo"));
|
|
100674
100665
|
}
|
|
100675
100666
|
function expandHomeDirectory(directoryPath) {
|
|
100676
100667
|
if (directoryPath === "~") {
|
|
100677
|
-
return
|
|
100668
|
+
return homedir21();
|
|
100678
100669
|
}
|
|
100679
100670
|
if (directoryPath.startsWith("~/") || directoryPath.startsWith("~\\")) {
|
|
100680
|
-
return path14.join(
|
|
100671
|
+
return path14.join(homedir21(), directoryPath.slice(2));
|
|
100681
100672
|
}
|
|
100682
100673
|
return directoryPath;
|
|
100683
100674
|
}
|
|
@@ -100754,10 +100745,10 @@ async function pathExists(dir) {
|
|
|
100754
100745
|
|
|
100755
100746
|
// packages/omo-opencode/src/cli/doctor/checks/codex.ts
|
|
100756
100747
|
init_src();
|
|
100757
|
-
import { existsSync as
|
|
100758
|
-
import { lstat as lstat12, readdir as readdir10, readFile as
|
|
100759
|
-
import { homedir as
|
|
100760
|
-
import { basename as basename13, join as
|
|
100748
|
+
import { existsSync as existsSync59 } from "node:fs";
|
|
100749
|
+
import { lstat as lstat12, readdir as readdir10, readFile as readFile22 } from "node:fs/promises";
|
|
100750
|
+
import { homedir as homedir22 } from "node:os";
|
|
100751
|
+
import { basename as basename13, join as join79, resolve as resolve22 } from "node:path";
|
|
100761
100752
|
// packages/omo-opencode/package.json
|
|
100762
100753
|
var package_default3 = {
|
|
100763
100754
|
name: "@oh-my-opencode/omo-opencode",
|
|
@@ -100815,13 +100806,13 @@ var CODEX_BIN_NAMES = [
|
|
|
100815
100806
|
"omo-git-bash-hook"
|
|
100816
100807
|
];
|
|
100817
100808
|
async function gatherCodexSummary(deps = {}) {
|
|
100818
|
-
const codexHome =
|
|
100809
|
+
const codexHome = resolve22(deps.codexHome ?? process.env.CODEX_HOME ?? join79(homedir22(), ".codex"));
|
|
100819
100810
|
const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
|
|
100820
100811
|
const detection = await (deps.detectCodexInstallation ?? detectCodexInstallation)();
|
|
100821
100812
|
const pluginRoot = await resolveInstalledPluginRoot(codexHome);
|
|
100822
|
-
const manifest = pluginRoot === null ? null : await readJson(
|
|
100823
|
-
const installSnapshot = pluginRoot === null ? null : await readJson(
|
|
100824
|
-
const configPath =
|
|
100813
|
+
const manifest = pluginRoot === null ? null : await readJson(join79(pluginRoot, ".codex-plugin", "plugin.json"));
|
|
100814
|
+
const installSnapshot = pluginRoot === null ? null : await readJson(join79(pluginRoot, "lazycodex-install.json"));
|
|
100815
|
+
const configPath = join79(codexHome, "config.toml");
|
|
100825
100816
|
const pluginVersion = stringField(manifest, "version");
|
|
100826
100817
|
return {
|
|
100827
100818
|
codexPath: detection.found && "path" in detection ? detection.path : null,
|
|
@@ -100878,7 +100869,7 @@ function buildCodexIssues(summary) {
|
|
|
100878
100869
|
if (summary.pluginRoot === null) {
|
|
100879
100870
|
issues.push({
|
|
100880
100871
|
title: "OMO Codex plugin is not installed",
|
|
100881
|
-
description: `Expected cached plugin at ${
|
|
100872
|
+
description: `Expected cached plugin at ${join79("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
|
|
100882
100873
|
fix: "Run: npx lazycodex-ai install",
|
|
100883
100874
|
severity: "error",
|
|
100884
100875
|
affects: ["plugin loading"]
|
|
@@ -100943,15 +100934,15 @@ function buildCodexIssues(summary) {
|
|
|
100943
100934
|
return issues;
|
|
100944
100935
|
}
|
|
100945
100936
|
async function resolveInstalledPluginRoot(codexHome) {
|
|
100946
|
-
const pluginRoot =
|
|
100947
|
-
if (!
|
|
100937
|
+
const pluginRoot = join79(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
|
|
100938
|
+
if (!existsSync59(pluginRoot))
|
|
100948
100939
|
return null;
|
|
100949
100940
|
const versions2 = await readdir10(pluginRoot, { withFileTypes: true });
|
|
100950
100941
|
const candidates = versions2.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);
|
|
100951
|
-
return candidates.length === 0 ? null :
|
|
100942
|
+
return candidates.length === 0 ? null : join79(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
|
|
100952
100943
|
}
|
|
100953
100944
|
async function readCodexConfigSummary(configPath) {
|
|
100954
|
-
if (!
|
|
100945
|
+
if (!existsSync59(configPath)) {
|
|
100955
100946
|
return {
|
|
100956
100947
|
exists: false,
|
|
100957
100948
|
marketplaceConfigured: false,
|
|
@@ -100962,7 +100953,7 @@ async function readCodexConfigSummary(configPath) {
|
|
|
100962
100953
|
companionLifecycleHookStateEvents: []
|
|
100963
100954
|
};
|
|
100964
100955
|
}
|
|
100965
|
-
const content = await
|
|
100956
|
+
const content = await readFile22(configPath, "utf8");
|
|
100966
100957
|
return {
|
|
100967
100958
|
exists: true,
|
|
100968
100959
|
marketplaceConfigured: content.includes("[marketplaces.sisyphuslabs]"),
|
|
@@ -100976,21 +100967,21 @@ async function readCodexConfigSummary(configPath) {
|
|
|
100976
100967
|
async function readLinkedBins(binDir) {
|
|
100977
100968
|
const linked = [];
|
|
100978
100969
|
for (const name of CODEX_BIN_NAMES) {
|
|
100979
|
-
if (await pathExists2(
|
|
100970
|
+
if (await pathExists2(join79(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
|
|
100980
100971
|
linked.push(name);
|
|
100981
100972
|
}
|
|
100982
100973
|
return linked;
|
|
100983
100974
|
}
|
|
100984
100975
|
async function readLinkedAgents(codexHome) {
|
|
100985
|
-
const agentsDir =
|
|
100986
|
-
if (!
|
|
100976
|
+
const agentsDir = join79(codexHome, "agents");
|
|
100977
|
+
if (!existsSync59(agentsDir))
|
|
100987
100978
|
return [];
|
|
100988
100979
|
const entries = await readdir10(agentsDir, { withFileTypes: true });
|
|
100989
100980
|
return entries.filter((entry) => entry.isFile() || entry.isSymbolicLink()).map((entry) => basename13(entry.name, ".toml")).sort();
|
|
100990
100981
|
}
|
|
100991
100982
|
async function readJson(path16) {
|
|
100992
100983
|
try {
|
|
100993
|
-
const parsed = JSON.parse(await
|
|
100984
|
+
const parsed = JSON.parse(await readFile22(path16, "utf8"));
|
|
100994
100985
|
return isPlainRecord(parsed) ? parsed : null;
|
|
100995
100986
|
} catch (error51) {
|
|
100996
100987
|
if (error51 instanceof Error)
|
|
@@ -101096,9 +101087,9 @@ async function pathExists2(path16) {
|
|
|
101096
101087
|
|
|
101097
101088
|
// packages/omo-opencode/src/cli/doctor/checks/codex-components.ts
|
|
101098
101089
|
init_src();
|
|
101099
|
-
import { readdir as readdir11, readFile as
|
|
101100
|
-
import { homedir as
|
|
101101
|
-
import { dirname as
|
|
101090
|
+
import { readdir as readdir11, readFile as readFile23, stat as stat6 } from "node:fs/promises";
|
|
101091
|
+
import { homedir as homedir23 } from "node:os";
|
|
101092
|
+
import { dirname as dirname31, isAbsolute as isAbsolute12, join as join80, relative as relative10, resolve as resolve23, sep as sep9 } from "node:path";
|
|
101102
101093
|
var CODEX_COMPONENTS_CHECK_ID = "codex-components";
|
|
101103
101094
|
var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
|
|
101104
101095
|
var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
|
|
@@ -101108,7 +101099,7 @@ async function checkCodexComponents(deps = {}) {
|
|
|
101108
101099
|
const env3 = deps.env ?? process.env;
|
|
101109
101100
|
const platform = deps.platform ?? process.platform;
|
|
101110
101101
|
const arch = deps.arch ?? process.arch;
|
|
101111
|
-
const codexHome =
|
|
101102
|
+
const codexHome = resolve23(deps.codexHome ?? env3["CODEX_HOME"] ?? join80(homedir23(), ".codex"));
|
|
101112
101103
|
const summary = await gatherCodexSummary({ ...deps, codexHome });
|
|
101113
101104
|
if (summary.pluginRoot === null) {
|
|
101114
101105
|
return {
|
|
@@ -101133,7 +101124,7 @@ async function checkCodexComponents(deps = {}) {
|
|
|
101133
101124
|
});
|
|
101134
101125
|
}
|
|
101135
101126
|
const runtimeSgDir = runtimeSgDirectory(codexHome, platform, arch);
|
|
101136
|
-
const runtimeSgPath =
|
|
101127
|
+
const runtimeSgPath = join80(runtimeSgDir, sgBinaryName(platform));
|
|
101137
101128
|
const sg = findSgBinarySync({
|
|
101138
101129
|
arch,
|
|
101139
101130
|
env: env3,
|
|
@@ -101172,8 +101163,8 @@ async function auditBundleTargets(pluginRoot) {
|
|
|
101172
101163
|
const manifest = await readJson2(manifestPath);
|
|
101173
101164
|
if (manifest === null || !isRecord5(manifest["mcpServers"]))
|
|
101174
101165
|
continue;
|
|
101175
|
-
const manifestRoot =
|
|
101176
|
-
const isRootManifest =
|
|
101166
|
+
const manifestRoot = dirname31(manifestPath);
|
|
101167
|
+
const isRootManifest = resolve23(manifestRoot) === resolve23(pluginRoot);
|
|
101177
101168
|
for (const server2 of Object.values(manifest["mcpServers"])) {
|
|
101178
101169
|
if (!isRecord5(server2) || !Array.isArray(server2["args"]))
|
|
101179
101170
|
continue;
|
|
@@ -101193,7 +101184,7 @@ async function auditBundleTargets(pluginRoot) {
|
|
|
101193
101184
|
continue;
|
|
101194
101185
|
const commands2 = [];
|
|
101195
101186
|
collectHookCommands(manifest, commands2);
|
|
101196
|
-
const hookPluginRoot =
|
|
101187
|
+
const hookPluginRoot = dirname31(dirname31(hookManifestPath));
|
|
101197
101188
|
for (const command of commands2) {
|
|
101198
101189
|
for (const relativePath of extractPluginRootPaths(command)) {
|
|
101199
101190
|
referencedCount += 1;
|
|
@@ -101215,8 +101206,8 @@ function recordBrokenTarget(broken, classified, origin) {
|
|
|
101215
101206
|
broken.push(entry);
|
|
101216
101207
|
}
|
|
101217
101208
|
async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEscape) {
|
|
101218
|
-
const targetPath =
|
|
101219
|
-
const bundleRootPath =
|
|
101209
|
+
const targetPath = resolve23(baseRoot, relativePath);
|
|
101210
|
+
const bundleRootPath = resolve23(bundleRoot);
|
|
101220
101211
|
const bundleRootPrefix = bundleRootPath.endsWith(sep9) ? bundleRootPath : `${bundleRootPath}${sep9}`;
|
|
101221
101212
|
if (targetPath !== bundleRootPath && !targetPath.startsWith(bundleRootPrefix)) {
|
|
101222
101213
|
if (allowEscape)
|
|
@@ -101232,7 +101223,7 @@ async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEsc
|
|
|
101232
101223
|
}
|
|
101233
101224
|
async function findHookManifestPaths(root) {
|
|
101234
101225
|
const paths2 = await findManifestPaths(root, "hooks.json");
|
|
101235
|
-
return paths2.filter((path16) =>
|
|
101226
|
+
return paths2.filter((path16) => dirname31(path16).endsWith(`${sep9}hooks`));
|
|
101236
101227
|
}
|
|
101237
101228
|
async function findManifestPaths(root, manifestName) {
|
|
101238
101229
|
let entries;
|
|
@@ -101245,7 +101236,7 @@ async function findManifestPaths(root, manifestName) {
|
|
|
101245
101236
|
for (const entry of entries) {
|
|
101246
101237
|
if (entry.name === "node_modules" || entry.name === ".git")
|
|
101247
101238
|
continue;
|
|
101248
|
-
const entryPath =
|
|
101239
|
+
const entryPath = join80(root, entry.name);
|
|
101249
101240
|
if (entry.isDirectory()) {
|
|
101250
101241
|
paths2.push(...await findManifestPaths(entryPath, manifestName));
|
|
101251
101242
|
continue;
|
|
@@ -101289,18 +101280,18 @@ function isPluginRuntimePathArg(arg) {
|
|
|
101289
101280
|
return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute12(arg));
|
|
101290
101281
|
}
|
|
101291
101282
|
function runtimeSgDirectory(codexHome, platform, arch) {
|
|
101292
|
-
return
|
|
101283
|
+
return join80(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
|
|
101293
101284
|
}
|
|
101294
101285
|
function describeSgSource(sgPath, env3, runtimeSgDir, platform) {
|
|
101295
101286
|
const override = env3[SG_PATH_ENV_KEY]?.trim();
|
|
101296
101287
|
if (override !== undefined && override.length > 0 && sgPath === override)
|
|
101297
101288
|
return `env override ${SG_PATH_ENV_KEY}`;
|
|
101298
|
-
if (sgPath ===
|
|
101289
|
+
if (sgPath === join80(runtimeSgDir, sgBinaryName(platform)))
|
|
101299
101290
|
return "runtime dir";
|
|
101300
101291
|
return "PATH";
|
|
101301
101292
|
}
|
|
101302
101293
|
async function readBootstrapStateSummary(codexHome) {
|
|
101303
|
-
const statePath =
|
|
101294
|
+
const statePath = join80(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
|
|
101304
101295
|
const raw = await readJson2(statePath);
|
|
101305
101296
|
if (raw === null)
|
|
101306
101297
|
return null;
|
|
@@ -101349,7 +101340,7 @@ function degradedDetailLines(entries) {
|
|
|
101349
101340
|
}
|
|
101350
101341
|
async function readJson2(path16) {
|
|
101351
101342
|
try {
|
|
101352
|
-
const parsed = JSON.parse(await
|
|
101343
|
+
const parsed = JSON.parse(await readFile23(path16, "utf8"));
|
|
101353
101344
|
return isRecord5(parsed) ? parsed : null;
|
|
101354
101345
|
} catch (error51) {
|
|
101355
101346
|
if (error51 instanceof Error)
|
|
@@ -101376,23 +101367,23 @@ function isRecord5(value) {
|
|
|
101376
101367
|
}
|
|
101377
101368
|
|
|
101378
101369
|
// packages/omo-opencode/src/cli/doctor/checks/codex-runtime-wrapper.ts
|
|
101379
|
-
import { existsSync as
|
|
101380
|
-
import { readFile as
|
|
101381
|
-
import { homedir as
|
|
101382
|
-
import { join as
|
|
101370
|
+
import { existsSync as existsSync60 } from "node:fs";
|
|
101371
|
+
import { readFile as readFile24 } from "node:fs/promises";
|
|
101372
|
+
import { homedir as homedir24 } from "node:os";
|
|
101373
|
+
import { join as join81, resolve as resolve24 } from "node:path";
|
|
101383
101374
|
var RUNTIME_WRAPPER_MARKER2 = "OMO_GENERATED_RUNTIME_WRAPPER";
|
|
101384
101375
|
var CHECK_NAME = "codex-runtime-wrapper";
|
|
101385
101376
|
var REINSTALL_COMMAND = "npx --yes lazycodex-ai@latest install --no-tui";
|
|
101386
101377
|
async function checkCodexRuntimeWrapper(deps = {}) {
|
|
101387
|
-
const codexHome =
|
|
101378
|
+
const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ?? join81(homedir24(), ".codex"));
|
|
101388
101379
|
const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
|
|
101389
101380
|
const platform = deps.platform ?? process.platform;
|
|
101390
|
-
const wrapperPath =
|
|
101381
|
+
const wrapperPath = join81(binDir, platform === "win32" ? "omo.cmd" : "omo");
|
|
101391
101382
|
const wrapper = await readRuntimeWrapper(wrapperPath);
|
|
101392
101383
|
const issues = [];
|
|
101393
101384
|
if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {
|
|
101394
101385
|
const targetPath = parseRuntimeTargetPath(wrapper);
|
|
101395
|
-
if (targetPath !== null && !
|
|
101386
|
+
if (targetPath !== null && !existsSync60(targetPath)) {
|
|
101396
101387
|
issues.push({
|
|
101397
101388
|
title: "omo runtime wrapper target is missing",
|
|
101398
101389
|
description: `Generated omo runtime wrapper at ${wrapperPath} points to missing target ${targetPath}.`,
|
|
@@ -101412,7 +101403,7 @@ async function checkCodexRuntimeWrapper(deps = {}) {
|
|
|
101412
101403
|
}
|
|
101413
101404
|
async function readRuntimeWrapper(path16) {
|
|
101414
101405
|
try {
|
|
101415
|
-
return await
|
|
101406
|
+
return await readFile24(path16, "utf8");
|
|
101416
101407
|
} catch (error51) {
|
|
101417
101408
|
if (error51 instanceof Error)
|
|
101418
101409
|
return null;
|
|
@@ -101891,7 +101882,7 @@ Doctor failed unexpectedly: ${message}`];
|
|
|
101891
101882
|
import { createHash as createHash4 } from "node:crypto";
|
|
101892
101883
|
import {
|
|
101893
101884
|
chmodSync as chmodSync4,
|
|
101894
|
-
existsSync as
|
|
101885
|
+
existsSync as existsSync63,
|
|
101895
101886
|
mkdirSync as mkdirSync14,
|
|
101896
101887
|
readdirSync as readdirSync9,
|
|
101897
101888
|
readFileSync as readFileSync42,
|
|
@@ -101899,15 +101890,15 @@ import {
|
|
|
101899
101890
|
unlinkSync as unlinkSync8,
|
|
101900
101891
|
writeFileSync as writeFileSync11
|
|
101901
101892
|
} from "node:fs";
|
|
101902
|
-
import { basename as basename14, dirname as
|
|
101893
|
+
import { basename as basename14, dirname as dirname32, join as join84 } from "node:path";
|
|
101903
101894
|
|
|
101904
101895
|
// packages/mcp-client-core/src/config-dir.ts
|
|
101905
|
-
import { existsSync as
|
|
101906
|
-
import { homedir as
|
|
101907
|
-
import { join as
|
|
101896
|
+
import { existsSync as existsSync61, realpathSync as realpathSync8 } from "node:fs";
|
|
101897
|
+
import { homedir as homedir25 } from "node:os";
|
|
101898
|
+
import { join as join82, resolve as resolve25 } from "node:path";
|
|
101908
101899
|
function resolveConfigPath2(pathValue) {
|
|
101909
|
-
const resolvedPath =
|
|
101910
|
-
if (!
|
|
101900
|
+
const resolvedPath = resolve25(pathValue);
|
|
101901
|
+
if (!existsSync61(resolvedPath))
|
|
101911
101902
|
return resolvedPath;
|
|
101912
101903
|
try {
|
|
101913
101904
|
return realpathSync8(resolvedPath);
|
|
@@ -101922,13 +101913,13 @@ function getOpenCodeCliConfigDir(env3 = process.env) {
|
|
|
101922
101913
|
if (customConfigDir) {
|
|
101923
101914
|
return resolveConfigPath2(customConfigDir);
|
|
101924
101915
|
}
|
|
101925
|
-
const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() ||
|
|
101926
|
-
return resolveConfigPath2(
|
|
101916
|
+
const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() || join82(homedir25(), ".config");
|
|
101917
|
+
return resolveConfigPath2(join82(xdgConfigDir, "opencode"));
|
|
101927
101918
|
}
|
|
101928
101919
|
|
|
101929
101920
|
// packages/mcp-client-core/src/mcp-oauth/storage-index.ts
|
|
101930
|
-
import { chmodSync as chmodSync3, existsSync as
|
|
101931
|
-
import { join as
|
|
101921
|
+
import { chmodSync as chmodSync3, existsSync as existsSync62, readFileSync as readFileSync41, renameSync as renameSync6, writeFileSync as writeFileSync10 } from "node:fs";
|
|
101922
|
+
import { join as join83 } from "node:path";
|
|
101932
101923
|
var INDEX_FILE_NAME = "index.json";
|
|
101933
101924
|
function isTokenIndex(value) {
|
|
101934
101925
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
@@ -101936,11 +101927,11 @@ function isTokenIndex(value) {
|
|
|
101936
101927
|
return Object.values(value).every((entry) => typeof entry === "string");
|
|
101937
101928
|
}
|
|
101938
101929
|
function getIndexPath(storageDir) {
|
|
101939
|
-
return
|
|
101930
|
+
return join83(storageDir, INDEX_FILE_NAME);
|
|
101940
101931
|
}
|
|
101941
101932
|
function readTokenIndex(storageDir) {
|
|
101942
101933
|
const indexPath = getIndexPath(storageDir);
|
|
101943
|
-
if (!
|
|
101934
|
+
if (!existsSync62(indexPath))
|
|
101944
101935
|
return {};
|
|
101945
101936
|
try {
|
|
101946
101937
|
const parsed = JSON.parse(readFileSync41(indexPath, "utf-8"));
|
|
@@ -101980,16 +101971,16 @@ function deleteTokenIndexEntry(storageDir, hash2) {
|
|
|
101980
101971
|
var STORAGE_DIR_NAME = "mcp-oauth";
|
|
101981
101972
|
var LEGACY_STORAGE_FILE_NAME = "mcp-oauth.json";
|
|
101982
101973
|
function getMcpOauthStorageDir() {
|
|
101983
|
-
return
|
|
101974
|
+
return join84(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
|
|
101984
101975
|
}
|
|
101985
101976
|
function getMcpOauthServerHash(serverHost, resource) {
|
|
101986
101977
|
return createHash4("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);
|
|
101987
101978
|
}
|
|
101988
101979
|
function getMcpOauthStoragePath(serverHost, resource) {
|
|
101989
|
-
return
|
|
101980
|
+
return join84(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
|
|
101990
101981
|
}
|
|
101991
101982
|
function getLegacyStoragePath() {
|
|
101992
|
-
return
|
|
101983
|
+
return join84(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
|
|
101993
101984
|
}
|
|
101994
101985
|
function normalizeHost2(serverHost) {
|
|
101995
101986
|
let host = serverHost.trim();
|
|
@@ -102050,7 +102041,7 @@ function isOAuthTokenData(value) {
|
|
|
102050
102041
|
return clientSecret === undefined || typeof clientSecret === "string";
|
|
102051
102042
|
}
|
|
102052
102043
|
function readTokenFile(filePath) {
|
|
102053
|
-
if (!
|
|
102044
|
+
if (!existsSync63(filePath))
|
|
102054
102045
|
return null;
|
|
102055
102046
|
try {
|
|
102056
102047
|
const parsed = JSON.parse(readFileSync42(filePath, "utf-8"));
|
|
@@ -102063,7 +102054,7 @@ function readTokenFile(filePath) {
|
|
|
102063
102054
|
}
|
|
102064
102055
|
function readLegacyStore() {
|
|
102065
102056
|
const filePath = getLegacyStoragePath();
|
|
102066
|
-
if (!
|
|
102057
|
+
if (!existsSync63(filePath))
|
|
102067
102058
|
return null;
|
|
102068
102059
|
try {
|
|
102069
102060
|
const parsed = JSON.parse(readFileSync42(filePath, "utf-8"));
|
|
@@ -102083,8 +102074,8 @@ function readLegacyStore() {
|
|
|
102083
102074
|
}
|
|
102084
102075
|
function writeTokenFile(filePath, token) {
|
|
102085
102076
|
try {
|
|
102086
|
-
const dir =
|
|
102087
|
-
if (!
|
|
102077
|
+
const dir = dirname32(filePath);
|
|
102078
|
+
if (!existsSync63(dir)) {
|
|
102088
102079
|
mkdirSync14(dir, { recursive: true });
|
|
102089
102080
|
}
|
|
102090
102081
|
const tempPath = `${filePath}.tmp.${Date.now()}`;
|
|
@@ -102108,7 +102099,7 @@ function saveToken(serverHost, resource, token) {
|
|
|
102108
102099
|
}
|
|
102109
102100
|
function deleteToken(serverHost, resource) {
|
|
102110
102101
|
const filePath = getMcpOauthStoragePath(serverHost, resource);
|
|
102111
|
-
if (!
|
|
102102
|
+
if (!existsSync63(filePath))
|
|
102112
102103
|
return deleteLegacyToken(serverHost, resource);
|
|
102113
102104
|
try {
|
|
102114
102105
|
unlinkSync8(filePath);
|
|
@@ -102130,7 +102121,7 @@ function deleteLegacyToken(serverHost, resource) {
|
|
|
102130
102121
|
if (Object.keys(store2).length === 0) {
|
|
102131
102122
|
try {
|
|
102132
102123
|
const filePath = getLegacyStoragePath();
|
|
102133
|
-
if (
|
|
102124
|
+
if (existsSync63(filePath))
|
|
102134
102125
|
unlinkSync8(filePath);
|
|
102135
102126
|
return true;
|
|
102136
102127
|
} catch (deleteError) {
|
|
@@ -102168,7 +102159,7 @@ function listTokensByHost(serverHost) {
|
|
|
102168
102159
|
for (const [hash2, indexedKey] of Object.entries(index)) {
|
|
102169
102160
|
if (!indexedKey.startsWith(prefix))
|
|
102170
102161
|
continue;
|
|
102171
|
-
const indexedToken = readTokenFile(
|
|
102162
|
+
const indexedToken = readTokenFile(join84(getMcpOauthStorageDir(), `${hash2}.json`));
|
|
102172
102163
|
if (indexedToken)
|
|
102173
102164
|
result[indexedKey] = indexedToken;
|
|
102174
102165
|
}
|
|
@@ -102177,13 +102168,13 @@ function listTokensByHost(serverHost) {
|
|
|
102177
102168
|
function listAllTokens() {
|
|
102178
102169
|
const result = { ...readLegacyStore() ?? {} };
|
|
102179
102170
|
const dir = getMcpOauthStorageDir();
|
|
102180
|
-
if (!
|
|
102171
|
+
if (!existsSync63(dir))
|
|
102181
102172
|
return result;
|
|
102182
102173
|
const index = readTokenIndex(dir);
|
|
102183
102174
|
for (const entry of readdirSync9(dir, { withFileTypes: true })) {
|
|
102184
102175
|
if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
|
|
102185
102176
|
continue;
|
|
102186
|
-
const token = readTokenFile(
|
|
102177
|
+
const token = readTokenFile(join84(dir, entry.name));
|
|
102187
102178
|
const hash2 = basename14(entry.name, ".json");
|
|
102188
102179
|
if (token)
|
|
102189
102180
|
result[index[hash2] ?? hash2] = token;
|
|
@@ -102383,7 +102374,7 @@ function buildAuthorizationUrl(authorizationEndpoint, options) {
|
|
|
102383
102374
|
}
|
|
102384
102375
|
var CALLBACK_TIMEOUT_MS = 5 * 60 * 1000;
|
|
102385
102376
|
function startCallbackServer(port) {
|
|
102386
|
-
return new Promise((
|
|
102377
|
+
return new Promise((resolve26, reject) => {
|
|
102387
102378
|
let timeoutId;
|
|
102388
102379
|
const server2 = createServer2((request, response) => {
|
|
102389
102380
|
clearTimeout(timeoutId);
|
|
@@ -102409,7 +102400,7 @@ function startCallbackServer(port) {
|
|
|
102409
102400
|
response.writeHead(200, { "content-type": "text/html" });
|
|
102410
102401
|
response.end("<html><body><h1>Authorization successful. You can close this tab.</h1></body></html>");
|
|
102411
102402
|
server2.close();
|
|
102412
|
-
|
|
102403
|
+
resolve26({ code, state: state2 });
|
|
102413
102404
|
});
|
|
102414
102405
|
timeoutId = setTimeout(() => {
|
|
102415
102406
|
server2.close();
|
|
@@ -102749,7 +102740,7 @@ function createMcpOAuthCommand() {
|
|
|
102749
102740
|
}
|
|
102750
102741
|
|
|
102751
102742
|
// packages/omo-opencode/src/cli/boulder/boulder.ts
|
|
102752
|
-
import { existsSync as
|
|
102743
|
+
import { existsSync as existsSync64 } from "node:fs";
|
|
102753
102744
|
|
|
102754
102745
|
// packages/omo-opencode/src/cli/boulder/formatter.ts
|
|
102755
102746
|
var import_picocolors22 = __toESM(require_picocolors(), 1);
|
|
@@ -102813,7 +102804,7 @@ function formatReadErrorMessage(isJson) {
|
|
|
102813
102804
|
}
|
|
102814
102805
|
|
|
102815
102806
|
// packages/omo-opencode/src/cli/boulder/boulder.ts
|
|
102816
|
-
function
|
|
102807
|
+
function formatDurationHuman(durationMs) {
|
|
102817
102808
|
if (durationMs < 1000) {
|
|
102818
102809
|
return `${durationMs}ms`;
|
|
102819
102810
|
}
|
|
@@ -102852,11 +102843,11 @@ function buildCliWork(directory, work) {
|
|
|
102852
102843
|
const taskSession = currentTask ? work.task_sessions?.[currentTask.key] : undefined;
|
|
102853
102844
|
let currentTaskElapsedHuman;
|
|
102854
102845
|
if (taskSession?.elapsed_ms !== undefined) {
|
|
102855
|
-
currentTaskElapsedHuman =
|
|
102846
|
+
currentTaskElapsedHuman = formatDurationHuman(taskSession.elapsed_ms);
|
|
102856
102847
|
} else if (taskSession?.started_at) {
|
|
102857
102848
|
const startedAtMs = Date.parse(taskSession.started_at);
|
|
102858
102849
|
if (!Number.isNaN(startedAtMs)) {
|
|
102859
|
-
currentTaskElapsedHuman =
|
|
102850
|
+
currentTaskElapsedHuman = formatDurationHuman(Math.max(0, Date.now() - startedAtMs));
|
|
102860
102851
|
}
|
|
102861
102852
|
}
|
|
102862
102853
|
return {
|
|
@@ -102868,7 +102859,7 @@ function buildCliWork(directory, work) {
|
|
|
102868
102859
|
started_at: work.started_at,
|
|
102869
102860
|
ended_at: work.ended_at,
|
|
102870
102861
|
elapsed_ms: elapsedMs,
|
|
102871
|
-
elapsed_human: elapsedMs !== undefined ?
|
|
102862
|
+
elapsed_human: elapsedMs !== undefined ? formatDurationHuman(elapsedMs) : undefined,
|
|
102872
102863
|
total_tasks: progress.total,
|
|
102873
102864
|
completed_tasks: progress.completed,
|
|
102874
102865
|
remaining_tasks: Math.max(0, progress.total - progress.completed),
|
|
@@ -102886,10 +102877,10 @@ async function boulder(options) {
|
|
|
102886
102877
|
const boulderFilePath = getBoulderFilePath(directory);
|
|
102887
102878
|
const state2 = readBoulderState(directory);
|
|
102888
102879
|
if (!state2) {
|
|
102889
|
-
const message =
|
|
102880
|
+
const message = existsSync64(boulderFilePath) ? formatReadErrorMessage(options.json) : formatNoBoulderMessage(options.json);
|
|
102890
102881
|
process.stderr.write(`${message}
|
|
102891
102882
|
`);
|
|
102892
|
-
return
|
|
102883
|
+
return existsSync64(boulderFilePath) ? 2 : 1;
|
|
102893
102884
|
}
|
|
102894
102885
|
const works = getBoulderWorks(state2);
|
|
102895
102886
|
const filteredWorks = options.workId ? works.filter((work) => work.work_id === options.workId) : works;
|
|
@@ -102907,11 +102898,11 @@ async function boulder(options) {
|
|
|
102907
102898
|
}
|
|
102908
102899
|
// packages/omo-opencode/src/cli/codex-ulw-loop.ts
|
|
102909
102900
|
import { spawn as spawn5 } from "node:child_process";
|
|
102910
|
-
import { existsSync as
|
|
102911
|
-
import { homedir as
|
|
102901
|
+
import { existsSync as existsSync65, realpathSync as realpathSync9 } from "node:fs";
|
|
102902
|
+
import { homedir as homedir26 } from "node:os";
|
|
102912
102903
|
function resolveCodexUlwLoopCommand(input = {}) {
|
|
102913
102904
|
const env3 = input.env ?? process.env;
|
|
102914
|
-
const homeDir = input.homeDir ??
|
|
102905
|
+
const homeDir = input.homeDir ?? homedir26();
|
|
102915
102906
|
const localComponentBin = resolveLocalUlwLoopBin(env3, homeDir);
|
|
102916
102907
|
if (localComponentBin !== null)
|
|
102917
102908
|
return { executable: localComponentBin, argsPrefix: [] };
|
|
@@ -102932,22 +102923,22 @@ async function codexUlwLoop(args) {
|
|
|
102932
102923
|
console.error("Codex ulw-loop is not installed. Run: npx lazycodex-ai@latest install --no-tui");
|
|
102933
102924
|
return 1;
|
|
102934
102925
|
}
|
|
102935
|
-
return new Promise((
|
|
102926
|
+
return new Promise((resolve26) => {
|
|
102936
102927
|
const child = spawn5(command.executable, [...command.argsPrefix, ...args], { stdio: "inherit" });
|
|
102937
102928
|
child.on("error", (error51) => {
|
|
102938
102929
|
console.error(error51.message);
|
|
102939
|
-
|
|
102930
|
+
resolve26(1);
|
|
102940
102931
|
});
|
|
102941
|
-
child.on("close", (code) =>
|
|
102932
|
+
child.on("close", (code) => resolve26(code ?? 1));
|
|
102942
102933
|
});
|
|
102943
102934
|
}
|
|
102944
102935
|
function resolveLocalUlwLoopBin(env3, homeDir) {
|
|
102945
102936
|
const candidates = resolveCodexComponentBinCandidates({ executableName: "omo-ulw-loop", env: env3, homeDir });
|
|
102946
|
-
return candidates.find((candidate) =>
|
|
102937
|
+
return candidates.find((candidate) => existsSync65(candidate)) ?? null;
|
|
102947
102938
|
}
|
|
102948
102939
|
function resolveLegacyLocalOmoBin(env3, homeDir, currentExecutablePaths) {
|
|
102949
102940
|
const candidates = resolveCodexComponentBinCandidates({ executableName: "omo", env: env3, homeDir });
|
|
102950
|
-
return candidates.find((candidate) =>
|
|
102941
|
+
return candidates.find((candidate) => existsSync65(candidate) && !isCurrentExecutable(candidate, currentExecutablePaths)) ?? null;
|
|
102951
102942
|
}
|
|
102952
102943
|
function isCurrentExecutable(candidate, currentExecutablePaths) {
|
|
102953
102944
|
const candidateRealPath = realpathOrSelf(candidate);
|
|
@@ -103031,13 +103022,17 @@ var VERSION3 = package_default.version;
|
|
|
103031
103022
|
var program2 = new Command;
|
|
103032
103023
|
function resolveInstallArgs(options, invocationName = process.env.OMO_INVOCATION_NAME) {
|
|
103033
103024
|
const defaultPlatform = invocationName === "lazycodex" || invocationName === "lazycodex-ai" ? "codex" : undefined;
|
|
103025
|
+
const platform = options.platform ?? defaultPlatform;
|
|
103026
|
+
if (platform === "senpi" && !isSenpiPlatformEnabled()) {
|
|
103027
|
+
throw new Error(`The senpi install platform is not available in this release. Set ${SENPI_PLATFORM_ENV_FLAG}=1 to enable it from a source checkout.`);
|
|
103028
|
+
}
|
|
103034
103029
|
return {
|
|
103035
103030
|
tui: options.tui !== false,
|
|
103036
103031
|
claude: options.claude,
|
|
103037
103032
|
openai: options.openai,
|
|
103038
103033
|
gemini: options.gemini,
|
|
103039
103034
|
copilot: options.copilot,
|
|
103040
|
-
platform
|
|
103035
|
+
platform,
|
|
103041
103036
|
opencodeZen: options.opencodeZen,
|
|
103042
103037
|
zaiCodingPlan: options.zaiCodingPlan,
|
|
103043
103038
|
kimiForCoding: options.kimiForCoding,
|
|
@@ -103050,8 +103045,8 @@ function resolveInstallArgs(options, invocationName = process.env.OMO_INVOCATION
|
|
|
103050
103045
|
skipAuth: options.skipAuth ?? false
|
|
103051
103046
|
};
|
|
103052
103047
|
}
|
|
103053
|
-
program2.name("oh-my-opencode").description("The ultimate OpenCode plugin - multi-model orchestration, LSP tools, and more").version(VERSION3, "-v, --version", "Show version number").helpOption("-h, --help", "Display help for command").addOption(new Option("--platform <platform>",
|
|
103054
|
-
program2.command("install").alias("setup").description("Install and configure oh-my-opencode with interactive setup").option("--no-tui", "Run in non-interactive mode (requires all options)").option("--claude <value>", "Claude subscription: no, yes, max20").option("--openai <value>", "OpenAI/ChatGPT subscription: no, yes (default: no)").option("--gemini <value>", "Gemini integration: no, yes").option("--copilot <value>", "GitHub Copilot subscription: no, yes").addOption(new Option("--platform <platform>",
|
|
103048
|
+
program2.name("oh-my-opencode").description("The ultimate OpenCode plugin - multi-model orchestration, LSP tools, and more").version(VERSION3, "-v, --version", "Show version number").helpOption("-h, --help", "Display help for command").addOption(new Option("--platform <platform>", `Install target platform: ${availableInstallPlatforms().join(", ")}`).choices(availableInstallPlatforms()).hideHelp()).enablePositionalOptions();
|
|
103049
|
+
program2.command("install").alias("setup").description("Install and configure oh-my-opencode with interactive setup").option("--no-tui", "Run in non-interactive mode (requires all options)").option("--claude <value>", "Claude subscription: no, yes, max20").option("--openai <value>", "OpenAI/ChatGPT subscription: no, yes (default: no)").option("--gemini <value>", "Gemini integration: no, yes").option("--copilot <value>", "GitHub Copilot subscription: no, yes").addOption(new Option("--platform <platform>", `Install target platform: ${availableInstallPlatforms().join(", ")}`).choices(availableInstallPlatforms())).option("--opencode-zen <value>", "OpenCode Zen access: no, yes (default: no)").option("--zai-coding-plan <value>", "Z.ai Coding Plan subscription: no, yes (default: no)").option("--kimi-for-coding <value>", "Kimi For Coding subscription: no, yes (default: no)").option("--opencode-go <value>", "OpenCode Go subscription: no, yes (default: no)").option("--bailian-coding-plan <value>", "Bailian Coding Plan subscription: no, yes (default: no)").option("--minimax-cn-coding-plan <value>", "MiniMax Coding Plan (minimaxi.com) subscription: no, yes (default: no)").option("--minimax-coding-plan <value>", "MiniMax Coding Plan (minimax.io) subscription: no, yes (default: no)").option("--vercel-ai-gateway <value>", "Vercel AI Gateway: no, yes (default: no)").option("--codex-autonomous", "Configure Codex with approval never, full filesystem access, and network enabled").option("--no-codex-autonomous", "Leave existing Codex permission settings unchanged").option("--skip-auth", "Skip authentication setup hints").addHelpText("after", `
|
|
103055
103050
|
Examples:
|
|
103056
103051
|
$ bunx oh-my-opencode install
|
|
103057
103052
|
$ npx lazycodex-ai install --no-tui
|
|
@@ -103074,7 +103069,7 @@ Model Providers (Priority: Native > Copilot > OpenCode Zen > Z.ai > Kimi > Baili
|
|
|
103074
103069
|
`).action(async (options) => {
|
|
103075
103070
|
const rootOptions = program2.opts();
|
|
103076
103071
|
const args = resolveInstallArgs({ ...options, platform: options.platform ?? rootOptions.platform });
|
|
103077
|
-
const exitCode = await
|
|
103072
|
+
const exitCode = await install3(args);
|
|
103078
103073
|
process.exit(exitCode);
|
|
103079
103074
|
});
|
|
103080
103075
|
configureCleanupCommand(program2);
|