lazycodex-ai 5.0.0-beta.87 → 5.0.0-beta.88
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 +90 -73
- package/dist/cli-node/index.js +90 -73
- package/package.json +1 -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 +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
- 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/post-tool-use-recording-spawn-admission.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-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/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/ambience-skill.md +2 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +30 -7
- package/packages/omo-codex/plugin/skills/frontend/references/design/interaction-skill.md +17 -5
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/shared-skills/skills/frontend/references/design/ambience-skill.md +2 -1
- package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +30 -7
- package/packages/shared-skills/skills/frontend/references/design/interaction-skill.md +17 -5
package/dist/cli/index.js
CHANGED
|
@@ -64,7 +64,7 @@ var package_default;
|
|
|
64
64
|
var init_package = __esm(() => {
|
|
65
65
|
package_default = {
|
|
66
66
|
name: "oh-my-opencode",
|
|
67
|
-
version: "5.0.0-beta.
|
|
67
|
+
version: "5.0.0-beta.88",
|
|
68
68
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
69
69
|
main: "./dist/index.js",
|
|
70
70
|
types: "dist/index.d.ts",
|
|
@@ -247,7 +247,7 @@ var init_package = __esm(() => {
|
|
|
247
247
|
zod: "^4.6.5"
|
|
248
248
|
},
|
|
249
249
|
devDependencies: {
|
|
250
|
-
"@code-yeongyu/senpi": "2026.9.23-
|
|
250
|
+
"@code-yeongyu/senpi": "2026.9.23-5",
|
|
251
251
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
252
252
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
253
253
|
"@oh-my-opencode/boulder-state": "workspace:*",
|
|
@@ -288,18 +288,18 @@ var init_package = __esm(() => {
|
|
|
288
288
|
typescript: "^7.0.2"
|
|
289
289
|
},
|
|
290
290
|
optionalDependencies: {
|
|
291
|
-
"oh-my-opencode-darwin-arm64": "5.0.0-beta.
|
|
292
|
-
"oh-my-opencode-darwin-x64": "5.0.0-beta.
|
|
293
|
-
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.
|
|
294
|
-
"oh-my-opencode-linux-arm64": "5.0.0-beta.
|
|
295
|
-
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.
|
|
296
|
-
"oh-my-opencode-linux-x64": "5.0.0-beta.
|
|
297
|
-
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.
|
|
298
|
-
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.
|
|
299
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.
|
|
300
|
-
"oh-my-opencode-windows-arm64": "5.0.0-beta.
|
|
301
|
-
"oh-my-opencode-windows-x64": "5.0.0-beta.
|
|
302
|
-
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.
|
|
291
|
+
"oh-my-opencode-darwin-arm64": "5.0.0-beta.88",
|
|
292
|
+
"oh-my-opencode-darwin-x64": "5.0.0-beta.88",
|
|
293
|
+
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.88",
|
|
294
|
+
"oh-my-opencode-linux-arm64": "5.0.0-beta.88",
|
|
295
|
+
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.88",
|
|
296
|
+
"oh-my-opencode-linux-x64": "5.0.0-beta.88",
|
|
297
|
+
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.88",
|
|
298
|
+
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.88",
|
|
299
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.88",
|
|
300
|
+
"oh-my-opencode-windows-arm64": "5.0.0-beta.88",
|
|
301
|
+
"oh-my-opencode-windows-x64": "5.0.0-beta.88",
|
|
302
|
+
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.88"
|
|
303
303
|
},
|
|
304
304
|
overrides: {
|
|
305
305
|
"@earendil-works/pi-agent-core": "0.84.2",
|
|
@@ -88759,7 +88759,7 @@ var package_default2;
|
|
|
88759
88759
|
var init_package2 = __esm(() => {
|
|
88760
88760
|
package_default2 = {
|
|
88761
88761
|
name: "@oh-my-opencode/omo-codex",
|
|
88762
|
-
version: "5.0.0-beta.
|
|
88762
|
+
version: "5.0.0-beta.88",
|
|
88763
88763
|
type: "module",
|
|
88764
88764
|
private: true,
|
|
88765
88765
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -105363,28 +105363,41 @@ init_src();
|
|
|
105363
105363
|
import { existsSync as existsSync53 } from "fs";
|
|
105364
105364
|
import { createRequire as createRequire2 } from "module";
|
|
105365
105365
|
import { homedir as homedir19 } from "os";
|
|
105366
|
-
import { dirname as dirname31, join as
|
|
105366
|
+
import { dirname as dirname31, join as join83 } from "path";
|
|
105367
105367
|
|
|
105368
|
+
// packages/omo-opencode/src/hooks/comment-checker/downloader.ts
|
|
105369
|
+
import { join as join82 } from "path";
|
|
105370
|
+
import { homedir as homedir18, tmpdir as tmpdir4 } from "os";
|
|
105371
|
+
// packages/comment-checker-core/src/release.ts
|
|
105372
|
+
import { join as join81 } from "path";
|
|
105373
|
+
function commentCheckerBinaryName(platform) {
|
|
105374
|
+
return platform === "win32" ? "comment-checker.exe" : "comment-checker";
|
|
105375
|
+
}
|
|
105376
|
+
function commentCheckerCacheDir(input) {
|
|
105377
|
+
if (input.platform === "win32") {
|
|
105378
|
+
const localAppData = input.env.LOCALAPPDATA || input.env.APPDATA;
|
|
105379
|
+
const base = localAppData || join81(input.homedir, "AppData", "Local");
|
|
105380
|
+
return join81(base, input.cacheDirName, "bin");
|
|
105381
|
+
}
|
|
105382
|
+
const base = input.env.XDG_CACHE_HOME || join81(input.homedir, ".cache");
|
|
105383
|
+
return join81(base, input.cacheDirName, "bin");
|
|
105384
|
+
}
|
|
105368
105385
|
// packages/omo-opencode/src/hooks/comment-checker/downloader.ts
|
|
105369
105386
|
init_binary_downloader();
|
|
105370
105387
|
init_logger2();
|
|
105371
105388
|
init_plugin_identity();
|
|
105372
|
-
import { join as join81 } from "path";
|
|
105373
|
-
import { homedir as homedir18, tmpdir as tmpdir4 } from "os";
|
|
105374
105389
|
var DEBUG = process.env.COMMENT_CHECKER_DEBUG === "1";
|
|
105375
|
-
var DEBUG_FILE =
|
|
105390
|
+
var DEBUG_FILE = join82(tmpdir4(), "comment-checker-debug.log");
|
|
105376
105391
|
function getCacheDir2() {
|
|
105377
|
-
|
|
105378
|
-
|
|
105379
|
-
|
|
105380
|
-
|
|
105381
|
-
|
|
105382
|
-
|
|
105383
|
-
const base = xdgCache || join81(homedir18(), ".cache");
|
|
105384
|
-
return join81(base, CACHE_DIR_NAME, "bin");
|
|
105392
|
+
return commentCheckerCacheDir({
|
|
105393
|
+
platform: process.platform,
|
|
105394
|
+
env: process.env,
|
|
105395
|
+
homedir: homedir18(),
|
|
105396
|
+
cacheDirName: CACHE_DIR_NAME
|
|
105397
|
+
});
|
|
105385
105398
|
}
|
|
105386
105399
|
function getBinaryName() {
|
|
105387
|
-
return process.platform
|
|
105400
|
+
return commentCheckerBinaryName(process.platform);
|
|
105388
105401
|
}
|
|
105389
105402
|
function getCachedBinaryPath2() {
|
|
105390
105403
|
return getCachedBinaryPath(getCacheDir2(), getBinaryName());
|
|
@@ -105431,7 +105444,7 @@ async function getBinaryVersion(binary) {
|
|
|
105431
105444
|
}
|
|
105432
105445
|
}
|
|
105433
105446
|
async function checkAstGrepCli() {
|
|
105434
|
-
const runtimeDir = astGrepRuntimeDir(
|
|
105447
|
+
const runtimeDir = astGrepRuntimeDir(join83(homedir19(), ".omo"));
|
|
105435
105448
|
const sgPath = findSgBinarySync({ runtimeDir });
|
|
105436
105449
|
if (sgPath === null) {
|
|
105437
105450
|
return {
|
|
@@ -105461,10 +105474,10 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
|
|
|
105461
105474
|
const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
|
|
105462
105475
|
try {
|
|
105463
105476
|
const packageDir = baseDirOverride ?? dirname31(resolvePackageJsonPath());
|
|
105464
|
-
const vendorPath =
|
|
105477
|
+
const vendorPath = join83(packageDir, "vendor", platformKey, binaryName);
|
|
105465
105478
|
if (existsSync53(vendorPath))
|
|
105466
105479
|
return vendorPath;
|
|
105467
|
-
const binPath =
|
|
105480
|
+
const binPath = join83(packageDir, "bin", binaryName);
|
|
105468
105481
|
if (existsSync53(binPath))
|
|
105469
105482
|
return binPath;
|
|
105470
105483
|
} catch (error) {
|
|
@@ -105840,13 +105853,13 @@ function getInstalledLspServers(options = {}) {
|
|
|
105840
105853
|
init_shared();
|
|
105841
105854
|
import { existsSync as existsSync55, readFileSync as readFileSync35 } from "fs";
|
|
105842
105855
|
import { homedir as homedir20 } from "os";
|
|
105843
|
-
import { join as
|
|
105856
|
+
import { join as join84 } from "path";
|
|
105844
105857
|
var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
|
|
105845
105858
|
function getMcpConfigPaths() {
|
|
105846
105859
|
return [
|
|
105847
|
-
|
|
105848
|
-
|
|
105849
|
-
|
|
105860
|
+
join84(homedir20(), ".claude", ".mcp.json"),
|
|
105861
|
+
join84(process.cwd(), ".mcp.json"),
|
|
105862
|
+
join84(process.cwd(), ".claude", ".mcp.json")
|
|
105850
105863
|
];
|
|
105851
105864
|
}
|
|
105852
105865
|
function loadUserMcpConfig() {
|
|
@@ -106128,7 +106141,7 @@ init_src();
|
|
|
106128
106141
|
import { existsSync as existsSync57 } from "fs";
|
|
106129
106142
|
import { lstat as lstat16, readdir as readdir14, readFile as readFile28 } from "fs/promises";
|
|
106130
106143
|
import { homedir as homedir22 } from "os";
|
|
106131
|
-
import { basename as basename11, join as
|
|
106144
|
+
import { basename as basename11, join as join85, resolve as resolve23 } from "path";
|
|
106132
106145
|
// packages/omo-opencode/package.json
|
|
106133
106146
|
var package_default3 = {
|
|
106134
106147
|
name: "@oh-my-opencode/omo-opencode",
|
|
@@ -106140,6 +106153,10 @@ var package_default3 = {
|
|
|
106140
106153
|
"./config-migration": {
|
|
106141
106154
|
types: "./src/config-migration/index.ts",
|
|
106142
106155
|
import: "./src/config-migration/index.ts"
|
|
106156
|
+
},
|
|
106157
|
+
"./binary-downloader": {
|
|
106158
|
+
types: "./src/shared/binary-downloader.ts",
|
|
106159
|
+
import: "./src/shared/binary-downloader.ts"
|
|
106143
106160
|
}
|
|
106144
106161
|
},
|
|
106145
106162
|
scripts: {
|
|
@@ -106194,13 +106211,13 @@ var CODEX_BIN_NAMES = [
|
|
|
106194
106211
|
"omo-git-bash-hook"
|
|
106195
106212
|
];
|
|
106196
106213
|
async function gatherCodexSummary(deps = {}) {
|
|
106197
|
-
const codexHome = resolve23(deps.codexHome ?? process.env.CODEX_HOME ??
|
|
106214
|
+
const codexHome = resolve23(deps.codexHome ?? process.env.CODEX_HOME ?? join85(homedir22(), ".codex"));
|
|
106198
106215
|
const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
|
|
106199
106216
|
const detection = await (deps.detectCodexInstallation ?? detectCodexInstallation)();
|
|
106200
106217
|
const pluginRoot = await resolveInstalledPluginRoot(codexHome);
|
|
106201
|
-
const manifest = pluginRoot === null ? null : await readJson(
|
|
106202
|
-
const installSnapshot = pluginRoot === null ? null : await readJson(
|
|
106203
|
-
const configPath =
|
|
106218
|
+
const manifest = pluginRoot === null ? null : await readJson(join85(pluginRoot, ".codex-plugin", "plugin.json"));
|
|
106219
|
+
const installSnapshot = pluginRoot === null ? null : await readJson(join85(pluginRoot, "lazycodex-install.json"));
|
|
106220
|
+
const configPath = join85(codexHome, "config.toml");
|
|
106204
106221
|
const pluginVersion = stringField(manifest, "version");
|
|
106205
106222
|
return {
|
|
106206
106223
|
codexPath: detection.found && "path" in detection ? detection.path : null,
|
|
@@ -106257,7 +106274,7 @@ function buildCodexIssues(summary) {
|
|
|
106257
106274
|
if (summary.pluginRoot === null) {
|
|
106258
106275
|
issues.push({
|
|
106259
106276
|
title: "OMO Codex plugin is not installed",
|
|
106260
|
-
description: `Expected cached plugin at ${
|
|
106277
|
+
description: `Expected cached plugin at ${join85("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
|
|
106261
106278
|
fix: "Run: npx lazycodex-ai install",
|
|
106262
106279
|
severity: "error",
|
|
106263
106280
|
affects: ["plugin loading"]
|
|
@@ -106322,12 +106339,12 @@ function buildCodexIssues(summary) {
|
|
|
106322
106339
|
return issues;
|
|
106323
106340
|
}
|
|
106324
106341
|
async function resolveInstalledPluginRoot(codexHome) {
|
|
106325
|
-
const pluginRoot =
|
|
106342
|
+
const pluginRoot = join85(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
|
|
106326
106343
|
if (!existsSync57(pluginRoot))
|
|
106327
106344
|
return null;
|
|
106328
106345
|
const versions = await readdir14(pluginRoot, { withFileTypes: true });
|
|
106329
106346
|
const candidates = versions.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);
|
|
106330
|
-
return candidates.length === 0 ? null :
|
|
106347
|
+
return candidates.length === 0 ? null : join85(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
|
|
106331
106348
|
}
|
|
106332
106349
|
async function readCodexConfigSummary(configPath) {
|
|
106333
106350
|
if (!existsSync57(configPath)) {
|
|
@@ -106355,13 +106372,13 @@ async function readCodexConfigSummary(configPath) {
|
|
|
106355
106372
|
async function readLinkedBins(binDir) {
|
|
106356
106373
|
const linked = [];
|
|
106357
106374
|
for (const name of CODEX_BIN_NAMES) {
|
|
106358
|
-
if (await pathExists2(
|
|
106375
|
+
if (await pathExists2(join85(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
|
|
106359
106376
|
linked.push(name);
|
|
106360
106377
|
}
|
|
106361
106378
|
return linked;
|
|
106362
106379
|
}
|
|
106363
106380
|
async function readLinkedAgents(codexHome) {
|
|
106364
|
-
const agentsDir =
|
|
106381
|
+
const agentsDir = join85(codexHome, "agents");
|
|
106365
106382
|
if (!existsSync57(agentsDir))
|
|
106366
106383
|
return [];
|
|
106367
106384
|
const entries = await readdir14(agentsDir, { withFileTypes: true });
|
|
@@ -106495,7 +106512,7 @@ function resolveLatestVersion(input) {
|
|
|
106495
106512
|
init_src();
|
|
106496
106513
|
import { readdir as readdir15, readFile as readFile29, stat as stat7 } from "fs/promises";
|
|
106497
106514
|
import { homedir as homedir23 } from "os";
|
|
106498
|
-
import { dirname as dirname33, isAbsolute as isAbsolute13, join as
|
|
106515
|
+
import { dirname as dirname33, isAbsolute as isAbsolute13, join as join86, relative as relative9, resolve as resolve24, sep as sep9 } from "path";
|
|
106499
106516
|
var CODEX_COMPONENTS_CHECK_ID = "codex-components";
|
|
106500
106517
|
var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
|
|
106501
106518
|
var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
|
|
@@ -106505,7 +106522,7 @@ async function checkCodexComponents(deps = {}) {
|
|
|
106505
106522
|
const env = deps.env ?? process.env;
|
|
106506
106523
|
const platform = deps.platform ?? process.platform;
|
|
106507
106524
|
const arch = deps.arch ?? process.arch;
|
|
106508
|
-
const codexHome = resolve24(deps.codexHome ?? env["CODEX_HOME"] ??
|
|
106525
|
+
const codexHome = resolve24(deps.codexHome ?? env["CODEX_HOME"] ?? join86(homedir23(), ".codex"));
|
|
106509
106526
|
const summary = await gatherCodexSummary({ ...deps, codexHome });
|
|
106510
106527
|
if (summary.pluginRoot === null) {
|
|
106511
106528
|
return {
|
|
@@ -106530,7 +106547,7 @@ async function checkCodexComponents(deps = {}) {
|
|
|
106530
106547
|
});
|
|
106531
106548
|
}
|
|
106532
106549
|
const runtimeSgDir = runtimeSgDirectory(codexHome, platform, arch);
|
|
106533
|
-
const runtimeSgPath =
|
|
106550
|
+
const runtimeSgPath = join86(runtimeSgDir, sgBinaryName(platform));
|
|
106534
106551
|
const sg = findSgBinarySync({
|
|
106535
106552
|
arch,
|
|
106536
106553
|
env,
|
|
@@ -106567,12 +106584,12 @@ async function auditBundleTargets(pluginRoot) {
|
|
|
106567
106584
|
let referencedCount = 0;
|
|
106568
106585
|
for (const manifestPath of await findManifestPaths(pluginRoot, ".mcp.json")) {
|
|
106569
106586
|
const manifest = await readJson2(manifestPath);
|
|
106570
|
-
if (manifest === null || !
|
|
106587
|
+
if (manifest === null || !isRecord18(manifest["mcpServers"]))
|
|
106571
106588
|
continue;
|
|
106572
106589
|
const manifestRoot = dirname33(manifestPath);
|
|
106573
106590
|
const isRootManifest = resolve24(manifestRoot) === resolve24(pluginRoot);
|
|
106574
106591
|
for (const server of Object.values(manifest["mcpServers"])) {
|
|
106575
|
-
if (!
|
|
106592
|
+
if (!isRecord18(server) || !Array.isArray(server["args"]))
|
|
106576
106593
|
continue;
|
|
106577
106594
|
for (const arg of server["args"]) {
|
|
106578
106595
|
if (typeof arg !== "string" || !isPluginRuntimePathArg(arg))
|
|
@@ -106642,7 +106659,7 @@ async function findManifestPaths(root, manifestName) {
|
|
|
106642
106659
|
for (const entry of entries) {
|
|
106643
106660
|
if (entry.name === "node_modules" || entry.name === ".git")
|
|
106644
106661
|
continue;
|
|
106645
|
-
const entryPath =
|
|
106662
|
+
const entryPath = join86(root, entry.name);
|
|
106646
106663
|
if (entry.isDirectory()) {
|
|
106647
106664
|
paths.push(...await findManifestPaths(entryPath, manifestName));
|
|
106648
106665
|
continue;
|
|
@@ -106658,7 +106675,7 @@ function collectHookCommands(value, commands) {
|
|
|
106658
106675
|
collectHookCommands(item, commands);
|
|
106659
106676
|
return;
|
|
106660
106677
|
}
|
|
106661
|
-
if (!
|
|
106678
|
+
if (!isRecord18(value))
|
|
106662
106679
|
return;
|
|
106663
106680
|
if (value["type"] === "command") {
|
|
106664
106681
|
if (typeof value["command"] === "string")
|
|
@@ -106686,18 +106703,18 @@ function isPluginRuntimePathArg(arg) {
|
|
|
106686
106703
|
return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute13(arg));
|
|
106687
106704
|
}
|
|
106688
106705
|
function runtimeSgDirectory(codexHome, platform, arch) {
|
|
106689
|
-
return
|
|
106706
|
+
return join86(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
|
|
106690
106707
|
}
|
|
106691
106708
|
function describeSgSource(sgPath, env, runtimeSgDir, platform) {
|
|
106692
106709
|
const override = env[SG_PATH_ENV_KEY]?.trim();
|
|
106693
106710
|
if (override !== undefined && override.length > 0 && sgPath === override)
|
|
106694
106711
|
return `env override ${SG_PATH_ENV_KEY}`;
|
|
106695
|
-
if (sgPath ===
|
|
106712
|
+
if (sgPath === join86(runtimeSgDir, sgBinaryName(platform)))
|
|
106696
106713
|
return "runtime dir";
|
|
106697
106714
|
return "PATH";
|
|
106698
106715
|
}
|
|
106699
106716
|
async function readBootstrapStateSummary(codexHome) {
|
|
106700
|
-
const statePath =
|
|
106717
|
+
const statePath = join86(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
|
|
106701
106718
|
const raw = await readJson2(statePath);
|
|
106702
106719
|
if (raw === null)
|
|
106703
106720
|
return null;
|
|
@@ -106713,7 +106730,7 @@ function parseDegradedEntries(value) {
|
|
|
106713
106730
|
return [];
|
|
106714
106731
|
const entries = [];
|
|
106715
106732
|
for (const item of value) {
|
|
106716
|
-
if (!
|
|
106733
|
+
if (!isRecord18(item))
|
|
106717
106734
|
continue;
|
|
106718
106735
|
if (typeof item["component"] !== "string" || typeof item["reason"] !== "string")
|
|
106719
106736
|
continue;
|
|
@@ -106747,7 +106764,7 @@ function degradedDetailLines(entries) {
|
|
|
106747
106764
|
async function readJson2(path) {
|
|
106748
106765
|
try {
|
|
106749
106766
|
const parsed = JSON.parse(await readFile29(path, "utf8"));
|
|
106750
|
-
return
|
|
106767
|
+
return isRecord18(parsed) ? parsed : null;
|
|
106751
106768
|
} catch (error) {
|
|
106752
106769
|
if (error instanceof Error)
|
|
106753
106770
|
return null;
|
|
@@ -106768,7 +106785,7 @@ function normalizeRelative(root, target) {
|
|
|
106768
106785
|
function normalizePathSeparators(path) {
|
|
106769
106786
|
return path.split("\\").join("/");
|
|
106770
106787
|
}
|
|
106771
|
-
function
|
|
106788
|
+
function isRecord18(value) {
|
|
106772
106789
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
106773
106790
|
}
|
|
106774
106791
|
|
|
@@ -106776,16 +106793,16 @@ function isRecord17(value) {
|
|
|
106776
106793
|
import { existsSync as existsSync58 } from "fs";
|
|
106777
106794
|
import { readFile as readFile30 } from "fs/promises";
|
|
106778
106795
|
import { homedir as homedir24 } from "os";
|
|
106779
|
-
import { join as
|
|
106796
|
+
import { join as join87, resolve as resolve25 } from "path";
|
|
106780
106797
|
var RUNTIME_WRAPPER_MARKER2 = "OMO_GENERATED_RUNTIME_WRAPPER";
|
|
106781
106798
|
var CHECK_NAME = "codex-runtime-wrapper";
|
|
106782
106799
|
var REINSTALL_COMMAND = "npx --yes lazycodex-ai@latest install --no-tui";
|
|
106783
106800
|
async function checkCodexRuntimeWrapper(deps = {}) {
|
|
106784
|
-
const codexHome = resolve25(deps.codexHome ?? process.env.CODEX_HOME ??
|
|
106801
|
+
const codexHome = resolve25(deps.codexHome ?? process.env.CODEX_HOME ?? join87(homedir24(), ".codex"));
|
|
106785
106802
|
const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
|
|
106786
106803
|
const platform = deps.platform ?? process.platform;
|
|
106787
|
-
const wrapperPath =
|
|
106788
|
-
const legacyWrapperPath =
|
|
106804
|
+
const wrapperPath = join87(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
|
|
106805
|
+
const legacyWrapperPath = join87(binDir, platform === "win32" ? "omo.cmd" : "omo");
|
|
106789
106806
|
const [wrapper, legacyWrapper] = await Promise.all([readRuntimeWrapper(wrapperPath), readRuntimeWrapper(legacyWrapperPath)]);
|
|
106790
106807
|
const issues = [];
|
|
106791
106808
|
if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {
|
|
@@ -107321,12 +107338,12 @@ import {
|
|
|
107321
107338
|
unlinkSync as unlinkSync9,
|
|
107322
107339
|
writeFileSync as writeFileSync12
|
|
107323
107340
|
} from "fs";
|
|
107324
|
-
import { basename as basename12, dirname as dirname34, join as
|
|
107341
|
+
import { basename as basename12, dirname as dirname34, join as join90 } from "path";
|
|
107325
107342
|
|
|
107326
107343
|
// packages/mcp-client-core/src/config-dir.ts
|
|
107327
107344
|
import { existsSync as existsSync59, realpathSync as realpathSync8 } from "fs";
|
|
107328
107345
|
import { homedir as homedir25 } from "os";
|
|
107329
|
-
import { join as
|
|
107346
|
+
import { join as join88, resolve as resolve26 } from "path";
|
|
107330
107347
|
function resolveConfigPath2(pathValue) {
|
|
107331
107348
|
const resolvedPath = resolve26(pathValue);
|
|
107332
107349
|
if (!existsSync59(resolvedPath))
|
|
@@ -107344,13 +107361,13 @@ function getOpenCodeCliConfigDir(env = process.env) {
|
|
|
107344
107361
|
if (customConfigDir) {
|
|
107345
107362
|
return resolveConfigPath2(customConfigDir);
|
|
107346
107363
|
}
|
|
107347
|
-
const xdgConfigDir = env["XDG_CONFIG_HOME"]?.trim() ||
|
|
107348
|
-
return resolveConfigPath2(
|
|
107364
|
+
const xdgConfigDir = env["XDG_CONFIG_HOME"]?.trim() || join88(homedir25(), ".config");
|
|
107365
|
+
return resolveConfigPath2(join88(xdgConfigDir, "opencode"));
|
|
107349
107366
|
}
|
|
107350
107367
|
|
|
107351
107368
|
// packages/mcp-client-core/src/mcp-oauth/storage-index.ts
|
|
107352
107369
|
import { chmodSync as chmodSync4, existsSync as existsSync60, readFileSync as readFileSync37, renameSync as renameSync6, writeFileSync as writeFileSync11 } from "fs";
|
|
107353
|
-
import { join as
|
|
107370
|
+
import { join as join89 } from "path";
|
|
107354
107371
|
var INDEX_FILE_NAME = "index.json";
|
|
107355
107372
|
function isTokenIndex(value) {
|
|
107356
107373
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
@@ -107358,7 +107375,7 @@ function isTokenIndex(value) {
|
|
|
107358
107375
|
return Object.values(value).every((entry) => typeof entry === "string");
|
|
107359
107376
|
}
|
|
107360
107377
|
function getIndexPath(storageDir) {
|
|
107361
|
-
return
|
|
107378
|
+
return join89(storageDir, INDEX_FILE_NAME);
|
|
107362
107379
|
}
|
|
107363
107380
|
function readTokenIndex(storageDir) {
|
|
107364
107381
|
const indexPath = getIndexPath(storageDir);
|
|
@@ -107402,16 +107419,16 @@ function deleteTokenIndexEntry(storageDir, hash) {
|
|
|
107402
107419
|
var STORAGE_DIR_NAME = "mcp-oauth";
|
|
107403
107420
|
var LEGACY_STORAGE_FILE_NAME = "mcp-oauth.json";
|
|
107404
107421
|
function getMcpOauthStorageDir() {
|
|
107405
|
-
return
|
|
107422
|
+
return join90(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
|
|
107406
107423
|
}
|
|
107407
107424
|
function getMcpOauthServerHash(serverHost, resource) {
|
|
107408
107425
|
return createHash7("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);
|
|
107409
107426
|
}
|
|
107410
107427
|
function getMcpOauthStoragePath(serverHost, resource) {
|
|
107411
|
-
return
|
|
107428
|
+
return join90(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
|
|
107412
107429
|
}
|
|
107413
107430
|
function getLegacyStoragePath() {
|
|
107414
|
-
return
|
|
107431
|
+
return join90(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
|
|
107415
107432
|
}
|
|
107416
107433
|
function normalizeHost2(serverHost) {
|
|
107417
107434
|
let host = serverHost.trim();
|
|
@@ -107590,7 +107607,7 @@ function listTokensByHost(serverHost) {
|
|
|
107590
107607
|
for (const [hash, indexedKey] of Object.entries(index)) {
|
|
107591
107608
|
if (!indexedKey.startsWith(prefix))
|
|
107592
107609
|
continue;
|
|
107593
|
-
const indexedToken = readTokenFile(
|
|
107610
|
+
const indexedToken = readTokenFile(join90(getMcpOauthStorageDir(), `${hash}.json`));
|
|
107594
107611
|
if (indexedToken)
|
|
107595
107612
|
result[indexedKey] = indexedToken;
|
|
107596
107613
|
}
|
|
@@ -107605,7 +107622,7 @@ function listAllTokens() {
|
|
|
107605
107622
|
for (const entry of readdirSync12(dir, { withFileTypes: true })) {
|
|
107606
107623
|
if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
|
|
107607
107624
|
continue;
|
|
107608
|
-
const token = readTokenFile(
|
|
107625
|
+
const token = readTokenFile(join90(dir, entry.name));
|
|
107609
107626
|
const hash = basename12(entry.name, ".json");
|
|
107610
107627
|
if (token)
|
|
107611
107628
|
result[index[hash] ?? hash] = token;
|