oh-my-opencode 5.0.0-beta.13 → 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 (116) hide show
  1. package/README.ja.md +25 -21
  2. package/README.ko.md +25 -21
  3. package/README.md +26 -22
  4. package/README.ru.md +24 -20
  5. package/README.zh-cn.md +25 -21
  6. package/dist/cli/index.js +12628 -13558
  7. package/dist/cli-node/index.js +12628 -13558
  8. package/dist/features/btw-side/tui-controller-types.d.ts +5 -0
  9. package/dist/features/btw-side/tui-controller.d.ts +8 -3
  10. package/dist/features/btw-side/tui-escape-return.d.ts +12 -0
  11. package/dist/features/btw-side/tui-keymap.d.ts +8 -1
  12. package/dist/features/btw-side/tui-picker-options.d.ts +20 -0
  13. package/dist/features/btw-side/tui-picker.d.ts +9 -0
  14. package/dist/features/btw-side/tui-session-catalog.d.ts +35 -0
  15. package/dist/features/btw-side/tui-side-start.d.ts +1 -1
  16. package/dist/features/opengateway-provider/index.d.ts +13 -0
  17. package/dist/index.js +8462 -6318
  18. package/dist/skills/frontend/SKILL.md +1 -0
  19. package/dist/skills/frontend/references/design/print-paged-media.md +76 -0
  20. package/dist/skills/ulw-research/SKILL.md +1 -1
  21. package/dist/skills/visual-qa/SKILL.md +3 -2
  22. package/dist/tui.js +3993 -5513
  23. package/package.json +22 -22
  24. package/packages/git-bash-mcp/package.json +1 -1
  25. package/packages/lsp-daemon/dist/cli.js +81 -113
  26. package/packages/lsp-daemon/dist/client.js +82 -117
  27. package/packages/lsp-daemon/dist/ensure-daemon.js +1 -0
  28. package/packages/lsp-daemon/dist/index.js +88 -122
  29. package/packages/lsp-daemon/dist/version-reap.js +1 -1
  30. package/packages/lsp-tools-mcp/dist/cli.js +62 -93
  31. package/packages/lsp-tools-mcp/dist/lsp/manager.js +62 -92
  32. package/packages/lsp-tools-mcp/dist/mcp.js +64 -95
  33. package/packages/lsp-tools-mcp/dist/request-context.js +11 -12
  34. package/packages/lsp-tools-mcp/dist/tools.js +73 -104
  35. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  36. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +30 -29
  37. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  38. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  39. package/packages/omo-codex/plugin/components/bootstrap/src/hook.ts +1 -0
  40. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +81 -64
  41. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +81 -65
  42. package/packages/omo-codex/plugin/components/codegraph/package.json +4 -4
  43. package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +1 -0
  44. package/packages/omo-codex/plugin/components/codegraph/src/session-start-hook-runtime.ts +1 -0
  45. package/packages/omo-codex/plugin/components/comment-checker/dist/cli.js +2 -1
  46. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  47. package/packages/omo-codex/plugin/components/comment-checker/package.json +5 -5
  48. package/packages/omo-codex/plugin/components/comment-checker/src/runner.ts +1 -0
  49. package/packages/omo-codex/plugin/components/git-bash/AGENTS.md +1 -1
  50. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  51. package/packages/omo-codex/plugin/components/git-bash/package.json +3 -4
  52. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  53. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +5 -5
  54. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  55. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +70 -107
  56. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  57. package/packages/omo-codex/plugin/components/lsp/package.json +5 -5
  58. package/packages/omo-codex/plugin/components/lsp/src/cli.ts +1 -1
  59. package/packages/omo-codex/plugin/components/rules/dist/cli.js +14 -12
  60. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  61. package/packages/omo-codex/plugin/components/rules/package.json +7 -7
  62. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  63. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +5 -5
  64. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  65. package/packages/omo-codex/plugin/components/teammode/package.json +5 -5
  66. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +25 -25
  67. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +31 -31
  68. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  69. package/packages/omo-codex/plugin/components/telemetry/package.json +5 -5
  70. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  71. package/packages/omo-codex/plugin/components/ultrawork/package.json +5 -5
  72. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +1 -3
  73. package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +1 -1
  74. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  75. package/packages/omo-codex/plugin/components/ulw-loop/package.json +5 -5
  76. package/packages/omo-codex/plugin/components/ulw-loop/src/paths.ts +1 -1
  77. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +25 -0
  78. package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +9 -0
  79. package/packages/omo-codex/plugin/components/ulw-loop/vitest.config.ts +1 -0
  80. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  81. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  82. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  83. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  84. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  85. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  86. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  87. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  88. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  89. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  90. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  91. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  92. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  93. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  94. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  95. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  96. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  97. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  98. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  99. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  100. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  101. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  102. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  103. package/packages/omo-codex/plugin/package-lock.json +661 -375
  104. package/packages/omo-codex/plugin/package.json +1 -1
  105. package/packages/omo-codex/plugin/shared/package.json +2 -3
  106. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +1 -0
  107. package/packages/omo-codex/plugin/skills/frontend/references/design/print-paged-media.md +76 -0
  108. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +1 -1
  109. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +3 -2
  110. package/packages/omo-codex/scripts/install-dist/install-local.mjs +53 -53
  111. package/packages/shared-skills/skills/frontend/SKILL.md +1 -0
  112. package/packages/shared-skills/skills/frontend/references/design/print-paged-media.md +76 -0
  113. package/packages/shared-skills/skills/ulw-research/SKILL.md +1 -1
  114. package/packages/shared-skills/skills/visual-qa/SKILL.md +3 -2
  115. package/script/qa/web-terminal-visual-qa.mjs +2 -0
  116. 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) => {
@@ -1160,22 +1153,15 @@ function effectiveExtension(filePath) {
1160
1153
 
1161
1154
  // ../lsp-core/src/lsp/errors.ts
1162
1155
  class LspConnectionClosedError extends Error {
1163
- serverId;
1164
- root;
1165
- name = "LspConnectionClosedError";
1166
1156
  constructor(serverId, root, message) {
1167
1157
  super(message ?? `LSP connection closed for ${serverId} at ${root}`);
1168
1158
  this.serverId = serverId;
1169
1159
  this.root = root;
1160
+ this.name = "LspConnectionClosedError";
1170
1161
  }
1171
1162
  }
1172
1163
 
1173
1164
  class LspProcessExitedError extends Error {
1174
- serverId;
1175
- root;
1176
- exitCode;
1177
- stderrTail;
1178
- name = "LspProcessExitedError";
1179
1165
  constructor(serverId, root, exitCode, stderrTail) {
1180
1166
  const stderrSuffix = stderrTail ? `
1181
1167
  stderr tail: ${stderrTail}` : "";
@@ -1184,46 +1170,49 @@ stderr tail: ${stderrTail}` : "";
1184
1170
  this.root = root;
1185
1171
  this.exitCode = exitCode;
1186
1172
  this.stderrTail = stderrTail;
1173
+ this.name = "LspProcessExitedError";
1187
1174
  }
1188
1175
  }
1189
1176
 
1190
1177
  class LspRequestTimeoutError extends Error {
1191
- method;
1192
- stderrTail;
1193
- name = "LspRequestTimeoutError";
1194
1178
  constructor(method, stderrTail) {
1195
1179
  const stderrSuffix = stderrTail ? `
1196
1180
  recent stderr: ${stderrTail}` : "";
1197
1181
  super(`LSP request timeout (method: ${method})${stderrSuffix}`);
1198
1182
  this.method = method;
1199
1183
  this.stderrTail = stderrTail;
1184
+ this.name = "LspRequestTimeoutError";
1200
1185
  }
1201
1186
  }
1202
1187
 
1203
1188
  class LspInvalidPathError extends Error {
1204
- name = "LspInvalidPathError";
1189
+ constructor() {
1190
+ super(...arguments);
1191
+ this.name = "LspInvalidPathError";
1192
+ }
1205
1193
  }
1206
1194
 
1207
1195
  class LspServerLookupError extends Error {
1208
- lookup;
1209
- name = "LspServerLookupError";
1210
1196
  constructor(message, lookup) {
1211
1197
  super(message);
1212
1198
  this.lookup = lookup;
1199
+ this.name = "LspServerLookupError";
1213
1200
  }
1214
1201
  }
1215
1202
 
1216
1203
  class LspServerInitializingError extends Error {
1217
- originalError;
1218
- name = "LspServerInitializingError";
1219
1204
  constructor(originalError) {
1220
1205
  super(`LSP server is still initializing. Please retry in a few seconds. Original error: ${originalError.message}`);
1221
1206
  this.originalError = originalError;
1207
+ this.name = "LspServerInitializingError";
1222
1208
  }
1223
1209
  }
1224
1210
 
1225
1211
  class LspProcessSpawnError extends Error {
1226
- name = "LspProcessSpawnError";
1212
+ constructor() {
1213
+ super(...arguments);
1214
+ this.name = "LspProcessSpawnError";
1215
+ }
1227
1216
  }
1228
1217
  function isLspDeadConnectionError(err) {
1229
1218
  return err instanceof LspConnectionClosedError || err instanceof LspProcessExitedError;
@@ -1268,20 +1257,31 @@ var METHOD_NOT_FOUND = -32601;
1268
1257
  var INTERNAL_ERROR = -32603;
1269
1258
 
1270
1259
  class JsonRpcConnection {
1271
- reader;
1272
- writer;
1273
- pendingRequests = new Map;
1274
- notificationHandlers = new Map;
1275
- requestHandlers = new Map;
1276
- closeHandlers = [];
1277
- errorHandlers = [];
1278
- inputBuffer = Buffer.alloc(0);
1279
- nextRequestId = 1;
1280
- listening = false;
1281
- disposed = false;
1282
1260
  constructor(reader, writer) {
1283
1261
  this.reader = reader;
1284
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
+ };
1285
1285
  }
1286
1286
  listen() {
1287
1287
  if (this.listening)
@@ -1402,19 +1402,6 @@ class JsonRpcConnection {
1402
1402
  this.notificationHandlers.clear();
1403
1403
  this.requestHandlers.clear();
1404
1404
  }
1405
- handleData = (chunk) => {
1406
- const chunkBuffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, "utf8");
1407
- this.inputBuffer = Buffer.concat([this.inputBuffer, chunkBuffer]);
1408
- this.drainInputBuffer();
1409
- };
1410
- handleClose = () => {
1411
- for (const handler of this.closeHandlers) {
1412
- handler();
1413
- }
1414
- };
1415
- handleStreamError = (error) => {
1416
- this.emitError(error);
1417
- };
1418
1405
  drainInputBuffer() {
1419
1406
  while (true) {
1420
1407
  const headerEnd = this.inputBuffer.indexOf(HEADER_SEPARATOR2);
@@ -1762,31 +1749,25 @@ function isPosition(value) {
1762
1749
 
1763
1750
  // ../lsp-core/src/lsp/transport.ts
1764
1751
  class LspClientNotStartedError extends Error {
1765
- serverId;
1766
- root;
1767
- name = "LspClientNotStartedError";
1768
1752
  constructor(serverId, root) {
1769
1753
  super("LSP client not started");
1770
1754
  this.serverId = serverId;
1771
1755
  this.root = root;
1756
+ this.name = "LspClientNotStartedError";
1772
1757
  }
1773
1758
  }
1774
1759
 
1775
1760
  class LspClientTransport {
1776
- root;
1777
- server;
1778
- proc = null;
1779
- connection = null;
1780
- stderrBuffer = [];
1781
- processExited = false;
1782
- diagnosticsStore = new Map;
1783
- requestTimeoutMs;
1784
- initializeTimeoutMs;
1785
- workspaceApplyEditHandler = null;
1786
- diagnosticPullSupported = false;
1787
1761
  constructor(root, server2, timeouts = {}) {
1788
1762
  this.root = root;
1789
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;
1790
1771
  this.requestTimeoutMs = timeouts.requestTimeoutMs ?? REQUEST_TIMEOUT_MS;
1791
1772
  this.initializeTimeoutMs = timeouts.initializeTimeoutMs ?? INIT_TIMEOUT_MS;
1792
1773
  }
@@ -2283,16 +2264,12 @@ function movedPath(candidate, oldPath, newPath) {
2283
2264
  }
2284
2265
 
2285
2266
  class WorkspaceDocumentState {
2286
- sendNotification;
2287
- clearDiagnostics;
2288
- openDocuments = new Map;
2289
- openByUri = new Map;
2290
- openPromises = new Map;
2291
- now;
2292
- versionlessPublishQuiescenceMs;
2293
2267
  constructor(sendNotification, clearDiagnostics, options = {}) {
2294
2268
  this.sendNotification = sendNotification;
2295
2269
  this.clearDiagnostics = clearDiagnostics;
2270
+ this.openDocuments = new Map;
2271
+ this.openByUri = new Map;
2272
+ this.openPromises = new Map;
2296
2273
  this.now = options.now ?? (() => Date.now());
2297
2274
  this.versionlessPublishQuiescenceMs = options.versionlessPublishQuiescenceMs ?? DEFAULT_VERSIONLESS_PUBLISH_QUIESCENCE_MS;
2298
2275
  }
@@ -2556,13 +2533,11 @@ import { dirname as dirname4, isAbsolute as isAbsolute4, relative as relative3,
2556
2533
  import { fileURLToPath as fileURLToPath2 } from "node:url";
2557
2534
 
2558
2535
  class WorkspaceEditPathError extends Error {
2559
- path;
2560
- detail;
2561
- name = "WorkspaceEditPathError";
2562
2536
  constructor(path2, detail) {
2563
2537
  super(`${detail}: ${path2}`);
2564
2538
  this.path = path2;
2565
2539
  this.detail = detail;
2540
+ this.name = "WorkspaceEditPathError";
2566
2541
  }
2567
2542
  }
2568
2543
  function isPathInsideWorkspace(filePath, workspaceRoot) {
@@ -2854,13 +2829,11 @@ function canonicalFingerprint(operations) {
2854
2829
 
2855
2830
  // ../lsp-core/src/lsp/workspace-edit-types.ts
2856
2831
  class WorkspaceEditValidationError extends Error {
2857
- changeIndex;
2858
- detail;
2859
- name = "WorkspaceEditValidationError";
2860
2832
  constructor(changeIndex, detail) {
2861
2833
  super(`change ${changeIndex}: ${detail}`);
2862
2834
  this.changeIndex = changeIndex;
2863
2835
  this.detail = detail;
2836
+ this.name = "WorkspaceEditValidationError";
2864
2837
  }
2865
2838
  }
2866
2839
 
@@ -3358,10 +3331,9 @@ function simulateDelete(operation, virtual) {
3358
3331
  import { existsSync as existsSync6, lstatSync as lstatSync4, readdirSync as readdirSync2 } from "node:fs";
3359
3332
  import { dirname as dirname6, resolve as resolve5 } from "node:path";
3360
3333
  class WorkspaceSnapshotBuilder {
3361
- workspaceRoot;
3362
- snapshots = new Map;
3363
3334
  constructor(workspaceRoot) {
3364
3335
  this.workspaceRoot = workspaceRoot;
3336
+ this.snapshots = new Map;
3365
3337
  }
3366
3338
  build(operations) {
3367
3339
  this.add(this.workspaceRoot, false);
@@ -3405,8 +3377,10 @@ function snapshotOperations(operations, workspaceRoot) {
3405
3377
 
3406
3378
  // ../lsp-core/src/lsp/workspace-edit-plan.ts
3407
3379
  class PlanPathIndex {
3408
- firstChangeByPath = new Map;
3409
- reportedPathByCanonical = new Map;
3380
+ constructor() {
3381
+ this.firstChangeByPath = new Map;
3382
+ this.reportedPathByCanonical = new Map;
3383
+ }
3410
3384
  build(operations) {
3411
3385
  for (const operation of operations) {
3412
3386
  switch (operation.kind) {
@@ -3495,14 +3469,11 @@ function isRecord4(value) {
3495
3469
  }
3496
3470
 
3497
3471
  class WorkspaceMutationController {
3498
- workspaceRoot;
3499
- documents;
3500
- activeLease = null;
3501
- nextLeaseId = 1;
3502
- io;
3503
3472
  constructor(workspaceRoot, documents) {
3504
3473
  this.workspaceRoot = workspaceRoot;
3505
3474
  this.documents = documents;
3475
+ this.activeLease = null;
3476
+ this.nextLeaseId = 1;
3506
3477
  }
3507
3478
  setIo(io) {
3508
3479
  this.io = io;
@@ -3615,12 +3586,9 @@ var DIAGNOSTICS_FRESHNESS_TIMEOUT_MS = 3000;
3615
3586
  var VERSIONLESS_PUBLISH_QUIESCENCE_MS = 250;
3616
3587
 
3617
3588
  class LspClient extends LspClientConnection {
3618
- diagnosticPullErrors = [];
3619
- documents;
3620
- workspaceMutations;
3621
- diagnosticsFreshnessTimeoutMs;
3622
3589
  constructor(root, server2, options = {}) {
3623
3590
  super(root, server2, options);
3591
+ this.diagnosticPullErrors = [];
3624
3592
  this.diagnosticsFreshnessTimeoutMs = options.diagnosticsFreshnessTimeoutMs ?? DIAGNOSTICS_FRESHNESS_TIMEOUT_MS;
3625
3593
  this.documents = new WorkspaceDocumentState((method, params) => this.sendNotification(method, params), (uri) => this.diagnosticsStore.delete(uri), {
3626
3594
  versionlessPublishQuiescenceMs: options.versionlessPublishQuiescenceMs ?? VERSIONLESS_PUBLISH_QUIESCENCE_MS
@@ -3920,16 +3888,11 @@ function awaitWithSignal2(promise, signal) {
3920
3888
  }
3921
3889
 
3922
3890
  class LspManager {
3923
- clients = new Map;
3924
- reaperHandle = null;
3925
- signalDisposer = null;
3926
- disposed = false;
3927
- idleTimeoutMs;
3928
- initTimeoutMs;
3929
- reaperIntervalMs;
3930
- clientFactory;
3931
- now;
3932
3891
  constructor(options = {}) {
3892
+ this.clients = new Map;
3893
+ this.reaperHandle = null;
3894
+ this.signalDisposer = null;
3895
+ this.disposed = false;
3933
3896
  this.idleTimeoutMs = options.idleTimeoutMs ?? IDLE_TIMEOUT_MS;
3934
3897
  this.initTimeoutMs = options.initTimeoutMs ?? INIT_TIMEOUT_MS;
3935
3898
  this.reaperIntervalMs = options.reaperIntervalMs ?? REAPER_INTERVAL_MS;
@@ -5864,7 +5827,10 @@ function requestedProtocolVersion(params) {
5864
5827
  var CONTEXT_KEY = "_context";
5865
5828
 
5866
5829
  class InvalidDaemonRequestError extends Error {
5867
- name = "InvalidDaemonRequestError";
5830
+ constructor() {
5831
+ super(...arguments);
5832
+ this.name = "InvalidDaemonRequestError";
5833
+ }
5868
5834
  }
5869
5835
  function extractRequestContext(raw) {
5870
5836
  if (!isPlainRecord(raw) || raw["method"] !== "tools/call")
@@ -6128,10 +6094,9 @@ var OMO_LSP_DAEMON_VERSION2 = "OMO_LSP_DAEMON_VERSION";
6128
6094
  var DAEMON_VERSION_PATTERN2 = /^[A-Za-z0-9][A-Za-z0-9._+-]{0,127}$/;
6129
6095
 
6130
6096
  class InvalidRuntimeOverrideError2 extends Error {
6131
- code = "invalid_runtime_override";
6132
- reason;
6133
6097
  constructor(reason, message) {
6134
6098
  super(message);
6099
+ this.code = "invalid_runtime_override";
6135
6100
  this.name = "InvalidRuntimeOverrideError";
6136
6101
  this.reason = reason;
6137
6102
  }
@@ -6178,13 +6143,13 @@ function currentRequestContext2(env = process.env) {
6178
6143
  return currentRequestContext(env);
6179
6144
  }
6180
6145
  export {
6181
- validateDaemonVersion2 as validateDaemonVersion,
6182
- resolveDaemonRuntime2 as resolveDaemonRuntime,
6183
- currentRequestContext2 as currentRequestContext,
6184
- callToolViaDaemon2 as callToolViaDaemon,
6185
- callDiagnosticsViaDaemon2 as callDiagnosticsViaDaemon,
6186
- OMO_LSP_DAEMON_VERSION2 as OMO_LSP_DAEMON_VERSION,
6187
- OMO_LSP_DAEMON_DIR2 as OMO_LSP_DAEMON_DIR,
6146
+ InvalidRuntimeOverrideError2 as InvalidRuntimeOverrideError,
6188
6147
  OMO_LSP_DAEMON_CLI2 as OMO_LSP_DAEMON_CLI,
6189
- 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
6190
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) => {