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/index.js
CHANGED
|
@@ -54,7 +54,7 @@ var package_default;
|
|
|
54
54
|
var init_package = __esm(() => {
|
|
55
55
|
package_default = {
|
|
56
56
|
name: "oh-my-opencode",
|
|
57
|
-
version: "5.0.0-beta.
|
|
57
|
+
version: "5.0.0-beta.23",
|
|
58
58
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
59
59
|
main: "./dist/index.js",
|
|
60
60
|
types: "dist/index.d.ts",
|
|
@@ -235,7 +235,7 @@ var init_package = __esm(() => {
|
|
|
235
235
|
zod: "^4.4.3"
|
|
236
236
|
},
|
|
237
237
|
devDependencies: {
|
|
238
|
-
"@code-yeongyu/senpi": "2026.8.
|
|
238
|
+
"@code-yeongyu/senpi": "2026.8.27",
|
|
239
239
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
240
240
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
241
241
|
"@oh-my-opencode/boulder-state": "workspace:*",
|
|
@@ -276,18 +276,18 @@ var init_package = __esm(() => {
|
|
|
276
276
|
typescript: "^7.0.2"
|
|
277
277
|
},
|
|
278
278
|
optionalDependencies: {
|
|
279
|
-
"oh-my-opencode-darwin-arm64": "5.0.0-beta.
|
|
280
|
-
"oh-my-opencode-darwin-x64": "5.0.0-beta.
|
|
281
|
-
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.
|
|
282
|
-
"oh-my-opencode-linux-arm64": "5.0.0-beta.
|
|
283
|
-
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.
|
|
284
|
-
"oh-my-opencode-linux-x64": "5.0.0-beta.
|
|
285
|
-
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.
|
|
286
|
-
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.
|
|
287
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.
|
|
288
|
-
"oh-my-opencode-windows-arm64": "5.0.0-beta.
|
|
289
|
-
"oh-my-opencode-windows-x64": "5.0.0-beta.
|
|
290
|
-
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.
|
|
279
|
+
"oh-my-opencode-darwin-arm64": "5.0.0-beta.23",
|
|
280
|
+
"oh-my-opencode-darwin-x64": "5.0.0-beta.23",
|
|
281
|
+
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.23",
|
|
282
|
+
"oh-my-opencode-linux-arm64": "5.0.0-beta.23",
|
|
283
|
+
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.23",
|
|
284
|
+
"oh-my-opencode-linux-x64": "5.0.0-beta.23",
|
|
285
|
+
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.23",
|
|
286
|
+
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.23",
|
|
287
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.23",
|
|
288
|
+
"oh-my-opencode-windows-arm64": "5.0.0-beta.23",
|
|
289
|
+
"oh-my-opencode-windows-x64": "5.0.0-beta.23",
|
|
290
|
+
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.23"
|
|
291
291
|
},
|
|
292
292
|
overrides: {
|
|
293
293
|
"@earendil-works/pi-agent-core": "0.84.2",
|
|
@@ -303,7 +303,10 @@ var init_package = __esm(() => {
|
|
|
303
303
|
},
|
|
304
304
|
trustedDependencies: [
|
|
305
305
|
"@code-yeongyu/comment-checker"
|
|
306
|
-
]
|
|
306
|
+
],
|
|
307
|
+
patchedDependencies: {
|
|
308
|
+
"@code-yeongyu/senpi@2026.8.27": "patches/@code-yeongyu%2Fsenpi@2026.8.27.patch"
|
|
309
|
+
}
|
|
307
310
|
};
|
|
308
311
|
});
|
|
309
312
|
|
|
@@ -4813,9 +4816,12 @@ import {
|
|
|
4813
4816
|
fsyncSync,
|
|
4814
4817
|
openSync,
|
|
4815
4818
|
renameSync,
|
|
4819
|
+
rmSync,
|
|
4816
4820
|
unlinkSync,
|
|
4817
4821
|
writeFileSync
|
|
4818
4822
|
} from "fs";
|
|
4823
|
+
import { randomUUID } from "crypto";
|
|
4824
|
+
import { dirname } from "path";
|
|
4819
4825
|
function isToleratedFsyncError(error) {
|
|
4820
4826
|
if (!(error instanceof Error))
|
|
4821
4827
|
return false;
|
|
@@ -4831,24 +4837,36 @@ function tolerantFsyncSync(fileDescriptor, fsyncImpl) {
|
|
|
4831
4837
|
}
|
|
4832
4838
|
}
|
|
4833
4839
|
function writeFileAtomically(filePath, content, options = {}) {
|
|
4834
|
-
const
|
|
4835
|
-
|
|
4836
|
-
const
|
|
4837
|
-
try {
|
|
4838
|
-
tolerantFsyncSync(tempFileDescriptor, options.fsyncSync ?? fsyncSync);
|
|
4839
|
-
} finally {
|
|
4840
|
-
closeSync(tempFileDescriptor);
|
|
4841
|
-
}
|
|
4840
|
+
const platform = options.platform ?? process.platform;
|
|
4841
|
+
const fsyncImpl = options.fsyncSync ?? fsyncSync;
|
|
4842
|
+
const tempPath = `${filePath}.${process.pid}.${randomUUID()}.tmp`;
|
|
4842
4843
|
try {
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4844
|
+
writeFileSync(tempPath, content, "utf-8");
|
|
4845
|
+
const tempFileDescriptor = openSync(tempPath, "r+");
|
|
4846
|
+
try {
|
|
4847
|
+
tolerantFsyncSync(tempFileDescriptor, fsyncImpl);
|
|
4848
|
+
} finally {
|
|
4849
|
+
closeSync(tempFileDescriptor);
|
|
4850
|
+
}
|
|
4851
|
+
try {
|
|
4852
|
+
renameSync(tempPath, filePath);
|
|
4853
|
+
} catch (error) {
|
|
4854
|
+
const isPermissionError = error instanceof Error && (error.message.includes("EPERM") || error.message.includes("EACCES"));
|
|
4855
|
+
if (platform !== "win32" || !isPermissionError)
|
|
4856
|
+
throw error;
|
|
4847
4857
|
unlinkSync(filePath);
|
|
4848
4858
|
renameSync(tempPath, filePath);
|
|
4859
|
+
}
|
|
4860
|
+
if (platform === "win32")
|
|
4849
4861
|
return;
|
|
4862
|
+
const directoryFileDescriptor = openSync(dirname(filePath), "r");
|
|
4863
|
+
try {
|
|
4864
|
+
tolerantFsyncSync(directoryFileDescriptor, fsyncImpl);
|
|
4865
|
+
} finally {
|
|
4866
|
+
closeSync(directoryFileDescriptor);
|
|
4850
4867
|
}
|
|
4851
|
-
|
|
4868
|
+
} finally {
|
|
4869
|
+
rmSync(tempPath, { force: true });
|
|
4852
4870
|
}
|
|
4853
4871
|
}
|
|
4854
4872
|
var TOLERATED_FSYNC_CODES;
|
|
@@ -20554,6 +20572,25 @@ var init_telemetry = __esm(() => {
|
|
|
20554
20572
|
}).strict();
|
|
20555
20573
|
});
|
|
20556
20574
|
|
|
20575
|
+
// packages/omo-config-core/src/schema/format-on-mutation.ts
|
|
20576
|
+
var mode, languages, OmoFormatOnMutationLayerSchema, OmoFormatOnMutationSchema;
|
|
20577
|
+
var init_format_on_mutation = __esm(() => {
|
|
20578
|
+
init_zod();
|
|
20579
|
+
mode = _enum2(["off", "best-effort", "required"]);
|
|
20580
|
+
languages = record(string2(), boolean2()).optional();
|
|
20581
|
+
OmoFormatOnMutationLayerSchema = object({
|
|
20582
|
+
mode: mode.optional(),
|
|
20583
|
+
languages,
|
|
20584
|
+
maxFileBytes: number2().int().positive().optional(),
|
|
20585
|
+
timeoutMs: number2().int().positive().optional()
|
|
20586
|
+
}).strict();
|
|
20587
|
+
OmoFormatOnMutationSchema = OmoFormatOnMutationLayerSchema.extend({
|
|
20588
|
+
mode: mode.default("best-effort"),
|
|
20589
|
+
maxFileBytes: number2().int().positive().default(1048576),
|
|
20590
|
+
timeoutMs: number2().int().positive().default(3000)
|
|
20591
|
+
}).strict();
|
|
20592
|
+
});
|
|
20593
|
+
|
|
20557
20594
|
// packages/omo-config-core/src/schema/config.ts
|
|
20558
20595
|
var OmoOpenCodeHarnessConfigSchema, OmoTypedHarnessConfigSchema, OmoConfigProfileSchema, OmoConfigSchema, OmoConfigLayerSchema;
|
|
20559
20596
|
var init_config = __esm(() => {
|
|
@@ -20567,8 +20604,10 @@ var init_config = __esm(() => {
|
|
|
20567
20604
|
init_task();
|
|
20568
20605
|
init_team();
|
|
20569
20606
|
init_telemetry();
|
|
20607
|
+
init_format_on_mutation();
|
|
20570
20608
|
OmoOpenCodeHarnessConfigSchema = record(string2(), unknown());
|
|
20571
20609
|
OmoTypedHarnessConfigSchema = object({
|
|
20610
|
+
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
20572
20611
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20573
20612
|
agents: OmoAgentsConfigSchema.optional(),
|
|
20574
20613
|
codegraph: OmoCodegraphSettingsLayerSchema.optional(),
|
|
@@ -20580,6 +20619,7 @@ var init_config = __esm(() => {
|
|
|
20580
20619
|
telemetry: OmoTelemetrySettingsLayerSchema.optional()
|
|
20581
20620
|
}).strict();
|
|
20582
20621
|
OmoConfigProfileSchema = object({
|
|
20622
|
+
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
20583
20623
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20584
20624
|
agents: OmoAgentsConfigSchema.optional(),
|
|
20585
20625
|
codegraph: OmoCodegraphSettingsLayerSchema.optional(),
|
|
@@ -20594,6 +20634,7 @@ var init_config = __esm(() => {
|
|
|
20594
20634
|
"[codex]": OmoTypedHarnessConfigSchema.optional()
|
|
20595
20635
|
}).strict();
|
|
20596
20636
|
OmoConfigSchema = object({
|
|
20637
|
+
formatOnMutation: OmoFormatOnMutationSchema.optional(),
|
|
20597
20638
|
$schema: string2().optional(),
|
|
20598
20639
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20599
20640
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -20612,6 +20653,7 @@ var init_config = __esm(() => {
|
|
|
20612
20653
|
legacy_migrations: record(string2(), unknown()).optional()
|
|
20613
20654
|
}).strict();
|
|
20614
20655
|
OmoConfigLayerSchema = object({
|
|
20656
|
+
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
20615
20657
|
$schema: string2().optional(),
|
|
20616
20658
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20617
20659
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -20638,6 +20680,7 @@ var init_schema = __esm(() => {
|
|
|
20638
20680
|
init_codegraph();
|
|
20639
20681
|
init_config();
|
|
20640
20682
|
init_fallback_models();
|
|
20683
|
+
init_format_on_mutation();
|
|
20641
20684
|
init_git_master();
|
|
20642
20685
|
init_harness();
|
|
20643
20686
|
init_memory();
|
|
@@ -20707,7 +20750,7 @@ var init_types = __esm(() => {
|
|
|
20707
20750
|
|
|
20708
20751
|
// packages/omo-config-core/src/loader/paths.ts
|
|
20709
20752
|
import { userInfo } from "os";
|
|
20710
|
-
import { dirname, join as join3, posix, resolve } from "path";
|
|
20753
|
+
import { dirname as dirname2, join as join3, posix, resolve } from "path";
|
|
20711
20754
|
function resolveHomeDir(env = process.env) {
|
|
20712
20755
|
const homeDir = env.HOME ?? env.USERPROFILE ?? process.cwd();
|
|
20713
20756
|
return homeDir.startsWith("/") ? posix.resolve(homeDir) : toPosixPath(resolve(homeDir));
|
|
@@ -20772,7 +20815,7 @@ function findProjectConfigPathsFarthestFirst(cwd, homeDir, fileSystem, accountHo
|
|
|
20772
20815
|
nearestFirst.push(configPath);
|
|
20773
20816
|
if (isHomeDir)
|
|
20774
20817
|
break;
|
|
20775
|
-
const parentDir =
|
|
20818
|
+
const parentDir = dirname2(currentDir);
|
|
20776
20819
|
if (parentDir === currentDir)
|
|
20777
20820
|
break;
|
|
20778
20821
|
currentDir = parentDir;
|
|
@@ -21212,8 +21255,8 @@ var init_jsonc_parse = __esm(() => {
|
|
|
21212
21255
|
});
|
|
21213
21256
|
|
|
21214
21257
|
// packages/omo-config-core/src/writer/writer.ts
|
|
21215
|
-
import { randomUUID } from "crypto";
|
|
21216
|
-
import { dirname as
|
|
21258
|
+
import { randomUUID as randomUUID2 } from "crypto";
|
|
21259
|
+
import { dirname as dirname3, join as join4, posix as posix2 } from "path";
|
|
21217
21260
|
function backupSuffix() {
|
|
21218
21261
|
return new Date().toISOString().replace(/[:.]/g, "-");
|
|
21219
21262
|
}
|
|
@@ -21246,20 +21289,20 @@ function resolveWritePath(options) {
|
|
|
21246
21289
|
const jsoncPath2 = resolveUserOmoConfigPath(options.env);
|
|
21247
21290
|
if (fileSystem.existsSync(jsoncPath2))
|
|
21248
21291
|
return jsoncPath2;
|
|
21249
|
-
const jsonPath2 = join4(
|
|
21292
|
+
const jsonPath2 = join4(dirname3(jsoncPath2), "omo.json");
|
|
21250
21293
|
return fileSystem.existsSync(jsonPath2) ? jsonPath2 : jsoncPath2;
|
|
21251
21294
|
}
|
|
21252
21295
|
const jsoncPath = join4(options.projectDir ?? process.cwd(), ".omo", "omo.jsonc");
|
|
21253
21296
|
if (fileSystem.existsSync(jsoncPath))
|
|
21254
21297
|
return jsoncPath;
|
|
21255
|
-
const jsonPath = join4(
|
|
21298
|
+
const jsonPath = join4(dirname3(jsoncPath), "omo.json");
|
|
21256
21299
|
return fileSystem.existsSync(jsonPath) ? jsonPath : jsoncPath;
|
|
21257
21300
|
}
|
|
21258
21301
|
function directoryPath(path4) {
|
|
21259
|
-
return path4.startsWith("/") ? posix2.dirname(path4) :
|
|
21302
|
+
return path4.startsWith("/") ? posix2.dirname(path4) : dirname3(path4);
|
|
21260
21303
|
}
|
|
21261
21304
|
function writeAtomically(path4, content, fileSystem) {
|
|
21262
|
-
const tempPath = `${path4}.${
|
|
21305
|
+
const tempPath = `${path4}.${randomUUID2()}.tmp`;
|
|
21263
21306
|
let tempCreated = false;
|
|
21264
21307
|
try {
|
|
21265
21308
|
fileSystem.writeFileExclusiveSync(tempPath, content);
|
|
@@ -21542,7 +21585,7 @@ var init_types3 = __esm(() => {
|
|
|
21542
21585
|
});
|
|
21543
21586
|
|
|
21544
21587
|
// packages/omo-config-core/src/migration/commit.ts
|
|
21545
|
-
import { basename, dirname as
|
|
21588
|
+
import { basename, dirname as dirname4, join as join5, resolve as resolve2 } from "path";
|
|
21546
21589
|
function parseDocument(path4, content) {
|
|
21547
21590
|
const parsed = parseJsoncSafe2(content);
|
|
21548
21591
|
if (parsed.errors.length > 0 || !isPlainObject5(parsed.data)) {
|
|
@@ -21576,11 +21619,11 @@ function writerInput(targetPath, env) {
|
|
|
21576
21619
|
const homeDir = resolveHomeDir(env);
|
|
21577
21620
|
const userDirectory = toPosixPath(join5(homeDir, ".omo"));
|
|
21578
21621
|
const fileName = basename(targetPath);
|
|
21579
|
-
if (toPosixPath(
|
|
21622
|
+
if (toPosixPath(dirname4(targetPath)) === userDirectory && (fileName === "omo.json" || fileName === "omo.jsonc")) {
|
|
21580
21623
|
return { scope: "user" };
|
|
21581
21624
|
}
|
|
21582
|
-
if (basename(
|
|
21583
|
-
return { projectDir:
|
|
21625
|
+
if (basename(dirname4(targetPath)) === ".omo" && (fileName === "omo.json" || fileName === "omo.jsonc")) {
|
|
21626
|
+
return { projectDir: dirname4(dirname4(targetPath)), scope: "project" };
|
|
21584
21627
|
}
|
|
21585
21628
|
throw new MigrationTransactionError(`Migration target is not an omo config path: ${targetPath}`);
|
|
21586
21629
|
}
|
|
@@ -21943,7 +21986,7 @@ var init_recovery = __esm(() => {
|
|
|
21943
21986
|
});
|
|
21944
21987
|
|
|
21945
21988
|
// packages/omo-config-core/src/migration/batch.ts
|
|
21946
|
-
import { dirname as
|
|
21989
|
+
import { dirname as dirname5, posix as posix3 } from "path";
|
|
21947
21990
|
function parseSource(path4, content) {
|
|
21948
21991
|
const parsed = parseJsoncSafe2(content);
|
|
21949
21992
|
if (parsed.errors.length > 0) {
|
|
@@ -21992,7 +22035,7 @@ function assertSafeSourcePaths(sources, protectedPaths) {
|
|
|
21992
22035
|
}
|
|
21993
22036
|
}
|
|
21994
22037
|
function directoryPath2(path4) {
|
|
21995
|
-
return path4.startsWith("/") ? posix3.dirname(path4) :
|
|
22038
|
+
return path4.startsWith("/") ? posix3.dirname(path4) : dirname5(path4);
|
|
21996
22039
|
}
|
|
21997
22040
|
function ensureBackupDirectories(moves, fileSystem) {
|
|
21998
22041
|
for (const move of moves)
|
|
@@ -22623,7 +22666,7 @@ var init_process_sweep = () => {};
|
|
|
22623
22666
|
// packages/utils/src/codegraph/resolve.ts
|
|
22624
22667
|
import { existsSync as existsSync7 } from "fs";
|
|
22625
22668
|
import { spawnSync } from "child_process";
|
|
22626
|
-
import { basename as basename2, dirname as
|
|
22669
|
+
import { basename as basename2, dirname as dirname6, join as join10 } from "path";
|
|
22627
22670
|
import { createRequire } from "module";
|
|
22628
22671
|
function defaultNodeVersion(nodePath) {
|
|
22629
22672
|
if (nodePath === process.execPath && isNodeExecutableName(nodePath))
|
|
@@ -23962,27 +24005,20 @@ var init_agent_model_requirements = __esm(() => {
|
|
|
23962
24005
|
sisyphus: {
|
|
23963
24006
|
fallbackChain: [
|
|
23964
24007
|
{
|
|
23965
|
-
providers: ["anthropic", "github-copilot", "opencode"
|
|
24008
|
+
providers: ["anthropic", "github-copilot", "opencode"],
|
|
23966
24009
|
model: "claude-opus-5",
|
|
23967
24010
|
variant: "max"
|
|
23968
24011
|
},
|
|
23969
24012
|
{
|
|
23970
|
-
providers: [
|
|
23971
|
-
"opencode-go",
|
|
23972
|
-
"kimi-for-coding",
|
|
23973
|
-
"moonshotai",
|
|
23974
|
-
"opencode",
|
|
23975
|
-
"vercel",
|
|
23976
|
-
"bailian-coding-plan",
|
|
23977
|
-
"moonshotai-cn",
|
|
23978
|
-
"firmware",
|
|
23979
|
-
"ollama-cloud",
|
|
23980
|
-
"aihubmix"
|
|
23981
|
-
],
|
|
24013
|
+
providers: ["opencode-go", "kimi-for-coding", "moonshotai", "opencode", "bailian-coding-plan", "moonshotai-cn", "firmware", "ollama-cloud", "aihubmix"],
|
|
23982
24014
|
model: "kimi-k3"
|
|
23983
24015
|
},
|
|
23984
|
-
{
|
|
23985
|
-
|
|
24016
|
+
{
|
|
24017
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
24018
|
+
model: "gpt-5.6-sol",
|
|
24019
|
+
variant: "medium"
|
|
24020
|
+
},
|
|
24021
|
+
{ providers: ["zai-coding-plan", "opencode", "bailian-coding-plan"], model: "glm-5.2" },
|
|
23986
24022
|
{ providers: ["opencode"], model: "big-pickle" }
|
|
23987
24023
|
],
|
|
23988
24024
|
requiresAnyModel: true
|
|
@@ -23990,154 +24026,136 @@ var init_agent_model_requirements = __esm(() => {
|
|
|
23990
24026
|
hephaestus: {
|
|
23991
24027
|
fallbackChain: [
|
|
23992
24028
|
{
|
|
23993
|
-
providers: ["openai", "
|
|
24029
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
23994
24030
|
model: "gpt-5.6-sol",
|
|
23995
24031
|
variant: "medium"
|
|
23996
24032
|
}
|
|
23997
24033
|
],
|
|
23998
|
-
requiresProvider: ["openai", "
|
|
24034
|
+
requiresProvider: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
23999
24035
|
requiresAnyModel: true
|
|
24000
24036
|
},
|
|
24001
24037
|
oracle: {
|
|
24002
24038
|
fallbackChain: [
|
|
24039
|
+
{ providers: ["openai", "openai-codex", "opencode"], model: "gpt-5.6-sol", variant: "xhigh" },
|
|
24040
|
+
{ providers: ["github-copilot"], model: "gpt-5.6-sol", variant: "high" },
|
|
24003
24041
|
{
|
|
24004
|
-
providers: ["
|
|
24005
|
-
model: "gpt-5.6-sol",
|
|
24006
|
-
variant: "xhigh"
|
|
24007
|
-
},
|
|
24008
|
-
{
|
|
24009
|
-
providers: ["github-copilot"],
|
|
24010
|
-
model: "gpt-5.6-sol",
|
|
24011
|
-
variant: "high"
|
|
24012
|
-
},
|
|
24013
|
-
{
|
|
24014
|
-
providers: ["google", "github-copilot", "opencode", "vercel"],
|
|
24042
|
+
providers: ["google", "github-copilot", "opencode"],
|
|
24015
24043
|
model: "gemini-3.1-pro",
|
|
24016
24044
|
variant: "high"
|
|
24017
24045
|
},
|
|
24018
24046
|
{
|
|
24019
|
-
providers: ["anthropic", "github-copilot", "opencode"
|
|
24047
|
+
providers: ["anthropic", "github-copilot", "opencode"],
|
|
24020
24048
|
model: "claude-opus-5",
|
|
24021
24049
|
variant: "max"
|
|
24022
24050
|
},
|
|
24023
|
-
{ providers: ["opencode-go"
|
|
24051
|
+
{ providers: ["opencode-go"], model: "glm-5.2" }
|
|
24024
24052
|
]
|
|
24025
24053
|
},
|
|
24026
24054
|
librarian: {
|
|
24027
24055
|
fallbackChain: [
|
|
24028
|
-
{ providers: ["openai"], model: "gpt-5.6-luna-fast", variant: "low" },
|
|
24056
|
+
{ providers: ["openai", "openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
|
|
24029
24057
|
{ providers: ["deepseek"], model: "deepseek-v4-flash", variant: "max" },
|
|
24030
24058
|
{ providers: ["opencode-go", "bailian-coding-plan"], model: "qwen3.7-plus" },
|
|
24031
|
-
{ providers: ["
|
|
24032
|
-
{ providers: ["opencode-go", "vercel"], model: "minimax-m3" },
|
|
24059
|
+
{ providers: ["opencode-go"], model: "minimax-m3" },
|
|
24033
24060
|
{ providers: ["minimax-coding-plan", "minimax-cn-coding-plan"], model: "MiniMax-M3" },
|
|
24034
|
-
{ providers: ["opencode-go"
|
|
24035
|
-
{ providers: ["anthropic", "github-copilot"
|
|
24036
|
-
{ providers: ["openai", "
|
|
24061
|
+
{ providers: ["opencode-go"], model: "minimax-m2.7" },
|
|
24062
|
+
{ providers: ["anthropic", "github-copilot"], model: "claude-haiku-4-5" },
|
|
24063
|
+
{ providers: ["openai", "openai-codex"], model: "gpt-5.4-nano" }
|
|
24037
24064
|
]
|
|
24038
24065
|
},
|
|
24039
24066
|
explore: {
|
|
24040
24067
|
fallbackChain: [
|
|
24041
|
-
{ providers: ["openai"], model: "gpt-5.6-luna-fast", variant: "low" },
|
|
24068
|
+
{ providers: ["openai", "openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
|
|
24042
24069
|
{ providers: ["deepseek"], model: "deepseek-v4-flash", variant: "max" },
|
|
24043
24070
|
{ providers: ["opencode-go", "bailian-coding-plan"], model: "qwen3.7-plus" },
|
|
24044
|
-
{ providers: ["
|
|
24045
|
-
{ providers: ["opencode-go", "vercel"], model: "minimax-m3" },
|
|
24071
|
+
{ providers: ["opencode-go"], model: "minimax-m3" },
|
|
24046
24072
|
{ providers: ["minimax-coding-plan", "minimax-cn-coding-plan"], model: "MiniMax-M3" },
|
|
24047
|
-
{ providers: ["opencode-go"
|
|
24048
|
-
{ providers: ["anthropic", "github-copilot"
|
|
24049
|
-
{ providers: ["openai", "
|
|
24073
|
+
{ providers: ["opencode-go"], model: "minimax-m2.7" },
|
|
24074
|
+
{ providers: ["anthropic", "github-copilot"], model: "claude-haiku-4-5" },
|
|
24075
|
+
{ providers: ["openai", "openai-codex"], model: "gpt-5.4-nano" }
|
|
24050
24076
|
]
|
|
24051
24077
|
},
|
|
24052
24078
|
"multimodal-looker": {
|
|
24053
24079
|
fallbackChain: [
|
|
24054
|
-
{ providers: ["openai", "
|
|
24055
|
-
{ providers: ["opencode-go"
|
|
24056
|
-
{ providers: ["zai-coding-plan"
|
|
24057
|
-
{ providers: ["openai", "
|
|
24080
|
+
{ providers: ["openai", "openai-codex", "opencode"], model: "gpt-5.6-sol", variant: "low" },
|
|
24081
|
+
{ providers: ["opencode-go"], model: "kimi-k3" },
|
|
24082
|
+
{ providers: ["zai-coding-plan"], model: "glm-4.6v" },
|
|
24083
|
+
{ providers: ["openai", "openai-codex", "github-copilot", "opencode"], model: "gpt-5-nano" }
|
|
24058
24084
|
]
|
|
24059
24085
|
},
|
|
24060
24086
|
prometheus: {
|
|
24061
24087
|
fallbackChain: [
|
|
24062
24088
|
{
|
|
24063
|
-
providers: ["anthropic", "github-copilot", "opencode"
|
|
24089
|
+
providers: ["anthropic", "github-copilot", "opencode"],
|
|
24064
24090
|
model: "claude-fable-5",
|
|
24065
24091
|
variant: "xhigh"
|
|
24066
24092
|
},
|
|
24067
|
-
{
|
|
24093
|
+
{
|
|
24094
|
+
providers: ["opencode-go", "kimi-for-coding", "moonshotai", "opencode"],
|
|
24095
|
+
model: "kimi-k3",
|
|
24096
|
+
variant: "max"
|
|
24097
|
+
}
|
|
24068
24098
|
]
|
|
24069
24099
|
},
|
|
24070
24100
|
metis: {
|
|
24071
24101
|
fallbackChain: [
|
|
24072
24102
|
{
|
|
24073
|
-
providers: ["anthropic", "github-copilot", "opencode"
|
|
24103
|
+
providers: ["anthropic", "github-copilot", "opencode"],
|
|
24074
24104
|
model: "claude-opus-5",
|
|
24075
24105
|
variant: "high"
|
|
24076
24106
|
},
|
|
24077
|
-
{
|
|
24107
|
+
{
|
|
24108
|
+
providers: ["opencode-go", "kimi-for-coding", "moonshotai", "opencode"],
|
|
24109
|
+
model: "kimi-k3",
|
|
24110
|
+
variant: "low"
|
|
24111
|
+
}
|
|
24078
24112
|
]
|
|
24079
24113
|
},
|
|
24080
24114
|
momus: {
|
|
24081
24115
|
fallbackChain: [
|
|
24116
|
+
{ providers: ["openai", "openai-codex"], model: "gpt-5.6-terra", variant: "high" },
|
|
24117
|
+
{ providers: ["github-copilot"], model: "gpt-5.6-terra", variant: "high" },
|
|
24118
|
+
{ providers: ["openai", "openai-codex", "opencode"], model: "gpt-5.6-sol", variant: "xhigh" },
|
|
24119
|
+
{ providers: ["github-copilot"], model: "gpt-5.6-sol", variant: "high" },
|
|
24082
24120
|
{
|
|
24083
|
-
providers: ["
|
|
24084
|
-
model: "gpt-5.6-terra",
|
|
24085
|
-
variant: "high"
|
|
24086
|
-
},
|
|
24087
|
-
{
|
|
24088
|
-
providers: ["github-copilot"],
|
|
24089
|
-
model: "gpt-5.6-terra",
|
|
24090
|
-
variant: "high"
|
|
24091
|
-
},
|
|
24092
|
-
{
|
|
24093
|
-
providers: ["openai", "opencode", "vercel"],
|
|
24094
|
-
model: "gpt-5.6-sol",
|
|
24095
|
-
variant: "xhigh"
|
|
24096
|
-
},
|
|
24097
|
-
{
|
|
24098
|
-
providers: ["github-copilot"],
|
|
24099
|
-
model: "gpt-5.6-sol",
|
|
24100
|
-
variant: "high"
|
|
24101
|
-
},
|
|
24102
|
-
{
|
|
24103
|
-
providers: ["anthropic", "github-copilot", "opencode", "vercel"],
|
|
24121
|
+
providers: ["anthropic", "github-copilot", "opencode"],
|
|
24104
24122
|
model: "claude-opus-5",
|
|
24105
24123
|
variant: "max"
|
|
24106
24124
|
},
|
|
24107
24125
|
{
|
|
24108
|
-
providers: ["google", "github-copilot", "opencode"
|
|
24126
|
+
providers: ["google", "github-copilot", "opencode"],
|
|
24109
24127
|
model: "gemini-3.1-pro",
|
|
24110
24128
|
variant: "high"
|
|
24111
24129
|
},
|
|
24112
|
-
{ providers: ["opencode-go"
|
|
24130
|
+
{ providers: ["opencode-go"], model: "glm-5.2" }
|
|
24113
24131
|
]
|
|
24114
24132
|
},
|
|
24115
24133
|
atlas: {
|
|
24116
24134
|
fallbackChain: [
|
|
24117
|
-
{ providers: ["anthropic", "github-copilot", "opencode"
|
|
24118
|
-
{ providers: ["opencode-go"
|
|
24135
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-5" },
|
|
24136
|
+
{ providers: ["opencode-go"], model: "kimi-k3" },
|
|
24119
24137
|
{
|
|
24120
|
-
providers: ["openai", "
|
|
24138
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
24121
24139
|
model: "gpt-5.6-sol",
|
|
24122
24140
|
variant: "medium"
|
|
24123
24141
|
},
|
|
24124
|
-
{ providers: ["opencode-go"
|
|
24142
|
+
{ providers: ["opencode-go"], model: "minimax-m3" },
|
|
24125
24143
|
{ providers: ["minimax-coding-plan", "minimax-cn-coding-plan"], model: "MiniMax-M3" },
|
|
24126
|
-
{ providers: ["opencode-go"
|
|
24144
|
+
{ providers: ["opencode-go"], model: "minimax-m2.7" }
|
|
24127
24145
|
]
|
|
24128
24146
|
},
|
|
24129
24147
|
"sisyphus-junior": {
|
|
24130
24148
|
fallbackChain: [
|
|
24131
|
-
{ providers: ["anthropic", "github-copilot", "opencode"
|
|
24132
|
-
{ providers: ["opencode-go"
|
|
24149
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-5" },
|
|
24150
|
+
{ providers: ["opencode-go"], model: "kimi-k3" },
|
|
24133
24151
|
{
|
|
24134
|
-
providers: ["openai", "
|
|
24152
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
24135
24153
|
model: "gpt-5.6-sol",
|
|
24136
24154
|
variant: "medium"
|
|
24137
24155
|
},
|
|
24138
|
-
{ providers: ["opencode-go"
|
|
24156
|
+
{ providers: ["opencode-go"], model: "minimax-m3" },
|
|
24139
24157
|
{ providers: ["minimax-coding-plan", "minimax-cn-coding-plan"], model: "MiniMax-M3" },
|
|
24140
|
-
{ providers: ["opencode-go"
|
|
24158
|
+
{ providers: ["opencode-go"], model: "minimax-m2.7" },
|
|
24141
24159
|
{ providers: ["opencode"], model: "big-pickle" }
|
|
24142
24160
|
]
|
|
24143
24161
|
}
|
|
@@ -24151,22 +24169,18 @@ var init_category_model_requirements = __esm(() => {
|
|
|
24151
24169
|
"visual-engineering": {
|
|
24152
24170
|
fallbackChain: [
|
|
24153
24171
|
{
|
|
24154
|
-
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"
|
|
24172
|
+
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
24155
24173
|
model: "claude-opus-5",
|
|
24156
24174
|
variant: "max"
|
|
24157
24175
|
},
|
|
24158
24176
|
{
|
|
24159
|
-
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"
|
|
24177
|
+
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
|
|
24160
24178
|
model: "kimi-k3",
|
|
24161
24179
|
variant: "max"
|
|
24162
24180
|
},
|
|
24181
|
+
{ providers: ["zai-coding-plan", "opencode-go"], model: "glm-5.2", variant: "max" },
|
|
24163
24182
|
{
|
|
24164
|
-
providers: ["
|
|
24165
|
-
model: "glm-5.2",
|
|
24166
|
-
variant: "max"
|
|
24167
|
-
},
|
|
24168
|
-
{
|
|
24169
|
-
providers: ["openai", "quotio-openai", "github-copilot", "opencode", "vercel"],
|
|
24183
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
24170
24184
|
model: "gpt-5.6-sol",
|
|
24171
24185
|
variant: "medium"
|
|
24172
24186
|
}
|
|
@@ -24174,27 +24188,15 @@ var init_category_model_requirements = __esm(() => {
|
|
|
24174
24188
|
},
|
|
24175
24189
|
ultrabrain: {
|
|
24176
24190
|
fallbackChain: [
|
|
24177
|
-
{
|
|
24178
|
-
|
|
24179
|
-
|
|
24180
|
-
variant: "max"
|
|
24181
|
-
},
|
|
24182
|
-
{
|
|
24183
|
-
providers: ["github-copilot"],
|
|
24184
|
-
model: "gpt-5.6-sol",
|
|
24185
|
-
variant: "max"
|
|
24186
|
-
},
|
|
24187
|
-
{
|
|
24188
|
-
providers: ["openai", "opencode", "vercel"],
|
|
24189
|
-
model: "gpt-5.6-sol",
|
|
24190
|
-
variant: "max"
|
|
24191
|
-
}
|
|
24191
|
+
{ providers: ["openai", "openai-codex"], model: "gpt-5.6-sol", variant: "max" },
|
|
24192
|
+
{ providers: ["github-copilot"], model: "gpt-5.6-sol", variant: "max" },
|
|
24193
|
+
{ providers: ["openai", "openai-codex", "opencode"], model: "gpt-5.6-sol", variant: "max" }
|
|
24192
24194
|
]
|
|
24193
24195
|
},
|
|
24194
24196
|
deep: {
|
|
24195
24197
|
fallbackChain: [
|
|
24196
24198
|
{
|
|
24197
|
-
providers: ["openai", "
|
|
24199
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
24198
24200
|
model: "gpt-5.6-sol",
|
|
24199
24201
|
variant: "medium"
|
|
24200
24202
|
}
|
|
@@ -24203,17 +24205,17 @@ var init_category_model_requirements = __esm(() => {
|
|
|
24203
24205
|
artistry: {
|
|
24204
24206
|
fallbackChain: [
|
|
24205
24207
|
{
|
|
24206
|
-
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"
|
|
24208
|
+
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
24207
24209
|
model: "claude-fable-5",
|
|
24208
24210
|
variant: "xhigh"
|
|
24209
24211
|
},
|
|
24210
24212
|
{
|
|
24211
|
-
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"
|
|
24213
|
+
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
|
|
24212
24214
|
model: "kimi-k3",
|
|
24213
24215
|
variant: "max"
|
|
24214
24216
|
},
|
|
24215
24217
|
{
|
|
24216
|
-
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"
|
|
24218
|
+
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
24217
24219
|
model: "claude-opus-5",
|
|
24218
24220
|
variant: "xhigh"
|
|
24219
24221
|
}
|
|
@@ -24225,15 +24227,15 @@ var init_category_model_requirements = __esm(() => {
|
|
|
24225
24227
|
{ providers: ["openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
|
|
24226
24228
|
{ providers: ["deepseek"], model: "deepseek-v4-flash", variant: "off" },
|
|
24227
24229
|
{
|
|
24228
|
-
providers: ["qwen-token-plan", "alibaba-token-plan", "bailian-coding-plan"
|
|
24230
|
+
providers: ["qwen-token-plan", "alibaba-token-plan", "bailian-coding-plan"],
|
|
24229
24231
|
model: "qwen3.6-flash",
|
|
24230
24232
|
variant: "low"
|
|
24231
24233
|
},
|
|
24232
|
-
{ providers: ["opencode-go"
|
|
24233
|
-
{ providers: ["opencode-go"
|
|
24234
|
+
{ providers: ["opencode-go"], model: "minimax-m3", variant: "max" },
|
|
24235
|
+
{ providers: ["opencode-go"], model: "minimax-m2.7", variant: "max" },
|
|
24234
24236
|
{ providers: ["xai"], model: "grok-4.20-0309-non-reasoning" },
|
|
24235
24237
|
{
|
|
24236
|
-
providers: ["anthropic", "anthropic-api", "github-copilot"
|
|
24238
|
+
providers: ["anthropic", "anthropic-api", "github-copilot"],
|
|
24237
24239
|
model: "claude-haiku-4-5",
|
|
24238
24240
|
variant: "off"
|
|
24239
24241
|
}
|
|
@@ -24241,18 +24243,14 @@ var init_category_model_requirements = __esm(() => {
|
|
|
24241
24243
|
},
|
|
24242
24244
|
"unspecified-low": {
|
|
24243
24245
|
fallbackChain: [
|
|
24246
|
+
{ providers: ["xai", "github-copilot", "opencode"], model: "grok-4.6", variant: "xhigh" },
|
|
24244
24247
|
{
|
|
24245
|
-
providers: ["
|
|
24246
|
-
model: "grok-4.6",
|
|
24247
|
-
variant: "xhigh"
|
|
24248
|
-
},
|
|
24249
|
-
{
|
|
24250
|
-
providers: ["openai", "quotio-openai", "github-copilot", "opencode", "vercel"],
|
|
24248
|
+
providers: ["openai", "openai-codex", "github-copilot", "opencode"],
|
|
24251
24249
|
model: "gpt-5.6-terra",
|
|
24252
24250
|
variant: "high"
|
|
24253
24251
|
},
|
|
24254
24252
|
{
|
|
24255
|
-
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"
|
|
24253
|
+
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
24256
24254
|
model: "claude-sonnet-5",
|
|
24257
24255
|
variant: "low"
|
|
24258
24256
|
},
|
|
@@ -24261,53 +24259,38 @@ var init_category_model_requirements = __esm(() => {
|
|
|
24261
24259
|
model: "qwen3.8-max-preview",
|
|
24262
24260
|
variant: "max"
|
|
24263
24261
|
},
|
|
24264
|
-
{
|
|
24265
|
-
|
|
24266
|
-
model: "deepseek-v4-pro",
|
|
24267
|
-
variant: "max"
|
|
24268
|
-
},
|
|
24269
|
-
{
|
|
24270
|
-
providers: ["xiaomi", "opencode-go", "vercel"],
|
|
24271
|
-
model: "mimo-v2.5-pro",
|
|
24272
|
-
variant: "max"
|
|
24273
|
-
}
|
|
24262
|
+
{ providers: ["deepseek", "opencode-go"], model: "deepseek-v4-pro", variant: "max" },
|
|
24263
|
+
{ providers: ["xiaomi", "opencode-go"], model: "mimo-v2.5-pro", variant: "max" }
|
|
24274
24264
|
]
|
|
24275
24265
|
},
|
|
24276
24266
|
"unspecified-high": {
|
|
24277
24267
|
fallbackChain: [
|
|
24278
24268
|
{
|
|
24279
|
-
providers: ["
|
|
24280
|
-
model: "kimi-k3",
|
|
24281
|
-
variant: "max"
|
|
24282
|
-
},
|
|
24283
|
-
{
|
|
24284
|
-
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode", "vercel"],
|
|
24269
|
+
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
24285
24270
|
model: "claude-opus-5",
|
|
24286
24271
|
variant: "xhigh"
|
|
24287
24272
|
},
|
|
24273
|
+
{ providers: ["zai-coding-plan", "opencode-go"], model: "glm-5.3", variant: "max" },
|
|
24288
24274
|
{
|
|
24289
|
-
providers: ["
|
|
24290
|
-
model: "
|
|
24291
|
-
variant: "
|
|
24275
|
+
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
|
|
24276
|
+
model: "kimi-k3",
|
|
24277
|
+
variant: "max"
|
|
24292
24278
|
}
|
|
24293
24279
|
]
|
|
24294
24280
|
},
|
|
24295
24281
|
writing: {
|
|
24296
24282
|
fallbackChain: [
|
|
24297
24283
|
{
|
|
24298
|
-
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"
|
|
24284
|
+
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
|
|
24299
24285
|
model: "kimi-k3",
|
|
24300
24286
|
variant: "low"
|
|
24301
24287
|
},
|
|
24302
24288
|
{
|
|
24303
|
-
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"
|
|
24289
|
+
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
24304
24290
|
model: "claude-opus-5",
|
|
24305
24291
|
variant: "low"
|
|
24306
24292
|
},
|
|
24307
|
-
{
|
|
24308
|
-
providers: ["google", "github-copilot", "opencode", "vercel"],
|
|
24309
|
-
model: "gemini-3.6-flash"
|
|
24310
|
-
}
|
|
24293
|
+
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.6-flash" }
|
|
24311
24294
|
]
|
|
24312
24295
|
}
|
|
24313
24296
|
};
|
|
@@ -25660,7 +25643,7 @@ var init_anthropic_categories = __esm(() => {
|
|
|
25660
25643
|
ANTHROPIC_CATEGORIES = [
|
|
25661
25644
|
{
|
|
25662
25645
|
name: "unspecified-high",
|
|
25663
|
-
config: { model: "
|
|
25646
|
+
config: { model: "anthropic/claude-opus-5", variant: "xhigh" },
|
|
25664
25647
|
description: "Tasks that don't fit other categories, high effort required",
|
|
25665
25648
|
callerGuidance: UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE,
|
|
25666
25649
|
promptAppend: UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND
|
|
@@ -26111,7 +26094,7 @@ var init_resolve_agent_definition_paths = __esm(() => {
|
|
|
26111
26094
|
// packages/omo-opencode/src/shared/opencode-version.ts
|
|
26112
26095
|
import { execSync } from "child_process";
|
|
26113
26096
|
import { existsSync as existsSync9, readFileSync as readFileSync3, realpathSync as realpathSync4 } from "fs";
|
|
26114
|
-
import { dirname as
|
|
26097
|
+
import { dirname as dirname7, join as join13 } from "path";
|
|
26115
26098
|
function parseVersion(version2) {
|
|
26116
26099
|
const cleaned = version2.replace(/^v/, "").split("-")[0];
|
|
26117
26100
|
return cleaned.split(".").map((n) => parseInt(n, 10) || 0);
|
|
@@ -26152,7 +26135,7 @@ function parsePackageVersion(content) {
|
|
|
26152
26135
|
function getPackageVersionFromBinary(binaryPath, deps) {
|
|
26153
26136
|
try {
|
|
26154
26137
|
const realBinaryPath = deps.realpath(binaryPath);
|
|
26155
|
-
const packagePath = join13(
|
|
26138
|
+
const packagePath = join13(dirname7(dirname7(realBinaryPath)), "package.json");
|
|
26156
26139
|
if (!deps.exists(packagePath))
|
|
26157
26140
|
return null;
|
|
26158
26141
|
return parsePackageVersion(deps.readText(packagePath));
|
|
@@ -26390,10 +26373,10 @@ import {
|
|
|
26390
26373
|
} from "fs";
|
|
26391
26374
|
function writeFileAtomically2(filePath, content, deps = {}) {
|
|
26392
26375
|
const tempPath = `${filePath}.tmp`;
|
|
26393
|
-
const
|
|
26394
|
-
writeFileSync3(tempPath, content, { encoding: "utf-8", mode });
|
|
26395
|
-
if (
|
|
26396
|
-
chmodSync2(tempPath,
|
|
26376
|
+
const mode2 = deps.mode;
|
|
26377
|
+
writeFileSync3(tempPath, content, { encoding: "utf-8", mode: mode2 });
|
|
26378
|
+
if (mode2 !== undefined) {
|
|
26379
|
+
chmodSync2(tempPath, mode2);
|
|
26397
26380
|
}
|
|
26398
26381
|
const tempFileDescriptor = openSync2(tempPath, "r+");
|
|
26399
26382
|
try {
|
|
@@ -26414,8 +26397,8 @@ function writeFileAtomically2(filePath, content, deps = {}) {
|
|
|
26414
26397
|
throw error51;
|
|
26415
26398
|
}
|
|
26416
26399
|
}
|
|
26417
|
-
if (
|
|
26418
|
-
chmodSync2(filePath,
|
|
26400
|
+
if (mode2 !== undefined) {
|
|
26401
|
+
chmodSync2(filePath, mode2);
|
|
26419
26402
|
}
|
|
26420
26403
|
}
|
|
26421
26404
|
var init_write_file_atomically = __esm(() => {
|
|
@@ -26760,6 +26743,25 @@ var init_model_capabilities_generated = __esm(() => {
|
|
|
26760
26743
|
output: 131072
|
|
26761
26744
|
}
|
|
26762
26745
|
},
|
|
26746
|
+
"glm-5.3": {
|
|
26747
|
+
id: "glm-5.3",
|
|
26748
|
+
family: "glm",
|
|
26749
|
+
reasoning: true,
|
|
26750
|
+
temperature: true,
|
|
26751
|
+
toolCall: true,
|
|
26752
|
+
modalities: {
|
|
26753
|
+
input: [
|
|
26754
|
+
"text"
|
|
26755
|
+
],
|
|
26756
|
+
output: [
|
|
26757
|
+
"text"
|
|
26758
|
+
]
|
|
26759
|
+
},
|
|
26760
|
+
limit: {
|
|
26761
|
+
context: 1048576,
|
|
26762
|
+
output: 131072
|
|
26763
|
+
}
|
|
26764
|
+
},
|
|
26763
26765
|
"glm-5v-turbo": {
|
|
26764
26766
|
id: "glm-5v-turbo",
|
|
26765
26767
|
family: "glm",
|
|
@@ -84348,7 +84350,7 @@ var init_plugin_name_with_version = __esm(() => {
|
|
|
84348
84350
|
|
|
84349
84351
|
// packages/omo-opencode/src/cli/config-manager/backup-config.ts
|
|
84350
84352
|
import { copyFileSync as copyFileSync2, existsSync as existsSync16, mkdirSync as mkdirSync6 } from "fs";
|
|
84351
|
-
import { dirname as
|
|
84353
|
+
import { dirname as dirname8 } from "path";
|
|
84352
84354
|
function backupConfigFile(configPath) {
|
|
84353
84355
|
if (!existsSync16(configPath)) {
|
|
84354
84356
|
return { success: true };
|
|
@@ -84356,7 +84358,7 @@ function backupConfigFile(configPath) {
|
|
|
84356
84358
|
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
84357
84359
|
const backupPath = `${configPath}.backup-${timestamp}`;
|
|
84358
84360
|
try {
|
|
84359
|
-
const dir =
|
|
84361
|
+
const dir = dirname8(backupPath);
|
|
84360
84362
|
if (!existsSync16(dir)) {
|
|
84361
84363
|
mkdirSync6(dir, { recursive: true });
|
|
84362
84364
|
}
|
|
@@ -84554,7 +84556,7 @@ function extractVersionFromPluginEntry(entry) {
|
|
|
84554
84556
|
|
|
84555
84557
|
// packages/omo-opencode/src/cli/config-manager/add-plugin-to-opencode-config.ts
|
|
84556
84558
|
import { existsSync as existsSync19, readdirSync as readdirSync4, readFileSync as readFileSync8, writeFileSync as writeFileSync5 } from "fs";
|
|
84557
|
-
import { basename as basename3, dirname as
|
|
84559
|
+
import { basename as basename3, dirname as dirname9, join as join21 } from "path";
|
|
84558
84560
|
function detectConfigFormatInDir(configDir) {
|
|
84559
84561
|
const configJsonc = join21(configDir, "opencode.jsonc");
|
|
84560
84562
|
const configJson = join21(configDir, "opencode.json");
|
|
@@ -84567,10 +84569,10 @@ function detectConfigFormatInDir(configDir) {
|
|
|
84567
84569
|
return { format: "none", path: configJson };
|
|
84568
84570
|
}
|
|
84569
84571
|
function getParentConfigDirForProfile(configDir) {
|
|
84570
|
-
const parentDir =
|
|
84572
|
+
const parentDir = dirname9(configDir);
|
|
84571
84573
|
if (basename3(parentDir) !== "profiles")
|
|
84572
84574
|
return null;
|
|
84573
|
-
return
|
|
84575
|
+
return dirname9(parentDir);
|
|
84574
84576
|
}
|
|
84575
84577
|
function listProfileConfigDirs(rootConfigDir) {
|
|
84576
84578
|
const profilesDir = join21(rootConfigDir, "profiles");
|
|
@@ -86704,7 +86706,7 @@ var init_env2 = __esm(() => {
|
|
|
86704
86706
|
});
|
|
86705
86707
|
|
|
86706
86708
|
// node_modules/.bun/posthog-node@5.51.1/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
86707
|
-
import { dirname as
|
|
86709
|
+
import { dirname as dirname18, posix as posix7, sep as sep7 } from "path";
|
|
86708
86710
|
function createModulerModifier() {
|
|
86709
86711
|
const getModuleFromFileName = createGetModuleFromFilename();
|
|
86710
86712
|
return async (frames) => {
|
|
@@ -86713,7 +86715,7 @@ function createModulerModifier() {
|
|
|
86713
86715
|
return frames;
|
|
86714
86716
|
};
|
|
86715
86717
|
}
|
|
86716
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
86718
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname18(process.argv[1]) : process.cwd(), isWindows = sep7 === "\\") {
|
|
86717
86719
|
const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
|
|
86718
86720
|
return (filename) => {
|
|
86719
86721
|
if (!filename)
|
|
@@ -92047,7 +92049,7 @@ function splitNodeOptions(nodeOptions) {
|
|
|
92047
92049
|
return args;
|
|
92048
92050
|
}
|
|
92049
92051
|
function findUnhandledRejectionMode(args) {
|
|
92050
|
-
let
|
|
92052
|
+
let mode2;
|
|
92051
92053
|
for (let index = 0;index < args.length; index++) {
|
|
92052
92054
|
const argument = args[index];
|
|
92053
92055
|
const optionName = UNHANDLED_REJECTION_OPTION_NAMES.find((name) => argument === name || argument.startsWith(`${name}=`));
|
|
@@ -92055,9 +92057,9 @@ function findUnhandledRejectionMode(args) {
|
|
|
92055
92057
|
continue;
|
|
92056
92058
|
const value = argument === optionName ? args[++index] : argument.slice(optionName.length + 1);
|
|
92057
92059
|
if (UNHANDLED_REJECTION_MODES.has(value))
|
|
92058
|
-
|
|
92060
|
+
mode2 = value;
|
|
92059
92061
|
}
|
|
92060
|
-
return
|
|
92062
|
+
return mode2;
|
|
92061
92063
|
}
|
|
92062
92064
|
function getUnhandledRejectionMode(execArgv = STARTUP_EXEC_ARGV, nodeOptions = STARTUP_NODE_OPTIONS) {
|
|
92063
92065
|
return findUnhandledRejectionMode(execArgv) ?? findUnhandledRejectionMode(splitNodeOptions(nodeOptions ?? "")) ?? "throw";
|
|
@@ -92083,17 +92085,17 @@ function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
|
92083
92085
|
_posthogErrorHandler: true
|
|
92084
92086
|
});
|
|
92085
92087
|
}
|
|
92086
|
-
function addUncaughtExceptionListener(captureFn, onFatalFn,
|
|
92088
|
+
function addUncaughtExceptionListener(captureFn, onFatalFn, mode2 = STARTUP_UNHANDLED_REJECTION_MODE) {
|
|
92087
92089
|
const process4 = globalThis.process;
|
|
92088
92090
|
if (!process4)
|
|
92089
92091
|
return;
|
|
92090
|
-
if (
|
|
92092
|
+
if (mode2 === "strict")
|
|
92091
92093
|
return void process4.on("uncaughtExceptionMonitor", (error51, origin) => captureUncaughtException(captureFn, error51, origin));
|
|
92092
92094
|
process4.on("uncaughtException", makeUncaughtExceptionHandler(captureFn, onFatalFn));
|
|
92093
92095
|
}
|
|
92094
|
-
function addUnhandledRejectionListener(captureFn,
|
|
92096
|
+
function addUnhandledRejectionListener(captureFn, mode2 = STARTUP_UNHANDLED_REJECTION_MODE) {
|
|
92095
92097
|
const process4 = globalThis.process;
|
|
92096
|
-
if (!process4 ||
|
|
92098
|
+
if (!process4 || mode2 === "throw" || mode2 === "strict" || mode2 === "warn-with-error-code")
|
|
92097
92099
|
return;
|
|
92098
92100
|
process4.on("unhandledRejection", (reason) => {
|
|
92099
92101
|
captureFn(reason, {
|
|
@@ -94318,7 +94320,7 @@ var package_default2;
|
|
|
94318
94320
|
var init_package2 = __esm(() => {
|
|
94319
94321
|
package_default2 = {
|
|
94320
94322
|
name: "@oh-my-opencode/omo-codex",
|
|
94321
|
-
version: "5.0.0-beta.
|
|
94323
|
+
version: "5.0.0-beta.23",
|
|
94322
94324
|
type: "module",
|
|
94323
94325
|
private: true,
|
|
94324
94326
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -95288,19 +95290,19 @@ var init_update_toasts = __esm(() => {
|
|
|
95288
95290
|
|
|
95289
95291
|
// packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
|
|
95290
95292
|
import { existsSync as existsSync48 } from "fs";
|
|
95291
|
-
import { dirname as
|
|
95293
|
+
import { dirname as dirname31, join as join76 } from "path";
|
|
95292
95294
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
95293
95295
|
function defaultGetModuleHostingWorkspace() {
|
|
95294
95296
|
try {
|
|
95295
|
-
const currentDir =
|
|
95297
|
+
const currentDir = dirname31(fileURLToPath5(import.meta.url));
|
|
95296
95298
|
const pkgJsonPath = findPackageJsonUp(currentDir);
|
|
95297
95299
|
if (!pkgJsonPath)
|
|
95298
95300
|
return null;
|
|
95299
|
-
const pkgDir =
|
|
95300
|
-
const nodeModulesDir =
|
|
95301
|
+
const pkgDir = dirname31(pkgJsonPath);
|
|
95302
|
+
const nodeModulesDir = dirname31(pkgDir);
|
|
95301
95303
|
if (nodeModulesDir.split(/[\\/]/).pop() !== "node_modules")
|
|
95302
95304
|
return null;
|
|
95303
|
-
return
|
|
95305
|
+
return dirname31(nodeModulesDir);
|
|
95304
95306
|
} catch (error51) {
|
|
95305
95307
|
if (error51 instanceof Error) {
|
|
95306
95308
|
return null;
|
|
@@ -97849,9 +97851,9 @@ function formatConfigSummary(config3) {
|
|
|
97849
97851
|
`);
|
|
97850
97852
|
}
|
|
97851
97853
|
function printHeader(isUpdate) {
|
|
97852
|
-
const
|
|
97854
|
+
const mode2 = isUpdate ? "Update" : "Install";
|
|
97853
97855
|
console.log();
|
|
97854
|
-
console.log(import_picocolors.default.bgMagenta(import_picocolors.default.white(` oMoMoMoMo... ${
|
|
97856
|
+
console.log(import_picocolors.default.bgMagenta(import_picocolors.default.white(` oMoMoMoMo... ${mode2} `)));
|
|
97855
97857
|
console.log();
|
|
97856
97858
|
}
|
|
97857
97859
|
function printStep(step, total, message) {
|
|
@@ -98130,7 +98132,7 @@ function windowsCommandShim(targetPath) {
|
|
|
98130
98132
|
|
|
98131
98133
|
// packages/omo-codex/src/install/codex-cache-dangling-bins.ts
|
|
98132
98134
|
import { lstat as lstat2, readFile, readdir, readlink, rm, stat } from "fs/promises";
|
|
98133
|
-
import { dirname as
|
|
98135
|
+
import { dirname as dirname10, isAbsolute, join as join23, resolve as resolve5 } from "path";
|
|
98134
98136
|
|
|
98135
98137
|
// packages/omo-codex/src/install/codex-cache-fs.ts
|
|
98136
98138
|
import { lstat } from "fs/promises";
|
|
@@ -98177,7 +98179,7 @@ async function removeDanglingManagedSymlink(linkPath) {
|
|
|
98177
98179
|
if (!linkStat.isSymbolicLink())
|
|
98178
98180
|
return;
|
|
98179
98181
|
const linkTarget = await readlink(linkPath);
|
|
98180
|
-
const target = isAbsolute(linkTarget) ? linkTarget : resolve5(
|
|
98182
|
+
const target = isAbsolute(linkTarget) ? linkTarget : resolve5(dirname10(linkPath), linkTarget);
|
|
98181
98183
|
if (!await isFileSystemEntry(target) && isManagedComponentBinTarget(target))
|
|
98182
98184
|
await rm(linkPath, { force: true });
|
|
98183
98185
|
} catch (error51) {
|
|
@@ -98639,11 +98641,11 @@ async function existingNonSymlink(path7) {
|
|
|
98639
98641
|
}
|
|
98640
98642
|
// packages/omo-codex/src/install/codex-cache-install.ts
|
|
98641
98643
|
import { cp as cp2, mkdir as mkdir3, readFile as readFile8, readdir as readdir4, rename, rm as rm4 } from "fs/promises";
|
|
98642
|
-
import { basename as basename5, dirname as
|
|
98644
|
+
import { basename as basename5, dirname as dirname13, join as join32, sep as sep5 } from "path";
|
|
98643
98645
|
|
|
98644
98646
|
// packages/omo-codex/src/install/codex-cache-bundled-mcps.ts
|
|
98645
98647
|
import { cp, mkdir as mkdir2, readFile as readFile4, stat as stat3 } from "fs/promises";
|
|
98646
|
-
import { dirname as
|
|
98648
|
+
import { dirname as dirname11, join as join27, resolve as resolve7 } from "path";
|
|
98647
98649
|
var BUNDLED_MCP_RUNTIMES = [
|
|
98648
98650
|
{
|
|
98649
98651
|
label: "Git Bash MCP",
|
|
@@ -98678,7 +98680,7 @@ async function copyBundledMcpRuntimeDist(pluginRoot, sourceRoot, runtime4) {
|
|
|
98678
98680
|
throw new Error(`missing built ${runtime4.label} dist at ${sourcePath}`);
|
|
98679
98681
|
}
|
|
98680
98682
|
const destinationPath = join27(pluginRoot, runtime4.destinationDistFromPlugin);
|
|
98681
|
-
await mkdir2(
|
|
98683
|
+
await mkdir2(dirname11(destinationPath), { recursive: true });
|
|
98682
98684
|
await cp(sourcePath, destinationPath, { recursive: true });
|
|
98683
98685
|
}
|
|
98684
98686
|
async function readSourceMcpArgs(path7) {
|
|
@@ -98716,7 +98718,7 @@ async function isDirectory(path7) {
|
|
|
98716
98718
|
// packages/omo-codex/src/install/codex-cache-local-dependencies.ts
|
|
98717
98719
|
import { realpathSync as realpathSync6 } from "fs";
|
|
98718
98720
|
import { readFile as readFile5, readdir as readdir3, writeFile as writeFile2 } from "fs/promises";
|
|
98719
|
-
import { dirname as
|
|
98721
|
+
import { dirname as dirname12, isAbsolute as isAbsolute4, join as join29, relative as relative3, resolve as resolve9, sep as sep2 } from "path";
|
|
98720
98722
|
|
|
98721
98723
|
// packages/omo-codex/src/install/codex-cache-paths.ts
|
|
98722
98724
|
import { existsSync as existsSync24, readdirSync as readdirSync6 } from "fs";
|
|
@@ -98785,7 +98787,7 @@ async function rewriteCachedPackageLocalFileDependencies(pluginRoot, sourceRoot)
|
|
|
98785
98787
|
const parsed = JSON.parse(raw);
|
|
98786
98788
|
if (!isPlainRecord4(parsed))
|
|
98787
98789
|
continue;
|
|
98788
|
-
const packageDir =
|
|
98790
|
+
const packageDir = dirname12(packageJsonPath);
|
|
98789
98791
|
const sourcePackageDir = join29(sourceRoot, relative3(pluginRoot, packageDir));
|
|
98790
98792
|
let changed = false;
|
|
98791
98793
|
for (const field of ["dependencies", "optionalDependencies", "peerDependencies"]) {
|
|
@@ -99180,13 +99182,13 @@ function sanitizeNpmInstallEnv(env2) {
|
|
|
99180
99182
|
return Object.fromEntries(Object.entries(env2).filter(([key]) => key.toLowerCase() !== "npm_config_allow_scripts"));
|
|
99181
99183
|
}
|
|
99182
99184
|
function createTempSiblingPath(targetPath) {
|
|
99183
|
-
return join32(
|
|
99185
|
+
return join32(dirname13(targetPath), `.tmp-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
|
|
99184
99186
|
}
|
|
99185
99187
|
function createBackupSiblingPath(targetPath) {
|
|
99186
|
-
return join32(
|
|
99188
|
+
return join32(dirname13(targetPath), `.backup-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
|
|
99187
99189
|
}
|
|
99188
99190
|
async function copyDirectory(sourcePath, targetPath) {
|
|
99189
|
-
await mkdir3(
|
|
99191
|
+
await mkdir3(dirname13(targetPath), { recursive: true });
|
|
99190
99192
|
await cp2(sourcePath, targetPath, { recursive: true, filter: (source) => shouldCopyPluginPath(source, sourcePath) });
|
|
99191
99193
|
}
|
|
99192
99194
|
async function promoteDirectory(tempPath, targetPath, renameDirectory) {
|
|
@@ -99285,20 +99287,20 @@ async function copyRootRuntimeDists(input) {
|
|
|
99285
99287
|
const sourcePath = join32(repoRoot, runtimePath);
|
|
99286
99288
|
if (!await fileExistsStrict(join32(sourcePath, "index.js")))
|
|
99287
99289
|
continue;
|
|
99288
|
-
await mkdir3(
|
|
99290
|
+
await mkdir3(dirname13(join32(input.pluginRoot, runtimePath)), { recursive: true });
|
|
99289
99291
|
await cp2(sourcePath, join32(input.pluginRoot, runtimePath), { recursive: true });
|
|
99290
99292
|
}
|
|
99291
99293
|
}
|
|
99292
99294
|
function repoRootForCodexPluginSource(sourcePath) {
|
|
99293
|
-
const codexPackageRoot =
|
|
99294
|
-
const packagesRoot =
|
|
99295
|
+
const codexPackageRoot = dirname13(sourcePath);
|
|
99296
|
+
const packagesRoot = dirname13(codexPackageRoot);
|
|
99295
99297
|
if (basename5(sourcePath) !== "plugin")
|
|
99296
99298
|
return null;
|
|
99297
99299
|
if (basename5(codexPackageRoot) !== "omo-codex")
|
|
99298
99300
|
return null;
|
|
99299
99301
|
if (basename5(packagesRoot) !== "packages")
|
|
99300
99302
|
return null;
|
|
99301
|
-
return
|
|
99303
|
+
return dirname13(packagesRoot);
|
|
99302
99304
|
}
|
|
99303
99305
|
// packages/omo-codex/src/install/codex-cache-prune.ts
|
|
99304
99306
|
import { lstat as lstat5, readdir as readdir5, rm as rm5, stat as stat4 } from "fs/promises";
|
|
@@ -99429,7 +99431,7 @@ async function shouldBuildSourcePackages(repoRoot) {
|
|
|
99429
99431
|
|
|
99430
99432
|
// packages/omo-codex/src/install/codex-config-toml.ts
|
|
99431
99433
|
import { mkdir as mkdir5, readFile as readFile11 } from "fs/promises";
|
|
99432
|
-
import { dirname as
|
|
99434
|
+
import { dirname as dirname16 } from "path";
|
|
99433
99435
|
|
|
99434
99436
|
// packages/omo-codex/src/install/toml-section-editor.ts
|
|
99435
99437
|
function findTomlSection(config3, header) {
|
|
@@ -100011,12 +100013,12 @@ function tomlKeySegment(value) {
|
|
|
100011
100013
|
|
|
100012
100014
|
// packages/omo-codex/src/install/codex-config-atomic-write.ts
|
|
100013
100015
|
import { lstat as lstat6, readlink as readlink4, realpath, rename as rename3, unlink, writeFile as writeFile5 } from "fs/promises";
|
|
100014
|
-
import { basename as basename6, dirname as
|
|
100016
|
+
import { basename as basename6, dirname as dirname14, isAbsolute as isAbsolute5, join as join36, resolve as resolve10 } from "path";
|
|
100015
100017
|
var RENAME_RETRY_DELAYS_MS = [10, 25, 50];
|
|
100016
100018
|
var RETRIABLE_RENAME_CODES = new Set(["EPERM", "EBUSY"]);
|
|
100017
100019
|
async function writeFileAtomic(targetPath, data) {
|
|
100018
100020
|
const writeTarget = await resolveSymlinkTarget(targetPath);
|
|
100019
|
-
const temporaryPath = join36(
|
|
100021
|
+
const temporaryPath = join36(dirname14(writeTarget), `.tmp-${basename6(writeTarget)}-${process.pid}-${Date.now()}`);
|
|
100020
100022
|
await writeFile5(temporaryPath, data);
|
|
100021
100023
|
try {
|
|
100022
100024
|
await renameWithRetry(temporaryPath, writeTarget);
|
|
@@ -100045,7 +100047,7 @@ async function resolveSymlinkTarget(targetPath) {
|
|
|
100045
100047
|
if (!(error51 instanceof Error))
|
|
100046
100048
|
throw error51;
|
|
100047
100049
|
const linkValue = await readlink4(targetPath);
|
|
100048
|
-
return isAbsolute5(linkValue) ? linkValue : resolve10(
|
|
100050
|
+
return isAbsolute5(linkValue) ? linkValue : resolve10(dirname14(targetPath), linkValue);
|
|
100049
100051
|
}
|
|
100050
100052
|
}
|
|
100051
100053
|
async function renameWithRetry(fromPath, toPath) {
|
|
@@ -100525,14 +100527,14 @@ import { join as join37 } from "path";
|
|
|
100525
100527
|
var FALLBACK_CODEX_MODEL_CATALOG = {
|
|
100526
100528
|
current: {
|
|
100527
100529
|
model: "gpt-5.6-sol",
|
|
100528
|
-
modelContextWindow:
|
|
100530
|
+
modelContextWindow: 650000,
|
|
100529
100531
|
modelReasoningEffort: "high",
|
|
100530
100532
|
planModeReasoningEffort: "xhigh"
|
|
100531
100533
|
},
|
|
100532
100534
|
managedProfiles: [
|
|
100533
100535
|
{
|
|
100534
100536
|
model: "gpt-5.5",
|
|
100535
|
-
modelContextWindow:
|
|
100537
|
+
modelContextWindow: 650000,
|
|
100536
100538
|
modelReasoningEffort: "high",
|
|
100537
100539
|
planModeReasoningEffort: "xhigh"
|
|
100538
100540
|
},
|
|
@@ -100630,7 +100632,7 @@ function isRootSetting2(line, key) {
|
|
|
100630
100632
|
|
|
100631
100633
|
// packages/omo-codex/src/install/codex-multi-agent-v2-config.ts
|
|
100632
100634
|
import { readFileSync as readFileSync11 } from "fs";
|
|
100633
|
-
import { dirname as
|
|
100635
|
+
import { dirname as dirname15, isAbsolute as isAbsolute6, join as join38 } from "path";
|
|
100634
100636
|
var CODEX_AGENTS_HEADER = "agents";
|
|
100635
100637
|
var CODEX_MULTI_AGENT_V2_HEADER = "features.multi_agent_v2";
|
|
100636
100638
|
var CODEX_MULTI_AGENT_V2_THREAD_LIMIT_KEY = `${CODEX_MULTI_AGENT_V2_HEADER}.max_concurrent_threads_per_session`;
|
|
@@ -100667,8 +100669,8 @@ function resolveCodexMultiAgentVersion(config3, configPath) {
|
|
|
100667
100669
|
}
|
|
100668
100670
|
function resolveCatalogPath(configuredPath, configPath) {
|
|
100669
100671
|
if (configuredPath === null)
|
|
100670
|
-
return join38(
|
|
100671
|
-
return isAbsolute6(configuredPath) ? configuredPath : join38(
|
|
100672
|
+
return join38(dirname15(configPath), "models_cache.json");
|
|
100673
|
+
return isAbsolute6(configuredPath) ? configuredPath : join38(dirname15(configPath), configuredPath);
|
|
100672
100674
|
}
|
|
100673
100675
|
function readCatalogMultiAgentVersion(model, cachePath) {
|
|
100674
100676
|
let raw;
|
|
@@ -100772,7 +100774,7 @@ function readBooleanSetting(sectionText, key) {
|
|
|
100772
100774
|
|
|
100773
100775
|
// packages/omo-codex/src/install/codex-config-toml.ts
|
|
100774
100776
|
async function updateCodexConfig(input) {
|
|
100775
|
-
await mkdir5(
|
|
100777
|
+
await mkdir5(dirname16(input.configPath), { recursive: true });
|
|
100776
100778
|
let config3;
|
|
100777
100779
|
try {
|
|
100778
100780
|
config3 = await readFile11(input.configPath, "utf8");
|
|
@@ -101745,7 +101747,7 @@ var defaultRunCommand = async (command, args, options) => {
|
|
|
101745
101747
|
|
|
101746
101748
|
// packages/omo-codex/src/install/codex-project-local-cleanup.ts
|
|
101747
101749
|
import { copyFile as copyFile2, lstat as lstat10, readFile as readFile17, writeFile as writeFile10 } from "fs/promises";
|
|
101748
|
-
import { dirname as
|
|
101750
|
+
import { dirname as dirname17, join as join46, resolve as resolve11 } from "path";
|
|
101749
101751
|
var LEGACY_AGENT_CONFLICT_KEYS = ["max_threads"];
|
|
101750
101752
|
var PROJECT_LOCAL_ARTIFACT_PATHS = [
|
|
101751
101753
|
".codex/hooks.json",
|
|
@@ -101865,13 +101867,13 @@ async function findProjectLocalCodexConfigs(startDirectory, codexHome) {
|
|
|
101865
101867
|
artifactRoots: artifactRootsForConfigPaths(configPathsFromCwd)
|
|
101866
101868
|
};
|
|
101867
101869
|
}
|
|
101868
|
-
const parent =
|
|
101870
|
+
const parent = dirname17(current);
|
|
101869
101871
|
if (parent === current) {
|
|
101870
101872
|
const nearestConfigPath = configPathsFromCwd[0];
|
|
101871
101873
|
return nearestConfigPath === undefined ? null : {
|
|
101872
|
-
projectRoot:
|
|
101874
|
+
projectRoot: dirname17(dirname17(nearestConfigPath)),
|
|
101873
101875
|
configPaths: [nearestConfigPath],
|
|
101874
|
-
artifactRoots: [
|
|
101876
|
+
artifactRoots: [dirname17(dirname17(nearestConfigPath))]
|
|
101875
101877
|
};
|
|
101876
101878
|
}
|
|
101877
101879
|
current = parent;
|
|
@@ -101887,7 +101889,7 @@ async function isRegularProjectLocalConfig(directory, configPath) {
|
|
|
101887
101889
|
function artifactRootsForConfigPaths(configPaths2) {
|
|
101888
101890
|
const roots = [];
|
|
101889
101891
|
for (const configPath of configPaths2) {
|
|
101890
|
-
const root =
|
|
101892
|
+
const root = dirname17(dirname17(configPath));
|
|
101891
101893
|
if (!roots.includes(root))
|
|
101892
101894
|
roots.push(root);
|
|
101893
101895
|
}
|
|
@@ -102797,7 +102799,7 @@ import { isAbsolute as isAbsolute11, join as join58, relative as relative6, reso
|
|
|
102797
102799
|
|
|
102798
102800
|
// packages/omo-codex/src/install/codex-cleanup-bins.ts
|
|
102799
102801
|
import { lstat as lstat12, readFile as readFile22, readdir as readdir12, readlink as readlink6, rm as rm11 } from "fs/promises";
|
|
102800
|
-
import { dirname as
|
|
102802
|
+
import { dirname as dirname19, isAbsolute as isAbsolute9, join as join56, resolve as resolve14 } from "path";
|
|
102801
102803
|
var ROOT_RUNTIME_BIN_NAME = "omo";
|
|
102802
102804
|
var MANAGED_CODEX_BIN_NAMES = new Set([
|
|
102803
102805
|
ROOT_RUNTIME_BIN_NAME,
|
|
@@ -102854,7 +102856,7 @@ async function isManagedCodexBin(linkPath, platform, binName) {
|
|
|
102854
102856
|
if (platform === "win32")
|
|
102855
102857
|
return false;
|
|
102856
102858
|
const linkTarget = await readlink6(linkPath);
|
|
102857
|
-
const target = isAbsolute9(linkTarget) ? linkTarget : resolve14(
|
|
102859
|
+
const target = isAbsolute9(linkTarget) ? linkTarget : resolve14(dirname19(linkPath), linkTarget);
|
|
102858
102860
|
return isManagedComponentBinTarget(target) || isLegacyCodexBinTarget(binName, target);
|
|
102859
102861
|
}
|
|
102860
102862
|
if (!entryStat.isFile())
|
|
@@ -102865,7 +102867,7 @@ async function isManagedCodexBin(linkPath, platform, binName) {
|
|
|
102865
102867
|
|
|
102866
102868
|
// packages/omo-codex/src/install/codex-cleanup-config.ts
|
|
102867
102869
|
import { lstat as lstat13, mkdir as mkdir8, readFile as readFile23, writeFile as writeFile13 } from "fs/promises";
|
|
102868
|
-
import { dirname as
|
|
102870
|
+
import { dirname as dirname20 } from "path";
|
|
102869
102871
|
var MANAGED_MARKETPLACES = ["sisyphuslabs", "lazycodex", "code-yeongyu-codex-plugins"];
|
|
102870
102872
|
var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE2 = ["codex-ultrawork-reviewer"];
|
|
102871
102873
|
var CURRENT_MANAGED_CODEX_AGENT_NAMES2 = [
|
|
@@ -102902,7 +102904,7 @@ async function cleanupCodexConfig(configPath, now) {
|
|
|
102902
102904
|
if (next === original)
|
|
102903
102905
|
return { changed: false };
|
|
102904
102906
|
const backupPath = `${configPath}.backup-${formatBackupTimestamp2(now?.() ?? new Date)}`;
|
|
102905
|
-
await mkdir8(
|
|
102907
|
+
await mkdir8(dirname20(configPath), { recursive: true });
|
|
102906
102908
|
await writeFile13(backupPath, original);
|
|
102907
102909
|
await writeFile13(configPath, `${next.trimEnd()}
|
|
102908
102910
|
`);
|
|
@@ -102981,10 +102983,10 @@ function nodeErrorCode5(error51) {
|
|
|
102981
102983
|
}
|
|
102982
102984
|
|
|
102983
102985
|
// packages/omo-codex/src/install/codex-cleanup-safety.ts
|
|
102984
|
-
import { dirname as
|
|
102986
|
+
import { dirname as dirname21, isAbsolute as isAbsolute10, join as join57, relative as relative5, resolve as resolve15 } from "path";
|
|
102985
102987
|
function codexHomeResolvesToFilesystemRoot(codexHome) {
|
|
102986
102988
|
const resolved = resolve15(codexHome);
|
|
102987
|
-
return
|
|
102989
|
+
return dirname21(resolved) === resolved;
|
|
102988
102990
|
}
|
|
102989
102991
|
function validateManagedCleanupTarget(input) {
|
|
102990
102992
|
if (!isAbsolute10(input.path))
|
|
@@ -103247,7 +103249,7 @@ var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", ".
|
|
|
103247
103249
|
import { execFile as execFile4 } from "child_process";
|
|
103248
103250
|
import { existsSync as existsSync32 } from "fs";
|
|
103249
103251
|
import { homedir as homedir11 } from "os";
|
|
103250
|
-
import { dirname as
|
|
103252
|
+
import { dirname as dirname25, join as join63, resolve as resolve20 } from "path";
|
|
103251
103253
|
import { fileURLToPath } from "url";
|
|
103252
103254
|
import { promisify as promisify3 } from "util";
|
|
103253
103255
|
|
|
@@ -103278,9 +103280,9 @@ function resolveAgentHome(options) {
|
|
|
103278
103280
|
}
|
|
103279
103281
|
|
|
103280
103282
|
// packages/omo-senpi/src/install/local-launcher.ts
|
|
103281
|
-
import { chmodSync as chmodSync3, existsSync as existsSync31, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync, writeFileSync as writeFileSync6 } from "fs";
|
|
103283
|
+
import { chmodSync as chmodSync3, existsSync as existsSync31, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync as rmSync2, writeFileSync as writeFileSync6 } from "fs";
|
|
103282
103284
|
import { homedir as homedir10 } from "os";
|
|
103283
|
-
import { dirname as
|
|
103285
|
+
import { dirname as dirname22, join as join60, resolve as resolve18 } from "path";
|
|
103284
103286
|
var MARKER = "omo-local-launcher";
|
|
103285
103287
|
function localLauncherPath(homeDir = homedir10()) {
|
|
103286
103288
|
return join60(homeDir, ".local", "bin", "omo");
|
|
@@ -103351,7 +103353,7 @@ function installLocalLauncher(options) {
|
|
|
103351
103353
|
const path7 = localLauncherPath(options.homeDir);
|
|
103352
103354
|
if (existsSync31(path7) && !readFileSync14(path7, "utf8").includes(MARKER))
|
|
103353
103355
|
return;
|
|
103354
|
-
mkdirSync10(
|
|
103356
|
+
mkdirSync10(dirname22(path7), { recursive: true });
|
|
103355
103357
|
writeFileSync6(path7, renderLocalLauncher(options));
|
|
103356
103358
|
chmodSync3(path7, 493);
|
|
103357
103359
|
if ((options.platform ?? process.platform) === "win32") {
|
|
@@ -103366,12 +103368,12 @@ node "%~dp0omo" %*\r
|
|
|
103366
103368
|
import { createHash as createHash5 } from "crypto";
|
|
103367
103369
|
import { constants as constants9 } from "fs";
|
|
103368
103370
|
import { access as access2, readFile as readFile26, stat as stat6 } from "fs/promises";
|
|
103369
|
-
import { dirname as
|
|
103371
|
+
import { dirname as dirname24, join as join62 } from "path";
|
|
103370
103372
|
|
|
103371
103373
|
// packages/omo-senpi/src/install/senpi-settings.ts
|
|
103372
103374
|
import { constants as constants8 } from "fs";
|
|
103373
103375
|
import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile25, rename as rename5, writeFile as writeFile14 } from "fs/promises";
|
|
103374
|
-
import { dirname as
|
|
103376
|
+
import { dirname as dirname23, join as join61, resolve as resolve19 } from "path";
|
|
103375
103377
|
var OMO_SENPI_PACKAGE_NAME = "@code-yeongyu/omo-senpi";
|
|
103376
103378
|
var LEGACY_BUILTIN_SHADOW_PACKAGES = [
|
|
103377
103379
|
join61("packages", "pi-goal"),
|
|
@@ -103418,7 +103420,7 @@ async function removeSupersededOmoPackages(packages, currentPluginPath, agentDir
|
|
|
103418
103420
|
return entries.filter((entry) => entry !== undefined);
|
|
103419
103421
|
}
|
|
103420
103422
|
async function writeSettingsAtomically(settingsPath, settings) {
|
|
103421
|
-
await mkdir9(
|
|
103423
|
+
await mkdir9(dirname23(settingsPath), { recursive: true });
|
|
103422
103424
|
const backupPath = await nextBackupPath(settingsPath);
|
|
103423
103425
|
if (await fileExists(settingsPath)) {
|
|
103424
103426
|
await copyFile3(settingsPath, backupPath);
|
|
@@ -103538,7 +103540,7 @@ async function hasMissingPluginArtifact(pluginPath) {
|
|
|
103538
103540
|
}
|
|
103539
103541
|
async function verifyAstGrepRuntimeIntegrity(pluginPath, platform) {
|
|
103540
103542
|
const runtimeEntry = join62(pluginPath, "runtime", "ast-grep-mcp", "cli.js");
|
|
103541
|
-
const manifestPath = join62(
|
|
103543
|
+
const manifestPath = join62(dirname24(runtimeEntry), "manifest.json");
|
|
103542
103544
|
let runtimeStat;
|
|
103543
103545
|
try {
|
|
103544
103546
|
runtimeStat = await stat6(runtimeEntry);
|
|
@@ -103628,7 +103630,7 @@ async function runSenpiInstaller(options = {}) {
|
|
|
103628
103630
|
function resolveInstallContext(options) {
|
|
103629
103631
|
const env3 = options.env ?? process.env;
|
|
103630
103632
|
const allowBuild = options.pluginPath === undefined;
|
|
103631
|
-
const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(
|
|
103633
|
+
const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname25(fileURLToPath(import.meta.url))) : dirname25(resolve20(options.pluginPath))));
|
|
103632
103634
|
const agentDir = resolve20(options.agentDir ?? resolveAgentHome({ env: env3, homeDir: env3.HOME ?? homedir11() }));
|
|
103633
103635
|
const pluginPath = resolve20(options.pluginPath ?? join63(repoRoot, "packages", "omo-senpi", "plugin"));
|
|
103634
103636
|
return {
|
|
@@ -107632,7 +107634,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
|
107632
107634
|
// packages/omo-opencode/src/cli/run/opencode-binary-resolver.ts
|
|
107633
107635
|
init_bun_which_shim();
|
|
107634
107636
|
init_spawn_with_windows_hide();
|
|
107635
|
-
import { delimiter as delimiter2, dirname as
|
|
107637
|
+
import { delimiter as delimiter2, dirname as dirname26, posix as posix9, win32 as win325 } from "path";
|
|
107636
107638
|
var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
|
|
107637
107639
|
var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
|
|
107638
107640
|
function getCommandCandidates(platform) {
|
|
@@ -107690,7 +107692,7 @@ async function findWorkingOpencodeBinary(pathEnv = process.env.PATH, probe2 = ca
|
|
|
107690
107692
|
return null;
|
|
107691
107693
|
}
|
|
107692
107694
|
function buildPathWithBinaryFirst(pathEnv, binaryPath) {
|
|
107693
|
-
const preferredDir =
|
|
107695
|
+
const preferredDir = dirname26(binaryPath);
|
|
107694
107696
|
const existing = (pathEnv ?? "").split(delimiter2).filter((entry) => entry.length > 0 && entry !== preferredDir);
|
|
107695
107697
|
return [preferredDir, ...existing].join(delimiter2);
|
|
107696
107698
|
}
|
|
@@ -108468,7 +108470,7 @@ init_state();
|
|
|
108468
108470
|
// packages/omo-opencode/src/features/run-continuation-state/constants.ts
|
|
108469
108471
|
var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
|
|
108470
108472
|
// packages/omo-opencode/src/features/run-continuation-state/storage.ts
|
|
108471
|
-
import { existsSync as existsSync40, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as
|
|
108473
|
+
import { existsSync as existsSync40, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync3, writeFileSync as writeFileSync7 } from "fs";
|
|
108472
108474
|
import { join as join68 } from "path";
|
|
108473
108475
|
function getMarkerPath(directory, sessionID) {
|
|
108474
108476
|
return join68(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
|
|
@@ -108648,7 +108650,7 @@ init_agent_display_names();
|
|
|
108648
108650
|
// packages/omo-opencode/src/hooks/ralph-loop/storage.ts
|
|
108649
108651
|
init_frontmatter2();
|
|
108650
108652
|
import { existsSync as existsSync41, readFileSync as readFileSync22, writeFileSync as writeFileSync8, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "fs";
|
|
108651
|
-
import { dirname as
|
|
108653
|
+
import { dirname as dirname27, join as join70 } from "path";
|
|
108652
108654
|
|
|
108653
108655
|
// packages/omo-opencode/src/hooks/ralph-loop/constants.ts
|
|
108654
108656
|
var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
|
|
@@ -110490,8 +110492,8 @@ function getCategoryEffectiveVariant(categoryName, requirement, config4) {
|
|
|
110490
110492
|
}
|
|
110491
110493
|
|
|
110492
110494
|
// packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
|
|
110493
|
-
function formatCapabilityResolutionLabel(
|
|
110494
|
-
return
|
|
110495
|
+
function formatCapabilityResolutionLabel(mode2) {
|
|
110496
|
+
return mode2 ?? "unknown";
|
|
110495
110497
|
}
|
|
110496
110498
|
function buildModelResolutionDetails(options) {
|
|
110497
110499
|
const details = [];
|
|
@@ -110609,8 +110611,8 @@ function collectCapabilityResolutionIssues(info) {
|
|
|
110609
110611
|
const issues = [];
|
|
110610
110612
|
const allEntries = [...info.agents, ...info.categories];
|
|
110611
110613
|
const fallbackEntries = allEntries.filter((entry) => {
|
|
110612
|
-
const
|
|
110613
|
-
return
|
|
110614
|
+
const mode2 = entry.capabilityDiagnostics?.resolutionMode;
|
|
110615
|
+
return mode2 === "unknown";
|
|
110614
110616
|
});
|
|
110615
110617
|
if (fallbackEntries.length === 0) {
|
|
110616
110618
|
return issues;
|
|
@@ -110886,7 +110888,7 @@ init_src2();
|
|
|
110886
110888
|
import { existsSync as existsSync55 } from "fs";
|
|
110887
110889
|
import { createRequire as createRequire3 } from "module";
|
|
110888
110890
|
import { homedir as homedir19 } from "os";
|
|
110889
|
-
import { dirname as
|
|
110891
|
+
import { dirname as dirname32, join as join83 } from "path";
|
|
110890
110892
|
|
|
110891
110893
|
// packages/omo-opencode/src/hooks/comment-checker/downloader.ts
|
|
110892
110894
|
import { join as join82 } from "path";
|
|
@@ -110983,7 +110985,7 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
|
|
|
110983
110985
|
const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
|
|
110984
110986
|
const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
|
|
110985
110987
|
try {
|
|
110986
|
-
const packageDir = baseDirOverride ??
|
|
110988
|
+
const packageDir = baseDirOverride ?? dirname32(resolvePackageJsonPath());
|
|
110987
110989
|
const vendorPath = join83(packageDir, "vendor", platformKey, binaryName);
|
|
110988
110990
|
if (existsSync55(vendorPath))
|
|
110989
110991
|
return vendorPath;
|
|
@@ -111135,7 +111137,7 @@ async function getGhCliInfo(dependencies = {}) {
|
|
|
111135
111137
|
init_zod();
|
|
111136
111138
|
init_opencode_config_dir();
|
|
111137
111139
|
import { existsSync as existsSync56, readFileSync as readFileSync35 } from "fs";
|
|
111138
|
-
import { delimiter as delimiter3, dirname as
|
|
111140
|
+
import { delimiter as delimiter3, dirname as dirname33, resolve as resolve23 } from "path";
|
|
111139
111141
|
import { fileURLToPath as fileURLToPath7 } from "url";
|
|
111140
111142
|
|
|
111141
111143
|
// packages/omo-opencode/src/mcp/cli-suffix.ts
|
|
@@ -111266,7 +111268,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
|
|
|
111266
111268
|
].join(";");
|
|
111267
111269
|
function getModuleDirectory(moduleUrl) {
|
|
111268
111270
|
try {
|
|
111269
|
-
return
|
|
111271
|
+
return dirname33(fileURLToPath7(moduleUrl));
|
|
111270
111272
|
} catch (error51) {
|
|
111271
111273
|
if (!(error51 instanceof Error))
|
|
111272
111274
|
throw error51;
|
|
@@ -111999,7 +112001,7 @@ async function pathExists2(path15) {
|
|
|
111999
112001
|
init_src2();
|
|
112000
112002
|
import { readdir as readdir15, readFile as readFile28, stat as stat7 } from "fs/promises";
|
|
112001
112003
|
import { homedir as homedir23 } from "os";
|
|
112002
|
-
import { dirname as
|
|
112004
|
+
import { dirname as dirname34, isAbsolute as isAbsolute13, join as join86, relative as relative9, resolve as resolve25, sep as sep9 } from "path";
|
|
112003
112005
|
var CODEX_COMPONENTS_CHECK_ID = "codex-components";
|
|
112004
112006
|
var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
|
|
112005
112007
|
var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
|
|
@@ -112073,7 +112075,7 @@ async function auditBundleTargets(pluginRoot) {
|
|
|
112073
112075
|
const manifest2 = await readJson2(manifestPath);
|
|
112074
112076
|
if (manifest2 === null || !isRecord13(manifest2["mcpServers"]))
|
|
112075
112077
|
continue;
|
|
112076
|
-
const manifestRoot =
|
|
112078
|
+
const manifestRoot = dirname34(manifestPath);
|
|
112077
112079
|
const isRootManifest = resolve25(manifestRoot) === resolve25(pluginRoot);
|
|
112078
112080
|
for (const server2 of Object.values(manifest2["mcpServers"])) {
|
|
112079
112081
|
if (!isRecord13(server2) || !Array.isArray(server2["args"]))
|
|
@@ -112094,7 +112096,7 @@ async function auditBundleTargets(pluginRoot) {
|
|
|
112094
112096
|
continue;
|
|
112095
112097
|
const commands2 = [];
|
|
112096
112098
|
collectHookCommands(manifest2, commands2);
|
|
112097
|
-
const hookPluginRoot =
|
|
112099
|
+
const hookPluginRoot = dirname34(dirname34(hookManifestPath));
|
|
112098
112100
|
for (const command of commands2) {
|
|
112099
112101
|
for (const relativePath of extractPluginRootPaths(command)) {
|
|
112100
112102
|
referencedCount += 1;
|
|
@@ -112133,7 +112135,7 @@ async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEsc
|
|
|
112133
112135
|
}
|
|
112134
112136
|
async function findHookManifestPaths(root) {
|
|
112135
112137
|
const paths3 = await findManifestPaths(root, "hooks.json");
|
|
112136
|
-
return paths3.filter((path15) =>
|
|
112138
|
+
return paths3.filter((path15) => dirname34(path15).endsWith(`${sep9}hooks`));
|
|
112137
112139
|
}
|
|
112138
112140
|
async function findManifestPaths(root, manifestName) {
|
|
112139
112141
|
let entries;
|
|
@@ -112652,8 +112654,8 @@ function formatVerbose(result) {
|
|
|
112652
112654
|
}
|
|
112653
112655
|
|
|
112654
112656
|
// packages/omo-opencode/src/cli/doctor/framework/formatter.ts
|
|
112655
|
-
function formatDoctorOutput(result,
|
|
112656
|
-
switch (
|
|
112657
|
+
function formatDoctorOutput(result, mode2) {
|
|
112658
|
+
switch (mode2) {
|
|
112657
112659
|
case "default":
|
|
112658
112660
|
return formatDefault(result);
|
|
112659
112661
|
case "status":
|
|
@@ -112817,7 +112819,7 @@ import {
|
|
|
112817
112819
|
unlinkSync as unlinkSync9,
|
|
112818
112820
|
writeFileSync as writeFileSync12
|
|
112819
112821
|
} from "fs";
|
|
112820
|
-
import { basename as basename12, dirname as
|
|
112822
|
+
import { basename as basename12, dirname as dirname35, join as join90 } from "path";
|
|
112821
112823
|
|
|
112822
112824
|
// packages/mcp-client-core/src/config-dir.ts
|
|
112823
112825
|
import { existsSync as existsSync61, realpathSync as realpathSync8 } from "fs";
|
|
@@ -113001,7 +113003,7 @@ function readLegacyStore() {
|
|
|
113001
113003
|
}
|
|
113002
113004
|
function writeTokenFile(filePath, token) {
|
|
113003
113005
|
try {
|
|
113004
|
-
const dir =
|
|
113006
|
+
const dir = dirname35(filePath);
|
|
113005
113007
|
if (!existsSync63(dir)) {
|
|
113006
113008
|
mkdirSync15(dir, { recursive: true });
|
|
113007
113009
|
}
|
|
@@ -113973,10 +113975,10 @@ function formatClassification(classification) {
|
|
|
113973
113975
|
return classification.ref.length > 0 ? `${head} ${classification.path} ${classification.ref}` : `${head} ${classification.path}`;
|
|
113974
113976
|
}
|
|
113975
113977
|
function formatSummary(result) {
|
|
113976
|
-
const
|
|
113978
|
+
const mode2 = result.apply ? "apply" : "dry-run";
|
|
113977
113979
|
const removed2 = result.repos.reduce((total, repo) => total + repo.removed.length, 0);
|
|
113978
113980
|
const failed = result.repos.reduce((total, repo) => total + repo.failed.length, 0);
|
|
113979
|
-
return `SUMMARY mode=${
|
|
113981
|
+
return `SUMMARY mode=${mode2} repos=${result.repos.length} sweep=${result.sweepCount} keep=${result.keepCount} prune=${result.pruneCount} removed=${removed2} failed=${failed}`;
|
|
113980
113982
|
}
|
|
113981
113983
|
function formatResult(result) {
|
|
113982
113984
|
const lines = [];
|
|
@@ -114498,9 +114500,9 @@ Examples:
|
|
|
114498
114500
|
`).action(async (options) => {
|
|
114499
114501
|
const rootOptions = program2.opts();
|
|
114500
114502
|
const rootDoctorPlatform = rootOptions.platform === "opencode" || rootOptions.platform === "codex" ? rootOptions.platform : undefined;
|
|
114501
|
-
const
|
|
114503
|
+
const mode2 = options.status ? "status" : options.verbose ? "verbose" : "default";
|
|
114502
114504
|
const doctorOptions = {
|
|
114503
|
-
mode,
|
|
114505
|
+
mode: mode2,
|
|
114504
114506
|
json: options.json ?? false,
|
|
114505
114507
|
target: resolveDoctorTarget(process.env.OMO_INVOCATION_NAME, options.platform ?? rootDoctorPlatform)
|
|
114506
114508
|
};
|