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
@@ -271,7 +271,11 @@ function createParentWatchdog(config, onDeadParent) {
271
271
  const probeAlive = config.probeAlive ?? isProcessAlive;
272
272
  let fired = false;
273
273
  const timer = setInterval(() => {
274
- if (fired || probeAlive(parentPid))
274
+ if (fired)
275
+ return;
276
+ const alive = probeAlive(parentPid);
277
+ config.onPoll?.(alive);
278
+ if (alive)
275
279
  return;
276
280
  fired = true;
277
281
  onDeadParent(parentPid, pollIntervalMs);
@@ -316,18 +320,17 @@ import { homedir } from "node:os";
316
320
  import { basename, delimiter, dirname, isAbsolute, join, relative, resolve } from "node:path";
317
321
 
318
322
  class LspRequestContextParseError extends Error {
319
- code;
320
- name = "LspRequestContextParseError";
321
323
  constructor(code, message) {
322
324
  super(message);
323
325
  this.code = code;
326
+ this.name = "LspRequestContextParseError";
324
327
  }
325
328
  }
326
329
 
327
330
  class LspRequestContextUnavailableError extends Error {
328
- name = "LspRequestContextUnavailableError";
329
331
  constructor() {
330
332
  super("LSP request context is required. Standalone MCP startup must install one with runWithRequestContext(createStandaloneMcpRequestContext()).");
333
+ this.name = "LspRequestContextUnavailableError";
331
334
  }
332
335
  }
333
336
  var storage = new AsyncLocalStorage;
@@ -500,22 +503,15 @@ function effectiveExtension(filePath) {
500
503
 
501
504
  // ../lsp-core/src/lsp/errors.ts
502
505
  class LspConnectionClosedError extends Error {
503
- serverId;
504
- root;
505
- name = "LspConnectionClosedError";
506
506
  constructor(serverId, root, message) {
507
507
  super(message ?? `LSP connection closed for ${serverId} at ${root}`);
508
508
  this.serverId = serverId;
509
509
  this.root = root;
510
+ this.name = "LspConnectionClosedError";
510
511
  }
511
512
  }
512
513
 
513
514
  class LspProcessExitedError extends Error {
514
- serverId;
515
- root;
516
- exitCode;
517
- stderrTail;
518
- name = "LspProcessExitedError";
519
515
  constructor(serverId, root, exitCode, stderrTail) {
520
516
  const stderrSuffix = stderrTail ? `
521
517
  stderr tail: ${stderrTail}` : "";
@@ -524,46 +520,49 @@ stderr tail: ${stderrTail}` : "";
524
520
  this.root = root;
525
521
  this.exitCode = exitCode;
526
522
  this.stderrTail = stderrTail;
523
+ this.name = "LspProcessExitedError";
527
524
  }
528
525
  }
529
526
 
530
527
  class LspRequestTimeoutError extends Error {
531
- method;
532
- stderrTail;
533
- name = "LspRequestTimeoutError";
534
528
  constructor(method, stderrTail) {
535
529
  const stderrSuffix = stderrTail ? `
536
530
  recent stderr: ${stderrTail}` : "";
537
531
  super(`LSP request timeout (method: ${method})${stderrSuffix}`);
538
532
  this.method = method;
539
533
  this.stderrTail = stderrTail;
534
+ this.name = "LspRequestTimeoutError";
540
535
  }
541
536
  }
542
537
 
543
538
  class LspInvalidPathError extends Error {
544
- name = "LspInvalidPathError";
539
+ constructor() {
540
+ super(...arguments);
541
+ this.name = "LspInvalidPathError";
542
+ }
545
543
  }
546
544
 
547
545
  class LspServerLookupError extends Error {
548
- lookup;
549
- name = "LspServerLookupError";
550
546
  constructor(message, lookup) {
551
547
  super(message);
552
548
  this.lookup = lookup;
549
+ this.name = "LspServerLookupError";
553
550
  }
554
551
  }
555
552
 
556
553
  class LspServerInitializingError extends Error {
557
- originalError;
558
- name = "LspServerInitializingError";
559
554
  constructor(originalError) {
560
555
  super(`LSP server is still initializing. Please retry in a few seconds. Original error: ${originalError.message}`);
561
556
  this.originalError = originalError;
557
+ this.name = "LspServerInitializingError";
562
558
  }
563
559
  }
564
560
 
565
561
  class LspProcessSpawnError extends Error {
566
- name = "LspProcessSpawnError";
562
+ constructor() {
563
+ super(...arguments);
564
+ this.name = "LspProcessSpawnError";
565
+ }
567
566
  }
568
567
  function isLspDeadConnectionError(err) {
569
568
  return err instanceof LspConnectionClosedError || err instanceof LspProcessExitedError;
@@ -608,20 +607,31 @@ var METHOD_NOT_FOUND = -32601;
608
607
  var INTERNAL_ERROR = -32603;
609
608
 
610
609
  class JsonRpcConnection {
611
- reader;
612
- writer;
613
- pendingRequests = new Map;
614
- notificationHandlers = new Map;
615
- requestHandlers = new Map;
616
- closeHandlers = [];
617
- errorHandlers = [];
618
- inputBuffer = Buffer.alloc(0);
619
- nextRequestId = 1;
620
- listening = false;
621
- disposed = false;
622
610
  constructor(reader, writer) {
623
611
  this.reader = reader;
624
612
  this.writer = writer;
613
+ this.pendingRequests = new Map;
614
+ this.notificationHandlers = new Map;
615
+ this.requestHandlers = new Map;
616
+ this.closeHandlers = [];
617
+ this.errorHandlers = [];
618
+ this.inputBuffer = Buffer.alloc(0);
619
+ this.nextRequestId = 1;
620
+ this.listening = false;
621
+ this.disposed = false;
622
+ this.handleData = (chunk) => {
623
+ const chunkBuffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, "utf8");
624
+ this.inputBuffer = Buffer.concat([this.inputBuffer, chunkBuffer]);
625
+ this.drainInputBuffer();
626
+ };
627
+ this.handleClose = () => {
628
+ for (const handler of this.closeHandlers) {
629
+ handler();
630
+ }
631
+ };
632
+ this.handleStreamError = (error) => {
633
+ this.emitError(error);
634
+ };
625
635
  }
626
636
  listen() {
627
637
  if (this.listening)
@@ -742,19 +752,6 @@ class JsonRpcConnection {
742
752
  this.notificationHandlers.clear();
743
753
  this.requestHandlers.clear();
744
754
  }
745
- handleData = (chunk) => {
746
- const chunkBuffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, "utf8");
747
- this.inputBuffer = Buffer.concat([this.inputBuffer, chunkBuffer]);
748
- this.drainInputBuffer();
749
- };
750
- handleClose = () => {
751
- for (const handler of this.closeHandlers) {
752
- handler();
753
- }
754
- };
755
- handleStreamError = (error) => {
756
- this.emitError(error);
757
- };
758
755
  drainInputBuffer() {
759
756
  while (true) {
760
757
  const headerEnd = this.inputBuffer.indexOf(HEADER_SEPARATOR2);
@@ -1102,31 +1099,25 @@ function isPosition(value) {
1102
1099
 
1103
1100
  // ../lsp-core/src/lsp/transport.ts
1104
1101
  class LspClientNotStartedError extends Error {
1105
- serverId;
1106
- root;
1107
- name = "LspClientNotStartedError";
1108
1102
  constructor(serverId, root) {
1109
1103
  super("LSP client not started");
1110
1104
  this.serverId = serverId;
1111
1105
  this.root = root;
1106
+ this.name = "LspClientNotStartedError";
1112
1107
  }
1113
1108
  }
1114
1109
 
1115
1110
  class LspClientTransport {
1116
- root;
1117
- server;
1118
- proc = null;
1119
- connection = null;
1120
- stderrBuffer = [];
1121
- processExited = false;
1122
- diagnosticsStore = new Map;
1123
- requestTimeoutMs;
1124
- initializeTimeoutMs;
1125
- workspaceApplyEditHandler = null;
1126
- diagnosticPullSupported = false;
1127
1111
  constructor(root, server2, timeouts = {}) {
1128
1112
  this.root = root;
1129
1113
  this.server = server2;
1114
+ this.proc = null;
1115
+ this.connection = null;
1116
+ this.stderrBuffer = [];
1117
+ this.processExited = false;
1118
+ this.diagnosticsStore = new Map;
1119
+ this.workspaceApplyEditHandler = null;
1120
+ this.diagnosticPullSupported = false;
1130
1121
  this.requestTimeoutMs = timeouts.requestTimeoutMs ?? REQUEST_TIMEOUT_MS;
1131
1122
  this.initializeTimeoutMs = timeouts.initializeTimeoutMs ?? INIT_TIMEOUT_MS;
1132
1123
  }
@@ -1623,16 +1614,12 @@ function movedPath(candidate, oldPath, newPath) {
1623
1614
  }
1624
1615
 
1625
1616
  class WorkspaceDocumentState {
1626
- sendNotification;
1627
- clearDiagnostics;
1628
- openDocuments = new Map;
1629
- openByUri = new Map;
1630
- openPromises = new Map;
1631
- now;
1632
- versionlessPublishQuiescenceMs;
1633
1617
  constructor(sendNotification, clearDiagnostics, options = {}) {
1634
1618
  this.sendNotification = sendNotification;
1635
1619
  this.clearDiagnostics = clearDiagnostics;
1620
+ this.openDocuments = new Map;
1621
+ this.openByUri = new Map;
1622
+ this.openPromises = new Map;
1636
1623
  this.now = options.now ?? (() => Date.now());
1637
1624
  this.versionlessPublishQuiescenceMs = options.versionlessPublishQuiescenceMs ?? DEFAULT_VERSIONLESS_PUBLISH_QUIESCENCE_MS;
1638
1625
  }
@@ -1896,13 +1883,11 @@ import { dirname as dirname2, isAbsolute as isAbsolute2, relative as relative3,
1896
1883
  import { fileURLToPath } from "node:url";
1897
1884
 
1898
1885
  class WorkspaceEditPathError extends Error {
1899
- path;
1900
- detail;
1901
- name = "WorkspaceEditPathError";
1902
1886
  constructor(path, detail) {
1903
1887
  super(`${detail}: ${path}`);
1904
1888
  this.path = path;
1905
1889
  this.detail = detail;
1890
+ this.name = "WorkspaceEditPathError";
1906
1891
  }
1907
1892
  }
1908
1893
  function isPathInsideWorkspace(filePath, workspaceRoot) {
@@ -2194,13 +2179,11 @@ function canonicalFingerprint(operations) {
2194
2179
 
2195
2180
  // ../lsp-core/src/lsp/workspace-edit-types.ts
2196
2181
  class WorkspaceEditValidationError extends Error {
2197
- changeIndex;
2198
- detail;
2199
- name = "WorkspaceEditValidationError";
2200
2182
  constructor(changeIndex, detail) {
2201
2183
  super(`change ${changeIndex}: ${detail}`);
2202
2184
  this.changeIndex = changeIndex;
2203
2185
  this.detail = detail;
2186
+ this.name = "WorkspaceEditValidationError";
2204
2187
  }
2205
2188
  }
2206
2189
 
@@ -2698,10 +2681,9 @@ function simulateDelete(operation, virtual) {
2698
2681
  import { existsSync as existsSync5, lstatSync as lstatSync3, readdirSync as readdirSync2 } from "node:fs";
2699
2682
  import { dirname as dirname4, resolve as resolve5 } from "node:path";
2700
2683
  class WorkspaceSnapshotBuilder {
2701
- workspaceRoot;
2702
- snapshots = new Map;
2703
2684
  constructor(workspaceRoot) {
2704
2685
  this.workspaceRoot = workspaceRoot;
2686
+ this.snapshots = new Map;
2705
2687
  }
2706
2688
  build(operations) {
2707
2689
  this.add(this.workspaceRoot, false);
@@ -2745,8 +2727,10 @@ function snapshotOperations(operations, workspaceRoot) {
2745
2727
 
2746
2728
  // ../lsp-core/src/lsp/workspace-edit-plan.ts
2747
2729
  class PlanPathIndex {
2748
- firstChangeByPath = new Map;
2749
- reportedPathByCanonical = new Map;
2730
+ constructor() {
2731
+ this.firstChangeByPath = new Map;
2732
+ this.reportedPathByCanonical = new Map;
2733
+ }
2750
2734
  build(operations) {
2751
2735
  for (const operation of operations) {
2752
2736
  switch (operation.kind) {
@@ -2835,14 +2819,11 @@ function isRecord4(value) {
2835
2819
  }
2836
2820
 
2837
2821
  class WorkspaceMutationController {
2838
- workspaceRoot;
2839
- documents;
2840
- activeLease = null;
2841
- nextLeaseId = 1;
2842
- io;
2843
2822
  constructor(workspaceRoot, documents) {
2844
2823
  this.workspaceRoot = workspaceRoot;
2845
2824
  this.documents = documents;
2825
+ this.activeLease = null;
2826
+ this.nextLeaseId = 1;
2846
2827
  }
2847
2828
  setIo(io) {
2848
2829
  this.io = io;
@@ -2955,12 +2936,9 @@ var DIAGNOSTICS_FRESHNESS_TIMEOUT_MS = 3000;
2955
2936
  var VERSIONLESS_PUBLISH_QUIESCENCE_MS = 250;
2956
2937
 
2957
2938
  class LspClient extends LspClientConnection {
2958
- diagnosticPullErrors = [];
2959
- documents;
2960
- workspaceMutations;
2961
- diagnosticsFreshnessTimeoutMs;
2962
2939
  constructor(root, server2, options = {}) {
2963
2940
  super(root, server2, options);
2941
+ this.diagnosticPullErrors = [];
2964
2942
  this.diagnosticsFreshnessTimeoutMs = options.diagnosticsFreshnessTimeoutMs ?? DIAGNOSTICS_FRESHNESS_TIMEOUT_MS;
2965
2943
  this.documents = new WorkspaceDocumentState((method, params) => this.sendNotification(method, params), (uri) => this.diagnosticsStore.delete(uri), {
2966
2944
  versionlessPublishQuiescenceMs: options.versionlessPublishQuiescenceMs ?? VERSIONLESS_PUBLISH_QUIESCENCE_MS
@@ -3260,16 +3238,11 @@ function awaitWithSignal(promise, signal) {
3260
3238
  }
3261
3239
 
3262
3240
  class LspManager {
3263
- clients = new Map;
3264
- reaperHandle = null;
3265
- signalDisposer = null;
3266
- disposed = false;
3267
- idleTimeoutMs;
3268
- initTimeoutMs;
3269
- reaperIntervalMs;
3270
- clientFactory;
3271
- now;
3272
3241
  constructor(options = {}) {
3242
+ this.clients = new Map;
3243
+ this.reaperHandle = null;
3244
+ this.signalDisposer = null;
3245
+ this.disposed = false;
3273
3246
  this.idleTimeoutMs = options.idleTimeoutMs ?? IDLE_TIMEOUT_MS;
3274
3247
  this.initTimeoutMs = options.initTimeoutMs ?? INIT_TIMEOUT_MS;
3275
3248
  this.reaperIntervalMs = options.reaperIntervalMs ?? REAPER_INTERVAL_MS;
@@ -5211,6 +5184,6 @@ function requestedProtocolVersion(params) {
5211
5184
  return params["protocolVersion"];
5212
5185
  }
5213
5186
  export {
5214
- runMcpStdioServer,
5215
- handleLspMcpRequest
5187
+ handleLspMcpRequest,
5188
+ runMcpStdioServer
5216
5189
  };
@@ -5,18 +5,17 @@ import { homedir } from "node:os";
5
5
  import { basename, delimiter, dirname, isAbsolute, join, relative, resolve } from "node:path";
6
6
 
7
7
  class LspRequestContextParseError extends Error {
8
- code;
9
- name = "LspRequestContextParseError";
10
8
  constructor(code, message) {
11
9
  super(message);
12
10
  this.code = code;
11
+ this.name = "LspRequestContextParseError";
13
12
  }
14
13
  }
15
14
 
16
15
  class LspRequestContextUnavailableError extends Error {
17
- name = "LspRequestContextUnavailableError";
18
16
  constructor() {
19
17
  super("LSP request context is required. Standalone MCP startup must install one with runWithRequestContext(createStandaloneMcpRequestContext()).");
18
+ this.name = "LspRequestContextUnavailableError";
20
19
  }
21
20
  }
22
21
  var storage = new AsyncLocalStorage;
@@ -177,14 +176,14 @@ function errorCode(error) {
177
176
  return typeof code === "string" ? code : undefined;
178
177
  }
179
178
  export {
180
- runWithRequestContext,
181
- parseLspRequestContext,
182
- lspRequestContext,
183
- isPathInside,
184
- createStandaloneMcpRequestContext,
185
- contextEnv,
186
- contextCwd,
187
- canonicalizeExistingOrNearestAncestor,
179
+ LspRequestContextParseError,
188
180
  LspRequestContextUnavailableError,
189
- LspRequestContextParseError
181
+ canonicalizeExistingOrNearestAncestor,
182
+ contextCwd,
183
+ contextEnv,
184
+ createStandaloneMcpRequestContext,
185
+ isPathInside,
186
+ lspRequestContext,
187
+ parseLspRequestContext,
188
+ runWithRequestContext
190
189
  };