oh-my-opencode 5.0.0-beta.22 → 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 +184 -141
- package/dist/cli-node/index.js +184 -141
- package/dist/index.js +1567 -1508
- 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 +25 -0
- 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-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/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- 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))
|
|
@@ -26051,7 +26094,7 @@ var init_resolve_agent_definition_paths = __esm(() => {
|
|
|
26051
26094
|
// packages/omo-opencode/src/shared/opencode-version.ts
|
|
26052
26095
|
import { execSync } from "child_process";
|
|
26053
26096
|
import { existsSync as existsSync9, readFileSync as readFileSync3, realpathSync as realpathSync4 } from "fs";
|
|
26054
|
-
import { dirname as
|
|
26097
|
+
import { dirname as dirname7, join as join13 } from "path";
|
|
26055
26098
|
function parseVersion(version2) {
|
|
26056
26099
|
const cleaned = version2.replace(/^v/, "").split("-")[0];
|
|
26057
26100
|
return cleaned.split(".").map((n) => parseInt(n, 10) || 0);
|
|
@@ -26092,7 +26135,7 @@ function parsePackageVersion(content) {
|
|
|
26092
26135
|
function getPackageVersionFromBinary(binaryPath, deps) {
|
|
26093
26136
|
try {
|
|
26094
26137
|
const realBinaryPath = deps.realpath(binaryPath);
|
|
26095
|
-
const packagePath = join13(
|
|
26138
|
+
const packagePath = join13(dirname7(dirname7(realBinaryPath)), "package.json");
|
|
26096
26139
|
if (!deps.exists(packagePath))
|
|
26097
26140
|
return null;
|
|
26098
26141
|
return parsePackageVersion(deps.readText(packagePath));
|
|
@@ -26330,10 +26373,10 @@ import {
|
|
|
26330
26373
|
} from "fs";
|
|
26331
26374
|
function writeFileAtomically2(filePath, content, deps = {}) {
|
|
26332
26375
|
const tempPath = `${filePath}.tmp`;
|
|
26333
|
-
const
|
|
26334
|
-
writeFileSync3(tempPath, content, { encoding: "utf-8", mode });
|
|
26335
|
-
if (
|
|
26336
|
-
chmodSync2(tempPath,
|
|
26376
|
+
const mode2 = deps.mode;
|
|
26377
|
+
writeFileSync3(tempPath, content, { encoding: "utf-8", mode: mode2 });
|
|
26378
|
+
if (mode2 !== undefined) {
|
|
26379
|
+
chmodSync2(tempPath, mode2);
|
|
26337
26380
|
}
|
|
26338
26381
|
const tempFileDescriptor = openSync2(tempPath, "r+");
|
|
26339
26382
|
try {
|
|
@@ -26354,8 +26397,8 @@ function writeFileAtomically2(filePath, content, deps = {}) {
|
|
|
26354
26397
|
throw error51;
|
|
26355
26398
|
}
|
|
26356
26399
|
}
|
|
26357
|
-
if (
|
|
26358
|
-
chmodSync2(filePath,
|
|
26400
|
+
if (mode2 !== undefined) {
|
|
26401
|
+
chmodSync2(filePath, mode2);
|
|
26359
26402
|
}
|
|
26360
26403
|
}
|
|
26361
26404
|
var init_write_file_atomically = __esm(() => {
|
|
@@ -84307,7 +84350,7 @@ var init_plugin_name_with_version = __esm(() => {
|
|
|
84307
84350
|
|
|
84308
84351
|
// packages/omo-opencode/src/cli/config-manager/backup-config.ts
|
|
84309
84352
|
import { copyFileSync as copyFileSync2, existsSync as existsSync16, mkdirSync as mkdirSync6 } from "fs";
|
|
84310
|
-
import { dirname as
|
|
84353
|
+
import { dirname as dirname8 } from "path";
|
|
84311
84354
|
function backupConfigFile(configPath) {
|
|
84312
84355
|
if (!existsSync16(configPath)) {
|
|
84313
84356
|
return { success: true };
|
|
@@ -84315,7 +84358,7 @@ function backupConfigFile(configPath) {
|
|
|
84315
84358
|
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
84316
84359
|
const backupPath = `${configPath}.backup-${timestamp}`;
|
|
84317
84360
|
try {
|
|
84318
|
-
const dir =
|
|
84361
|
+
const dir = dirname8(backupPath);
|
|
84319
84362
|
if (!existsSync16(dir)) {
|
|
84320
84363
|
mkdirSync6(dir, { recursive: true });
|
|
84321
84364
|
}
|
|
@@ -84513,7 +84556,7 @@ function extractVersionFromPluginEntry(entry) {
|
|
|
84513
84556
|
|
|
84514
84557
|
// packages/omo-opencode/src/cli/config-manager/add-plugin-to-opencode-config.ts
|
|
84515
84558
|
import { existsSync as existsSync19, readdirSync as readdirSync4, readFileSync as readFileSync8, writeFileSync as writeFileSync5 } from "fs";
|
|
84516
|
-
import { basename as basename3, dirname as
|
|
84559
|
+
import { basename as basename3, dirname as dirname9, join as join21 } from "path";
|
|
84517
84560
|
function detectConfigFormatInDir(configDir) {
|
|
84518
84561
|
const configJsonc = join21(configDir, "opencode.jsonc");
|
|
84519
84562
|
const configJson = join21(configDir, "opencode.json");
|
|
@@ -84526,10 +84569,10 @@ function detectConfigFormatInDir(configDir) {
|
|
|
84526
84569
|
return { format: "none", path: configJson };
|
|
84527
84570
|
}
|
|
84528
84571
|
function getParentConfigDirForProfile(configDir) {
|
|
84529
|
-
const parentDir =
|
|
84572
|
+
const parentDir = dirname9(configDir);
|
|
84530
84573
|
if (basename3(parentDir) !== "profiles")
|
|
84531
84574
|
return null;
|
|
84532
|
-
return
|
|
84575
|
+
return dirname9(parentDir);
|
|
84533
84576
|
}
|
|
84534
84577
|
function listProfileConfigDirs(rootConfigDir) {
|
|
84535
84578
|
const profilesDir = join21(rootConfigDir, "profiles");
|
|
@@ -86663,7 +86706,7 @@ var init_env2 = __esm(() => {
|
|
|
86663
86706
|
});
|
|
86664
86707
|
|
|
86665
86708
|
// node_modules/.bun/posthog-node@5.51.1/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
86666
|
-
import { dirname as
|
|
86709
|
+
import { dirname as dirname18, posix as posix7, sep as sep7 } from "path";
|
|
86667
86710
|
function createModulerModifier() {
|
|
86668
86711
|
const getModuleFromFileName = createGetModuleFromFilename();
|
|
86669
86712
|
return async (frames) => {
|
|
@@ -86672,7 +86715,7 @@ function createModulerModifier() {
|
|
|
86672
86715
|
return frames;
|
|
86673
86716
|
};
|
|
86674
86717
|
}
|
|
86675
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
86718
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname18(process.argv[1]) : process.cwd(), isWindows = sep7 === "\\") {
|
|
86676
86719
|
const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
|
|
86677
86720
|
return (filename) => {
|
|
86678
86721
|
if (!filename)
|
|
@@ -92006,7 +92049,7 @@ function splitNodeOptions(nodeOptions) {
|
|
|
92006
92049
|
return args;
|
|
92007
92050
|
}
|
|
92008
92051
|
function findUnhandledRejectionMode(args) {
|
|
92009
|
-
let
|
|
92052
|
+
let mode2;
|
|
92010
92053
|
for (let index = 0;index < args.length; index++) {
|
|
92011
92054
|
const argument = args[index];
|
|
92012
92055
|
const optionName = UNHANDLED_REJECTION_OPTION_NAMES.find((name) => argument === name || argument.startsWith(`${name}=`));
|
|
@@ -92014,9 +92057,9 @@ function findUnhandledRejectionMode(args) {
|
|
|
92014
92057
|
continue;
|
|
92015
92058
|
const value = argument === optionName ? args[++index] : argument.slice(optionName.length + 1);
|
|
92016
92059
|
if (UNHANDLED_REJECTION_MODES.has(value))
|
|
92017
|
-
|
|
92060
|
+
mode2 = value;
|
|
92018
92061
|
}
|
|
92019
|
-
return
|
|
92062
|
+
return mode2;
|
|
92020
92063
|
}
|
|
92021
92064
|
function getUnhandledRejectionMode(execArgv = STARTUP_EXEC_ARGV, nodeOptions = STARTUP_NODE_OPTIONS) {
|
|
92022
92065
|
return findUnhandledRejectionMode(execArgv) ?? findUnhandledRejectionMode(splitNodeOptions(nodeOptions ?? "")) ?? "throw";
|
|
@@ -92042,17 +92085,17 @@ function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
|
92042
92085
|
_posthogErrorHandler: true
|
|
92043
92086
|
});
|
|
92044
92087
|
}
|
|
92045
|
-
function addUncaughtExceptionListener(captureFn, onFatalFn,
|
|
92088
|
+
function addUncaughtExceptionListener(captureFn, onFatalFn, mode2 = STARTUP_UNHANDLED_REJECTION_MODE) {
|
|
92046
92089
|
const process4 = globalThis.process;
|
|
92047
92090
|
if (!process4)
|
|
92048
92091
|
return;
|
|
92049
|
-
if (
|
|
92092
|
+
if (mode2 === "strict")
|
|
92050
92093
|
return void process4.on("uncaughtExceptionMonitor", (error51, origin) => captureUncaughtException(captureFn, error51, origin));
|
|
92051
92094
|
process4.on("uncaughtException", makeUncaughtExceptionHandler(captureFn, onFatalFn));
|
|
92052
92095
|
}
|
|
92053
|
-
function addUnhandledRejectionListener(captureFn,
|
|
92096
|
+
function addUnhandledRejectionListener(captureFn, mode2 = STARTUP_UNHANDLED_REJECTION_MODE) {
|
|
92054
92097
|
const process4 = globalThis.process;
|
|
92055
|
-
if (!process4 ||
|
|
92098
|
+
if (!process4 || mode2 === "throw" || mode2 === "strict" || mode2 === "warn-with-error-code")
|
|
92056
92099
|
return;
|
|
92057
92100
|
process4.on("unhandledRejection", (reason) => {
|
|
92058
92101
|
captureFn(reason, {
|
|
@@ -94277,7 +94320,7 @@ var package_default2;
|
|
|
94277
94320
|
var init_package2 = __esm(() => {
|
|
94278
94321
|
package_default2 = {
|
|
94279
94322
|
name: "@oh-my-opencode/omo-codex",
|
|
94280
|
-
version: "5.0.0-beta.
|
|
94323
|
+
version: "5.0.0-beta.23",
|
|
94281
94324
|
type: "module",
|
|
94282
94325
|
private: true,
|
|
94283
94326
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -95247,19 +95290,19 @@ var init_update_toasts = __esm(() => {
|
|
|
95247
95290
|
|
|
95248
95291
|
// packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
|
|
95249
95292
|
import { existsSync as existsSync48 } from "fs";
|
|
95250
|
-
import { dirname as
|
|
95293
|
+
import { dirname as dirname31, join as join76 } from "path";
|
|
95251
95294
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
95252
95295
|
function defaultGetModuleHostingWorkspace() {
|
|
95253
95296
|
try {
|
|
95254
|
-
const currentDir =
|
|
95297
|
+
const currentDir = dirname31(fileURLToPath5(import.meta.url));
|
|
95255
95298
|
const pkgJsonPath = findPackageJsonUp(currentDir);
|
|
95256
95299
|
if (!pkgJsonPath)
|
|
95257
95300
|
return null;
|
|
95258
|
-
const pkgDir =
|
|
95259
|
-
const nodeModulesDir =
|
|
95301
|
+
const pkgDir = dirname31(pkgJsonPath);
|
|
95302
|
+
const nodeModulesDir = dirname31(pkgDir);
|
|
95260
95303
|
if (nodeModulesDir.split(/[\\/]/).pop() !== "node_modules")
|
|
95261
95304
|
return null;
|
|
95262
|
-
return
|
|
95305
|
+
return dirname31(nodeModulesDir);
|
|
95263
95306
|
} catch (error51) {
|
|
95264
95307
|
if (error51 instanceof Error) {
|
|
95265
95308
|
return null;
|
|
@@ -97808,9 +97851,9 @@ function formatConfigSummary(config3) {
|
|
|
97808
97851
|
`);
|
|
97809
97852
|
}
|
|
97810
97853
|
function printHeader(isUpdate) {
|
|
97811
|
-
const
|
|
97854
|
+
const mode2 = isUpdate ? "Update" : "Install";
|
|
97812
97855
|
console.log();
|
|
97813
|
-
console.log(import_picocolors.default.bgMagenta(import_picocolors.default.white(` oMoMoMoMo... ${
|
|
97856
|
+
console.log(import_picocolors.default.bgMagenta(import_picocolors.default.white(` oMoMoMoMo... ${mode2} `)));
|
|
97814
97857
|
console.log();
|
|
97815
97858
|
}
|
|
97816
97859
|
function printStep(step, total, message) {
|
|
@@ -98089,7 +98132,7 @@ function windowsCommandShim(targetPath) {
|
|
|
98089
98132
|
|
|
98090
98133
|
// packages/omo-codex/src/install/codex-cache-dangling-bins.ts
|
|
98091
98134
|
import { lstat as lstat2, readFile, readdir, readlink, rm, stat } from "fs/promises";
|
|
98092
|
-
import { dirname as
|
|
98135
|
+
import { dirname as dirname10, isAbsolute, join as join23, resolve as resolve5 } from "path";
|
|
98093
98136
|
|
|
98094
98137
|
// packages/omo-codex/src/install/codex-cache-fs.ts
|
|
98095
98138
|
import { lstat } from "fs/promises";
|
|
@@ -98136,7 +98179,7 @@ async function removeDanglingManagedSymlink(linkPath) {
|
|
|
98136
98179
|
if (!linkStat.isSymbolicLink())
|
|
98137
98180
|
return;
|
|
98138
98181
|
const linkTarget = await readlink(linkPath);
|
|
98139
|
-
const target = isAbsolute(linkTarget) ? linkTarget : resolve5(
|
|
98182
|
+
const target = isAbsolute(linkTarget) ? linkTarget : resolve5(dirname10(linkPath), linkTarget);
|
|
98140
98183
|
if (!await isFileSystemEntry(target) && isManagedComponentBinTarget(target))
|
|
98141
98184
|
await rm(linkPath, { force: true });
|
|
98142
98185
|
} catch (error51) {
|
|
@@ -98598,11 +98641,11 @@ async function existingNonSymlink(path7) {
|
|
|
98598
98641
|
}
|
|
98599
98642
|
// packages/omo-codex/src/install/codex-cache-install.ts
|
|
98600
98643
|
import { cp as cp2, mkdir as mkdir3, readFile as readFile8, readdir as readdir4, rename, rm as rm4 } from "fs/promises";
|
|
98601
|
-
import { basename as basename5, dirname as
|
|
98644
|
+
import { basename as basename5, dirname as dirname13, join as join32, sep as sep5 } from "path";
|
|
98602
98645
|
|
|
98603
98646
|
// packages/omo-codex/src/install/codex-cache-bundled-mcps.ts
|
|
98604
98647
|
import { cp, mkdir as mkdir2, readFile as readFile4, stat as stat3 } from "fs/promises";
|
|
98605
|
-
import { dirname as
|
|
98648
|
+
import { dirname as dirname11, join as join27, resolve as resolve7 } from "path";
|
|
98606
98649
|
var BUNDLED_MCP_RUNTIMES = [
|
|
98607
98650
|
{
|
|
98608
98651
|
label: "Git Bash MCP",
|
|
@@ -98637,7 +98680,7 @@ async function copyBundledMcpRuntimeDist(pluginRoot, sourceRoot, runtime4) {
|
|
|
98637
98680
|
throw new Error(`missing built ${runtime4.label} dist at ${sourcePath}`);
|
|
98638
98681
|
}
|
|
98639
98682
|
const destinationPath = join27(pluginRoot, runtime4.destinationDistFromPlugin);
|
|
98640
|
-
await mkdir2(
|
|
98683
|
+
await mkdir2(dirname11(destinationPath), { recursive: true });
|
|
98641
98684
|
await cp(sourcePath, destinationPath, { recursive: true });
|
|
98642
98685
|
}
|
|
98643
98686
|
async function readSourceMcpArgs(path7) {
|
|
@@ -98675,7 +98718,7 @@ async function isDirectory(path7) {
|
|
|
98675
98718
|
// packages/omo-codex/src/install/codex-cache-local-dependencies.ts
|
|
98676
98719
|
import { realpathSync as realpathSync6 } from "fs";
|
|
98677
98720
|
import { readFile as readFile5, readdir as readdir3, writeFile as writeFile2 } from "fs/promises";
|
|
98678
|
-
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";
|
|
98679
98722
|
|
|
98680
98723
|
// packages/omo-codex/src/install/codex-cache-paths.ts
|
|
98681
98724
|
import { existsSync as existsSync24, readdirSync as readdirSync6 } from "fs";
|
|
@@ -98744,7 +98787,7 @@ async function rewriteCachedPackageLocalFileDependencies(pluginRoot, sourceRoot)
|
|
|
98744
98787
|
const parsed = JSON.parse(raw);
|
|
98745
98788
|
if (!isPlainRecord4(parsed))
|
|
98746
98789
|
continue;
|
|
98747
|
-
const packageDir =
|
|
98790
|
+
const packageDir = dirname12(packageJsonPath);
|
|
98748
98791
|
const sourcePackageDir = join29(sourceRoot, relative3(pluginRoot, packageDir));
|
|
98749
98792
|
let changed = false;
|
|
98750
98793
|
for (const field of ["dependencies", "optionalDependencies", "peerDependencies"]) {
|
|
@@ -99139,13 +99182,13 @@ function sanitizeNpmInstallEnv(env2) {
|
|
|
99139
99182
|
return Object.fromEntries(Object.entries(env2).filter(([key]) => key.toLowerCase() !== "npm_config_allow_scripts"));
|
|
99140
99183
|
}
|
|
99141
99184
|
function createTempSiblingPath(targetPath) {
|
|
99142
|
-
return join32(
|
|
99185
|
+
return join32(dirname13(targetPath), `.tmp-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
|
|
99143
99186
|
}
|
|
99144
99187
|
function createBackupSiblingPath(targetPath) {
|
|
99145
|
-
return join32(
|
|
99188
|
+
return join32(dirname13(targetPath), `.backup-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
|
|
99146
99189
|
}
|
|
99147
99190
|
async function copyDirectory(sourcePath, targetPath) {
|
|
99148
|
-
await mkdir3(
|
|
99191
|
+
await mkdir3(dirname13(targetPath), { recursive: true });
|
|
99149
99192
|
await cp2(sourcePath, targetPath, { recursive: true, filter: (source) => shouldCopyPluginPath(source, sourcePath) });
|
|
99150
99193
|
}
|
|
99151
99194
|
async function promoteDirectory(tempPath, targetPath, renameDirectory) {
|
|
@@ -99244,20 +99287,20 @@ async function copyRootRuntimeDists(input) {
|
|
|
99244
99287
|
const sourcePath = join32(repoRoot, runtimePath);
|
|
99245
99288
|
if (!await fileExistsStrict(join32(sourcePath, "index.js")))
|
|
99246
99289
|
continue;
|
|
99247
|
-
await mkdir3(
|
|
99290
|
+
await mkdir3(dirname13(join32(input.pluginRoot, runtimePath)), { recursive: true });
|
|
99248
99291
|
await cp2(sourcePath, join32(input.pluginRoot, runtimePath), { recursive: true });
|
|
99249
99292
|
}
|
|
99250
99293
|
}
|
|
99251
99294
|
function repoRootForCodexPluginSource(sourcePath) {
|
|
99252
|
-
const codexPackageRoot =
|
|
99253
|
-
const packagesRoot =
|
|
99295
|
+
const codexPackageRoot = dirname13(sourcePath);
|
|
99296
|
+
const packagesRoot = dirname13(codexPackageRoot);
|
|
99254
99297
|
if (basename5(sourcePath) !== "plugin")
|
|
99255
99298
|
return null;
|
|
99256
99299
|
if (basename5(codexPackageRoot) !== "omo-codex")
|
|
99257
99300
|
return null;
|
|
99258
99301
|
if (basename5(packagesRoot) !== "packages")
|
|
99259
99302
|
return null;
|
|
99260
|
-
return
|
|
99303
|
+
return dirname13(packagesRoot);
|
|
99261
99304
|
}
|
|
99262
99305
|
// packages/omo-codex/src/install/codex-cache-prune.ts
|
|
99263
99306
|
import { lstat as lstat5, readdir as readdir5, rm as rm5, stat as stat4 } from "fs/promises";
|
|
@@ -99388,7 +99431,7 @@ async function shouldBuildSourcePackages(repoRoot) {
|
|
|
99388
99431
|
|
|
99389
99432
|
// packages/omo-codex/src/install/codex-config-toml.ts
|
|
99390
99433
|
import { mkdir as mkdir5, readFile as readFile11 } from "fs/promises";
|
|
99391
|
-
import { dirname as
|
|
99434
|
+
import { dirname as dirname16 } from "path";
|
|
99392
99435
|
|
|
99393
99436
|
// packages/omo-codex/src/install/toml-section-editor.ts
|
|
99394
99437
|
function findTomlSection(config3, header) {
|
|
@@ -99970,12 +100013,12 @@ function tomlKeySegment(value) {
|
|
|
99970
100013
|
|
|
99971
100014
|
// packages/omo-codex/src/install/codex-config-atomic-write.ts
|
|
99972
100015
|
import { lstat as lstat6, readlink as readlink4, realpath, rename as rename3, unlink, writeFile as writeFile5 } from "fs/promises";
|
|
99973
|
-
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";
|
|
99974
100017
|
var RENAME_RETRY_DELAYS_MS = [10, 25, 50];
|
|
99975
100018
|
var RETRIABLE_RENAME_CODES = new Set(["EPERM", "EBUSY"]);
|
|
99976
100019
|
async function writeFileAtomic(targetPath, data) {
|
|
99977
100020
|
const writeTarget = await resolveSymlinkTarget(targetPath);
|
|
99978
|
-
const temporaryPath = join36(
|
|
100021
|
+
const temporaryPath = join36(dirname14(writeTarget), `.tmp-${basename6(writeTarget)}-${process.pid}-${Date.now()}`);
|
|
99979
100022
|
await writeFile5(temporaryPath, data);
|
|
99980
100023
|
try {
|
|
99981
100024
|
await renameWithRetry(temporaryPath, writeTarget);
|
|
@@ -100004,7 +100047,7 @@ async function resolveSymlinkTarget(targetPath) {
|
|
|
100004
100047
|
if (!(error51 instanceof Error))
|
|
100005
100048
|
throw error51;
|
|
100006
100049
|
const linkValue = await readlink4(targetPath);
|
|
100007
|
-
return isAbsolute5(linkValue) ? linkValue : resolve10(
|
|
100050
|
+
return isAbsolute5(linkValue) ? linkValue : resolve10(dirname14(targetPath), linkValue);
|
|
100008
100051
|
}
|
|
100009
100052
|
}
|
|
100010
100053
|
async function renameWithRetry(fromPath, toPath) {
|
|
@@ -100484,14 +100527,14 @@ import { join as join37 } from "path";
|
|
|
100484
100527
|
var FALLBACK_CODEX_MODEL_CATALOG = {
|
|
100485
100528
|
current: {
|
|
100486
100529
|
model: "gpt-5.6-sol",
|
|
100487
|
-
modelContextWindow:
|
|
100530
|
+
modelContextWindow: 650000,
|
|
100488
100531
|
modelReasoningEffort: "high",
|
|
100489
100532
|
planModeReasoningEffort: "xhigh"
|
|
100490
100533
|
},
|
|
100491
100534
|
managedProfiles: [
|
|
100492
100535
|
{
|
|
100493
100536
|
model: "gpt-5.5",
|
|
100494
|
-
modelContextWindow:
|
|
100537
|
+
modelContextWindow: 650000,
|
|
100495
100538
|
modelReasoningEffort: "high",
|
|
100496
100539
|
planModeReasoningEffort: "xhigh"
|
|
100497
100540
|
},
|
|
@@ -100589,7 +100632,7 @@ function isRootSetting2(line, key) {
|
|
|
100589
100632
|
|
|
100590
100633
|
// packages/omo-codex/src/install/codex-multi-agent-v2-config.ts
|
|
100591
100634
|
import { readFileSync as readFileSync11 } from "fs";
|
|
100592
|
-
import { dirname as
|
|
100635
|
+
import { dirname as dirname15, isAbsolute as isAbsolute6, join as join38 } from "path";
|
|
100593
100636
|
var CODEX_AGENTS_HEADER = "agents";
|
|
100594
100637
|
var CODEX_MULTI_AGENT_V2_HEADER = "features.multi_agent_v2";
|
|
100595
100638
|
var CODEX_MULTI_AGENT_V2_THREAD_LIMIT_KEY = `${CODEX_MULTI_AGENT_V2_HEADER}.max_concurrent_threads_per_session`;
|
|
@@ -100626,8 +100669,8 @@ function resolveCodexMultiAgentVersion(config3, configPath) {
|
|
|
100626
100669
|
}
|
|
100627
100670
|
function resolveCatalogPath(configuredPath, configPath) {
|
|
100628
100671
|
if (configuredPath === null)
|
|
100629
|
-
return join38(
|
|
100630
|
-
return isAbsolute6(configuredPath) ? configuredPath : join38(
|
|
100672
|
+
return join38(dirname15(configPath), "models_cache.json");
|
|
100673
|
+
return isAbsolute6(configuredPath) ? configuredPath : join38(dirname15(configPath), configuredPath);
|
|
100631
100674
|
}
|
|
100632
100675
|
function readCatalogMultiAgentVersion(model, cachePath) {
|
|
100633
100676
|
let raw;
|
|
@@ -100731,7 +100774,7 @@ function readBooleanSetting(sectionText, key) {
|
|
|
100731
100774
|
|
|
100732
100775
|
// packages/omo-codex/src/install/codex-config-toml.ts
|
|
100733
100776
|
async function updateCodexConfig(input) {
|
|
100734
|
-
await mkdir5(
|
|
100777
|
+
await mkdir5(dirname16(input.configPath), { recursive: true });
|
|
100735
100778
|
let config3;
|
|
100736
100779
|
try {
|
|
100737
100780
|
config3 = await readFile11(input.configPath, "utf8");
|
|
@@ -101704,7 +101747,7 @@ var defaultRunCommand = async (command, args, options) => {
|
|
|
101704
101747
|
|
|
101705
101748
|
// packages/omo-codex/src/install/codex-project-local-cleanup.ts
|
|
101706
101749
|
import { copyFile as copyFile2, lstat as lstat10, readFile as readFile17, writeFile as writeFile10 } from "fs/promises";
|
|
101707
|
-
import { dirname as
|
|
101750
|
+
import { dirname as dirname17, join as join46, resolve as resolve11 } from "path";
|
|
101708
101751
|
var LEGACY_AGENT_CONFLICT_KEYS = ["max_threads"];
|
|
101709
101752
|
var PROJECT_LOCAL_ARTIFACT_PATHS = [
|
|
101710
101753
|
".codex/hooks.json",
|
|
@@ -101824,13 +101867,13 @@ async function findProjectLocalCodexConfigs(startDirectory, codexHome) {
|
|
|
101824
101867
|
artifactRoots: artifactRootsForConfigPaths(configPathsFromCwd)
|
|
101825
101868
|
};
|
|
101826
101869
|
}
|
|
101827
|
-
const parent =
|
|
101870
|
+
const parent = dirname17(current);
|
|
101828
101871
|
if (parent === current) {
|
|
101829
101872
|
const nearestConfigPath = configPathsFromCwd[0];
|
|
101830
101873
|
return nearestConfigPath === undefined ? null : {
|
|
101831
|
-
projectRoot:
|
|
101874
|
+
projectRoot: dirname17(dirname17(nearestConfigPath)),
|
|
101832
101875
|
configPaths: [nearestConfigPath],
|
|
101833
|
-
artifactRoots: [
|
|
101876
|
+
artifactRoots: [dirname17(dirname17(nearestConfigPath))]
|
|
101834
101877
|
};
|
|
101835
101878
|
}
|
|
101836
101879
|
current = parent;
|
|
@@ -101846,7 +101889,7 @@ async function isRegularProjectLocalConfig(directory, configPath) {
|
|
|
101846
101889
|
function artifactRootsForConfigPaths(configPaths2) {
|
|
101847
101890
|
const roots = [];
|
|
101848
101891
|
for (const configPath of configPaths2) {
|
|
101849
|
-
const root =
|
|
101892
|
+
const root = dirname17(dirname17(configPath));
|
|
101850
101893
|
if (!roots.includes(root))
|
|
101851
101894
|
roots.push(root);
|
|
101852
101895
|
}
|
|
@@ -102756,7 +102799,7 @@ import { isAbsolute as isAbsolute11, join as join58, relative as relative6, reso
|
|
|
102756
102799
|
|
|
102757
102800
|
// packages/omo-codex/src/install/codex-cleanup-bins.ts
|
|
102758
102801
|
import { lstat as lstat12, readFile as readFile22, readdir as readdir12, readlink as readlink6, rm as rm11 } from "fs/promises";
|
|
102759
|
-
import { dirname as
|
|
102802
|
+
import { dirname as dirname19, isAbsolute as isAbsolute9, join as join56, resolve as resolve14 } from "path";
|
|
102760
102803
|
var ROOT_RUNTIME_BIN_NAME = "omo";
|
|
102761
102804
|
var MANAGED_CODEX_BIN_NAMES = new Set([
|
|
102762
102805
|
ROOT_RUNTIME_BIN_NAME,
|
|
@@ -102813,7 +102856,7 @@ async function isManagedCodexBin(linkPath, platform, binName) {
|
|
|
102813
102856
|
if (platform === "win32")
|
|
102814
102857
|
return false;
|
|
102815
102858
|
const linkTarget = await readlink6(linkPath);
|
|
102816
|
-
const target = isAbsolute9(linkTarget) ? linkTarget : resolve14(
|
|
102859
|
+
const target = isAbsolute9(linkTarget) ? linkTarget : resolve14(dirname19(linkPath), linkTarget);
|
|
102817
102860
|
return isManagedComponentBinTarget(target) || isLegacyCodexBinTarget(binName, target);
|
|
102818
102861
|
}
|
|
102819
102862
|
if (!entryStat.isFile())
|
|
@@ -102824,7 +102867,7 @@ async function isManagedCodexBin(linkPath, platform, binName) {
|
|
|
102824
102867
|
|
|
102825
102868
|
// packages/omo-codex/src/install/codex-cleanup-config.ts
|
|
102826
102869
|
import { lstat as lstat13, mkdir as mkdir8, readFile as readFile23, writeFile as writeFile13 } from "fs/promises";
|
|
102827
|
-
import { dirname as
|
|
102870
|
+
import { dirname as dirname20 } from "path";
|
|
102828
102871
|
var MANAGED_MARKETPLACES = ["sisyphuslabs", "lazycodex", "code-yeongyu-codex-plugins"];
|
|
102829
102872
|
var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE2 = ["codex-ultrawork-reviewer"];
|
|
102830
102873
|
var CURRENT_MANAGED_CODEX_AGENT_NAMES2 = [
|
|
@@ -102861,7 +102904,7 @@ async function cleanupCodexConfig(configPath, now) {
|
|
|
102861
102904
|
if (next === original)
|
|
102862
102905
|
return { changed: false };
|
|
102863
102906
|
const backupPath = `${configPath}.backup-${formatBackupTimestamp2(now?.() ?? new Date)}`;
|
|
102864
|
-
await mkdir8(
|
|
102907
|
+
await mkdir8(dirname20(configPath), { recursive: true });
|
|
102865
102908
|
await writeFile13(backupPath, original);
|
|
102866
102909
|
await writeFile13(configPath, `${next.trimEnd()}
|
|
102867
102910
|
`);
|
|
@@ -102940,10 +102983,10 @@ function nodeErrorCode5(error51) {
|
|
|
102940
102983
|
}
|
|
102941
102984
|
|
|
102942
102985
|
// packages/omo-codex/src/install/codex-cleanup-safety.ts
|
|
102943
|
-
import { dirname as
|
|
102986
|
+
import { dirname as dirname21, isAbsolute as isAbsolute10, join as join57, relative as relative5, resolve as resolve15 } from "path";
|
|
102944
102987
|
function codexHomeResolvesToFilesystemRoot(codexHome) {
|
|
102945
102988
|
const resolved = resolve15(codexHome);
|
|
102946
|
-
return
|
|
102989
|
+
return dirname21(resolved) === resolved;
|
|
102947
102990
|
}
|
|
102948
102991
|
function validateManagedCleanupTarget(input) {
|
|
102949
102992
|
if (!isAbsolute10(input.path))
|
|
@@ -103206,7 +103249,7 @@ var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", ".
|
|
|
103206
103249
|
import { execFile as execFile4 } from "child_process";
|
|
103207
103250
|
import { existsSync as existsSync32 } from "fs";
|
|
103208
103251
|
import { homedir as homedir11 } from "os";
|
|
103209
|
-
import { dirname as
|
|
103252
|
+
import { dirname as dirname25, join as join63, resolve as resolve20 } from "path";
|
|
103210
103253
|
import { fileURLToPath } from "url";
|
|
103211
103254
|
import { promisify as promisify3 } from "util";
|
|
103212
103255
|
|
|
@@ -103237,9 +103280,9 @@ function resolveAgentHome(options) {
|
|
|
103237
103280
|
}
|
|
103238
103281
|
|
|
103239
103282
|
// packages/omo-senpi/src/install/local-launcher.ts
|
|
103240
|
-
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";
|
|
103241
103284
|
import { homedir as homedir10 } from "os";
|
|
103242
|
-
import { dirname as
|
|
103285
|
+
import { dirname as dirname22, join as join60, resolve as resolve18 } from "path";
|
|
103243
103286
|
var MARKER = "omo-local-launcher";
|
|
103244
103287
|
function localLauncherPath(homeDir = homedir10()) {
|
|
103245
103288
|
return join60(homeDir, ".local", "bin", "omo");
|
|
@@ -103310,7 +103353,7 @@ function installLocalLauncher(options) {
|
|
|
103310
103353
|
const path7 = localLauncherPath(options.homeDir);
|
|
103311
103354
|
if (existsSync31(path7) && !readFileSync14(path7, "utf8").includes(MARKER))
|
|
103312
103355
|
return;
|
|
103313
|
-
mkdirSync10(
|
|
103356
|
+
mkdirSync10(dirname22(path7), { recursive: true });
|
|
103314
103357
|
writeFileSync6(path7, renderLocalLauncher(options));
|
|
103315
103358
|
chmodSync3(path7, 493);
|
|
103316
103359
|
if ((options.platform ?? process.platform) === "win32") {
|
|
@@ -103325,12 +103368,12 @@ node "%~dp0omo" %*\r
|
|
|
103325
103368
|
import { createHash as createHash5 } from "crypto";
|
|
103326
103369
|
import { constants as constants9 } from "fs";
|
|
103327
103370
|
import { access as access2, readFile as readFile26, stat as stat6 } from "fs/promises";
|
|
103328
|
-
import { dirname as
|
|
103371
|
+
import { dirname as dirname24, join as join62 } from "path";
|
|
103329
103372
|
|
|
103330
103373
|
// packages/omo-senpi/src/install/senpi-settings.ts
|
|
103331
103374
|
import { constants as constants8 } from "fs";
|
|
103332
103375
|
import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile25, rename as rename5, writeFile as writeFile14 } from "fs/promises";
|
|
103333
|
-
import { dirname as
|
|
103376
|
+
import { dirname as dirname23, join as join61, resolve as resolve19 } from "path";
|
|
103334
103377
|
var OMO_SENPI_PACKAGE_NAME = "@code-yeongyu/omo-senpi";
|
|
103335
103378
|
var LEGACY_BUILTIN_SHADOW_PACKAGES = [
|
|
103336
103379
|
join61("packages", "pi-goal"),
|
|
@@ -103377,7 +103420,7 @@ async function removeSupersededOmoPackages(packages, currentPluginPath, agentDir
|
|
|
103377
103420
|
return entries.filter((entry) => entry !== undefined);
|
|
103378
103421
|
}
|
|
103379
103422
|
async function writeSettingsAtomically(settingsPath, settings) {
|
|
103380
|
-
await mkdir9(
|
|
103423
|
+
await mkdir9(dirname23(settingsPath), { recursive: true });
|
|
103381
103424
|
const backupPath = await nextBackupPath(settingsPath);
|
|
103382
103425
|
if (await fileExists(settingsPath)) {
|
|
103383
103426
|
await copyFile3(settingsPath, backupPath);
|
|
@@ -103497,7 +103540,7 @@ async function hasMissingPluginArtifact(pluginPath) {
|
|
|
103497
103540
|
}
|
|
103498
103541
|
async function verifyAstGrepRuntimeIntegrity(pluginPath, platform) {
|
|
103499
103542
|
const runtimeEntry = join62(pluginPath, "runtime", "ast-grep-mcp", "cli.js");
|
|
103500
|
-
const manifestPath = join62(
|
|
103543
|
+
const manifestPath = join62(dirname24(runtimeEntry), "manifest.json");
|
|
103501
103544
|
let runtimeStat;
|
|
103502
103545
|
try {
|
|
103503
103546
|
runtimeStat = await stat6(runtimeEntry);
|
|
@@ -103587,7 +103630,7 @@ async function runSenpiInstaller(options = {}) {
|
|
|
103587
103630
|
function resolveInstallContext(options) {
|
|
103588
103631
|
const env3 = options.env ?? process.env;
|
|
103589
103632
|
const allowBuild = options.pluginPath === undefined;
|
|
103590
|
-
const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(
|
|
103633
|
+
const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname25(fileURLToPath(import.meta.url))) : dirname25(resolve20(options.pluginPath))));
|
|
103591
103634
|
const agentDir = resolve20(options.agentDir ?? resolveAgentHome({ env: env3, homeDir: env3.HOME ?? homedir11() }));
|
|
103592
103635
|
const pluginPath = resolve20(options.pluginPath ?? join63(repoRoot, "packages", "omo-senpi", "plugin"));
|
|
103593
103636
|
return {
|
|
@@ -107591,7 +107634,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
|
107591
107634
|
// packages/omo-opencode/src/cli/run/opencode-binary-resolver.ts
|
|
107592
107635
|
init_bun_which_shim();
|
|
107593
107636
|
init_spawn_with_windows_hide();
|
|
107594
|
-
import { delimiter as delimiter2, dirname as
|
|
107637
|
+
import { delimiter as delimiter2, dirname as dirname26, posix as posix9, win32 as win325 } from "path";
|
|
107595
107638
|
var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
|
|
107596
107639
|
var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
|
|
107597
107640
|
function getCommandCandidates(platform) {
|
|
@@ -107649,7 +107692,7 @@ async function findWorkingOpencodeBinary(pathEnv = process.env.PATH, probe2 = ca
|
|
|
107649
107692
|
return null;
|
|
107650
107693
|
}
|
|
107651
107694
|
function buildPathWithBinaryFirst(pathEnv, binaryPath) {
|
|
107652
|
-
const preferredDir =
|
|
107695
|
+
const preferredDir = dirname26(binaryPath);
|
|
107653
107696
|
const existing = (pathEnv ?? "").split(delimiter2).filter((entry) => entry.length > 0 && entry !== preferredDir);
|
|
107654
107697
|
return [preferredDir, ...existing].join(delimiter2);
|
|
107655
107698
|
}
|
|
@@ -108427,7 +108470,7 @@ init_state();
|
|
|
108427
108470
|
// packages/omo-opencode/src/features/run-continuation-state/constants.ts
|
|
108428
108471
|
var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
|
|
108429
108472
|
// packages/omo-opencode/src/features/run-continuation-state/storage.ts
|
|
108430
|
-
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";
|
|
108431
108474
|
import { join as join68 } from "path";
|
|
108432
108475
|
function getMarkerPath(directory, sessionID) {
|
|
108433
108476
|
return join68(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
|
|
@@ -108607,7 +108650,7 @@ init_agent_display_names();
|
|
|
108607
108650
|
// packages/omo-opencode/src/hooks/ralph-loop/storage.ts
|
|
108608
108651
|
init_frontmatter2();
|
|
108609
108652
|
import { existsSync as existsSync41, readFileSync as readFileSync22, writeFileSync as writeFileSync8, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "fs";
|
|
108610
|
-
import { dirname as
|
|
108653
|
+
import { dirname as dirname27, join as join70 } from "path";
|
|
108611
108654
|
|
|
108612
108655
|
// packages/omo-opencode/src/hooks/ralph-loop/constants.ts
|
|
108613
108656
|
var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
|
|
@@ -110449,8 +110492,8 @@ function getCategoryEffectiveVariant(categoryName, requirement, config4) {
|
|
|
110449
110492
|
}
|
|
110450
110493
|
|
|
110451
110494
|
// packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
|
|
110452
|
-
function formatCapabilityResolutionLabel(
|
|
110453
|
-
return
|
|
110495
|
+
function formatCapabilityResolutionLabel(mode2) {
|
|
110496
|
+
return mode2 ?? "unknown";
|
|
110454
110497
|
}
|
|
110455
110498
|
function buildModelResolutionDetails(options) {
|
|
110456
110499
|
const details = [];
|
|
@@ -110568,8 +110611,8 @@ function collectCapabilityResolutionIssues(info) {
|
|
|
110568
110611
|
const issues = [];
|
|
110569
110612
|
const allEntries = [...info.agents, ...info.categories];
|
|
110570
110613
|
const fallbackEntries = allEntries.filter((entry) => {
|
|
110571
|
-
const
|
|
110572
|
-
return
|
|
110614
|
+
const mode2 = entry.capabilityDiagnostics?.resolutionMode;
|
|
110615
|
+
return mode2 === "unknown";
|
|
110573
110616
|
});
|
|
110574
110617
|
if (fallbackEntries.length === 0) {
|
|
110575
110618
|
return issues;
|
|
@@ -110845,7 +110888,7 @@ init_src2();
|
|
|
110845
110888
|
import { existsSync as existsSync55 } from "fs";
|
|
110846
110889
|
import { createRequire as createRequire3 } from "module";
|
|
110847
110890
|
import { homedir as homedir19 } from "os";
|
|
110848
|
-
import { dirname as
|
|
110891
|
+
import { dirname as dirname32, join as join83 } from "path";
|
|
110849
110892
|
|
|
110850
110893
|
// packages/omo-opencode/src/hooks/comment-checker/downloader.ts
|
|
110851
110894
|
import { join as join82 } from "path";
|
|
@@ -110942,7 +110985,7 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
|
|
|
110942
110985
|
const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
|
|
110943
110986
|
const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
|
|
110944
110987
|
try {
|
|
110945
|
-
const packageDir = baseDirOverride ??
|
|
110988
|
+
const packageDir = baseDirOverride ?? dirname32(resolvePackageJsonPath());
|
|
110946
110989
|
const vendorPath = join83(packageDir, "vendor", platformKey, binaryName);
|
|
110947
110990
|
if (existsSync55(vendorPath))
|
|
110948
110991
|
return vendorPath;
|
|
@@ -111094,7 +111137,7 @@ async function getGhCliInfo(dependencies = {}) {
|
|
|
111094
111137
|
init_zod();
|
|
111095
111138
|
init_opencode_config_dir();
|
|
111096
111139
|
import { existsSync as existsSync56, readFileSync as readFileSync35 } from "fs";
|
|
111097
|
-
import { delimiter as delimiter3, dirname as
|
|
111140
|
+
import { delimiter as delimiter3, dirname as dirname33, resolve as resolve23 } from "path";
|
|
111098
111141
|
import { fileURLToPath as fileURLToPath7 } from "url";
|
|
111099
111142
|
|
|
111100
111143
|
// packages/omo-opencode/src/mcp/cli-suffix.ts
|
|
@@ -111225,7 +111268,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
|
|
|
111225
111268
|
].join(";");
|
|
111226
111269
|
function getModuleDirectory(moduleUrl) {
|
|
111227
111270
|
try {
|
|
111228
|
-
return
|
|
111271
|
+
return dirname33(fileURLToPath7(moduleUrl));
|
|
111229
111272
|
} catch (error51) {
|
|
111230
111273
|
if (!(error51 instanceof Error))
|
|
111231
111274
|
throw error51;
|
|
@@ -111958,7 +112001,7 @@ async function pathExists2(path15) {
|
|
|
111958
112001
|
init_src2();
|
|
111959
112002
|
import { readdir as readdir15, readFile as readFile28, stat as stat7 } from "fs/promises";
|
|
111960
112003
|
import { homedir as homedir23 } from "os";
|
|
111961
|
-
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";
|
|
111962
112005
|
var CODEX_COMPONENTS_CHECK_ID = "codex-components";
|
|
111963
112006
|
var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
|
|
111964
112007
|
var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
|
|
@@ -112032,7 +112075,7 @@ async function auditBundleTargets(pluginRoot) {
|
|
|
112032
112075
|
const manifest2 = await readJson2(manifestPath);
|
|
112033
112076
|
if (manifest2 === null || !isRecord13(manifest2["mcpServers"]))
|
|
112034
112077
|
continue;
|
|
112035
|
-
const manifestRoot =
|
|
112078
|
+
const manifestRoot = dirname34(manifestPath);
|
|
112036
112079
|
const isRootManifest = resolve25(manifestRoot) === resolve25(pluginRoot);
|
|
112037
112080
|
for (const server2 of Object.values(manifest2["mcpServers"])) {
|
|
112038
112081
|
if (!isRecord13(server2) || !Array.isArray(server2["args"]))
|
|
@@ -112053,7 +112096,7 @@ async function auditBundleTargets(pluginRoot) {
|
|
|
112053
112096
|
continue;
|
|
112054
112097
|
const commands2 = [];
|
|
112055
112098
|
collectHookCommands(manifest2, commands2);
|
|
112056
|
-
const hookPluginRoot =
|
|
112099
|
+
const hookPluginRoot = dirname34(dirname34(hookManifestPath));
|
|
112057
112100
|
for (const command of commands2) {
|
|
112058
112101
|
for (const relativePath of extractPluginRootPaths(command)) {
|
|
112059
112102
|
referencedCount += 1;
|
|
@@ -112092,7 +112135,7 @@ async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEsc
|
|
|
112092
112135
|
}
|
|
112093
112136
|
async function findHookManifestPaths(root) {
|
|
112094
112137
|
const paths3 = await findManifestPaths(root, "hooks.json");
|
|
112095
|
-
return paths3.filter((path15) =>
|
|
112138
|
+
return paths3.filter((path15) => dirname34(path15).endsWith(`${sep9}hooks`));
|
|
112096
112139
|
}
|
|
112097
112140
|
async function findManifestPaths(root, manifestName) {
|
|
112098
112141
|
let entries;
|
|
@@ -112611,8 +112654,8 @@ function formatVerbose(result) {
|
|
|
112611
112654
|
}
|
|
112612
112655
|
|
|
112613
112656
|
// packages/omo-opencode/src/cli/doctor/framework/formatter.ts
|
|
112614
|
-
function formatDoctorOutput(result,
|
|
112615
|
-
switch (
|
|
112657
|
+
function formatDoctorOutput(result, mode2) {
|
|
112658
|
+
switch (mode2) {
|
|
112616
112659
|
case "default":
|
|
112617
112660
|
return formatDefault(result);
|
|
112618
112661
|
case "status":
|
|
@@ -112776,7 +112819,7 @@ import {
|
|
|
112776
112819
|
unlinkSync as unlinkSync9,
|
|
112777
112820
|
writeFileSync as writeFileSync12
|
|
112778
112821
|
} from "fs";
|
|
112779
|
-
import { basename as basename12, dirname as
|
|
112822
|
+
import { basename as basename12, dirname as dirname35, join as join90 } from "path";
|
|
112780
112823
|
|
|
112781
112824
|
// packages/mcp-client-core/src/config-dir.ts
|
|
112782
112825
|
import { existsSync as existsSync61, realpathSync as realpathSync8 } from "fs";
|
|
@@ -112960,7 +113003,7 @@ function readLegacyStore() {
|
|
|
112960
113003
|
}
|
|
112961
113004
|
function writeTokenFile(filePath, token) {
|
|
112962
113005
|
try {
|
|
112963
|
-
const dir =
|
|
113006
|
+
const dir = dirname35(filePath);
|
|
112964
113007
|
if (!existsSync63(dir)) {
|
|
112965
113008
|
mkdirSync15(dir, { recursive: true });
|
|
112966
113009
|
}
|
|
@@ -113932,10 +113975,10 @@ function formatClassification(classification) {
|
|
|
113932
113975
|
return classification.ref.length > 0 ? `${head} ${classification.path} ${classification.ref}` : `${head} ${classification.path}`;
|
|
113933
113976
|
}
|
|
113934
113977
|
function formatSummary(result) {
|
|
113935
|
-
const
|
|
113978
|
+
const mode2 = result.apply ? "apply" : "dry-run";
|
|
113936
113979
|
const removed2 = result.repos.reduce((total, repo) => total + repo.removed.length, 0);
|
|
113937
113980
|
const failed = result.repos.reduce((total, repo) => total + repo.failed.length, 0);
|
|
113938
|
-
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}`;
|
|
113939
113982
|
}
|
|
113940
113983
|
function formatResult(result) {
|
|
113941
113984
|
const lines = [];
|
|
@@ -114457,9 +114500,9 @@ Examples:
|
|
|
114457
114500
|
`).action(async (options) => {
|
|
114458
114501
|
const rootOptions = program2.opts();
|
|
114459
114502
|
const rootDoctorPlatform = rootOptions.platform === "opencode" || rootOptions.platform === "codex" ? rootOptions.platform : undefined;
|
|
114460
|
-
const
|
|
114503
|
+
const mode2 = options.status ? "status" : options.verbose ? "verbose" : "default";
|
|
114461
114504
|
const doctorOptions = {
|
|
114462
|
-
mode,
|
|
114505
|
+
mode: mode2,
|
|
114463
114506
|
json: options.json ?? false,
|
|
114464
114507
|
target: resolveDoctorTarget(process.env.OMO_INVOCATION_NAME, options.platform ?? rootDoctorPlatform)
|
|
114465
114508
|
};
|