lazycodex-ai 5.1.61 → 5.1.62

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.
Files changed (94) hide show
  1. package/dist/cli/index.js +154 -27
  2. package/dist/cli/service-auth/index.d.ts +2 -1
  3. package/dist/cli/service-auth/session.d.ts +27 -0
  4. package/dist/cli/service-auth/sync-pin-retire.d.ts +7 -0
  5. package/dist/cli-node/index.js +154 -27
  6. package/package.json +1 -1
  7. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  8. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  9. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  10. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  11. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  12. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  13. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  14. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  15. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  16. package/packages/omo-codex/plugin/components/lcx/skills/lcx-doctor/SKILL.md +1 -1
  17. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  18. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  19. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  20. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  21. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  22. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  23. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  24. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  25. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  26. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  27. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  28. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
  29. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  30. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
  31. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  32. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  33. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  34. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  35. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  36. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  37. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  38. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  39. package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
  40. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  41. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  42. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  43. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  44. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  45. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  46. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  47. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  48. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  49. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  50. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  51. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  52. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  53. package/packages/omo-codex/plugin/package-lock.json +12 -12
  54. package/packages/omo-codex/plugin/package.json +1 -1
  55. package/packages/omo-codex/plugin/skills/browser/references/owned-engine/README.md +1 -1
  56. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
  57. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +2 -2
  58. package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +2 -2
  59. package/packages/omo-codex/plugin/skills/frontend/references/design/component-catalogs.md +1 -1
  60. package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +1 -1
  61. package/packages/omo-codex/plugin/skills/frontend/references/design/react-dev-tooling-skill.md +1 -1
  62. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-a-direction.md +5 -5
  63. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/routing.md +2 -2
  64. package/packages/omo-codex/plugin/skills/frontend/references/perfection/README.md +1 -1
  65. package/packages/omo-codex/plugin/skills/lcx-doctor/SKILL.md +1 -1
  66. package/packages/omo-codex/plugin/skills/programming/references/python/libraries.md +3 -3
  67. package/packages/omo-codex/plugin/skills/programming/references/python/one-liners.md +1 -1
  68. package/packages/omo-codex/plugin/skills/programming/references/python/pyproject-strict.md +1 -1
  69. package/packages/omo-codex/plugin/skills/programming/references/rust/libraries.md +2 -2
  70. package/packages/omo-codex/plugin/skills/refactor/SKILL.md +1 -1
  71. package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +1 -1
  72. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/README.md +1 -1
  73. package/packages/omo-codex/plugin/skills/ulw-execute/SKILL.md +1 -1
  74. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +2 -2
  75. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
  76. package/packages/shared-skills/skills/browser/references/owned-engine/README.md +1 -1
  77. package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
  78. package/packages/shared-skills/skills/frontend/SKILL.md +2 -2
  79. package/packages/shared-skills/skills/frontend/references/design/README.md +2 -2
  80. package/packages/shared-skills/skills/frontend/references/design/component-catalogs.md +1 -1
  81. package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +1 -1
  82. package/packages/shared-skills/skills/frontend/references/design/react-dev-tooling-skill.md +1 -1
  83. package/packages/shared-skills/skills/frontend/references/designpowers/lane-a-direction.md +5 -5
  84. package/packages/shared-skills/skills/frontend/references/designpowers/routing.md +2 -2
  85. package/packages/shared-skills/skills/frontend/references/perfection/README.md +1 -1
  86. package/packages/shared-skills/skills/programming/references/python/libraries.md +3 -3
  87. package/packages/shared-skills/skills/programming/references/python/one-liners.md +1 -1
  88. package/packages/shared-skills/skills/programming/references/python/pyproject-strict.md +1 -1
  89. package/packages/shared-skills/skills/programming/references/rust/libraries.md +2 -2
  90. package/packages/shared-skills/skills/refactor/SKILL.md +1 -1
  91. package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +1 -1
  92. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/README.md +1 -1
  93. package/packages/shared-skills/skills/ulw-execute/SKILL.md +1 -1
  94. package/packages/shared-skills/skills/ulw-research/SKILL.md +2 -2
