@wolfx/oh-my-openagent 4.1.1 → 4.2.0-patch.1
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 +2 -1
- package/README.ko.md +2 -1
- package/README.md +2 -1
- package/README.ru.md +2 -1
- package/README.zh-cn.md +2 -1
- package/dist/agents/atlas/default-prompt-sections.d.ts +3 -3
- package/dist/agents/atlas/gemini-prompt-sections.d.ts +2 -2
- package/dist/agents/atlas/gpt-prompt-sections.d.ts +2 -2
- package/dist/agents/atlas/kimi-prompt-sections.d.ts +3 -3
- package/dist/agents/atlas/opus-4-7-prompt-sections.d.ts +3 -3
- package/dist/agents/momus.d.ts +1 -1
- package/dist/agents/prometheus/behavioral-summary.d.ts +1 -1
- package/dist/agents/prometheus/high-accuracy-mode.d.ts +1 -1
- package/dist/agents/prometheus/identity-constraints.d.ts +1 -1
- package/dist/agents/prometheus/plan-generation.d.ts +1 -1
- package/dist/agents/prometheus/plan-template.d.ts +1 -1
- package/dist/config/schema/team-mode.d.ts +1 -1
- package/dist/features/background-agent/error-classifier.d.ts +1 -0
- package/dist/features/background-agent/fallback-retry-handler.d.ts +15 -0
- package/dist/features/background-agent/manager.d.ts +11 -8
- package/dist/features/background-agent/parent-wake-notifier.d.ts +74 -0
- package/dist/features/background-agent/process-cleanup.d.ts +2 -0
- package/dist/features/background-agent/session-route.d.ts +12 -0
- package/dist/features/background-agent/spawner.d.ts +2 -2
- package/dist/features/background-agent/task-registry.d.ts +6 -0
- package/dist/features/background-agent/types.d.ts +2 -0
- package/dist/features/boulder-state/constants.d.ts +4 -4
- package/dist/features/boulder-state/storage.d.ts +1 -1
- package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/features/context-injector/injector.d.ts +1 -1
- package/dist/features/opencode-skill-loader/git-master-template-injection.d.ts +18 -0
- package/dist/features/run-continuation-state/constants.d.ts +1 -1
- package/dist/features/team-mode/team-layout-tmux/resolve-caller-tmux-session.d.ts +3 -1
- package/dist/features/team-mode/tools/lifecycle-test-fixture.d.ts +3 -3
- package/dist/features/team-mode/tools/messaging.d.ts +1 -0
- package/dist/features/team-mode/types.d.ts +2 -2
- package/dist/features/tmux-subagent/attachable-session-status.d.ts +1 -1
- package/dist/features/tmux-subagent/manager.d.ts +6 -0
- package/dist/features/tmux-subagent/pane-state-parser.d.ts +2 -0
- package/dist/features/tmux-subagent/polling-manager.d.ts +6 -2
- package/dist/features/tmux-subagent/types.d.ts +4 -0
- package/dist/hooks/atlas/boulder-continuation-injector.d.ts +1 -0
- package/dist/hooks/atlas/omo-path.d.ts +6 -0
- package/dist/hooks/atlas/tool-execute-after.d.ts +3 -0
- package/dist/hooks/atlas/tool-progress.d.ts +14 -0
- package/dist/hooks/atlas/types.d.ts +7 -0
- package/dist/hooks/auto-slash-command/detector.d.ts +2 -0
- package/dist/hooks/auto-update-checker/cache.d.ts +8 -1
- package/dist/hooks/auto-update-checker/checker/cached-version.d.ts +8 -1
- package/dist/hooks/background-notification/hook.d.ts +0 -6
- package/dist/hooks/compaction-context-injector/types.d.ts +1 -0
- package/dist/hooks/interactive-bash-session/state-manager.d.ts +1 -1
- package/dist/hooks/json-error-recovery/hook.d.ts +1 -1
- package/dist/hooks/keyword-detector/detector.d.ts +1 -0
- package/dist/hooks/keyword-detector/ultrawork/default.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +1 -1
- package/dist/hooks/prometheus-md-only/constants.d.ts +1 -1
- package/dist/hooks/prometheus-md-only/path-policy.d.ts +3 -3
- package/dist/hooks/ralph-loop/completion-promise-detector-test-input.d.ts +11 -0
- package/dist/hooks/ralph-loop/constants.d.ts +1 -1
- package/dist/hooks/ralph-loop/continuation-prompt-injector.d.ts +4 -0
- package/dist/hooks/ralph-loop/iteration-continuation.d.ts +5 -0
- package/dist/hooks/ralph-loop/loop-state-controller.d.ts +3 -3
- package/dist/hooks/ralph-loop/pending-verification-handler.d.ts +2 -1
- package/dist/hooks/ralph-loop/ralph-loop-event-handler.d.ts +2 -2
- package/dist/hooks/ralph-loop/storage.d.ts +2 -2
- package/dist/hooks/ralph-loop/types.d.ts +4 -0
- package/dist/hooks/ralph-loop/verification-failure-handler.d.ts +2 -2
- package/dist/hooks/rules-injector/injector.d.ts +9 -2
- package/dist/hooks/rules-injector/matcher.d.ts +5 -0
- package/dist/hooks/rules-injector/project-root-finder.d.ts +4 -0
- package/dist/hooks/rules-injector/rule-scan-cache.d.ts +9 -2
- package/dist/hooks/runtime-fallback/constants.d.ts +10 -0
- package/dist/hooks/runtime-fallback/first-prompt-watchdog.d.ts +25 -0
- package/dist/hooks/runtime-fallback/hook.d.ts +14 -1
- package/dist/hooks/runtime-fallback/last-user-retry-parts.d.ts +10 -2
- package/dist/hooks/runtime-fallback/types.d.ts +10 -0
- package/dist/hooks/session-recovery/detect-error-type.d.ts +1 -1
- package/dist/hooks/session-recovery/hook.d.ts +1 -0
- package/dist/hooks/session-recovery/interrupted-idle-message-fetch-timeout.d.ts +7 -0
- package/dist/hooks/session-recovery/recover-tool-result-missing.d.ts +6 -1
- package/dist/hooks/session-recovery/types.d.ts +12 -0
- package/dist/hooks/shared/prompt-async-gate.d.ts +1 -0
- package/dist/hooks/shared/session-idle-settle.d.ts +1 -11
- package/dist/hooks/sisyphus-junior-notepad/constants.d.ts +1 -1
- package/dist/hooks/team-mode-status-injector/hook.d.ts +2 -1
- package/dist/hooks/todo-continuation-enforcer/pending-question-detection.d.ts +2 -0
- package/dist/hooks/todo-continuation-enforcer/session-state.d.ts +3 -4
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +2 -3
- package/dist/hooks/tool-pair-validator/hook.d.ts +7 -2
- package/dist/hooks/unstable-agent-babysitter/task-message-analyzer.d.ts +1 -0
- package/dist/hooks/write-existing-file-guard/tool-execute-before-handler.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +41902 -70602
- package/dist/mcp/index.d.ts +3 -1
- package/dist/mcp/lsp.d.ts +13 -0
- package/dist/mcp/types.d.ts +1 -0
- package/dist/plugin/build-team-idle-wake-hint-client.d.ts +12 -0
- package/dist/plugin/chat-message.d.ts +1 -1
- package/dist/plugin/tool-registry.d.ts +1 -2
- package/dist/plugin-dispose.d.ts +0 -3
- package/dist/shared/agent-sort-shim.d.ts +1 -0
- package/dist/shared/delegated-child-session-bootstrap.d.ts +25 -0
- package/dist/shared/dynamic-truncator.d.ts +2 -0
- package/dist/shared/host-skill-config.d.ts +2 -0
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/internal-initiator-marker.d.ts +25 -0
- package/dist/shared/legacy-workspace-migration.d.ts +5 -0
- package/dist/shared/logger.d.ts +12 -0
- package/dist/shared/model-error-classifier.d.ts +2 -0
- package/dist/shared/model-resolution-pipeline.d.ts +4 -0
- package/dist/shared/opencode-http-api.d.ts +9 -0
- package/dist/shared/prompt-async-gate.d.ts +82 -0
- package/dist/shared/replace-tool-args.d.ts +13 -0
- package/dist/shared/session-idle-settle.d.ts +11 -0
- package/dist/shared/tmux/tmux-utils/pane-activate.d.ts +1 -0
- package/dist/shared/tmux/tmux-utils/pane-close.d.ts +10 -0
- package/dist/shared/tmux/tmux-utils/pane-command.d.ts +2 -0
- package/dist/shared/tmux/tmux-utils/pane-replace.d.ts +11 -1
- package/dist/shared/tmux/tmux-utils/pane-spawn.d.ts +1 -1
- package/dist/shared/tmux/tmux-utils/server-health.d.ts +12 -1
- package/dist/shared/tmux/tmux-utils/session-spawn.d.ts +2 -2
- package/dist/shared/tmux/tmux-utils/window-spawn.d.ts +1 -1
- package/dist/shared/tmux/tmux-utils.d.ts +2 -0
- package/dist/testing/create-plugin-module.d.ts +41 -0
- package/dist/tools/background-task/constants.d.ts +1 -1
- package/dist/tools/background-task/with-sdk-call-timeout.d.ts +7 -0
- package/dist/tools/call-omo-agent/session-creator.d.ts +2 -1
- package/dist/tools/call-omo-agent/sync-executor.d.ts +2 -2
- package/dist/tools/delegate-task/subagent-discovery.d.ts +2 -0
- package/dist/tools/delegate-task/sync-prompt-sender.d.ts +2 -1
- package/dist/tools/delegate-task/sync-session-creator.d.ts +2 -0
- package/dist/tools/delegate-task/sync-task.d.ts +1 -1
- package/dist/tools/index.d.ts +0 -3
- package/dist/tools/interactive-bash/tools.d.ts +5 -0
- package/package.json +17 -8
- package/dist/hooks/atlas/sisyphus-path.d.ts +0 -6
- package/dist/tools/lsp/client.d.ts +0 -3
- package/dist/tools/lsp/config.d.ts +0 -3
- package/dist/tools/lsp/constants.d.ts +0 -6
- package/dist/tools/lsp/diagnostics-tool.d.ts +0 -2
- package/dist/tools/lsp/directory-diagnostics.d.ts +0 -1
- package/dist/tools/lsp/find-references-tool.d.ts +0 -2
- package/dist/tools/lsp/goto-definition-tool.d.ts +0 -2
- package/dist/tools/lsp/index.d.ts +0 -8
- package/dist/tools/lsp/infer-extension.d.ts +0 -1
- package/dist/tools/lsp/language-config.d.ts +0 -1
- package/dist/tools/lsp/language-mappings.d.ts +0 -3
- package/dist/tools/lsp/lsp-client-connection.d.ts +0 -4
- package/dist/tools/lsp/lsp-client-transport.d.ts +0 -22
- package/dist/tools/lsp/lsp-client-wrapper.d.ts +0 -9
- package/dist/tools/lsp/lsp-client.d.ts +0 -17
- package/dist/tools/lsp/lsp-formatters.d.ts +0 -13
- package/dist/tools/lsp/lsp-manager-process-cleanup.d.ts +0 -15
- package/dist/tools/lsp/lsp-manager-temp-directory-cleanup.d.ts +0 -8
- package/dist/tools/lsp/lsp-process.d.ts +0 -29
- package/dist/tools/lsp/lsp-server.d.ts +0 -24
- package/dist/tools/lsp/rename-tools.d.ts +0 -3
- package/dist/tools/lsp/server-config-loader.d.ts +0 -25
- package/dist/tools/lsp/server-definitions.d.ts +0 -3
- package/dist/tools/lsp/server-installation.d.ts +0 -1
- package/dist/tools/lsp/server-path-bases.d.ts +0 -1
- package/dist/tools/lsp/server-resolution.d.ts +0 -15
- package/dist/tools/lsp/symbols-tool.d.ts +0 -2
- package/dist/tools/lsp/tools.d.ts +0 -5
- package/dist/tools/lsp/types.d.ts +0 -123
- package/dist/tools/lsp/workspace-edit.d.ts +0 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wolfx/oh-my-openagent",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0-patch.1",
|
|
4
4
|
"description": "A fork of oh-my-openagent",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
"./schema.json": "./dist/oh-my-opencode.schema.json"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"build": "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi && tsc --emitDeclarationOnly && bun run build:schema",
|
|
23
|
+
"build": "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi --external zod && bun run build:node-require-shim && tsc --emitDeclarationOnly && bun run build:schema",
|
|
24
|
+
"build:lsp-tools-mcp": "npm --prefix packages/lsp-tools-mcp ci && npm --prefix packages/lsp-tools-mcp run build",
|
|
25
|
+
"build:node-require-shim": "bun run script/patch-node-require-shim.ts",
|
|
24
26
|
"build:schema": "bun run script/build-schema.ts",
|
|
25
27
|
"build:model-capabilities": "bun run script/build-model-capabilities.ts",
|
|
26
28
|
"clean": "rm -rf dist",
|
|
@@ -57,20 +59,27 @@
|
|
|
57
59
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
58
60
|
"@opencode-ai/plugin": "^1.4.0",
|
|
59
61
|
"@opencode-ai/sdk": "^1.4.0",
|
|
60
|
-
"diff": "^8.0.
|
|
62
|
+
"diff": "^8.0.4",
|
|
61
63
|
"js-yaml": "^4.1.1",
|
|
62
64
|
"jsonc-parser": "^3.3.1",
|
|
63
65
|
"picomatch": "^4.0.4",
|
|
64
|
-
"vscode-jsonrpc": "^8.2.
|
|
66
|
+
"vscode-jsonrpc": "^8.2.1"
|
|
65
67
|
},
|
|
66
68
|
"devDependencies": {
|
|
69
|
+
"@typescript/native-preview": "7.0.0-dev.20260513.1",
|
|
67
70
|
"@types/js-yaml": "^4.0.9",
|
|
68
71
|
"@types/picomatch": "^3.0.2",
|
|
69
|
-
"bun-types": "1.3.
|
|
70
|
-
"typescript": "^5.
|
|
71
|
-
"zod": "^4.3
|
|
72
|
+
"bun-types": "1.3.12",
|
|
73
|
+
"typescript": "^5.9.3",
|
|
74
|
+
"zod": "^4.4.3"
|
|
75
|
+
},
|
|
76
|
+
"overrides": {
|
|
77
|
+
"hono": "^4.12.18",
|
|
78
|
+
"@hono/node-server": "^1.19.13",
|
|
79
|
+
"express-rate-limit": "^8.5.1",
|
|
80
|
+
"fast-uri": "^3.1.2",
|
|
81
|
+
"path-to-regexp": "^8.4.2"
|
|
72
82
|
},
|
|
73
|
-
"overrides": {},
|
|
74
83
|
"trustedDependencies": [
|
|
75
84
|
"@ast-grep/cli",
|
|
76
85
|
"@ast-grep/napi",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cross-platform check if a path is inside .sisyphus/ directory.
|
|
3
|
-
* Handles both forward slashes (Unix) and backslashes (Windows).
|
|
4
|
-
* Uses path segment matching (not substring) to avoid false positives like "not-sisyphus/file.txt"
|
|
5
|
-
*/
|
|
6
|
-
export declare function isSisyphusPath(filePath: string): boolean;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_MAX_REFERENCES = 200;
|
|
2
|
-
export declare const DEFAULT_MAX_SYMBOLS = 200;
|
|
3
|
-
export declare const DEFAULT_MAX_DIAGNOSTICS = 200;
|
|
4
|
-
export declare const DEFAULT_MAX_DIRECTORY_FILES = 50;
|
|
5
|
-
export { SYMBOL_KIND_MAP, SEVERITY_MAP, EXT_TO_LANG } from "./language-mappings";
|
|
6
|
-
export { BUILTIN_SERVERS, LSP_INSTALL_HINTS } from "./server-definitions";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function aggregateDiagnosticsForDirectory(directory: string, extension: string, severity?: "error" | "warning" | "information" | "hint" | "all", maxFiles?: number): Promise<string>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from "./types";
|
|
2
|
-
export * from "./constants";
|
|
3
|
-
export * from "./config";
|
|
4
|
-
export * from "./client";
|
|
5
|
-
export * from "./lsp-client-wrapper";
|
|
6
|
-
export * from "./lsp-formatters";
|
|
7
|
-
export * from "./workspace-edit";
|
|
8
|
-
export { lsp_goto_definition, lsp_find_references, lsp_symbols, lsp_diagnostics, lsp_prepare_rename, lsp_rename } from "./tools";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function inferExtensionFromDirectory(directory: string): string | null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getLanguageId(ext: string): string;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type MessageConnection } from "vscode-jsonrpc/node";
|
|
2
|
-
import type { Diagnostic, ResolvedServer } from "./types";
|
|
3
|
-
import { type UnifiedProcess } from "./lsp-process";
|
|
4
|
-
export declare class LSPClientTransport {
|
|
5
|
-
protected root: string;
|
|
6
|
-
protected server: ResolvedServer;
|
|
7
|
-
protected proc: UnifiedProcess | null;
|
|
8
|
-
protected connection: MessageConnection | null;
|
|
9
|
-
protected readonly stderrBuffer: string[];
|
|
10
|
-
protected processExited: boolean;
|
|
11
|
-
protected readonly diagnosticsStore: Map<string, Diagnostic[]>;
|
|
12
|
-
protected readonly REQUEST_TIMEOUT = 15000;
|
|
13
|
-
constructor(root: string, server: ResolvedServer);
|
|
14
|
-
start(): Promise<void>;
|
|
15
|
-
protected startStderrReading(): void;
|
|
16
|
-
protected sendRequest<T>(method: string): Promise<T>;
|
|
17
|
-
protected sendRequest<T>(method: string, params: unknown): Promise<T>;
|
|
18
|
-
protected sendNotification(method: string): void;
|
|
19
|
-
protected sendNotification(method: string, params: unknown): void;
|
|
20
|
-
isAlive(): boolean;
|
|
21
|
-
stop(): Promise<void>;
|
|
22
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { LSPClient } from "./client";
|
|
2
|
-
import type { ServerLookupResult } from "./types";
|
|
3
|
-
export declare function isDirectoryPath(filePath: string): boolean;
|
|
4
|
-
export declare function uriToPath(uri: string): string;
|
|
5
|
-
export declare function findWorkspaceRoot(filePath: string): string;
|
|
6
|
-
export declare function formatServerLookupError(result: Exclude<ServerLookupResult, {
|
|
7
|
-
status: "found";
|
|
8
|
-
}>): string;
|
|
9
|
-
export declare function withLspClient<T>(filePath: string, fn: (client: LSPClient) => Promise<T>): Promise<T>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { LSPClientConnection } from "./lsp-client-connection";
|
|
2
|
-
import type { Diagnostic } from "./types";
|
|
3
|
-
export declare class LSPClient extends LSPClientConnection {
|
|
4
|
-
private openedFiles;
|
|
5
|
-
private documentVersions;
|
|
6
|
-
private lastSyncedText;
|
|
7
|
-
openFile(filePath: string): Promise<void>;
|
|
8
|
-
definition(filePath: string, line: number, character: number): Promise<unknown>;
|
|
9
|
-
references(filePath: string, line: number, character: number, includeDeclaration?: boolean): Promise<unknown>;
|
|
10
|
-
documentSymbols(filePath: string): Promise<unknown>;
|
|
11
|
-
workspaceSymbols(query: string): Promise<unknown>;
|
|
12
|
-
diagnostics(filePath: string): Promise<{
|
|
13
|
-
items: Diagnostic[];
|
|
14
|
-
}>;
|
|
15
|
-
prepareRename(filePath: string, line: number, character: number): Promise<unknown>;
|
|
16
|
-
rename(filePath: string, line: number, character: number, newName: string): Promise<unknown>;
|
|
17
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Diagnostic, DocumentSymbol, Location, LocationLink, PrepareRenameDefaultBehavior, PrepareRenameResult, Range, SymbolInfo, TextEdit, WorkspaceEdit } from "./types";
|
|
2
|
-
import type { ApplyResult } from "./workspace-edit";
|
|
3
|
-
export declare function formatLocation(loc: Location | LocationLink): string;
|
|
4
|
-
export declare function formatSymbolKind(kind: number): string;
|
|
5
|
-
export declare function formatSeverity(severity: number | undefined): string;
|
|
6
|
-
export declare function formatDocumentSymbol(symbol: DocumentSymbol, indent?: number): string;
|
|
7
|
-
export declare function formatSymbolInfo(symbol: SymbolInfo): string;
|
|
8
|
-
export declare function formatDiagnostic(diag: Diagnostic): string;
|
|
9
|
-
export declare function filterDiagnosticsBySeverity(diagnostics: Diagnostic[], severityFilter?: "error" | "warning" | "information" | "hint" | "all"): Diagnostic[];
|
|
10
|
-
export declare function formatPrepareRenameResult(result: PrepareRenameResult | PrepareRenameDefaultBehavior | Range | null): string;
|
|
11
|
-
export declare function formatTextEdit(edit: TextEdit): string;
|
|
12
|
-
export declare function formatWorkspaceEdit(edit: WorkspaceEdit | null): string;
|
|
13
|
-
export declare function formatApplyResult(result: ApplyResult): string;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type ManagedClientForCleanup = {
|
|
2
|
-
client: {
|
|
3
|
-
stop: () => Promise<void>;
|
|
4
|
-
};
|
|
5
|
-
};
|
|
6
|
-
type ProcessCleanupOptions = {
|
|
7
|
-
getClients: () => IterableIterator<[string, ManagedClientForCleanup]>;
|
|
8
|
-
clearClients: () => void;
|
|
9
|
-
clearCleanupInterval: () => void;
|
|
10
|
-
};
|
|
11
|
-
export type LspProcessCleanupHandle = {
|
|
12
|
-
unregister: () => void;
|
|
13
|
-
};
|
|
14
|
-
export declare function registerLspManagerProcessCleanup(options: ProcessCleanupOptions): LspProcessCleanupHandle;
|
|
15
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export declare function validateCwd(cwd: string): {
|
|
2
|
-
valid: boolean;
|
|
3
|
-
error?: string;
|
|
4
|
-
};
|
|
5
|
-
interface StreamReader {
|
|
6
|
-
read(): Promise<{
|
|
7
|
-
done: boolean;
|
|
8
|
-
value: Uint8Array | undefined;
|
|
9
|
-
}>;
|
|
10
|
-
}
|
|
11
|
-
export interface UnifiedProcess {
|
|
12
|
-
stdin: {
|
|
13
|
-
write(chunk: Uint8Array | string): void;
|
|
14
|
-
};
|
|
15
|
-
stdout: {
|
|
16
|
-
getReader(): StreamReader;
|
|
17
|
-
};
|
|
18
|
-
stderr: {
|
|
19
|
-
getReader(): StreamReader;
|
|
20
|
-
};
|
|
21
|
-
exitCode: number | null;
|
|
22
|
-
exited: Promise<number>;
|
|
23
|
-
kill(signal?: string): void;
|
|
24
|
-
}
|
|
25
|
-
export declare function spawnProcess(command: string[], options: {
|
|
26
|
-
cwd: string;
|
|
27
|
-
env: Record<string, string | undefined>;
|
|
28
|
-
}): UnifiedProcess;
|
|
29
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { LSPClient } from "./lsp-client";
|
|
2
|
-
import type { ResolvedServer } from "./types";
|
|
3
|
-
declare class LSPServerManager {
|
|
4
|
-
private static instance;
|
|
5
|
-
private clients;
|
|
6
|
-
private cleanupInterval;
|
|
7
|
-
private readonly IDLE_TIMEOUT;
|
|
8
|
-
private readonly INIT_TIMEOUT;
|
|
9
|
-
private cleanupHandle;
|
|
10
|
-
private constructor();
|
|
11
|
-
private registerProcessCleanup;
|
|
12
|
-
static getInstance(): LSPServerManager;
|
|
13
|
-
private getKey;
|
|
14
|
-
private startCleanupTimer;
|
|
15
|
-
private cleanupIdleClients;
|
|
16
|
-
getClient(root: string, server: ResolvedServer): Promise<LSPClient>;
|
|
17
|
-
warmupClient(root: string, server: ResolvedServer): void;
|
|
18
|
-
releaseClient(root: string, serverId: string): void;
|
|
19
|
-
isServerInitializing(root: string, serverId: string): boolean;
|
|
20
|
-
stopAll(): Promise<void>;
|
|
21
|
-
cleanupTempDirectoryClients(): Promise<void>;
|
|
22
|
-
}
|
|
23
|
-
export declare const lspManager: LSPServerManager;
|
|
24
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ResolvedServer } from "./types";
|
|
2
|
-
interface LspEntry {
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
command?: string[];
|
|
5
|
-
extensions?: string[];
|
|
6
|
-
priority?: number;
|
|
7
|
-
env?: Record<string, string>;
|
|
8
|
-
initialization?: Record<string, unknown>;
|
|
9
|
-
}
|
|
10
|
-
interface ConfigJson {
|
|
11
|
-
lsp?: Record<string, LspEntry>;
|
|
12
|
-
}
|
|
13
|
-
type ConfigSource = "project" | "user" | "opencode";
|
|
14
|
-
interface ServerWithSource extends ResolvedServer {
|
|
15
|
-
source: ConfigSource;
|
|
16
|
-
}
|
|
17
|
-
export declare function loadJsonFile<T>(path: string): T | null;
|
|
18
|
-
export declare function getConfigPaths(): {
|
|
19
|
-
project: string;
|
|
20
|
-
user: string;
|
|
21
|
-
opencode: string;
|
|
22
|
-
};
|
|
23
|
-
export declare function loadAllConfigs(): Map<ConfigSource, ConfigJson>;
|
|
24
|
-
export declare function getMergedServers(): ServerWithSource[];
|
|
25
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isServerInstalled(command: string[]): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getLspServerAdditionalPathBases(workingDirectory: string): string[];
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ServerLookupResult } from "./types";
|
|
2
|
-
export declare function findServerForExtension(ext: string): ServerLookupResult;
|
|
3
|
-
export declare function getAllServers(): Array<{
|
|
4
|
-
id: string;
|
|
5
|
-
installed: boolean;
|
|
6
|
-
extensions: string[];
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
source: string;
|
|
9
|
-
priority: number;
|
|
10
|
-
}>;
|
|
11
|
-
export declare function getConfigPaths_(): {
|
|
12
|
-
project: string;
|
|
13
|
-
user: string;
|
|
14
|
-
opencode: string;
|
|
15
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { lsp_goto_definition } from "./goto-definition-tool";
|
|
2
|
-
export { lsp_find_references } from "./find-references-tool";
|
|
3
|
-
export { lsp_symbols } from "./symbols-tool";
|
|
4
|
-
export { lsp_diagnostics } from "./diagnostics-tool";
|
|
5
|
-
export { lsp_prepare_rename, lsp_rename } from "./rename-tools";
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
export interface LSPServerConfig {
|
|
2
|
-
id: string;
|
|
3
|
-
command: string[];
|
|
4
|
-
extensions: string[];
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
env?: Record<string, string>;
|
|
7
|
-
initialization?: Record<string, unknown>;
|
|
8
|
-
}
|
|
9
|
-
export interface Position {
|
|
10
|
-
line: number;
|
|
11
|
-
character: number;
|
|
12
|
-
}
|
|
13
|
-
export interface Range {
|
|
14
|
-
start: Position;
|
|
15
|
-
end: Position;
|
|
16
|
-
}
|
|
17
|
-
export interface Location {
|
|
18
|
-
uri: string;
|
|
19
|
-
range: Range;
|
|
20
|
-
}
|
|
21
|
-
export interface LocationLink {
|
|
22
|
-
targetUri: string;
|
|
23
|
-
targetRange: Range;
|
|
24
|
-
targetSelectionRange: Range;
|
|
25
|
-
originSelectionRange?: Range;
|
|
26
|
-
}
|
|
27
|
-
export interface SymbolInfo {
|
|
28
|
-
name: string;
|
|
29
|
-
kind: number;
|
|
30
|
-
location: Location;
|
|
31
|
-
containerName?: string;
|
|
32
|
-
}
|
|
33
|
-
export interface DocumentSymbol {
|
|
34
|
-
name: string;
|
|
35
|
-
kind: number;
|
|
36
|
-
range: Range;
|
|
37
|
-
selectionRange: Range;
|
|
38
|
-
children?: DocumentSymbol[];
|
|
39
|
-
}
|
|
40
|
-
export interface Diagnostic {
|
|
41
|
-
range: Range;
|
|
42
|
-
severity?: number;
|
|
43
|
-
code?: string | number;
|
|
44
|
-
source?: string;
|
|
45
|
-
message: string;
|
|
46
|
-
}
|
|
47
|
-
export interface TextDocumentIdentifier {
|
|
48
|
-
uri: string;
|
|
49
|
-
}
|
|
50
|
-
export interface VersionedTextDocumentIdentifier extends TextDocumentIdentifier {
|
|
51
|
-
version: number | null;
|
|
52
|
-
}
|
|
53
|
-
export interface TextEdit {
|
|
54
|
-
range: Range;
|
|
55
|
-
newText: string;
|
|
56
|
-
}
|
|
57
|
-
export interface TextDocumentEdit {
|
|
58
|
-
textDocument: VersionedTextDocumentIdentifier;
|
|
59
|
-
edits: TextEdit[];
|
|
60
|
-
}
|
|
61
|
-
export interface CreateFile {
|
|
62
|
-
kind: "create";
|
|
63
|
-
uri: string;
|
|
64
|
-
options?: {
|
|
65
|
-
overwrite?: boolean;
|
|
66
|
-
ignoreIfExists?: boolean;
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
export interface RenameFile {
|
|
70
|
-
kind: "rename";
|
|
71
|
-
oldUri: string;
|
|
72
|
-
newUri: string;
|
|
73
|
-
options?: {
|
|
74
|
-
overwrite?: boolean;
|
|
75
|
-
ignoreIfExists?: boolean;
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
export interface DeleteFile {
|
|
79
|
-
kind: "delete";
|
|
80
|
-
uri: string;
|
|
81
|
-
options?: {
|
|
82
|
-
recursive?: boolean;
|
|
83
|
-
ignoreIfNotExists?: boolean;
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
export interface WorkspaceEdit {
|
|
87
|
-
changes?: {
|
|
88
|
-
[uri: string]: TextEdit[];
|
|
89
|
-
};
|
|
90
|
-
documentChanges?: (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[];
|
|
91
|
-
}
|
|
92
|
-
export interface PrepareRenameResult {
|
|
93
|
-
range: Range;
|
|
94
|
-
placeholder?: string;
|
|
95
|
-
}
|
|
96
|
-
export interface PrepareRenameDefaultBehavior {
|
|
97
|
-
defaultBehavior: boolean;
|
|
98
|
-
}
|
|
99
|
-
export interface ServerLookupInfo {
|
|
100
|
-
id: string;
|
|
101
|
-
command: string[];
|
|
102
|
-
extensions: string[];
|
|
103
|
-
}
|
|
104
|
-
export type ServerLookupResult = {
|
|
105
|
-
status: "found";
|
|
106
|
-
server: ResolvedServer;
|
|
107
|
-
} | {
|
|
108
|
-
status: "not_configured";
|
|
109
|
-
extension: string;
|
|
110
|
-
availableServers: string[];
|
|
111
|
-
} | {
|
|
112
|
-
status: "not_installed";
|
|
113
|
-
server: ServerLookupInfo;
|
|
114
|
-
installHint: string;
|
|
115
|
-
};
|
|
116
|
-
export interface ResolvedServer {
|
|
117
|
-
id: string;
|
|
118
|
-
command: string[];
|
|
119
|
-
extensions: string[];
|
|
120
|
-
priority: number;
|
|
121
|
-
env?: Record<string, string>;
|
|
122
|
-
initialization?: Record<string, unknown>;
|
|
123
|
-
}
|