lazycodex-ai 5.0.0-beta.43 → 5.0.0-beta.45
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 +236 -247
- package/dist/cli-node/index.js +236 -247
- package/package.json +3 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- 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/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 +2 -2
- 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/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- 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/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-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-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/package-lock.json +12 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +47 -2
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +4 -0
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +32 -50
- package/packages/shared-skills/skill-source-filter.d.ts +16 -0
- package/packages/shared-skills/skill-source-filter.mjs +44 -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.45",
|
|
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",
|
|
@@ -144,6 +144,7 @@ var init_package = __esm(() => {
|
|
|
144
144
|
"packages/omo-codex/plugin/components/telemetry/dist/cli.js",
|
|
145
145
|
"packages/omo-codex/plugin/components/ultrawork/dist/cli.js",
|
|
146
146
|
"packages/omo-codex/plugin/components/ulw-loop/dist/cli.js",
|
|
147
|
+
"packages/prompts-core/prompts/ultrawork/codex.md",
|
|
147
148
|
"packages/omo-codex/plugin/.codex-plugin",
|
|
148
149
|
"!packages/omo-codex/plugin/node_modules",
|
|
149
150
|
"!packages/omo-codex/plugin/**/node_modules",
|
|
@@ -237,7 +238,7 @@ var init_package = __esm(() => {
|
|
|
237
238
|
zod: "^4.4.3"
|
|
238
239
|
},
|
|
239
240
|
devDependencies: {
|
|
240
|
-
"@code-yeongyu/senpi": "2026.9.
|
|
241
|
+
"@code-yeongyu/senpi": "2026.9.6",
|
|
241
242
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
242
243
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
243
244
|
"@oh-my-opencode/boulder-state": "workspace:*",
|
|
@@ -278,18 +279,18 @@ var init_package = __esm(() => {
|
|
|
278
279
|
typescript: "^7.0.2"
|
|
279
280
|
},
|
|
280
281
|
optionalDependencies: {
|
|
281
|
-
"oh-my-opencode-darwin-arm64": "5.0.0-beta.
|
|
282
|
-
"oh-my-opencode-darwin-x64": "5.0.0-beta.
|
|
283
|
-
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.
|
|
284
|
-
"oh-my-opencode-linux-arm64": "5.0.0-beta.
|
|
285
|
-
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.
|
|
286
|
-
"oh-my-opencode-linux-x64": "5.0.0-beta.
|
|
287
|
-
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.
|
|
288
|
-
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.
|
|
289
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.
|
|
290
|
-
"oh-my-opencode-windows-arm64": "5.0.0-beta.
|
|
291
|
-
"oh-my-opencode-windows-x64": "5.0.0-beta.
|
|
292
|
-
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.
|
|
282
|
+
"oh-my-opencode-darwin-arm64": "5.0.0-beta.45",
|
|
283
|
+
"oh-my-opencode-darwin-x64": "5.0.0-beta.45",
|
|
284
|
+
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.45",
|
|
285
|
+
"oh-my-opencode-linux-arm64": "5.0.0-beta.45",
|
|
286
|
+
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.45",
|
|
287
|
+
"oh-my-opencode-linux-x64": "5.0.0-beta.45",
|
|
288
|
+
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.45",
|
|
289
|
+
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.45",
|
|
290
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.45",
|
|
291
|
+
"oh-my-opencode-windows-arm64": "5.0.0-beta.45",
|
|
292
|
+
"oh-my-opencode-windows-x64": "5.0.0-beta.45",
|
|
293
|
+
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.45"
|
|
293
294
|
},
|
|
294
295
|
overrides: {
|
|
295
296
|
"@earendil-works/pi-agent-core": "0.84.2",
|
|
@@ -7252,7 +7253,7 @@ var init_category_model_requirements = __esm(() => {
|
|
|
7252
7253
|
{
|
|
7253
7254
|
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
7254
7255
|
model: "claude-fable-5-1",
|
|
7255
|
-
variant: "
|
|
7256
|
+
variant: "max"
|
|
7256
7257
|
},
|
|
7257
7258
|
{
|
|
7258
7259
|
providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
|
|
@@ -8065,8 +8066,8 @@ var init_supplemental_entries = __esm(() => {
|
|
|
8065
8066
|
output: ["text"]
|
|
8066
8067
|
},
|
|
8067
8068
|
limit: {
|
|
8068
|
-
context:
|
|
8069
|
-
input:
|
|
8069
|
+
context: 1050000,
|
|
8070
|
+
input: 922000,
|
|
8070
8071
|
output: 128000
|
|
8071
8072
|
}
|
|
8072
8073
|
},
|
|
@@ -8491,6 +8492,9 @@ var init_model_capabilities = __esm(() => {
|
|
|
8491
8492
|
// packages/model-core/src/context-limit-resolver.ts
|
|
8492
8493
|
var init_context_limit_resolver = () => {};
|
|
8493
8494
|
|
|
8495
|
+
// packages/model-core/src/context-overflow.ts
|
|
8496
|
+
var init_context_overflow = () => {};
|
|
8497
|
+
|
|
8494
8498
|
// packages/model-core/src/model-capabilities-snapshot.ts
|
|
8495
8499
|
function isRecord3(value) {
|
|
8496
8500
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -8627,6 +8631,7 @@ var init_src2 = __esm(() => {
|
|
|
8627
8631
|
init_runtime_fallback_model();
|
|
8628
8632
|
init_model_capabilities();
|
|
8629
8633
|
init_context_limit_resolver();
|
|
8634
|
+
init_context_overflow();
|
|
8630
8635
|
});
|
|
8631
8636
|
|
|
8632
8637
|
// packages/omo-opencode/src/shared/model-sanitizer.ts
|
|
@@ -12689,8 +12694,8 @@ var init_model_capabilities_generated = __esm(() => {
|
|
|
12689
12694
|
]
|
|
12690
12695
|
},
|
|
12691
12696
|
limit: {
|
|
12692
|
-
context:
|
|
12693
|
-
input:
|
|
12697
|
+
context: 1050000,
|
|
12698
|
+
input: 922000,
|
|
12694
12699
|
output: 128000
|
|
12695
12700
|
}
|
|
12696
12701
|
},
|
|
@@ -86577,20 +86582,20 @@ var init_config_manager = __esm(() => {
|
|
|
86577
86582
|
|
|
86578
86583
|
// packages/telemetry-core/src/activity-state.ts
|
|
86579
86584
|
import { existsSync as existsSync25, mkdirSync as mkdirSync8, readFileSync as readFileSync12 } from "fs";
|
|
86580
|
-
import { basename as basename8, join as
|
|
86585
|
+
import { basename as basename8, join as join51 } from "path";
|
|
86581
86586
|
function resolveTelemetryStateDir(product, options = {}) {
|
|
86582
86587
|
const dataDir = resolveXdgDataDir(product.cacheDirName, {
|
|
86583
86588
|
env: options.env,
|
|
86584
86589
|
osProvider: options.osProvider
|
|
86585
86590
|
});
|
|
86586
|
-
const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined :
|
|
86591
|
+
const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join51(options.env.XDG_DATA_HOME, product.cacheDirName);
|
|
86587
86592
|
if (dataDir === xdgStateDir || xdgStateDir === undefined && basename8(dataDir) === product.cacheDirName) {
|
|
86588
86593
|
return dataDir;
|
|
86589
86594
|
}
|
|
86590
|
-
return
|
|
86595
|
+
return join51(dataDir, product.cacheDirName);
|
|
86591
86596
|
}
|
|
86592
86597
|
function getTelemetryActivityStateFilePath(stateDir) {
|
|
86593
|
-
return
|
|
86598
|
+
return join51(stateDir, POSTHOG_ACTIVITY_STATE_FILE);
|
|
86594
86599
|
}
|
|
86595
86600
|
function getDailyActiveCaptureState(input) {
|
|
86596
86601
|
const state = readPostHogActivityState(input.stateDir, input.diagnostics);
|
|
@@ -86661,9 +86666,9 @@ var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com", DEFAULT_POSTHOG_API_KEY =
|
|
|
86661
86666
|
|
|
86662
86667
|
// packages/telemetry-core/src/diagnostics.ts
|
|
86663
86668
|
import { appendFileSync as appendFileSync2, existsSync as existsSync26, mkdirSync as mkdirSync9, readFileSync as readFileSync13 } from "fs";
|
|
86664
|
-
import { join as
|
|
86669
|
+
import { join as join52 } from "path";
|
|
86665
86670
|
function getTelemetryDiagnosticsFilePath(diagnosticsDir) {
|
|
86666
|
-
return
|
|
86671
|
+
return join52(diagnosticsDir, DIAGNOSTICS_FILE_NAME);
|
|
86667
86672
|
}
|
|
86668
86673
|
function writeTelemetryDiagnostic(input, options) {
|
|
86669
86674
|
const now = options.now ?? new Date;
|
|
@@ -94442,7 +94447,7 @@ var package_default2;
|
|
|
94442
94447
|
var init_package2 = __esm(() => {
|
|
94443
94448
|
package_default2 = {
|
|
94444
94449
|
name: "@oh-my-opencode/omo-codex",
|
|
94445
|
-
version: "5.0.0-beta.
|
|
94450
|
+
version: "5.0.0-beta.45",
|
|
94446
94451
|
type: "module",
|
|
94447
94452
|
private: true,
|
|
94448
94453
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -95410,7 +95415,7 @@ var init_update_toasts = __esm(() => {
|
|
|
95410
95415
|
|
|
95411
95416
|
// packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
|
|
95412
95417
|
import { existsSync as existsSync47 } from "fs";
|
|
95413
|
-
import { dirname as dirname30, join as
|
|
95418
|
+
import { dirname as dirname30, join as join74 } from "path";
|
|
95414
95419
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
95415
95420
|
function defaultGetModuleHostingWorkspace() {
|
|
95416
95421
|
try {
|
|
@@ -95564,7 +95569,7 @@ var init_background_update_check = __esm(() => {
|
|
|
95564
95569
|
init_update_toasts();
|
|
95565
95570
|
defaultDeps4 = {
|
|
95566
95571
|
existsSync: existsSync47,
|
|
95567
|
-
join:
|
|
95572
|
+
join: join74,
|
|
95568
95573
|
runBunInstallWithDetails,
|
|
95569
95574
|
log: log2,
|
|
95570
95575
|
getOpenCodeCacheDir,
|
|
@@ -98201,7 +98206,7 @@ function getUnsupportedOpenCodeVersionMessage(openCodeVersion) {
|
|
|
98201
98206
|
}
|
|
98202
98207
|
|
|
98203
98208
|
// packages/omo-codex/src/install/install-codex.ts
|
|
98204
|
-
import { join as
|
|
98209
|
+
import { join as join53, resolve as resolve12 } from "path";
|
|
98205
98210
|
import { existsSync as existsSync27 } from "fs";
|
|
98206
98211
|
import { homedir as homedir6 } from "os";
|
|
98207
98212
|
|
|
@@ -102507,26 +102512,9 @@ async function removeGitBashHooksOffWindows(input) {
|
|
|
102507
102512
|
`);
|
|
102508
102513
|
}
|
|
102509
102514
|
|
|
102510
|
-
// packages/omo-codex/src/install/omo-sot-migration.ts
|
|
102511
|
-
import { join as join50 } from "path";
|
|
102512
|
-
async function seedAndMigrateOmoSot(input) {
|
|
102513
|
-
const commandEnv = { ...input.env };
|
|
102514
|
-
const scriptPath = join50(input.repoRoot, "packages", "omo-codex", "plugin", "scripts", "migrate-omo-sot.mjs");
|
|
102515
|
-
try {
|
|
102516
|
-
await input.runCommand(process.execPath, [scriptPath, "--seed"], {
|
|
102517
|
-
cwd: input.repoRoot,
|
|
102518
|
-
env: commandEnv
|
|
102519
|
-
});
|
|
102520
|
-
} catch (error51) {
|
|
102521
|
-
if (!(error51 instanceof Error))
|
|
102522
|
-
throw error51;
|
|
102523
|
-
input.log(`Warning: skipped OMO SOT seed/migration: ${error51.message}`);
|
|
102524
|
-
}
|
|
102525
|
-
}
|
|
102526
|
-
|
|
102527
102515
|
// packages/omo-codex/src/install/install-ast-grep-sg.ts
|
|
102528
102516
|
init_src();
|
|
102529
|
-
import { join as
|
|
102517
|
+
import { join as join50 } from "path";
|
|
102530
102518
|
function describeResult(result) {
|
|
102531
102519
|
if (result.kind === "succeeded")
|
|
102532
102520
|
return null;
|
|
@@ -102540,7 +102528,7 @@ async function installAstGrepForCodex(options) {
|
|
|
102540
102528
|
return;
|
|
102541
102529
|
const platform = options.platform ?? process.platform;
|
|
102542
102530
|
const targetDir = astGrepRuntimeDir(options.codexHome, platform, options.arch ?? process.arch);
|
|
102543
|
-
const skillDir =
|
|
102531
|
+
const skillDir = join50(plugin.path, "skills", "ast-grep");
|
|
102544
102532
|
const installer = options.installer ?? runAstGrepSkillInstall;
|
|
102545
102533
|
try {
|
|
102546
102534
|
const result = await installer({ platform, skillDir, targetDir });
|
|
@@ -102573,7 +102561,7 @@ async function runCodexInstaller(options = {}) {
|
|
|
102573
102561
|
const env2 = options.env ?? process.env;
|
|
102574
102562
|
const platform = options.platform ?? process.platform;
|
|
102575
102563
|
const repoRoot = resolve12(options.repoRoot ?? findRepoRoot({ importerDir: import.meta.dir, env: env2 }));
|
|
102576
|
-
const codexHome = resolve12(options.codexHome ?? env2.CODEX_HOME ??
|
|
102564
|
+
const codexHome = resolve12(options.codexHome ?? env2.CODEX_HOME ?? join53(homedir6(), ".codex"));
|
|
102577
102565
|
const projectDirectory = resolve12(options.projectDirectory ?? env2.OMO_CODEX_PROJECT ?? process.cwd());
|
|
102578
102566
|
const binDir = resolveCodexInstallerBinDir({ binDir: options.binDir, codexHome, env: env2 });
|
|
102579
102567
|
const runCommand = options.runCommand ?? defaultRunCommand;
|
|
@@ -102590,9 +102578,9 @@ async function runCodexInstaller(options = {}) {
|
|
|
102590
102578
|
if (!gitBashResolution.found) {
|
|
102591
102579
|
throw new Error(gitBashResolution.installHint);
|
|
102592
102580
|
}
|
|
102593
|
-
const codexPackageRoot =
|
|
102581
|
+
const codexPackageRoot = join53(repoRoot, "packages", "omo-codex");
|
|
102594
102582
|
const marketplace = await readMarketplace(repoRoot, {
|
|
102595
|
-
marketplacePath:
|
|
102583
|
+
marketplacePath: join53(codexPackageRoot, "marketplace.json")
|
|
102596
102584
|
});
|
|
102597
102585
|
const distributionManifest = await readDistributionManifest(repoRoot);
|
|
102598
102586
|
const installed = [];
|
|
@@ -102638,7 +102626,7 @@ async function runCodexInstaller(options = {}) {
|
|
|
102638
102626
|
if (runtimeLink !== null)
|
|
102639
102627
|
log4(`Linked ${runtimeLink.name} -> ${runtimeLink.target}`);
|
|
102640
102628
|
else
|
|
102641
|
-
log4(`Warning: skipped the omo-agent-toolkit runtime wrapper because ${
|
|
102629
|
+
log4(`Warning: skipped the omo-agent-toolkit runtime wrapper because ${join53(repoRoot, "dist", "cli", "index.js")} is missing; omo-agent-toolkit ulw-loop commands will be unavailable until a package shipping dist/cli is installed`);
|
|
102642
102630
|
}
|
|
102643
102631
|
pluginSources.push({ name: entry.name, sourcePath });
|
|
102644
102632
|
installed.push(plugin);
|
|
@@ -102701,13 +102689,13 @@ async function runCodexInstaller(options = {}) {
|
|
|
102701
102689
|
continue;
|
|
102702
102690
|
log4(`Warning: deferred legacy Codex LSP daemon cleanup for v${cleanup.version}: ${cleanup.reason}`);
|
|
102703
102691
|
}
|
|
102704
|
-
const marketplaceRoot =
|
|
102692
|
+
const marketplaceRoot = join53(codexHome, "plugins", "cache", marketplace.name);
|
|
102705
102693
|
await writeCachedMarketplaceManifest({
|
|
102706
102694
|
marketplaceName: marketplace.name,
|
|
102707
102695
|
marketplaceRoot,
|
|
102708
102696
|
plugins: installed
|
|
102709
102697
|
});
|
|
102710
|
-
const configPath =
|
|
102698
|
+
const configPath = join53(codexHome, "config.toml");
|
|
102711
102699
|
await updateCodexConfig({
|
|
102712
102700
|
configPath,
|
|
102713
102701
|
repoRoot: codexPackageRoot,
|
|
@@ -102721,7 +102709,6 @@ async function runCodexInstaller(options = {}) {
|
|
|
102721
102709
|
autonomousPermissions: options.autonomousPermissions !== false,
|
|
102722
102710
|
...options.reasoning === undefined ? {} : { reasoning: options.reasoning }
|
|
102723
102711
|
});
|
|
102724
|
-
await seedAndMigrateOmoSot({ env: env2, log: log4, repoRoot, runCommand });
|
|
102725
102712
|
const projectCleanup = await repairProjectLocalCodexArtifactsBestEffort({
|
|
102726
102713
|
startDirectory: projectDirectory,
|
|
102727
102714
|
codexHome,
|
|
@@ -102767,7 +102754,7 @@ function findRepoRootFromImporter(importerDir) {
|
|
|
102767
102754
|
for (let depth = 0;depth <= 7; depth += 1) {
|
|
102768
102755
|
if (isRepoRootWithCodexPlugin(current))
|
|
102769
102756
|
return current;
|
|
102770
|
-
for (const wrapperPackageRoot of [
|
|
102757
|
+
for (const wrapperPackageRoot of [join53(current, "node_modules", "oh-my-openagent"), join53(current, "oh-my-openagent")]) {
|
|
102771
102758
|
if (isRepoRootWithCodexPlugin(wrapperPackageRoot))
|
|
102772
102759
|
return wrapperPackageRoot;
|
|
102773
102760
|
}
|
|
@@ -102785,7 +102772,7 @@ function findRepoRoot(input) {
|
|
|
102785
102772
|
return findRepoRootFromImporter(input.importerDir);
|
|
102786
102773
|
}
|
|
102787
102774
|
function isRepoRootWithCodexPlugin(repoRoot) {
|
|
102788
|
-
return existsSync27(
|
|
102775
|
+
return existsSync27(join53(repoRoot, "packages", "omo-codex", "plugin", ".codex-plugin", "plugin.json"));
|
|
102789
102776
|
}
|
|
102790
102777
|
function codexMarketplaceSource(marketplaceRoot) {
|
|
102791
102778
|
return { sourceType: "local", source: marketplaceRoot };
|
|
@@ -102922,11 +102909,11 @@ function defaultRunCommand2(command, args) {
|
|
|
102922
102909
|
// packages/omo-codex/src/install/codex-cleanup.ts
|
|
102923
102910
|
import { lstat as lstat14, readFile as readFile24, readdir as readdir13, rm as rm12, rmdir } from "fs/promises";
|
|
102924
102911
|
import { homedir as homedir8 } from "os";
|
|
102925
|
-
import { isAbsolute as isAbsolute11, join as
|
|
102912
|
+
import { isAbsolute as isAbsolute11, join as join56, relative as relative6, resolve as resolve15 } from "path";
|
|
102926
102913
|
|
|
102927
102914
|
// packages/omo-codex/src/install/codex-cleanup-bins.ts
|
|
102928
102915
|
import { lstat as lstat12, readFile as readFile22, readdir as readdir12, readlink as readlink6, rm as rm11 } from "fs/promises";
|
|
102929
|
-
import { dirname as dirname18, isAbsolute as isAbsolute9, join as
|
|
102916
|
+
import { dirname as dirname18, isAbsolute as isAbsolute9, join as join54, resolve as resolve13 } from "path";
|
|
102930
102917
|
var ROOT_RUNTIME_BIN_NAME = "omo";
|
|
102931
102918
|
var MANAGED_CODEX_BIN_NAMES = new Set([
|
|
102932
102919
|
ROOT_RUNTIME_BIN_NAME,
|
|
@@ -102956,7 +102943,7 @@ async function removeManagedCodexBins(binDir, platform) {
|
|
|
102956
102943
|
const binName = managedBinNameForEntry2(entry.name, platform);
|
|
102957
102944
|
if (binName === null || !MANAGED_CODEX_BIN_NAMES.has(binName))
|
|
102958
102945
|
continue;
|
|
102959
|
-
const linkPath =
|
|
102946
|
+
const linkPath = join54(binDir, entry.name);
|
|
102960
102947
|
if (await isManagedCodexBin(linkPath, platform, binName)) {
|
|
102961
102948
|
await rm11(linkPath, { force: true });
|
|
102962
102949
|
removed2.push(linkPath);
|
|
@@ -103109,7 +103096,7 @@ function nodeErrorCode5(error51) {
|
|
|
103109
103096
|
}
|
|
103110
103097
|
|
|
103111
103098
|
// packages/omo-codex/src/install/codex-cleanup-safety.ts
|
|
103112
|
-
import { dirname as dirname20, isAbsolute as isAbsolute10, join as
|
|
103099
|
+
import { dirname as dirname20, isAbsolute as isAbsolute10, join as join55, relative as relative5, resolve as resolve14 } from "path";
|
|
103113
103100
|
function codexHomeResolvesToFilesystemRoot(codexHome) {
|
|
103114
103101
|
const resolved = resolve14(codexHome);
|
|
103115
103102
|
return dirname20(resolved) === resolved;
|
|
@@ -103126,11 +103113,11 @@ function validateManagedCleanupTarget(input) {
|
|
|
103126
103113
|
if (target === codexHome)
|
|
103127
103114
|
return skipped(input.path, "outside managed Codex cleanup scope");
|
|
103128
103115
|
const exactManagedRoots = new Set([
|
|
103129
|
-
resolve14(
|
|
103130
|
-
resolve14(
|
|
103131
|
-
resolve14(
|
|
103132
|
-
resolve14(
|
|
103133
|
-
resolve14(
|
|
103116
|
+
resolve14(join55(codexHome, "plugins", "cache", "sisyphuslabs")),
|
|
103117
|
+
resolve14(join55(codexHome, ".tmp", "marketplaces", "sisyphuslabs")),
|
|
103118
|
+
resolve14(join55(codexHome, "runtime", "ast-grep")),
|
|
103119
|
+
resolve14(join55(codexHome, "runtime", "node")),
|
|
103120
|
+
resolve14(join55(codexHome, "plugins", "data", "omo-sisyphuslabs", "bootstrap"))
|
|
103134
103121
|
]);
|
|
103135
103122
|
if (exactManagedRoots.has(target))
|
|
103136
103123
|
return null;
|
|
@@ -103160,8 +103147,8 @@ function skipped(path7, reason) {
|
|
|
103160
103147
|
var INSTALLED_AGENTS_MANIFEST = ".installed-agents.json";
|
|
103161
103148
|
async function cleanupCodexLight(input = {}) {
|
|
103162
103149
|
const env2 = input.env ?? process.env;
|
|
103163
|
-
const codexHome = resolve15(input.codexHome ?? env2.CODEX_HOME ??
|
|
103164
|
-
const configPath =
|
|
103150
|
+
const codexHome = resolve15(input.codexHome ?? env2.CODEX_HOME ?? join56(homedir8(), ".codex"));
|
|
103151
|
+
const configPath = join56(codexHome, "config.toml");
|
|
103165
103152
|
const installedBinDir = await readInstalledCodexBinDir(codexHome);
|
|
103166
103153
|
const agentPaths = await collectInstalledAgentPaths(codexHome, configPath);
|
|
103167
103154
|
const configCleanup = await cleanupCodexConfig(configPath, input.now);
|
|
@@ -103215,17 +103202,17 @@ function firstConfiguredPath(...values) {
|
|
|
103215
103202
|
}
|
|
103216
103203
|
function managedGlobalStatePaths(codexHome) {
|
|
103217
103204
|
return [
|
|
103218
|
-
|
|
103219
|
-
|
|
103220
|
-
|
|
103221
|
-
|
|
103222
|
-
|
|
103205
|
+
join56(codexHome, "plugins", "cache", "sisyphuslabs"),
|
|
103206
|
+
join56(codexHome, ".tmp", "marketplaces", "sisyphuslabs"),
|
|
103207
|
+
join56(codexHome, "runtime", "ast-grep"),
|
|
103208
|
+
join56(codexHome, "runtime", "node"),
|
|
103209
|
+
join56(codexHome, "plugins", "data", "omo-sisyphuslabs", "bootstrap")
|
|
103223
103210
|
];
|
|
103224
103211
|
}
|
|
103225
103212
|
var BOOTSTRAP_DATA_GLOB_MAX_DEPTH = 5;
|
|
103226
103213
|
async function collectBootstrapDataDirsByGlob(codexHome) {
|
|
103227
103214
|
const results = [];
|
|
103228
|
-
await walkForManagedBootstrapDirs(
|
|
103215
|
+
await walkForManagedBootstrapDirs(join56(codexHome, "plugins"), 0, results);
|
|
103229
103216
|
return results;
|
|
103230
103217
|
}
|
|
103231
103218
|
async function walkForManagedBootstrapDirs(directory, depth, results) {
|
|
@@ -103237,9 +103224,9 @@ async function walkForManagedBootstrapDirs(directory, depth, results) {
|
|
|
103237
103224
|
for (const entry of entries) {
|
|
103238
103225
|
if (!entry.isDirectory())
|
|
103239
103226
|
continue;
|
|
103240
|
-
const childPath =
|
|
103227
|
+
const childPath = join56(directory, entry.name);
|
|
103241
103228
|
if (isManagedBootstrapOwnerName(entry.name)) {
|
|
103242
|
-
const bootstrapDir =
|
|
103229
|
+
const bootstrapDir = join56(childPath, "bootstrap");
|
|
103243
103230
|
if (await exists6(bootstrapDir))
|
|
103244
103231
|
results.push(bootstrapDir);
|
|
103245
103232
|
continue;
|
|
@@ -103273,7 +103260,7 @@ async function attemptRemove(path7) {
|
|
|
103273
103260
|
}
|
|
103274
103261
|
async function pruneEmptyRuntimeDirBestEffort(codexHome) {
|
|
103275
103262
|
try {
|
|
103276
|
-
await rmdir(
|
|
103263
|
+
await rmdir(join56(codexHome, "runtime"));
|
|
103277
103264
|
} catch (error51) {
|
|
103278
103265
|
if (isExpectedRuntimePruneFailure(error51))
|
|
103279
103266
|
return;
|
|
@@ -103285,14 +103272,14 @@ function isExpectedRuntimePruneFailure(error51) {
|
|
|
103285
103272
|
}
|
|
103286
103273
|
async function collectInstalledAgentPaths(codexHome, configPath) {
|
|
103287
103274
|
const manifestPaths = [
|
|
103288
|
-
|
|
103275
|
+
join56(codexHome, ".tmp", "marketplaces", "sisyphuslabs", "plugins", "omo", INSTALLED_AGENTS_MANIFEST)
|
|
103289
103276
|
];
|
|
103290
|
-
const versionRoot =
|
|
103277
|
+
const versionRoot = join56(codexHome, "plugins", "cache", "sisyphuslabs", "omo");
|
|
103291
103278
|
if (await exists6(versionRoot)) {
|
|
103292
103279
|
const entries = await readdir13(versionRoot, { withFileTypes: true });
|
|
103293
103280
|
for (const entry of entries) {
|
|
103294
103281
|
if (entry.isDirectory())
|
|
103295
|
-
manifestPaths.push(
|
|
103282
|
+
manifestPaths.push(join56(versionRoot, entry.name, INSTALLED_AGENTS_MANIFEST));
|
|
103296
103283
|
}
|
|
103297
103284
|
}
|
|
103298
103285
|
const paths2 = new Set;
|
|
@@ -103310,7 +103297,7 @@ async function readManagedAgentPathsFromConfig(codexHome, configPath) {
|
|
|
103310
103297
|
if (!await exists6(configPath))
|
|
103311
103298
|
return [];
|
|
103312
103299
|
const config3 = await readFile24(configPath, "utf8");
|
|
103313
|
-
return MANAGED_CODEX_AGENT_NAMES2.filter((agentName) => config3.includes(`config_file = ${JSON.stringify(`./agents/${agentName}.toml`)}`)).map((agentName) =>
|
|
103300
|
+
return MANAGED_CODEX_AGENT_NAMES2.filter((agentName) => config3.includes(`config_file = ${JSON.stringify(`./agents/${agentName}.toml`)}`)).map((agentName) => join56(codexHome, "agents", `${agentName}.toml`));
|
|
103314
103301
|
}
|
|
103315
103302
|
async function readInstalledAgentManifest(manifestPath) {
|
|
103316
103303
|
if (!await exists6(manifestPath))
|
|
@@ -103321,7 +103308,7 @@ async function readInstalledAgentManifest(manifestPath) {
|
|
|
103321
103308
|
return parsed.agents.filter((path7) => typeof path7 === "string");
|
|
103322
103309
|
}
|
|
103323
103310
|
async function removeManifestListedAgentLinks(codexHome, paths2) {
|
|
103324
|
-
const agentsDir =
|
|
103311
|
+
const agentsDir = join56(codexHome, "agents");
|
|
103325
103312
|
const removed2 = [];
|
|
103326
103313
|
const skipped2 = [];
|
|
103327
103314
|
for (const path7 of paths2) {
|
|
@@ -103373,14 +103360,14 @@ function nodeErrorCode6(error51) {
|
|
|
103373
103360
|
import { execFile as execFile3 } from "child_process";
|
|
103374
103361
|
import { existsSync as existsSync31 } from "fs";
|
|
103375
103362
|
import { homedir as homedir11 } from "os";
|
|
103376
|
-
import { dirname as dirname24, join as
|
|
103363
|
+
import { dirname as dirname24, join as join61, resolve as resolve19 } from "path";
|
|
103377
103364
|
import { fileURLToPath } from "url";
|
|
103378
103365
|
import { promisify as promisify2 } from "util";
|
|
103379
103366
|
|
|
103380
103367
|
// packages/omo-senpi/src/components/agent-home/resolve-agent-home.ts
|
|
103381
103368
|
import { existsSync as existsSync29 } from "fs";
|
|
103382
103369
|
import { homedir as homedir9 } from "os";
|
|
103383
|
-
import { join as
|
|
103370
|
+
import { join as join57, resolve as resolve16 } from "path";
|
|
103384
103371
|
var AGENT_DIR_ENV_NAMES = [
|
|
103385
103372
|
"OMO_CODING_AGENT_DIR",
|
|
103386
103373
|
"SENPI_CODING_AGENT_DIR",
|
|
@@ -103394,25 +103381,25 @@ function resolveAgentHome(options) {
|
|
|
103394
103381
|
if (configured)
|
|
103395
103382
|
return resolve16(configured);
|
|
103396
103383
|
}
|
|
103397
|
-
const brandedHome =
|
|
103398
|
-
const canonical =
|
|
103399
|
-
if (exists7(
|
|
103384
|
+
const brandedHome = join57(homeDir, ".omo");
|
|
103385
|
+
const canonical = join57(brandedHome, "agent");
|
|
103386
|
+
if (exists7(join57(canonical, AGENT_HOME_SENTINEL)))
|
|
103400
103387
|
return canonical;
|
|
103401
|
-
if (exists7(
|
|
103388
|
+
if (exists7(join57(brandedHome, AGENT_HOME_SENTINEL)))
|
|
103402
103389
|
return brandedHome;
|
|
103403
|
-
return
|
|
103390
|
+
return join57(homeDir, ".senpi", "agent");
|
|
103404
103391
|
}
|
|
103405
103392
|
|
|
103406
103393
|
// packages/omo-senpi/src/install/local-launcher.ts
|
|
103407
103394
|
import { chmodSync as chmodSync3, existsSync as existsSync30, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync as rmSync2, writeFileSync as writeFileSync6 } from "fs";
|
|
103408
103395
|
import { homedir as homedir10 } from "os";
|
|
103409
|
-
import { dirname as dirname21, join as
|
|
103396
|
+
import { dirname as dirname21, join as join58, resolve as resolve17 } from "path";
|
|
103410
103397
|
var MARKER = "omo-local-launcher";
|
|
103411
103398
|
function localLauncherPath(homeDir = homedir10()) {
|
|
103412
|
-
return
|
|
103399
|
+
return join58(homeDir, ".local", "bin", "omo");
|
|
103413
103400
|
}
|
|
103414
103401
|
function localLauncherCmdPath(homeDir = homedir10()) {
|
|
103415
|
-
return
|
|
103402
|
+
return join58(homeDir, ".local", "bin", "omo.cmd");
|
|
103416
103403
|
}
|
|
103417
103404
|
function renderLocalLauncher(options) {
|
|
103418
103405
|
const brand = {
|
|
@@ -103492,16 +103479,16 @@ node "%~dp0omo" %*\r
|
|
|
103492
103479
|
import { createHash as createHash5 } from "crypto";
|
|
103493
103480
|
import { constants as constants9 } from "fs";
|
|
103494
103481
|
import { access as access2, readFile as readFile26, stat as stat6 } from "fs/promises";
|
|
103495
|
-
import { dirname as dirname23, join as
|
|
103482
|
+
import { dirname as dirname23, join as join60 } from "path";
|
|
103496
103483
|
|
|
103497
103484
|
// packages/omo-senpi/src/install/senpi-settings.ts
|
|
103498
103485
|
import { constants as constants8 } from "fs";
|
|
103499
103486
|
import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile25, rename as rename5, writeFile as writeFile14 } from "fs/promises";
|
|
103500
|
-
import { dirname as dirname22, join as
|
|
103487
|
+
import { dirname as dirname22, join as join59, resolve as resolve18 } from "path";
|
|
103501
103488
|
var OMO_SENPI_PACKAGE_NAME = "@code-yeongyu/omo-senpi";
|
|
103502
103489
|
var LEGACY_BUILTIN_SHADOW_PACKAGES = [
|
|
103503
|
-
|
|
103504
|
-
|
|
103490
|
+
join59("packages", "pi-goal"),
|
|
103491
|
+
join59("packages", "pi-webfetch")
|
|
103505
103492
|
];
|
|
103506
103493
|
async function readSettings(settingsPath) {
|
|
103507
103494
|
let raw;
|
|
@@ -103576,7 +103563,7 @@ function isRecord12(value) {
|
|
|
103576
103563
|
async function readPackageName(packagePath) {
|
|
103577
103564
|
let raw;
|
|
103578
103565
|
try {
|
|
103579
|
-
raw = await readFile25(
|
|
103566
|
+
raw = await readFile25(join59(packagePath, "package.json"), "utf8");
|
|
103580
103567
|
} catch (error51) {
|
|
103581
103568
|
if (isErrno(error51, "ENOENT") || isErrno(error51, "ENOTDIR"))
|
|
103582
103569
|
return;
|
|
@@ -103601,57 +103588,57 @@ function isErrno(error51, code) {
|
|
|
103601
103588
|
|
|
103602
103589
|
// packages/omo-senpi/src/install/plugin-artifacts.ts
|
|
103603
103590
|
var REQUIRED_PLUGIN_ARTIFACTS = [
|
|
103604
|
-
|
|
103605
|
-
|
|
103606
|
-
|
|
103607
|
-
|
|
103608
|
-
|
|
103609
|
-
|
|
103610
|
-
|
|
103611
|
-
|
|
103612
|
-
|
|
103613
|
-
|
|
103614
|
-
|
|
103615
|
-
|
|
103616
|
-
|
|
103617
|
-
|
|
103618
|
-
|
|
103619
|
-
|
|
103620
|
-
|
|
103621
|
-
|
|
103622
|
-
|
|
103623
|
-
|
|
103624
|
-
|
|
103625
|
-
|
|
103626
|
-
|
|
103627
|
-
|
|
103628
|
-
|
|
103629
|
-
|
|
103630
|
-
|
|
103631
|
-
|
|
103632
|
-
|
|
103633
|
-
|
|
103634
|
-
|
|
103635
|
-
|
|
103636
|
-
|
|
103637
|
-
|
|
103638
|
-
|
|
103639
|
-
|
|
103640
|
-
|
|
103641
|
-
|
|
103642
|
-
|
|
103643
|
-
|
|
103591
|
+
join60("extensions", "omo.js"),
|
|
103592
|
+
join60("extensions", "omo-task.js"),
|
|
103593
|
+
join60("extensions", "omo-member.js"),
|
|
103594
|
+
join60("extensions", "memory-run-supervisor.mjs"),
|
|
103595
|
+
join60("extensions", "reflection-persona.md"),
|
|
103596
|
+
join60("extensions", "dream-persona.md"),
|
|
103597
|
+
join60("extensions", "facts-persona.md"),
|
|
103598
|
+
join60("extensions", "memorian-persona.md"),
|
|
103599
|
+
join60("skills", "ast-grep", "SKILL.md"),
|
|
103600
|
+
join60("skills", "coding-agent-sessions", "SKILL.md"),
|
|
103601
|
+
join60("skills", "debugging", "SKILL.md"),
|
|
103602
|
+
join60("skills", "frontend", "SKILL.md"),
|
|
103603
|
+
join60("skills", "git-master", "SKILL.md"),
|
|
103604
|
+
join60("skills", "init-deep", "SKILL.md"),
|
|
103605
|
+
join60("skills", "lsp-setup", "SKILL.md"),
|
|
103606
|
+
join60("skills", "programming", "SKILL.md"),
|
|
103607
|
+
join60("skills", "refactor", "SKILL.md"),
|
|
103608
|
+
join60("skills", "remove-ai-slops", "SKILL.md"),
|
|
103609
|
+
join60("skills", "review-work", "SKILL.md"),
|
|
103610
|
+
join60("skills", "ultimate-browsing", "SKILL.md"),
|
|
103611
|
+
join60("skills", "ultrawork", "SKILL.md"),
|
|
103612
|
+
join60("skills", "ulw-execute", "SKILL.md"),
|
|
103613
|
+
join60("skills", "ulw-loop", "SKILL.md"),
|
|
103614
|
+
join60("skills", "ulw-plan", "SKILL.md"),
|
|
103615
|
+
join60("skills", "ulw-research", "SKILL.md"),
|
|
103616
|
+
join60("skills", "visual-qa", "SKILL.md"),
|
|
103617
|
+
join60("skills-conditional", "x-search", "SKILL.md"),
|
|
103618
|
+
join60("runtime", "ast-grep-mcp", "cli.js"),
|
|
103619
|
+
join60("runtime", "agent-toolkit", "cli.js"),
|
|
103620
|
+
join60("runtime", "agent-toolkit", "ulw-loop", "cli.js"),
|
|
103621
|
+
join60("runtime", "agent-toolkit", "omo-agent-toolkit"),
|
|
103622
|
+
join60("runtime", "agent-toolkit", "omo-agent-toolkit.cmd"),
|
|
103623
|
+
join60("runtime", "lsp-daemon", "dist", "cli.js"),
|
|
103624
|
+
join60("runtime", "lsp-daemon", "dist", "index.js"),
|
|
103625
|
+
join60("runtime", "lsp-daemon", "dist", "index.d.ts"),
|
|
103626
|
+
join60("runtime", "lsp-daemon", "dist", "daemon-client.js"),
|
|
103627
|
+
join60("runtime", "lsp-daemon", "dist", "daemon-client.d.ts"),
|
|
103628
|
+
join60("runtime", "lsp-daemon", "dist", "package.json"),
|
|
103629
|
+
join60("runtime", "lsp-daemon", "dist", ".omo-runtime-manifest.json"),
|
|
103630
|
+
join60("scripts", "install.mjs")
|
|
103644
103631
|
];
|
|
103645
103632
|
async function ensurePluginArtifacts(context) {
|
|
103646
103633
|
if (context.allowBuild) {
|
|
103647
|
-
await context.runCommand("node", [
|
|
103648
|
-
await context.runCommand("node", [
|
|
103649
|
-
await context.runCommand("node", [
|
|
103650
|
-
await context.runCommand("node", [
|
|
103651
|
-
await context.runCommand("node", [
|
|
103652
|
-
await context.runCommand("node", [
|
|
103653
|
-
await context.runCommand("node", [
|
|
103654
|
-
await context.runCommand("node", [
|
|
103634
|
+
await context.runCommand("node", [join60(context.pluginPath, "scripts", "build-extension.mjs")], { cwd: context.repoRoot });
|
|
103635
|
+
await context.runCommand("node", [join60("packages", "omo-codex", "plugin", "scripts", "materialize-shared-upstreams.mjs")], { cwd: context.repoRoot });
|
|
103636
|
+
await context.runCommand("node", [join60(context.pluginPath, "scripts", "sync-skills.mjs")], { cwd: context.repoRoot });
|
|
103637
|
+
await context.runCommand("node", [join60(context.pluginPath, "scripts", "build-install.mjs")], { cwd: context.repoRoot });
|
|
103638
|
+
await context.runCommand("node", [join60(context.pluginPath, "scripts", "stage-lsp-daemon-runtime.mjs")], { cwd: context.repoRoot });
|
|
103639
|
+
await context.runCommand("node", [join60(context.pluginPath, "scripts", "stage-ast-grep-mcp-runtime.mjs")], { cwd: context.repoRoot });
|
|
103640
|
+
await context.runCommand("node", [join60(context.pluginPath, "scripts", "stage-agent-toolkit.mjs")], { cwd: context.repoRoot });
|
|
103641
|
+
await context.runCommand("node", [join60(context.pluginPath, "scripts", "stage-x-search-skill.mjs")], { cwd: context.repoRoot });
|
|
103655
103642
|
}
|
|
103656
103643
|
if (await hasMissingPluginArtifact(context.pluginPath)) {
|
|
103657
103644
|
throw new Error(`Packed omo-senpi plugin is missing required runtime artifacts at ${context.pluginPath}`);
|
|
@@ -103660,14 +103647,14 @@ async function ensurePluginArtifacts(context) {
|
|
|
103660
103647
|
}
|
|
103661
103648
|
async function hasMissingPluginArtifact(pluginPath) {
|
|
103662
103649
|
for (const artifact of REQUIRED_PLUGIN_ARTIFACTS) {
|
|
103663
|
-
if (!await fileExists2(
|
|
103650
|
+
if (!await fileExists2(join60(pluginPath, artifact)))
|
|
103664
103651
|
return true;
|
|
103665
103652
|
}
|
|
103666
103653
|
return false;
|
|
103667
103654
|
}
|
|
103668
103655
|
async function verifyAstGrepRuntimeIntegrity(pluginPath, platform) {
|
|
103669
|
-
const runtimeEntry =
|
|
103670
|
-
const manifestPath =
|
|
103656
|
+
const runtimeEntry = join60(pluginPath, "runtime", "ast-grep-mcp", "cli.js");
|
|
103657
|
+
const manifestPath = join60(dirname23(runtimeEntry), "manifest.json");
|
|
103671
103658
|
let runtimeStat;
|
|
103672
103659
|
try {
|
|
103673
103660
|
runtimeStat = await stat6(runtimeEntry);
|
|
@@ -103742,7 +103729,7 @@ async function runSenpiInstaller(options = {}) {
|
|
|
103742
103729
|
const backupPath = await writeSettingsAtomically(context.settingsPath, settings);
|
|
103743
103730
|
installLocalLauncher({
|
|
103744
103731
|
pluginPath: context.pluginPath,
|
|
103745
|
-
senpiCliPath:
|
|
103732
|
+
senpiCliPath: join61(context.repoRoot, "packages", "coding-agent", "dist", "cli.js")
|
|
103746
103733
|
});
|
|
103747
103734
|
return {
|
|
103748
103735
|
ok: true,
|
|
@@ -103759,12 +103746,12 @@ function resolveInstallContext(options) {
|
|
|
103759
103746
|
const allowBuild = options.pluginPath === undefined;
|
|
103760
103747
|
const repoRoot = resolve19(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname24(fileURLToPath(import.meta.url))) : dirname24(resolve19(options.pluginPath))));
|
|
103761
103748
|
const agentDir = resolve19(options.agentDir ?? resolveAgentHome({ env: env2, homeDir: env2.HOME ?? homedir11() }));
|
|
103762
|
-
const pluginPath = resolve19(options.pluginPath ??
|
|
103749
|
+
const pluginPath = resolve19(options.pluginPath ?? join61(repoRoot, "packages", "omo-senpi", "plugin"));
|
|
103763
103750
|
return {
|
|
103764
103751
|
env: env2,
|
|
103765
103752
|
repoRoot,
|
|
103766
103753
|
agentDir,
|
|
103767
|
-
settingsPath:
|
|
103754
|
+
settingsPath: join61(agentDir, "settings.json"),
|
|
103768
103755
|
pluginPath,
|
|
103769
103756
|
platform: options.platform ?? process.platform,
|
|
103770
103757
|
allowBuild,
|
|
@@ -103781,7 +103768,7 @@ async function defaultRunCommand3(command, args, options) {
|
|
|
103781
103768
|
function findRepoRoot2(importerDir) {
|
|
103782
103769
|
let current = importerDir;
|
|
103783
103770
|
for (let depth = 0;depth <= 7; depth += 1) {
|
|
103784
|
-
if (fileExistsSync(
|
|
103771
|
+
if (fileExistsSync(join61(current, "packages", "omo-senpi", "plugin", "package.json")))
|
|
103785
103772
|
return current;
|
|
103786
103773
|
current = resolve19(current, "..");
|
|
103787
103774
|
}
|
|
@@ -103825,19 +103812,19 @@ init_provider_availability();
|
|
|
103825
103812
|
|
|
103826
103813
|
// packages/omo-opencode/src/cli/config-manager/add-tui-plugin-to-tui-config.ts
|
|
103827
103814
|
import { existsSync as existsSync33, mkdirSync as mkdirSync11, readFileSync as readFileSync16 } from "fs";
|
|
103828
|
-
import { join as
|
|
103815
|
+
import { join as join63 } from "path";
|
|
103829
103816
|
|
|
103830
103817
|
// packages/omo-opencode/src/cli/doctor/checks/tui-plugin-config.ts
|
|
103831
103818
|
init_shared();
|
|
103832
103819
|
import { existsSync as existsSync32, readFileSync as readFileSync15 } from "fs";
|
|
103833
|
-
import { join as
|
|
103820
|
+
import { join as join62 } from "path";
|
|
103834
103821
|
var TUI_SUBPATH = "tui";
|
|
103835
103822
|
var TUI_EXPORT_SUBPATH = `./${TUI_SUBPATH}`;
|
|
103836
103823
|
function fileEntryPackageJsonPath(entry) {
|
|
103837
103824
|
let path7 = entry.slice("file:".length);
|
|
103838
103825
|
if (path7.startsWith("//"))
|
|
103839
103826
|
path7 = path7.slice(2);
|
|
103840
|
-
return
|
|
103827
|
+
return join62(path7, "package.json");
|
|
103841
103828
|
}
|
|
103842
103829
|
function packageJsonExportsTui(pkgJsonPath) {
|
|
103843
103830
|
if (!existsSync32(pkgJsonPath))
|
|
@@ -103875,7 +103862,7 @@ function packageExportsTuiForServerEntry(entry) {
|
|
|
103875
103862
|
const packageName = packageNameFromServerEntry(entry);
|
|
103876
103863
|
if (packageName === null)
|
|
103877
103864
|
return null;
|
|
103878
|
-
return packageJsonExportsTui(
|
|
103865
|
+
return packageJsonExportsTui(join62(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));
|
|
103879
103866
|
}
|
|
103880
103867
|
function isOurFilePluginEntry(entry) {
|
|
103881
103868
|
if (typeof entry !== "string" || !entry.startsWith("file:"))
|
|
@@ -103940,7 +103927,7 @@ function detectServerPluginRegistration() {
|
|
|
103940
103927
|
}
|
|
103941
103928
|
}
|
|
103942
103929
|
function detectTuiPluginRegistration() {
|
|
103943
|
-
const tuiJsonPath =
|
|
103930
|
+
const tuiJsonPath = join62(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");
|
|
103944
103931
|
if (!existsSync32(tuiJsonPath)) {
|
|
103945
103932
|
return {
|
|
103946
103933
|
registered: false,
|
|
@@ -104096,10 +104083,10 @@ function readConfig(path7) {
|
|
|
104096
104083
|
return null;
|
|
104097
104084
|
}
|
|
104098
104085
|
function readServerConfig(configDir) {
|
|
104099
|
-
const jsoncPath =
|
|
104086
|
+
const jsoncPath = join63(configDir, "opencode.jsonc");
|
|
104100
104087
|
if (existsSync33(jsoncPath))
|
|
104101
104088
|
return readConfig(jsoncPath);
|
|
104102
|
-
const jsonPath =
|
|
104089
|
+
const jsonPath = join63(configDir, "opencode.json");
|
|
104103
104090
|
if (existsSync33(jsonPath))
|
|
104104
104091
|
return readConfig(jsonPath);
|
|
104105
104092
|
return null;
|
|
@@ -104141,7 +104128,7 @@ function ensureTuiPluginEntry(opts = {}) {
|
|
|
104141
104128
|
if (!desiredEntry) {
|
|
104142
104129
|
return { changed: false, reason: "no-server-entry" };
|
|
104143
104130
|
}
|
|
104144
|
-
const tuiJsonPath =
|
|
104131
|
+
const tuiJsonPath = join63(configDir, "tui.json");
|
|
104145
104132
|
const { config: config3, malformed } = readTuiConfig(tuiJsonPath);
|
|
104146
104133
|
if (malformed) {
|
|
104147
104134
|
return { changed: false, reason: "malformed" };
|
|
@@ -104157,7 +104144,7 @@ function ensureTuiPluginEntry(opts = {}) {
|
|
|
104157
104144
|
|
|
104158
104145
|
// packages/omo-opencode/src/cli/install-ast-grep-sg.ts
|
|
104159
104146
|
import { homedir as homedir12 } from "os";
|
|
104160
|
-
import { join as
|
|
104147
|
+
import { join as join64 } from "path";
|
|
104161
104148
|
|
|
104162
104149
|
// packages/shared-skills/index.mjs
|
|
104163
104150
|
import { existsSync as existsSync34 } from "fs";
|
|
@@ -104179,9 +104166,9 @@ function describeResult2(result) {
|
|
|
104179
104166
|
}
|
|
104180
104167
|
async function installAstGrepForOpenCode(options = {}) {
|
|
104181
104168
|
const platform = options.platform ?? process.platform;
|
|
104182
|
-
const baseDir =
|
|
104169
|
+
const baseDir = join64(options.homeDir ?? homedir12(), ".omo");
|
|
104183
104170
|
const targetDir = astGrepRuntimeDir(baseDir, platform, options.arch ?? process.arch);
|
|
104184
|
-
const skillDir =
|
|
104171
|
+
const skillDir = join64(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");
|
|
104185
104172
|
const installer = options.installer ?? runAstGrepSkillInstall;
|
|
104186
104173
|
try {
|
|
104187
104174
|
const result = await installer({ platform, skillDir, targetDir });
|
|
@@ -104299,6 +104286,7 @@ async function runCliInstaller(args, version3) {
|
|
|
104299
104286
|
return 1;
|
|
104300
104287
|
}
|
|
104301
104288
|
printWarning(`Codex install failed (OpenCode install is still complete): ${message}`);
|
|
104289
|
+
printInfo(`The Codex harness is NOT installed. Fix the error above, then re-run: ${import_picocolors3.default.cyan("bunx oh-my-openagent install --platform=codex")}`);
|
|
104302
104290
|
}
|
|
104303
104291
|
console.log();
|
|
104304
104292
|
}
|
|
@@ -105771,6 +105759,7 @@ async function runTuiInstaller(args, version3) {
|
|
|
105771
105759
|
return 1;
|
|
105772
105760
|
}
|
|
105773
105761
|
log4.warn(`Codex install failed (OpenCode install remains successful): ${message}`);
|
|
105762
|
+
log4.info("The Codex harness is NOT installed. Fix the error above, then re-run: bunx oh-my-openagent install --platform=codex");
|
|
105774
105763
|
}
|
|
105775
105764
|
}
|
|
105776
105765
|
if (config3.hasSenpi) {
|
|
@@ -108400,9 +108389,9 @@ function readCurrentTopLevelTask(planPath) {
|
|
|
108400
108389
|
}
|
|
108401
108390
|
// packages/boulder-state/src/storage/path.ts
|
|
108402
108391
|
import { existsSync as existsSync36 } from "fs";
|
|
108403
|
-
import { isAbsolute as isAbsolute12, join as
|
|
108392
|
+
import { isAbsolute as isAbsolute12, join as join65, relative as relative8, resolve as resolve20 } from "path";
|
|
108404
108393
|
function getBoulderFilePath(directory) {
|
|
108405
|
-
return
|
|
108394
|
+
return join65(directory, BOULDER_DIR, BOULDER_FILE);
|
|
108406
108395
|
}
|
|
108407
108396
|
function resolveTrackedPath(baseDirectory, trackedPath) {
|
|
108408
108397
|
return isAbsolute12(trackedPath) ? resolve20(trackedPath) : resolve20(baseDirectory, trackedPath);
|
|
@@ -108585,9 +108574,9 @@ init_state();
|
|
|
108585
108574
|
var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
|
|
108586
108575
|
// packages/omo-opencode/src/features/run-continuation-state/storage.ts
|
|
108587
108576
|
import { existsSync as existsSync39, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync3, writeFileSync as writeFileSync7 } from "fs";
|
|
108588
|
-
import { join as
|
|
108577
|
+
import { join as join66 } from "path";
|
|
108589
108578
|
function getMarkerPath(directory, sessionID) {
|
|
108590
|
-
return
|
|
108579
|
+
return join66(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
|
|
108591
108580
|
}
|
|
108592
108581
|
function readContinuationMarker(directory, sessionID) {
|
|
108593
108582
|
const markerPath = getMarkerPath(directory, sessionID);
|
|
@@ -108660,7 +108649,7 @@ async function isSessionInBoulderLineage(input) {
|
|
|
108660
108649
|
init_shared();
|
|
108661
108650
|
init_compaction_marker();
|
|
108662
108651
|
import { readFileSync as readFileSync21, readdirSync as readdirSync8 } from "fs";
|
|
108663
|
-
import { join as
|
|
108652
|
+
import { join as join67 } from "path";
|
|
108664
108653
|
var defaultSessionLastAgentDeps = {
|
|
108665
108654
|
getMessageDir,
|
|
108666
108655
|
isSqliteBackend,
|
|
@@ -108720,7 +108709,7 @@ async function getLastAgentFromSession(sessionID, client3, deps = {}) {
|
|
|
108720
108709
|
try {
|
|
108721
108710
|
const messages = readdirSync8(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {
|
|
108722
108711
|
try {
|
|
108723
|
-
const content = readFileSync21(
|
|
108712
|
+
const content = readFileSync21(join67(messageDir, fileName), "utf-8");
|
|
108724
108713
|
const parsed = JSON.parse(content);
|
|
108725
108714
|
return {
|
|
108726
108715
|
fileName,
|
|
@@ -108764,7 +108753,7 @@ init_agent_display_names();
|
|
|
108764
108753
|
// packages/omo-opencode/src/hooks/ralph-loop/storage.ts
|
|
108765
108754
|
init_frontmatter2();
|
|
108766
108755
|
import { existsSync as existsSync40, readFileSync as readFileSync22, writeFileSync as writeFileSync8, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "fs";
|
|
108767
|
-
import { dirname as dirname26, join as
|
|
108756
|
+
import { dirname as dirname26, join as join68 } from "path";
|
|
108768
108757
|
|
|
108769
108758
|
// packages/omo-opencode/src/hooks/ralph-loop/constants.ts
|
|
108770
108759
|
var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
|
|
@@ -108773,7 +108762,7 @@ var DEFAULT_COMPLETION_PROMISE = "DONE";
|
|
|
108773
108762
|
|
|
108774
108763
|
// packages/omo-opencode/src/hooks/ralph-loop/storage.ts
|
|
108775
108764
|
function getStateFilePath(directory, customPath) {
|
|
108776
|
-
return customPath ?
|
|
108765
|
+
return customPath ? join68(directory, customPath) : join68(directory, DEFAULT_STATE_FILE);
|
|
108777
108766
|
}
|
|
108778
108767
|
function readState(directory, customPath) {
|
|
108779
108768
|
const filePath = getStateFilePath(directory, customPath);
|
|
@@ -109880,7 +109869,7 @@ init_extract_semver();
|
|
|
109880
109869
|
init_bun_which_shim();
|
|
109881
109870
|
import { existsSync as existsSync48, accessSync as accessSync4, constants as constants12 } from "fs";
|
|
109882
109871
|
import { homedir as homedir15 } from "os";
|
|
109883
|
-
import { join as
|
|
109872
|
+
import { join as join75 } from "path";
|
|
109884
109873
|
|
|
109885
109874
|
// packages/omo-opencode/src/cli/doctor/framework/spawn-with-timeout.ts
|
|
109886
109875
|
init_spawn_with_windows_hide();
|
|
@@ -109972,17 +109961,17 @@ function getDesktopAppPaths(platform) {
|
|
|
109972
109961
|
case "darwin":
|
|
109973
109962
|
return [
|
|
109974
109963
|
"/Applications/OpenCode.app/Contents/MacOS/OpenCode",
|
|
109975
|
-
|
|
109964
|
+
join75(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
|
|
109976
109965
|
];
|
|
109977
109966
|
case "win32": {
|
|
109978
109967
|
const programFiles = process.env.ProgramFiles;
|
|
109979
109968
|
const localAppData = process.env.LOCALAPPDATA;
|
|
109980
109969
|
const paths2 = [];
|
|
109981
109970
|
if (programFiles) {
|
|
109982
|
-
paths2.push(
|
|
109971
|
+
paths2.push(join75(programFiles, "OpenCode", "OpenCode.exe"));
|
|
109983
109972
|
}
|
|
109984
109973
|
if (localAppData) {
|
|
109985
|
-
paths2.push(
|
|
109974
|
+
paths2.push(join75(localAppData, "OpenCode", "OpenCode.exe"));
|
|
109986
109975
|
}
|
|
109987
109976
|
return paths2;
|
|
109988
109977
|
}
|
|
@@ -109990,8 +109979,8 @@ function getDesktopAppPaths(platform) {
|
|
|
109990
109979
|
return [
|
|
109991
109980
|
"/usr/bin/opencode",
|
|
109992
109981
|
"/usr/lib/opencode/opencode",
|
|
109993
|
-
|
|
109994
|
-
|
|
109982
|
+
join75(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
|
|
109983
|
+
join75(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
|
|
109995
109984
|
];
|
|
109996
109985
|
default:
|
|
109997
109986
|
return [];
|
|
@@ -110023,7 +110012,7 @@ async function findOpenCodeBinary(platform = process.platform, checkExists = exi
|
|
|
110023
110012
|
const candidates = getCommandCandidates2(platform);
|
|
110024
110013
|
for (const entry of pathEnv.split(delimiter3).filter(Boolean)) {
|
|
110025
110014
|
for (const command of candidates) {
|
|
110026
|
-
const fullPath =
|
|
110015
|
+
const fullPath = join75(entry, command);
|
|
110027
110016
|
if (checkExists(fullPath) && isExecutable2(fullPath)) {
|
|
110028
110017
|
return { binary: command, path: fullPath };
|
|
110029
110018
|
}
|
|
@@ -110167,22 +110156,22 @@ init_package_json_locator();
|
|
|
110167
110156
|
import { existsSync as existsSync50, readFileSync as readFileSync31, readdirSync as readdirSync10 } from "fs";
|
|
110168
110157
|
import { createRequire } from "module";
|
|
110169
110158
|
import { homedir as homedir16 } from "os";
|
|
110170
|
-
import { join as
|
|
110159
|
+
import { join as join76 } from "path";
|
|
110171
110160
|
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
110172
110161
|
init_shared();
|
|
110173
110162
|
function getPlatformDefaultCacheDir(platform = process.platform) {
|
|
110174
110163
|
if (platform === "darwin")
|
|
110175
|
-
return
|
|
110164
|
+
return join76(homedir16(), "Library", "Caches");
|
|
110176
110165
|
if (platform === "win32")
|
|
110177
|
-
return process.env.LOCALAPPDATA ??
|
|
110178
|
-
return
|
|
110166
|
+
return process.env.LOCALAPPDATA ?? join76(homedir16(), "AppData", "Local");
|
|
110167
|
+
return join76(homedir16(), ".cache");
|
|
110179
110168
|
}
|
|
110180
110169
|
function resolveOpenCodeCacheDir() {
|
|
110181
110170
|
const xdgCacheHome = process.env.XDG_CACHE_HOME;
|
|
110182
110171
|
if (xdgCacheHome)
|
|
110183
|
-
return
|
|
110172
|
+
return join76(xdgCacheHome, "opencode");
|
|
110184
110173
|
const fromShared = getOpenCodeCacheDir();
|
|
110185
|
-
const platformDefault =
|
|
110174
|
+
const platformDefault = join76(getPlatformDefaultCacheDir(), "opencode");
|
|
110186
110175
|
if (existsSync50(fromShared) || !existsSync50(platformDefault))
|
|
110187
110176
|
return fromShared;
|
|
110188
110177
|
return platformDefault;
|
|
@@ -110214,11 +110203,11 @@ function normalizeVersion(value) {
|
|
|
110214
110203
|
function createPackageCandidates(rootDir) {
|
|
110215
110204
|
return ACCEPTED_PACKAGE_NAMES.map((packageName) => ({
|
|
110216
110205
|
packageName,
|
|
110217
|
-
installedPackagePath:
|
|
110206
|
+
installedPackagePath: join76(rootDir, "node_modules", packageName, "package.json")
|
|
110218
110207
|
}));
|
|
110219
110208
|
}
|
|
110220
110209
|
function createTaggedInstallCandidates(rootDir) {
|
|
110221
|
-
const packagesDir =
|
|
110210
|
+
const packagesDir = join76(rootDir, "packages");
|
|
110222
110211
|
if (!existsSync50(packagesDir))
|
|
110223
110212
|
return [];
|
|
110224
110213
|
const candidates = [];
|
|
@@ -110226,14 +110215,14 @@ function createTaggedInstallCandidates(rootDir) {
|
|
|
110226
110215
|
const packageName = ACCEPTED_PACKAGE_NAMES.find((name) => entryName.startsWith(`${name}@`));
|
|
110227
110216
|
if (packageName === undefined)
|
|
110228
110217
|
continue;
|
|
110229
|
-
const installDir =
|
|
110218
|
+
const installDir = join76(packagesDir, entryName);
|
|
110230
110219
|
candidates.push({
|
|
110231
110220
|
cacheDir: installDir,
|
|
110232
|
-
cachePackagePath:
|
|
110221
|
+
cachePackagePath: join76(installDir, "package.json"),
|
|
110233
110222
|
packageCandidates: [
|
|
110234
110223
|
{
|
|
110235
110224
|
packageName,
|
|
110236
|
-
installedPackagePath:
|
|
110225
|
+
installedPackagePath: join76(installDir, "node_modules", packageName, "package.json")
|
|
110237
110226
|
}
|
|
110238
110227
|
]
|
|
110239
110228
|
});
|
|
@@ -110278,13 +110267,13 @@ function getLoadedPluginVersion() {
|
|
|
110278
110267
|
const candidates = [
|
|
110279
110268
|
{
|
|
110280
110269
|
cacheDir: configDir,
|
|
110281
|
-
cachePackagePath:
|
|
110270
|
+
cachePackagePath: join76(configDir, "package.json"),
|
|
110282
110271
|
packageCandidates: createPackageCandidates(configDir)
|
|
110283
110272
|
},
|
|
110284
110273
|
...createTaggedInstallCandidates(configDir),
|
|
110285
110274
|
{
|
|
110286
110275
|
cacheDir,
|
|
110287
|
-
cachePackagePath:
|
|
110276
|
+
cachePackagePath: join76(cacheDir, "package.json"),
|
|
110288
110277
|
packageCandidates: createPackageCandidates(cacheDir)
|
|
110289
110278
|
},
|
|
110290
110279
|
...createTaggedInstallCandidates(cacheDir)
|
|
@@ -110478,18 +110467,18 @@ async function checkSystem(deps = defaultDeps6) {
|
|
|
110478
110467
|
init_shared();
|
|
110479
110468
|
import { existsSync as existsSync52, readFileSync as readFileSync33 } from "fs";
|
|
110480
110469
|
import { homedir as homedir17 } from "os";
|
|
110481
|
-
import { join as
|
|
110470
|
+
import { join as join77 } from "path";
|
|
110482
110471
|
function getUserConfigDir2() {
|
|
110483
110472
|
const xdgConfig = process.env.XDG_CONFIG_HOME;
|
|
110484
110473
|
if (xdgConfig)
|
|
110485
|
-
return
|
|
110486
|
-
return
|
|
110474
|
+
return join77(xdgConfig, "opencode");
|
|
110475
|
+
return join77(homedir17(), ".config", "opencode");
|
|
110487
110476
|
}
|
|
110488
110477
|
function loadCustomProviderNames() {
|
|
110489
110478
|
const configDir = getUserConfigDir2();
|
|
110490
110479
|
const candidatePaths = [
|
|
110491
|
-
|
|
110492
|
-
|
|
110480
|
+
join77(configDir, "opencode.json"),
|
|
110481
|
+
join77(configDir, "opencode.jsonc")
|
|
110493
110482
|
];
|
|
110494
110483
|
for (const configPath of candidatePaths) {
|
|
110495
110484
|
if (!existsSync52(configPath))
|
|
@@ -110510,7 +110499,7 @@ function loadCustomProviderNames() {
|
|
|
110510
110499
|
return [];
|
|
110511
110500
|
}
|
|
110512
110501
|
function loadAvailableModelsFromCache() {
|
|
110513
|
-
const cacheFile =
|
|
110502
|
+
const cacheFile = join77(getOpenCodeCacheDir(), "models.json");
|
|
110514
110503
|
const customProviders = loadCustomProviderNames();
|
|
110515
110504
|
if (!existsSync52(cacheFile)) {
|
|
110516
110505
|
if (customProviders.length > 0) {
|
|
@@ -110572,7 +110561,7 @@ function loadOmoConfig2() {
|
|
|
110572
110561
|
|
|
110573
110562
|
// packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
|
|
110574
110563
|
init_shared();
|
|
110575
|
-
import { join as
|
|
110564
|
+
import { join as join78 } from "path";
|
|
110576
110565
|
|
|
110577
110566
|
// packages/omo-opencode/src/cli/doctor/checks/model-resolution-variant.ts
|
|
110578
110567
|
function formatModelWithVariant(model, variant) {
|
|
@@ -110614,7 +110603,7 @@ function formatCapabilityResolutionLabel(mode2) {
|
|
|
110614
110603
|
}
|
|
110615
110604
|
function buildModelResolutionDetails(options) {
|
|
110616
110605
|
const details = [];
|
|
110617
|
-
const cacheFile =
|
|
110606
|
+
const cacheFile = join78(getOpenCodeCacheDir(), "models.json");
|
|
110618
110607
|
details.push("\u2550\u2550\u2550 Available Models (from cache) \u2550\u2550\u2550");
|
|
110619
110608
|
details.push("");
|
|
110620
110609
|
if (options.available.cacheExists) {
|
|
@@ -110924,7 +110913,7 @@ async function checkConfig() {
|
|
|
110924
110913
|
// packages/omo-opencode/src/cli/doctor/checks/deprecated-reasoning-keys.ts
|
|
110925
110914
|
init_main();
|
|
110926
110915
|
import { existsSync as existsSync53, readFileSync as readFileSync34 } from "fs";
|
|
110927
|
-
import { join as
|
|
110916
|
+
import { join as join79 } from "path";
|
|
110928
110917
|
var CANONICAL_REPLACEMENT = new Map([
|
|
110929
110918
|
["variant", "reasoning"],
|
|
110930
110919
|
["reasoningEffort", "reasoning"],
|
|
@@ -110979,7 +110968,7 @@ function userConfigPaths() {
|
|
|
110979
110968
|
const home = process.env.HOME ?? process.env.USERPROFILE;
|
|
110980
110969
|
if (home === undefined || home.length === 0)
|
|
110981
110970
|
return [];
|
|
110982
|
-
return [
|
|
110971
|
+
return [join79(home, ".omo", "omo.jsonc"), join79(home, ".omo", "omo.json")];
|
|
110983
110972
|
}
|
|
110984
110973
|
async function checkDeprecatedReasoningKeys() {
|
|
110985
110974
|
const issues = [];
|
|
@@ -111005,25 +110994,25 @@ init_src();
|
|
|
111005
110994
|
import { existsSync as existsSync54 } from "fs";
|
|
111006
110995
|
import { createRequire as createRequire2 } from "module";
|
|
111007
110996
|
import { homedir as homedir19 } from "os";
|
|
111008
|
-
import { dirname as dirname31, join as
|
|
110997
|
+
import { dirname as dirname31, join as join81 } from "path";
|
|
111009
110998
|
|
|
111010
110999
|
// packages/omo-opencode/src/hooks/comment-checker/downloader.ts
|
|
111011
|
-
import { join as
|
|
111000
|
+
import { join as join80 } from "path";
|
|
111012
111001
|
import { homedir as homedir18, tmpdir as tmpdir4 } from "os";
|
|
111013
111002
|
init_binary_downloader();
|
|
111014
111003
|
init_logger2();
|
|
111015
111004
|
init_plugin_identity();
|
|
111016
111005
|
var DEBUG = process.env.COMMENT_CHECKER_DEBUG === "1";
|
|
111017
|
-
var DEBUG_FILE =
|
|
111006
|
+
var DEBUG_FILE = join80(tmpdir4(), "comment-checker-debug.log");
|
|
111018
111007
|
function getCacheDir2() {
|
|
111019
111008
|
if (process.platform === "win32") {
|
|
111020
111009
|
const localAppData = process.env.LOCALAPPDATA || process.env.APPDATA;
|
|
111021
|
-
const base2 = localAppData ||
|
|
111022
|
-
return
|
|
111010
|
+
const base2 = localAppData || join80(homedir18(), "AppData", "Local");
|
|
111011
|
+
return join80(base2, CACHE_DIR_NAME, "bin");
|
|
111023
111012
|
}
|
|
111024
111013
|
const xdgCache = process.env.XDG_CACHE_HOME;
|
|
111025
|
-
const base = xdgCache ||
|
|
111026
|
-
return
|
|
111014
|
+
const base = xdgCache || join80(homedir18(), ".cache");
|
|
111015
|
+
return join80(base, CACHE_DIR_NAME, "bin");
|
|
111027
111016
|
}
|
|
111028
111017
|
function getBinaryName() {
|
|
111029
111018
|
return process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
|
|
@@ -111073,7 +111062,7 @@ async function getBinaryVersion(binary) {
|
|
|
111073
111062
|
}
|
|
111074
111063
|
}
|
|
111075
111064
|
async function checkAstGrepCli() {
|
|
111076
|
-
const runtimeDir = astGrepRuntimeDir(
|
|
111065
|
+
const runtimeDir = astGrepRuntimeDir(join81(homedir19(), ".omo"));
|
|
111077
111066
|
const sgPath = findSgBinarySync({ runtimeDir });
|
|
111078
111067
|
if (sgPath === null) {
|
|
111079
111068
|
return {
|
|
@@ -111103,10 +111092,10 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
|
|
|
111103
111092
|
const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
|
|
111104
111093
|
try {
|
|
111105
111094
|
const packageDir = baseDirOverride ?? dirname31(resolvePackageJsonPath());
|
|
111106
|
-
const vendorPath =
|
|
111095
|
+
const vendorPath = join81(packageDir, "vendor", platformKey, binaryName);
|
|
111107
111096
|
if (existsSync54(vendorPath))
|
|
111108
111097
|
return vendorPath;
|
|
111109
|
-
const binPath =
|
|
111098
|
+
const binPath = join81(packageDir, "bin", binaryName);
|
|
111110
111099
|
if (existsSync54(binPath))
|
|
111111
111100
|
return binPath;
|
|
111112
111101
|
} catch (error51) {
|
|
@@ -111482,13 +111471,13 @@ function getInstalledLspServers(options = {}) {
|
|
|
111482
111471
|
init_shared();
|
|
111483
111472
|
import { existsSync as existsSync56, readFileSync as readFileSync36 } from "fs";
|
|
111484
111473
|
import { homedir as homedir20 } from "os";
|
|
111485
|
-
import { join as
|
|
111474
|
+
import { join as join82 } from "path";
|
|
111486
111475
|
var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
|
|
111487
111476
|
function getMcpConfigPaths() {
|
|
111488
111477
|
return [
|
|
111489
|
-
|
|
111490
|
-
|
|
111491
|
-
|
|
111478
|
+
join82(homedir20(), ".claude", ".mcp.json"),
|
|
111479
|
+
join82(process.cwd(), ".mcp.json"),
|
|
111480
|
+
join82(process.cwd(), ".claude", ".mcp.json")
|
|
111492
111481
|
];
|
|
111493
111482
|
}
|
|
111494
111483
|
function loadUserMcpConfig() {
|
|
@@ -111770,7 +111759,7 @@ init_src();
|
|
|
111770
111759
|
import { existsSync as existsSync58 } from "fs";
|
|
111771
111760
|
import { lstat as lstat15, readdir as readdir14, readFile as readFile27 } from "fs/promises";
|
|
111772
111761
|
import { homedir as homedir22 } from "os";
|
|
111773
|
-
import { basename as basename10, join as
|
|
111762
|
+
import { basename as basename10, join as join83, resolve as resolve23 } from "path";
|
|
111774
111763
|
// packages/omo-opencode/package.json
|
|
111775
111764
|
var package_default3 = {
|
|
111776
111765
|
name: "@oh-my-opencode/omo-opencode",
|
|
@@ -111836,13 +111825,13 @@ var CODEX_BIN_NAMES = [
|
|
|
111836
111825
|
"omo-git-bash-hook"
|
|
111837
111826
|
];
|
|
111838
111827
|
async function gatherCodexSummary(deps = {}) {
|
|
111839
|
-
const codexHome = resolve23(deps.codexHome ?? process.env.CODEX_HOME ??
|
|
111828
|
+
const codexHome = resolve23(deps.codexHome ?? process.env.CODEX_HOME ?? join83(homedir22(), ".codex"));
|
|
111840
111829
|
const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
|
|
111841
111830
|
const detection = await (deps.detectCodexInstallation ?? detectCodexInstallation)();
|
|
111842
111831
|
const pluginRoot = await resolveInstalledPluginRoot(codexHome);
|
|
111843
|
-
const manifest = pluginRoot === null ? null : await readJson(
|
|
111844
|
-
const installSnapshot = pluginRoot === null ? null : await readJson(
|
|
111845
|
-
const configPath =
|
|
111832
|
+
const manifest = pluginRoot === null ? null : await readJson(join83(pluginRoot, ".codex-plugin", "plugin.json"));
|
|
111833
|
+
const installSnapshot = pluginRoot === null ? null : await readJson(join83(pluginRoot, "lazycodex-install.json"));
|
|
111834
|
+
const configPath = join83(codexHome, "config.toml");
|
|
111846
111835
|
const pluginVersion = stringField(manifest, "version");
|
|
111847
111836
|
return {
|
|
111848
111837
|
codexPath: detection.found && "path" in detection ? detection.path : null,
|
|
@@ -111899,7 +111888,7 @@ function buildCodexIssues(summary) {
|
|
|
111899
111888
|
if (summary.pluginRoot === null) {
|
|
111900
111889
|
issues.push({
|
|
111901
111890
|
title: "OMO Codex plugin is not installed",
|
|
111902
|
-
description: `Expected cached plugin at ${
|
|
111891
|
+
description: `Expected cached plugin at ${join83("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
|
|
111903
111892
|
fix: "Run: npx lazycodex-ai install",
|
|
111904
111893
|
severity: "error",
|
|
111905
111894
|
affects: ["plugin loading"]
|
|
@@ -111964,12 +111953,12 @@ function buildCodexIssues(summary) {
|
|
|
111964
111953
|
return issues;
|
|
111965
111954
|
}
|
|
111966
111955
|
async function resolveInstalledPluginRoot(codexHome) {
|
|
111967
|
-
const pluginRoot =
|
|
111956
|
+
const pluginRoot = join83(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
|
|
111968
111957
|
if (!existsSync58(pluginRoot))
|
|
111969
111958
|
return null;
|
|
111970
111959
|
const versions2 = await readdir14(pluginRoot, { withFileTypes: true });
|
|
111971
111960
|
const candidates = versions2.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);
|
|
111972
|
-
return candidates.length === 0 ? null :
|
|
111961
|
+
return candidates.length === 0 ? null : join83(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
|
|
111973
111962
|
}
|
|
111974
111963
|
async function readCodexConfigSummary(configPath) {
|
|
111975
111964
|
if (!existsSync58(configPath)) {
|
|
@@ -111997,13 +111986,13 @@ async function readCodexConfigSummary(configPath) {
|
|
|
111997
111986
|
async function readLinkedBins(binDir) {
|
|
111998
111987
|
const linked = [];
|
|
111999
111988
|
for (const name of CODEX_BIN_NAMES) {
|
|
112000
|
-
if (await pathExists2(
|
|
111989
|
+
if (await pathExists2(join83(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
|
|
112001
111990
|
linked.push(name);
|
|
112002
111991
|
}
|
|
112003
111992
|
return linked;
|
|
112004
111993
|
}
|
|
112005
111994
|
async function readLinkedAgents(codexHome) {
|
|
112006
|
-
const agentsDir =
|
|
111995
|
+
const agentsDir = join83(codexHome, "agents");
|
|
112007
111996
|
if (!existsSync58(agentsDir))
|
|
112008
111997
|
return [];
|
|
112009
111998
|
const entries = await readdir14(agentsDir, { withFileTypes: true });
|
|
@@ -112119,7 +112108,7 @@ async function pathExists2(path15) {
|
|
|
112119
112108
|
init_src();
|
|
112120
112109
|
import { readdir as readdir15, readFile as readFile28, stat as stat7 } from "fs/promises";
|
|
112121
112110
|
import { homedir as homedir23 } from "os";
|
|
112122
|
-
import { dirname as dirname33, isAbsolute as isAbsolute13, join as
|
|
112111
|
+
import { dirname as dirname33, isAbsolute as isAbsolute13, join as join84, relative as relative9, resolve as resolve24, sep as sep9 } from "path";
|
|
112123
112112
|
var CODEX_COMPONENTS_CHECK_ID = "codex-components";
|
|
112124
112113
|
var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
|
|
112125
112114
|
var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
|
|
@@ -112129,7 +112118,7 @@ async function checkCodexComponents(deps = {}) {
|
|
|
112129
112118
|
const env2 = deps.env ?? process.env;
|
|
112130
112119
|
const platform = deps.platform ?? process.platform;
|
|
112131
112120
|
const arch = deps.arch ?? process.arch;
|
|
112132
|
-
const codexHome = resolve24(deps.codexHome ?? env2["CODEX_HOME"] ??
|
|
112121
|
+
const codexHome = resolve24(deps.codexHome ?? env2["CODEX_HOME"] ?? join84(homedir23(), ".codex"));
|
|
112133
112122
|
const summary = await gatherCodexSummary({ ...deps, codexHome });
|
|
112134
112123
|
if (summary.pluginRoot === null) {
|
|
112135
112124
|
return {
|
|
@@ -112154,7 +112143,7 @@ async function checkCodexComponents(deps = {}) {
|
|
|
112154
112143
|
});
|
|
112155
112144
|
}
|
|
112156
112145
|
const runtimeSgDir = runtimeSgDirectory(codexHome, platform, arch);
|
|
112157
|
-
const runtimeSgPath =
|
|
112146
|
+
const runtimeSgPath = join84(runtimeSgDir, sgBinaryName(platform));
|
|
112158
112147
|
const sg = findSgBinarySync({
|
|
112159
112148
|
arch,
|
|
112160
112149
|
env: env2,
|
|
@@ -112266,7 +112255,7 @@ async function findManifestPaths(root, manifestName) {
|
|
|
112266
112255
|
for (const entry of entries) {
|
|
112267
112256
|
if (entry.name === "node_modules" || entry.name === ".git")
|
|
112268
112257
|
continue;
|
|
112269
|
-
const entryPath =
|
|
112258
|
+
const entryPath = join84(root, entry.name);
|
|
112270
112259
|
if (entry.isDirectory()) {
|
|
112271
112260
|
paths3.push(...await findManifestPaths(entryPath, manifestName));
|
|
112272
112261
|
continue;
|
|
@@ -112310,18 +112299,18 @@ function isPluginRuntimePathArg(arg) {
|
|
|
112310
112299
|
return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute13(arg));
|
|
112311
112300
|
}
|
|
112312
112301
|
function runtimeSgDirectory(codexHome, platform, arch) {
|
|
112313
|
-
return
|
|
112302
|
+
return join84(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
|
|
112314
112303
|
}
|
|
112315
112304
|
function describeSgSource(sgPath, env2, runtimeSgDir, platform) {
|
|
112316
112305
|
const override = env2[SG_PATH_ENV_KEY]?.trim();
|
|
112317
112306
|
if (override !== undefined && override.length > 0 && sgPath === override)
|
|
112318
112307
|
return `env override ${SG_PATH_ENV_KEY}`;
|
|
112319
|
-
if (sgPath ===
|
|
112308
|
+
if (sgPath === join84(runtimeSgDir, sgBinaryName(platform)))
|
|
112320
112309
|
return "runtime dir";
|
|
112321
112310
|
return "PATH";
|
|
112322
112311
|
}
|
|
112323
112312
|
async function readBootstrapStateSummary(codexHome) {
|
|
112324
|
-
const statePath =
|
|
112313
|
+
const statePath = join84(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
|
|
112325
112314
|
const raw = await readJson2(statePath);
|
|
112326
112315
|
if (raw === null)
|
|
112327
112316
|
return null;
|
|
@@ -112400,16 +112389,16 @@ function isRecord14(value) {
|
|
|
112400
112389
|
import { existsSync as existsSync59 } from "fs";
|
|
112401
112390
|
import { readFile as readFile29 } from "fs/promises";
|
|
112402
112391
|
import { homedir as homedir24 } from "os";
|
|
112403
|
-
import { join as
|
|
112392
|
+
import { join as join85, resolve as resolve25 } from "path";
|
|
112404
112393
|
var RUNTIME_WRAPPER_MARKER2 = "OMO_GENERATED_RUNTIME_WRAPPER";
|
|
112405
112394
|
var CHECK_NAME = "codex-runtime-wrapper";
|
|
112406
112395
|
var REINSTALL_COMMAND = "npx --yes lazycodex-ai@latest install --no-tui";
|
|
112407
112396
|
async function checkCodexRuntimeWrapper(deps = {}) {
|
|
112408
|
-
const codexHome = resolve25(deps.codexHome ?? process.env.CODEX_HOME ??
|
|
112397
|
+
const codexHome = resolve25(deps.codexHome ?? process.env.CODEX_HOME ?? join85(homedir24(), ".codex"));
|
|
112409
112398
|
const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
|
|
112410
112399
|
const platform = deps.platform ?? process.platform;
|
|
112411
|
-
const wrapperPath =
|
|
112412
|
-
const legacyWrapperPath =
|
|
112400
|
+
const wrapperPath = join85(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
|
|
112401
|
+
const legacyWrapperPath = join85(binDir, platform === "win32" ? "omo.cmd" : "omo");
|
|
112413
112402
|
const [wrapper, legacyWrapper] = await Promise.all([readRuntimeWrapper(wrapperPath), readRuntimeWrapper(legacyWrapperPath)]);
|
|
112414
112403
|
const issues = [];
|
|
112415
112404
|
if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {
|
|
@@ -112937,12 +112926,12 @@ import {
|
|
|
112937
112926
|
unlinkSync as unlinkSync9,
|
|
112938
112927
|
writeFileSync as writeFileSync12
|
|
112939
112928
|
} from "fs";
|
|
112940
|
-
import { basename as basename11, dirname as dirname34, join as
|
|
112929
|
+
import { basename as basename11, dirname as dirname34, join as join88 } from "path";
|
|
112941
112930
|
|
|
112942
112931
|
// packages/mcp-client-core/src/config-dir.ts
|
|
112943
112932
|
import { existsSync as existsSync60, realpathSync as realpathSync8 } from "fs";
|
|
112944
112933
|
import { homedir as homedir25 } from "os";
|
|
112945
|
-
import { join as
|
|
112934
|
+
import { join as join86, resolve as resolve26 } from "path";
|
|
112946
112935
|
function resolveConfigPath2(pathValue) {
|
|
112947
112936
|
const resolvedPath = resolve26(pathValue);
|
|
112948
112937
|
if (!existsSync60(resolvedPath))
|
|
@@ -112960,13 +112949,13 @@ function getOpenCodeCliConfigDir(env2 = process.env) {
|
|
|
112960
112949
|
if (customConfigDir) {
|
|
112961
112950
|
return resolveConfigPath2(customConfigDir);
|
|
112962
112951
|
}
|
|
112963
|
-
const xdgConfigDir = env2["XDG_CONFIG_HOME"]?.trim() ||
|
|
112964
|
-
return resolveConfigPath2(
|
|
112952
|
+
const xdgConfigDir = env2["XDG_CONFIG_HOME"]?.trim() || join86(homedir25(), ".config");
|
|
112953
|
+
return resolveConfigPath2(join86(xdgConfigDir, "opencode"));
|
|
112965
112954
|
}
|
|
112966
112955
|
|
|
112967
112956
|
// packages/mcp-client-core/src/mcp-oauth/storage-index.ts
|
|
112968
112957
|
import { chmodSync as chmodSync4, existsSync as existsSync61, readFileSync as readFileSync38, renameSync as renameSync6, writeFileSync as writeFileSync11 } from "fs";
|
|
112969
|
-
import { join as
|
|
112958
|
+
import { join as join87 } from "path";
|
|
112970
112959
|
var INDEX_FILE_NAME = "index.json";
|
|
112971
112960
|
function isTokenIndex(value) {
|
|
112972
112961
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
@@ -112974,7 +112963,7 @@ function isTokenIndex(value) {
|
|
|
112974
112963
|
return Object.values(value).every((entry) => typeof entry === "string");
|
|
112975
112964
|
}
|
|
112976
112965
|
function getIndexPath(storageDir) {
|
|
112977
|
-
return
|
|
112966
|
+
return join87(storageDir, INDEX_FILE_NAME);
|
|
112978
112967
|
}
|
|
112979
112968
|
function readTokenIndex(storageDir) {
|
|
112980
112969
|
const indexPath = getIndexPath(storageDir);
|
|
@@ -113018,16 +113007,16 @@ function deleteTokenIndexEntry(storageDir, hash2) {
|
|
|
113018
113007
|
var STORAGE_DIR_NAME = "mcp-oauth";
|
|
113019
113008
|
var LEGACY_STORAGE_FILE_NAME = "mcp-oauth.json";
|
|
113020
113009
|
function getMcpOauthStorageDir() {
|
|
113021
|
-
return
|
|
113010
|
+
return join88(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
|
|
113022
113011
|
}
|
|
113023
113012
|
function getMcpOauthServerHash(serverHost, resource) {
|
|
113024
113013
|
return createHash6("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);
|
|
113025
113014
|
}
|
|
113026
113015
|
function getMcpOauthStoragePath(serverHost, resource) {
|
|
113027
|
-
return
|
|
113016
|
+
return join88(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
|
|
113028
113017
|
}
|
|
113029
113018
|
function getLegacyStoragePath() {
|
|
113030
|
-
return
|
|
113019
|
+
return join88(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
|
|
113031
113020
|
}
|
|
113032
113021
|
function normalizeHost2(serverHost) {
|
|
113033
113022
|
let host = serverHost.trim();
|
|
@@ -113206,7 +113195,7 @@ function listTokensByHost(serverHost) {
|
|
|
113206
113195
|
for (const [hash2, indexedKey] of Object.entries(index)) {
|
|
113207
113196
|
if (!indexedKey.startsWith(prefix))
|
|
113208
113197
|
continue;
|
|
113209
|
-
const indexedToken = readTokenFile(
|
|
113198
|
+
const indexedToken = readTokenFile(join88(getMcpOauthStorageDir(), `${hash2}.json`));
|
|
113210
113199
|
if (indexedToken)
|
|
113211
113200
|
result[indexedKey] = indexedToken;
|
|
113212
113201
|
}
|
|
@@ -113221,7 +113210,7 @@ function listAllTokens() {
|
|
|
113221
113210
|
for (const entry of readdirSync11(dir, { withFileTypes: true })) {
|
|
113222
113211
|
if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
|
|
113223
113212
|
continue;
|
|
113224
|
-
const token = readTokenFile(
|
|
113213
|
+
const token = readTokenFile(join88(dir, entry.name));
|
|
113225
113214
|
const hash2 = basename11(entry.name, ".json");
|
|
113226
113215
|
if (token)
|
|
113227
113216
|
result[index[hash2] ?? hash2] = token;
|