oh-my-opencode 5.0.0-beta.21 → 5.0.0-beta.23
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/index.js +290 -288
- package/dist/cli-node/index.js +290 -288
- package/dist/index.js +1675 -1657
- package/dist/skills/debugging/SKILL.md +2 -0
- package/dist/skills/debugging/references/methodology/00-setup.md +12 -0
- package/dist/skills/debugging/references/methodology/02-investigate.md +21 -0
- package/dist/skills/debugging/references/runtimes/go.md +15 -1
- package/dist/skills/debugging/references/runtimes/native-binary.md +38 -0
- package/dist/skills/debugging/references/runtimes/node.md +25 -0
- package/dist/skills/debugging/references/runtimes/python.md +13 -0
- package/dist/skills/debugging/references/runtimes/rust.md +41 -0
- package/dist/skills/debugging/references/scripts/dap.mjs +267 -0
- package/dist/skills/debugging/references/scripts/dap.test.ts +86 -0
- package/dist/skills/debugging/references/scripts/fixture-adapter.mjs +59 -0
- package/dist/skills/debugging/references/tools/dap.md +103 -0
- package/dist/skills/debugging/references/tools/frida.md +193 -0
- package/dist/tools/delegate-task/types.d.ts +3 -0
- package/dist/tui.js +131 -147
- package/package.json +18 -15
- package/packages/lsp-core/src/index.ts +1 -0
- package/packages/lsp-core/src/lsp/client-wrapper.ts +25 -5
- package/packages/lsp-core/src/lsp/client.ts +26 -0
- package/packages/lsp-core/src/lsp/connection.ts +16 -0
- package/packages/lsp-core/src/lsp/constants.ts +1 -0
- package/packages/lsp-core/src/lsp/format-document.test.ts +143 -0
- package/packages/lsp-core/src/lsp/format-document.ts +90 -0
- package/packages/lsp-core/src/lsp/manager-max-clients.test.ts +151 -0
- package/packages/lsp-core/src/lsp/manager.ts +34 -1
- package/packages/lsp-core/src/lsp/server-definitions.ts +29 -0
- package/packages/lsp-core/src/lsp/server-installation.test.ts +376 -0
- package/packages/lsp-core/src/lsp/server-installation.ts +200 -27
- package/packages/lsp-core/src/lsp/server-resolution-local-binary.test.ts +170 -0
- package/packages/lsp-core/src/lsp/server-resolution.ts +18 -5
- package/packages/lsp-core/src/lsp/transport.ts +9 -0
- package/packages/lsp-core/src/lsp/types.ts +8 -0
- package/packages/lsp-core/src/tool-surface.test.ts +13 -1
- package/packages/lsp-core/src/tools/definitions.ts +14 -0
- package/packages/lsp-core/src/tools/format.test.ts +56 -0
- package/packages/lsp-core/src/tools/format.ts +56 -0
- package/packages/lsp-core/src/tools/index.ts +1 -0
- package/packages/lsp-core/src/tools/types.ts +10 -0
- package/packages/lsp-daemon/dist/cli.js +432 -144
- package/packages/lsp-daemon/dist/client.d.ts +10 -0
- package/packages/lsp-daemon/dist/client.js +401 -107
- package/packages/lsp-daemon/dist/daemon-client.d.ts +1 -0
- package/packages/lsp-daemon/dist/daemon-client.js +3 -0
- package/packages/lsp-daemon/dist/index.js +395 -107
- package/packages/lsp-daemon/package.json +1 -1
- package/packages/lsp-tools-mcp/dist/cli.js +384 -99
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +53 -0
- package/packages/lsp-tools-mcp/dist/mcp.js +384 -99
- package/packages/lsp-tools-mcp/dist/tools.js +385 -99
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +2 -2
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +69 -35
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +21 -2
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +404 -121
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/dist/cli.js +3 -3
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +3 -3
- package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +4 -4
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +30 -15
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +30 -15
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +5 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +11 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +22 -10
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +5 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +13 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +3 -5
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +26 -2
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/model-catalog.json +3 -3
- 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/migrate-codex-config/catalog.mjs +3 -3
- package/packages/omo-codex/plugin/skills/debugging/SKILL.md +2 -0
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/00-setup.md +12 -0
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/02-investigate.md +21 -0
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/go.md +15 -1
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/native-binary.md +38 -0
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/node.md +25 -0
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/python.md +13 -0
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/rust.md +41 -0
- package/packages/omo-codex/plugin/skills/debugging/references/scripts/dap.mjs +267 -0
- package/packages/omo-codex/plugin/skills/debugging/references/scripts/fixture-adapter.mjs +59 -0
- package/packages/omo-codex/plugin/skills/debugging/references/tools/dap.md +103 -0
- package/packages/omo-codex/plugin/skills/debugging/references/tools/frida.md +193 -0
- package/packages/omo-codex/plugin/test/aggregate-model-catalog.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +2 -2
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +8 -8
- package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +2 -2
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +38 -23
- package/packages/shared-skills/skills/debugging/SKILL.md +2 -0
- package/packages/shared-skills/skills/debugging/references/methodology/00-setup.md +12 -0
- package/packages/shared-skills/skills/debugging/references/methodology/02-investigate.md +21 -0
- package/packages/shared-skills/skills/debugging/references/runtimes/go.md +15 -1
- package/packages/shared-skills/skills/debugging/references/runtimes/native-binary.md +38 -0
- package/packages/shared-skills/skills/debugging/references/runtimes/node.md +25 -0
- package/packages/shared-skills/skills/debugging/references/runtimes/python.md +13 -0
- package/packages/shared-skills/skills/debugging/references/runtimes/rust.md +41 -0
- package/packages/shared-skills/skills/debugging/references/scripts/dap.mjs +267 -0
- package/packages/shared-skills/skills/debugging/references/scripts/dap.test.ts +86 -0
- package/packages/shared-skills/skills/debugging/references/scripts/fixture-adapter.mjs +59 -0
- package/packages/shared-skills/skills/debugging/references/tools/dap.md +103 -0
- package/packages/shared-skills/skills/debugging/references/tools/frida.md +193 -0
package/dist/cli-node/index.js
CHANGED
|
@@ -55,7 +55,7 @@ var package_default;
|
|
|
55
55
|
var init_package = __esm(() => {
|
|
56
56
|
package_default = {
|
|
57
57
|
name: "oh-my-opencode",
|
|
58
|
-
version: "5.0.0-beta.
|
|
58
|
+
version: "5.0.0-beta.23",
|
|
59
59
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
60
60
|
main: "./dist/index.js",
|
|
61
61
|
types: "dist/index.d.ts",
|
|
@@ -236,7 +236,7 @@ var init_package = __esm(() => {
|
|
|
236
236
|
zod: "^4.4.3"
|
|
237
237
|
},
|
|
238
238
|
devDependencies: {
|
|
239
|
-
"@code-yeongyu/senpi": "2026.8.
|
|
239
|
+
"@code-yeongyu/senpi": "2026.8.27",
|
|
240
240
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
241
241
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
242
242
|
"@oh-my-opencode/boulder-state": "workspace:*",
|
|
@@ -277,18 +277,18 @@ var init_package = __esm(() => {
|
|
|
277
277
|
typescript: "^7.0.2"
|
|
278
278
|
},
|
|
279
279
|
optionalDependencies: {
|
|
280
|
-
"oh-my-opencode-darwin-arm64": "5.0.0-beta.
|
|
281
|
-
"oh-my-opencode-darwin-x64": "5.0.0-beta.
|
|
282
|
-
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.
|
|
283
|
-
"oh-my-opencode-linux-arm64": "5.0.0-beta.
|
|
284
|
-
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.
|
|
285
|
-
"oh-my-opencode-linux-x64": "5.0.0-beta.
|
|
286
|
-
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.
|
|
287
|
-
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.
|
|
288
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.
|
|
289
|
-
"oh-my-opencode-windows-arm64": "5.0.0-beta.
|
|
290
|
-
"oh-my-opencode-windows-x64": "5.0.0-beta.
|
|
291
|
-
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.
|
|
280
|
+
"oh-my-opencode-darwin-arm64": "5.0.0-beta.23",
|
|
281
|
+
"oh-my-opencode-darwin-x64": "5.0.0-beta.23",
|
|
282
|
+
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.23",
|
|
283
|
+
"oh-my-opencode-linux-arm64": "5.0.0-beta.23",
|
|
284
|
+
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.23",
|
|
285
|
+
"oh-my-opencode-linux-x64": "5.0.0-beta.23",
|
|
286
|
+
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.23",
|
|
287
|
+
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.23",
|
|
288
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.23",
|
|
289
|
+
"oh-my-opencode-windows-arm64": "5.0.0-beta.23",
|
|
290
|
+
"oh-my-opencode-windows-x64": "5.0.0-beta.23",
|
|
291
|
+
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.23"
|
|
292
292
|
},
|
|
293
293
|
overrides: {
|
|
294
294
|
"@earendil-works/pi-agent-core": "0.84.2",
|
|
@@ -304,7 +304,10 @@ var init_package = __esm(() => {
|
|
|
304
304
|
},
|
|
305
305
|
trustedDependencies: [
|
|
306
306
|
"@code-yeongyu/comment-checker"
|
|
307
|
-
]
|
|
307
|
+
],
|
|
308
|
+
patchedDependencies: {
|
|
309
|
+
"@code-yeongyu/senpi@2026.8.27": "patches/@code-yeongyu%2Fsenpi@2026.8.27.patch"
|
|
310
|
+
}
|
|
308
311
|
};
|
|
309
312
|
});
|
|
310
313
|
|
|
@@ -4814,9 +4817,12 @@ import {
|
|
|
4814
4817
|
fsyncSync,
|
|
4815
4818
|
openSync,
|
|
4816
4819
|
renameSync,
|
|
4820
|
+
rmSync,
|
|
4817
4821
|
unlinkSync,
|
|
4818
4822
|
writeFileSync
|
|
4819
4823
|
} from "node:fs";
|
|
4824
|
+
import { randomUUID } from "node:crypto";
|
|
4825
|
+
import { dirname } from "node:path";
|
|
4820
4826
|
function isToleratedFsyncError(error) {
|
|
4821
4827
|
if (!(error instanceof Error))
|
|
4822
4828
|
return false;
|
|
@@ -4832,24 +4838,36 @@ function tolerantFsyncSync(fileDescriptor, fsyncImpl) {
|
|
|
4832
4838
|
}
|
|
4833
4839
|
}
|
|
4834
4840
|
function writeFileAtomically(filePath, content, options = {}) {
|
|
4835
|
-
const
|
|
4836
|
-
|
|
4837
|
-
const
|
|
4838
|
-
try {
|
|
4839
|
-
tolerantFsyncSync(tempFileDescriptor, options.fsyncSync ?? fsyncSync);
|
|
4840
|
-
} finally {
|
|
4841
|
-
closeSync(tempFileDescriptor);
|
|
4842
|
-
}
|
|
4841
|
+
const platform = options.platform ?? process.platform;
|
|
4842
|
+
const fsyncImpl = options.fsyncSync ?? fsyncSync;
|
|
4843
|
+
const tempPath = `${filePath}.${process.pid}.${randomUUID()}.tmp`;
|
|
4843
4844
|
try {
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4845
|
+
writeFileSync(tempPath, content, "utf-8");
|
|
4846
|
+
const tempFileDescriptor = openSync(tempPath, "r+");
|
|
4847
|
+
try {
|
|
4848
|
+
tolerantFsyncSync(tempFileDescriptor, fsyncImpl);
|
|
4849
|
+
} finally {
|
|
4850
|
+
closeSync(tempFileDescriptor);
|
|
4851
|
+
}
|
|
4852
|
+
try {
|
|
4853
|
+
renameSync(tempPath, filePath);
|
|
4854
|
+
} catch (error) {
|
|
4855
|
+
const isPermissionError = error instanceof Error && (error.message.includes("EPERM") || error.message.includes("EACCES"));
|
|
4856
|
+
if (platform !== "win32" || !isPermissionError)
|
|
4857
|
+
throw error;
|
|
4848
4858
|
unlinkSync(filePath);
|
|
4849
4859
|
renameSync(tempPath, filePath);
|
|
4860
|
+
}
|
|
4861
|
+
if (platform === "win32")
|
|
4850
4862
|
return;
|
|
4863
|
+
const directoryFileDescriptor = openSync(dirname(filePath), "r");
|
|
4864
|
+
try {
|
|
4865
|
+
tolerantFsyncSync(directoryFileDescriptor, fsyncImpl);
|
|
4866
|
+
} finally {
|
|
4867
|
+
closeSync(directoryFileDescriptor);
|
|
4851
4868
|
}
|
|
4852
|
-
|
|
4869
|
+
} finally {
|
|
4870
|
+
rmSync(tempPath, { force: true });
|
|
4853
4871
|
}
|
|
4854
4872
|
}
|
|
4855
4873
|
var TOLERATED_FSYNC_CODES;
|
|
@@ -20555,6 +20573,25 @@ var init_telemetry = __esm(() => {
|
|
|
20555
20573
|
}).strict();
|
|
20556
20574
|
});
|
|
20557
20575
|
|
|
20576
|
+
// packages/omo-config-core/src/schema/format-on-mutation.ts
|
|
20577
|
+
var mode, languages, OmoFormatOnMutationLayerSchema, OmoFormatOnMutationSchema;
|
|
20578
|
+
var init_format_on_mutation = __esm(() => {
|
|
20579
|
+
init_zod();
|
|
20580
|
+
mode = _enum2(["off", "best-effort", "required"]);
|
|
20581
|
+
languages = record(string2(), boolean2()).optional();
|
|
20582
|
+
OmoFormatOnMutationLayerSchema = object({
|
|
20583
|
+
mode: mode.optional(),
|
|
20584
|
+
languages,
|
|
20585
|
+
maxFileBytes: number2().int().positive().optional(),
|
|
20586
|
+
timeoutMs: number2().int().positive().optional()
|
|
20587
|
+
}).strict();
|
|
20588
|
+
OmoFormatOnMutationSchema = OmoFormatOnMutationLayerSchema.extend({
|
|
20589
|
+
mode: mode.default("best-effort"),
|
|
20590
|
+
maxFileBytes: number2().int().positive().default(1048576),
|
|
20591
|
+
timeoutMs: number2().int().positive().default(3000)
|
|
20592
|
+
}).strict();
|
|
20593
|
+
});
|
|
20594
|
+
|
|
20558
20595
|
// packages/omo-config-core/src/schema/config.ts
|
|
20559
20596
|
var OmoOpenCodeHarnessConfigSchema, OmoTypedHarnessConfigSchema, OmoConfigProfileSchema, OmoConfigSchema, OmoConfigLayerSchema;
|
|
20560
20597
|
var init_config = __esm(() => {
|
|
@@ -20568,8 +20605,10 @@ var init_config = __esm(() => {
|
|
|
20568
20605
|
init_task();
|
|
20569
20606
|
init_team();
|
|
20570
20607
|
init_telemetry();
|
|
20608
|
+
init_format_on_mutation();
|
|
20571
20609
|
OmoOpenCodeHarnessConfigSchema = record(string2(), unknown());
|
|
20572
20610
|
OmoTypedHarnessConfigSchema = object({
|
|
20611
|
+
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
20573
20612
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20574
20613
|
agents: OmoAgentsConfigSchema.optional(),
|
|
20575
20614
|
codegraph: OmoCodegraphSettingsLayerSchema.optional(),
|
|
@@ -20581,6 +20620,7 @@ var init_config = __esm(() => {
|
|
|
20581
20620
|
telemetry: OmoTelemetrySettingsLayerSchema.optional()
|
|
20582
20621
|
}).strict();
|
|
20583
20622
|
OmoConfigProfileSchema = object({
|
|
20623
|
+
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
20584
20624
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20585
20625
|
agents: OmoAgentsConfigSchema.optional(),
|
|
20586
20626
|
codegraph: OmoCodegraphSettingsLayerSchema.optional(),
|
|
@@ -20595,6 +20635,7 @@ var init_config = __esm(() => {
|
|
|
20595
20635
|
"[codex]": OmoTypedHarnessConfigSchema.optional()
|
|
20596
20636
|
}).strict();
|
|
20597
20637
|
OmoConfigSchema = object({
|
|
20638
|
+
formatOnMutation: OmoFormatOnMutationSchema.optional(),
|
|
20598
20639
|
$schema: string2().optional(),
|
|
20599
20640
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20600
20641
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -20613,6 +20654,7 @@ var init_config = __esm(() => {
|
|
|
20613
20654
|
legacy_migrations: record(string2(), unknown()).optional()
|
|
20614
20655
|
}).strict();
|
|
20615
20656
|
OmoConfigLayerSchema = object({
|
|
20657
|
+
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
20616
20658
|
$schema: string2().optional(),
|
|
20617
20659
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20618
20660
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -20639,6 +20681,7 @@ var init_schema = __esm(() => {
|
|
|
20639
20681
|
init_codegraph();
|
|
20640
20682
|
init_config();
|
|
20641
20683
|
init_fallback_models();
|
|
20684
|
+
init_format_on_mutation();
|
|
20642
20685
|
init_git_master();
|
|
20643
20686
|
init_harness();
|
|
20644
20687
|
init_memory();
|
|
@@ -20708,7 +20751,7 @@ var init_types = __esm(() => {
|
|
|
20708
20751
|
|
|
20709
20752
|
// packages/omo-config-core/src/loader/paths.ts
|
|
20710
20753
|
import { userInfo } from "node:os";
|
|
20711
|
-
import { dirname, join as join3, posix, resolve } from "node:path";
|
|
20754
|
+
import { dirname as dirname2, join as join3, posix, resolve } from "node:path";
|
|
20712
20755
|
function resolveHomeDir(env = process.env) {
|
|
20713
20756
|
const homeDir = env.HOME ?? env.USERPROFILE ?? process.cwd();
|
|
20714
20757
|
return homeDir.startsWith("/") ? posix.resolve(homeDir) : toPosixPath(resolve(homeDir));
|
|
@@ -20773,7 +20816,7 @@ function findProjectConfigPathsFarthestFirst(cwd, homeDir, fileSystem, accountHo
|
|
|
20773
20816
|
nearestFirst.push(configPath);
|
|
20774
20817
|
if (isHomeDir)
|
|
20775
20818
|
break;
|
|
20776
|
-
const parentDir =
|
|
20819
|
+
const parentDir = dirname2(currentDir);
|
|
20777
20820
|
if (parentDir === currentDir)
|
|
20778
20821
|
break;
|
|
20779
20822
|
currentDir = parentDir;
|
|
@@ -21213,8 +21256,8 @@ var init_jsonc_parse = __esm(() => {
|
|
|
21213
21256
|
});
|
|
21214
21257
|
|
|
21215
21258
|
// packages/omo-config-core/src/writer/writer.ts
|
|
21216
|
-
import { randomUUID } from "node:crypto";
|
|
21217
|
-
import { dirname as
|
|
21259
|
+
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
21260
|
+
import { dirname as dirname3, join as join4, posix as posix2 } from "node:path";
|
|
21218
21261
|
function backupSuffix() {
|
|
21219
21262
|
return new Date().toISOString().replace(/[:.]/g, "-");
|
|
21220
21263
|
}
|
|
@@ -21247,20 +21290,20 @@ function resolveWritePath(options) {
|
|
|
21247
21290
|
const jsoncPath2 = resolveUserOmoConfigPath(options.env);
|
|
21248
21291
|
if (fileSystem.existsSync(jsoncPath2))
|
|
21249
21292
|
return jsoncPath2;
|
|
21250
|
-
const jsonPath2 = join4(
|
|
21293
|
+
const jsonPath2 = join4(dirname3(jsoncPath2), "omo.json");
|
|
21251
21294
|
return fileSystem.existsSync(jsonPath2) ? jsonPath2 : jsoncPath2;
|
|
21252
21295
|
}
|
|
21253
21296
|
const jsoncPath = join4(options.projectDir ?? process.cwd(), ".omo", "omo.jsonc");
|
|
21254
21297
|
if (fileSystem.existsSync(jsoncPath))
|
|
21255
21298
|
return jsoncPath;
|
|
21256
|
-
const jsonPath = join4(
|
|
21299
|
+
const jsonPath = join4(dirname3(jsoncPath), "omo.json");
|
|
21257
21300
|
return fileSystem.existsSync(jsonPath) ? jsonPath : jsoncPath;
|
|
21258
21301
|
}
|
|
21259
21302
|
function directoryPath(path4) {
|
|
21260
|
-
return path4.startsWith("/") ? posix2.dirname(path4) :
|
|
21303
|
+
return path4.startsWith("/") ? posix2.dirname(path4) : dirname3(path4);
|
|
21261
21304
|
}
|
|
21262
21305
|
function writeAtomically(path4, content, fileSystem) {
|
|
21263
|
-
const tempPath = `${path4}.${
|
|
21306
|
+
const tempPath = `${path4}.${randomUUID2()}.tmp`;
|
|
21264
21307
|
let tempCreated = false;
|
|
21265
21308
|
try {
|
|
21266
21309
|
fileSystem.writeFileExclusiveSync(tempPath, content);
|
|
@@ -21543,7 +21586,7 @@ var init_types3 = __esm(() => {
|
|
|
21543
21586
|
});
|
|
21544
21587
|
|
|
21545
21588
|
// packages/omo-config-core/src/migration/commit.ts
|
|
21546
|
-
import { basename, dirname as
|
|
21589
|
+
import { basename, dirname as dirname4, join as join5, resolve as resolve2 } from "node:path";
|
|
21547
21590
|
function parseDocument(path4, content) {
|
|
21548
21591
|
const parsed = parseJsoncSafe2(content);
|
|
21549
21592
|
if (parsed.errors.length > 0 || !isPlainObject5(parsed.data)) {
|
|
@@ -21577,11 +21620,11 @@ function writerInput(targetPath, env) {
|
|
|
21577
21620
|
const homeDir = resolveHomeDir(env);
|
|
21578
21621
|
const userDirectory = toPosixPath(join5(homeDir, ".omo"));
|
|
21579
21622
|
const fileName = basename(targetPath);
|
|
21580
|
-
if (toPosixPath(
|
|
21623
|
+
if (toPosixPath(dirname4(targetPath)) === userDirectory && (fileName === "omo.json" || fileName === "omo.jsonc")) {
|
|
21581
21624
|
return { scope: "user" };
|
|
21582
21625
|
}
|
|
21583
|
-
if (basename(
|
|
21584
|
-
return { projectDir:
|
|
21626
|
+
if (basename(dirname4(targetPath)) === ".omo" && (fileName === "omo.json" || fileName === "omo.jsonc")) {
|
|
21627
|
+
return { projectDir: dirname4(dirname4(targetPath)), scope: "project" };
|
|
21585
21628
|
}
|
|
21586
21629
|
throw new MigrationTransactionError(`Migration target is not an omo config path: ${targetPath}`);
|
|
21587
21630
|
}
|
|
@@ -21944,7 +21987,7 @@ var init_recovery = __esm(() => {
|
|
|
21944
21987
|
});
|
|
21945
21988
|
|
|
21946
21989
|
// packages/omo-config-core/src/migration/batch.ts
|
|
21947
|
-
import { dirname as
|
|
21990
|
+
import { dirname as dirname5, posix as posix3 } from "node:path";
|
|
21948
21991
|
function parseSource(path4, content) {
|
|
21949
21992
|
const parsed = parseJsoncSafe2(content);
|
|
21950
21993
|
if (parsed.errors.length > 0) {
|
|
@@ -21993,7 +22036,7 @@ function assertSafeSourcePaths(sources, protectedPaths) {
|
|
|
21993
22036
|
}
|
|
21994
22037
|
}
|
|
21995
22038
|
function directoryPath2(path4) {
|
|
21996
|
-
return path4.startsWith("/") ? posix3.dirname(path4) :
|
|
22039
|
+
return path4.startsWith("/") ? posix3.dirname(path4) : dirname5(path4);
|
|
21997
22040
|
}
|
|
21998
22041
|
function ensureBackupDirectories(moves, fileSystem) {
|
|
21999
22042
|
for (const move of moves)
|
|
@@ -22624,7 +22667,7 @@ var init_process_sweep = () => {};
|
|
|
22624
22667
|
// packages/utils/src/codegraph/resolve.ts
|
|
22625
22668
|
import { existsSync as existsSync7 } from "node:fs";
|
|
22626
22669
|
import { spawnSync } from "node:child_process";
|
|
22627
|
-
import { basename as basename2, dirname as
|
|
22670
|
+
import { basename as basename2, dirname as dirname6, join as join10 } from "node:path";
|
|
22628
22671
|
import { createRequire as createRequire2 } from "node:module";
|
|
22629
22672
|
function defaultNodeVersion(nodePath) {
|
|
22630
22673
|
if (nodePath === process.execPath && isNodeExecutableName(nodePath))
|
|
@@ -23963,27 +24006,20 @@ var init_agent_model_requirements = __esm(() => {
|
|
|
23963
24006
|
sisyphus: {
|
|
23964
24007
|
fallbackChain: [
|
|
23965
24008
|
{
|
|
23966
|
-
providers: ["anthropic", "github-copilot", "opencode"
|
|
24009
|
+
providers: ["anthropic", "github-copilot", "opencode"],
|
|
23967
24010
|
model: "claude-opus-5",
|
|
23968
24011
|
variant: "max"
|
|
23969
24012
|
},
|
|
23970
24013
|
{
|
|
23971
|
-
providers: [
|
|
23972
|
-
"opencode-go",
|
|
23973
|
-
"kimi-for-coding",
|
|
23974
|
-
"moonshotai",
|
|
23975
|
-
"opencode",
|
|
23976
|
-
"vercel",
|
|
23977
|
-
"bailian-coding-plan",
|
|
23978
|
-
"moonshotai-cn",
|
|
23979
|
-
"firmware",
|
|
23980
|
-
"ollama-cloud",
|
|
23981
|
-
"aihubmix"
|
|
23982
|
-
],
|
|
24014
|
+
providers: ["opencode-go", "kimi-for-coding", "moonshotai", "opencode", "bailian-coding-plan", "moonshotai-cn", "firmware", "ollama-cloud", "aihubmix"],
|
|
23983
24015
|
model: "kimi-k3"
|
|
23984
24016
|
},
|
|
23985
|
-
{
|
|
23986
|
-
|
|
24017
|
+
{
|
|
24018
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
24019
|
+
model: "gpt-5.6-sol",
|
|
24020
|
+
variant: "medium"
|
|
24021
|
+
},
|
|
24022
|
+
{ providers: ["zai-coding-plan", "opencode", "bailian-coding-plan"], model: "glm-5.2" },
|
|
23987
24023
|
{ providers: ["opencode"], model: "big-pickle" }
|
|
23988
24024
|
],
|
|
23989
24025
|
requiresAnyModel: true
|
|
@@ -23991,154 +24027,136 @@ var init_agent_model_requirements = __esm(() => {
|
|
|
23991
24027
|
hephaestus: {
|
|
23992
24028
|
fallbackChain: [
|
|
23993
24029
|
{
|
|
23994
|
-
providers: ["openai", "
|
|
24030
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
23995
24031
|
model: "gpt-5.6-sol",
|
|
23996
24032
|
variant: "medium"
|
|
23997
24033
|
}
|
|
23998
24034
|
],
|
|
23999
|
-
requiresProvider: ["openai", "
|
|
24035
|
+
requiresProvider: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
24000
24036
|
requiresAnyModel: true
|
|
24001
24037
|
},
|
|
24002
24038
|
oracle: {
|
|
24003
24039
|
fallbackChain: [
|
|
24040
|
+
{ providers: ["openai", "openai-codex", "opencode"], model: "gpt-5.6-sol", variant: "xhigh" },
|
|
24041
|
+
{ providers: ["github-copilot"], model: "gpt-5.6-sol", variant: "high" },
|
|
24004
24042
|
{
|
|
24005
|
-
providers: ["
|
|
24006
|
-
model: "gpt-5.6-sol",
|
|
24007
|
-
variant: "xhigh"
|
|
24008
|
-
},
|
|
24009
|
-
{
|
|
24010
|
-
providers: ["github-copilot"],
|
|
24011
|
-
model: "gpt-5.6-sol",
|
|
24012
|
-
variant: "high"
|
|
24013
|
-
},
|
|
24014
|
-
{
|
|
24015
|
-
providers: ["google", "github-copilot", "opencode", "vercel"],
|
|
24043
|
+
providers: ["google", "github-copilot", "opencode"],
|
|
24016
24044
|
model: "gemini-3.1-pro",
|
|
24017
24045
|
variant: "high"
|
|
24018
24046
|
},
|
|
24019
24047
|
{
|
|
24020
|
-
providers: ["anthropic", "github-copilot", "opencode"
|
|
24048
|
+
providers: ["anthropic", "github-copilot", "opencode"],
|
|
24021
24049
|
model: "claude-opus-5",
|
|
24022
24050
|
variant: "max"
|
|
24023
24051
|
},
|
|
24024
|
-
{ providers: ["opencode-go"
|
|
24052
|
+
{ providers: ["opencode-go"], model: "glm-5.2" }
|
|
24025
24053
|
]
|
|
24026
24054
|
},
|
|
24027
24055
|
librarian: {
|
|
24028
24056
|
fallbackChain: [
|
|
24029
|
-
{ providers: ["openai"], model: "gpt-5.6-luna-fast", variant: "low" },
|
|
24057
|
+
{ providers: ["openai", "openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
|
|
24030
24058
|
{ providers: ["deepseek"], model: "deepseek-v4-flash", variant: "max" },
|
|
24031
24059
|
{ providers: ["opencode-go", "bailian-coding-plan"], model: "qwen3.7-plus" },
|
|
24032
|
-
{ providers: ["
|
|
24033
|
-
{ providers: ["opencode-go", "vercel"], model: "minimax-m3" },
|
|
24060
|
+
{ providers: ["opencode-go"], model: "minimax-m3" },
|
|
24034
24061
|
{ providers: ["minimax-coding-plan", "minimax-cn-coding-plan"], model: "MiniMax-M3" },
|
|
24035
|
-
{ providers: ["opencode-go"
|
|
24036
|
-
{ providers: ["anthropic", "github-copilot"
|
|
24037
|
-
{ providers: ["openai", "
|
|
24062
|
+
{ providers: ["opencode-go"], model: "minimax-m2.7" },
|
|
24063
|
+
{ providers: ["anthropic", "github-copilot"], model: "claude-haiku-4-5" },
|
|
24064
|
+
{ providers: ["openai", "openai-codex"], model: "gpt-5.4-nano" }
|
|
24038
24065
|
]
|
|
24039
24066
|
},
|
|
24040
24067
|
explore: {
|
|
24041
24068
|
fallbackChain: [
|
|
24042
|
-
{ providers: ["openai"], model: "gpt-5.6-luna-fast", variant: "low" },
|
|
24069
|
+
{ providers: ["openai", "openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
|
|
24043
24070
|
{ providers: ["deepseek"], model: "deepseek-v4-flash", variant: "max" },
|
|
24044
24071
|
{ providers: ["opencode-go", "bailian-coding-plan"], model: "qwen3.7-plus" },
|
|
24045
|
-
{ providers: ["
|
|
24046
|
-
{ providers: ["opencode-go", "vercel"], model: "minimax-m3" },
|
|
24072
|
+
{ providers: ["opencode-go"], model: "minimax-m3" },
|
|
24047
24073
|
{ providers: ["minimax-coding-plan", "minimax-cn-coding-plan"], model: "MiniMax-M3" },
|
|
24048
|
-
{ providers: ["opencode-go"
|
|
24049
|
-
{ providers: ["anthropic", "github-copilot"
|
|
24050
|
-
{ providers: ["openai", "
|
|
24074
|
+
{ providers: ["opencode-go"], model: "minimax-m2.7" },
|
|
24075
|
+
{ providers: ["anthropic", "github-copilot"], model: "claude-haiku-4-5" },
|
|
24076
|
+
{ providers: ["openai", "openai-codex"], model: "gpt-5.4-nano" }
|
|
24051
24077
|
]
|
|
24052
24078
|
},
|
|
24053
24079
|
"multimodal-looker": {
|
|
24054
24080
|
fallbackChain: [
|
|
24055
|
-
{ providers: ["openai", "
|
|
24056
|
-
{ providers: ["opencode-go"
|
|
24057
|
-
{ providers: ["zai-coding-plan"
|
|
24058
|
-
{ providers: ["openai", "
|
|
24081
|
+
{ providers: ["openai", "openai-codex", "opencode"], model: "gpt-5.6-sol", variant: "low" },
|
|
24082
|
+
{ providers: ["opencode-go"], model: "kimi-k3" },
|
|
24083
|
+
{ providers: ["zai-coding-plan"], model: "glm-4.6v" },
|
|
24084
|
+
{ providers: ["openai", "openai-codex", "github-copilot", "opencode"], model: "gpt-5-nano" }
|
|
24059
24085
|
]
|
|
24060
24086
|
},
|
|
24061
24087
|
prometheus: {
|
|
24062
24088
|
fallbackChain: [
|
|
24063
24089
|
{
|
|
24064
|
-
providers: ["anthropic", "github-copilot", "opencode"
|
|
24090
|
+
providers: ["anthropic", "github-copilot", "opencode"],
|
|
24065
24091
|
model: "claude-fable-5",
|
|
24066
24092
|
variant: "xhigh"
|
|
24067
24093
|
},
|
|
24068
|
-
{
|
|
24094
|
+
{
|
|
24095
|
+
providers: ["opencode-go", "kimi-for-coding", "moonshotai", "opencode"],
|
|
24096
|
+
model: "kimi-k3",
|
|
24097
|
+
variant: "max"
|
|
24098
|
+
}
|
|
24069
24099
|
]
|
|
24070
24100
|
},
|
|
24071
24101
|
metis: {
|
|
24072
24102
|
fallbackChain: [
|
|
24073
24103
|
{
|
|
24074
|
-
providers: ["anthropic", "github-copilot", "opencode"
|
|
24104
|
+
providers: ["anthropic", "github-copilot", "opencode"],
|
|
24075
24105
|
model: "claude-opus-5",
|
|
24076
24106
|
variant: "high"
|
|
24077
24107
|
},
|
|
24078
|
-
{
|
|
24108
|
+
{
|
|
24109
|
+
providers: ["opencode-go", "kimi-for-coding", "moonshotai", "opencode"],
|
|
24110
|
+
model: "kimi-k3",
|
|
24111
|
+
variant: "low"
|
|
24112
|
+
}
|
|
24079
24113
|
]
|
|
24080
24114
|
},
|
|
24081
24115
|
momus: {
|
|
24082
24116
|
fallbackChain: [
|
|
24117
|
+
{ providers: ["openai", "openai-codex"], model: "gpt-5.6-terra", variant: "high" },
|
|
24118
|
+
{ providers: ["github-copilot"], model: "gpt-5.6-terra", variant: "high" },
|
|
24119
|
+
{ providers: ["openai", "openai-codex", "opencode"], model: "gpt-5.6-sol", variant: "xhigh" },
|
|
24120
|
+
{ providers: ["github-copilot"], model: "gpt-5.6-sol", variant: "high" },
|
|
24083
24121
|
{
|
|
24084
|
-
providers: ["
|
|
24085
|
-
model: "gpt-5.6-terra",
|
|
24086
|
-
variant: "high"
|
|
24087
|
-
},
|
|
24088
|
-
{
|
|
24089
|
-
providers: ["github-copilot"],
|
|
24090
|
-
model: "gpt-5.6-terra",
|
|
24091
|
-
variant: "high"
|
|
24092
|
-
},
|
|
24093
|
-
{
|
|
24094
|
-
providers: ["openai", "opencode", "vercel"],
|
|
24095
|
-
model: "gpt-5.6-sol",
|
|
24096
|
-
variant: "xhigh"
|
|
24097
|
-
},
|
|
24098
|
-
{
|
|
24099
|
-
providers: ["github-copilot"],
|
|
24100
|
-
model: "gpt-5.6-sol",
|
|
24101
|
-
variant: "high"
|
|
24102
|
-
},
|
|
24103
|
-
{
|
|
24104
|
-
providers: ["anthropic", "github-copilot", "opencode", "vercel"],
|
|
24122
|
+
providers: ["anthropic", "github-copilot", "opencode"],
|
|
24105
24123
|
model: "claude-opus-5",
|
|
24106
24124
|
variant: "max"
|
|
24107
24125
|
},
|
|
24108
24126
|
{
|
|
24109
|
-
providers: ["google", "github-copilot", "opencode"
|
|
24127
|
+
providers: ["google", "github-copilot", "opencode"],
|
|
24110
24128
|
model: "gemini-3.1-pro",
|
|
24111
24129
|
variant: "high"
|
|
24112
24130
|
},
|
|
24113
|
-
{ providers: ["opencode-go"
|
|
24131
|
+
{ providers: ["opencode-go"], model: "glm-5.2" }
|
|
24114
24132
|
]
|
|
24115
24133
|
},
|
|
24116
24134
|
atlas: {
|
|
24117
24135
|
fallbackChain: [
|
|
24118
|
-
{ providers: ["anthropic", "github-copilot", "opencode"
|
|
24119
|
-
{ providers: ["opencode-go"
|
|
24136
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-5" },
|
|
24137
|
+
{ providers: ["opencode-go"], model: "kimi-k3" },
|
|
24120
24138
|
{
|
|
24121
|
-
providers: ["openai", "
|
|
24139
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
24122
24140
|
model: "gpt-5.6-sol",
|
|
24123
24141
|
variant: "medium"
|
|
24124
24142
|
},
|
|
24125
|
-
{ providers: ["opencode-go"
|
|
24143
|
+
{ providers: ["opencode-go"], model: "minimax-m3" },
|
|
24126
24144
|
{ providers: ["minimax-coding-plan", "minimax-cn-coding-plan"], model: "MiniMax-M3" },
|
|
24127
|
-
{ providers: ["opencode-go"
|
|
24145
|
+
{ providers: ["opencode-go"], model: "minimax-m2.7" }
|
|
24128
24146
|
]
|
|
24129
24147
|
},
|
|
24130
24148
|
"sisyphus-junior": {
|
|
24131
24149
|
fallbackChain: [
|
|
24132
|
-
{ providers: ["anthropic", "github-copilot", "opencode"
|
|
24133
|
-
{ providers: ["opencode-go"
|
|
24150
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-5" },
|
|
24151
|
+
{ providers: ["opencode-go"], model: "kimi-k3" },
|
|
24134
24152
|
{
|
|
24135
|
-
providers: ["openai", "
|
|
24153
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
24136
24154
|
model: "gpt-5.6-sol",
|
|
24137
24155
|
variant: "medium"
|
|
24138
24156
|
},
|
|
24139
|
-
{ providers: ["opencode-go"
|
|
24157
|
+
{ providers: ["opencode-go"], model: "minimax-m3" },
|
|
24140
24158
|
{ providers: ["minimax-coding-plan", "minimax-cn-coding-plan"], model: "MiniMax-M3" },
|
|
24141
|
-
{ providers: ["opencode-go"
|
|
24159
|
+
{ providers: ["opencode-go"], model: "minimax-m2.7" },
|
|
24142
24160
|
{ providers: ["opencode"], model: "big-pickle" }
|
|
24143
24161
|
]
|
|
24144
24162
|
}
|
|
@@ -24152,22 +24170,18 @@ var init_category_model_requirements = __esm(() => {
|
|
|
24152
24170
|
"visual-engineering": {
|
|
24153
24171
|
fallbackChain: [
|
|
24154
24172
|
{
|
|
24155
|
-
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"
|
|
24173
|
+
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
24156
24174
|
model: "claude-opus-5",
|
|
24157
24175
|
variant: "max"
|
|
24158
24176
|
},
|
|
24159
24177
|
{
|
|
24160
|
-
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"
|
|
24178
|
+
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
|
|
24161
24179
|
model: "kimi-k3",
|
|
24162
24180
|
variant: "max"
|
|
24163
24181
|
},
|
|
24182
|
+
{ providers: ["zai-coding-plan", "opencode-go"], model: "glm-5.2", variant: "max" },
|
|
24164
24183
|
{
|
|
24165
|
-
providers: ["
|
|
24166
|
-
model: "glm-5.2",
|
|
24167
|
-
variant: "max"
|
|
24168
|
-
},
|
|
24169
|
-
{
|
|
24170
|
-
providers: ["openai", "quotio-openai", "github-copilot", "opencode", "vercel"],
|
|
24184
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
24171
24185
|
model: "gpt-5.6-sol",
|
|
24172
24186
|
variant: "medium"
|
|
24173
24187
|
}
|
|
@@ -24175,27 +24189,15 @@ var init_category_model_requirements = __esm(() => {
|
|
|
24175
24189
|
},
|
|
24176
24190
|
ultrabrain: {
|
|
24177
24191
|
fallbackChain: [
|
|
24178
|
-
{
|
|
24179
|
-
|
|
24180
|
-
|
|
24181
|
-
variant: "max"
|
|
24182
|
-
},
|
|
24183
|
-
{
|
|
24184
|
-
providers: ["github-copilot"],
|
|
24185
|
-
model: "gpt-5.6-sol",
|
|
24186
|
-
variant: "max"
|
|
24187
|
-
},
|
|
24188
|
-
{
|
|
24189
|
-
providers: ["openai", "opencode", "vercel"],
|
|
24190
|
-
model: "gpt-5.6-sol",
|
|
24191
|
-
variant: "max"
|
|
24192
|
-
}
|
|
24192
|
+
{ providers: ["openai", "openai-codex"], model: "gpt-5.6-sol", variant: "max" },
|
|
24193
|
+
{ providers: ["github-copilot"], model: "gpt-5.6-sol", variant: "max" },
|
|
24194
|
+
{ providers: ["openai", "openai-codex", "opencode"], model: "gpt-5.6-sol", variant: "max" }
|
|
24193
24195
|
]
|
|
24194
24196
|
},
|
|
24195
24197
|
deep: {
|
|
24196
24198
|
fallbackChain: [
|
|
24197
24199
|
{
|
|
24198
|
-
providers: ["openai", "
|
|
24200
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
24199
24201
|
model: "gpt-5.6-sol",
|
|
24200
24202
|
variant: "medium"
|
|
24201
24203
|
}
|
|
@@ -24204,17 +24206,17 @@ var init_category_model_requirements = __esm(() => {
|
|
|
24204
24206
|
artistry: {
|
|
24205
24207
|
fallbackChain: [
|
|
24206
24208
|
{
|
|
24207
|
-
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"
|
|
24209
|
+
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
24208
24210
|
model: "claude-fable-5",
|
|
24209
24211
|
variant: "xhigh"
|
|
24210
24212
|
},
|
|
24211
24213
|
{
|
|
24212
|
-
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"
|
|
24214
|
+
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
|
|
24213
24215
|
model: "kimi-k3",
|
|
24214
24216
|
variant: "max"
|
|
24215
24217
|
},
|
|
24216
24218
|
{
|
|
24217
|
-
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"
|
|
24219
|
+
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
24218
24220
|
model: "claude-opus-5",
|
|
24219
24221
|
variant: "xhigh"
|
|
24220
24222
|
}
|
|
@@ -24226,15 +24228,15 @@ var init_category_model_requirements = __esm(() => {
|
|
|
24226
24228
|
{ providers: ["openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
|
|
24227
24229
|
{ providers: ["deepseek"], model: "deepseek-v4-flash", variant: "off" },
|
|
24228
24230
|
{
|
|
24229
|
-
providers: ["qwen-token-plan", "alibaba-token-plan", "bailian-coding-plan"
|
|
24231
|
+
providers: ["qwen-token-plan", "alibaba-token-plan", "bailian-coding-plan"],
|
|
24230
24232
|
model: "qwen3.6-flash",
|
|
24231
24233
|
variant: "low"
|
|
24232
24234
|
},
|
|
24233
|
-
{ providers: ["opencode-go"
|
|
24234
|
-
{ providers: ["opencode-go"
|
|
24235
|
+
{ providers: ["opencode-go"], model: "minimax-m3", variant: "max" },
|
|
24236
|
+
{ providers: ["opencode-go"], model: "minimax-m2.7", variant: "max" },
|
|
24235
24237
|
{ providers: ["xai"], model: "grok-4.20-0309-non-reasoning" },
|
|
24236
24238
|
{
|
|
24237
|
-
providers: ["anthropic", "anthropic-api", "github-copilot"
|
|
24239
|
+
providers: ["anthropic", "anthropic-api", "github-copilot"],
|
|
24238
24240
|
model: "claude-haiku-4-5",
|
|
24239
24241
|
variant: "off"
|
|
24240
24242
|
}
|
|
@@ -24242,18 +24244,14 @@ var init_category_model_requirements = __esm(() => {
|
|
|
24242
24244
|
},
|
|
24243
24245
|
"unspecified-low": {
|
|
24244
24246
|
fallbackChain: [
|
|
24247
|
+
{ providers: ["xai", "github-copilot", "opencode"], model: "grok-4.6", variant: "xhigh" },
|
|
24245
24248
|
{
|
|
24246
|
-
providers: ["
|
|
24247
|
-
model: "grok-4.6",
|
|
24248
|
-
variant: "xhigh"
|
|
24249
|
-
},
|
|
24250
|
-
{
|
|
24251
|
-
providers: ["openai", "quotio-openai", "github-copilot", "opencode", "vercel"],
|
|
24249
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
24252
24250
|
model: "gpt-5.6-terra",
|
|
24253
24251
|
variant: "high"
|
|
24254
24252
|
},
|
|
24255
24253
|
{
|
|
24256
|
-
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"
|
|
24254
|
+
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
24257
24255
|
model: "claude-sonnet-5",
|
|
24258
24256
|
variant: "low"
|
|
24259
24257
|
},
|
|
@@ -24262,53 +24260,38 @@ var init_category_model_requirements = __esm(() => {
|
|
|
24262
24260
|
model: "qwen3.8-max-preview",
|
|
24263
24261
|
variant: "max"
|
|
24264
24262
|
},
|
|
24265
|
-
{
|
|
24266
|
-
|
|
24267
|
-
model: "deepseek-v4-pro",
|
|
24268
|
-
variant: "max"
|
|
24269
|
-
},
|
|
24270
|
-
{
|
|
24271
|
-
providers: ["xiaomi", "opencode-go", "vercel"],
|
|
24272
|
-
model: "mimo-v2.5-pro",
|
|
24273
|
-
variant: "max"
|
|
24274
|
-
}
|
|
24263
|
+
{ providers: ["deepseek", "opencode-go"], model: "deepseek-v4-pro", variant: "max" },
|
|
24264
|
+
{ providers: ["xiaomi", "opencode-go"], model: "mimo-v2.5-pro", variant: "max" }
|
|
24275
24265
|
]
|
|
24276
24266
|
},
|
|
24277
24267
|
"unspecified-high": {
|
|
24278
24268
|
fallbackChain: [
|
|
24279
24269
|
{
|
|
24280
|
-
providers: ["
|
|
24281
|
-
model: "kimi-k3",
|
|
24282
|
-
variant: "max"
|
|
24283
|
-
},
|
|
24284
|
-
{
|
|
24285
|
-
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode", "vercel"],
|
|
24270
|
+
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
24286
24271
|
model: "claude-opus-5",
|
|
24287
24272
|
variant: "xhigh"
|
|
24288
24273
|
},
|
|
24274
|
+
{ providers: ["zai-coding-plan", "opencode-go"], model: "glm-5.3", variant: "max" },
|
|
24289
24275
|
{
|
|
24290
|
-
providers: ["
|
|
24291
|
-
model: "
|
|
24292
|
-
variant: "
|
|
24276
|
+
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
|
|
24277
|
+
model: "kimi-k3",
|
|
24278
|
+
variant: "max"
|
|
24293
24279
|
}
|
|
24294
24280
|
]
|
|
24295
24281
|
},
|
|
24296
24282
|
writing: {
|
|
24297
24283
|
fallbackChain: [
|
|
24298
24284
|
{
|
|
24299
|
-
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"
|
|
24285
|
+
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
|
|
24300
24286
|
model: "kimi-k3",
|
|
24301
24287
|
variant: "low"
|
|
24302
24288
|
},
|
|
24303
24289
|
{
|
|
24304
|
-
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"
|
|
24290
|
+
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
24305
24291
|
model: "claude-opus-5",
|
|
24306
24292
|
variant: "low"
|
|
24307
24293
|
},
|
|
24308
|
-
{
|
|
24309
|
-
providers: ["google", "github-copilot", "opencode", "vercel"],
|
|
24310
|
-
model: "gemini-3.6-flash"
|
|
24311
|
-
}
|
|
24294
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.6-flash" }
|
|
24312
24295
|
]
|
|
24313
24296
|
}
|
|
24314
24297
|
};
|
|
@@ -25661,7 +25644,7 @@ var init_anthropic_categories = __esm(() => {
|
|
|
25661
25644
|
ANTHROPIC_CATEGORIES = [
|
|
25662
25645
|
{
|
|
25663
25646
|
name: "unspecified-high",
|
|
25664
|
-
config: { model: "
|
|
25647
|
+
config: { model: "anthropic/claude-opus-5", variant: "xhigh" },
|
|
25665
25648
|
description: "Tasks that don't fit other categories, high effort required",
|
|
25666
25649
|
callerGuidance: UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE,
|
|
25667
25650
|
promptAppend: UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND
|
|
@@ -26112,7 +26095,7 @@ var init_resolve_agent_definition_paths = __esm(() => {
|
|
|
26112
26095
|
// packages/omo-opencode/src/shared/opencode-version.ts
|
|
26113
26096
|
import { execSync } from "child_process";
|
|
26114
26097
|
import { existsSync as existsSync9, readFileSync as readFileSync3, realpathSync as realpathSync4 } from "fs";
|
|
26115
|
-
import { dirname as
|
|
26098
|
+
import { dirname as dirname7, join as join13 } from "path";
|
|
26116
26099
|
function parseVersion(version2) {
|
|
26117
26100
|
const cleaned = version2.replace(/^v/, "").split("-")[0];
|
|
26118
26101
|
return cleaned.split(".").map((n) => parseInt(n, 10) || 0);
|
|
@@ -26153,7 +26136,7 @@ function parsePackageVersion(content) {
|
|
|
26153
26136
|
function getPackageVersionFromBinary(binaryPath, deps) {
|
|
26154
26137
|
try {
|
|
26155
26138
|
const realBinaryPath = deps.realpath(binaryPath);
|
|
26156
|
-
const packagePath = join13(
|
|
26139
|
+
const packagePath = join13(dirname7(dirname7(realBinaryPath)), "package.json");
|
|
26157
26140
|
if (!deps.exists(packagePath))
|
|
26158
26141
|
return null;
|
|
26159
26142
|
return parsePackageVersion(deps.readText(packagePath));
|
|
@@ -26391,10 +26374,10 @@ import {
|
|
|
26391
26374
|
} from "node:fs";
|
|
26392
26375
|
function writeFileAtomically2(filePath, content, deps = {}) {
|
|
26393
26376
|
const tempPath = `${filePath}.tmp`;
|
|
26394
|
-
const
|
|
26395
|
-
writeFileSync3(tempPath, content, { encoding: "utf-8", mode });
|
|
26396
|
-
if (
|
|
26397
|
-
chmodSync2(tempPath,
|
|
26377
|
+
const mode2 = deps.mode;
|
|
26378
|
+
writeFileSync3(tempPath, content, { encoding: "utf-8", mode: mode2 });
|
|
26379
|
+
if (mode2 !== undefined) {
|
|
26380
|
+
chmodSync2(tempPath, mode2);
|
|
26398
26381
|
}
|
|
26399
26382
|
const tempFileDescriptor = openSync2(tempPath, "r+");
|
|
26400
26383
|
try {
|
|
@@ -26415,8 +26398,8 @@ function writeFileAtomically2(filePath, content, deps = {}) {
|
|
|
26415
26398
|
throw error51;
|
|
26416
26399
|
}
|
|
26417
26400
|
}
|
|
26418
|
-
if (
|
|
26419
|
-
chmodSync2(filePath,
|
|
26401
|
+
if (mode2 !== undefined) {
|
|
26402
|
+
chmodSync2(filePath, mode2);
|
|
26420
26403
|
}
|
|
26421
26404
|
}
|
|
26422
26405
|
var init_write_file_atomically = __esm(() => {
|
|
@@ -26761,6 +26744,25 @@ var init_model_capabilities_generated = __esm(() => {
|
|
|
26761
26744
|
output: 131072
|
|
26762
26745
|
}
|
|
26763
26746
|
},
|
|
26747
|
+
"glm-5.3": {
|
|
26748
|
+
id: "glm-5.3",
|
|
26749
|
+
family: "glm",
|
|
26750
|
+
reasoning: true,
|
|
26751
|
+
temperature: true,
|
|
26752
|
+
toolCall: true,
|
|
26753
|
+
modalities: {
|
|
26754
|
+
input: [
|
|
26755
|
+
"text"
|
|
26756
|
+
],
|
|
26757
|
+
output: [
|
|
26758
|
+
"text"
|
|
26759
|
+
]
|
|
26760
|
+
},
|
|
26761
|
+
limit: {
|
|
26762
|
+
context: 1048576,
|
|
26763
|
+
output: 131072
|
|
26764
|
+
}
|
|
26765
|
+
},
|
|
26764
26766
|
"glm-5v-turbo": {
|
|
26765
26767
|
id: "glm-5v-turbo",
|
|
26766
26768
|
family: "glm",
|
|
@@ -84404,7 +84406,7 @@ var init_plugin_name_with_version = __esm(() => {
|
|
|
84404
84406
|
|
|
84405
84407
|
// packages/omo-opencode/src/cli/config-manager/backup-config.ts
|
|
84406
84408
|
import { copyFileSync as copyFileSync2, existsSync as existsSync16, mkdirSync as mkdirSync6 } from "node:fs";
|
|
84407
|
-
import { dirname as
|
|
84409
|
+
import { dirname as dirname8 } from "node:path";
|
|
84408
84410
|
function backupConfigFile(configPath) {
|
|
84409
84411
|
if (!existsSync16(configPath)) {
|
|
84410
84412
|
return { success: true };
|
|
@@ -84412,7 +84414,7 @@ function backupConfigFile(configPath) {
|
|
|
84412
84414
|
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
84413
84415
|
const backupPath = `${configPath}.backup-${timestamp}`;
|
|
84414
84416
|
try {
|
|
84415
|
-
const dir =
|
|
84417
|
+
const dir = dirname8(backupPath);
|
|
84416
84418
|
if (!existsSync16(dir)) {
|
|
84417
84419
|
mkdirSync6(dir, { recursive: true });
|
|
84418
84420
|
}
|
|
@@ -84610,7 +84612,7 @@ function extractVersionFromPluginEntry(entry) {
|
|
|
84610
84612
|
|
|
84611
84613
|
// packages/omo-opencode/src/cli/config-manager/add-plugin-to-opencode-config.ts
|
|
84612
84614
|
import { existsSync as existsSync19, readdirSync as readdirSync4, readFileSync as readFileSync8, writeFileSync as writeFileSync5 } from "node:fs";
|
|
84613
|
-
import { basename as basename3, dirname as
|
|
84615
|
+
import { basename as basename3, dirname as dirname9, join as join21 } from "node:path";
|
|
84614
84616
|
function detectConfigFormatInDir(configDir) {
|
|
84615
84617
|
const configJsonc = join21(configDir, "opencode.jsonc");
|
|
84616
84618
|
const configJson = join21(configDir, "opencode.json");
|
|
@@ -84623,10 +84625,10 @@ function detectConfigFormatInDir(configDir) {
|
|
|
84623
84625
|
return { format: "none", path: configJson };
|
|
84624
84626
|
}
|
|
84625
84627
|
function getParentConfigDirForProfile(configDir) {
|
|
84626
|
-
const parentDir =
|
|
84628
|
+
const parentDir = dirname9(configDir);
|
|
84627
84629
|
if (basename3(parentDir) !== "profiles")
|
|
84628
84630
|
return null;
|
|
84629
|
-
return
|
|
84631
|
+
return dirname9(parentDir);
|
|
84630
84632
|
}
|
|
84631
84633
|
function listProfileConfigDirs(rootConfigDir) {
|
|
84632
84634
|
const profilesDir = join21(rootConfigDir, "profiles");
|
|
@@ -86760,7 +86762,7 @@ var init_env2 = __esm(() => {
|
|
|
86760
86762
|
});
|
|
86761
86763
|
|
|
86762
86764
|
// node_modules/.bun/posthog-node@5.51.1/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
86763
|
-
import { dirname as
|
|
86765
|
+
import { dirname as dirname18, posix as posix7, sep as sep7 } from "path";
|
|
86764
86766
|
function createModulerModifier() {
|
|
86765
86767
|
const getModuleFromFileName = createGetModuleFromFilename();
|
|
86766
86768
|
return async (frames) => {
|
|
@@ -86769,7 +86771,7 @@ function createModulerModifier() {
|
|
|
86769
86771
|
return frames;
|
|
86770
86772
|
};
|
|
86771
86773
|
}
|
|
86772
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
86774
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname18(process.argv[1]) : process.cwd(), isWindows = sep7 === "\\") {
|
|
86773
86775
|
const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
|
|
86774
86776
|
return (filename) => {
|
|
86775
86777
|
if (!filename)
|
|
@@ -92103,7 +92105,7 @@ function splitNodeOptions(nodeOptions) {
|
|
|
92103
92105
|
return args;
|
|
92104
92106
|
}
|
|
92105
92107
|
function findUnhandledRejectionMode(args) {
|
|
92106
|
-
let
|
|
92108
|
+
let mode2;
|
|
92107
92109
|
for (let index = 0;index < args.length; index++) {
|
|
92108
92110
|
const argument = args[index];
|
|
92109
92111
|
const optionName = UNHANDLED_REJECTION_OPTION_NAMES.find((name) => argument === name || argument.startsWith(`${name}=`));
|
|
@@ -92111,9 +92113,9 @@ function findUnhandledRejectionMode(args) {
|
|
|
92111
92113
|
continue;
|
|
92112
92114
|
const value = argument === optionName ? args[++index] : argument.slice(optionName.length + 1);
|
|
92113
92115
|
if (UNHANDLED_REJECTION_MODES.has(value))
|
|
92114
|
-
|
|
92116
|
+
mode2 = value;
|
|
92115
92117
|
}
|
|
92116
|
-
return
|
|
92118
|
+
return mode2;
|
|
92117
92119
|
}
|
|
92118
92120
|
function getUnhandledRejectionMode(execArgv = STARTUP_EXEC_ARGV, nodeOptions = STARTUP_NODE_OPTIONS) {
|
|
92119
92121
|
return findUnhandledRejectionMode(execArgv) ?? findUnhandledRejectionMode(splitNodeOptions(nodeOptions ?? "")) ?? "throw";
|
|
@@ -92139,17 +92141,17 @@ function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
|
92139
92141
|
_posthogErrorHandler: true
|
|
92140
92142
|
});
|
|
92141
92143
|
}
|
|
92142
|
-
function addUncaughtExceptionListener(captureFn, onFatalFn,
|
|
92144
|
+
function addUncaughtExceptionListener(captureFn, onFatalFn, mode2 = STARTUP_UNHANDLED_REJECTION_MODE) {
|
|
92143
92145
|
const process4 = globalThis.process;
|
|
92144
92146
|
if (!process4)
|
|
92145
92147
|
return;
|
|
92146
|
-
if (
|
|
92148
|
+
if (mode2 === "strict")
|
|
92147
92149
|
return void process4.on("uncaughtExceptionMonitor", (error51, origin) => captureUncaughtException(captureFn, error51, origin));
|
|
92148
92150
|
process4.on("uncaughtException", makeUncaughtExceptionHandler(captureFn, onFatalFn));
|
|
92149
92151
|
}
|
|
92150
|
-
function addUnhandledRejectionListener(captureFn,
|
|
92152
|
+
function addUnhandledRejectionListener(captureFn, mode2 = STARTUP_UNHANDLED_REJECTION_MODE) {
|
|
92151
92153
|
const process4 = globalThis.process;
|
|
92152
|
-
if (!process4 ||
|
|
92154
|
+
if (!process4 || mode2 === "throw" || mode2 === "strict" || mode2 === "warn-with-error-code")
|
|
92153
92155
|
return;
|
|
92154
92156
|
process4.on("unhandledRejection", (reason) => {
|
|
92155
92157
|
captureFn(reason, {
|
|
@@ -94374,7 +94376,7 @@ var package_default2;
|
|
|
94374
94376
|
var init_package2 = __esm(() => {
|
|
94375
94377
|
package_default2 = {
|
|
94376
94378
|
name: "@oh-my-opencode/omo-codex",
|
|
94377
|
-
version: "5.0.0-beta.
|
|
94379
|
+
version: "5.0.0-beta.23",
|
|
94378
94380
|
type: "module",
|
|
94379
94381
|
private: true,
|
|
94380
94382
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -95344,19 +95346,19 @@ var init_update_toasts = __esm(() => {
|
|
|
95344
95346
|
|
|
95345
95347
|
// packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
|
|
95346
95348
|
import { existsSync as existsSync48 } from "node:fs";
|
|
95347
|
-
import { dirname as
|
|
95349
|
+
import { dirname as dirname31, join as join76 } from "node:path";
|
|
95348
95350
|
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
95349
95351
|
function defaultGetModuleHostingWorkspace() {
|
|
95350
95352
|
try {
|
|
95351
|
-
const currentDir =
|
|
95353
|
+
const currentDir = dirname31(fileURLToPath5(import.meta.url));
|
|
95352
95354
|
const pkgJsonPath = findPackageJsonUp(currentDir);
|
|
95353
95355
|
if (!pkgJsonPath)
|
|
95354
95356
|
return null;
|
|
95355
|
-
const pkgDir =
|
|
95356
|
-
const nodeModulesDir =
|
|
95357
|
+
const pkgDir = dirname31(pkgJsonPath);
|
|
95358
|
+
const nodeModulesDir = dirname31(pkgDir);
|
|
95357
95359
|
if (nodeModulesDir.split(/[\\/]/).pop() !== "node_modules")
|
|
95358
95360
|
return null;
|
|
95359
|
-
return
|
|
95361
|
+
return dirname31(nodeModulesDir);
|
|
95360
95362
|
} catch (error51) {
|
|
95361
95363
|
if (error51 instanceof Error) {
|
|
95362
95364
|
return null;
|
|
@@ -97905,9 +97907,9 @@ function formatConfigSummary(config3) {
|
|
|
97905
97907
|
`);
|
|
97906
97908
|
}
|
|
97907
97909
|
function printHeader(isUpdate) {
|
|
97908
|
-
const
|
|
97910
|
+
const mode2 = isUpdate ? "Update" : "Install";
|
|
97909
97911
|
console.log();
|
|
97910
|
-
console.log(import_picocolors.default.bgMagenta(import_picocolors.default.white(` oMoMoMoMo... ${
|
|
97912
|
+
console.log(import_picocolors.default.bgMagenta(import_picocolors.default.white(` oMoMoMoMo... ${mode2} `)));
|
|
97911
97913
|
console.log();
|
|
97912
97914
|
}
|
|
97913
97915
|
function printStep(step, total, message) {
|
|
@@ -98186,7 +98188,7 @@ function windowsCommandShim(targetPath) {
|
|
|
98186
98188
|
|
|
98187
98189
|
// packages/omo-codex/src/install/codex-cache-dangling-bins.ts
|
|
98188
98190
|
import { lstat as lstat2, readFile, readdir, readlink, rm, stat } from "node:fs/promises";
|
|
98189
|
-
import { dirname as
|
|
98191
|
+
import { dirname as dirname10, isAbsolute, join as join23, resolve as resolve5 } from "node:path";
|
|
98190
98192
|
|
|
98191
98193
|
// packages/omo-codex/src/install/codex-cache-fs.ts
|
|
98192
98194
|
import { lstat } from "node:fs/promises";
|
|
@@ -98233,7 +98235,7 @@ async function removeDanglingManagedSymlink(linkPath) {
|
|
|
98233
98235
|
if (!linkStat.isSymbolicLink())
|
|
98234
98236
|
return;
|
|
98235
98237
|
const linkTarget = await readlink(linkPath);
|
|
98236
|
-
const target = isAbsolute(linkTarget) ? linkTarget : resolve5(
|
|
98238
|
+
const target = isAbsolute(linkTarget) ? linkTarget : resolve5(dirname10(linkPath), linkTarget);
|
|
98237
98239
|
if (!await isFileSystemEntry(target) && isManagedComponentBinTarget(target))
|
|
98238
98240
|
await rm(linkPath, { force: true });
|
|
98239
98241
|
} catch (error51) {
|
|
@@ -98695,11 +98697,11 @@ async function existingNonSymlink(path7) {
|
|
|
98695
98697
|
}
|
|
98696
98698
|
// packages/omo-codex/src/install/codex-cache-install.ts
|
|
98697
98699
|
import { cp as cp2, mkdir as mkdir3, readFile as readFile8, readdir as readdir4, rename, rm as rm4 } from "node:fs/promises";
|
|
98698
|
-
import { basename as basename5, dirname as
|
|
98700
|
+
import { basename as basename5, dirname as dirname13, join as join32, sep as sep5 } from "node:path";
|
|
98699
98701
|
|
|
98700
98702
|
// packages/omo-codex/src/install/codex-cache-bundled-mcps.ts
|
|
98701
98703
|
import { cp, mkdir as mkdir2, readFile as readFile4, stat as stat3 } from "node:fs/promises";
|
|
98702
|
-
import { dirname as
|
|
98704
|
+
import { dirname as dirname11, join as join27, resolve as resolve7 } from "node:path";
|
|
98703
98705
|
var BUNDLED_MCP_RUNTIMES = [
|
|
98704
98706
|
{
|
|
98705
98707
|
label: "Git Bash MCP",
|
|
@@ -98734,7 +98736,7 @@ async function copyBundledMcpRuntimeDist(pluginRoot, sourceRoot, runtime4) {
|
|
|
98734
98736
|
throw new Error(`missing built ${runtime4.label} dist at ${sourcePath}`);
|
|
98735
98737
|
}
|
|
98736
98738
|
const destinationPath = join27(pluginRoot, runtime4.destinationDistFromPlugin);
|
|
98737
|
-
await mkdir2(
|
|
98739
|
+
await mkdir2(dirname11(destinationPath), { recursive: true });
|
|
98738
98740
|
await cp(sourcePath, destinationPath, { recursive: true });
|
|
98739
98741
|
}
|
|
98740
98742
|
async function readSourceMcpArgs(path7) {
|
|
@@ -98772,7 +98774,7 @@ async function isDirectory(path7) {
|
|
|
98772
98774
|
// packages/omo-codex/src/install/codex-cache-local-dependencies.ts
|
|
98773
98775
|
import { realpathSync as realpathSync6 } from "node:fs";
|
|
98774
98776
|
import { readFile as readFile5, readdir as readdir3, writeFile as writeFile2 } from "node:fs/promises";
|
|
98775
|
-
import { dirname as
|
|
98777
|
+
import { dirname as dirname12, isAbsolute as isAbsolute4, join as join29, relative as relative3, resolve as resolve9, sep as sep2 } from "node:path";
|
|
98776
98778
|
|
|
98777
98779
|
// packages/omo-codex/src/install/codex-cache-paths.ts
|
|
98778
98780
|
import { existsSync as existsSync24, readdirSync as readdirSync6 } from "node:fs";
|
|
@@ -98841,7 +98843,7 @@ async function rewriteCachedPackageLocalFileDependencies(pluginRoot, sourceRoot)
|
|
|
98841
98843
|
const parsed = JSON.parse(raw);
|
|
98842
98844
|
if (!isPlainRecord4(parsed))
|
|
98843
98845
|
continue;
|
|
98844
|
-
const packageDir =
|
|
98846
|
+
const packageDir = dirname12(packageJsonPath);
|
|
98845
98847
|
const sourcePackageDir = join29(sourceRoot, relative3(pluginRoot, packageDir));
|
|
98846
98848
|
let changed = false;
|
|
98847
98849
|
for (const field of ["dependencies", "optionalDependencies", "peerDependencies"]) {
|
|
@@ -99236,13 +99238,13 @@ function sanitizeNpmInstallEnv(env2) {
|
|
|
99236
99238
|
return Object.fromEntries(Object.entries(env2).filter(([key]) => key.toLowerCase() !== "npm_config_allow_scripts"));
|
|
99237
99239
|
}
|
|
99238
99240
|
function createTempSiblingPath(targetPath) {
|
|
99239
|
-
return join32(
|
|
99241
|
+
return join32(dirname13(targetPath), `.tmp-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
|
|
99240
99242
|
}
|
|
99241
99243
|
function createBackupSiblingPath(targetPath) {
|
|
99242
|
-
return join32(
|
|
99244
|
+
return join32(dirname13(targetPath), `.backup-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
|
|
99243
99245
|
}
|
|
99244
99246
|
async function copyDirectory(sourcePath, targetPath) {
|
|
99245
|
-
await mkdir3(
|
|
99247
|
+
await mkdir3(dirname13(targetPath), { recursive: true });
|
|
99246
99248
|
await cp2(sourcePath, targetPath, { recursive: true, filter: (source) => shouldCopyPluginPath(source, sourcePath) });
|
|
99247
99249
|
}
|
|
99248
99250
|
async function promoteDirectory(tempPath, targetPath, renameDirectory) {
|
|
@@ -99341,20 +99343,20 @@ async function copyRootRuntimeDists(input) {
|
|
|
99341
99343
|
const sourcePath = join32(repoRoot, runtimePath);
|
|
99342
99344
|
if (!await fileExistsStrict(join32(sourcePath, "index.js")))
|
|
99343
99345
|
continue;
|
|
99344
|
-
await mkdir3(
|
|
99346
|
+
await mkdir3(dirname13(join32(input.pluginRoot, runtimePath)), { recursive: true });
|
|
99345
99347
|
await cp2(sourcePath, join32(input.pluginRoot, runtimePath), { recursive: true });
|
|
99346
99348
|
}
|
|
99347
99349
|
}
|
|
99348
99350
|
function repoRootForCodexPluginSource(sourcePath) {
|
|
99349
|
-
const codexPackageRoot =
|
|
99350
|
-
const packagesRoot =
|
|
99351
|
+
const codexPackageRoot = dirname13(sourcePath);
|
|
99352
|
+
const packagesRoot = dirname13(codexPackageRoot);
|
|
99351
99353
|
if (basename5(sourcePath) !== "plugin")
|
|
99352
99354
|
return null;
|
|
99353
99355
|
if (basename5(codexPackageRoot) !== "omo-codex")
|
|
99354
99356
|
return null;
|
|
99355
99357
|
if (basename5(packagesRoot) !== "packages")
|
|
99356
99358
|
return null;
|
|
99357
|
-
return
|
|
99359
|
+
return dirname13(packagesRoot);
|
|
99358
99360
|
}
|
|
99359
99361
|
// packages/omo-codex/src/install/codex-cache-prune.ts
|
|
99360
99362
|
import { lstat as lstat5, readdir as readdir5, rm as rm5, stat as stat4 } from "node:fs/promises";
|
|
@@ -99485,7 +99487,7 @@ async function shouldBuildSourcePackages(repoRoot) {
|
|
|
99485
99487
|
|
|
99486
99488
|
// packages/omo-codex/src/install/codex-config-toml.ts
|
|
99487
99489
|
import { mkdir as mkdir5, readFile as readFile11 } from "node:fs/promises";
|
|
99488
|
-
import { dirname as
|
|
99490
|
+
import { dirname as dirname16 } from "node:path";
|
|
99489
99491
|
|
|
99490
99492
|
// packages/omo-codex/src/install/toml-section-editor.ts
|
|
99491
99493
|
function findTomlSection(config3, header) {
|
|
@@ -100067,12 +100069,12 @@ function tomlKeySegment(value) {
|
|
|
100067
100069
|
|
|
100068
100070
|
// packages/omo-codex/src/install/codex-config-atomic-write.ts
|
|
100069
100071
|
import { lstat as lstat6, readlink as readlink4, realpath, rename as rename3, unlink, writeFile as writeFile5 } from "node:fs/promises";
|
|
100070
|
-
import { basename as basename6, dirname as
|
|
100072
|
+
import { basename as basename6, dirname as dirname14, isAbsolute as isAbsolute5, join as join36, resolve as resolve10 } from "node:path";
|
|
100071
100073
|
var RENAME_RETRY_DELAYS_MS = [10, 25, 50];
|
|
100072
100074
|
var RETRIABLE_RENAME_CODES = new Set(["EPERM", "EBUSY"]);
|
|
100073
100075
|
async function writeFileAtomic(targetPath, data) {
|
|
100074
100076
|
const writeTarget = await resolveSymlinkTarget(targetPath);
|
|
100075
|
-
const temporaryPath = join36(
|
|
100077
|
+
const temporaryPath = join36(dirname14(writeTarget), `.tmp-${basename6(writeTarget)}-${process.pid}-${Date.now()}`);
|
|
100076
100078
|
await writeFile5(temporaryPath, data);
|
|
100077
100079
|
try {
|
|
100078
100080
|
await renameWithRetry(temporaryPath, writeTarget);
|
|
@@ -100101,7 +100103,7 @@ async function resolveSymlinkTarget(targetPath) {
|
|
|
100101
100103
|
if (!(error51 instanceof Error))
|
|
100102
100104
|
throw error51;
|
|
100103
100105
|
const linkValue = await readlink4(targetPath);
|
|
100104
|
-
return isAbsolute5(linkValue) ? linkValue : resolve10(
|
|
100106
|
+
return isAbsolute5(linkValue) ? linkValue : resolve10(dirname14(targetPath), linkValue);
|
|
100105
100107
|
}
|
|
100106
100108
|
}
|
|
100107
100109
|
async function renameWithRetry(fromPath, toPath) {
|
|
@@ -100581,14 +100583,14 @@ import { join as join37 } from "node:path";
|
|
|
100581
100583
|
var FALLBACK_CODEX_MODEL_CATALOG = {
|
|
100582
100584
|
current: {
|
|
100583
100585
|
model: "gpt-5.6-sol",
|
|
100584
|
-
modelContextWindow:
|
|
100586
|
+
modelContextWindow: 650000,
|
|
100585
100587
|
modelReasoningEffort: "high",
|
|
100586
100588
|
planModeReasoningEffort: "xhigh"
|
|
100587
100589
|
},
|
|
100588
100590
|
managedProfiles: [
|
|
100589
100591
|
{
|
|
100590
100592
|
model: "gpt-5.5",
|
|
100591
|
-
modelContextWindow:
|
|
100593
|
+
modelContextWindow: 650000,
|
|
100592
100594
|
modelReasoningEffort: "high",
|
|
100593
100595
|
planModeReasoningEffort: "xhigh"
|
|
100594
100596
|
},
|
|
@@ -100686,7 +100688,7 @@ function isRootSetting2(line, key) {
|
|
|
100686
100688
|
|
|
100687
100689
|
// packages/omo-codex/src/install/codex-multi-agent-v2-config.ts
|
|
100688
100690
|
import { readFileSync as readFileSync11 } from "node:fs";
|
|
100689
|
-
import { dirname as
|
|
100691
|
+
import { dirname as dirname15, isAbsolute as isAbsolute6, join as join38 } from "node:path";
|
|
100690
100692
|
var CODEX_AGENTS_HEADER = "agents";
|
|
100691
100693
|
var CODEX_MULTI_AGENT_V2_HEADER = "features.multi_agent_v2";
|
|
100692
100694
|
var CODEX_MULTI_AGENT_V2_THREAD_LIMIT_KEY = `${CODEX_MULTI_AGENT_V2_HEADER}.max_concurrent_threads_per_session`;
|
|
@@ -100723,8 +100725,8 @@ function resolveCodexMultiAgentVersion(config3, configPath) {
|
|
|
100723
100725
|
}
|
|
100724
100726
|
function resolveCatalogPath(configuredPath, configPath) {
|
|
100725
100727
|
if (configuredPath === null)
|
|
100726
|
-
return join38(
|
|
100727
|
-
return isAbsolute6(configuredPath) ? configuredPath : join38(
|
|
100728
|
+
return join38(dirname15(configPath), "models_cache.json");
|
|
100729
|
+
return isAbsolute6(configuredPath) ? configuredPath : join38(dirname15(configPath), configuredPath);
|
|
100728
100730
|
}
|
|
100729
100731
|
function readCatalogMultiAgentVersion(model, cachePath) {
|
|
100730
100732
|
let raw;
|
|
@@ -100828,7 +100830,7 @@ function readBooleanSetting(sectionText, key) {
|
|
|
100828
100830
|
|
|
100829
100831
|
// packages/omo-codex/src/install/codex-config-toml.ts
|
|
100830
100832
|
async function updateCodexConfig(input) {
|
|
100831
|
-
await mkdir5(
|
|
100833
|
+
await mkdir5(dirname16(input.configPath), { recursive: true });
|
|
100832
100834
|
let config3;
|
|
100833
100835
|
try {
|
|
100834
100836
|
config3 = await readFile11(input.configPath, "utf8");
|
|
@@ -101801,7 +101803,7 @@ var defaultRunCommand = async (command, args, options) => {
|
|
|
101801
101803
|
|
|
101802
101804
|
// packages/omo-codex/src/install/codex-project-local-cleanup.ts
|
|
101803
101805
|
import { copyFile as copyFile2, lstat as lstat10, readFile as readFile17, writeFile as writeFile10 } from "node:fs/promises";
|
|
101804
|
-
import { dirname as
|
|
101806
|
+
import { dirname as dirname17, join as join46, resolve as resolve11 } from "node:path";
|
|
101805
101807
|
var LEGACY_AGENT_CONFLICT_KEYS = ["max_threads"];
|
|
101806
101808
|
var PROJECT_LOCAL_ARTIFACT_PATHS = [
|
|
101807
101809
|
".codex/hooks.json",
|
|
@@ -101921,13 +101923,13 @@ async function findProjectLocalCodexConfigs(startDirectory, codexHome) {
|
|
|
101921
101923
|
artifactRoots: artifactRootsForConfigPaths(configPathsFromCwd)
|
|
101922
101924
|
};
|
|
101923
101925
|
}
|
|
101924
|
-
const parent =
|
|
101926
|
+
const parent = dirname17(current);
|
|
101925
101927
|
if (parent === current) {
|
|
101926
101928
|
const nearestConfigPath = configPathsFromCwd[0];
|
|
101927
101929
|
return nearestConfigPath === undefined ? null : {
|
|
101928
|
-
projectRoot:
|
|
101930
|
+
projectRoot: dirname17(dirname17(nearestConfigPath)),
|
|
101929
101931
|
configPaths: [nearestConfigPath],
|
|
101930
|
-
artifactRoots: [
|
|
101932
|
+
artifactRoots: [dirname17(dirname17(nearestConfigPath))]
|
|
101931
101933
|
};
|
|
101932
101934
|
}
|
|
101933
101935
|
current = parent;
|
|
@@ -101943,7 +101945,7 @@ async function isRegularProjectLocalConfig(directory, configPath) {
|
|
|
101943
101945
|
function artifactRootsForConfigPaths(configPaths2) {
|
|
101944
101946
|
const roots = [];
|
|
101945
101947
|
for (const configPath of configPaths2) {
|
|
101946
|
-
const root =
|
|
101948
|
+
const root = dirname17(dirname17(configPath));
|
|
101947
101949
|
if (!roots.includes(root))
|
|
101948
101950
|
roots.push(root);
|
|
101949
101951
|
}
|
|
@@ -102853,7 +102855,7 @@ import { isAbsolute as isAbsolute11, join as join58, relative as relative6, reso
|
|
|
102853
102855
|
|
|
102854
102856
|
// packages/omo-codex/src/install/codex-cleanup-bins.ts
|
|
102855
102857
|
import { lstat as lstat12, readFile as readFile22, readdir as readdir12, readlink as readlink6, rm as rm11 } from "node:fs/promises";
|
|
102856
|
-
import { dirname as
|
|
102858
|
+
import { dirname as dirname19, isAbsolute as isAbsolute9, join as join56, resolve as resolve14 } from "node:path";
|
|
102857
102859
|
var ROOT_RUNTIME_BIN_NAME = "omo";
|
|
102858
102860
|
var MANAGED_CODEX_BIN_NAMES = new Set([
|
|
102859
102861
|
ROOT_RUNTIME_BIN_NAME,
|
|
@@ -102910,7 +102912,7 @@ async function isManagedCodexBin(linkPath, platform, binName) {
|
|
|
102910
102912
|
if (platform === "win32")
|
|
102911
102913
|
return false;
|
|
102912
102914
|
const linkTarget = await readlink6(linkPath);
|
|
102913
|
-
const target = isAbsolute9(linkTarget) ? linkTarget : resolve14(
|
|
102915
|
+
const target = isAbsolute9(linkTarget) ? linkTarget : resolve14(dirname19(linkPath), linkTarget);
|
|
102914
102916
|
return isManagedComponentBinTarget(target) || isLegacyCodexBinTarget(binName, target);
|
|
102915
102917
|
}
|
|
102916
102918
|
if (!entryStat.isFile())
|
|
@@ -102921,7 +102923,7 @@ async function isManagedCodexBin(linkPath, platform, binName) {
|
|
|
102921
102923
|
|
|
102922
102924
|
// packages/omo-codex/src/install/codex-cleanup-config.ts
|
|
102923
102925
|
import { lstat as lstat13, mkdir as mkdir8, readFile as readFile23, writeFile as writeFile13 } from "node:fs/promises";
|
|
102924
|
-
import { dirname as
|
|
102926
|
+
import { dirname as dirname20 } from "node:path";
|
|
102925
102927
|
var MANAGED_MARKETPLACES = ["sisyphuslabs", "lazycodex", "code-yeongyu-codex-plugins"];
|
|
102926
102928
|
var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE2 = ["codex-ultrawork-reviewer"];
|
|
102927
102929
|
var CURRENT_MANAGED_CODEX_AGENT_NAMES2 = [
|
|
@@ -102958,7 +102960,7 @@ async function cleanupCodexConfig(configPath, now) {
|
|
|
102958
102960
|
if (next === original)
|
|
102959
102961
|
return { changed: false };
|
|
102960
102962
|
const backupPath = `${configPath}.backup-${formatBackupTimestamp2(now?.() ?? new Date)}`;
|
|
102961
|
-
await mkdir8(
|
|
102963
|
+
await mkdir8(dirname20(configPath), { recursive: true });
|
|
102962
102964
|
await writeFile13(backupPath, original);
|
|
102963
102965
|
await writeFile13(configPath, `${next.trimEnd()}
|
|
102964
102966
|
`);
|
|
@@ -103037,10 +103039,10 @@ function nodeErrorCode5(error51) {
|
|
|
103037
103039
|
}
|
|
103038
103040
|
|
|
103039
103041
|
// packages/omo-codex/src/install/codex-cleanup-safety.ts
|
|
103040
|
-
import { dirname as
|
|
103042
|
+
import { dirname as dirname21, isAbsolute as isAbsolute10, join as join57, relative as relative5, resolve as resolve15 } from "node:path";
|
|
103041
103043
|
function codexHomeResolvesToFilesystemRoot(codexHome) {
|
|
103042
103044
|
const resolved = resolve15(codexHome);
|
|
103043
|
-
return
|
|
103045
|
+
return dirname21(resolved) === resolved;
|
|
103044
103046
|
}
|
|
103045
103047
|
function validateManagedCleanupTarget(input) {
|
|
103046
103048
|
if (!isAbsolute10(input.path))
|
|
@@ -103303,7 +103305,7 @@ var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", ".
|
|
|
103303
103305
|
import { execFile as execFile4 } from "node:child_process";
|
|
103304
103306
|
import { existsSync as existsSync32 } from "node:fs";
|
|
103305
103307
|
import { homedir as homedir11 } from "node:os";
|
|
103306
|
-
import { dirname as
|
|
103308
|
+
import { dirname as dirname25, join as join63, resolve as resolve20 } from "node:path";
|
|
103307
103309
|
import { fileURLToPath } from "node:url";
|
|
103308
103310
|
import { promisify as promisify3 } from "node:util";
|
|
103309
103311
|
|
|
@@ -103334,9 +103336,9 @@ function resolveAgentHome(options) {
|
|
|
103334
103336
|
}
|
|
103335
103337
|
|
|
103336
103338
|
// packages/omo-senpi/src/install/local-launcher.ts
|
|
103337
|
-
import { chmodSync as chmodSync3, existsSync as existsSync31, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync, writeFileSync as writeFileSync6 } from "node:fs";
|
|
103339
|
+
import { chmodSync as chmodSync3, existsSync as existsSync31, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync as rmSync2, writeFileSync as writeFileSync6 } from "node:fs";
|
|
103338
103340
|
import { homedir as homedir10 } from "node:os";
|
|
103339
|
-
import { dirname as
|
|
103341
|
+
import { dirname as dirname22, join as join60, resolve as resolve18 } from "node:path";
|
|
103340
103342
|
var MARKER = "omo-local-launcher";
|
|
103341
103343
|
function localLauncherPath(homeDir = homedir10()) {
|
|
103342
103344
|
return join60(homeDir, ".local", "bin", "omo");
|
|
@@ -103407,7 +103409,7 @@ function installLocalLauncher(options) {
|
|
|
103407
103409
|
const path7 = localLauncherPath(options.homeDir);
|
|
103408
103410
|
if (existsSync31(path7) && !readFileSync14(path7, "utf8").includes(MARKER))
|
|
103409
103411
|
return;
|
|
103410
|
-
mkdirSync10(
|
|
103412
|
+
mkdirSync10(dirname22(path7), { recursive: true });
|
|
103411
103413
|
writeFileSync6(path7, renderLocalLauncher(options));
|
|
103412
103414
|
chmodSync3(path7, 493);
|
|
103413
103415
|
if ((options.platform ?? process.platform) === "win32") {
|
|
@@ -103422,12 +103424,12 @@ node "%~dp0omo" %*\r
|
|
|
103422
103424
|
import { createHash as createHash5 } from "node:crypto";
|
|
103423
103425
|
import { constants as constants9 } from "node:fs";
|
|
103424
103426
|
import { access as access2, readFile as readFile26, stat as stat6 } from "node:fs/promises";
|
|
103425
|
-
import { dirname as
|
|
103427
|
+
import { dirname as dirname24, join as join62 } from "node:path";
|
|
103426
103428
|
|
|
103427
103429
|
// packages/omo-senpi/src/install/senpi-settings.ts
|
|
103428
103430
|
import { constants as constants8 } from "node:fs";
|
|
103429
103431
|
import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile25, rename as rename5, writeFile as writeFile14 } from "node:fs/promises";
|
|
103430
|
-
import { dirname as
|
|
103432
|
+
import { dirname as dirname23, join as join61, resolve as resolve19 } from "node:path";
|
|
103431
103433
|
var OMO_SENPI_PACKAGE_NAME = "@code-yeongyu/omo-senpi";
|
|
103432
103434
|
var LEGACY_BUILTIN_SHADOW_PACKAGES = [
|
|
103433
103435
|
join61("packages", "pi-goal"),
|
|
@@ -103474,7 +103476,7 @@ async function removeSupersededOmoPackages(packages, currentPluginPath, agentDir
|
|
|
103474
103476
|
return entries.filter((entry) => entry !== undefined);
|
|
103475
103477
|
}
|
|
103476
103478
|
async function writeSettingsAtomically(settingsPath, settings) {
|
|
103477
|
-
await mkdir9(
|
|
103479
|
+
await mkdir9(dirname23(settingsPath), { recursive: true });
|
|
103478
103480
|
const backupPath = await nextBackupPath(settingsPath);
|
|
103479
103481
|
if (await fileExists(settingsPath)) {
|
|
103480
103482
|
await copyFile3(settingsPath, backupPath);
|
|
@@ -103594,7 +103596,7 @@ async function hasMissingPluginArtifact(pluginPath) {
|
|
|
103594
103596
|
}
|
|
103595
103597
|
async function verifyAstGrepRuntimeIntegrity(pluginPath, platform) {
|
|
103596
103598
|
const runtimeEntry = join62(pluginPath, "runtime", "ast-grep-mcp", "cli.js");
|
|
103597
|
-
const manifestPath = join62(
|
|
103599
|
+
const manifestPath = join62(dirname24(runtimeEntry), "manifest.json");
|
|
103598
103600
|
let runtimeStat;
|
|
103599
103601
|
try {
|
|
103600
103602
|
runtimeStat = await stat6(runtimeEntry);
|
|
@@ -103684,7 +103686,7 @@ async function runSenpiInstaller(options = {}) {
|
|
|
103684
103686
|
function resolveInstallContext(options) {
|
|
103685
103687
|
const env3 = options.env ?? process.env;
|
|
103686
103688
|
const allowBuild = options.pluginPath === undefined;
|
|
103687
|
-
const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(
|
|
103689
|
+
const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname25(fileURLToPath(import.meta.url))) : dirname25(resolve20(options.pluginPath))));
|
|
103688
103690
|
const agentDir = resolve20(options.agentDir ?? resolveAgentHome({ env: env3, homeDir: env3.HOME ?? homedir11() }));
|
|
103689
103691
|
const pluginPath = resolve20(options.pluginPath ?? join63(repoRoot, "packages", "omo-senpi", "plugin"));
|
|
103690
103692
|
return {
|
|
@@ -107688,7 +107690,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
|
107688
107690
|
// packages/omo-opencode/src/cli/run/opencode-binary-resolver.ts
|
|
107689
107691
|
init_bun_which_shim();
|
|
107690
107692
|
init_spawn_with_windows_hide();
|
|
107691
|
-
import { delimiter as delimiter2, dirname as
|
|
107693
|
+
import { delimiter as delimiter2, dirname as dirname26, posix as posix9, win32 as win325 } from "node:path";
|
|
107692
107694
|
var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
|
|
107693
107695
|
var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
|
|
107694
107696
|
function getCommandCandidates(platform) {
|
|
@@ -107746,7 +107748,7 @@ async function findWorkingOpencodeBinary(pathEnv = process.env.PATH, probe2 = ca
|
|
|
107746
107748
|
return null;
|
|
107747
107749
|
}
|
|
107748
107750
|
function buildPathWithBinaryFirst(pathEnv, binaryPath) {
|
|
107749
|
-
const preferredDir =
|
|
107751
|
+
const preferredDir = dirname26(binaryPath);
|
|
107750
107752
|
const existing = (pathEnv ?? "").split(delimiter2).filter((entry) => entry.length > 0 && entry !== preferredDir);
|
|
107751
107753
|
return [preferredDir, ...existing].join(delimiter2);
|
|
107752
107754
|
}
|
|
@@ -108524,7 +108526,7 @@ init_state();
|
|
|
108524
108526
|
// packages/omo-opencode/src/features/run-continuation-state/constants.ts
|
|
108525
108527
|
var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
|
|
108526
108528
|
// packages/omo-opencode/src/features/run-continuation-state/storage.ts
|
|
108527
|
-
import { existsSync as existsSync40, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as
|
|
108529
|
+
import { existsSync as existsSync40, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync3, writeFileSync as writeFileSync7 } from "node:fs";
|
|
108528
108530
|
import { join as join68 } from "node:path";
|
|
108529
108531
|
function getMarkerPath(directory, sessionID) {
|
|
108530
108532
|
return join68(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
|
|
@@ -108704,7 +108706,7 @@ init_agent_display_names();
|
|
|
108704
108706
|
// packages/omo-opencode/src/hooks/ralph-loop/storage.ts
|
|
108705
108707
|
init_frontmatter2();
|
|
108706
108708
|
import { existsSync as existsSync41, readFileSync as readFileSync22, writeFileSync as writeFileSync8, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "node:fs";
|
|
108707
|
-
import { dirname as
|
|
108709
|
+
import { dirname as dirname27, join as join70 } from "node:path";
|
|
108708
108710
|
|
|
108709
108711
|
// packages/omo-opencode/src/hooks/ralph-loop/constants.ts
|
|
108710
108712
|
var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
|
|
@@ -110546,8 +110548,8 @@ function getCategoryEffectiveVariant(categoryName, requirement, config4) {
|
|
|
110546
110548
|
}
|
|
110547
110549
|
|
|
110548
110550
|
// packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
|
|
110549
|
-
function formatCapabilityResolutionLabel(
|
|
110550
|
-
return
|
|
110551
|
+
function formatCapabilityResolutionLabel(mode2) {
|
|
110552
|
+
return mode2 ?? "unknown";
|
|
110551
110553
|
}
|
|
110552
110554
|
function buildModelResolutionDetails(options) {
|
|
110553
110555
|
const details = [];
|
|
@@ -110665,8 +110667,8 @@ function collectCapabilityResolutionIssues(info) {
|
|
|
110665
110667
|
const issues = [];
|
|
110666
110668
|
const allEntries = [...info.agents, ...info.categories];
|
|
110667
110669
|
const fallbackEntries = allEntries.filter((entry) => {
|
|
110668
|
-
const
|
|
110669
|
-
return
|
|
110670
|
+
const mode2 = entry.capabilityDiagnostics?.resolutionMode;
|
|
110671
|
+
return mode2 === "unknown";
|
|
110670
110672
|
});
|
|
110671
110673
|
if (fallbackEntries.length === 0) {
|
|
110672
110674
|
return issues;
|
|
@@ -110942,7 +110944,7 @@ init_src2();
|
|
|
110942
110944
|
import { existsSync as existsSync55 } from "node:fs";
|
|
110943
110945
|
import { createRequire as createRequire4 } from "node:module";
|
|
110944
110946
|
import { homedir as homedir19 } from "node:os";
|
|
110945
|
-
import { dirname as
|
|
110947
|
+
import { dirname as dirname32, join as join83 } from "node:path";
|
|
110946
110948
|
|
|
110947
110949
|
// packages/omo-opencode/src/hooks/comment-checker/downloader.ts
|
|
110948
110950
|
import { join as join82 } from "path";
|
|
@@ -111039,7 +111041,7 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
|
|
|
111039
111041
|
const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
|
|
111040
111042
|
const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
|
|
111041
111043
|
try {
|
|
111042
|
-
const packageDir = baseDirOverride ??
|
|
111044
|
+
const packageDir = baseDirOverride ?? dirname32(resolvePackageJsonPath());
|
|
111043
111045
|
const vendorPath = join83(packageDir, "vendor", platformKey, binaryName);
|
|
111044
111046
|
if (existsSync55(vendorPath))
|
|
111045
111047
|
return vendorPath;
|
|
@@ -111191,7 +111193,7 @@ async function getGhCliInfo(dependencies = {}) {
|
|
|
111191
111193
|
init_zod();
|
|
111192
111194
|
init_opencode_config_dir();
|
|
111193
111195
|
import { existsSync as existsSync56, readFileSync as readFileSync35 } from "node:fs";
|
|
111194
|
-
import { delimiter as delimiter3, dirname as
|
|
111196
|
+
import { delimiter as delimiter3, dirname as dirname33, resolve as resolve23 } from "node:path";
|
|
111195
111197
|
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
111196
111198
|
|
|
111197
111199
|
// packages/omo-opencode/src/mcp/cli-suffix.ts
|
|
@@ -111322,7 +111324,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
|
|
|
111322
111324
|
].join(";");
|
|
111323
111325
|
function getModuleDirectory(moduleUrl) {
|
|
111324
111326
|
try {
|
|
111325
|
-
return
|
|
111327
|
+
return dirname33(fileURLToPath7(moduleUrl));
|
|
111326
111328
|
} catch (error51) {
|
|
111327
111329
|
if (!(error51 instanceof Error))
|
|
111328
111330
|
throw error51;
|
|
@@ -112055,7 +112057,7 @@ async function pathExists2(path15) {
|
|
|
112055
112057
|
init_src2();
|
|
112056
112058
|
import { readdir as readdir15, readFile as readFile28, stat as stat7 } from "node:fs/promises";
|
|
112057
112059
|
import { homedir as homedir23 } from "node:os";
|
|
112058
|
-
import { dirname as
|
|
112060
|
+
import { dirname as dirname34, isAbsolute as isAbsolute13, join as join86, relative as relative9, resolve as resolve25, sep as sep9 } from "node:path";
|
|
112059
112061
|
var CODEX_COMPONENTS_CHECK_ID = "codex-components";
|
|
112060
112062
|
var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
|
|
112061
112063
|
var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
|
|
@@ -112129,7 +112131,7 @@ async function auditBundleTargets(pluginRoot) {
|
|
|
112129
112131
|
const manifest2 = await readJson2(manifestPath);
|
|
112130
112132
|
if (manifest2 === null || !isRecord13(manifest2["mcpServers"]))
|
|
112131
112133
|
continue;
|
|
112132
|
-
const manifestRoot =
|
|
112134
|
+
const manifestRoot = dirname34(manifestPath);
|
|
112133
112135
|
const isRootManifest = resolve25(manifestRoot) === resolve25(pluginRoot);
|
|
112134
112136
|
for (const server2 of Object.values(manifest2["mcpServers"])) {
|
|
112135
112137
|
if (!isRecord13(server2) || !Array.isArray(server2["args"]))
|
|
@@ -112150,7 +112152,7 @@ async function auditBundleTargets(pluginRoot) {
|
|
|
112150
112152
|
continue;
|
|
112151
112153
|
const commands2 = [];
|
|
112152
112154
|
collectHookCommands(manifest2, commands2);
|
|
112153
|
-
const hookPluginRoot =
|
|
112155
|
+
const hookPluginRoot = dirname34(dirname34(hookManifestPath));
|
|
112154
112156
|
for (const command of commands2) {
|
|
112155
112157
|
for (const relativePath of extractPluginRootPaths(command)) {
|
|
112156
112158
|
referencedCount += 1;
|
|
@@ -112189,7 +112191,7 @@ async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEsc
|
|
|
112189
112191
|
}
|
|
112190
112192
|
async function findHookManifestPaths(root) {
|
|
112191
112193
|
const paths3 = await findManifestPaths(root, "hooks.json");
|
|
112192
|
-
return paths3.filter((path15) =>
|
|
112194
|
+
return paths3.filter((path15) => dirname34(path15).endsWith(`${sep9}hooks`));
|
|
112193
112195
|
}
|
|
112194
112196
|
async function findManifestPaths(root, manifestName) {
|
|
112195
112197
|
let entries;
|
|
@@ -112708,8 +112710,8 @@ function formatVerbose(result) {
|
|
|
112708
112710
|
}
|
|
112709
112711
|
|
|
112710
112712
|
// packages/omo-opencode/src/cli/doctor/framework/formatter.ts
|
|
112711
|
-
function formatDoctorOutput(result,
|
|
112712
|
-
switch (
|
|
112713
|
+
function formatDoctorOutput(result, mode2) {
|
|
112714
|
+
switch (mode2) {
|
|
112713
112715
|
case "default":
|
|
112714
112716
|
return formatDefault(result);
|
|
112715
112717
|
case "status":
|
|
@@ -112873,7 +112875,7 @@ import {
|
|
|
112873
112875
|
unlinkSync as unlinkSync9,
|
|
112874
112876
|
writeFileSync as writeFileSync12
|
|
112875
112877
|
} from "node:fs";
|
|
112876
|
-
import { basename as basename12, dirname as
|
|
112878
|
+
import { basename as basename12, dirname as dirname35, join as join90 } from "node:path";
|
|
112877
112879
|
|
|
112878
112880
|
// packages/mcp-client-core/src/config-dir.ts
|
|
112879
112881
|
import { existsSync as existsSync61, realpathSync as realpathSync8 } from "node:fs";
|
|
@@ -113057,7 +113059,7 @@ function readLegacyStore() {
|
|
|
113057
113059
|
}
|
|
113058
113060
|
function writeTokenFile(filePath, token) {
|
|
113059
113061
|
try {
|
|
113060
|
-
const dir =
|
|
113062
|
+
const dir = dirname35(filePath);
|
|
113061
113063
|
if (!existsSync63(dir)) {
|
|
113062
113064
|
mkdirSync15(dir, { recursive: true });
|
|
113063
113065
|
}
|
|
@@ -114029,10 +114031,10 @@ function formatClassification(classification) {
|
|
|
114029
114031
|
return classification.ref.length > 0 ? `${head} ${classification.path} ${classification.ref}` : `${head} ${classification.path}`;
|
|
114030
114032
|
}
|
|
114031
114033
|
function formatSummary(result) {
|
|
114032
|
-
const
|
|
114034
|
+
const mode2 = result.apply ? "apply" : "dry-run";
|
|
114033
114035
|
const removed2 = result.repos.reduce((total, repo) => total + repo.removed.length, 0);
|
|
114034
114036
|
const failed = result.repos.reduce((total, repo) => total + repo.failed.length, 0);
|
|
114035
|
-
return `SUMMARY mode=${
|
|
114037
|
+
return `SUMMARY mode=${mode2} repos=${result.repos.length} sweep=${result.sweepCount} keep=${result.keepCount} prune=${result.pruneCount} removed=${removed2} failed=${failed}`;
|
|
114036
114038
|
}
|
|
114037
114039
|
function formatResult(result) {
|
|
114038
114040
|
const lines = [];
|
|
@@ -114554,9 +114556,9 @@ Examples:
|
|
|
114554
114556
|
`).action(async (options) => {
|
|
114555
114557
|
const rootOptions = program2.opts();
|
|
114556
114558
|
const rootDoctorPlatform = rootOptions.platform === "opencode" || rootOptions.platform === "codex" ? rootOptions.platform : undefined;
|
|
114557
|
-
const
|
|
114559
|
+
const mode2 = options.status ? "status" : options.verbose ? "verbose" : "default";
|
|
114558
114560
|
const doctorOptions = {
|
|
114559
|
-
mode,
|
|
114561
|
+
mode: mode2,
|
|
114560
114562
|
json: options.json ?? false,
|
|
114561
114563
|
target: resolveDoctorTarget(process.env.OMO_INVOCATION_NAME, options.platform ?? rootDoctorPlatform)
|
|
114562
114564
|
};
|