oh-my-opencode 5.0.0-beta.12 → 5.0.0-beta.14

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 (145) hide show
  1. package/.agents/skills/senpi-qa/SKILL.md +80 -0
  2. package/.agents/skills/senpi-qa/scripts/resolve-evidence-dir.mjs +65 -0
  3. package/.agents/skills/senpi-qa/scripts/resolve-evidence-dir.test.mjs +171 -0
  4. package/README.ja.md +25 -21
  5. package/README.ko.md +25 -21
  6. package/README.md +26 -22
  7. package/README.ru.md +24 -20
  8. package/README.zh-cn.md +25 -21
  9. package/dist/cli/index.js +16747 -15223
  10. package/dist/cli-node/index.js +16898 -15374
  11. package/dist/create-hooks.d.ts +1 -0
  12. package/dist/features/btw-side/btw-command-draft.d.ts +7 -0
  13. package/dist/features/btw-side/context-injector.d.ts +15 -0
  14. package/dist/features/btw-side/index.d.ts +8 -0
  15. package/dist/features/btw-side/metadata.d.ts +15 -0
  16. package/dist/features/btw-side/parent-context-budget.d.ts +9 -0
  17. package/dist/features/btw-side/server-session-registry.d.ts +8 -0
  18. package/dist/features/btw-side/tui-adoption-cache.d.ts +13 -0
  19. package/dist/features/btw-side/tui-adoption-guard.d.ts +5 -0
  20. package/dist/features/btw-side/tui-controller-types.d.ts +68 -0
  21. package/dist/features/btw-side/tui-controller.d.ts +19 -0
  22. package/dist/features/btw-side/tui-escape-return.d.ts +12 -0
  23. package/dist/features/btw-side/tui-keymap.d.ts +17 -0
  24. package/dist/features/btw-side/tui-parent-validator.d.ts +6 -0
  25. package/dist/features/btw-side/tui-picker-options.d.ts +20 -0
  26. package/dist/features/btw-side/tui-picker.d.ts +9 -0
  27. package/dist/features/btw-side/tui-prompt-queue.d.ts +8 -0
  28. package/dist/features/btw-side/tui-session-bridge.d.ts +11 -0
  29. package/dist/features/btw-side/tui-session-catalog.d.ts +35 -0
  30. package/dist/features/btw-side/tui-side-removal.d.ts +11 -0
  31. package/dist/features/btw-side/tui-side-start.d.ts +9 -0
  32. package/dist/features/btw-side/tui-wiring.d.ts +8 -0
  33. package/dist/features/opengateway-provider/index.d.ts +13 -0
  34. package/dist/hooks/runtime-fallback/chat-message-handler.d.ts +2 -0
  35. package/dist/hooks/runtime-fallback/retry-model-payload.d.ts +1 -0
  36. package/dist/hooks/runtime-fallback/runtime-model-settings.d.ts +6 -0
  37. package/dist/hooks/runtime-fallback/session-status-handler.d.ts +1 -1
  38. package/dist/hooks/runtime-fallback/types.d.ts +3 -1
  39. package/dist/index.js +10814 -6018
  40. package/dist/plugin/event-session-lifecycle.d.ts +1 -0
  41. package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
  42. package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -0
  43. package/dist/plugin/messages-transform.d.ts +1 -0
  44. package/dist/shared/index.d.ts +1 -0
  45. package/dist/shared/runtime-fallback-retry-marker.d.ts +16 -0
  46. package/dist/skills/frontend/SKILL.md +1 -0
  47. package/dist/skills/frontend/references/design/print-paged-media.md +76 -0
  48. package/dist/skills/ulw-research/SKILL.md +1 -1
  49. package/dist/skills/visual-qa/SKILL.md +3 -2
  50. package/dist/tui.js +8273 -8493
  51. package/package.json +30 -29
  52. package/packages/git-bash-mcp/dist/cli.js +5 -1
  53. package/packages/git-bash-mcp/package.json +1 -1
  54. package/packages/lsp-daemon/dist/cli.js +86 -114
  55. package/packages/lsp-daemon/dist/client.js +87 -118
  56. package/packages/lsp-daemon/dist/ensure-daemon.js +1 -0
  57. package/packages/lsp-daemon/dist/index.js +93 -123
  58. package/packages/lsp-daemon/dist/version-reap.js +1 -1
  59. package/packages/lsp-tools-mcp/dist/cli.js +67 -94
  60. package/packages/lsp-tools-mcp/dist/lsp/manager.js +62 -92
  61. package/packages/lsp-tools-mcp/dist/mcp.js +69 -96
  62. package/packages/lsp-tools-mcp/dist/request-context.js +11 -12
  63. package/packages/lsp-tools-mcp/dist/tools.js +73 -104
  64. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  65. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +30 -29
  66. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  67. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  68. package/packages/omo-codex/plugin/components/bootstrap/src/hook.ts +1 -0
  69. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +86 -65
  70. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +86 -66
  71. package/packages/omo-codex/plugin/components/codegraph/package.json +4 -4
  72. package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +1 -0
  73. package/packages/omo-codex/plugin/components/codegraph/src/session-start-hook-runtime.ts +1 -0
  74. package/packages/omo-codex/plugin/components/comment-checker/dist/cli.js +2 -1
  75. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  76. package/packages/omo-codex/plugin/components/comment-checker/package.json +5 -5
  77. package/packages/omo-codex/plugin/components/comment-checker/src/runner.ts +1 -0
  78. package/packages/omo-codex/plugin/components/git-bash/AGENTS.md +1 -1
  79. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  80. package/packages/omo-codex/plugin/components/git-bash/package.json +3 -4
  81. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  82. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +5 -5
  83. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  84. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +70 -107
  85. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  86. package/packages/omo-codex/plugin/components/lsp/package.json +5 -5
  87. package/packages/omo-codex/plugin/components/lsp/src/cli.ts +1 -1
  88. package/packages/omo-codex/plugin/components/rules/dist/cli.js +14 -12
  89. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  90. package/packages/omo-codex/plugin/components/rules/package.json +7 -7
  91. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  92. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +5 -5
  93. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  94. package/packages/omo-codex/plugin/components/teammode/package.json +5 -5
  95. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +2266 -405
  96. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +2270 -409
  97. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  98. package/packages/omo-codex/plugin/components/telemetry/package.json +5 -5
  99. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  100. package/packages/omo-codex/plugin/components/ultrawork/package.json +5 -5
  101. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +1 -3
  102. package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +1 -1
  103. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  104. package/packages/omo-codex/plugin/components/ulw-loop/package.json +5 -5
  105. package/packages/omo-codex/plugin/components/ulw-loop/src/paths.ts +1 -1
  106. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +25 -0
  107. package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +9 -0
  108. package/packages/omo-codex/plugin/components/ulw-loop/vitest.config.ts +1 -0
  109. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  110. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  111. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  112. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  113. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  114. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  115. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  116. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  117. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  118. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  119. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  120. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  121. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  122. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  123. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  124. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  125. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  126. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  127. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  128. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  129. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  130. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  131. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  132. package/packages/omo-codex/plugin/package-lock.json +661 -375
  133. package/packages/omo-codex/plugin/package.json +1 -1
  134. package/packages/omo-codex/plugin/shared/package.json +2 -3
  135. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +1 -0
  136. package/packages/omo-codex/plugin/skills/frontend/references/design/print-paged-media.md +76 -0
  137. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +1 -1
  138. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +3 -2
  139. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2410 -504
  140. package/packages/shared-skills/skills/frontend/SKILL.md +1 -0
  141. package/packages/shared-skills/skills/frontend/references/design/print-paged-media.md +76 -0
  142. package/packages/shared-skills/skills/ulw-research/SKILL.md +1 -1
  143. package/packages/shared-skills/skills/visual-qa/SKILL.md +3 -2
  144. package/script/qa/web-terminal-visual-qa.mjs +2 -0
  145. package/script/qa/xterm-live-terminal.mjs +18 -2
