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.
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-opencode",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.14",
|
|
4
4
|
"description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -165,15 +165,15 @@
|
|
|
165
165
|
"@clack/prompts": "^1.7.0",
|
|
166
166
|
"@code-yeongyu/comment-checker": "^0.8.0",
|
|
167
167
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
168
|
-
"@opencode-ai/plugin": "1.
|
|
169
|
-
"@opencode-ai/sdk": "1.
|
|
170
|
-
"@opentui/core": "^0.
|
|
171
|
-
"@opentui/keymap": "^0.
|
|
172
|
-
"@opentui/solid": "^0.
|
|
173
|
-
"commander": "^
|
|
168
|
+
"@opencode-ai/plugin": "1.18.19",
|
|
169
|
+
"@opencode-ai/sdk": "1.18.19",
|
|
170
|
+
"@opentui/core": "^0.5.6",
|
|
171
|
+
"@opentui/keymap": "^0.5.6",
|
|
172
|
+
"@opentui/solid": "^0.5.6",
|
|
173
|
+
"commander": "^15.0.0",
|
|
174
174
|
"detect-libc": "^2.1.2",
|
|
175
175
|
"diff": "^9.0.0",
|
|
176
|
-
"js-yaml": "^
|
|
176
|
+
"js-yaml": "^5.0.0",
|
|
177
177
|
"jsonc-parser": "^3.3.1",
|
|
178
178
|
"picocolors": "^1.1.1",
|
|
179
179
|
"picomatch": "^4.0.5",
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
"zod": "^4.4.3"
|
|
182
182
|
},
|
|
183
183
|
"devDependencies": {
|
|
184
|
-
"@code-yeongyu/senpi": "2026.8.
|
|
184
|
+
"@code-yeongyu/senpi": "2026.8.21-2",
|
|
185
185
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
186
186
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
187
187
|
"@oh-my-opencode/boulder-state": "workspace:*",
|
|
@@ -222,18 +222,18 @@
|
|
|
222
222
|
"typescript": "^7.0.2"
|
|
223
223
|
},
|
|
224
224
|
"optionalDependencies": {
|
|
225
|
-
"oh-my-opencode-darwin-arm64": "5.0.0-beta.
|
|
226
|
-
"oh-my-opencode-darwin-x64": "5.0.0-beta.
|
|
227
|
-
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.
|
|
228
|
-
"oh-my-opencode-linux-arm64": "5.0.0-beta.
|
|
229
|
-
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.
|
|
230
|
-
"oh-my-opencode-linux-x64": "5.0.0-beta.
|
|
231
|
-
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.
|
|
232
|
-
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.
|
|
233
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.
|
|
234
|
-
"oh-my-opencode-windows-arm64": "5.0.0-beta.
|
|
235
|
-
"oh-my-opencode-windows-x64": "5.0.0-beta.
|
|
236
|
-
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.
|
|
225
|
+
"oh-my-opencode-darwin-arm64": "5.0.0-beta.14",
|
|
226
|
+
"oh-my-opencode-darwin-x64": "5.0.0-beta.14",
|
|
227
|
+
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.14",
|
|
228
|
+
"oh-my-opencode-linux-arm64": "5.0.0-beta.14",
|
|
229
|
+
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.14",
|
|
230
|
+
"oh-my-opencode-linux-x64": "5.0.0-beta.14",
|
|
231
|
+
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.14",
|
|
232
|
+
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.14",
|
|
233
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.14",
|
|
234
|
+
"oh-my-opencode-windows-arm64": "5.0.0-beta.14",
|
|
235
|
+
"oh-my-opencode-windows-x64": "5.0.0-beta.14",
|
|
236
|
+
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.14"
|
|
237
237
|
},
|
|
238
238
|
"overrides": {
|
|
239
239
|
"@earendil-works/pi-agent-core": "0.84.2",
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
"express-rate-limit": "^8.5.1",
|
|
246
246
|
"fast-uri": "^3.1.2",
|
|
247
247
|
"path-to-regexp": "^8.4.2",
|
|
248
|
-
"@types/node": "26.
|
|
248
|
+
"@types/node": "26.2.0"
|
|
249
249
|
},
|
|
250
250
|
"trustedDependencies": [
|
|
251
251
|
"@code-yeongyu/comment-checker"
|
|
@@ -329,18 +329,17 @@ import { homedir } from "node:os";
|
|
|
329
329
|
import { basename, delimiter, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
330
330
|
|
|
331
331
|
class LspRequestContextParseError extends Error {
|
|
332
|
-
code;
|
|
333
|
-
name = "LspRequestContextParseError";
|
|
334
332
|
constructor(code, message) {
|
|
335
333
|
super(message);
|
|
336
334
|
this.code = code;
|
|
335
|
+
this.name = "LspRequestContextParseError";
|
|
337
336
|
}
|
|
338
337
|
}
|
|
339
338
|
|
|
340
339
|
class LspRequestContextUnavailableError extends Error {
|
|
341
|
-
name = "LspRequestContextUnavailableError";
|
|
342
340
|
constructor() {
|
|
343
341
|
super("LSP request context is required. Standalone MCP startup must install one with runWithRequestContext(createStandaloneMcpRequestContext()).");
|
|
342
|
+
this.name = "LspRequestContextUnavailableError";
|
|
344
343
|
}
|
|
345
344
|
}
|
|
346
345
|
var storage = new AsyncLocalStorage;
|
|
@@ -503,22 +502,15 @@ function effectiveExtension(filePath) {
|
|
|
503
502
|
|
|
504
503
|
// ../lsp-core/src/lsp/errors.ts
|
|
505
504
|
class LspConnectionClosedError extends Error {
|
|
506
|
-
serverId;
|
|
507
|
-
root;
|
|
508
|
-
name = "LspConnectionClosedError";
|
|
509
505
|
constructor(serverId, root, message) {
|
|
510
506
|
super(message ?? `LSP connection closed for ${serverId} at ${root}`);
|
|
511
507
|
this.serverId = serverId;
|
|
512
508
|
this.root = root;
|
|
509
|
+
this.name = "LspConnectionClosedError";
|
|
513
510
|
}
|
|
514
511
|
}
|
|
515
512
|
|
|
516
513
|
class LspProcessExitedError extends Error {
|
|
517
|
-
serverId;
|
|
518
|
-
root;
|
|
519
|
-
exitCode;
|
|
520
|
-
stderrTail;
|
|
521
|
-
name = "LspProcessExitedError";
|
|
522
514
|
constructor(serverId, root, exitCode, stderrTail) {
|
|
523
515
|
const stderrSuffix = stderrTail ? `
|
|
524
516
|
stderr tail: ${stderrTail}` : "";
|
|
@@ -527,46 +519,49 @@ stderr tail: ${stderrTail}` : "";
|
|
|
527
519
|
this.root = root;
|
|
528
520
|
this.exitCode = exitCode;
|
|
529
521
|
this.stderrTail = stderrTail;
|
|
522
|
+
this.name = "LspProcessExitedError";
|
|
530
523
|
}
|
|
531
524
|
}
|
|
532
525
|
|
|
533
526
|
class LspRequestTimeoutError extends Error {
|
|
534
|
-
method;
|
|
535
|
-
stderrTail;
|
|
536
|
-
name = "LspRequestTimeoutError";
|
|
537
527
|
constructor(method, stderrTail) {
|
|
538
528
|
const stderrSuffix = stderrTail ? `
|
|
539
529
|
recent stderr: ${stderrTail}` : "";
|
|
540
530
|
super(`LSP request timeout (method: ${method})${stderrSuffix}`);
|
|
541
531
|
this.method = method;
|
|
542
532
|
this.stderrTail = stderrTail;
|
|
533
|
+
this.name = "LspRequestTimeoutError";
|
|
543
534
|
}
|
|
544
535
|
}
|
|
545
536
|
|
|
546
537
|
class LspInvalidPathError extends Error {
|
|
547
|
-
|
|
538
|
+
constructor() {
|
|
539
|
+
super(...arguments);
|
|
540
|
+
this.name = "LspInvalidPathError";
|
|
541
|
+
}
|
|
548
542
|
}
|
|
549
543
|
|
|
550
544
|
class LspServerLookupError extends Error {
|
|
551
|
-
lookup;
|
|
552
|
-
name = "LspServerLookupError";
|
|
553
545
|
constructor(message, lookup) {
|
|
554
546
|
super(message);
|
|
555
547
|
this.lookup = lookup;
|
|
548
|
+
this.name = "LspServerLookupError";
|
|
556
549
|
}
|
|
557
550
|
}
|
|
558
551
|
|
|
559
552
|
class LspServerInitializingError extends Error {
|
|
560
|
-
originalError;
|
|
561
|
-
name = "LspServerInitializingError";
|
|
562
553
|
constructor(originalError) {
|
|
563
554
|
super(`LSP server is still initializing. Please retry in a few seconds. Original error: ${originalError.message}`);
|
|
564
555
|
this.originalError = originalError;
|
|
556
|
+
this.name = "LspServerInitializingError";
|
|
565
557
|
}
|
|
566
558
|
}
|
|
567
559
|
|
|
568
560
|
class LspProcessSpawnError extends Error {
|
|
569
|
-
|
|
561
|
+
constructor() {
|
|
562
|
+
super(...arguments);
|
|
563
|
+
this.name = "LspProcessSpawnError";
|
|
564
|
+
}
|
|
570
565
|
}
|
|
571
566
|
function isLspDeadConnectionError(err) {
|
|
572
567
|
return err instanceof LspConnectionClosedError || err instanceof LspProcessExitedError;
|
|
@@ -611,20 +606,31 @@ var METHOD_NOT_FOUND = -32601;
|
|
|
611
606
|
var INTERNAL_ERROR = -32603;
|
|
612
607
|
|
|
613
608
|
class JsonRpcConnection {
|
|
614
|
-
reader;
|
|
615
|
-
writer;
|
|
616
|
-
pendingRequests = new Map;
|
|
617
|
-
notificationHandlers = new Map;
|
|
618
|
-
requestHandlers = new Map;
|
|
619
|
-
closeHandlers = [];
|
|
620
|
-
errorHandlers = [];
|
|
621
|
-
inputBuffer = Buffer.alloc(0);
|
|
622
|
-
nextRequestId = 1;
|
|
623
|
-
listening = false;
|
|
624
|
-
disposed = false;
|
|
625
609
|
constructor(reader, writer) {
|
|
626
610
|
this.reader = reader;
|
|
627
611
|
this.writer = writer;
|
|
612
|
+
this.pendingRequests = new Map;
|
|
613
|
+
this.notificationHandlers = new Map;
|
|
614
|
+
this.requestHandlers = new Map;
|
|
615
|
+
this.closeHandlers = [];
|
|
616
|
+
this.errorHandlers = [];
|
|
617
|
+
this.inputBuffer = Buffer.alloc(0);
|
|
618
|
+
this.nextRequestId = 1;
|
|
619
|
+
this.listening = false;
|
|
620
|
+
this.disposed = false;
|
|
621
|
+
this.handleData = (chunk) => {
|
|
622
|
+
const chunkBuffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, "utf8");
|
|
623
|
+
this.inputBuffer = Buffer.concat([this.inputBuffer, chunkBuffer]);
|
|
624
|
+
this.drainInputBuffer();
|
|
625
|
+
};
|
|
626
|
+
this.handleClose = () => {
|
|
627
|
+
for (const handler of this.closeHandlers) {
|
|
628
|
+
handler();
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
this.handleStreamError = (error) => {
|
|
632
|
+
this.emitError(error);
|
|
633
|
+
};
|
|
628
634
|
}
|
|
629
635
|
listen() {
|
|
630
636
|
if (this.listening)
|
|
@@ -745,19 +751,6 @@ class JsonRpcConnection {
|
|
|
745
751
|
this.notificationHandlers.clear();
|
|
746
752
|
this.requestHandlers.clear();
|
|
747
753
|
}
|
|
748
|
-
handleData = (chunk) => {
|
|
749
|
-
const chunkBuffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, "utf8");
|
|
750
|
-
this.inputBuffer = Buffer.concat([this.inputBuffer, chunkBuffer]);
|
|
751
|
-
this.drainInputBuffer();
|
|
752
|
-
};
|
|
753
|
-
handleClose = () => {
|
|
754
|
-
for (const handler of this.closeHandlers) {
|
|
755
|
-
handler();
|
|
756
|
-
}
|
|
757
|
-
};
|
|
758
|
-
handleStreamError = (error) => {
|
|
759
|
-
this.emitError(error);
|
|
760
|
-
};
|
|
761
754
|
drainInputBuffer() {
|
|
762
755
|
while (true) {
|
|
763
756
|
const headerEnd = this.inputBuffer.indexOf(HEADER_SEPARATOR2);
|
|
@@ -1105,31 +1098,25 @@ function isPosition(value) {
|
|
|
1105
1098
|
|
|
1106
1099
|
// ../lsp-core/src/lsp/transport.ts
|
|
1107
1100
|
class LspClientNotStartedError extends Error {
|
|
1108
|
-
serverId;
|
|
1109
|
-
root;
|
|
1110
|
-
name = "LspClientNotStartedError";
|
|
1111
1101
|
constructor(serverId, root) {
|
|
1112
1102
|
super("LSP client not started");
|
|
1113
1103
|
this.serverId = serverId;
|
|
1114
1104
|
this.root = root;
|
|
1105
|
+
this.name = "LspClientNotStartedError";
|
|
1115
1106
|
}
|
|
1116
1107
|
}
|
|
1117
1108
|
|
|
1118
1109
|
class LspClientTransport {
|
|
1119
|
-
root;
|
|
1120
|
-
server;
|
|
1121
|
-
proc = null;
|
|
1122
|
-
connection = null;
|
|
1123
|
-
stderrBuffer = [];
|
|
1124
|
-
processExited = false;
|
|
1125
|
-
diagnosticsStore = new Map;
|
|
1126
|
-
requestTimeoutMs;
|
|
1127
|
-
initializeTimeoutMs;
|
|
1128
|
-
workspaceApplyEditHandler = null;
|
|
1129
|
-
diagnosticPullSupported = false;
|
|
1130
1110
|
constructor(root, server2, timeouts = {}) {
|
|
1131
1111
|
this.root = root;
|
|
1132
1112
|
this.server = server2;
|
|
1113
|
+
this.proc = null;
|
|
1114
|
+
this.connection = null;
|
|
1115
|
+
this.stderrBuffer = [];
|
|
1116
|
+
this.processExited = false;
|
|
1117
|
+
this.diagnosticsStore = new Map;
|
|
1118
|
+
this.workspaceApplyEditHandler = null;
|
|
1119
|
+
this.diagnosticPullSupported = false;
|
|
1133
1120
|
this.requestTimeoutMs = timeouts.requestTimeoutMs ?? REQUEST_TIMEOUT_MS;
|
|
1134
1121
|
this.initializeTimeoutMs = timeouts.initializeTimeoutMs ?? INIT_TIMEOUT_MS;
|
|
1135
1122
|
}
|
|
@@ -1626,16 +1613,12 @@ function movedPath(candidate, oldPath, newPath) {
|
|
|
1626
1613
|
}
|
|
1627
1614
|
|
|
1628
1615
|
class WorkspaceDocumentState {
|
|
1629
|
-
sendNotification;
|
|
1630
|
-
clearDiagnostics;
|
|
1631
|
-
openDocuments = new Map;
|
|
1632
|
-
openByUri = new Map;
|
|
1633
|
-
openPromises = new Map;
|
|
1634
|
-
now;
|
|
1635
|
-
versionlessPublishQuiescenceMs;
|
|
1636
1616
|
constructor(sendNotification, clearDiagnostics, options = {}) {
|
|
1637
1617
|
this.sendNotification = sendNotification;
|
|
1638
1618
|
this.clearDiagnostics = clearDiagnostics;
|
|
1619
|
+
this.openDocuments = new Map;
|
|
1620
|
+
this.openByUri = new Map;
|
|
1621
|
+
this.openPromises = new Map;
|
|
1639
1622
|
this.now = options.now ?? (() => Date.now());
|
|
1640
1623
|
this.versionlessPublishQuiescenceMs = options.versionlessPublishQuiescenceMs ?? DEFAULT_VERSIONLESS_PUBLISH_QUIESCENCE_MS;
|
|
1641
1624
|
}
|
|
@@ -1899,13 +1882,11 @@ import { dirname as dirname2, isAbsolute as isAbsolute2, relative as relative3,
|
|
|
1899
1882
|
import { fileURLToPath } from "node:url";
|
|
1900
1883
|
|
|
1901
1884
|
class WorkspaceEditPathError extends Error {
|
|
1902
|
-
path;
|
|
1903
|
-
detail;
|
|
1904
|
-
name = "WorkspaceEditPathError";
|
|
1905
1885
|
constructor(path, detail) {
|
|
1906
1886
|
super(`${detail}: ${path}`);
|
|
1907
1887
|
this.path = path;
|
|
1908
1888
|
this.detail = detail;
|
|
1889
|
+
this.name = "WorkspaceEditPathError";
|
|
1909
1890
|
}
|
|
1910
1891
|
}
|
|
1911
1892
|
function isPathInsideWorkspace(filePath, workspaceRoot) {
|
|
@@ -2197,13 +2178,11 @@ function canonicalFingerprint(operations) {
|
|
|
2197
2178
|
|
|
2198
2179
|
// ../lsp-core/src/lsp/workspace-edit-types.ts
|
|
2199
2180
|
class WorkspaceEditValidationError extends Error {
|
|
2200
|
-
changeIndex;
|
|
2201
|
-
detail;
|
|
2202
|
-
name = "WorkspaceEditValidationError";
|
|
2203
2181
|
constructor(changeIndex, detail) {
|
|
2204
2182
|
super(`change ${changeIndex}: ${detail}`);
|
|
2205
2183
|
this.changeIndex = changeIndex;
|
|
2206
2184
|
this.detail = detail;
|
|
2185
|
+
this.name = "WorkspaceEditValidationError";
|
|
2207
2186
|
}
|
|
2208
2187
|
}
|
|
2209
2188
|
|
|
@@ -2701,10 +2680,9 @@ function simulateDelete(operation, virtual) {
|
|
|
2701
2680
|
import { existsSync as existsSync5, lstatSync as lstatSync3, readdirSync as readdirSync2 } from "node:fs";
|
|
2702
2681
|
import { dirname as dirname4, resolve as resolve5 } from "node:path";
|
|
2703
2682
|
class WorkspaceSnapshotBuilder {
|
|
2704
|
-
workspaceRoot;
|
|
2705
|
-
snapshots = new Map;
|
|
2706
2683
|
constructor(workspaceRoot) {
|
|
2707
2684
|
this.workspaceRoot = workspaceRoot;
|
|
2685
|
+
this.snapshots = new Map;
|
|
2708
2686
|
}
|
|
2709
2687
|
build(operations) {
|
|
2710
2688
|
this.add(this.workspaceRoot, false);
|
|
@@ -2748,8 +2726,10 @@ function snapshotOperations(operations, workspaceRoot) {
|
|
|
2748
2726
|
|
|
2749
2727
|
// ../lsp-core/src/lsp/workspace-edit-plan.ts
|
|
2750
2728
|
class PlanPathIndex {
|
|
2751
|
-
|
|
2752
|
-
|
|
2729
|
+
constructor() {
|
|
2730
|
+
this.firstChangeByPath = new Map;
|
|
2731
|
+
this.reportedPathByCanonical = new Map;
|
|
2732
|
+
}
|
|
2753
2733
|
build(operations) {
|
|
2754
2734
|
for (const operation of operations) {
|
|
2755
2735
|
switch (operation.kind) {
|
|
@@ -2838,14 +2818,11 @@ function isRecord4(value) {
|
|
|
2838
2818
|
}
|
|
2839
2819
|
|
|
2840
2820
|
class WorkspaceMutationController {
|
|
2841
|
-
workspaceRoot;
|
|
2842
|
-
documents;
|
|
2843
|
-
activeLease = null;
|
|
2844
|
-
nextLeaseId = 1;
|
|
2845
|
-
io;
|
|
2846
2821
|
constructor(workspaceRoot, documents) {
|
|
2847
2822
|
this.workspaceRoot = workspaceRoot;
|
|
2848
2823
|
this.documents = documents;
|
|
2824
|
+
this.activeLease = null;
|
|
2825
|
+
this.nextLeaseId = 1;
|
|
2849
2826
|
}
|
|
2850
2827
|
setIo(io) {
|
|
2851
2828
|
this.io = io;
|
|
@@ -2958,12 +2935,9 @@ var DIAGNOSTICS_FRESHNESS_TIMEOUT_MS = 3000;
|
|
|
2958
2935
|
var VERSIONLESS_PUBLISH_QUIESCENCE_MS = 250;
|
|
2959
2936
|
|
|
2960
2937
|
class LspClient extends LspClientConnection {
|
|
2961
|
-
diagnosticPullErrors = [];
|
|
2962
|
-
documents;
|
|
2963
|
-
workspaceMutations;
|
|
2964
|
-
diagnosticsFreshnessTimeoutMs;
|
|
2965
2938
|
constructor(root, server2, options = {}) {
|
|
2966
2939
|
super(root, server2, options);
|
|
2940
|
+
this.diagnosticPullErrors = [];
|
|
2967
2941
|
this.diagnosticsFreshnessTimeoutMs = options.diagnosticsFreshnessTimeoutMs ?? DIAGNOSTICS_FRESHNESS_TIMEOUT_MS;
|
|
2968
2942
|
this.documents = new WorkspaceDocumentState((method, params) => this.sendNotification(method, params), (uri) => this.diagnosticsStore.delete(uri), {
|
|
2969
2943
|
versionlessPublishQuiescenceMs: options.versionlessPublishQuiescenceMs ?? VERSIONLESS_PUBLISH_QUIESCENCE_MS
|
|
@@ -3263,16 +3237,11 @@ function awaitWithSignal(promise, signal) {
|
|
|
3263
3237
|
}
|
|
3264
3238
|
|
|
3265
3239
|
class LspManager {
|
|
3266
|
-
clients = new Map;
|
|
3267
|
-
reaperHandle = null;
|
|
3268
|
-
signalDisposer = null;
|
|
3269
|
-
disposed = false;
|
|
3270
|
-
idleTimeoutMs;
|
|
3271
|
-
initTimeoutMs;
|
|
3272
|
-
reaperIntervalMs;
|
|
3273
|
-
clientFactory;
|
|
3274
|
-
now;
|
|
3275
3240
|
constructor(options = {}) {
|
|
3241
|
+
this.clients = new Map;
|
|
3242
|
+
this.reaperHandle = null;
|
|
3243
|
+
this.signalDisposer = null;
|
|
3244
|
+
this.disposed = false;
|
|
3276
3245
|
this.idleTimeoutMs = options.idleTimeoutMs ?? IDLE_TIMEOUT_MS;
|
|
3277
3246
|
this.initTimeoutMs = options.initTimeoutMs ?? INIT_TIMEOUT_MS;
|
|
3278
3247
|
this.reaperIntervalMs = options.reaperIntervalMs ?? REAPER_INTERVAL_MS;
|
|
@@ -5210,7 +5179,6 @@ import { join as join8 } from "node:path";
|
|
|
5210
5179
|
|
|
5211
5180
|
// src/daemon-request-error.ts
|
|
5212
5181
|
class DaemonRequestError extends Error {
|
|
5213
|
-
requestWritten;
|
|
5214
5182
|
constructor(message, requestWritten) {
|
|
5215
5183
|
super(message);
|
|
5216
5184
|
this.name = "DaemonRequestError";
|
|
@@ -5233,7 +5201,6 @@ class DaemonRequestCancelledError extends DaemonRequestError {
|
|
|
5233
5201
|
}
|
|
5234
5202
|
|
|
5235
5203
|
class DaemonRequestTimedOutError extends DaemonRequestError {
|
|
5236
|
-
timeoutMs;
|
|
5237
5204
|
constructor(requestWritten, timeoutMs) {
|
|
5238
5205
|
super("daemon request timed out", requestWritten);
|
|
5239
5206
|
this.name = "DaemonRequestTimedOutError";
|
|
@@ -5312,14 +5279,12 @@ var PROTOCOL_ERROR_CODE = -32002;
|
|
|
5312
5279
|
var AUTH_TOKEN_BYTES = 32;
|
|
5313
5280
|
|
|
5314
5281
|
class UnsafePrivateDirectoryError extends Error {
|
|
5315
|
-
path;
|
|
5316
|
-
reason;
|
|
5317
|
-
name = "UnsafePrivateDirectoryError";
|
|
5318
|
-
code = "unsafe_private_directory";
|
|
5319
5282
|
constructor(path, reason) {
|
|
5320
5283
|
super(`unsafe private directory ${path}: ${reason}`);
|
|
5321
5284
|
this.path = path;
|
|
5322
5285
|
this.reason = reason;
|
|
5286
|
+
this.name = "UnsafePrivateDirectoryError";
|
|
5287
|
+
this.code = "unsafe_private_directory";
|
|
5323
5288
|
}
|
|
5324
5289
|
}
|
|
5325
5290
|
function authEnvelope(token) {
|
|
@@ -5503,20 +5468,18 @@ var OMO_LSP_DAEMON_VERSION = "OMO_LSP_DAEMON_VERSION";
|
|
|
5503
5468
|
var DAEMON_VERSION_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._+-]{0,127}$/;
|
|
5504
5469
|
|
|
5505
5470
|
class InvalidRuntimeOverrideError extends Error {
|
|
5506
|
-
code = "invalid_runtime_override";
|
|
5507
|
-
reason;
|
|
5508
5471
|
constructor(reason, message) {
|
|
5509
5472
|
super(message);
|
|
5473
|
+
this.code = "invalid_runtime_override";
|
|
5510
5474
|
this.name = "InvalidRuntimeOverrideError";
|
|
5511
5475
|
this.reason = reason;
|
|
5512
5476
|
}
|
|
5513
5477
|
}
|
|
5514
5478
|
|
|
5515
5479
|
class InvalidDaemonVersionError extends Error {
|
|
5516
|
-
code = "invalid_daemon_version";
|
|
5517
|
-
version;
|
|
5518
5480
|
constructor(version) {
|
|
5519
5481
|
super("LSP daemon version must match [A-Za-z0-9][A-Za-z0-9._+-]{0,127}");
|
|
5482
|
+
this.code = "invalid_daemon_version";
|
|
5520
5483
|
this.name = "InvalidDaemonVersionError";
|
|
5521
5484
|
this.version = version;
|
|
5522
5485
|
}
|
|
@@ -5562,10 +5525,9 @@ var requireFromHere = createRequire(import.meta.url);
|
|
|
5562
5525
|
var MAX_SOCKET_PATH_LENGTH = 100;
|
|
5563
5526
|
|
|
5564
5527
|
class InvalidDaemonDirectoryError extends Error {
|
|
5565
|
-
code = "invalid_daemon_directory";
|
|
5566
|
-
directory;
|
|
5567
5528
|
constructor(directory) {
|
|
5568
5529
|
super(`${OMO_LSP_DAEMON_DIR} must be an absolute path`);
|
|
5530
|
+
this.code = "invalid_daemon_directory";
|
|
5569
5531
|
this.name = "InvalidDaemonDirectoryError";
|
|
5570
5532
|
this.directory = directory;
|
|
5571
5533
|
}
|
|
@@ -5760,7 +5722,8 @@ function spawnDaemonProcess(paths) {
|
|
|
5760
5722
|
try {
|
|
5761
5723
|
const child = spawn2(resolveDaemonNodeExecutable(), [paths.cliPath, "daemon"], {
|
|
5762
5724
|
detached: true,
|
|
5763
|
-
stdio: ["ignore", logFd, logFd]
|
|
5725
|
+
stdio: ["ignore", logFd, logFd],
|
|
5726
|
+
windowsHide: true
|
|
5764
5727
|
});
|
|
5765
5728
|
child.once("spawn", () => closeSync2(logFd));
|
|
5766
5729
|
child.once("error", (error) => {
|
|
@@ -5873,7 +5836,10 @@ function parsePingResponse(message) {
|
|
|
5873
5836
|
var CONTEXT_KEY = "_context";
|
|
5874
5837
|
|
|
5875
5838
|
class InvalidDaemonRequestError extends Error {
|
|
5876
|
-
|
|
5839
|
+
constructor() {
|
|
5840
|
+
super(...arguments);
|
|
5841
|
+
this.name = "InvalidDaemonRequestError";
|
|
5842
|
+
}
|
|
5877
5843
|
}
|
|
5878
5844
|
function extractRequestContext(raw) {
|
|
5879
5845
|
if (!isPlainRecord(raw) || raw["method"] !== "tools/call")
|
|
@@ -6346,17 +6312,19 @@ function errorCode3(error) {
|
|
|
6346
6312
|
|
|
6347
6313
|
// src/ownership.ts
|
|
6348
6314
|
class DaemonAlreadyRunningError extends Error {
|
|
6349
|
-
|
|
6350
|
-
|
|
6315
|
+
constructor() {
|
|
6316
|
+
super(...arguments);
|
|
6317
|
+
this.name = "DaemonAlreadyRunningError";
|
|
6318
|
+
this.code = "daemon_already_running";
|
|
6319
|
+
}
|
|
6351
6320
|
}
|
|
6352
6321
|
|
|
6353
6322
|
class DaemonStartupDeferredError extends Error {
|
|
6354
|
-
reason;
|
|
6355
|
-
name = "DaemonStartupDeferredError";
|
|
6356
|
-
code = "daemon_startup_deferred";
|
|
6357
6323
|
constructor(reason) {
|
|
6358
6324
|
super(`LSP daemon startup deferred: ${reason}`);
|
|
6359
6325
|
this.reason = reason;
|
|
6326
|
+
this.name = "DaemonStartupDeferredError";
|
|
6327
|
+
this.code = "daemon_startup_deferred";
|
|
6360
6328
|
}
|
|
6361
6329
|
}
|
|
6362
6330
|
async function acquireStartupLease(paths, pingOwner) {
|
|
@@ -6653,7 +6621,7 @@ function defaultReadProcFile(path2) {
|
|
|
6653
6621
|
}
|
|
6654
6622
|
function defaultExecuteForStdout(file, args) {
|
|
6655
6623
|
return new Promise((resolve9) => {
|
|
6656
|
-
execFile(file, [...args], { encoding: "utf8", maxBuffer: 1024 * 1024, timeout: 1000 }, (error, stdout) => {
|
|
6624
|
+
execFile(file, [...args], { encoding: "utf8", maxBuffer: 1024 * 1024, timeout: 1000, windowsHide: true }, (error, stdout) => {
|
|
6657
6625
|
if (error !== null) {
|
|
6658
6626
|
resolve9(null);
|
|
6659
6627
|
return;
|