oh-my-opencode 5.0.0-beta.24 → 5.0.0-beta.25
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 +141 -184
- package/dist/cli-node/index.js +141 -184
- package/dist/index.js +1508 -1567
- package/dist/skills/debugging/SKILL.md +0 -2
- package/dist/skills/debugging/references/methodology/00-setup.md +0 -12
- package/dist/skills/debugging/references/methodology/02-investigate.md +0 -21
- package/dist/skills/debugging/references/runtimes/go.md +1 -15
- package/dist/skills/debugging/references/runtimes/native-binary.md +0 -38
- package/dist/skills/debugging/references/runtimes/node.md +0 -25
- package/dist/skills/debugging/references/runtimes/python.md +0 -13
- package/dist/skills/debugging/references/runtimes/rust.md +0 -41
- package/dist/tools/delegate-task/types.d.ts +0 -3
- package/dist/tui.js +0 -25
- package/package.json +15 -18
- package/packages/lsp-core/src/index.ts +0 -1
- package/packages/lsp-core/src/lsp/client-wrapper.ts +5 -25
- package/packages/lsp-core/src/lsp/client.ts +0 -26
- package/packages/lsp-core/src/lsp/connection.ts +0 -16
- package/packages/lsp-core/src/lsp/constants.ts +0 -1
- package/packages/lsp-core/src/lsp/manager.ts +1 -34
- package/packages/lsp-core/src/lsp/server-definitions.ts +0 -29
- package/packages/lsp-core/src/lsp/server-installation.ts +27 -200
- package/packages/lsp-core/src/lsp/server-resolution.ts +5 -18
- package/packages/lsp-core/src/lsp/transport.ts +0 -9
- package/packages/lsp-core/src/lsp/types.ts +0 -8
- package/packages/lsp-core/src/tool-surface.test.ts +1 -13
- package/packages/lsp-core/src/tools/definitions.ts +0 -14
- package/packages/lsp-core/src/tools/index.ts +0 -1
- package/packages/lsp-core/src/tools/types.ts +0 -10
- package/packages/lsp-daemon/dist/cli.js +144 -432
- package/packages/lsp-daemon/dist/client.d.ts +0 -10
- package/packages/lsp-daemon/dist/client.js +107 -401
- package/packages/lsp-daemon/dist/daemon-client.d.ts +0 -1
- package/packages/lsp-daemon/dist/daemon-client.js +0 -3
- package/packages/lsp-daemon/dist/index.js +107 -395
- package/packages/lsp-tools-mcp/dist/cli.js +99 -384
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +0 -53
- package/packages/lsp-tools-mcp/dist/mcp.js +99 -384
- package/packages/lsp-tools-mcp/dist/tools.js +99 -385
- 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 +35 -69
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +2 -21
- 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 +121 -404
- 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 +15 -30
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +15 -30
- 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 +0 -2
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/00-setup.md +0 -12
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/02-investigate.md +0 -21
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/go.md +1 -15
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/native-binary.md +0 -38
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/node.md +0 -25
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/python.md +0 -13
- package/packages/omo-codex/plugin/skills/debugging/references/runtimes/rust.md +0 -41
- 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 +23 -38
- package/packages/shared-skills/skills/debugging/SKILL.md +0 -2
- package/packages/shared-skills/skills/debugging/references/methodology/00-setup.md +0 -12
- package/packages/shared-skills/skills/debugging/references/methodology/02-investigate.md +0 -21
- package/packages/shared-skills/skills/debugging/references/runtimes/go.md +1 -15
- package/packages/shared-skills/skills/debugging/references/runtimes/native-binary.md +0 -38
- package/packages/shared-skills/skills/debugging/references/runtimes/node.md +0 -25
- package/packages/shared-skills/skills/debugging/references/runtimes/python.md +0 -13
- package/packages/shared-skills/skills/debugging/references/runtimes/rust.md +0 -41
- package/dist/skills/debugging/references/scripts/dap.mjs +0 -267
- package/dist/skills/debugging/references/scripts/dap.test.ts +0 -86
- package/dist/skills/debugging/references/scripts/fixture-adapter.mjs +0 -59
- package/dist/skills/debugging/references/tools/dap.md +0 -103
- package/dist/skills/debugging/references/tools/frida.md +0 -193
- package/packages/lsp-core/src/lsp/format-document.test.ts +0 -143
- package/packages/lsp-core/src/lsp/format-document.ts +0 -90
- package/packages/lsp-core/src/lsp/manager-max-clients.test.ts +0 -151
- package/packages/lsp-core/src/lsp/server-installation.test.ts +0 -376
- package/packages/lsp-core/src/lsp/server-resolution-local-binary.test.ts +0 -170
- package/packages/lsp-core/src/tools/format.test.ts +0 -56
- package/packages/lsp-core/src/tools/format.ts +0 -56
- package/packages/omo-codex/plugin/skills/debugging/references/scripts/dap.mjs +0 -267
- package/packages/omo-codex/plugin/skills/debugging/references/scripts/fixture-adapter.mjs +0 -59
- package/packages/omo-codex/plugin/skills/debugging/references/tools/dap.md +0 -103
- package/packages/omo-codex/plugin/skills/debugging/references/tools/frida.md +0 -193
- package/packages/shared-skills/skills/debugging/references/scripts/dap.mjs +0 -267
- package/packages/shared-skills/skills/debugging/references/scripts/dap.test.ts +0 -86
- package/packages/shared-skills/skills/debugging/references/scripts/fixture-adapter.mjs +0 -59
- package/packages/shared-skills/skills/debugging/references/tools/dap.md +0 -103
- package/packages/shared-skills/skills/debugging/references/tools/frida.md +0 -193
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.25",
|
|
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.26-2",
|
|
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.25",
|
|
280
|
+
"oh-my-opencode-darwin-x64": "5.0.0-beta.25",
|
|
281
|
+
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.25",
|
|
282
|
+
"oh-my-opencode-linux-arm64": "5.0.0-beta.25",
|
|
283
|
+
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.25",
|
|
284
|
+
"oh-my-opencode-linux-x64": "5.0.0-beta.25",
|
|
285
|
+
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.25",
|
|
286
|
+
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.25",
|
|
287
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.25",
|
|
288
|
+
"oh-my-opencode-windows-arm64": "5.0.0-beta.25",
|
|
289
|
+
"oh-my-opencode-windows-x64": "5.0.0-beta.25",
|
|
290
|
+
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.25"
|
|
291
291
|
},
|
|
292
292
|
overrides: {
|
|
293
293
|
"@earendil-works/pi-agent-core": "0.84.2",
|
|
@@ -303,10 +303,7 @@ var init_package = __esm(() => {
|
|
|
303
303
|
},
|
|
304
304
|
trustedDependencies: [
|
|
305
305
|
"@code-yeongyu/comment-checker"
|
|
306
|
-
]
|
|
307
|
-
patchedDependencies: {
|
|
308
|
-
"@code-yeongyu/senpi@2026.8.28": "patches/@code-yeongyu%2Fsenpi@2026.8.28.patch"
|
|
309
|
-
}
|
|
306
|
+
]
|
|
310
307
|
};
|
|
311
308
|
});
|
|
312
309
|
|
|
@@ -4816,12 +4813,9 @@ import {
|
|
|
4816
4813
|
fsyncSync,
|
|
4817
4814
|
openSync,
|
|
4818
4815
|
renameSync,
|
|
4819
|
-
rmSync,
|
|
4820
4816
|
unlinkSync,
|
|
4821
4817
|
writeFileSync
|
|
4822
4818
|
} from "fs";
|
|
4823
|
-
import { randomUUID } from "crypto";
|
|
4824
|
-
import { dirname } from "path";
|
|
4825
4819
|
function isToleratedFsyncError(error) {
|
|
4826
4820
|
if (!(error instanceof Error))
|
|
4827
4821
|
return false;
|
|
@@ -4837,36 +4831,24 @@ function tolerantFsyncSync(fileDescriptor, fsyncImpl) {
|
|
|
4837
4831
|
}
|
|
4838
4832
|
}
|
|
4839
4833
|
function writeFileAtomically(filePath, content, options = {}) {
|
|
4840
|
-
const
|
|
4841
|
-
|
|
4842
|
-
const
|
|
4834
|
+
const tempPath = `${filePath}.tmp`;
|
|
4835
|
+
writeFileSync(tempPath, content, "utf-8");
|
|
4836
|
+
const tempFileDescriptor = openSync(tempPath, "r+");
|
|
4843
4837
|
try {
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
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;
|
|
4838
|
+
tolerantFsyncSync(tempFileDescriptor, options.fsyncSync ?? fsyncSync);
|
|
4839
|
+
} finally {
|
|
4840
|
+
closeSync(tempFileDescriptor);
|
|
4841
|
+
}
|
|
4842
|
+
try {
|
|
4843
|
+
renameSync(tempPath, filePath);
|
|
4844
|
+
} catch (error) {
|
|
4845
|
+
const isPermissionError = error instanceof Error && (error.message.includes("EPERM") || error.message.includes("EACCES"));
|
|
4846
|
+
if ((options.platform ?? process.platform) === "win32" && isPermissionError) {
|
|
4857
4847
|
unlinkSync(filePath);
|
|
4858
4848
|
renameSync(tempPath, filePath);
|
|
4859
|
-
}
|
|
4860
|
-
if (platform === "win32")
|
|
4861
4849
|
return;
|
|
4862
|
-
const directoryFileDescriptor = openSync(dirname(filePath), "r");
|
|
4863
|
-
try {
|
|
4864
|
-
tolerantFsyncSync(directoryFileDescriptor, fsyncImpl);
|
|
4865
|
-
} finally {
|
|
4866
|
-
closeSync(directoryFileDescriptor);
|
|
4867
4850
|
}
|
|
4868
|
-
|
|
4869
|
-
rmSync(tempPath, { force: true });
|
|
4851
|
+
throw error;
|
|
4870
4852
|
}
|
|
4871
4853
|
}
|
|
4872
4854
|
var TOLERATED_FSYNC_CODES;
|
|
@@ -20572,25 +20554,6 @@ var init_telemetry = __esm(() => {
|
|
|
20572
20554
|
}).strict();
|
|
20573
20555
|
});
|
|
20574
20556
|
|
|
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
|
-
|
|
20594
20557
|
// packages/omo-config-core/src/schema/config.ts
|
|
20595
20558
|
var OmoOpenCodeHarnessConfigSchema, OmoTypedHarnessConfigSchema, OmoConfigProfileSchema, OmoConfigSchema, OmoConfigLayerSchema;
|
|
20596
20559
|
var init_config = __esm(() => {
|
|
@@ -20604,10 +20567,8 @@ var init_config = __esm(() => {
|
|
|
20604
20567
|
init_task();
|
|
20605
20568
|
init_team();
|
|
20606
20569
|
init_telemetry();
|
|
20607
|
-
init_format_on_mutation();
|
|
20608
20570
|
OmoOpenCodeHarnessConfigSchema = record(string2(), unknown());
|
|
20609
20571
|
OmoTypedHarnessConfigSchema = object({
|
|
20610
|
-
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
20611
20572
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20612
20573
|
agents: OmoAgentsConfigSchema.optional(),
|
|
20613
20574
|
codegraph: OmoCodegraphSettingsLayerSchema.optional(),
|
|
@@ -20619,7 +20580,6 @@ var init_config = __esm(() => {
|
|
|
20619
20580
|
telemetry: OmoTelemetrySettingsLayerSchema.optional()
|
|
20620
20581
|
}).strict();
|
|
20621
20582
|
OmoConfigProfileSchema = object({
|
|
20622
|
-
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
20623
20583
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20624
20584
|
agents: OmoAgentsConfigSchema.optional(),
|
|
20625
20585
|
codegraph: OmoCodegraphSettingsLayerSchema.optional(),
|
|
@@ -20634,7 +20594,6 @@ var init_config = __esm(() => {
|
|
|
20634
20594
|
"[codex]": OmoTypedHarnessConfigSchema.optional()
|
|
20635
20595
|
}).strict();
|
|
20636
20596
|
OmoConfigSchema = object({
|
|
20637
|
-
formatOnMutation: OmoFormatOnMutationSchema.optional(),
|
|
20638
20597
|
$schema: string2().optional(),
|
|
20639
20598
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20640
20599
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -20653,7 +20612,6 @@ var init_config = __esm(() => {
|
|
|
20653
20612
|
legacy_migrations: record(string2(), unknown()).optional()
|
|
20654
20613
|
}).strict();
|
|
20655
20614
|
OmoConfigLayerSchema = object({
|
|
20656
|
-
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
20657
20615
|
$schema: string2().optional(),
|
|
20658
20616
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
20659
20617
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -20680,7 +20638,6 @@ var init_schema = __esm(() => {
|
|
|
20680
20638
|
init_codegraph();
|
|
20681
20639
|
init_config();
|
|
20682
20640
|
init_fallback_models();
|
|
20683
|
-
init_format_on_mutation();
|
|
20684
20641
|
init_git_master();
|
|
20685
20642
|
init_harness();
|
|
20686
20643
|
init_memory();
|
|
@@ -20750,7 +20707,7 @@ var init_types = __esm(() => {
|
|
|
20750
20707
|
|
|
20751
20708
|
// packages/omo-config-core/src/loader/paths.ts
|
|
20752
20709
|
import { userInfo } from "os";
|
|
20753
|
-
import { dirname
|
|
20710
|
+
import { dirname, join as join3, posix, resolve } from "path";
|
|
20754
20711
|
function resolveHomeDir(env = process.env) {
|
|
20755
20712
|
const homeDir = env.HOME ?? env.USERPROFILE ?? process.cwd();
|
|
20756
20713
|
return homeDir.startsWith("/") ? posix.resolve(homeDir) : toPosixPath(resolve(homeDir));
|
|
@@ -20815,7 +20772,7 @@ function findProjectConfigPathsFarthestFirst(cwd, homeDir, fileSystem, accountHo
|
|
|
20815
20772
|
nearestFirst.push(configPath);
|
|
20816
20773
|
if (isHomeDir)
|
|
20817
20774
|
break;
|
|
20818
|
-
const parentDir =
|
|
20775
|
+
const parentDir = dirname(currentDir);
|
|
20819
20776
|
if (parentDir === currentDir)
|
|
20820
20777
|
break;
|
|
20821
20778
|
currentDir = parentDir;
|
|
@@ -21255,8 +21212,8 @@ var init_jsonc_parse = __esm(() => {
|
|
|
21255
21212
|
});
|
|
21256
21213
|
|
|
21257
21214
|
// packages/omo-config-core/src/writer/writer.ts
|
|
21258
|
-
import { randomUUID
|
|
21259
|
-
import { dirname as
|
|
21215
|
+
import { randomUUID } from "crypto";
|
|
21216
|
+
import { dirname as dirname2, join as join4, posix as posix2 } from "path";
|
|
21260
21217
|
function backupSuffix() {
|
|
21261
21218
|
return new Date().toISOString().replace(/[:.]/g, "-");
|
|
21262
21219
|
}
|
|
@@ -21289,20 +21246,20 @@ function resolveWritePath(options) {
|
|
|
21289
21246
|
const jsoncPath2 = resolveUserOmoConfigPath(options.env);
|
|
21290
21247
|
if (fileSystem.existsSync(jsoncPath2))
|
|
21291
21248
|
return jsoncPath2;
|
|
21292
|
-
const jsonPath2 = join4(
|
|
21249
|
+
const jsonPath2 = join4(dirname2(jsoncPath2), "omo.json");
|
|
21293
21250
|
return fileSystem.existsSync(jsonPath2) ? jsonPath2 : jsoncPath2;
|
|
21294
21251
|
}
|
|
21295
21252
|
const jsoncPath = join4(options.projectDir ?? process.cwd(), ".omo", "omo.jsonc");
|
|
21296
21253
|
if (fileSystem.existsSync(jsoncPath))
|
|
21297
21254
|
return jsoncPath;
|
|
21298
|
-
const jsonPath = join4(
|
|
21255
|
+
const jsonPath = join4(dirname2(jsoncPath), "omo.json");
|
|
21299
21256
|
return fileSystem.existsSync(jsonPath) ? jsonPath : jsoncPath;
|
|
21300
21257
|
}
|
|
21301
21258
|
function directoryPath(path4) {
|
|
21302
|
-
return path4.startsWith("/") ? posix2.dirname(path4) :
|
|
21259
|
+
return path4.startsWith("/") ? posix2.dirname(path4) : dirname2(path4);
|
|
21303
21260
|
}
|
|
21304
21261
|
function writeAtomically(path4, content, fileSystem) {
|
|
21305
|
-
const tempPath = `${path4}.${
|
|
21262
|
+
const tempPath = `${path4}.${randomUUID()}.tmp`;
|
|
21306
21263
|
let tempCreated = false;
|
|
21307
21264
|
try {
|
|
21308
21265
|
fileSystem.writeFileExclusiveSync(tempPath, content);
|
|
@@ -21585,7 +21542,7 @@ var init_types3 = __esm(() => {
|
|
|
21585
21542
|
});
|
|
21586
21543
|
|
|
21587
21544
|
// packages/omo-config-core/src/migration/commit.ts
|
|
21588
|
-
import { basename, dirname as
|
|
21545
|
+
import { basename, dirname as dirname3, join as join5, resolve as resolve2 } from "path";
|
|
21589
21546
|
function parseDocument(path4, content) {
|
|
21590
21547
|
const parsed = parseJsoncSafe2(content);
|
|
21591
21548
|
if (parsed.errors.length > 0 || !isPlainObject5(parsed.data)) {
|
|
@@ -21619,11 +21576,11 @@ function writerInput(targetPath, env) {
|
|
|
21619
21576
|
const homeDir = resolveHomeDir(env);
|
|
21620
21577
|
const userDirectory = toPosixPath(join5(homeDir, ".omo"));
|
|
21621
21578
|
const fileName = basename(targetPath);
|
|
21622
|
-
if (toPosixPath(
|
|
21579
|
+
if (toPosixPath(dirname3(targetPath)) === userDirectory && (fileName === "omo.json" || fileName === "omo.jsonc")) {
|
|
21623
21580
|
return { scope: "user" };
|
|
21624
21581
|
}
|
|
21625
|
-
if (basename(
|
|
21626
|
-
return { projectDir:
|
|
21582
|
+
if (basename(dirname3(targetPath)) === ".omo" && (fileName === "omo.json" || fileName === "omo.jsonc")) {
|
|
21583
|
+
return { projectDir: dirname3(dirname3(targetPath)), scope: "project" };
|
|
21627
21584
|
}
|
|
21628
21585
|
throw new MigrationTransactionError(`Migration target is not an omo config path: ${targetPath}`);
|
|
21629
21586
|
}
|
|
@@ -21986,7 +21943,7 @@ var init_recovery = __esm(() => {
|
|
|
21986
21943
|
});
|
|
21987
21944
|
|
|
21988
21945
|
// packages/omo-config-core/src/migration/batch.ts
|
|
21989
|
-
import { dirname as
|
|
21946
|
+
import { dirname as dirname4, posix as posix3 } from "path";
|
|
21990
21947
|
function parseSource(path4, content) {
|
|
21991
21948
|
const parsed = parseJsoncSafe2(content);
|
|
21992
21949
|
if (parsed.errors.length > 0) {
|
|
@@ -22035,7 +21992,7 @@ function assertSafeSourcePaths(sources, protectedPaths) {
|
|
|
22035
21992
|
}
|
|
22036
21993
|
}
|
|
22037
21994
|
function directoryPath2(path4) {
|
|
22038
|
-
return path4.startsWith("/") ? posix3.dirname(path4) :
|
|
21995
|
+
return path4.startsWith("/") ? posix3.dirname(path4) : dirname4(path4);
|
|
22039
21996
|
}
|
|
22040
21997
|
function ensureBackupDirectories(moves, fileSystem) {
|
|
22041
21998
|
for (const move of moves)
|
|
@@ -22666,7 +22623,7 @@ var init_process_sweep = () => {};
|
|
|
22666
22623
|
// packages/utils/src/codegraph/resolve.ts
|
|
22667
22624
|
import { existsSync as existsSync7 } from "fs";
|
|
22668
22625
|
import { spawnSync } from "child_process";
|
|
22669
|
-
import { basename as basename2, dirname as
|
|
22626
|
+
import { basename as basename2, dirname as dirname5, join as join10 } from "path";
|
|
22670
22627
|
import { createRequire } from "module";
|
|
22671
22628
|
function defaultNodeVersion(nodePath) {
|
|
22672
22629
|
if (nodePath === process.execPath && isNodeExecutableName(nodePath))
|
|
@@ -26094,7 +26051,7 @@ var init_resolve_agent_definition_paths = __esm(() => {
|
|
|
26094
26051
|
// packages/omo-opencode/src/shared/opencode-version.ts
|
|
26095
26052
|
import { execSync } from "child_process";
|
|
26096
26053
|
import { existsSync as existsSync9, readFileSync as readFileSync3, realpathSync as realpathSync4 } from "fs";
|
|
26097
|
-
import { dirname as
|
|
26054
|
+
import { dirname as dirname6, join as join13 } from "path";
|
|
26098
26055
|
function parseVersion(version2) {
|
|
26099
26056
|
const cleaned = version2.replace(/^v/, "").split("-")[0];
|
|
26100
26057
|
return cleaned.split(".").map((n) => parseInt(n, 10) || 0);
|
|
@@ -26135,7 +26092,7 @@ function parsePackageVersion(content) {
|
|
|
26135
26092
|
function getPackageVersionFromBinary(binaryPath, deps) {
|
|
26136
26093
|
try {
|
|
26137
26094
|
const realBinaryPath = deps.realpath(binaryPath);
|
|
26138
|
-
const packagePath = join13(
|
|
26095
|
+
const packagePath = join13(dirname6(dirname6(realBinaryPath)), "package.json");
|
|
26139
26096
|
if (!deps.exists(packagePath))
|
|
26140
26097
|
return null;
|
|
26141
26098
|
return parsePackageVersion(deps.readText(packagePath));
|
|
@@ -26373,10 +26330,10 @@ import {
|
|
|
26373
26330
|
} from "fs";
|
|
26374
26331
|
function writeFileAtomically2(filePath, content, deps = {}) {
|
|
26375
26332
|
const tempPath = `${filePath}.tmp`;
|
|
26376
|
-
const
|
|
26377
|
-
writeFileSync3(tempPath, content, { encoding: "utf-8", mode
|
|
26378
|
-
if (
|
|
26379
|
-
chmodSync2(tempPath,
|
|
26333
|
+
const mode = deps.mode;
|
|
26334
|
+
writeFileSync3(tempPath, content, { encoding: "utf-8", mode });
|
|
26335
|
+
if (mode !== undefined) {
|
|
26336
|
+
chmodSync2(tempPath, mode);
|
|
26380
26337
|
}
|
|
26381
26338
|
const tempFileDescriptor = openSync2(tempPath, "r+");
|
|
26382
26339
|
try {
|
|
@@ -26397,8 +26354,8 @@ function writeFileAtomically2(filePath, content, deps = {}) {
|
|
|
26397
26354
|
throw error51;
|
|
26398
26355
|
}
|
|
26399
26356
|
}
|
|
26400
|
-
if (
|
|
26401
|
-
chmodSync2(filePath,
|
|
26357
|
+
if (mode !== undefined) {
|
|
26358
|
+
chmodSync2(filePath, mode);
|
|
26402
26359
|
}
|
|
26403
26360
|
}
|
|
26404
26361
|
var init_write_file_atomically = __esm(() => {
|
|
@@ -84350,7 +84307,7 @@ var init_plugin_name_with_version = __esm(() => {
|
|
|
84350
84307
|
|
|
84351
84308
|
// packages/omo-opencode/src/cli/config-manager/backup-config.ts
|
|
84352
84309
|
import { copyFileSync as copyFileSync2, existsSync as existsSync16, mkdirSync as mkdirSync6 } from "fs";
|
|
84353
|
-
import { dirname as
|
|
84310
|
+
import { dirname as dirname7 } from "path";
|
|
84354
84311
|
function backupConfigFile(configPath) {
|
|
84355
84312
|
if (!existsSync16(configPath)) {
|
|
84356
84313
|
return { success: true };
|
|
@@ -84358,7 +84315,7 @@ function backupConfigFile(configPath) {
|
|
|
84358
84315
|
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
84359
84316
|
const backupPath = `${configPath}.backup-${timestamp}`;
|
|
84360
84317
|
try {
|
|
84361
|
-
const dir =
|
|
84318
|
+
const dir = dirname7(backupPath);
|
|
84362
84319
|
if (!existsSync16(dir)) {
|
|
84363
84320
|
mkdirSync6(dir, { recursive: true });
|
|
84364
84321
|
}
|
|
@@ -84556,7 +84513,7 @@ function extractVersionFromPluginEntry(entry) {
|
|
|
84556
84513
|
|
|
84557
84514
|
// packages/omo-opencode/src/cli/config-manager/add-plugin-to-opencode-config.ts
|
|
84558
84515
|
import { existsSync as existsSync19, readdirSync as readdirSync4, readFileSync as readFileSync8, writeFileSync as writeFileSync5 } from "fs";
|
|
84559
|
-
import { basename as basename3, dirname as
|
|
84516
|
+
import { basename as basename3, dirname as dirname8, join as join21 } from "path";
|
|
84560
84517
|
function detectConfigFormatInDir(configDir) {
|
|
84561
84518
|
const configJsonc = join21(configDir, "opencode.jsonc");
|
|
84562
84519
|
const configJson = join21(configDir, "opencode.json");
|
|
@@ -84569,10 +84526,10 @@ function detectConfigFormatInDir(configDir) {
|
|
|
84569
84526
|
return { format: "none", path: configJson };
|
|
84570
84527
|
}
|
|
84571
84528
|
function getParentConfigDirForProfile(configDir) {
|
|
84572
|
-
const parentDir =
|
|
84529
|
+
const parentDir = dirname8(configDir);
|
|
84573
84530
|
if (basename3(parentDir) !== "profiles")
|
|
84574
84531
|
return null;
|
|
84575
|
-
return
|
|
84532
|
+
return dirname8(parentDir);
|
|
84576
84533
|
}
|
|
84577
84534
|
function listProfileConfigDirs(rootConfigDir) {
|
|
84578
84535
|
const profilesDir = join21(rootConfigDir, "profiles");
|
|
@@ -86706,7 +86663,7 @@ var init_env2 = __esm(() => {
|
|
|
86706
86663
|
});
|
|
86707
86664
|
|
|
86708
86665
|
// node_modules/.bun/posthog-node@5.51.1/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
86709
|
-
import { dirname as
|
|
86666
|
+
import { dirname as dirname17, posix as posix7, sep as sep7 } from "path";
|
|
86710
86667
|
function createModulerModifier() {
|
|
86711
86668
|
const getModuleFromFileName = createGetModuleFromFilename();
|
|
86712
86669
|
return async (frames) => {
|
|
@@ -86715,7 +86672,7 @@ function createModulerModifier() {
|
|
|
86715
86672
|
return frames;
|
|
86716
86673
|
};
|
|
86717
86674
|
}
|
|
86718
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
86675
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname17(process.argv[1]) : process.cwd(), isWindows = sep7 === "\\") {
|
|
86719
86676
|
const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
|
|
86720
86677
|
return (filename) => {
|
|
86721
86678
|
if (!filename)
|
|
@@ -92049,7 +92006,7 @@ function splitNodeOptions(nodeOptions) {
|
|
|
92049
92006
|
return args;
|
|
92050
92007
|
}
|
|
92051
92008
|
function findUnhandledRejectionMode(args) {
|
|
92052
|
-
let
|
|
92009
|
+
let mode;
|
|
92053
92010
|
for (let index = 0;index < args.length; index++) {
|
|
92054
92011
|
const argument = args[index];
|
|
92055
92012
|
const optionName = UNHANDLED_REJECTION_OPTION_NAMES.find((name) => argument === name || argument.startsWith(`${name}=`));
|
|
@@ -92057,9 +92014,9 @@ function findUnhandledRejectionMode(args) {
|
|
|
92057
92014
|
continue;
|
|
92058
92015
|
const value = argument === optionName ? args[++index] : argument.slice(optionName.length + 1);
|
|
92059
92016
|
if (UNHANDLED_REJECTION_MODES.has(value))
|
|
92060
|
-
|
|
92017
|
+
mode = value;
|
|
92061
92018
|
}
|
|
92062
|
-
return
|
|
92019
|
+
return mode;
|
|
92063
92020
|
}
|
|
92064
92021
|
function getUnhandledRejectionMode(execArgv = STARTUP_EXEC_ARGV, nodeOptions = STARTUP_NODE_OPTIONS) {
|
|
92065
92022
|
return findUnhandledRejectionMode(execArgv) ?? findUnhandledRejectionMode(splitNodeOptions(nodeOptions ?? "")) ?? "throw";
|
|
@@ -92085,17 +92042,17 @@ function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
|
92085
92042
|
_posthogErrorHandler: true
|
|
92086
92043
|
});
|
|
92087
92044
|
}
|
|
92088
|
-
function addUncaughtExceptionListener(captureFn, onFatalFn,
|
|
92045
|
+
function addUncaughtExceptionListener(captureFn, onFatalFn, mode = STARTUP_UNHANDLED_REJECTION_MODE) {
|
|
92089
92046
|
const process4 = globalThis.process;
|
|
92090
92047
|
if (!process4)
|
|
92091
92048
|
return;
|
|
92092
|
-
if (
|
|
92049
|
+
if (mode === "strict")
|
|
92093
92050
|
return void process4.on("uncaughtExceptionMonitor", (error51, origin) => captureUncaughtException(captureFn, error51, origin));
|
|
92094
92051
|
process4.on("uncaughtException", makeUncaughtExceptionHandler(captureFn, onFatalFn));
|
|
92095
92052
|
}
|
|
92096
|
-
function addUnhandledRejectionListener(captureFn,
|
|
92053
|
+
function addUnhandledRejectionListener(captureFn, mode = STARTUP_UNHANDLED_REJECTION_MODE) {
|
|
92097
92054
|
const process4 = globalThis.process;
|
|
92098
|
-
if (!process4 ||
|
|
92055
|
+
if (!process4 || mode === "throw" || mode === "strict" || mode === "warn-with-error-code")
|
|
92099
92056
|
return;
|
|
92100
92057
|
process4.on("unhandledRejection", (reason) => {
|
|
92101
92058
|
captureFn(reason, {
|
|
@@ -94320,7 +94277,7 @@ var package_default2;
|
|
|
94320
94277
|
var init_package2 = __esm(() => {
|
|
94321
94278
|
package_default2 = {
|
|
94322
94279
|
name: "@oh-my-opencode/omo-codex",
|
|
94323
|
-
version: "5.0.0-beta.
|
|
94280
|
+
version: "5.0.0-beta.25",
|
|
94324
94281
|
type: "module",
|
|
94325
94282
|
private: true,
|
|
94326
94283
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -95290,19 +95247,19 @@ var init_update_toasts = __esm(() => {
|
|
|
95290
95247
|
|
|
95291
95248
|
// packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
|
|
95292
95249
|
import { existsSync as existsSync48 } from "fs";
|
|
95293
|
-
import { dirname as
|
|
95250
|
+
import { dirname as dirname30, join as join76 } from "path";
|
|
95294
95251
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
95295
95252
|
function defaultGetModuleHostingWorkspace() {
|
|
95296
95253
|
try {
|
|
95297
|
-
const currentDir =
|
|
95254
|
+
const currentDir = dirname30(fileURLToPath5(import.meta.url));
|
|
95298
95255
|
const pkgJsonPath = findPackageJsonUp(currentDir);
|
|
95299
95256
|
if (!pkgJsonPath)
|
|
95300
95257
|
return null;
|
|
95301
|
-
const pkgDir =
|
|
95302
|
-
const nodeModulesDir =
|
|
95258
|
+
const pkgDir = dirname30(pkgJsonPath);
|
|
95259
|
+
const nodeModulesDir = dirname30(pkgDir);
|
|
95303
95260
|
if (nodeModulesDir.split(/[\\/]/).pop() !== "node_modules")
|
|
95304
95261
|
return null;
|
|
95305
|
-
return
|
|
95262
|
+
return dirname30(nodeModulesDir);
|
|
95306
95263
|
} catch (error51) {
|
|
95307
95264
|
if (error51 instanceof Error) {
|
|
95308
95265
|
return null;
|
|
@@ -97851,9 +97808,9 @@ function formatConfigSummary(config3) {
|
|
|
97851
97808
|
`);
|
|
97852
97809
|
}
|
|
97853
97810
|
function printHeader(isUpdate) {
|
|
97854
|
-
const
|
|
97811
|
+
const mode = isUpdate ? "Update" : "Install";
|
|
97855
97812
|
console.log();
|
|
97856
|
-
console.log(import_picocolors.default.bgMagenta(import_picocolors.default.white(` oMoMoMoMo... ${
|
|
97813
|
+
console.log(import_picocolors.default.bgMagenta(import_picocolors.default.white(` oMoMoMoMo... ${mode} `)));
|
|
97857
97814
|
console.log();
|
|
97858
97815
|
}
|
|
97859
97816
|
function printStep(step, total, message) {
|
|
@@ -98132,7 +98089,7 @@ function windowsCommandShim(targetPath) {
|
|
|
98132
98089
|
|
|
98133
98090
|
// packages/omo-codex/src/install/codex-cache-dangling-bins.ts
|
|
98134
98091
|
import { lstat as lstat2, readFile, readdir, readlink, rm, stat } from "fs/promises";
|
|
98135
|
-
import { dirname as
|
|
98092
|
+
import { dirname as dirname9, isAbsolute, join as join23, resolve as resolve5 } from "path";
|
|
98136
98093
|
|
|
98137
98094
|
// packages/omo-codex/src/install/codex-cache-fs.ts
|
|
98138
98095
|
import { lstat } from "fs/promises";
|
|
@@ -98179,7 +98136,7 @@ async function removeDanglingManagedSymlink(linkPath) {
|
|
|
98179
98136
|
if (!linkStat.isSymbolicLink())
|
|
98180
98137
|
return;
|
|
98181
98138
|
const linkTarget = await readlink(linkPath);
|
|
98182
|
-
const target = isAbsolute(linkTarget) ? linkTarget : resolve5(
|
|
98139
|
+
const target = isAbsolute(linkTarget) ? linkTarget : resolve5(dirname9(linkPath), linkTarget);
|
|
98183
98140
|
if (!await isFileSystemEntry(target) && isManagedComponentBinTarget(target))
|
|
98184
98141
|
await rm(linkPath, { force: true });
|
|
98185
98142
|
} catch (error51) {
|
|
@@ -98641,11 +98598,11 @@ async function existingNonSymlink(path7) {
|
|
|
98641
98598
|
}
|
|
98642
98599
|
// packages/omo-codex/src/install/codex-cache-install.ts
|
|
98643
98600
|
import { cp as cp2, mkdir as mkdir3, readFile as readFile8, readdir as readdir4, rename, rm as rm4 } from "fs/promises";
|
|
98644
|
-
import { basename as basename5, dirname as
|
|
98601
|
+
import { basename as basename5, dirname as dirname12, join as join32, sep as sep5 } from "path";
|
|
98645
98602
|
|
|
98646
98603
|
// packages/omo-codex/src/install/codex-cache-bundled-mcps.ts
|
|
98647
98604
|
import { cp, mkdir as mkdir2, readFile as readFile4, stat as stat3 } from "fs/promises";
|
|
98648
|
-
import { dirname as
|
|
98605
|
+
import { dirname as dirname10, join as join27, resolve as resolve7 } from "path";
|
|
98649
98606
|
var BUNDLED_MCP_RUNTIMES = [
|
|
98650
98607
|
{
|
|
98651
98608
|
label: "Git Bash MCP",
|
|
@@ -98680,7 +98637,7 @@ async function copyBundledMcpRuntimeDist(pluginRoot, sourceRoot, runtime4) {
|
|
|
98680
98637
|
throw new Error(`missing built ${runtime4.label} dist at ${sourcePath}`);
|
|
98681
98638
|
}
|
|
98682
98639
|
const destinationPath = join27(pluginRoot, runtime4.destinationDistFromPlugin);
|
|
98683
|
-
await mkdir2(
|
|
98640
|
+
await mkdir2(dirname10(destinationPath), { recursive: true });
|
|
98684
98641
|
await cp(sourcePath, destinationPath, { recursive: true });
|
|
98685
98642
|
}
|
|
98686
98643
|
async function readSourceMcpArgs(path7) {
|
|
@@ -98718,7 +98675,7 @@ async function isDirectory(path7) {
|
|
|
98718
98675
|
// packages/omo-codex/src/install/codex-cache-local-dependencies.ts
|
|
98719
98676
|
import { realpathSync as realpathSync6 } from "fs";
|
|
98720
98677
|
import { readFile as readFile5, readdir as readdir3, writeFile as writeFile2 } from "fs/promises";
|
|
98721
|
-
import { dirname as
|
|
98678
|
+
import { dirname as dirname11, isAbsolute as isAbsolute4, join as join29, relative as relative3, resolve as resolve9, sep as sep2 } from "path";
|
|
98722
98679
|
|
|
98723
98680
|
// packages/omo-codex/src/install/codex-cache-paths.ts
|
|
98724
98681
|
import { existsSync as existsSync24, readdirSync as readdirSync6 } from "fs";
|
|
@@ -98787,7 +98744,7 @@ async function rewriteCachedPackageLocalFileDependencies(pluginRoot, sourceRoot)
|
|
|
98787
98744
|
const parsed = JSON.parse(raw);
|
|
98788
98745
|
if (!isPlainRecord4(parsed))
|
|
98789
98746
|
continue;
|
|
98790
|
-
const packageDir =
|
|
98747
|
+
const packageDir = dirname11(packageJsonPath);
|
|
98791
98748
|
const sourcePackageDir = join29(sourceRoot, relative3(pluginRoot, packageDir));
|
|
98792
98749
|
let changed = false;
|
|
98793
98750
|
for (const field of ["dependencies", "optionalDependencies", "peerDependencies"]) {
|
|
@@ -99182,13 +99139,13 @@ function sanitizeNpmInstallEnv(env2) {
|
|
|
99182
99139
|
return Object.fromEntries(Object.entries(env2).filter(([key]) => key.toLowerCase() !== "npm_config_allow_scripts"));
|
|
99183
99140
|
}
|
|
99184
99141
|
function createTempSiblingPath(targetPath) {
|
|
99185
|
-
return join32(
|
|
99142
|
+
return join32(dirname12(targetPath), `.tmp-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
|
|
99186
99143
|
}
|
|
99187
99144
|
function createBackupSiblingPath(targetPath) {
|
|
99188
|
-
return join32(
|
|
99145
|
+
return join32(dirname12(targetPath), `.backup-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
|
|
99189
99146
|
}
|
|
99190
99147
|
async function copyDirectory(sourcePath, targetPath) {
|
|
99191
|
-
await mkdir3(
|
|
99148
|
+
await mkdir3(dirname12(targetPath), { recursive: true });
|
|
99192
99149
|
await cp2(sourcePath, targetPath, { recursive: true, filter: (source) => shouldCopyPluginPath(source, sourcePath) });
|
|
99193
99150
|
}
|
|
99194
99151
|
async function promoteDirectory(tempPath, targetPath, renameDirectory) {
|
|
@@ -99287,20 +99244,20 @@ async function copyRootRuntimeDists(input) {
|
|
|
99287
99244
|
const sourcePath = join32(repoRoot, runtimePath);
|
|
99288
99245
|
if (!await fileExistsStrict(join32(sourcePath, "index.js")))
|
|
99289
99246
|
continue;
|
|
99290
|
-
await mkdir3(
|
|
99247
|
+
await mkdir3(dirname12(join32(input.pluginRoot, runtimePath)), { recursive: true });
|
|
99291
99248
|
await cp2(sourcePath, join32(input.pluginRoot, runtimePath), { recursive: true });
|
|
99292
99249
|
}
|
|
99293
99250
|
}
|
|
99294
99251
|
function repoRootForCodexPluginSource(sourcePath) {
|
|
99295
|
-
const codexPackageRoot =
|
|
99296
|
-
const packagesRoot =
|
|
99252
|
+
const codexPackageRoot = dirname12(sourcePath);
|
|
99253
|
+
const packagesRoot = dirname12(codexPackageRoot);
|
|
99297
99254
|
if (basename5(sourcePath) !== "plugin")
|
|
99298
99255
|
return null;
|
|
99299
99256
|
if (basename5(codexPackageRoot) !== "omo-codex")
|
|
99300
99257
|
return null;
|
|
99301
99258
|
if (basename5(packagesRoot) !== "packages")
|
|
99302
99259
|
return null;
|
|
99303
|
-
return
|
|
99260
|
+
return dirname12(packagesRoot);
|
|
99304
99261
|
}
|
|
99305
99262
|
// packages/omo-codex/src/install/codex-cache-prune.ts
|
|
99306
99263
|
import { lstat as lstat5, readdir as readdir5, rm as rm5, stat as stat4 } from "fs/promises";
|
|
@@ -99431,7 +99388,7 @@ async function shouldBuildSourcePackages(repoRoot) {
|
|
|
99431
99388
|
|
|
99432
99389
|
// packages/omo-codex/src/install/codex-config-toml.ts
|
|
99433
99390
|
import { mkdir as mkdir5, readFile as readFile11 } from "fs/promises";
|
|
99434
|
-
import { dirname as
|
|
99391
|
+
import { dirname as dirname15 } from "path";
|
|
99435
99392
|
|
|
99436
99393
|
// packages/omo-codex/src/install/toml-section-editor.ts
|
|
99437
99394
|
function findTomlSection(config3, header) {
|
|
@@ -100013,12 +99970,12 @@ function tomlKeySegment(value) {
|
|
|
100013
99970
|
|
|
100014
99971
|
// packages/omo-codex/src/install/codex-config-atomic-write.ts
|
|
100015
99972
|
import { lstat as lstat6, readlink as readlink4, realpath, rename as rename3, unlink, writeFile as writeFile5 } from "fs/promises";
|
|
100016
|
-
import { basename as basename6, dirname as
|
|
99973
|
+
import { basename as basename6, dirname as dirname13, isAbsolute as isAbsolute5, join as join36, resolve as resolve10 } from "path";
|
|
100017
99974
|
var RENAME_RETRY_DELAYS_MS = [10, 25, 50];
|
|
100018
99975
|
var RETRIABLE_RENAME_CODES = new Set(["EPERM", "EBUSY"]);
|
|
100019
99976
|
async function writeFileAtomic(targetPath, data) {
|
|
100020
99977
|
const writeTarget = await resolveSymlinkTarget(targetPath);
|
|
100021
|
-
const temporaryPath = join36(
|
|
99978
|
+
const temporaryPath = join36(dirname13(writeTarget), `.tmp-${basename6(writeTarget)}-${process.pid}-${Date.now()}`);
|
|
100022
99979
|
await writeFile5(temporaryPath, data);
|
|
100023
99980
|
try {
|
|
100024
99981
|
await renameWithRetry(temporaryPath, writeTarget);
|
|
@@ -100047,7 +100004,7 @@ async function resolveSymlinkTarget(targetPath) {
|
|
|
100047
100004
|
if (!(error51 instanceof Error))
|
|
100048
100005
|
throw error51;
|
|
100049
100006
|
const linkValue = await readlink4(targetPath);
|
|
100050
|
-
return isAbsolute5(linkValue) ? linkValue : resolve10(
|
|
100007
|
+
return isAbsolute5(linkValue) ? linkValue : resolve10(dirname13(targetPath), linkValue);
|
|
100051
100008
|
}
|
|
100052
100009
|
}
|
|
100053
100010
|
async function renameWithRetry(fromPath, toPath) {
|
|
@@ -100527,14 +100484,14 @@ import { join as join37 } from "path";
|
|
|
100527
100484
|
var FALLBACK_CODEX_MODEL_CATALOG = {
|
|
100528
100485
|
current: {
|
|
100529
100486
|
model: "gpt-5.6-sol",
|
|
100530
|
-
modelContextWindow:
|
|
100487
|
+
modelContextWindow: 372000,
|
|
100531
100488
|
modelReasoningEffort: "high",
|
|
100532
100489
|
planModeReasoningEffort: "xhigh"
|
|
100533
100490
|
},
|
|
100534
100491
|
managedProfiles: [
|
|
100535
100492
|
{
|
|
100536
100493
|
model: "gpt-5.5",
|
|
100537
|
-
modelContextWindow:
|
|
100494
|
+
modelContextWindow: 400000,
|
|
100538
100495
|
modelReasoningEffort: "high",
|
|
100539
100496
|
planModeReasoningEffort: "xhigh"
|
|
100540
100497
|
},
|
|
@@ -100632,7 +100589,7 @@ function isRootSetting2(line, key) {
|
|
|
100632
100589
|
|
|
100633
100590
|
// packages/omo-codex/src/install/codex-multi-agent-v2-config.ts
|
|
100634
100591
|
import { readFileSync as readFileSync11 } from "fs";
|
|
100635
|
-
import { dirname as
|
|
100592
|
+
import { dirname as dirname14, isAbsolute as isAbsolute6, join as join38 } from "path";
|
|
100636
100593
|
var CODEX_AGENTS_HEADER = "agents";
|
|
100637
100594
|
var CODEX_MULTI_AGENT_V2_HEADER = "features.multi_agent_v2";
|
|
100638
100595
|
var CODEX_MULTI_AGENT_V2_THREAD_LIMIT_KEY = `${CODEX_MULTI_AGENT_V2_HEADER}.max_concurrent_threads_per_session`;
|
|
@@ -100669,8 +100626,8 @@ function resolveCodexMultiAgentVersion(config3, configPath) {
|
|
|
100669
100626
|
}
|
|
100670
100627
|
function resolveCatalogPath(configuredPath, configPath) {
|
|
100671
100628
|
if (configuredPath === null)
|
|
100672
|
-
return join38(
|
|
100673
|
-
return isAbsolute6(configuredPath) ? configuredPath : join38(
|
|
100629
|
+
return join38(dirname14(configPath), "models_cache.json");
|
|
100630
|
+
return isAbsolute6(configuredPath) ? configuredPath : join38(dirname14(configPath), configuredPath);
|
|
100674
100631
|
}
|
|
100675
100632
|
function readCatalogMultiAgentVersion(model, cachePath) {
|
|
100676
100633
|
let raw;
|
|
@@ -100774,7 +100731,7 @@ function readBooleanSetting(sectionText, key) {
|
|
|
100774
100731
|
|
|
100775
100732
|
// packages/omo-codex/src/install/codex-config-toml.ts
|
|
100776
100733
|
async function updateCodexConfig(input) {
|
|
100777
|
-
await mkdir5(
|
|
100734
|
+
await mkdir5(dirname15(input.configPath), { recursive: true });
|
|
100778
100735
|
let config3;
|
|
100779
100736
|
try {
|
|
100780
100737
|
config3 = await readFile11(input.configPath, "utf8");
|
|
@@ -101747,7 +101704,7 @@ var defaultRunCommand = async (command, args, options) => {
|
|
|
101747
101704
|
|
|
101748
101705
|
// packages/omo-codex/src/install/codex-project-local-cleanup.ts
|
|
101749
101706
|
import { copyFile as copyFile2, lstat as lstat10, readFile as readFile17, writeFile as writeFile10 } from "fs/promises";
|
|
101750
|
-
import { dirname as
|
|
101707
|
+
import { dirname as dirname16, join as join46, resolve as resolve11 } from "path";
|
|
101751
101708
|
var LEGACY_AGENT_CONFLICT_KEYS = ["max_threads"];
|
|
101752
101709
|
var PROJECT_LOCAL_ARTIFACT_PATHS = [
|
|
101753
101710
|
".codex/hooks.json",
|
|
@@ -101867,13 +101824,13 @@ async function findProjectLocalCodexConfigs(startDirectory, codexHome) {
|
|
|
101867
101824
|
artifactRoots: artifactRootsForConfigPaths(configPathsFromCwd)
|
|
101868
101825
|
};
|
|
101869
101826
|
}
|
|
101870
|
-
const parent =
|
|
101827
|
+
const parent = dirname16(current);
|
|
101871
101828
|
if (parent === current) {
|
|
101872
101829
|
const nearestConfigPath = configPathsFromCwd[0];
|
|
101873
101830
|
return nearestConfigPath === undefined ? null : {
|
|
101874
|
-
projectRoot:
|
|
101831
|
+
projectRoot: dirname16(dirname16(nearestConfigPath)),
|
|
101875
101832
|
configPaths: [nearestConfigPath],
|
|
101876
|
-
artifactRoots: [
|
|
101833
|
+
artifactRoots: [dirname16(dirname16(nearestConfigPath))]
|
|
101877
101834
|
};
|
|
101878
101835
|
}
|
|
101879
101836
|
current = parent;
|
|
@@ -101889,7 +101846,7 @@ async function isRegularProjectLocalConfig(directory, configPath) {
|
|
|
101889
101846
|
function artifactRootsForConfigPaths(configPaths2) {
|
|
101890
101847
|
const roots = [];
|
|
101891
101848
|
for (const configPath of configPaths2) {
|
|
101892
|
-
const root =
|
|
101849
|
+
const root = dirname16(dirname16(configPath));
|
|
101893
101850
|
if (!roots.includes(root))
|
|
101894
101851
|
roots.push(root);
|
|
101895
101852
|
}
|
|
@@ -102799,7 +102756,7 @@ import { isAbsolute as isAbsolute11, join as join58, relative as relative6, reso
|
|
|
102799
102756
|
|
|
102800
102757
|
// packages/omo-codex/src/install/codex-cleanup-bins.ts
|
|
102801
102758
|
import { lstat as lstat12, readFile as readFile22, readdir as readdir12, readlink as readlink6, rm as rm11 } from "fs/promises";
|
|
102802
|
-
import { dirname as
|
|
102759
|
+
import { dirname as dirname18, isAbsolute as isAbsolute9, join as join56, resolve as resolve14 } from "path";
|
|
102803
102760
|
var ROOT_RUNTIME_BIN_NAME = "omo";
|
|
102804
102761
|
var MANAGED_CODEX_BIN_NAMES = new Set([
|
|
102805
102762
|
ROOT_RUNTIME_BIN_NAME,
|
|
@@ -102856,7 +102813,7 @@ async function isManagedCodexBin(linkPath, platform, binName) {
|
|
|
102856
102813
|
if (platform === "win32")
|
|
102857
102814
|
return false;
|
|
102858
102815
|
const linkTarget = await readlink6(linkPath);
|
|
102859
|
-
const target = isAbsolute9(linkTarget) ? linkTarget : resolve14(
|
|
102816
|
+
const target = isAbsolute9(linkTarget) ? linkTarget : resolve14(dirname18(linkPath), linkTarget);
|
|
102860
102817
|
return isManagedComponentBinTarget(target) || isLegacyCodexBinTarget(binName, target);
|
|
102861
102818
|
}
|
|
102862
102819
|
if (!entryStat.isFile())
|
|
@@ -102867,7 +102824,7 @@ async function isManagedCodexBin(linkPath, platform, binName) {
|
|
|
102867
102824
|
|
|
102868
102825
|
// packages/omo-codex/src/install/codex-cleanup-config.ts
|
|
102869
102826
|
import { lstat as lstat13, mkdir as mkdir8, readFile as readFile23, writeFile as writeFile13 } from "fs/promises";
|
|
102870
|
-
import { dirname as
|
|
102827
|
+
import { dirname as dirname19 } from "path";
|
|
102871
102828
|
var MANAGED_MARKETPLACES = ["sisyphuslabs", "lazycodex", "code-yeongyu-codex-plugins"];
|
|
102872
102829
|
var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE2 = ["codex-ultrawork-reviewer"];
|
|
102873
102830
|
var CURRENT_MANAGED_CODEX_AGENT_NAMES2 = [
|
|
@@ -102904,7 +102861,7 @@ async function cleanupCodexConfig(configPath, now) {
|
|
|
102904
102861
|
if (next === original)
|
|
102905
102862
|
return { changed: false };
|
|
102906
102863
|
const backupPath = `${configPath}.backup-${formatBackupTimestamp2(now?.() ?? new Date)}`;
|
|
102907
|
-
await mkdir8(
|
|
102864
|
+
await mkdir8(dirname19(configPath), { recursive: true });
|
|
102908
102865
|
await writeFile13(backupPath, original);
|
|
102909
102866
|
await writeFile13(configPath, `${next.trimEnd()}
|
|
102910
102867
|
`);
|
|
@@ -102983,10 +102940,10 @@ function nodeErrorCode5(error51) {
|
|
|
102983
102940
|
}
|
|
102984
102941
|
|
|
102985
102942
|
// packages/omo-codex/src/install/codex-cleanup-safety.ts
|
|
102986
|
-
import { dirname as
|
|
102943
|
+
import { dirname as dirname20, isAbsolute as isAbsolute10, join as join57, relative as relative5, resolve as resolve15 } from "path";
|
|
102987
102944
|
function codexHomeResolvesToFilesystemRoot(codexHome) {
|
|
102988
102945
|
const resolved = resolve15(codexHome);
|
|
102989
|
-
return
|
|
102946
|
+
return dirname20(resolved) === resolved;
|
|
102990
102947
|
}
|
|
102991
102948
|
function validateManagedCleanupTarget(input) {
|
|
102992
102949
|
if (!isAbsolute10(input.path))
|
|
@@ -103249,7 +103206,7 @@ var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", ".
|
|
|
103249
103206
|
import { execFile as execFile4 } from "child_process";
|
|
103250
103207
|
import { existsSync as existsSync32 } from "fs";
|
|
103251
103208
|
import { homedir as homedir11 } from "os";
|
|
103252
|
-
import { dirname as
|
|
103209
|
+
import { dirname as dirname24, join as join63, resolve as resolve20 } from "path";
|
|
103253
103210
|
import { fileURLToPath } from "url";
|
|
103254
103211
|
import { promisify as promisify3 } from "util";
|
|
103255
103212
|
|
|
@@ -103280,9 +103237,9 @@ function resolveAgentHome(options) {
|
|
|
103280
103237
|
}
|
|
103281
103238
|
|
|
103282
103239
|
// packages/omo-senpi/src/install/local-launcher.ts
|
|
103283
|
-
import { chmodSync as chmodSync3, existsSync as existsSync31, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync
|
|
103240
|
+
import { chmodSync as chmodSync3, existsSync as existsSync31, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync, writeFileSync as writeFileSync6 } from "fs";
|
|
103284
103241
|
import { homedir as homedir10 } from "os";
|
|
103285
|
-
import { dirname as
|
|
103242
|
+
import { dirname as dirname21, join as join60, resolve as resolve18 } from "path";
|
|
103286
103243
|
var MARKER = "omo-local-launcher";
|
|
103287
103244
|
function localLauncherPath(homeDir = homedir10()) {
|
|
103288
103245
|
return join60(homeDir, ".local", "bin", "omo");
|
|
@@ -103353,7 +103310,7 @@ function installLocalLauncher(options) {
|
|
|
103353
103310
|
const path7 = localLauncherPath(options.homeDir);
|
|
103354
103311
|
if (existsSync31(path7) && !readFileSync14(path7, "utf8").includes(MARKER))
|
|
103355
103312
|
return;
|
|
103356
|
-
mkdirSync10(
|
|
103313
|
+
mkdirSync10(dirname21(path7), { recursive: true });
|
|
103357
103314
|
writeFileSync6(path7, renderLocalLauncher(options));
|
|
103358
103315
|
chmodSync3(path7, 493);
|
|
103359
103316
|
if ((options.platform ?? process.platform) === "win32") {
|
|
@@ -103368,12 +103325,12 @@ node "%~dp0omo" %*\r
|
|
|
103368
103325
|
import { createHash as createHash5 } from "crypto";
|
|
103369
103326
|
import { constants as constants9 } from "fs";
|
|
103370
103327
|
import { access as access2, readFile as readFile26, stat as stat6 } from "fs/promises";
|
|
103371
|
-
import { dirname as
|
|
103328
|
+
import { dirname as dirname23, join as join62 } from "path";
|
|
103372
103329
|
|
|
103373
103330
|
// packages/omo-senpi/src/install/senpi-settings.ts
|
|
103374
103331
|
import { constants as constants8 } from "fs";
|
|
103375
103332
|
import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile25, rename as rename5, writeFile as writeFile14 } from "fs/promises";
|
|
103376
|
-
import { dirname as
|
|
103333
|
+
import { dirname as dirname22, join as join61, resolve as resolve19 } from "path";
|
|
103377
103334
|
var OMO_SENPI_PACKAGE_NAME = "@code-yeongyu/omo-senpi";
|
|
103378
103335
|
var LEGACY_BUILTIN_SHADOW_PACKAGES = [
|
|
103379
103336
|
join61("packages", "pi-goal"),
|
|
@@ -103420,7 +103377,7 @@ async function removeSupersededOmoPackages(packages, currentPluginPath, agentDir
|
|
|
103420
103377
|
return entries.filter((entry) => entry !== undefined);
|
|
103421
103378
|
}
|
|
103422
103379
|
async function writeSettingsAtomically(settingsPath, settings) {
|
|
103423
|
-
await mkdir9(
|
|
103380
|
+
await mkdir9(dirname22(settingsPath), { recursive: true });
|
|
103424
103381
|
const backupPath = await nextBackupPath(settingsPath);
|
|
103425
103382
|
if (await fileExists(settingsPath)) {
|
|
103426
103383
|
await copyFile3(settingsPath, backupPath);
|
|
@@ -103540,7 +103497,7 @@ async function hasMissingPluginArtifact(pluginPath) {
|
|
|
103540
103497
|
}
|
|
103541
103498
|
async function verifyAstGrepRuntimeIntegrity(pluginPath, platform) {
|
|
103542
103499
|
const runtimeEntry = join62(pluginPath, "runtime", "ast-grep-mcp", "cli.js");
|
|
103543
|
-
const manifestPath = join62(
|
|
103500
|
+
const manifestPath = join62(dirname23(runtimeEntry), "manifest.json");
|
|
103544
103501
|
let runtimeStat;
|
|
103545
103502
|
try {
|
|
103546
103503
|
runtimeStat = await stat6(runtimeEntry);
|
|
@@ -103630,7 +103587,7 @@ async function runSenpiInstaller(options = {}) {
|
|
|
103630
103587
|
function resolveInstallContext(options) {
|
|
103631
103588
|
const env3 = options.env ?? process.env;
|
|
103632
103589
|
const allowBuild = options.pluginPath === undefined;
|
|
103633
|
-
const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(
|
|
103590
|
+
const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname24(fileURLToPath(import.meta.url))) : dirname24(resolve20(options.pluginPath))));
|
|
103634
103591
|
const agentDir = resolve20(options.agentDir ?? resolveAgentHome({ env: env3, homeDir: env3.HOME ?? homedir11() }));
|
|
103635
103592
|
const pluginPath = resolve20(options.pluginPath ?? join63(repoRoot, "packages", "omo-senpi", "plugin"));
|
|
103636
103593
|
return {
|
|
@@ -107634,7 +107591,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
|
107634
107591
|
// packages/omo-opencode/src/cli/run/opencode-binary-resolver.ts
|
|
107635
107592
|
init_bun_which_shim();
|
|
107636
107593
|
init_spawn_with_windows_hide();
|
|
107637
|
-
import { delimiter as delimiter2, dirname as
|
|
107594
|
+
import { delimiter as delimiter2, dirname as dirname25, posix as posix9, win32 as win325 } from "path";
|
|
107638
107595
|
var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
|
|
107639
107596
|
var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
|
|
107640
107597
|
function getCommandCandidates(platform) {
|
|
@@ -107692,7 +107649,7 @@ async function findWorkingOpencodeBinary(pathEnv = process.env.PATH, probe2 = ca
|
|
|
107692
107649
|
return null;
|
|
107693
107650
|
}
|
|
107694
107651
|
function buildPathWithBinaryFirst(pathEnv, binaryPath) {
|
|
107695
|
-
const preferredDir =
|
|
107652
|
+
const preferredDir = dirname25(binaryPath);
|
|
107696
107653
|
const existing = (pathEnv ?? "").split(delimiter2).filter((entry) => entry.length > 0 && entry !== preferredDir);
|
|
107697
107654
|
return [preferredDir, ...existing].join(delimiter2);
|
|
107698
107655
|
}
|
|
@@ -108470,7 +108427,7 @@ init_state();
|
|
|
108470
108427
|
// packages/omo-opencode/src/features/run-continuation-state/constants.ts
|
|
108471
108428
|
var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
|
|
108472
108429
|
// packages/omo-opencode/src/features/run-continuation-state/storage.ts
|
|
108473
|
-
import { existsSync as existsSync40, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as
|
|
108430
|
+
import { existsSync as existsSync40, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync2, writeFileSync as writeFileSync7 } from "fs";
|
|
108474
108431
|
import { join as join68 } from "path";
|
|
108475
108432
|
function getMarkerPath(directory, sessionID) {
|
|
108476
108433
|
return join68(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
|
|
@@ -108650,7 +108607,7 @@ init_agent_display_names();
|
|
|
108650
108607
|
// packages/omo-opencode/src/hooks/ralph-loop/storage.ts
|
|
108651
108608
|
init_frontmatter2();
|
|
108652
108609
|
import { existsSync as existsSync41, readFileSync as readFileSync22, writeFileSync as writeFileSync8, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "fs";
|
|
108653
|
-
import { dirname as
|
|
108610
|
+
import { dirname as dirname26, join as join70 } from "path";
|
|
108654
108611
|
|
|
108655
108612
|
// packages/omo-opencode/src/hooks/ralph-loop/constants.ts
|
|
108656
108613
|
var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
|
|
@@ -110492,8 +110449,8 @@ function getCategoryEffectiveVariant(categoryName, requirement, config4) {
|
|
|
110492
110449
|
}
|
|
110493
110450
|
|
|
110494
110451
|
// packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
|
|
110495
|
-
function formatCapabilityResolutionLabel(
|
|
110496
|
-
return
|
|
110452
|
+
function formatCapabilityResolutionLabel(mode) {
|
|
110453
|
+
return mode ?? "unknown";
|
|
110497
110454
|
}
|
|
110498
110455
|
function buildModelResolutionDetails(options) {
|
|
110499
110456
|
const details = [];
|
|
@@ -110611,8 +110568,8 @@ function collectCapabilityResolutionIssues(info) {
|
|
|
110611
110568
|
const issues = [];
|
|
110612
110569
|
const allEntries = [...info.agents, ...info.categories];
|
|
110613
110570
|
const fallbackEntries = allEntries.filter((entry) => {
|
|
110614
|
-
const
|
|
110615
|
-
return
|
|
110571
|
+
const mode = entry.capabilityDiagnostics?.resolutionMode;
|
|
110572
|
+
return mode === "unknown";
|
|
110616
110573
|
});
|
|
110617
110574
|
if (fallbackEntries.length === 0) {
|
|
110618
110575
|
return issues;
|
|
@@ -110888,7 +110845,7 @@ init_src2();
|
|
|
110888
110845
|
import { existsSync as existsSync55 } from "fs";
|
|
110889
110846
|
import { createRequire as createRequire3 } from "module";
|
|
110890
110847
|
import { homedir as homedir19 } from "os";
|
|
110891
|
-
import { dirname as
|
|
110848
|
+
import { dirname as dirname31, join as join83 } from "path";
|
|
110892
110849
|
|
|
110893
110850
|
// packages/omo-opencode/src/hooks/comment-checker/downloader.ts
|
|
110894
110851
|
import { join as join82 } from "path";
|
|
@@ -110985,7 +110942,7 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
|
|
|
110985
110942
|
const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
|
|
110986
110943
|
const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
|
|
110987
110944
|
try {
|
|
110988
|
-
const packageDir = baseDirOverride ??
|
|
110945
|
+
const packageDir = baseDirOverride ?? dirname31(resolvePackageJsonPath());
|
|
110989
110946
|
const vendorPath = join83(packageDir, "vendor", platformKey, binaryName);
|
|
110990
110947
|
if (existsSync55(vendorPath))
|
|
110991
110948
|
return vendorPath;
|
|
@@ -111137,7 +111094,7 @@ async function getGhCliInfo(dependencies = {}) {
|
|
|
111137
111094
|
init_zod();
|
|
111138
111095
|
init_opencode_config_dir();
|
|
111139
111096
|
import { existsSync as existsSync56, readFileSync as readFileSync35 } from "fs";
|
|
111140
|
-
import { delimiter as delimiter3, dirname as
|
|
111097
|
+
import { delimiter as delimiter3, dirname as dirname32, resolve as resolve23 } from "path";
|
|
111141
111098
|
import { fileURLToPath as fileURLToPath7 } from "url";
|
|
111142
111099
|
|
|
111143
111100
|
// packages/omo-opencode/src/mcp/cli-suffix.ts
|
|
@@ -111268,7 +111225,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
|
|
|
111268
111225
|
].join(";");
|
|
111269
111226
|
function getModuleDirectory(moduleUrl) {
|
|
111270
111227
|
try {
|
|
111271
|
-
return
|
|
111228
|
+
return dirname32(fileURLToPath7(moduleUrl));
|
|
111272
111229
|
} catch (error51) {
|
|
111273
111230
|
if (!(error51 instanceof Error))
|
|
111274
111231
|
throw error51;
|
|
@@ -112001,7 +111958,7 @@ async function pathExists2(path15) {
|
|
|
112001
111958
|
init_src2();
|
|
112002
111959
|
import { readdir as readdir15, readFile as readFile28, stat as stat7 } from "fs/promises";
|
|
112003
111960
|
import { homedir as homedir23 } from "os";
|
|
112004
|
-
import { dirname as
|
|
111961
|
+
import { dirname as dirname33, isAbsolute as isAbsolute13, join as join86, relative as relative9, resolve as resolve25, sep as sep9 } from "path";
|
|
112005
111962
|
var CODEX_COMPONENTS_CHECK_ID = "codex-components";
|
|
112006
111963
|
var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
|
|
112007
111964
|
var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
|
|
@@ -112075,7 +112032,7 @@ async function auditBundleTargets(pluginRoot) {
|
|
|
112075
112032
|
const manifest2 = await readJson2(manifestPath);
|
|
112076
112033
|
if (manifest2 === null || !isRecord13(manifest2["mcpServers"]))
|
|
112077
112034
|
continue;
|
|
112078
|
-
const manifestRoot =
|
|
112035
|
+
const manifestRoot = dirname33(manifestPath);
|
|
112079
112036
|
const isRootManifest = resolve25(manifestRoot) === resolve25(pluginRoot);
|
|
112080
112037
|
for (const server2 of Object.values(manifest2["mcpServers"])) {
|
|
112081
112038
|
if (!isRecord13(server2) || !Array.isArray(server2["args"]))
|
|
@@ -112096,7 +112053,7 @@ async function auditBundleTargets(pluginRoot) {
|
|
|
112096
112053
|
continue;
|
|
112097
112054
|
const commands2 = [];
|
|
112098
112055
|
collectHookCommands(manifest2, commands2);
|
|
112099
|
-
const hookPluginRoot =
|
|
112056
|
+
const hookPluginRoot = dirname33(dirname33(hookManifestPath));
|
|
112100
112057
|
for (const command of commands2) {
|
|
112101
112058
|
for (const relativePath of extractPluginRootPaths(command)) {
|
|
112102
112059
|
referencedCount += 1;
|
|
@@ -112135,7 +112092,7 @@ async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEsc
|
|
|
112135
112092
|
}
|
|
112136
112093
|
async function findHookManifestPaths(root) {
|
|
112137
112094
|
const paths3 = await findManifestPaths(root, "hooks.json");
|
|
112138
|
-
return paths3.filter((path15) =>
|
|
112095
|
+
return paths3.filter((path15) => dirname33(path15).endsWith(`${sep9}hooks`));
|
|
112139
112096
|
}
|
|
112140
112097
|
async function findManifestPaths(root, manifestName) {
|
|
112141
112098
|
let entries;
|
|
@@ -112654,8 +112611,8 @@ function formatVerbose(result) {
|
|
|
112654
112611
|
}
|
|
112655
112612
|
|
|
112656
112613
|
// packages/omo-opencode/src/cli/doctor/framework/formatter.ts
|
|
112657
|
-
function formatDoctorOutput(result,
|
|
112658
|
-
switch (
|
|
112614
|
+
function formatDoctorOutput(result, mode) {
|
|
112615
|
+
switch (mode) {
|
|
112659
112616
|
case "default":
|
|
112660
112617
|
return formatDefault(result);
|
|
112661
112618
|
case "status":
|
|
@@ -112819,7 +112776,7 @@ import {
|
|
|
112819
112776
|
unlinkSync as unlinkSync9,
|
|
112820
112777
|
writeFileSync as writeFileSync12
|
|
112821
112778
|
} from "fs";
|
|
112822
|
-
import { basename as basename12, dirname as
|
|
112779
|
+
import { basename as basename12, dirname as dirname34, join as join90 } from "path";
|
|
112823
112780
|
|
|
112824
112781
|
// packages/mcp-client-core/src/config-dir.ts
|
|
112825
112782
|
import { existsSync as existsSync61, realpathSync as realpathSync8 } from "fs";
|
|
@@ -113003,7 +112960,7 @@ function readLegacyStore() {
|
|
|
113003
112960
|
}
|
|
113004
112961
|
function writeTokenFile(filePath, token) {
|
|
113005
112962
|
try {
|
|
113006
|
-
const dir =
|
|
112963
|
+
const dir = dirname34(filePath);
|
|
113007
112964
|
if (!existsSync63(dir)) {
|
|
113008
112965
|
mkdirSync15(dir, { recursive: true });
|
|
113009
112966
|
}
|
|
@@ -113975,10 +113932,10 @@ function formatClassification(classification) {
|
|
|
113975
113932
|
return classification.ref.length > 0 ? `${head} ${classification.path} ${classification.ref}` : `${head} ${classification.path}`;
|
|
113976
113933
|
}
|
|
113977
113934
|
function formatSummary(result) {
|
|
113978
|
-
const
|
|
113935
|
+
const mode = result.apply ? "apply" : "dry-run";
|
|
113979
113936
|
const removed2 = result.repos.reduce((total, repo) => total + repo.removed.length, 0);
|
|
113980
113937
|
const failed = result.repos.reduce((total, repo) => total + repo.failed.length, 0);
|
|
113981
|
-
return `SUMMARY mode=${
|
|
113938
|
+
return `SUMMARY mode=${mode} repos=${result.repos.length} sweep=${result.sweepCount} keep=${result.keepCount} prune=${result.pruneCount} removed=${removed2} failed=${failed}`;
|
|
113982
113939
|
}
|
|
113983
113940
|
function formatResult(result) {
|
|
113984
113941
|
const lines = [];
|
|
@@ -114500,9 +114457,9 @@ Examples:
|
|
|
114500
114457
|
`).action(async (options) => {
|
|
114501
114458
|
const rootOptions = program2.opts();
|
|
114502
114459
|
const rootDoctorPlatform = rootOptions.platform === "opencode" || rootOptions.platform === "codex" ? rootOptions.platform : undefined;
|
|
114503
|
-
const
|
|
114460
|
+
const mode = options.status ? "status" : options.verbose ? "verbose" : "default";
|
|
114504
114461
|
const doctorOptions = {
|
|
114505
|
-
mode
|
|
114462
|
+
mode,
|
|
114506
114463
|
json: options.json ?? false,
|
|
114507
114464
|
target: resolveDoctorTarget(process.env.OMO_INVOCATION_NAME, options.platform ?? rootDoctorPlatform)
|
|
114508
114465
|
};
|