@@ -10,18 +10,17 @@ import { homedir } from "node:os";
10
10
  import { basename, delimiter, dirname, isAbsolute, join, relative, resolve } from "node:path";
11
11
 
12
12
  class LspRequestContextParseError extends Error {
13
- code;
14
- name = "LspRequestContextParseError";
15
13
  constructor(code, message) {
16
14
  super(message);
17
15
  this.code = code;
16
+ this.name = "LspRequestContextParseError";
18
17
  }
19
18
  }
20
19
 
21
20
  class LspRequestContextUnavailableError extends Error {
22
- name = "LspRequestContextUnavailableError";
23
21
  constructor() {
24
22
  super("LSP request context is required. Standalone MCP startup must install one with runWithRequestContext(createStandaloneMcpRequestContext()).");
23
+ this.name = "LspRequestContextUnavailableError";
25
24
  }
26
25
  }
27
26
  var storage = new AsyncLocalStorage;
@@ -179,7 +178,6 @@ function isPlainRecord(value) {
179
178
 
180
179
  // src/daemon-request-error.ts
181
180
  class DaemonRequestError extends Error {
182
- requestWritten;
183
181
  constructor(message, requestWritten) {
184
182
  super(message);
185
183
  this.name = "DaemonRequestError";
@@ -202,7 +200,6 @@ class DaemonRequestCancelledError extends DaemonRequestError {
202
200
  }
203
201
 
204
202
  class DaemonRequestTimedOutError extends DaemonRequestError {
205
- timeoutMs;
206
203
  constructor(requestWritten, timeoutMs) {
207
204
  super("daemon request timed out", requestWritten);
208
205
  this.name = "DaemonRequestTimedOutError";
@@ -281,14 +278,12 @@ var PROTOCOL_ERROR_CODE = -32002;
281
278
  var AUTH_TOKEN_BYTES = 32;
282
279
 
283
280
  class UnsafePrivateDirectoryError extends Error {
284
- path;
285
- reason;
286
- name = "UnsafePrivateDirectoryError";
287
- code = "unsafe_private_directory";
288
281
  constructor(path, reason) {
289
282
  super(`unsafe private directory ${path}: ${reason}`);
290
283
  this.path = path;
291
284
  this.reason = reason;
285
+ this.name = "UnsafePrivateDirectoryError";
286
+ this.code = "unsafe_private_directory";
292
287
  }
293
288
  }
294
289
  function authEnvelope(token) {
@@ -472,20 +467,18 @@ var OMO_LSP_DAEMON_VERSION = "OMO_LSP_DAEMON_VERSION";
472
467
  var DAEMON_VERSION_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._+-]{0,127}$/;
473
468
 
474
469
  class InvalidRuntimeOverrideError extends Error {
475
- code = "invalid_runtime_override";
476
- reason;
477
470
  constructor(reason, message) {
478
471
  super(message);
472
+ this.code = "invalid_runtime_override";
479
473
  this.name = "InvalidRuntimeOverrideError";
480
474
  this.reason = reason;
481
475
  }
482
476
  }
483
477
 
484
478
  class InvalidDaemonVersionError extends Error {
485
- code = "invalid_daemon_version";
486
- version;
487
479
  constructor(version) {
488
480
  super("LSP daemon version must match [A-Za-z0-9][A-Za-z0-9._+-]{0,127}");
481
+ this.code = "invalid_daemon_version";
489
482
  this.name = "InvalidDaemonVersionError";
490
483
  this.version = version;
491
484
  }
@@ -531,10 +524,9 @@ var requireFromHere = createRequire(import.meta.url);
531
524
  var MAX_SOCKET_PATH_LENGTH = 100;
532
525
 
533
526
  class InvalidDaemonDirectoryError extends Error {
534
- code = "invalid_daemon_directory";
535
- directory;
536
527
  constructor(directory) {
537
528
  super(`${OMO_LSP_DAEMON_DIR} must be an absolute path`);
529
+ this.code = "invalid_daemon_directory";
538
530
  this.name = "InvalidDaemonDirectoryError";
539
531
  this.directory = directory;
540
532
  }
@@ -729,7 +721,8 @@ function spawnDaemonProcess(paths) {
729
721
  try {
730
722
  const child = spawn(resolveDaemonNodeExecutable(), [paths.cliPath, "daemon"], {
731
723
  detached: true,
732
- stdio: ["ignore", logFd, logFd]
724
+ stdio: ["ignore", logFd, logFd],
725
+ windowsHide: true
733
726
  });
734
727
  child.once("spawn", () => closeSync2(logFd));
735
728
  child.once("error", (error) => {
@@ -1106,7 +1099,11 @@ function createParentWatchdog(config, onDeadParent) {
1106
1099
  const probeAlive = config.probeAlive ?? isProcessAlive;
1107
1100
  let fired = false;
1108
1101
  const timer = setInterval(() => {
1109
- if (fired || probeAlive(parentPid))
1102
+ if (fired)
1103
+ return;
1104
+ const alive = probeAlive(parentPid);
1105
+ config.onPoll?.(alive);
1106
+ if (alive)
1110
1107
  return;
1111
1108
  fired = true;
1112
1109
  onDeadParent(parentPid, pollIntervalMs);
@@ -1156,22 +1153,15 @@ function effectiveExtension(filePath) {
1156
1153
 
1157
1154
  // ../lsp-core/src/lsp/errors.ts
1158
1155
  class LspConnectionClosedError extends Error {
1159
- serverId;
1160
- root;
1161
- name = "LspConnectionClosedError";
1162
1156
  constructor(serverId, root, message) {
1163
1157
  super(message ?? `LSP connection closed for ${serverId} at ${root}`);
1164
1158
  this.serverId = serverId;
1165
1159
  this.root = root;
1160
+ this.name = "LspConnectionClosedError";
1166
1161
  }
1167
1162
  }
1168
1163
 
1169
1164
  class LspProcessExitedError extends Error {
1170
- serverId;
1171
- root;
1172
- exitCode;
1173
- stderrTail;
1174
- name = "LspProcessExitedError";
1175
1165
  constructor(serverId, root, exitCode, stderrTail) {
1176
1166
  const stderrSuffix = stderrTail ? `
1177
1167
  stderr tail: ${stderrTail}` : "";
@@ -1180,46 +1170,49 @@ stderr tail: ${stderrTail}` : "";
1180
1170
  this.root = root;
1181
1171
  this.exitCode = exitCode;
1182
1172
  this.stderrTail = stderrTail;
1173
+ this.name = "LspProcessExitedError";
1183
1174
  }
1184
1175
  }
1185
1176
 
1186
1177
  class LspRequestTimeoutError extends Error {
1187
- method;
1188
- stderrTail;
1189
- name = "LspRequestTimeoutError";
1190
1178
  constructor(method, stderrTail) {
1191
1179
  const stderrSuffix = stderrTail ? `
1192
1180
  recent stderr: ${stderrTail}` : "";
1193
1181
  super(`LSP request timeout (method: ${method})${stderrSuffix}`);
1194
1182
  this.method = method;
1195
1183
  this.stderrTail = stderrTail;
1184
+ this.name = "LspRequestTimeoutError";
1196
1185
  }
1197
1186
  }
1198
1187
 
1199
1188
  class LspInvalidPathError extends Error {
1200
- name = "LspInvalidPathError";
1189
+ constructor() {
1190
+ super(...arguments);
1191
+ this.name = "LspInvalidPathError";
1192
+ }
1201
1193
  }
1202
1194
 
1203
1195
  class LspServerLookupError extends Error {
1204
- lookup;
1205
- name = "LspServerLookupError";
1206
1196
  constructor(message, lookup) {
1207
1197
  super(message);
1208
1198
  this.lookup = lookup;
1199
+ this.name = "LspServerLookupError";
1209
1200
  }
1210
1201
  }
1211
1202
 
1212
1203
  class LspServerInitializingError extends Error {
1213
- originalError;
1214
- name = "LspServerInitializingError";
1215
1204
  constructor(originalError) {
1216
1205
  super(`LSP server is still initializing. Please retry in a few seconds. Original error: ${originalError.message}`);
1217
1206
  this.originalError = originalError;
1207
+ this.name = "LspServerInitializingError";
1218
1208
  }
1219
1209
  }
1220
1210
 
1221
1211
  class LspProcessSpawnError extends Error {
1222
- name = "LspProcessSpawnError";
1212
+ constructor() {
1213
+ super(...arguments);
1214
+ this.name = "LspProcessSpawnError";
1215
+ }
1223
1216
  }
1224
1217
  function isLspDeadConnectionError(err) {
1225
1218
  return err instanceof LspConnectionClosedError || err instanceof LspProcessExitedError;
@@ -1264,20 +1257,31 @@ var METHOD_NOT_FOUND = -32601;
1264
1257
  var INTERNAL_ERROR = -32603;
1265
1258
 
1266
1259
  class JsonRpcConnection {
1267
- reader;
1268
- writer;
1269
- pendingRequests = new Map;
1270
- notificationHandlers = new Map;
1271
- requestHandlers = new Map;
1272
- closeHandlers = [];
1273
- errorHandlers = [];
1274
- inputBuffer = Buffer.alloc(0);
1275
- nextRequestId = 1;
1276
- listening = false;
1277
- disposed = false;
1278
1260
  constructor(reader, writer) {
1279
1261
  this.reader = reader;
1280
1262
  this.writer = writer;
1263
+ this.pendingRequests = new Map;
1264
+ this.notificationHandlers = new Map;
1265
+ this.requestHandlers = new Map;
1266
+ this.closeHandlers = [];
1267
+ this.errorHandlers = [];
1268
+ this.inputBuffer = Buffer.alloc(0);
1269
+ this.nextRequestId = 1;
1270
+ this.listening = false;
1271
+ this.disposed = false;
1272
+ this.handleData = (chunk) => {
1273
+ const chunkBuffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, "utf8");
1274
+ this.inputBuffer = Buffer.concat([this.inputBuffer, chunkBuffer]);
1275
+ this.drainInputBuffer();
1276
+ };
1277
+ this.handleClose = () => {
1278
+ for (const handler of this.closeHandlers) {
1279
+ handler();
1280
+ }
1281
+ };
1282
+ this.handleStreamError = (error) => {
1283
+ this.emitError(error);
1284
+ };
1281
1285
  }
1282
1286
  listen() {
1283
1287
  if (this.listening)
@@ -1398,19 +1402,6 @@ class JsonRpcConnection {
1398
1402
  this.notificationHandlers.clear();
1399
1403
  this.requestHandlers.clear();
1400
1404
  }
1401
- handleData = (chunk) => {
1402
- const chunkBuffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, "utf8");
1403
- this.inputBuffer = Buffer.concat([this.inputBuffer, chunkBuffer]);
1404
- this.drainInputBuffer();
1405
- };
1406
- handleClose = () => {
1407
- for (const handler of this.closeHandlers) {
1408
- handler();
1409
- }
1410
- };
1411
- handleStreamError = (error) => {
1412
- this.emitError(error);
1413
- };
1414
1405
  drainInputBuffer() {
1415
1406
  while (true) {
1416
1407
  const headerEnd = this.inputBuffer.indexOf(HEADER_SEPARATOR2);
@@ -1758,31 +1749,25 @@ function isPosition(value) {
1758
1749
 
1759
1750
  // ../lsp-core/src/lsp/transport.ts
1760
1751
  class LspClientNotStartedError extends Error {
1761
- serverId;
1762
- root;
1763
- name = "LspClientNotStartedError";
1764
1752
  constructor(serverId, root) {
1765
1753
  super("LSP client not started");
1766
1754
  this.serverId = serverId;
1767
1755
  this.root = root;
1756
+ this.name = "LspClientNotStartedError";
1768
1757
  }
1769
1758
  }
1770
1759
 
1771
1760
  class LspClientTransport {
1772
- root;
1773
- server;
1774
- proc = null;
1775
- connection = null;
1776
- stderrBuffer = [];
1777
- processExited = false;
1778
- diagnosticsStore = new Map;
1779
- requestTimeoutMs;
1780
- initializeTimeoutMs;
1781
- workspaceApplyEditHandler = null;
1782
- diagnosticPullSupported = false;
1783
1761
  constructor(root, server2, timeouts = {}) {
1784
1762
  this.root = root;
1785
1763
  this.server = server2;
1764
+ this.proc = null;
1765
+ this.connection = null;
1766
+ this.stderrBuffer = [];
1767
+ this.processExited = false;
1768
+ this.diagnosticsStore = new Map;
1769
+ this.workspaceApplyEditHandler = null;
1770
+ this.diagnosticPullSupported = false;
1786
1771
  this.requestTimeoutMs = timeouts.requestTimeoutMs ?? REQUEST_TIMEOUT_MS;
1787
1772
  this.initializeTimeoutMs = timeouts.initializeTimeoutMs ?? INIT_TIMEOUT_MS;
1788
1773
  }
@@ -2279,16 +2264,12 @@ function movedPath(candidate, oldPath, newPath) {
2279
2264
  }
2280
2265
 
2281
2266
  class WorkspaceDocumentState {
2282
- sendNotification;
2283
- clearDiagnostics;
2284
- openDocuments = new Map;
2285
- openByUri = new Map;
2286
- openPromises = new Map;
2287
- now;
2288
- versionlessPublishQuiescenceMs;
2289
2267
  constructor(sendNotification, clearDiagnostics, options = {}) {
2290
2268
  this.sendNotification = sendNotification;
2291
2269
  this.clearDiagnostics = clearDiagnostics;
2270
+ this.openDocuments = new Map;
2271
+ this.openByUri = new Map;
2272
+ this.openPromises = new Map;
2292
2273
  this.now = options.now ?? (() => Date.now());
2293
2274
  this.versionlessPublishQuiescenceMs = options.versionlessPublishQuiescenceMs ?? DEFAULT_VERSIONLESS_PUBLISH_QUIESCENCE_MS;
2294
2275
  }
@@ -2552,13 +2533,11 @@ import { dirname as dirname4, isAbsolute as isAbsolute4, relative as relative3,
2552
2533
  import { fileURLToPath as fileURLToPath2 } from "node:url";
2553
2534
 
2554
2535
  class WorkspaceEditPathError extends Error {
2555
- path;
2556
- detail;
2557
- name = "WorkspaceEditPathError";
2558
2536
  constructor(path2, detail) {
2559
2537
  super(`${detail}: ${path2}`);
2560
2538
  this.path = path2;
2561
2539
  this.detail = detail;
2540
+ this.name = "WorkspaceEditPathError";
2562
2541
  }
2563
2542
  }
2564
2543
  function isPathInsideWorkspace(filePath, workspaceRoot) {
@@ -2850,13 +2829,11 @@ function canonicalFingerprint(operations) {
2850
2829
 
2851
2830
  // ../lsp-core/src/lsp/workspace-edit-types.ts
2852
2831
  class WorkspaceEditValidationError extends Error {
2853
- changeIndex;
2854
- detail;
2855
- name = "WorkspaceEditValidationError";
2856
2832
  constructor(changeIndex, detail) {
2857
2833
  super(`change ${changeIndex}: ${detail}`);
2858
2834
  this.changeIndex = changeIndex;
2859
2835
  this.detail = detail;
2836
+ this.name = "WorkspaceEditValidationError";
2860
2837
  }
2861
2838
  }
2862
2839
 
@@ -3354,10 +3331,9 @@ function simulateDelete(operation, virtual) {
3354
3331
  import { existsSync as existsSync6, lstatSync as lstatSync4, readdirSync as readdirSync2 } from "node:fs";
3355
3332
  import { dirname as dirname6, resolve as resolve5 } from "node:path";
3356
3333
  class WorkspaceSnapshotBuilder {
3357
- workspaceRoot;
3358
- snapshots = new Map;
3359
3334
  constructor(workspaceRoot) {
3360
3335
  this.workspaceRoot = workspaceRoot;
3336
+ this.snapshots = new Map;
3361
3337
  }
3362
3338
  build(operations) {
3363
3339
  this.add(this.workspaceRoot, false);
@@ -3401,8 +3377,10 @@ function snapshotOperations(operations, workspaceRoot) {
3401
3377
 
3402
3378
  // ../lsp-core/src/lsp/workspace-edit-plan.ts
3403
3379
  class PlanPathIndex {
3404
- firstChangeByPath = new Map;
3405
- reportedPathByCanonical = new Map;
3380
+ constructor() {
3381
+ this.firstChangeByPath = new Map;
3382
+ this.reportedPathByCanonical = new Map;
3383
+ }
3406
3384
  build(operations) {
3407
3385
  for (const operation of operations) {
3408
3386
  switch (operation.kind) {
@@ -3491,14 +3469,11 @@ function isRecord4(value) {
3491
3469
  }
3492
3470
 
3493
3471
  class WorkspaceMutationController {
3494
- workspaceRoot;
3495
- documents;
3496
- activeLease = null;
3497
- nextLeaseId = 1;
3498
- io;
3499
3472
  constructor(workspaceRoot, documents) {
3500
3473
  this.workspaceRoot = workspaceRoot;
3501
3474
  this.documents = documents;
3475
+ this.activeLease = null;
3476
+ this.nextLeaseId = 1;
3502
3477
  }
3503
3478
  setIo(io) {
3504
3479
  this.io = io;
@@ -3611,12 +3586,9 @@ var DIAGNOSTICS_FRESHNESS_TIMEOUT_MS = 3000;
3611
3586
  var VERSIONLESS_PUBLISH_QUIESCENCE_MS = 250;
3612
3587
 
3613
3588
  class LspClient extends LspClientConnection {
3614
- diagnosticPullErrors = [];
3615
- documents;
3616
- workspaceMutations;
3617
- diagnosticsFreshnessTimeoutMs;
3618
3589
  constructor(root, server2, options = {}) {
3619
3590
  super(root, server2, options);
3591
+ this.diagnosticPullErrors = [];
3620
3592
  this.diagnosticsFreshnessTimeoutMs = options.diagnosticsFreshnessTimeoutMs ?? DIAGNOSTICS_FRESHNESS_TIMEOUT_MS;
3621
3593
  this.documents = new WorkspaceDocumentState((method, params) => this.sendNotification(method, params), (uri) => this.diagnosticsStore.delete(uri), {
3622
3594
  versionlessPublishQuiescenceMs: options.versionlessPublishQuiescenceMs ?? VERSIONLESS_PUBLISH_QUIESCENCE_MS
@@ -3916,16 +3888,11 @@ function awaitWithSignal2(promise, signal) {
3916
3888
  }
3917
3889
 
3918
3890
  class LspManager {
3919
- clients = new Map;
3920
- reaperHandle = null;
3921
- signalDisposer = null;
3922
- disposed = false;
3923
- idleTimeoutMs;
3924
- initTimeoutMs;
3925
- reaperIntervalMs;
3926
- clientFactory;
3927
- now;
3928
3891
  constructor(options = {}) {
3892
+ this.clients = new Map;
3893
+ this.reaperHandle = null;
3894
+ this.signalDisposer = null;
3895
+ this.disposed = false;
3929
3896
  this.idleTimeoutMs = options.idleTimeoutMs ?? IDLE_TIMEOUT_MS;
3930
3897
  this.initTimeoutMs = options.initTimeoutMs ?? INIT_TIMEOUT_MS;
3931
3898
  this.reaperIntervalMs = options.reaperIntervalMs ?? REAPER_INTERVAL_MS;
@@ -5860,7 +5827,10 @@ function requestedProtocolVersion(params) {
5860
5827
  var CONTEXT_KEY = "_context";
5861
5828
 
5862
5829
  class InvalidDaemonRequestError extends Error {
5863
- name = "InvalidDaemonRequestError";
5830
+ constructor() {
5831
+ super(...arguments);
5832
+ this.name = "InvalidDaemonRequestError";
5833
+ }
5864
5834
  }
5865
5835
  function extractRequestContext(raw) {
5866
5836
  if (!isPlainRecord(raw) || raw["method"] !== "tools/call")
@@ -6124,10 +6094,9 @@ var OMO_LSP_DAEMON_VERSION2 = "OMO_LSP_DAEMON_VERSION";
6124
6094
  var DAEMON_VERSION_PATTERN2 = /^[A-Za-z0-9][A-Za-z0-9._+-]{0,127}$/;
6125
6095
 
6126
6096
  class InvalidRuntimeOverrideError2 extends Error {
6127
- code = "invalid_runtime_override";
6128
- reason;
6129
6097
  constructor(reason, message) {
6130
6098
  super(message);
6099
+ this.code = "invalid_runtime_override";
6131
6100
  this.name = "InvalidRuntimeOverrideError";
6132
6101
  this.reason = reason;
6133
6102
  }
@@ -6174,13 +6143,13 @@ function currentRequestContext2(env = process.env) {
6174
6143
  return currentRequestContext(env);
6175
6144
  }
6176
6145
  export {
6177
- validateDaemonVersion2 as validateDaemonVersion,
6178
- resolveDaemonRuntime2 as resolveDaemonRuntime,
6179
- currentRequestContext2 as currentRequestContext,
6180
- callToolViaDaemon2 as callToolViaDaemon,
6181
- callDiagnosticsViaDaemon2 as callDiagnosticsViaDaemon,
6182
- OMO_LSP_DAEMON_VERSION2 as OMO_LSP_DAEMON_VERSION,
6183
- OMO_LSP_DAEMON_DIR2 as OMO_LSP_DAEMON_DIR,
6146
+ InvalidRuntimeOverrideError2 as InvalidRuntimeOverrideError,
6184
6147
  OMO_LSP_DAEMON_CLI2 as OMO_LSP_DAEMON_CLI,
6185
- InvalidRuntimeOverrideError2 as InvalidRuntimeOverrideError
6148
+ OMO_LSP_DAEMON_DIR2 as OMO_LSP_DAEMON_DIR,
6149
+ OMO_LSP_DAEMON_VERSION2 as OMO_LSP_DAEMON_VERSION,
6150
+ callDiagnosticsViaDaemon2 as callDiagnosticsViaDaemon,
6151
+ callToolViaDaemon2 as callToolViaDaemon,
6152
+ currentRequestContext2 as currentRequestContext,
6153
+ resolveDaemonRuntime2 as resolveDaemonRuntime,
6154
+ validateDaemonVersion2 as validateDaemonVersion
6186
6155
  };
@@ -88,6 +88,7 @@ export function spawnDaemonProcess(paths) {
88
88
  const child = spawn(resolveDaemonNodeExecutable(), [paths.cliPath, "daemon"], {
89
89
  detached: true,
90
90
  stdio: ["ignore", logFd, logFd],
91
+ windowsHide: true,
91
92
  });
92
93
  child.once("spawn", () => closeSync(logFd));
93
94
  child.once("error", (error) => {