lazycodex-ai 5.1.42 → 5.1.44
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 +110 -27
- package/dist/cli/service-auth/cli-keystore.fixture.d.ts +1 -7
- package/dist/cli/service-auth/index.d.ts +1 -1
- package/dist/cli/service-auth/keystore.d.ts +8 -2
- package/dist/cli/service-auth/secret-service-lock.d.ts +4 -0
- package/dist/cli/service-auth/session.d.ts +7 -1
- package/dist/cli-node/index.js +110 -27
- package/package.json +1 -1
- package/packages/lsp-daemon/dist/cli.js +363 -35
- package/packages/lsp-daemon/dist/client.js +341 -13
- package/packages/lsp-daemon/dist/index.js +344 -16
- package/packages/lsp-tools-mcp/dist/cli.js +333 -5
- package/packages/lsp-tools-mcp/dist/mcp.js +333 -5
- package/packages/lsp-tools-mcp/dist/tools.js +333 -5
- 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 +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +358 -36
- 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/dist/cli.js +2 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +2 -0
- 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 +17 -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/scripts/install-dist/install-local.mjs +4 -2
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -2132,7 +2132,7 @@ var package_default;
|
|
|
2132
2132
|
var init_package = __esm(() => {
|
|
2133
2133
|
package_default = {
|
|
2134
2134
|
name: "oh-my-opencode",
|
|
2135
|
-
version: "5.1.
|
|
2135
|
+
version: "5.1.44",
|
|
2136
2136
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
2137
2137
|
main: "./dist/index.js",
|
|
2138
2138
|
types: "dist/index.d.ts",
|
|
@@ -2309,7 +2309,7 @@ var init_package = __esm(() => {
|
|
|
2309
2309
|
},
|
|
2310
2310
|
devDependencies: {
|
|
2311
2311
|
"@clack/prompts": "^1.8.1",
|
|
2312
|
-
"@code-yeongyu/senpi": "2026.10.21-
|
|
2312
|
+
"@code-yeongyu/senpi": "2026.10.21-3",
|
|
2313
2313
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
2314
2314
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
2315
2315
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
@@ -2370,18 +2370,18 @@ var init_package = __esm(() => {
|
|
|
2370
2370
|
typescript: "^7.0.2"
|
|
2371
2371
|
},
|
|
2372
2372
|
optionalDependencies: {
|
|
2373
|
-
"oh-my-opencode-darwin-arm64": "5.1.
|
|
2374
|
-
"oh-my-opencode-darwin-x64": "5.1.
|
|
2375
|
-
"oh-my-opencode-darwin-x64-baseline": "5.1.
|
|
2376
|
-
"oh-my-opencode-linux-arm64": "5.1.
|
|
2377
|
-
"oh-my-opencode-linux-arm64-musl": "5.1.
|
|
2378
|
-
"oh-my-opencode-linux-x64": "5.1.
|
|
2379
|
-
"oh-my-opencode-linux-x64-baseline": "5.1.
|
|
2380
|
-
"oh-my-opencode-linux-x64-musl": "5.1.
|
|
2381
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.1.
|
|
2382
|
-
"oh-my-opencode-windows-arm64": "5.1.
|
|
2383
|
-
"oh-my-opencode-windows-x64": "5.1.
|
|
2384
|
-
"oh-my-opencode-windows-x64-baseline": "5.1.
|
|
2373
|
+
"oh-my-opencode-darwin-arm64": "5.1.44",
|
|
2374
|
+
"oh-my-opencode-darwin-x64": "5.1.44",
|
|
2375
|
+
"oh-my-opencode-darwin-x64-baseline": "5.1.44",
|
|
2376
|
+
"oh-my-opencode-linux-arm64": "5.1.44",
|
|
2377
|
+
"oh-my-opencode-linux-arm64-musl": "5.1.44",
|
|
2378
|
+
"oh-my-opencode-linux-x64": "5.1.44",
|
|
2379
|
+
"oh-my-opencode-linux-x64-baseline": "5.1.44",
|
|
2380
|
+
"oh-my-opencode-linux-x64-musl": "5.1.44",
|
|
2381
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.1.44",
|
|
2382
|
+
"oh-my-opencode-windows-arm64": "5.1.44",
|
|
2383
|
+
"oh-my-opencode-windows-x64": "5.1.44",
|
|
2384
|
+
"oh-my-opencode-windows-x64-baseline": "5.1.44"
|
|
2385
2385
|
},
|
|
2386
2386
|
overrides: {
|
|
2387
2387
|
hono: "^4.13.8",
|
|
@@ -82448,6 +82448,8 @@ function toDiagnosticRecord(input, now) {
|
|
|
82448
82448
|
timestamp: now.toISOString(),
|
|
82449
82449
|
event: input.event,
|
|
82450
82450
|
source: input.source,
|
|
82451
|
+
...input.entryKind === undefined ? {} : { entry_kind: input.entryKind },
|
|
82452
|
+
...input.errorCode === undefined ? {} : { error_code: input.errorCode },
|
|
82451
82453
|
...input.count === undefined ? {} : { count: input.count },
|
|
82452
82454
|
...serializeError(input.error, input.errorKind)
|
|
82453
82455
|
};
|
|
@@ -92201,7 +92203,7 @@ var package_default2;
|
|
|
92201
92203
|
var init_package2 = __esm(() => {
|
|
92202
92204
|
package_default2 = {
|
|
92203
92205
|
name: "@oh-my-opencode/omo-codex",
|
|
92204
|
-
version: "5.1.
|
|
92206
|
+
version: "5.1.44",
|
|
92205
92207
|
type: "module",
|
|
92206
92208
|
private: true,
|
|
92207
92209
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -111568,24 +111570,98 @@ async function loginDevice(session, options) {
|
|
|
111568
111570
|
|
|
111569
111571
|
// packages/omo-opencode/src/cli/service-auth/keystore.ts
|
|
111570
111572
|
import { createHash as createHash9 } from "crypto";
|
|
111573
|
+
|
|
111574
|
+
// packages/omo-opencode/src/cli/service-auth/secret-service-lock.ts
|
|
111575
|
+
import { spawn as spawn5 } from "child_process";
|
|
111576
|
+
var DEFAULT_COLLECTION = "/org/freedesktop/secrets/aliases/default";
|
|
111577
|
+
var PROBE_TIMEOUT_MS2 = 1e4;
|
|
111578
|
+
var parseLockedReply = (stdout) => {
|
|
111579
|
+
const match = /<\s*(true|false)\s*>/.exec(stdout);
|
|
111580
|
+
if (match === null)
|
|
111581
|
+
return null;
|
|
111582
|
+
return match[1] === "true" ? "locked" : "unlocked";
|
|
111583
|
+
};
|
|
111584
|
+
var probeSecretServiceLock = () => new Promise((resolve) => {
|
|
111585
|
+
const child = spawn5("gdbus", [
|
|
111586
|
+
"call",
|
|
111587
|
+
"--session",
|
|
111588
|
+
"--dest",
|
|
111589
|
+
"org.freedesktop.secrets",
|
|
111590
|
+
"--object-path",
|
|
111591
|
+
DEFAULT_COLLECTION,
|
|
111592
|
+
"--method",
|
|
111593
|
+
"org.freedesktop.DBus.Properties.Get",
|
|
111594
|
+
"org.freedesktop.Secret.Collection",
|
|
111595
|
+
"Locked"
|
|
111596
|
+
], { stdio: ["ignore", "pipe", "ignore"] });
|
|
111597
|
+
let stdout = "";
|
|
111598
|
+
const timer = setTimeout(() => {
|
|
111599
|
+
child.kill();
|
|
111600
|
+
resolve("unknown");
|
|
111601
|
+
}, PROBE_TIMEOUT_MS2);
|
|
111602
|
+
child.stdout.on("data", (chunk) => {
|
|
111603
|
+
stdout += chunk.toString();
|
|
111604
|
+
});
|
|
111605
|
+
child.on("error", () => {
|
|
111606
|
+
clearTimeout(timer);
|
|
111607
|
+
resolve("unknown");
|
|
111608
|
+
});
|
|
111609
|
+
child.on("close", (code) => {
|
|
111610
|
+
clearTimeout(timer);
|
|
111611
|
+
resolve(code === 0 ? parseLockedReply(stdout) ?? "absent" : "absent");
|
|
111612
|
+
});
|
|
111613
|
+
});
|
|
111614
|
+
|
|
111615
|
+
// packages/omo-opencode/src/cli/service-auth/keystore.ts
|
|
111616
|
+
class KeychainLockedError extends SignInError {
|
|
111617
|
+
}
|
|
111618
|
+
var LOCKED = /-25308|errSecInteractionNotAllowed|interaction is not allowed|locked collection/i;
|
|
111619
|
+
var UNLOCKED_REUSE_MS = 30000;
|
|
111620
|
+
var fallbackNoticed = false;
|
|
111621
|
+
var stderrNoticeOncePerProcess = (message) => {
|
|
111622
|
+
if (fallbackNoticed)
|
|
111623
|
+
return;
|
|
111624
|
+
fallbackNoticed = true;
|
|
111625
|
+
process.stderr.write(`${message}
|
|
111626
|
+
`);
|
|
111627
|
+
};
|
|
111628
|
+
var isLocked = (error) => error instanceof Error && (LOCKED.test(error.message) || LOCKED.test(String(error.code ?? "")));
|
|
111571
111629
|
function credentialId(api) {
|
|
111572
111630
|
return createHash9("sha256").update(serviceOrigin(api)).digest("hex");
|
|
111573
111631
|
}
|
|
111574
|
-
function createCredentialStore(api, secrets = typeof Bun === "undefined" ? null : Bun.secrets, platform = process.platform) {
|
|
111632
|
+
function createCredentialStore(api, secrets = typeof Bun === "undefined" ? null : Bun.secrets, platform = process.platform, lockProbe = probeSecretServiceLock, notice = stderrNoticeOncePerProcess) {
|
|
111575
111633
|
if (!secrets)
|
|
111576
111634
|
throw new SignInError("OmO sign-in needs Bun 1.4 or newer with OS credential storage. No file fallback is available.");
|
|
111577
111635
|
const platformName = platform === "darwin" ? "macOS Keychain" : platform === "linux" ? "Linux Secret Service (libsecret and an unlocked keyring)" : platform === "win32" ? "Windows Credential Manager" : null;
|
|
111578
111636
|
if (platformName === null)
|
|
111579
111637
|
throw new SignInError("This platform has no supported OS credential store.");
|
|
111580
111638
|
const key = { service: "omo-cli", name: credentialId(api) };
|
|
111581
|
-
const unavailable = () => new SignInError(`Cannot access ${platformName}. Unlock or enable the OS credential store and try again. Credentials are never saved to a file.`);
|
|
111639
|
+
const unavailable = (error) => isLocked(error) ? new KeychainLockedError(`${platformName} is locked. Unlock it, then try again. Credentials are never saved to a file.`) : new SignInError(`Cannot access ${platformName}. Unlock or enable the OS credential store and try again. Credentials are never saved to a file.`);
|
|
111640
|
+
let unlockedUntil = 0;
|
|
111641
|
+
let noticed = false;
|
|
111642
|
+
const assertUsable = async () => {
|
|
111643
|
+
if (platform !== "linux" || Date.now() < unlockedUntil)
|
|
111644
|
+
return;
|
|
111645
|
+
const lock = await lockProbe();
|
|
111646
|
+
if (lock === "locked")
|
|
111647
|
+
throw new KeychainLockedError(`${platformName} is locked. Unlock it, then try again. Credentials are never saved to a file.`);
|
|
111648
|
+
if (lock === "unlocked") {
|
|
111649
|
+
unlockedUntil = Date.now() + UNLOCKED_REUSE_MS;
|
|
111650
|
+
return;
|
|
111651
|
+
}
|
|
111652
|
+
if (!noticed) {
|
|
111653
|
+
noticed = true;
|
|
111654
|
+
notice("omo: could not check whether the keyring is locked (gdbus or the Secret Service did not answer); using libsecret directly.");
|
|
111655
|
+
}
|
|
111656
|
+
};
|
|
111582
111657
|
return {
|
|
111583
111658
|
async read() {
|
|
111659
|
+
await assertUsable();
|
|
111584
111660
|
let value;
|
|
111585
111661
|
try {
|
|
111586
111662
|
value = await secrets.get(key);
|
|
111587
|
-
} catch {
|
|
111588
|
-
throw unavailable();
|
|
111663
|
+
} catch (error) {
|
|
111664
|
+
throw unavailable(error);
|
|
111589
111665
|
}
|
|
111590
111666
|
if (value === null)
|
|
111591
111667
|
return null;
|
|
@@ -111596,17 +111672,19 @@ function createCredentialStore(api, secrets = typeof Bun === "undefined" ? null
|
|
|
111596
111672
|
}
|
|
111597
111673
|
},
|
|
111598
111674
|
async write(value) {
|
|
111675
|
+
await assertUsable();
|
|
111599
111676
|
try {
|
|
111600
111677
|
await secrets.set({ ...key, value: JSON.stringify(credentialSchema.parse(value)) });
|
|
111601
|
-
} catch {
|
|
111602
|
-
throw unavailable();
|
|
111678
|
+
} catch (error) {
|
|
111679
|
+
throw unavailable(error);
|
|
111603
111680
|
}
|
|
111604
111681
|
},
|
|
111605
111682
|
async clear() {
|
|
111683
|
+
await assertUsable();
|
|
111606
111684
|
try {
|
|
111607
111685
|
await secrets.delete(key);
|
|
111608
|
-
} catch {
|
|
111609
|
-
throw unavailable();
|
|
111686
|
+
} catch (error) {
|
|
111687
|
+
throw unavailable(error);
|
|
111610
111688
|
}
|
|
111611
111689
|
}
|
|
111612
111690
|
};
|
|
@@ -111950,9 +112028,11 @@ async function reapStaleLock(lockPath, staleAfterMs = DEFAULT_STALE_AFTER_MS, de
|
|
|
111950
112028
|
// packages/omo-opencode/src/cli/service-auth/session.ts
|
|
111951
112029
|
class SessionEnded extends SignInError {
|
|
111952
112030
|
deviceRevoked;
|
|
111953
|
-
|
|
112031
|
+
code;
|
|
112032
|
+
constructor(message, deviceRevoked, code) {
|
|
111954
112033
|
super(message);
|
|
111955
112034
|
this.deviceRevoked = deviceRevoked;
|
|
112035
|
+
this.code = code;
|
|
111956
112036
|
}
|
|
111957
112037
|
}
|
|
111958
112038
|
var DEVICE_REVOKING_REFUSALS = new Set(["account_deleted", "reauth_required"]);
|
|
@@ -111984,7 +112064,7 @@ function createSession(options) {
|
|
|
111984
112064
|
} catch (error) {
|
|
111985
112065
|
if (error instanceof ApiRefusal && error.status < 500 && ["unauthorized", "account_deleted", "reauth_required", "invalid_grant"].includes(error.code)) {
|
|
111986
112066
|
await store.clear();
|
|
111987
|
-
throw new SessionEnded(error.code === "reauth_required" ? "This session was ended because its refresh token was reused. Sign in again with omo login." : "Sign in again with omo login.", DEVICE_REVOKING_REFUSALS.has(error.code));
|
|
112067
|
+
throw new SessionEnded(error.code === "reauth_required" ? "This session was ended because its refresh token was reused. Sign in again with omo login." : "Sign in again with omo login.", DEVICE_REVOKING_REFUSALS.has(error.code), error.code);
|
|
111988
112068
|
}
|
|
111989
112069
|
if (error instanceof RequestFailure && error.notSent || error instanceof ApiRefusal && error.status === 429 && error.code === "rate_limited") {
|
|
111990
112070
|
await store.write(current);
|
|
@@ -112002,6 +112082,9 @@ function createSession(options) {
|
|
|
112002
112082
|
async save(value) {
|
|
112003
112083
|
await locked(() => store.write(value));
|
|
112004
112084
|
},
|
|
112085
|
+
async update(action) {
|
|
112086
|
+
return locked(async () => action(await store.read()));
|
|
112087
|
+
},
|
|
112005
112088
|
async logout() {
|
|
112006
112089
|
return locked(async () => {
|
|
112007
112090
|
try {
|
|
@@ -112365,7 +112448,7 @@ async function boulder(options) {
|
|
|
112365
112448
|
return 0;
|
|
112366
112449
|
}
|
|
112367
112450
|
// packages/omo-opencode/src/cli/codex-ulw-loop.ts
|
|
112368
|
-
import { spawn as
|
|
112451
|
+
import { spawn as spawn6 } from "child_process";
|
|
112369
112452
|
import { existsSync as existsSync65, readFileSync as readFileSync43, realpathSync as realpathSync11 } from "fs";
|
|
112370
112453
|
import { homedir as homedir29 } from "os";
|
|
112371
112454
|
var ULW_LOOP_DELEGATION_SENTINEL = "OMO_ULW_LOOP_DELEGATED";
|
|
@@ -112395,7 +112478,7 @@ async function codexUlwLoop(args) {
|
|
|
112395
112478
|
return 1;
|
|
112396
112479
|
}
|
|
112397
112480
|
const { promise, resolve } = Promise.withResolvers();
|
|
112398
|
-
const child =
|
|
112481
|
+
const child = spawn6(command.executable, [...command.argsPrefix, ...args], {
|
|
112399
112482
|
stdio: "inherit",
|
|
112400
112483
|
env: { ...process.env, [ULW_LOOP_DELEGATION_SENTINEL]: "1" }
|
|
112401
112484
|
});
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
declare const get: () => Promise<string | null>;
|
|
3
|
-
declare const set: ({ value }: {
|
|
4
|
-
readonly value: string;
|
|
5
|
-
}) => Promise<void>;
|
|
6
|
-
declare const remove: () => Promise<boolean>;
|
|
7
|
-
declare const failure: string | undefined;
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { type CredentialStore, createCredentialStore } from "./keystore";
|
|
1
|
+
export { type CredentialStore, createCredentialStore, quietNotice } from "./keystore";
|
|
2
2
|
export { type Credentials, SignInError, serviceOrigin } from "./protocol";
|
|
3
3
|
export { createSession, type Session } from "./session";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type Credentials } from "./protocol";
|
|
1
|
+
import { type Credentials, SignInError } from "./protocol";
|
|
2
|
+
import { type SecretServiceLockProbe } from "./secret-service-lock";
|
|
2
3
|
type SecretKey = {
|
|
3
4
|
readonly service: string;
|
|
4
5
|
readonly name: string;
|
|
@@ -15,6 +16,11 @@ export type CredentialStore = {
|
|
|
15
16
|
readonly write: (value: Credentials) => Promise<void>;
|
|
16
17
|
readonly clear: () => Promise<void>;
|
|
17
18
|
};
|
|
19
|
+
export declare class KeychainLockedError extends SignInError {
|
|
20
|
+
}
|
|
21
|
+
export declare class SecretServiceUnavailableError extends SignInError {
|
|
22
|
+
}
|
|
23
|
+
export declare const quietNotice: (_message: string) => void;
|
|
18
24
|
export declare function credentialId(api: string): string;
|
|
19
|
-
export declare function createCredentialStore(api: string, secrets?: SecretApi | null, platform?: NodeJS.Platform): CredentialStore;
|
|
25
|
+
export declare function createCredentialStore(api: string, secrets?: SecretApi | null, platform?: NodeJS.Platform, lockProbe?: SecretServiceLockProbe, notice?: (message: string) => void): CredentialStore;
|
|
20
26
|
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type SecretServiceLockState = "locked" | "unlocked" | "absent" | "unknown";
|
|
2
|
+
export type SecretServiceLockProbe = () => Promise<SecretServiceLockState>;
|
|
3
|
+
export declare const parseLockedReply: (stdout: string) => SecretServiceLockState | null;
|
|
4
|
+
export declare const probeSecretServiceLock: SecretServiceLockProbe;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { type CredentialStore } from "./keystore";
|
|
2
|
-
import { type ChooseDevice, type Credentials } from "./protocol";
|
|
2
|
+
import { type ChooseDevice, type Credentials, SignInError } from "./protocol";
|
|
3
|
+
export declare class SessionEnded extends SignInError {
|
|
4
|
+
readonly deviceRevoked: boolean;
|
|
5
|
+
readonly code: string;
|
|
6
|
+
constructor(message: string, deviceRevoked: boolean, code: string);
|
|
7
|
+
}
|
|
3
8
|
export declare function createSession(options: {
|
|
4
9
|
readonly api: string;
|
|
5
10
|
readonly store: CredentialStore;
|
|
@@ -10,6 +15,7 @@ export declare function createSession(options: {
|
|
|
10
15
|
signal: AbortSignal | undefined;
|
|
11
16
|
ready(): Promise<void>;
|
|
12
17
|
save(value: Credentials): Promise<void>;
|
|
18
|
+
update<T>(action: (current: Credentials | null) => Promise<T>): Promise<T>;
|
|
13
19
|
logout(): Promise<boolean>;
|
|
14
20
|
accessToken(): Promise<string>;
|
|
15
21
|
removeForLimit(error: unknown, choose: ChooseDevice): Promise<boolean>;
|
package/dist/cli-node/index.js
CHANGED
|
@@ -2133,7 +2133,7 @@ var package_default;
|
|
|
2133
2133
|
var init_package = __esm(() => {
|
|
2134
2134
|
package_default = {
|
|
2135
2135
|
name: "oh-my-opencode",
|
|
2136
|
-
version: "5.1.
|
|
2136
|
+
version: "5.1.44",
|
|
2137
2137
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
2138
2138
|
main: "./dist/index.js",
|
|
2139
2139
|
types: "dist/index.d.ts",
|
|
@@ -2310,7 +2310,7 @@ var init_package = __esm(() => {
|
|
|
2310
2310
|
},
|
|
2311
2311
|
devDependencies: {
|
|
2312
2312
|
"@clack/prompts": "^1.8.1",
|
|
2313
|
-
"@code-yeongyu/senpi": "2026.10.21-
|
|
2313
|
+
"@code-yeongyu/senpi": "2026.10.21-3",
|
|
2314
2314
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
2315
2315
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
2316
2316
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
@@ -2371,18 +2371,18 @@ var init_package = __esm(() => {
|
|
|
2371
2371
|
typescript: "^7.0.2"
|
|
2372
2372
|
},
|
|
2373
2373
|
optionalDependencies: {
|
|
2374
|
-
"oh-my-opencode-darwin-arm64": "5.1.
|
|
2375
|
-
"oh-my-opencode-darwin-x64": "5.1.
|
|
2376
|
-
"oh-my-opencode-darwin-x64-baseline": "5.1.
|
|
2377
|
-
"oh-my-opencode-linux-arm64": "5.1.
|
|
2378
|
-
"oh-my-opencode-linux-arm64-musl": "5.1.
|
|
2379
|
-
"oh-my-opencode-linux-x64": "5.1.
|
|
2380
|
-
"oh-my-opencode-linux-x64-baseline": "5.1.
|
|
2381
|
-
"oh-my-opencode-linux-x64-musl": "5.1.
|
|
2382
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.1.
|
|
2383
|
-
"oh-my-opencode-windows-arm64": "5.1.
|
|
2384
|
-
"oh-my-opencode-windows-x64": "5.1.
|
|
2385
|
-
"oh-my-opencode-windows-x64-baseline": "5.1.
|
|
2374
|
+
"oh-my-opencode-darwin-arm64": "5.1.44",
|
|
2375
|
+
"oh-my-opencode-darwin-x64": "5.1.44",
|
|
2376
|
+
"oh-my-opencode-darwin-x64-baseline": "5.1.44",
|
|
2377
|
+
"oh-my-opencode-linux-arm64": "5.1.44",
|
|
2378
|
+
"oh-my-opencode-linux-arm64-musl": "5.1.44",
|
|
2379
|
+
"oh-my-opencode-linux-x64": "5.1.44",
|
|
2380
|
+
"oh-my-opencode-linux-x64-baseline": "5.1.44",
|
|
2381
|
+
"oh-my-opencode-linux-x64-musl": "5.1.44",
|
|
2382
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.1.44",
|
|
2383
|
+
"oh-my-opencode-windows-arm64": "5.1.44",
|
|
2384
|
+
"oh-my-opencode-windows-x64": "5.1.44",
|
|
2385
|
+
"oh-my-opencode-windows-x64-baseline": "5.1.44"
|
|
2386
2386
|
},
|
|
2387
2387
|
overrides: {
|
|
2388
2388
|
hono: "^4.13.8",
|
|
@@ -82527,6 +82527,8 @@ function toDiagnosticRecord(input, now) {
|
|
|
82527
82527
|
timestamp: now.toISOString(),
|
|
82528
82528
|
event: input.event,
|
|
82529
82529
|
source: input.source,
|
|
82530
|
+
...input.entryKind === undefined ? {} : { entry_kind: input.entryKind },
|
|
82531
|
+
...input.errorCode === undefined ? {} : { error_code: input.errorCode },
|
|
82530
82532
|
...input.count === undefined ? {} : { count: input.count },
|
|
82531
82533
|
...serializeError(input.error, input.errorKind)
|
|
82532
82534
|
};
|
|
@@ -92280,7 +92282,7 @@ var package_default2;
|
|
|
92280
92282
|
var init_package2 = __esm(() => {
|
|
92281
92283
|
package_default2 = {
|
|
92282
92284
|
name: "@oh-my-opencode/omo-codex",
|
|
92283
|
-
version: "5.1.
|
|
92285
|
+
version: "5.1.44",
|
|
92284
92286
|
type: "module",
|
|
92285
92287
|
private: true,
|
|
92286
92288
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -111647,24 +111649,98 @@ async function loginDevice(session, options) {
|
|
|
111647
111649
|
|
|
111648
111650
|
// packages/omo-opencode/src/cli/service-auth/keystore.ts
|
|
111649
111651
|
import { createHash as createHash9 } from "node:crypto";
|
|
111652
|
+
|
|
111653
|
+
// packages/omo-opencode/src/cli/service-auth/secret-service-lock.ts
|
|
111654
|
+
import { spawn as spawn5 } from "node:child_process";
|
|
111655
|
+
var DEFAULT_COLLECTION = "/org/freedesktop/secrets/aliases/default";
|
|
111656
|
+
var PROBE_TIMEOUT_MS2 = 1e4;
|
|
111657
|
+
var parseLockedReply = (stdout) => {
|
|
111658
|
+
const match = /<\s*(true|false)\s*>/.exec(stdout);
|
|
111659
|
+
if (match === null)
|
|
111660
|
+
return null;
|
|
111661
|
+
return match[1] === "true" ? "locked" : "unlocked";
|
|
111662
|
+
};
|
|
111663
|
+
var probeSecretServiceLock = () => new Promise((resolve) => {
|
|
111664
|
+
const child = spawn5("gdbus", [
|
|
111665
|
+
"call",
|
|
111666
|
+
"--session",
|
|
111667
|
+
"--dest",
|
|
111668
|
+
"org.freedesktop.secrets",
|
|
111669
|
+
"--object-path",
|
|
111670
|
+
DEFAULT_COLLECTION,
|
|
111671
|
+
"--method",
|
|
111672
|
+
"org.freedesktop.DBus.Properties.Get",
|
|
111673
|
+
"org.freedesktop.Secret.Collection",
|
|
111674
|
+
"Locked"
|
|
111675
|
+
], { stdio: ["ignore", "pipe", "ignore"] });
|
|
111676
|
+
let stdout = "";
|
|
111677
|
+
const timer = setTimeout(() => {
|
|
111678
|
+
child.kill();
|
|
111679
|
+
resolve("unknown");
|
|
111680
|
+
}, PROBE_TIMEOUT_MS2);
|
|
111681
|
+
child.stdout.on("data", (chunk) => {
|
|
111682
|
+
stdout += chunk.toString();
|
|
111683
|
+
});
|
|
111684
|
+
child.on("error", () => {
|
|
111685
|
+
clearTimeout(timer);
|
|
111686
|
+
resolve("unknown");
|
|
111687
|
+
});
|
|
111688
|
+
child.on("close", (code) => {
|
|
111689
|
+
clearTimeout(timer);
|
|
111690
|
+
resolve(code === 0 ? parseLockedReply(stdout) ?? "absent" : "absent");
|
|
111691
|
+
});
|
|
111692
|
+
});
|
|
111693
|
+
|
|
111694
|
+
// packages/omo-opencode/src/cli/service-auth/keystore.ts
|
|
111695
|
+
class KeychainLockedError extends SignInError {
|
|
111696
|
+
}
|
|
111697
|
+
var LOCKED = /-25308|errSecInteractionNotAllowed|interaction is not allowed|locked collection/i;
|
|
111698
|
+
var UNLOCKED_REUSE_MS = 30000;
|
|
111699
|
+
var fallbackNoticed = false;
|
|
111700
|
+
var stderrNoticeOncePerProcess = (message) => {
|
|
111701
|
+
if (fallbackNoticed)
|
|
111702
|
+
return;
|
|
111703
|
+
fallbackNoticed = true;
|
|
111704
|
+
process.stderr.write(`${message}
|
|
111705
|
+
`);
|
|
111706
|
+
};
|
|
111707
|
+
var isLocked = (error) => error instanceof Error && (LOCKED.test(error.message) || LOCKED.test(String(error.code ?? "")));
|
|
111650
111708
|
function credentialId(api) {
|
|
111651
111709
|
return createHash9("sha256").update(serviceOrigin(api)).digest("hex");
|
|
111652
111710
|
}
|
|
111653
|
-
function createCredentialStore(api, secrets = typeof Bun === "undefined" ? null : Bun.secrets, platform = process.platform) {
|
|
111711
|
+
function createCredentialStore(api, secrets = typeof Bun === "undefined" ? null : Bun.secrets, platform = process.platform, lockProbe = probeSecretServiceLock, notice = stderrNoticeOncePerProcess) {
|
|
111654
111712
|
if (!secrets)
|
|
111655
111713
|
throw new SignInError("OmO sign-in needs Bun 1.4 or newer with OS credential storage. No file fallback is available.");
|
|
111656
111714
|
const platformName = platform === "darwin" ? "macOS Keychain" : platform === "linux" ? "Linux Secret Service (libsecret and an unlocked keyring)" : platform === "win32" ? "Windows Credential Manager" : null;
|
|
111657
111715
|
if (platformName === null)
|
|
111658
111716
|
throw new SignInError("This platform has no supported OS credential store.");
|
|
111659
111717
|
const key = { service: "omo-cli", name: credentialId(api) };
|
|
111660
|
-
const unavailable = () => new SignInError(`Cannot access ${platformName}. Unlock or enable the OS credential store and try again. Credentials are never saved to a file.`);
|
|
111718
|
+
const unavailable = (error) => isLocked(error) ? new KeychainLockedError(`${platformName} is locked. Unlock it, then try again. Credentials are never saved to a file.`) : new SignInError(`Cannot access ${platformName}. Unlock or enable the OS credential store and try again. Credentials are never saved to a file.`);
|
|
111719
|
+
let unlockedUntil = 0;
|
|
111720
|
+
let noticed = false;
|
|
111721
|
+
const assertUsable = async () => {
|
|
111722
|
+
if (platform !== "linux" || Date.now() < unlockedUntil)
|
|
111723
|
+
return;
|
|
111724
|
+
const lock = await lockProbe();
|
|
111725
|
+
if (lock === "locked")
|
|
111726
|
+
throw new KeychainLockedError(`${platformName} is locked. Unlock it, then try again. Credentials are never saved to a file.`);
|
|
111727
|
+
if (lock === "unlocked") {
|
|
111728
|
+
unlockedUntil = Date.now() + UNLOCKED_REUSE_MS;
|
|
111729
|
+
return;
|
|
111730
|
+
}
|
|
111731
|
+
if (!noticed) {
|
|
111732
|
+
noticed = true;
|
|
111733
|
+
notice("omo: could not check whether the keyring is locked (gdbus or the Secret Service did not answer); using libsecret directly.");
|
|
111734
|
+
}
|
|
111735
|
+
};
|
|
111661
111736
|
return {
|
|
111662
111737
|
async read() {
|
|
111738
|
+
await assertUsable();
|
|
111663
111739
|
let value;
|
|
111664
111740
|
try {
|
|
111665
111741
|
value = await secrets.get(key);
|
|
111666
|
-
} catch {
|
|
111667
|
-
throw unavailable();
|
|
111742
|
+
} catch (error) {
|
|
111743
|
+
throw unavailable(error);
|
|
111668
111744
|
}
|
|
111669
111745
|
if (value === null)
|
|
111670
111746
|
return null;
|
|
@@ -111675,17 +111751,19 @@ function createCredentialStore(api, secrets = typeof Bun === "undefined" ? null
|
|
|
111675
111751
|
}
|
|
111676
111752
|
},
|
|
111677
111753
|
async write(value) {
|
|
111754
|
+
await assertUsable();
|
|
111678
111755
|
try {
|
|
111679
111756
|
await secrets.set({ ...key, value: JSON.stringify(credentialSchema.parse(value)) });
|
|
111680
|
-
} catch {
|
|
111681
|
-
throw unavailable();
|
|
111757
|
+
} catch (error) {
|
|
111758
|
+
throw unavailable(error);
|
|
111682
111759
|
}
|
|
111683
111760
|
},
|
|
111684
111761
|
async clear() {
|
|
111762
|
+
await assertUsable();
|
|
111685
111763
|
try {
|
|
111686
111764
|
await secrets.delete(key);
|
|
111687
|
-
} catch {
|
|
111688
|
-
throw unavailable();
|
|
111765
|
+
} catch (error) {
|
|
111766
|
+
throw unavailable(error);
|
|
111689
111767
|
}
|
|
111690
111768
|
}
|
|
111691
111769
|
};
|
|
@@ -112029,9 +112107,11 @@ async function reapStaleLock(lockPath, staleAfterMs = DEFAULT_STALE_AFTER_MS, de
|
|
|
112029
112107
|
// packages/omo-opencode/src/cli/service-auth/session.ts
|
|
112030
112108
|
class SessionEnded extends SignInError {
|
|
112031
112109
|
deviceRevoked;
|
|
112032
|
-
|
|
112110
|
+
code;
|
|
112111
|
+
constructor(message, deviceRevoked, code) {
|
|
112033
112112
|
super(message);
|
|
112034
112113
|
this.deviceRevoked = deviceRevoked;
|
|
112114
|
+
this.code = code;
|
|
112035
112115
|
}
|
|
112036
112116
|
}
|
|
112037
112117
|
var DEVICE_REVOKING_REFUSALS = new Set(["account_deleted", "reauth_required"]);
|
|
@@ -112063,7 +112143,7 @@ function createSession(options) {
|
|
|
112063
112143
|
} catch (error) {
|
|
112064
112144
|
if (error instanceof ApiRefusal && error.status < 500 && ["unauthorized", "account_deleted", "reauth_required", "invalid_grant"].includes(error.code)) {
|
|
112065
112145
|
await store.clear();
|
|
112066
|
-
throw new SessionEnded(error.code === "reauth_required" ? "This session was ended because its refresh token was reused. Sign in again with omo login." : "Sign in again with omo login.", DEVICE_REVOKING_REFUSALS.has(error.code));
|
|
112146
|
+
throw new SessionEnded(error.code === "reauth_required" ? "This session was ended because its refresh token was reused. Sign in again with omo login." : "Sign in again with omo login.", DEVICE_REVOKING_REFUSALS.has(error.code), error.code);
|
|
112067
112147
|
}
|
|
112068
112148
|
if (error instanceof RequestFailure && error.notSent || error instanceof ApiRefusal && error.status === 429 && error.code === "rate_limited") {
|
|
112069
112149
|
await store.write(current);
|
|
@@ -112081,6 +112161,9 @@ function createSession(options) {
|
|
|
112081
112161
|
async save(value) {
|
|
112082
112162
|
await locked(() => store.write(value));
|
|
112083
112163
|
},
|
|
112164
|
+
async update(action) {
|
|
112165
|
+
return locked(async () => action(await store.read()));
|
|
112166
|
+
},
|
|
112084
112167
|
async logout() {
|
|
112085
112168
|
return locked(async () => {
|
|
112086
112169
|
try {
|
|
@@ -112444,7 +112527,7 @@ async function boulder(options) {
|
|
|
112444
112527
|
return 0;
|
|
112445
112528
|
}
|
|
112446
112529
|
// packages/omo-opencode/src/cli/codex-ulw-loop.ts
|
|
112447
|
-
import { spawn as
|
|
112530
|
+
import { spawn as spawn6 } from "node:child_process";
|
|
112448
112531
|
import { existsSync as existsSync65, readFileSync as readFileSync43, realpathSync as realpathSync11 } from "node:fs";
|
|
112449
112532
|
import { homedir as homedir29 } from "node:os";
|
|
112450
112533
|
var ULW_LOOP_DELEGATION_SENTINEL = "OMO_ULW_LOOP_DELEGATED";
|
|
@@ -112474,7 +112557,7 @@ async function codexUlwLoop(args) {
|
|
|
112474
112557
|
return 1;
|
|
112475
112558
|
}
|
|
112476
112559
|
const { promise, resolve } = Promise.withResolvers();
|
|
112477
|
-
const child =
|
|
112560
|
+
const child = spawn6(command.executable, [...command.argsPrefix, ...args], {
|
|
112478
112561
|
stdio: "inherit",
|
|
112479
112562
|
env: { ...process.env, [ULW_LOOP_DELEGATION_SENTINEL]: "1" }
|
|
112480
112563
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lazycodex-ai",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.44",
|
|
4
4
|
"description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|