@@ -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.61",
2136
+ version: "5.1.62",
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",
@@ -2320,7 +2320,7 @@ var init_package = __esm(() => {
2320
2320
  },
2321
2321
  devDependencies: {
2322
2322
  "@clack/prompts": "^1.8.1",
2323
- "@code-yeongyu/senpi": "2026.11.3-3",
2323
+ "@code-yeongyu/senpi": "2026.11.5-1",
2324
2324
  "@modelcontextprotocol/sdk": "^1.30.0",
2325
2325
  "@oh-my-opencode/agents-md-core": "workspace:*",
2326
2326
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
@@ -2385,18 +2385,18 @@ var init_package = __esm(() => {
2385
2385
  typescript: "^7.0.2"
2386
2386
  },
2387
2387
  optionalDependencies: {
2388
- "oh-my-opencode-darwin-arm64": "5.1.61",
2389
- "oh-my-opencode-darwin-x64": "5.1.61",
2390
- "oh-my-opencode-darwin-x64-baseline": "5.1.61",
2391
- "oh-my-opencode-linux-arm64": "5.1.61",
2392
- "oh-my-opencode-linux-arm64-musl": "5.1.61",
2393
- "oh-my-opencode-linux-x64": "5.1.61",
2394
- "oh-my-opencode-linux-x64-baseline": "5.1.61",
2395
- "oh-my-opencode-linux-x64-musl": "5.1.61",
2396
- "oh-my-opencode-linux-x64-musl-baseline": "5.1.61",
2397
- "oh-my-opencode-windows-arm64": "5.1.61",
2398
- "oh-my-opencode-windows-x64": "5.1.61",
2399
- "oh-my-opencode-windows-x64-baseline": "5.1.61"
2388
+ "oh-my-opencode-darwin-arm64": "5.1.62",
2389
+ "oh-my-opencode-darwin-x64": "5.1.62",
2390
+ "oh-my-opencode-darwin-x64-baseline": "5.1.62",
2391
+ "oh-my-opencode-linux-arm64": "5.1.62",
2392
+ "oh-my-opencode-linux-arm64-musl": "5.1.62",
2393
+ "oh-my-opencode-linux-x64": "5.1.62",
2394
+ "oh-my-opencode-linux-x64-baseline": "5.1.62",
2395
+ "oh-my-opencode-linux-x64-musl": "5.1.62",
2396
+ "oh-my-opencode-linux-x64-musl-baseline": "5.1.62",
2397
+ "oh-my-opencode-windows-arm64": "5.1.62",
2398
+ "oh-my-opencode-windows-x64": "5.1.62",
2399
+ "oh-my-opencode-windows-x64-baseline": "5.1.62"
2400
2400
  },
2401
2401
  overrides: {
2402
2402
  hono: "^4.13.8",
@@ -92789,7 +92789,7 @@ var package_default2;
92789
92789
  var init_package2 = __esm(() => {
92790
92790
  package_default2 = {
92791
92791
  name: "@oh-my-opencode/omo-codex",
92792
- version: "5.1.61",
92792
+ version: "5.1.62",
92793
92793
  type: "module",
92794
92794
  private: true,
92795
92795
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -104452,6 +104452,7 @@ var BuiltinSkillNameSchema = _enum([
104452
104452
  "debugging",
104453
104453
  "security-research",
104454
104454
  "security-review",
104455
+ "hyperplan",
104455
104456
  "visual-qa",
104456
104457
  "team-mode"
104457
104458
  ]);
@@ -109550,8 +109551,8 @@ var package_default3 = {
109550
109551
  },
109551
109552
  dependencies: {
109552
109553
  "@clack/prompts": "^1.8.1",
109553
- "@code-yeongyu/senpi": "2026.11.3-3",
109554
- "@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.11.3-3",
109554
+ "@code-yeongyu/senpi": "2026.11.5-1",
109555
+ "@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.11.5-1",
109555
109556
  "@modelcontextprotocol/sdk": "^1.30.0",
109556
109557
  "@oh-my-opencode/agents-md-core": "workspace:*",
109557
109558
  "@oh-my-opencode/boulder-state": "workspace:*",
@@ -112823,6 +112824,24 @@ function retryOnEintrSync(operation) {
112823
112824
 
112824
112825
  // packages/memory-core/src/fs/rename-contention.ts
112825
112826
  var CONTENTION_CODES = new Set(["EPERM", "EBUSY", "EACCES"]);
112827
+ var CONTENTION_DELAYS_MS = [10, 25, 50, 100, 200, 400];
112828
+ var sleepFor = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
112829
+ async function renameWithContentionRetry(from, to, deps) {
112830
+ const delays = deps.platform === "win32" ? deps.delaysMs ?? CONTENTION_DELAYS_MS : [];
112831
+ const sleep = deps.sleep ?? sleepFor;
112832
+ for (let attempt = 0;; attempt += 1) {
112833
+ try {
112834
+ await retryOnEintr(() => deps.admit === undefined ? deps.rename(from, to) : deps.admit(() => deps.rename(from, to)));
112835
+ return;
112836
+ } catch (error) {
112837
+ const delay = delays[attempt];
112838
+ const code = fsErrorCode(error);
112839
+ if (delay === undefined || code === undefined || !CONTENTION_CODES.has(code))
112840
+ throw error;
112841
+ await sleep(delay);
112842
+ }
112843
+ }
112844
+ }
112826
112845
 
112827
112846
  // packages/memory-core/src/fs/resilient.ts
112828
112847
  function isFunction2(value) {
@@ -112855,6 +112874,13 @@ function resilientNamespace(namespace, kind) {
112855
112874
  }
112856
112875
  var IDEMPOTENT_HANDLE_METHODS = new Set(["stat", "sync", "datasync", "chmod", "chown", "utimes", "truncate"]);
112857
112876
  var promises = resilientNamespace(fsp, "async");
112877
+ function rename8(from, to, admit) {
112878
+ return renameWithContentionRetry(from, to, {
112879
+ rename: (source, target) => fsp.rename(source, target),
112880
+ platform: process.platform,
112881
+ ...admit === undefined ? {} : { admit }
112882
+ });
112883
+ }
112858
112884
  var sync = resilientNamespace(fsSync, "sync");
112859
112885
  var {
112860
112886
  access: access3,
@@ -113750,15 +113776,60 @@ async function loginLoopback(session, options) {
113750
113776
  }
113751
113777
  }
113752
113778
 
113753
- // packages/omo-opencode/src/cli/service-auth/session.ts
113779
+ // packages/memory-core/src/sync/device-retire.ts
113780
+ import { createHash as createHash14, randomBytes as randomBytes6 } from "node:crypto";
113781
+ import { join as join109 } from "node:path";
113782
+
113783
+ // packages/memory-core/src/identity/layout.ts
113754
113784
  import { homedir as homedir32 } from "node:os";
113785
+ import { join as join107, resolve as resolve31 } from "node:path";
113786
+ var MEMORY_ROOT_ENV_VAR = "OMO_MEMORY_HOME";
113787
+ function defaultMemoryRoot() {
113788
+ return join107(homedir32(), ".omo", "memory");
113789
+ }
113790
+ function resolveMemoryRoot(env, cwd) {
113791
+ const override = env[MEMORY_ROOT_ENV_VAR];
113792
+ if (override === undefined || override.trim() === "") {
113793
+ return defaultMemoryRoot();
113794
+ }
113795
+ return resolve31(cwd, override);
113796
+ }
113797
+ // packages/memory-core/src/sync/pin-dir.ts
113798
+ import { join as join108 } from "node:path";
113799
+ var syncPinDir = (memoryRoot) => join108(memoryRoot, "sync-device");
113800
+
113801
+ // packages/memory-core/src/sync/device-retire.ts
113802
+ var trustAnchorRoot = (pinDir) => join109(pinDir, "trust-anchor");
113803
+ var trustAnchorKey = (account) => createHash14("sha256").update(account, "utf8").digest("base64url");
113804
+ var trustAnchorDir = (pinDir, account) => join109(trustAnchorRoot(pinDir), trustAnchorKey(account));
113805
+ var hasLiveTrustAnchor = async (pinDir) => {
113806
+ try {
113807
+ return (await readdir17(trustAnchorRoot(pinDir))).some((name) => !name.includes(".retired-"));
113808
+ } catch (error) {
113809
+ if (error instanceof Error && "code" in error && error.code === "ENOENT")
113810
+ return false;
113811
+ throw error;
113812
+ }
113813
+ };
113814
+ var retireSyncDevice = async (input) => {
113815
+ const dir = trustAnchorDir(input.pinDir, input.account);
113816
+ try {
113817
+ await rename8(dir, `${dir}.retired-${Date.now()}-${randomBytes6(4).toString("hex")}`);
113818
+ } catch (error) {
113819
+ if (!(error instanceof Error && ("code" in error) && error.code === "ENOENT"))
113820
+ throw error;
113821
+ }
113822
+ };
113823
+
113824
+ // packages/omo-opencode/src/cli/service-auth/session.ts
113825
+ import { homedir as homedir33 } from "node:os";
113755
113826
 
113756
113827
  // packages/omo-opencode/src/cli/service-auth/signed-out-marker.ts
113757
113828
  init_zod();
113758
- import { mkdir as mkdir12, readFile as readFile35, rename as rename8, rm as rm17, writeFile as writeFile17 } from "node:fs/promises";
113759
- import { dirname as dirname43, join as join107 } from "node:path";
113829
+ import { mkdir as mkdir12, readFile as readFile35, rename as rename9, rm as rm17, writeFile as writeFile17 } from "node:fs/promises";
113830
+ import { dirname as dirname43, join as join110 } from "node:path";
113760
113831
  var markerSchema = object({ device: string2().nullable(), at: string2() });
113761
- var signedOutMarkerPath = (home, credential) => join107(home, ".omo", "account-state", `${credential}.signed-out.json`);
113832
+ var signedOutMarkerPath = (home, credential) => join110(home, ".omo", "account-state", `${credential}.signed-out.json`);
113762
113833
  async function readSignedOutMarker(path) {
113763
113834
  const text = await readFile35(path, "utf8").catch(() => null);
113764
113835
  if (text === null)
@@ -113776,7 +113847,7 @@ async function writeSignedOutMarker(path, device) {
113776
113847
  await mkdir12(dirname43(path), { recursive: true, mode: 448 });
113777
113848
  const staging = `${path}.${process.pid}.tmp`;
113778
113849
  await writeFile17(staging, JSON.stringify({ device, at: new Date().toISOString() }), { mode: 384 });
113779
- await rename8(staging, path);
113850
+ await rename9(staging, path);
113780
113851
  }
113781
113852
  var clearSignedOutMarker = (path) => rm17(path, { force: true });
113782
113853
 
@@ -113791,11 +113862,18 @@ class SessionEnded extends SignInError {
113791
113862
  }
113792
113863
  }
113793
113864
  var DEVICE_REVOKING_REFUSALS = new Set(["account_deleted", "reauth_required", "device_revoked"]);
113865
+ var discardedOf = (credentials, cause) => ({
113866
+ kind: "credential",
113867
+ deviceId: credentials.device.id,
113868
+ accountId: credentials.accountId,
113869
+ owner: credentials.owner,
113870
+ cause
113871
+ });
113794
113872
  function createSession(options) {
113795
113873
  const api = serviceOrigin(options.api);
113796
113874
  const now = options.now ?? Date.now;
113797
- const { store, signal } = options;
113798
- const markerPath = signedOutMarkerPath(options.home ?? homedir32(), credentialId(api));
113875
+ const { store, signal, beforeKeysDiscarded } = options;
113876
+ const markerPath = signedOutMarkerPath(options.home ?? homedir33(), credentialId(api));
113799
113877
  async function locked(action) {
113800
113878
  signal?.throwIfAborted();
113801
113879
  return withCredentialLock(api, async () => {
@@ -113804,6 +113882,11 @@ function createSession(options) {
113804
113882
  }, options.home);
113805
113883
  }
113806
113884
  const request = (path, init) => requestApi(api, path, init, signal);
113885
+ const accountOf = async (access) => {
113886
+ const body = await request("/v1/me", { headers: { authorization: `Bearer ${access}` } }).catch(() => null);
113887
+ const id = typeof body === "object" && body !== null && "account" in body && typeof body.account === "object" && body.account !== null && "id" in body.account ? body.account.id : undefined;
113888
+ return typeof id === "string" && id !== "" ? id : undefined;
113889
+ };
113807
113890
  async function refreshed(current) {
113808
113891
  if (current.refreshState === "uncertain" || current.refreshAttempt !== undefined) {
113809
113892
  throw new SessionEnded(`Refresh recovery can no longer be proved safe. ${signInHint("again")}`, false, "refresh_recovery_expired");
@@ -113820,6 +113903,7 @@ function createSession(options) {
113820
113903
  if (error instanceof CredentialStoreError)
113821
113904
  throw error;
113822
113905
  if (error instanceof ApiRefusal && error.status < 500 && ["unauthorized", "account_deleted", "reauth_required", "invalid_grant", "device_revoked"].includes(error.code)) {
113906
+ await beforeKeysDiscarded(discardedOf(current, "refused"));
113823
113907
  await store.clear();
113824
113908
  throw new SessionEnded(error.code === "reauth_required" ? `This session was ended because its refresh token was reused. ${signInHint("again")}` : refusalMessage(refusalGuidance(error.code, error.status)), DEVICE_REVOKING_REFUSALS.has(error.code), error.code);
113825
113909
  }
@@ -113845,6 +113929,17 @@ function createSession(options) {
113845
113929
  },
113846
113930
  async save(value) {
113847
113931
  await locked(async () => {
113932
+ let stored;
113933
+ try {
113934
+ stored = await store.readAuthoritative();
113935
+ } catch (error) {
113936
+ if (!(error instanceof InvalidCredentialState))
113937
+ throw error;
113938
+ await beforeKeysDiscarded({ kind: "unreadable" });
113939
+ stored = null;
113940
+ }
113941
+ if (stored !== null && stored.device.id !== value.device.id)
113942
+ await beforeKeysDiscarded(discardedOf(stored, "replaced"));
113848
113943
  await store.write(value);
113849
113944
  await clearSignedOutMarker(markerPath);
113850
113945
  });
@@ -113871,12 +113966,16 @@ function createSession(options) {
113871
113966
  async logout() {
113872
113967
  return locked(async () => {
113873
113968
  let current = null;
113969
+ let account;
113874
113970
  try {
113875
113971
  current = await store.readAuthoritative();
113876
113972
  if (current !== null) {
113877
113973
  if (current.refreshState === "uncertain")
113878
113974
  return false;
113879
113975
  const access = Date.parse(current.accessTokenExpiresAt) <= now() ? (await refreshed(current)).accessToken : current.accessToken;
113976
+ if (current.accountId === undefined && current.owner === undefined && await beforeKeysDiscarded.wantsAccount?.() === true) {
113977
+ account = await accountOf(access);
113978
+ }
113880
113979
  await request(`/v1/devices/${encodeURIComponent(current.device.id)}`, {
113881
113980
  method: "DELETE",
113882
113981
  headers: { authorization: `Bearer ${access}` }
@@ -113891,6 +113990,9 @@ function createSession(options) {
113891
113990
  throw error;
113892
113991
  } finally {
113893
113992
  await writeSignedOutMarker(markerPath, current?.device.id ?? null);
113993
+ const stored = current === null ? null : await store.read().catch(() => current);
113994
+ if (stored !== null)
113995
+ await beforeKeysDiscarded(discardedOf(stored.accountId === undefined && account !== undefined ? { ...stored, accountId: account } : stored, "logout"));
113894
113996
  await store.clear();
113895
113997
  }
113896
113998
  });
@@ -113927,6 +114029,26 @@ function createSession(options) {
113927
114029
  };
113928
114030
  }
113929
114031
 
114032
+ // packages/omo-opencode/src/cli/service-auth/sync-pin-retire.ts
114033
+ var reason = (error) => error instanceof Error && ("code" in error) && typeof error.code === "string" ? error.code : "unknown";
114034
+ function retireSyncPinOnDiscard(options) {
114035
+ const hook = async (discarded) => {
114036
+ if (discarded.kind === "unreadable") {
114037
+ options.log("memory sync: a stored sign-in could not be read while it was replaced; its sync pin was left in place");
114038
+ return;
114039
+ }
114040
+ const account = discarded.owner?.accountId ?? discarded.accountId;
114041
+ if (account === undefined)
114042
+ return;
114043
+ try {
114044
+ await retireSyncDevice({ pinDir: options.pinDir(), account });
114045
+ } catch (error) {
114046
+ options.log(`memory sync: the sync pin could not be retired (${reason(error)}); it was left in place`);
114047
+ }
114048
+ };
114049
+ return Object.assign(hook, { wantsAccount: () => hasLiveTrustAnchor(options.pinDir()).catch(() => false) });
114050
+ }
114051
+
113930
114052
  // packages/omo-opencode/src/cli/service-auth/commands.ts
113931
114053
  async function ensureServiceAvailable(session, api) {
113932
114054
  try {
@@ -113969,7 +114091,12 @@ async function run2(action, options) {
113969
114091
  try {
113970
114092
  const api = serviceOrigin(options.api ?? process.env.OMO_SERVICE_API_URL ?? "https://api.omo.dev");
113971
114093
  const store = createCredentialStore(api, { wait: INTERACTIVE_READ_WAIT });
113972
- const session = createSession({ api, store, signal: controller.signal });
114094
+ const session = createSession({
114095
+ api,
114096
+ store,
114097
+ signal: controller.signal,
114098
+ beforeKeysDiscarded: retireSyncPinOnDiscard({ pinDir: () => syncPinDir(resolveMemoryRoot(process.env, process.cwd())), log: (line) => console.error(line) })
114099
+ });
113973
114100
  if (action === "logout") {
113974
114101
  const revoked = await session.logout();
113975
114102
  console.log("Signed out of OmO. Stored credentials and device keys were removed.");
@@ -114237,11 +114364,11 @@ async function boulder(options) {
114237
114364
  // packages/omo-opencode/src/cli/codex-ulw-loop.ts
114238
114365
  import { spawn as spawn6 } from "node:child_process";
114239
114366
  import { existsSync as existsSync67, readFileSync as readFileSync45, realpathSync as realpathSync14 } from "node:fs";
114240
- import { homedir as homedir33 } from "node:os";
114367
+ import { homedir as homedir34 } from "node:os";
114241
114368
  var ULW_LOOP_DELEGATION_SENTINEL = "OMO_ULW_LOOP_DELEGATED";
114242
114369
  function resolveCodexUlwLoopCommand(input = {}) {
114243
114370
  const env = input.env ?? process.env;
114244
- const homeDir = input.homeDir ?? homedir33();
114371
+ const homeDir = input.homeDir ?? homedir34();
114245
114372
  const localComponentBin = resolveLocalUlwLoopBin(env, homeDir);
114246
114373
  if (localComponentBin !== null)
114247
114374
  return { executable: localComponentBin, argsPrefix: [] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lazycodex-ai",
3
- "version": "5.1.61",
3
+ "version": "5.1.62",
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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omo",
3
- "version": "5.1.61",
3
+ "version": "5.1.62",
4
4
  "description": "One Codex plugin namespace for Yeongyu's local Codex components.",
5
5
  "author": {
6
6
  "name": "Yeongyu Kim",
@@ -8,7 +8,7 @@
8
8
  "command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
9
9
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
10
10
  "timeout": 30,
11
- "statusMessage": "(OmO 5.1.61) Checking Bootstrap Provisioning"
11
+ "statusMessage": "(OmO 5.1.62) Checking Bootstrap Provisioning"
12
12
  }
13
13
  ]
14
14
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sisyphuslabs/codex-bootstrap",
3
- "version": "5.1.61",
3
+ "version": "5.1.62",
4
4
  "description": "Codex SessionStart bootstrap component that provisions LazyCodex runtime dependencies from a detached worker.",
5
5
  "type": "module",
6
6
  "private": true,
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
10
10
  "timeout": 30,
11
- "statusMessage": "(OmO 5.1.61) Checking Comments"
11
+ "statusMessage": "(OmO 5.1.62) Checking Comments"
12
12
  }
13
13
  ]
14
14
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-comment-checker",
3
- "version": "5.1.61",
3
+ "version": "5.1.62",
4
4
  "description": "Codex plugin that runs comment-checker after edit-like PostToolUse hooks.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use",
10
10
  "timeout": 5,
11
- "statusMessage": "(OmO 5.1.61) Recommending Git Bash MCP"
11
+ "statusMessage": "(OmO 5.1.62) Recommending Git Bash MCP"
12
12
  }
13
13
  ]
14
14
  }
@@ -20,7 +20,7 @@
20
20
  "type": "command",
21
21
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
22
22
  "timeout": 5,
23
- "statusMessage": "(OmO 5.1.61) Resetting Git Bash MCP Reminder"
23
+ "statusMessage": "(OmO 5.1.62) Resetting Git Bash MCP Reminder"
24
24
  }
25
25
  ]
26
26
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sisyphuslabs/codex-git-bash-hook",
3
- "version": "5.1.61",
3
+ "version": "5.1.62",
4
4
  "description": "Codex hook component that reminds Windows sessions to prefer the OMO git_bash MCP.",
5
5
  "type": "module",
6
6
  "private": true,
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
10
10
  "timeout": 10,
11
- "statusMessage": "(OmO 5.1.61) Verifying LazyCodex Executor Evidence"
11
+ "statusMessage": "(OmO 5.1.62) Verifying LazyCodex Executor Evidence"
12
12
  }
13
13
  ]
14
14
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-lazycodex-executor-verify",
3
- "version": "5.1.61",
3
+ "version": "5.1.62",
4
4
  "description": "Codex SubagentStop evidence verifier for LazyCodex executor completions.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -67,7 +67,7 @@ sync_latest_source openai/codex "$LAZYCODEX_SOURCE_ROOT/chatgpt-subscription-sou
67
67
  - Latest LazyCodex version from `$LAZYCODEX_SOURCE_ROOT/lazycodex-source` (release tags or the version stamped in the repo) and latest Codex release (`gh release view --repo openai/codex`).
68
68
  - OS, install method, and `lazycodex` / `lazycodex-ai` bin links resolving (`command -v`).
69
69
  - Astra readiness. The LazyCodex catalog default is `gpt-6-astra`, which Codex only knows from codex-cli 0.153.1 onward. First release tag containing the `models.json` change: `rust-v0.153.1` (backport commit `5cc1c94b8e`). Reproduce on a full clone with tags: `git -C <codex-clone> log --format='%h %d' -S gpt-6-astra -- codex-rs/models-manager/models.json`, then `git -C <codex-clone> tag --contains 5cc1c94b8e | sort -V | head -1`; a shallow clone or one without tags returns nothing. Record the installed version from `codex --version`, the root `model` in `$CODEX_HOME/config.toml` (informational only, it doesn't change the verdict), and, when `$CODEX_HOME/models_cache.json` exists, whether it contains `gpt-6-astra` (`grep -c gpt-6-astra "${CODEX_HOME:-$HOME/.codex}/models_cache.json"`). Verdict: PASS when `codex --version` is 0.153.1 or newer and `models_cache.json` is either absent or lists `gpt-6-astra`. WARN when the version is older than 0.153.1, or the cache exists but lacks `gpt-6-astra`; remediation is upgrading Codex (`npm install -g @openai/codex@latest`, or the package manager that installed `codex`), then starting Codex once so `models_cache.json` refreshes.
70
- 3. Check config and wiring against the latest installer, not against assumptions. Read what the current installer under `$LAZYCODEX_SOURCE_ROOT/lazycodex-source` writes (installer sources live in the omo-codex package, e.g. `scripts/install/`), then verify the local equivalents:
70
+ 3. Check config and wiring against the latest installer, not against assumptions. Read what the current installer under `$LAZYCODEX_SOURCE_ROOT/lazycodex-source` writes (in that checkout, `plugins/omo/scripts/migrate-codex-config.mjs` and its `migrate-codex-config/` helpers produce the LazyCodex-managed `config.toml` entries, and `plugins/omo/.codex-plugin/plugin.json` declares the payload), then verify the local equivalents:
71
71
  - `$CODEX_HOME/config.toml` exists and parses; LazyCodex-managed entries match what the latest installer would write.
72
72
  - Plugin payload present and non-empty: read `.codex-plugin/plugin.json`; when that manifest declares a `hooks` array, validate every direct hook path declared by the manifest; require `hooks/hooks.json` only when the manifest declares it; do not require retired paths such as `components/workflow-selector` or `hooks/user-prompt-submit-selecting-lazycodex-workflow.json` unless the current manifest declares them.
73
73
  - Verify the manifest-declared runtime payload, not a remembered source tree. Current payload includes `skills/`, `.mcp.json`, root CLI runtimes such as `dist/cli/index.js` and `dist/cli-node/index.js`, and every hook/MCP `components/*/dist/*.js` target referenced by installed manifests.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "5.1.61",
4
- "inputDigest": "sha256:ce96c61ce069cbd3ce8e6a5675d4198dac742909bd8f3b91b2b9713ee68411a6",
3
+ "version": "5.1.62",
4
+ "inputDigest": "sha256:02c829fe463bfc768c81c04b28cf3d1ecb00b9d4b833753b6dc94c9a65b6f052",
5
5
  "outputs": [
6
6
  {
7
7
  "path": "cli.d.ts",
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
10
10
  "timeout": 60,
11
- "statusMessage": "(OmO 5.1.61) Checking LSP Diagnostics"
11
+ "statusMessage": "(OmO 5.1.62) Checking LSP Diagnostics"
12
12
  }
13
13
  ]
14
14
  }
@@ -21,7 +21,7 @@
21
21
  "type": "command",
22
22
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
23
23
  "timeout": 5,
24
- "statusMessage": "(OmO 5.1.61) Resetting LSP Diagnostics Cache"
24
+ "statusMessage": "(OmO 5.1.62) Resetting LSP Diagnostics Cache"
25
25
  }
26
26
  ]
27
27
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-lsp",
3
- "version": "5.1.61",
3
+ "version": "5.1.62",
4
4
  "description": "Codex plugin that exposes Language Server Protocol tools and post-edit diagnostics.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start",
9
9
  "timeout": 10,
10
- "statusMessage": "(OmO 5.1.61) Loading Project Rules"
10
+ "statusMessage": "(OmO 5.1.62) Loading Project Rules"
11
11
  }
12
12
  ]
13
13
  }
@@ -19,7 +19,7 @@
19
19
  "type": "command",
20
20
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit",
21
21
  "timeout": 10,
22
- "statusMessage": "(OmO 5.1.61) Loading Project Rules"
22
+ "statusMessage": "(OmO 5.1.62) Loading Project Rules"
23
23
  }
24
24
  ]
25
25
  }
@@ -32,7 +32,7 @@
32
32
  "type": "command",
33
33
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
34
34
  "timeout": 10,
35
- "statusMessage": "(OmO 5.1.61) Matching Project Rules"
35
+ "statusMessage": "(OmO 5.1.62) Matching Project Rules"
36
36
  }
37
37
  ]
38
38
  }
@@ -45,7 +45,7 @@
45
45
  "type": "command",
46
46
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
47
47
  "timeout": 10,
48
- "statusMessage": "(OmO 5.1.61) Resetting Project Rule Cache"
48
+ "statusMessage": "(OmO 5.1.62) Resetting Project Rule Cache"
49
49
  }
50
50
  ]
51
51
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-rules",
3
- "version": "5.1.61",
3
+ "version": "5.1.62",
4
4
  "description": "Codex plugin that injects project rule files into model context through lifecycle hooks.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
10
10
  "timeout": 10,
11
- "statusMessage": "(OmO 5.1.61) Checking Thread Title Hygiene"
11
+ "statusMessage": "(OmO 5.1.62) Checking Thread Title Hygiene"
12
12
  }
13
13
  ]
14
14
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sisyphuslabs/codex-teammode",
3
- "version": "5.1.61",
3
+ "version": "5.1.62",
4
4
  "description": "Codex team-mode hook component that keeps background thread titles descriptive after create_thread.",
5
5
  "type": "module",
6
6
  "private": true,
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start",
9
9
  "timeout": 5,
10
- "statusMessage": "(OmO 5.1.61) Recording Session Telemetry"
10
+ "statusMessage": "(OmO 5.1.62) Recording Session Telemetry"
11
11
  }
12
12
  ]
13
13
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-telemetry",
3
- "version": "5.1.61",
3
+ "version": "5.1.62",
4
4
  "description": "Codex plugin component that emits omo-codex anonymous daily-active telemetry on SessionStart.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit",
9
9
  "timeout": 5,
10
- "statusMessage": "(OmO 5.1.61) Checking Ultrawork Trigger"
10
+ "statusMessage": "(OmO 5.1.62) Checking Ultrawork Trigger"
11
11
  }
12
12
  ]
13
13
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-ultrawork",
3
- "version": "5.1.61",
3
+ "version": "5.1.62",
4
4
  "description": "Codex plugin that injects the ultrawork orchestration directive and ships LazyCodex planning, review, QA, and gate agent roles.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/ulw-execute-continuation/dist/cli.js\" hook stop",
9
9
  "timeout": 10,
10
- "statusMessage": "(OmO 5.1.61) Checking Ulw-Execute Continuation"
10
+ "statusMessage": "(OmO 5.1.62) Checking Ulw-Execute Continuation"
11
11
  }
12
12
  ]
13
13
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-ulw-execute-continuation",
3
- "version": "5.1.61",
3
+ "version": "5.1.62",
4
4
  "description": "Codex Stop hook continuation injector for omo-codex ulw-execute plans.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",