lazycodex-ai 4.18.1 → 4.18.2

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 (102) hide show
  1. package/dist/cli/index.js +57 -18
  2. package/dist/cli-node/index.js +57 -18
  3. package/package.json +1 -1
  4. package/packages/git-bash-mcp/dist/cli.js +81 -19
  5. package/packages/lsp-daemon/dist/cli.js +262 -63
  6. package/packages/lsp-daemon/dist/client.js +194 -50
  7. package/packages/lsp-daemon/dist/daemon-client.d.ts +2 -2
  8. package/packages/lsp-daemon/dist/daemon-client.js +26 -2
  9. package/packages/lsp-daemon/dist/ensure-daemon.d.ts +5 -4
  10. package/packages/lsp-daemon/dist/ensure-daemon.js +79 -18
  11. package/packages/lsp-daemon/dist/index.js +262 -63
  12. package/packages/lsp-daemon/dist/proxy.d.ts +2 -0
  13. package/packages/lsp-daemon/dist/proxy.js +79 -23
  14. package/packages/lsp-tools-mcp/dist/cli.js +82 -20
  15. package/packages/lsp-tools-mcp/dist/mcp.js +82 -20
  16. package/packages/lsp-tools-mcp/dist/tools.js +1 -1
  17. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  18. package/packages/omo-codex/plugin/.mcp.json +2 -1
  19. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  20. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  21. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +100 -28
  22. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +100 -28
  23. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  24. package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +21 -9
  25. package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +35 -0
  26. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge-lifecycle.test.ts +69 -0
  27. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +57 -1
  28. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  29. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  30. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  31. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  32. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  33. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  34. package/packages/omo-codex/plugin/components/lsp/.mcp.json +2 -1
  35. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  36. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +113 -31
  37. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  38. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  39. package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +1 -0
  40. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.5.md +1 -1
  41. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +5 -3
  42. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  43. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  44. package/packages/omo-codex/plugin/components/start-work-continuation/README.md +2 -2
  45. package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +3 -3
  46. package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +2 -2
  47. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  48. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  49. package/packages/omo-codex/plugin/components/start-work-continuation/src/boulder-reader.ts +1 -1
  50. package/packages/omo-codex/plugin/components/start-work-continuation/src/codex-hook.ts +1 -1
  51. package/packages/omo-codex/plugin/components/start-work-continuation/test/boulder-reader.test.ts +15 -1
  52. package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +20 -0
  53. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  54. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  55. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  56. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  57. package/packages/omo-codex/plugin/components/ultrawork/directive.md +50 -33
  58. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  59. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  60. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +50 -33
  61. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +50 -33
  62. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +3 -3
  63. package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +5 -6
  64. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  65. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  66. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +1 -1
  67. package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +5 -6
  68. package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +2 -2
  69. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  70. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  71. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  72. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  73. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  74. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  75. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  76. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  77. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  78. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  79. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  80. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  81. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  82. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  83. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  84. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  85. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  86. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  87. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  88. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  89. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  90. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  91. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  92. package/packages/omo-codex/plugin/package-lock.json +13 -13
  93. package/packages/omo-codex/plugin/package.json +1 -1
  94. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +10 -2
  95. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +7 -0
  96. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +3 -2
  97. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +50 -33
  98. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +1 -1
  99. package/packages/omo-codex/plugin/test/mcp-research-servers.test.mjs +1 -0
  100. package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +7 -0
  101. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +35 -4
  102. package/packages/omo-codex/scripts/install-dist/install-local.mjs +1 -1
