oh-my-opencode 5.0.0-beta.13 → 5.0.0-beta.15
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.
- package/README.ja.md +25 -21
- package/README.ko.md +25 -21
- package/README.md +26 -22
- package/README.ru.md +24 -20
- package/README.zh-cn.md +25 -21
- package/dist/cli/index.js +12628 -13558
- package/dist/cli-node/index.js +12628 -13558
- package/dist/features/btw-side/tui-controller-types.d.ts +5 -0
- package/dist/features/btw-side/tui-controller.d.ts +8 -3
- package/dist/features/btw-side/tui-escape-return.d.ts +12 -0
- package/dist/features/btw-side/tui-keymap.d.ts +8 -1
- package/dist/features/btw-side/tui-picker-options.d.ts +20 -0
- package/dist/features/btw-side/tui-picker.d.ts +9 -0
- package/dist/features/btw-side/tui-session-catalog.d.ts +35 -0
- package/dist/features/btw-side/tui-side-start.d.ts +1 -1
- package/dist/features/opengateway-provider/index.d.ts +13 -0
- package/dist/index.js +8462 -6318
- package/dist/skills/frontend/SKILL.md +1 -0
- package/dist/skills/frontend/references/design/print-paged-media.md +76 -0
- package/dist/skills/ulw-research/SKILL.md +1 -1
- package/dist/skills/visual-qa/SKILL.md +3 -2
- package/dist/tui.js +3993 -5513
- package/package.json +22 -22
- package/packages/git-bash-mcp/package.json +1 -1
- package/packages/lsp-daemon/dist/cli.js +81 -113
- package/packages/lsp-daemon/dist/client.js +82 -117
- package/packages/lsp-daemon/dist/ensure-daemon.js +1 -0
- package/packages/lsp-daemon/dist/index.js +88 -122
- package/packages/lsp-daemon/dist/version-reap.js +1 -1
- package/packages/lsp-tools-mcp/dist/cli.js +62 -93
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +62 -92
- package/packages/lsp-tools-mcp/dist/mcp.js +64 -95
- package/packages/lsp-tools-mcp/dist/request-context.js +11 -12
- package/packages/lsp-tools-mcp/dist/tools.js +73 -104
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +30 -29
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/src/hook.ts +1 -0
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +81 -64
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +81 -65
- package/packages/omo-codex/plugin/components/codegraph/package.json +4 -4
- package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +1 -0
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-hook-runtime.ts +1 -0
- package/packages/omo-codex/plugin/components/comment-checker/dist/cli.js +2 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +5 -5
- package/packages/omo-codex/plugin/components/comment-checker/src/runner.ts +1 -0
- package/packages/omo-codex/plugin/components/git-bash/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +3 -4
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +5 -5
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +70 -107
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +5 -5
- package/packages/omo-codex/plugin/components/lsp/src/cli.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/dist/cli.js +14 -12
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +7 -7
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +5 -5
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +5 -5
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +25 -25
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +31 -31
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +5 -5
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +1 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/src/paths.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +25 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +9 -0
- package/packages/omo-codex/plugin/components/ulw-loop/vitest.config.ts +1 -0
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +661 -375
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/shared/package.json +2 -3
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +1 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/print-paged-media.md +76 -0
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +3 -2
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +53 -53
- package/packages/shared-skills/skills/frontend/SKILL.md +1 -0
- package/packages/shared-skills/skills/frontend/references/design/print-paged-media.md +76 -0
- package/packages/shared-skills/skills/ulw-research/SKILL.md +1 -1
- package/packages/shared-skills/skills/visual-qa/SKILL.md +3 -2
- package/script/qa/web-terminal-visual-qa.mjs +2 -0
- package/script/qa/xterm-live-terminal.mjs +18 -2
|
@@ -320,18 +320,17 @@ import { homedir } from "node:os";
|
|
|
320
320
|
import { basename, delimiter, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
321
321
|
|
|
322
322
|
class LspRequestContextParseError extends Error {
|
|
323
|
-
code;
|
|
324
|
-
name = "LspRequestContextParseError";
|
|
325
323
|
constructor(code, message) {
|
|
326
324
|
super(message);
|
|
327
325
|
this.code = code;
|
|
326
|
+
this.name = "LspRequestContextParseError";
|
|
328
327
|
}
|
|
329
328
|
}
|
|
330
329
|
|
|
331
330
|
class LspRequestContextUnavailableError extends Error {
|
|
332
|
-
name = "LspRequestContextUnavailableError";
|
|
333
331
|
constructor() {
|
|
334
332
|
super("LSP request context is required. Standalone MCP startup must install one with runWithRequestContext(createStandaloneMcpRequestContext()).");
|
|
333
|
+
this.name = "LspRequestContextUnavailableError";
|
|
335
334
|
}
|
|
336
335
|
}
|
|
337
336
|
var storage = new AsyncLocalStorage;
|
|
@@ -504,22 +503,15 @@ function effectiveExtension(filePath) {
|
|
|
504
503
|
|
|
505
504
|
// ../lsp-core/src/lsp/errors.ts
|
|
506
505
|
class LspConnectionClosedError extends Error {
|
|
507
|
-
serverId;
|
|
508
|
-
root;
|
|
509
|
-
name = "LspConnectionClosedError";
|
|
510
506
|
constructor(serverId, root, message) {
|
|
511
507
|
super(message ?? `LSP connection closed for ${serverId} at ${root}`);
|
|
512
508
|
this.serverId = serverId;
|
|
513
509
|
this.root = root;
|
|
510
|
+
this.name = "LspConnectionClosedError";
|
|
514
511
|
}
|
|
515
512
|
}
|
|
516
513
|
|
|
517
514
|
class LspProcessExitedError extends Error {
|
|
518
|
-
serverId;
|
|
519
|
-
root;
|
|
520
|
-
exitCode;
|
|
521
|
-
stderrTail;
|
|
522
|
-
name = "LspProcessExitedError";
|
|
523
515
|
constructor(serverId, root, exitCode, stderrTail) {
|
|
524
516
|
const stderrSuffix = stderrTail ? `
|
|
525
517
|
stderr tail: ${stderrTail}` : "";
|
|
@@ -528,46 +520,49 @@ stderr tail: ${stderrTail}` : "";
|
|
|
528
520
|
this.root = root;
|
|
529
521
|
this.exitCode = exitCode;
|
|
530
522
|
this.stderrTail = stderrTail;
|
|
523
|
+
this.name = "LspProcessExitedError";
|
|
531
524
|
}
|
|
532
525
|
}
|
|
533
526
|
|
|
534
527
|
class LspRequestTimeoutError extends Error {
|
|
535
|
-
method;
|
|
536
|
-
stderrTail;
|
|
537
|
-
name = "LspRequestTimeoutError";
|
|
538
528
|
constructor(method, stderrTail) {
|
|
539
529
|
const stderrSuffix = stderrTail ? `
|
|
540
530
|
recent stderr: ${stderrTail}` : "";
|
|
541
531
|
super(`LSP request timeout (method: ${method})${stderrSuffix}`);
|
|
542
532
|
this.method = method;
|
|
543
533
|
this.stderrTail = stderrTail;
|
|
534
|
+
this.name = "LspRequestTimeoutError";
|
|
544
535
|
}
|
|
545
536
|
}
|
|
546
537
|
|
|
547
538
|
class LspInvalidPathError extends Error {
|
|
548
|
-
|
|
539
|
+
constructor() {
|
|
540
|
+
super(...arguments);
|
|
541
|
+
this.name = "LspInvalidPathError";
|
|
542
|
+
}
|
|
549
543
|
}
|
|
550
544
|
|
|
551
545
|
class LspServerLookupError extends Error {
|
|
552
|
-
lookup;
|
|
553
|
-
name = "LspServerLookupError";
|
|
554
546
|
constructor(message, lookup) {
|
|
555
547
|
super(message);
|
|
556
548
|
this.lookup = lookup;
|
|
549
|
+
this.name = "LspServerLookupError";
|
|
557
550
|
}
|
|
558
551
|
}
|
|
559
552
|
|
|
560
553
|
class LspServerInitializingError extends Error {
|
|
561
|
-
originalError;
|
|
562
|
-
name = "LspServerInitializingError";
|
|
563
554
|
constructor(originalError) {
|
|
564
555
|
super(`LSP server is still initializing. Please retry in a few seconds. Original error: ${originalError.message}`);
|
|
565
556
|
this.originalError = originalError;
|
|
557
|
+
this.name = "LspServerInitializingError";
|
|
566
558
|
}
|
|
567
559
|
}
|
|
568
560
|
|
|
569
561
|
class LspProcessSpawnError extends Error {
|
|
570
|
-
|
|
562
|
+
constructor() {
|
|
563
|
+
super(...arguments);
|
|
564
|
+
this.name = "LspProcessSpawnError";
|
|
565
|
+
}
|
|
571
566
|
}
|
|
572
567
|
function isLspDeadConnectionError(err) {
|
|
573
568
|
return err instanceof LspConnectionClosedError || err instanceof LspProcessExitedError;
|
|
@@ -612,20 +607,31 @@ var METHOD_NOT_FOUND = -32601;
|
|
|
612
607
|
var INTERNAL_ERROR = -32603;
|
|
613
608
|
|
|
614
609
|
class JsonRpcConnection {
|
|
615
|
-
reader;
|
|
616
|
-
writer;
|
|
617
|
-
pendingRequests = new Map;
|
|
618
|
-
notificationHandlers = new Map;
|
|
619
|
-
requestHandlers = new Map;
|
|
620
|
-
closeHandlers = [];
|
|
621
|
-
errorHandlers = [];
|
|
622
|
-
inputBuffer = Buffer.alloc(0);
|
|
623
|
-
nextRequestId = 1;
|
|
624
|
-
listening = false;
|
|
625
|
-
disposed = false;
|
|
626
610
|
constructor(reader, writer) {
|
|
627
611
|
this.reader = reader;
|
|
628
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
|
+
};
|
|
629
635
|
}
|
|
630
636
|
listen() {
|
|
631
637
|
if (this.listening)
|
|
@@ -746,19 +752,6 @@ class JsonRpcConnection {
|
|
|
746
752
|
this.notificationHandlers.clear();
|
|
747
753
|
this.requestHandlers.clear();
|
|
748
754
|
}
|
|
749
|
-
handleData = (chunk) => {
|
|
750
|
-
const chunkBuffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, "utf8");
|
|
751
|
-
this.inputBuffer = Buffer.concat([this.inputBuffer, chunkBuffer]);
|
|
752
|
-
this.drainInputBuffer();
|
|
753
|
-
};
|
|
754
|
-
handleClose = () => {
|
|
755
|
-
for (const handler of this.closeHandlers) {
|
|
756
|
-
handler();
|
|
757
|
-
}
|
|
758
|
-
};
|
|
759
|
-
handleStreamError = (error) => {
|
|
760
|
-
this.emitError(error);
|
|
761
|
-
};
|
|
762
755
|
drainInputBuffer() {
|
|
763
756
|
while (true) {
|
|
764
757
|
const headerEnd = this.inputBuffer.indexOf(HEADER_SEPARATOR2);
|
|
@@ -1106,31 +1099,25 @@ function isPosition(value) {
|
|
|
1106
1099
|
|
|
1107
1100
|
// ../lsp-core/src/lsp/transport.ts
|
|
1108
1101
|
class LspClientNotStartedError extends Error {
|
|
1109
|
-
serverId;
|
|
1110
|
-
root;
|
|
1111
|
-
name = "LspClientNotStartedError";
|
|
1112
1102
|
constructor(serverId, root) {
|
|
1113
1103
|
super("LSP client not started");
|
|
1114
1104
|
this.serverId = serverId;
|
|
1115
1105
|
this.root = root;
|
|
1106
|
+
this.name = "LspClientNotStartedError";
|
|
1116
1107
|
}
|
|
1117
1108
|
}
|
|
1118
1109
|
|
|
1119
1110
|
class LspClientTransport {
|
|
1120
|
-
root;
|
|
1121
|
-
server;
|
|
1122
|
-
proc = null;
|
|
1123
|
-
connection = null;
|
|
1124
|
-
stderrBuffer = [];
|
|
1125
|
-
processExited = false;
|
|
1126
|
-
diagnosticsStore = new Map;
|
|
1127
|
-
requestTimeoutMs;
|
|
1128
|
-
initializeTimeoutMs;
|
|
1129
|
-
workspaceApplyEditHandler = null;
|
|
1130
|
-
diagnosticPullSupported = false;
|
|
1131
1111
|
constructor(root, server2, timeouts = {}) {
|
|
1132
1112
|
this.root = root;
|
|
1133
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;
|
|
1134
1121
|
this.requestTimeoutMs = timeouts.requestTimeoutMs ?? REQUEST_TIMEOUT_MS;
|
|
1135
1122
|
this.initializeTimeoutMs = timeouts.initializeTimeoutMs ?? INIT_TIMEOUT_MS;
|
|
1136
1123
|
}
|
|
@@ -1627,16 +1614,12 @@ function movedPath(candidate, oldPath, newPath) {
|
|
|
1627
1614
|
}
|
|
1628
1615
|
|
|
1629
1616
|
class WorkspaceDocumentState {
|
|
1630
|
-
sendNotification;
|
|
1631
|
-
clearDiagnostics;
|
|
1632
|
-
openDocuments = new Map;
|
|
1633
|
-
openByUri = new Map;
|
|
1634
|
-
openPromises = new Map;
|
|
1635
|
-
now;
|
|
1636
|
-
versionlessPublishQuiescenceMs;
|
|
1637
1617
|
constructor(sendNotification, clearDiagnostics, options = {}) {
|
|
1638
1618
|
this.sendNotification = sendNotification;
|
|
1639
1619
|
this.clearDiagnostics = clearDiagnostics;
|
|
1620
|
+
this.openDocuments = new Map;
|
|
1621
|
+
this.openByUri = new Map;
|
|
1622
|
+
this.openPromises = new Map;
|
|
1640
1623
|
this.now = options.now ?? (() => Date.now());
|
|
1641
1624
|
this.versionlessPublishQuiescenceMs = options.versionlessPublishQuiescenceMs ?? DEFAULT_VERSIONLESS_PUBLISH_QUIESCENCE_MS;
|
|
1642
1625
|
}
|
|
@@ -1900,13 +1883,11 @@ import { dirname as dirname2, isAbsolute as isAbsolute2, relative as relative3,
|
|
|
1900
1883
|
import { fileURLToPath } from "node:url";
|
|
1901
1884
|
|
|
1902
1885
|
class WorkspaceEditPathError extends Error {
|
|
1903
|
-
path;
|
|
1904
|
-
detail;
|
|
1905
|
-
name = "WorkspaceEditPathError";
|
|
1906
1886
|
constructor(path, detail) {
|
|
1907
1887
|
super(`${detail}: ${path}`);
|
|
1908
1888
|
this.path = path;
|
|
1909
1889
|
this.detail = detail;
|
|
1890
|
+
this.name = "WorkspaceEditPathError";
|
|
1910
1891
|
}
|
|
1911
1892
|
}
|
|
1912
1893
|
function isPathInsideWorkspace(filePath, workspaceRoot) {
|
|
@@ -2198,13 +2179,11 @@ function canonicalFingerprint(operations) {
|
|
|
2198
2179
|
|
|
2199
2180
|
// ../lsp-core/src/lsp/workspace-edit-types.ts
|
|
2200
2181
|
class WorkspaceEditValidationError extends Error {
|
|
2201
|
-
changeIndex;
|
|
2202
|
-
detail;
|
|
2203
|
-
name = "WorkspaceEditValidationError";
|
|
2204
2182
|
constructor(changeIndex, detail) {
|
|
2205
2183
|
super(`change ${changeIndex}: ${detail}`);
|
|
2206
2184
|
this.changeIndex = changeIndex;
|
|
2207
2185
|
this.detail = detail;
|
|
2186
|
+
this.name = "WorkspaceEditValidationError";
|
|
2208
2187
|
}
|
|
2209
2188
|
}
|
|
2210
2189
|
|
|
@@ -2702,10 +2681,9 @@ function simulateDelete(operation, virtual) {
|
|
|
2702
2681
|
import { existsSync as existsSync5, lstatSync as lstatSync3, readdirSync as readdirSync2 } from "node:fs";
|
|
2703
2682
|
import { dirname as dirname4, resolve as resolve5 } from "node:path";
|
|
2704
2683
|
class WorkspaceSnapshotBuilder {
|
|
2705
|
-
workspaceRoot;
|
|
2706
|
-
snapshots = new Map;
|
|
2707
2684
|
constructor(workspaceRoot) {
|
|
2708
2685
|
this.workspaceRoot = workspaceRoot;
|
|
2686
|
+
this.snapshots = new Map;
|
|
2709
2687
|
}
|
|
2710
2688
|
build(operations) {
|
|
2711
2689
|
this.add(this.workspaceRoot, false);
|
|
@@ -2749,8 +2727,10 @@ function snapshotOperations(operations, workspaceRoot) {
|
|
|
2749
2727
|
|
|
2750
2728
|
// ../lsp-core/src/lsp/workspace-edit-plan.ts
|
|
2751
2729
|
class PlanPathIndex {
|
|
2752
|
-
|
|
2753
|
-
|
|
2730
|
+
constructor() {
|
|
2731
|
+
this.firstChangeByPath = new Map;
|
|
2732
|
+
this.reportedPathByCanonical = new Map;
|
|
2733
|
+
}
|
|
2754
2734
|
build(operations) {
|
|
2755
2735
|
for (const operation of operations) {
|
|
2756
2736
|
switch (operation.kind) {
|
|
@@ -2839,14 +2819,11 @@ function isRecord4(value) {
|
|
|
2839
2819
|
}
|
|
2840
2820
|
|
|
2841
2821
|
class WorkspaceMutationController {
|
|
2842
|
-
workspaceRoot;
|
|
2843
|
-
documents;
|
|
2844
|
-
activeLease = null;
|
|
2845
|
-
nextLeaseId = 1;
|
|
2846
|
-
io;
|
|
2847
2822
|
constructor(workspaceRoot, documents) {
|
|
2848
2823
|
this.workspaceRoot = workspaceRoot;
|
|
2849
2824
|
this.documents = documents;
|
|
2825
|
+
this.activeLease = null;
|
|
2826
|
+
this.nextLeaseId = 1;
|
|
2850
2827
|
}
|
|
2851
2828
|
setIo(io) {
|
|
2852
2829
|
this.io = io;
|
|
@@ -2959,12 +2936,9 @@ var DIAGNOSTICS_FRESHNESS_TIMEOUT_MS = 3000;
|
|
|
2959
2936
|
var VERSIONLESS_PUBLISH_QUIESCENCE_MS = 250;
|
|
2960
2937
|
|
|
2961
2938
|
class LspClient extends LspClientConnection {
|
|
2962
|
-
diagnosticPullErrors = [];
|
|
2963
|
-
documents;
|
|
2964
|
-
workspaceMutations;
|
|
2965
|
-
diagnosticsFreshnessTimeoutMs;
|
|
2966
2939
|
constructor(root, server2, options = {}) {
|
|
2967
2940
|
super(root, server2, options);
|
|
2941
|
+
this.diagnosticPullErrors = [];
|
|
2968
2942
|
this.diagnosticsFreshnessTimeoutMs = options.diagnosticsFreshnessTimeoutMs ?? DIAGNOSTICS_FRESHNESS_TIMEOUT_MS;
|
|
2969
2943
|
this.documents = new WorkspaceDocumentState((method, params) => this.sendNotification(method, params), (uri) => this.diagnosticsStore.delete(uri), {
|
|
2970
2944
|
versionlessPublishQuiescenceMs: options.versionlessPublishQuiescenceMs ?? VERSIONLESS_PUBLISH_QUIESCENCE_MS
|
|
@@ -3264,16 +3238,11 @@ function awaitWithSignal(promise, signal) {
|
|
|
3264
3238
|
}
|
|
3265
3239
|
|
|
3266
3240
|
class LspManager {
|
|
3267
|
-
clients = new Map;
|
|
3268
|
-
reaperHandle = null;
|
|
3269
|
-
signalDisposer = null;
|
|
3270
|
-
disposed = false;
|
|
3271
|
-
idleTimeoutMs;
|
|
3272
|
-
initTimeoutMs;
|
|
3273
|
-
reaperIntervalMs;
|
|
3274
|
-
clientFactory;
|
|
3275
|
-
now;
|
|
3276
3241
|
constructor(options = {}) {
|
|
3242
|
+
this.clients = new Map;
|
|
3243
|
+
this.reaperHandle = null;
|
|
3244
|
+
this.signalDisposer = null;
|
|
3245
|
+
this.disposed = false;
|
|
3277
3246
|
this.idleTimeoutMs = options.idleTimeoutMs ?? IDLE_TIMEOUT_MS;
|
|
3278
3247
|
this.initTimeoutMs = options.initTimeoutMs ?? INIT_TIMEOUT_MS;
|
|
3279
3248
|
this.reaperIntervalMs = options.reaperIntervalMs ?? REAPER_INTERVAL_MS;
|
|
@@ -5215,6 +5184,6 @@ function requestedProtocolVersion(params) {
|
|
|
5215
5184
|
return params["protocolVersion"];
|
|
5216
5185
|
}
|
|
5217
5186
|
export {
|
|
5218
|
-
|
|
5219
|
-
|
|
5187
|
+
handleLspMcpRequest,
|
|
5188
|
+
runMcpStdioServer
|
|
5220
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
|
-
|
|
181
|
-
parseLspRequestContext,
|
|
182
|
-
lspRequestContext,
|
|
183
|
-
isPathInside,
|
|
184
|
-
createStandaloneMcpRequestContext,
|
|
185
|
-
contextEnv,
|
|
186
|
-
contextCwd,
|
|
187
|
-
canonicalizeExistingOrNearestAncestor,
|
|
179
|
+
LspRequestContextParseError,
|
|
188
180
|
LspRequestContextUnavailableError,
|
|
189
|
-
|
|
181
|
+
canonicalizeExistingOrNearestAncestor,
|
|
182
|
+
contextCwd,
|
|
183
|
+
contextEnv,
|
|
184
|
+
createStandaloneMcpRequestContext,
|
|
185
|
+
isPathInside,
|
|
186
|
+
lspRequestContext,
|
|
187
|
+
parseLspRequestContext,
|
|
188
|
+
runWithRequestContext
|
|
190
189
|
};
|