package/dist/cli/index.js CHANGED
@@ -2145,7 +2145,7 @@ var package_default;
2145
2145
  var init_package = __esm(() => {
2146
2146
  package_default = {
2147
2147
  name: "oh-my-opencode",
2148
- version: "4.18.1",
2148
+ version: "4.18.2",
2149
2149
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
2150
2150
  main: "./dist/index.js",
2151
2151
  types: "dist/index.d.ts",
@@ -2357,18 +2357,18 @@ var init_package = __esm(() => {
2357
2357
  typescript: "^6.0.3"
2358
2358
  },
2359
2359
  optionalDependencies: {
2360
- "oh-my-opencode-darwin-arm64": "4.18.1",
2361
- "oh-my-opencode-darwin-x64": "4.18.1",
2362
- "oh-my-opencode-darwin-x64-baseline": "4.18.1",
2363
- "oh-my-opencode-linux-arm64": "4.18.1",
2364
- "oh-my-opencode-linux-arm64-musl": "4.18.1",
2365
- "oh-my-opencode-linux-x64": "4.18.1",
2366
- "oh-my-opencode-linux-x64-baseline": "4.18.1",
2367
- "oh-my-opencode-linux-x64-musl": "4.18.1",
2368
- "oh-my-opencode-linux-x64-musl-baseline": "4.18.1",
2369
- "oh-my-opencode-windows-arm64": "4.18.1",
2370
- "oh-my-opencode-windows-x64": "4.18.1",
2371
- "oh-my-opencode-windows-x64-baseline": "4.18.1"
2360
+ "oh-my-opencode-darwin-arm64": "4.18.2",
2361
+ "oh-my-opencode-darwin-x64": "4.18.2",
2362
+ "oh-my-opencode-darwin-x64-baseline": "4.18.2",
2363
+ "oh-my-opencode-linux-arm64": "4.18.2",
2364
+ "oh-my-opencode-linux-arm64-musl": "4.18.2",
2365
+ "oh-my-opencode-linux-x64": "4.18.2",
2366
+ "oh-my-opencode-linux-x64-baseline": "4.18.2",
2367
+ "oh-my-opencode-linux-x64-musl": "4.18.2",
2368
+ "oh-my-opencode-linux-x64-musl-baseline": "4.18.2",
2369
+ "oh-my-opencode-windows-arm64": "4.18.2",
2370
+ "oh-my-opencode-windows-x64": "4.18.2",
2371
+ "oh-my-opencode-windows-x64-baseline": "4.18.2"
2372
2372
  },
2373
2373
  overrides: {
2374
2374
  "@earendil-works/pi-agent-core": "0.80.3",
@@ -9222,7 +9222,7 @@ var init_agent_model_requirements = __esm(() => {
9222
9222
  hephaestus: {
9223
9223
  fallbackChain: [
9224
9224
  {
9225
- providers: ["openai", "vercel"],
9225
+ providers: ["openai", "github-copilot", "vercel"],
9226
9226
  model: "gpt-5.6-sol",
9227
9227
  variant: "high"
9228
9228
  },
@@ -9333,6 +9333,11 @@ var init_agent_model_requirements = __esm(() => {
9333
9333
  model: "gpt-5.6-sol",
9334
9334
  variant: "xhigh"
9335
9335
  },
9336
+ {
9337
+ providers: ["github-copilot"],
9338
+ model: "gpt-5.6-sol",
9339
+ variant: "high"
9340
+ },
9336
9341
  {
9337
9342
  providers: ["openai", "github-copilot", "opencode", "vercel"],
9338
9343
  model: "gpt-5.5",
@@ -9411,6 +9416,11 @@ var init_category_model_requirements = __esm(() => {
9411
9416
  model: "gpt-5.6-sol",
9412
9417
  variant: "xhigh"
9413
9418
  },
9419
+ {
9420
+ providers: ["github-copilot"],
9421
+ model: "gpt-5.6-sol",
9422
+ variant: "high"
9423
+ },
9414
9424
  {
9415
9425
  providers: ["openai", "opencode", "vercel"],
9416
9426
  model: "gpt-5.5",
@@ -9437,7 +9447,12 @@ var init_category_model_requirements = __esm(() => {
9437
9447
  variant: "xhigh"
9438
9448
  },
9439
9449
  {
9440
- providers: ["openai", "vercel"],
9450
+ providers: ["github-copilot"],
9451
+ model: "gpt-5.6-terra",
9452
+ variant: "high"
9453
+ },
9454
+ {
9455
+ providers: ["openai", "github-copilot", "vercel"],
9441
9456
  model: "gpt-5.6-sol",
9442
9457
  variant: "high"
9443
9458
  },
@@ -9504,6 +9519,11 @@ var init_category_model_requirements = __esm(() => {
9504
9519
  model: "gpt-5.6-luna",
9505
9520
  variant: "xhigh"
9506
9521
  },
9522
+ {
9523
+ providers: ["github-copilot"],
9524
+ model: "gpt-5.6-luna",
9525
+ variant: "high"
9526
+ },
9507
9527
  {
9508
9528
  providers: ["anthropic", "github-copilot", "opencode", "vercel"],
9509
9529
  model: "claude-sonnet-4-6"
@@ -9593,9 +9613,12 @@ function stripProviderPrefixForAliasLookup(normalizedModelID) {
9593
9613
  }
9594
9614
  return normalizedModelID.slice(slashIndex + 1);
9595
9615
  }
9596
- function resolveModelIDAlias(modelID) {
9616
+ function resolveModelIDAlias(modelID, providerID) {
9597
9617
  const requestedModelID = normalizeLookupModelID(modelID);
9598
9618
  const aliasLookupModelID = stripProviderPrefixForAliasLookup(requestedModelID);
9619
+ const normalizedProviderID = providerID ? normalizeLookupModelID(providerID) : undefined;
9620
+ const providerPrefixEnd = requestedModelID.indexOf("/");
9621
+ const embeddedProviderID = providerPrefixEnd > 0 ? requestedModelID.slice(0, providerPrefixEnd) : undefined;
9599
9622
  const exactRule = EXACT_ALIAS_RULES_BY_MODEL.get(aliasLookupModelID);
9600
9623
  if (exactRule) {
9601
9624
  return {
@@ -9606,6 +9629,13 @@ function resolveModelIDAlias(modelID) {
9606
9629
  };
9607
9630
  }
9608
9631
  for (const rule of PATTERN_ALIAS_RULES) {
9632
+ if (rule.providerIDs) {
9633
+ const matchesProviderID = normalizedProviderID !== undefined && rule.providerIDs.includes(normalizedProviderID);
9634
+ const matchesEmbeddedProviderID = normalizedProviderID !== undefined && rule.allowedSubproviderHosts?.includes(normalizedProviderID) === true && embeddedProviderID !== undefined && rule.providerIDs.includes(embeddedProviderID);
9635
+ if (!matchesProviderID && !matchesEmbeddedProviderID) {
9636
+ continue;
9637
+ }
9638
+ }
9609
9639
  if (!rule.match(aliasLookupModelID)) {
9610
9640
  continue;
9611
9641
  }
@@ -9646,6 +9676,14 @@ var init_model_capability_aliases = __esm(() => {
9646
9676
  ];
9647
9677
  EXACT_ALIAS_RULES_BY_MODEL = new Map(EXACT_ALIAS_RULES.map((rule) => [rule.aliasModelID, rule]));
9648
9678
  PATTERN_ALIAS_RULES = [
9679
+ {
9680
+ ruleID: "openai-gpt-5.6-fast-service-tier-alias",
9681
+ description: "Normalizes OpenCode's OpenAI GPT-5.6 fast service-tier IDs to canonical snapshot IDs.",
9682
+ providerIDs: ["openai"],
9683
+ allowedSubproviderHosts: ["vercel"],
9684
+ match: (normalizedModelID) => /^gpt-5\.6-(?:sol|terra|luna)-fast$/.test(normalizedModelID),
9685
+ canonicalize: (normalizedModelID) => normalizedModelID.slice(0, -"-fast".length)
9686
+ },
9649
9687
  {
9650
9688
  ruleID: "claude-thinking-legacy-alias",
9651
9689
  description: "Normalizes the legacy claude-opus-4-7-thinking id to the canonical snapshot ID.",
@@ -10313,7 +10351,7 @@ function getProviderOverride(providerID, modelID) {
10313
10351
  return GITHUB_COPILOT_GPT5_MODEL.test(normalizeLookupModelID2(modelID)) ? GITHUB_COPILOT_GPT5_OVERRIDE : undefined;
10314
10352
  }
10315
10353
  function getModelCapabilities(input) {
10316
- const canonicalization = resolveModelIDAlias(input.modelID);
10354
+ const canonicalization = resolveModelIDAlias(input.modelID, input.providerID);
10317
10355
  const override = getOverride(input.modelID);
10318
10356
  const providerOverride = getProviderOverride(input.providerID, canonicalization.canonicalModelID);
10319
10357
  const runtimeModel = readRuntimeModel(input.runtimeModel ?? input.providerCache?.findProviderModelMetadata(input.providerID, input.modelID));
@@ -11418,6 +11456,7 @@ var init_opencode_storage_detection = __esm(() => {
11418
11456
  var opencodePluginsCache;
11419
11457
  var init_load_opencode_plugins = __esm(() => {
11420
11458
  init_jsonc_parser2();
11459
+ init_opencode_config_dir();
11421
11460
  opencodePluginsCache = new Map;
11422
11461
  });
11423
11462
 
@@ -72602,7 +72641,7 @@ var package_default2;
72602
72641
  var init_package2 = __esm(() => {
72603
72642
  package_default2 = {
72604
72643
  name: "@oh-my-opencode/omo-codex",
72605
- version: "4.18.1",
72644
+ version: "4.18.2",
72606
72645
  type: "module",
72607
72646
  private: true,
72608
72647
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -2146,7 +2146,7 @@ var package_default;
2146
2146
  var init_package = __esm(() => {
2147
2147
  package_default = {
2148
2148
  name: "oh-my-opencode",
2149
- version: "4.18.1",
2149
+ version: "4.18.2",
2150
2150
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
2151
2151
  main: "./dist/index.js",
2152
2152
  types: "dist/index.d.ts",
@@ -2358,18 +2358,18 @@ var init_package = __esm(() => {
2358
2358
  typescript: "^6.0.3"
2359
2359
  },
2360
2360
  optionalDependencies: {
2361
- "oh-my-opencode-darwin-arm64": "4.18.1",
2362
- "oh-my-opencode-darwin-x64": "4.18.1",
2363
- "oh-my-opencode-darwin-x64-baseline": "4.18.1",
2364
- "oh-my-opencode-linux-arm64": "4.18.1",
2365
- "oh-my-opencode-linux-arm64-musl": "4.18.1",
2366
- "oh-my-opencode-linux-x64": "4.18.1",
2367
- "oh-my-opencode-linux-x64-baseline": "4.18.1",
2368
- "oh-my-opencode-linux-x64-musl": "4.18.1",
2369
- "oh-my-opencode-linux-x64-musl-baseline": "4.18.1",
2370
- "oh-my-opencode-windows-arm64": "4.18.1",
2371
- "oh-my-opencode-windows-x64": "4.18.1",
2372
- "oh-my-opencode-windows-x64-baseline": "4.18.1"
2361
+ "oh-my-opencode-darwin-arm64": "4.18.2",
2362
+ "oh-my-opencode-darwin-x64": "4.18.2",
2363
+ "oh-my-opencode-darwin-x64-baseline": "4.18.2",
2364
+ "oh-my-opencode-linux-arm64": "4.18.2",
2365
+ "oh-my-opencode-linux-arm64-musl": "4.18.2",
2366
+ "oh-my-opencode-linux-x64": "4.18.2",
2367
+ "oh-my-opencode-linux-x64-baseline": "4.18.2",
2368
+ "oh-my-opencode-linux-x64-musl": "4.18.2",
2369
+ "oh-my-opencode-linux-x64-musl-baseline": "4.18.2",
2370
+ "oh-my-opencode-windows-arm64": "4.18.2",
2371
+ "oh-my-opencode-windows-x64": "4.18.2",
2372
+ "oh-my-opencode-windows-x64-baseline": "4.18.2"
2373
2373
  },
2374
2374
  overrides: {
2375
2375
  "@earendil-works/pi-agent-core": "0.80.3",
@@ -9223,7 +9223,7 @@ var init_agent_model_requirements = __esm(() => {
9223
9223
  hephaestus: {
9224
9224
  fallbackChain: [
9225
9225
  {
9226
- providers: ["openai", "vercel"],
9226
+ providers: ["openai", "github-copilot", "vercel"],
9227
9227
  model: "gpt-5.6-sol",
9228
9228
  variant: "high"
9229
9229
  },
@@ -9334,6 +9334,11 @@ var init_agent_model_requirements = __esm(() => {
9334
9334
  model: "gpt-5.6-sol",
9335
9335
  variant: "xhigh"
9336
9336
  },
9337
+ {
9338
+ providers: ["github-copilot"],
9339
+ model: "gpt-5.6-sol",
9340
+ variant: "high"
9341
+ },
9337
9342
  {
9338
9343
  providers: ["openai", "github-copilot", "opencode", "vercel"],
9339
9344
  model: "gpt-5.5",
@@ -9412,6 +9417,11 @@ var init_category_model_requirements = __esm(() => {
9412
9417
  model: "gpt-5.6-sol",
9413
9418
  variant: "xhigh"
9414
9419
  },
9420
+ {
9421
+ providers: ["github-copilot"],
9422
+ model: "gpt-5.6-sol",
9423
+ variant: "high"
9424
+ },
9415
9425
  {
9416
9426
  providers: ["openai", "opencode", "vercel"],
9417
9427
  model: "gpt-5.5",
@@ -9438,7 +9448,12 @@ var init_category_model_requirements = __esm(() => {
9438
9448
  variant: "xhigh"
9439
9449
  },
9440
9450
  {
9441
- providers: ["openai", "vercel"],
9451
+ providers: ["github-copilot"],
9452
+ model: "gpt-5.6-terra",
9453
+ variant: "high"
9454
+ },
9455
+ {
9456
+ providers: ["openai", "github-copilot", "vercel"],
9442
9457
  model: "gpt-5.6-sol",
9443
9458
  variant: "high"
9444
9459
  },
@@ -9505,6 +9520,11 @@ var init_category_model_requirements = __esm(() => {
9505
9520
  model: "gpt-5.6-luna",
9506
9521
  variant: "xhigh"
9507
9522
  },
9523
+ {
9524
+ providers: ["github-copilot"],
9525
+ model: "gpt-5.6-luna",
9526
+ variant: "high"
9527
+ },
9508
9528
  {
9509
9529
  providers: ["anthropic", "github-copilot", "opencode", "vercel"],
9510
9530
  model: "claude-sonnet-4-6"
@@ -9594,9 +9614,12 @@ function stripProviderPrefixForAliasLookup(normalizedModelID) {
9594
9614
  }
9595
9615
  return normalizedModelID.slice(slashIndex + 1);
9596
9616
  }
9597
- function resolveModelIDAlias(modelID) {
9617
+ function resolveModelIDAlias(modelID, providerID) {
9598
9618
  const requestedModelID = normalizeLookupModelID(modelID);
9599
9619
  const aliasLookupModelID = stripProviderPrefixForAliasLookup(requestedModelID);
9620
+ const normalizedProviderID = providerID ? normalizeLookupModelID(providerID) : undefined;
9621
+ const providerPrefixEnd = requestedModelID.indexOf("/");
9622
+ const embeddedProviderID = providerPrefixEnd > 0 ? requestedModelID.slice(0, providerPrefixEnd) : undefined;
9600
9623
  const exactRule = EXACT_ALIAS_RULES_BY_MODEL.get(aliasLookupModelID);
9601
9624
  if (exactRule) {
9602
9625
  return {
@@ -9607,6 +9630,13 @@ function resolveModelIDAlias(modelID) {
9607
9630
  };
9608
9631
  }
9609
9632
  for (const rule of PATTERN_ALIAS_RULES) {
9633
+ if (rule.providerIDs) {
9634
+ const matchesProviderID = normalizedProviderID !== undefined && rule.providerIDs.includes(normalizedProviderID);
9635
+ const matchesEmbeddedProviderID = normalizedProviderID !== undefined && rule.allowedSubproviderHosts?.includes(normalizedProviderID) === true && embeddedProviderID !== undefined && rule.providerIDs.includes(embeddedProviderID);
9636
+ if (!matchesProviderID && !matchesEmbeddedProviderID) {
9637
+ continue;
9638
+ }
9639
+ }
9610
9640
  if (!rule.match(aliasLookupModelID)) {
9611
9641
  continue;
9612
9642
  }
@@ -9647,6 +9677,14 @@ var init_model_capability_aliases = __esm(() => {
9647
9677
  ];
9648
9678
  EXACT_ALIAS_RULES_BY_MODEL = new Map(EXACT_ALIAS_RULES.map((rule) => [rule.aliasModelID, rule]));
9649
9679
  PATTERN_ALIAS_RULES = [
9680
+ {
9681
+ ruleID: "openai-gpt-5.6-fast-service-tier-alias",
9682
+ description: "Normalizes OpenCode's OpenAI GPT-5.6 fast service-tier IDs to canonical snapshot IDs.",
9683
+ providerIDs: ["openai"],
9684
+ allowedSubproviderHosts: ["vercel"],
9685
+ match: (normalizedModelID) => /^gpt-5\.6-(?:sol|terra|luna)-fast$/.test(normalizedModelID),
9686
+ canonicalize: (normalizedModelID) => normalizedModelID.slice(0, -"-fast".length)
9687
+ },
9650
9688
  {
9651
9689
  ruleID: "claude-thinking-legacy-alias",
9652
9690
  description: "Normalizes the legacy claude-opus-4-7-thinking id to the canonical snapshot ID.",
@@ -10314,7 +10352,7 @@ function getProviderOverride(providerID, modelID) {
10314
10352
  return GITHUB_COPILOT_GPT5_MODEL.test(normalizeLookupModelID2(modelID)) ? GITHUB_COPILOT_GPT5_OVERRIDE : undefined;
10315
10353
  }
10316
10354
  function getModelCapabilities(input) {
10317
- const canonicalization = resolveModelIDAlias(input.modelID);
10355
+ const canonicalization = resolveModelIDAlias(input.modelID, input.providerID);
10318
10356
  const override = getOverride(input.modelID);
10319
10357
  const providerOverride = getProviderOverride(input.providerID, canonicalization.canonicalModelID);
10320
10358
  const runtimeModel = readRuntimeModel(input.runtimeModel ?? input.providerCache?.findProviderModelMetadata(input.providerID, input.modelID));
@@ -11419,6 +11457,7 @@ var init_opencode_storage_detection = __esm(() => {
11419
11457
  var opencodePluginsCache;
11420
11458
  var init_load_opencode_plugins = __esm(() => {
11421
11459
  init_jsonc_parser2();
11460
+ init_opencode_config_dir();
11422
11461
  opencodePluginsCache = new Map;
11423
11462
  });
11424
11463
 
@@ -72658,7 +72697,7 @@ var package_default2;
72658
72697
  var init_package2 = __esm(() => {
72659
72698
  package_default2 = {
72660
72699
  name: "@oh-my-opencode/omo-codex",
72661
- version: "4.18.1",
72700
+ version: "4.18.2",
72662
72701
  type: "module",
72663
72702
  private: true,
72664
72703
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lazycodex-ai",
3
- "version": "4.18.1",
3
+ "version": "4.18.2",
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",
@@ -17,6 +17,9 @@ function errorResponse(id, code, message, data) {
17
17
  function jsonRpcId(value) {
18
18
  return typeof value === "string" || typeof value === "number" || value === null ? value : null;
19
19
  }
20
+ function messageFromError(error) {
21
+ return error instanceof Error ? error.message : String(error);
22
+ }
20
23
  // ../mcp-stdio-core/src/transport.ts
21
24
  var HEADER_SEPARATOR = Buffer.from(`\r
22
25
  \r
@@ -39,16 +42,45 @@ async function* readStdioJsonRpcMessages(input) {
39
42
  yield parseJsonPayload(trailing, "line");
40
43
  }
41
44
  }
42
- function writeStdioJsonRpcResponse(output, response, responseMode) {
45
+ async function writeStdioJsonRpcResponse(output, response, responseMode) {
43
46
  const body = JSON.stringify(response);
44
- if (responseMode === "framed") {
45
- output.write(`Content-Length: ${Buffer.byteLength(body, "utf8")}\r
47
+ const payload = responseMode === "framed" ? `Content-Length: ${Buffer.byteLength(body, "utf8")}\r
46
48
  \r
47
- ${body}`);
48
- return;
49
- }
50
- output.write(`${body}
51
- `);
49
+ ${body}` : `${body}
50
+ `;
51
+ await writeChunk(output, payload);
52
+ }
53
+ function writeChunk(output, chunk) {
54
+ return new Promise((resolve, reject) => {
55
+ let settled = false;
56
+ const onError = (error) => {
57
+ if (settled)
58
+ return;
59
+ settled = true;
60
+ reject(error);
61
+ };
62
+ output.once("error", onError);
63
+ try {
64
+ output.write(chunk, (error) => {
65
+ if (settled)
66
+ return;
67
+ settled = true;
68
+ if (error) {
69
+ queueMicrotask(() => output.removeListener("error", onError));
70
+ reject(error);
71
+ return;
72
+ }
73
+ output.removeListener("error", onError);
74
+ resolve();
75
+ });
76
+ } catch (error) {
77
+ output.removeListener("error", onError);
78
+ if (settled)
79
+ return;
80
+ settled = true;
81
+ reject(error);
82
+ }
83
+ });
52
84
  }
53
85
  function readNextMessage(buffer) {
54
86
  if (buffer.length === 0)
@@ -144,40 +176,70 @@ async function runJsonRpcStdioServer(config) {
144
176
  break;
145
177
  idleTimer.arm();
146
178
  if (message.kind === "parse_error") {
147
- handleParseError(message, config, log);
179
+ if (!await handleParseError(message, config, log))
180
+ break;
148
181
  continue;
149
182
  }
150
- await handleRequest(message, config, log);
183
+ if (!await handleRequest(message, config, log))
184
+ break;
151
185
  }
152
186
  } finally {
153
187
  idleTimer.clear();
154
188
  log("stdio_stopped");
155
189
  }
156
190
  }
157
- function handleParseError(message, config, log) {
191
+ async function handleParseError(message, config, log) {
158
192
  log("parse_error", { message: message.message });
159
193
  const response = config.parseErrorResponse?.(message.message) ?? errorResponse(null, -32700, "Parse error", message.message);
160
- if (response !== undefined) {
161
- writeStdioJsonRpcResponse(config.output, response, message.responseMode);
162
- }
194
+ if (response === undefined)
195
+ return true;
196
+ return writeResponse(response, {
197
+ output: config.output,
198
+ responseMode: message.responseMode,
199
+ log
200
+ });
163
201
  }
164
202
  async function handleRequest(message, config, log) {
165
203
  const parsed = message.payload;
166
204
  const id = isPlainRecord(parsed) ? jsonRpcId(parsed["id"]) : null;
167
205
  const method = isPlainRecord(parsed) && typeof parsed["method"] === "string" ? parsed["method"] : null;
168
206
  log("request", { id: id === null ? null : String(id), method });
207
+ let response;
169
208
  try {
170
- const response = await config.handler(parsed, config.handlerOptions);
171
- if (response === undefined)
172
- return;
173
- writeStdioJsonRpcResponse(config.output, response, message.responseMode);
174
- log("response", { id: String(response.id), method, is_error: response.error !== undefined });
209
+ response = await config.handler(parsed, config.handlerOptions);
175
210
  } catch (error) {
176
211
  if (config.onHandlerError === undefined)
177
212
  throw error;
178
213
  config.onHandlerError(error);
214
+ return true;
215
+ }
216
+ if (response === undefined)
217
+ return true;
218
+ if (!await writeResponse(response, {
219
+ output: config.output,
220
+ responseMode: message.responseMode,
221
+ log
222
+ }))
223
+ return false;
224
+ log("response", { id: String(response.id), method, is_error: response.error !== undefined });
225
+ return true;
226
+ }
227
+ async function writeResponse(response, context) {
228
+ try {
229
+ await writeStdioJsonRpcResponse(context.output, response, context.responseMode);
230
+ return true;
231
+ } catch (error) {
232
+ if (!isTerminalOutputError(error))
233
+ throw error;
234
+ context.log("output_error", { message: messageFromError(error) });
235
+ return false;
179
236
  }
180
237
  }
238
+ function isTerminalOutputError(error) {
239
+ if (!(error instanceof Error) || !("code" in error))
240
+ return false;
241
+ return error.code === "EPIPE" || error.code === "ERR_STREAM_DESTROYED" || error.code === "ERR_STREAM_WRITE_AFTER_END";
242
+ }
181
243
  function createIdleTimer(idleTimeoutMs, log, onIdleTimeout) {
182
244
  let timer = null;
183
245
  let isClosed = false;