openfox 2.0.38 → 2.0.40
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/dist/agent-defaults/builder.agent.md +2 -0
- package/dist/agent-defaults/code-reviewer.agent.md +1 -0
- package/dist/agent-defaults/explorer.agent.md +1 -0
- package/dist/agent-defaults/planner.agent.md +1 -0
- package/dist/{chat-handler-TPKAEATB.js → chat-handler-KPQ3OM3U.js} +4 -4
- package/dist/{chunk-7W2WATAO.js → chunk-34CRQ76B.js} +2 -2
- package/dist/{chunk-GZZW4XSI.js → chunk-EZJFNX7D.js} +3 -3
- package/dist/{chunk-ATBNY4CL.js → chunk-J7QZK6WE.js} +316 -28
- package/dist/{chunk-DL6ZILAF.js → chunk-LBGHZLLH.js} +63 -16
- package/dist/{chunk-HJ7KRYWX.js → chunk-LH5J7V4F.js} +273 -8
- package/dist/{chunk-FFQCZ2MI.js → chunk-WUG3TOAL.js} +2 -2
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{inspect-proxy-42ZXL2R5.js → inspect-proxy-UT2LFGJ5.js} +4 -2
- package/dist/{orchestrator-ZFBVVQBO.js → orchestrator-O4FZ3UVV.js} +4 -4
- package/dist/package.json +1 -1
- package/dist/{processor-NG4NH2SS.js → processor-PQ5IQ24D.js} +4 -4
- package/dist/{serve-VIWHYE6X.js → serve-NC3U2VTG.js} +6 -6
- package/dist/server/index.d.ts +88 -0
- package/dist/server/index.js +5 -5
- package/dist/server/public/.gitkeep +0 -0
- package/dist/{server-MEJPUI4S.js → server-INICKQAY.js} +5 -5
- package/dist/{tools-ATO5MSWX.js → tools-Q32G4RCJ.js} +3 -3
- package/dist/web/__inspect__.js +81 -34
- package/dist/web/assets/{index-I3ZLVKAn.js → index-chkieEXf.js} +28 -28
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/server/public/__inspect__.js +0 -282
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
} from "./chunk-JGNAYJJZ.js";
|
|
6
6
|
import {
|
|
7
7
|
runChatTurn
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-WUG3TOAL.js";
|
|
9
|
+
import "./chunk-LH5J7V4F.js";
|
|
10
|
+
import "./chunk-LBGHZLLH.js";
|
|
11
11
|
import "./chunk-PBGOZMVY.js";
|
|
12
12
|
import "./chunk-VRGRAQDG.js";
|
|
13
13
|
import "./chunk-NWO6GRYE.js";
|
|
@@ -145,4 +145,4 @@ export {
|
|
|
145
145
|
startChatSession,
|
|
146
146
|
stopSessionExecution
|
|
147
147
|
};
|
|
148
|
-
//# sourceMappingURL=chat-handler-
|
|
148
|
+
//# sourceMappingURL=chat-handler-KPQ3OM3U.js.map
|
|
@@ -202,7 +202,7 @@ async function runCli(options) {
|
|
|
202
202
|
if (!configExists) {
|
|
203
203
|
await runNetworkSetup(mode);
|
|
204
204
|
}
|
|
205
|
-
const { runServe } = await import("./serve-
|
|
205
|
+
const { runServe } = await import("./serve-NC3U2VTG.js");
|
|
206
206
|
const serveOptions = { mode };
|
|
207
207
|
if (values.port) serveOptions.port = parseInt(values.port);
|
|
208
208
|
if (values["no-browser"] === true) serveOptions.openBrowser = false;
|
|
@@ -214,4 +214,4 @@ async function runCli(options) {
|
|
|
214
214
|
export {
|
|
215
215
|
runCli
|
|
216
216
|
};
|
|
217
|
-
//# sourceMappingURL=chunk-
|
|
217
|
+
//# sourceMappingURL=chunk-34CRQ76B.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
injectWorkflowKickoffIfNeeded,
|
|
3
3
|
runAgentTurn,
|
|
4
4
|
runChatTurn
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WUG3TOAL.js";
|
|
6
6
|
import {
|
|
7
7
|
applyDynamicContext,
|
|
8
8
|
checkAborted,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
loadAllAgentsDefault,
|
|
17
17
|
saveItemToDir,
|
|
18
18
|
spawnShellProcess
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-LH5J7V4F.js";
|
|
20
20
|
import {
|
|
21
21
|
getPlatformShell,
|
|
22
22
|
onProcessEvent
|
|
@@ -2056,4 +2056,4 @@ export {
|
|
|
2056
2056
|
signalMcpReady,
|
|
2057
2057
|
createWebSocketServer
|
|
2058
2058
|
};
|
|
2059
|
-
//# sourceMappingURL=chunk-
|
|
2059
|
+
//# sourceMappingURL=chunk-EZJFNX7D.js.map
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
tokenFromPassword,
|
|
22
22
|
verifyPassword,
|
|
23
23
|
workflowExists
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-EZJFNX7D.js";
|
|
25
25
|
import {
|
|
26
26
|
agentExists,
|
|
27
27
|
createToolRegistry,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
setMcpTools,
|
|
62
62
|
setNotifyMcpServersChanged,
|
|
63
63
|
skillExists
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-LH5J7V4F.js";
|
|
65
65
|
import {
|
|
66
66
|
getPathSeparator,
|
|
67
67
|
isAbsolutePath
|
|
@@ -148,7 +148,7 @@ import {
|
|
|
148
148
|
import express from "express";
|
|
149
149
|
import cors from "cors";
|
|
150
150
|
import { createServer as createHttpServer } from "http";
|
|
151
|
-
import { fileURLToPath as
|
|
151
|
+
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
152
152
|
import { dirname as dirname5, resolve as resolve3, join as join5 } from "path";
|
|
153
153
|
import { readFile } from "fs/promises";
|
|
154
154
|
import { createServer as createViteServer } from "vite";
|
|
@@ -1594,6 +1594,7 @@ var McpManager = class {
|
|
|
1594
1594
|
// src/server/lsp/server.ts
|
|
1595
1595
|
import { spawn } from "child_process";
|
|
1596
1596
|
import { extname } from "path";
|
|
1597
|
+
import { fileURLToPath } from "url";
|
|
1597
1598
|
import { createMessageConnection, StreamMessageReader, StreamMessageWriter } from "vscode-jsonrpc/node.js";
|
|
1598
1599
|
var LSP = {
|
|
1599
1600
|
initialize: "initialize",
|
|
@@ -1603,7 +1604,12 @@ var LSP = {
|
|
|
1603
1604
|
didOpen: "textDocument/didOpen",
|
|
1604
1605
|
didChange: "textDocument/didChange",
|
|
1605
1606
|
didClose: "textDocument/didClose",
|
|
1606
|
-
publishDiagnostics: "textDocument/publishDiagnostics"
|
|
1607
|
+
publishDiagnostics: "textDocument/publishDiagnostics",
|
|
1608
|
+
definition: "textDocument/definition",
|
|
1609
|
+
references: "textDocument/references",
|
|
1610
|
+
typeDefinition: "textDocument/typeDefinition",
|
|
1611
|
+
hover: "textDocument/hover",
|
|
1612
|
+
workspaceSymbol: "workspace/symbol"
|
|
1607
1613
|
};
|
|
1608
1614
|
var DiagnosticSeverity = {
|
|
1609
1615
|
Error: 1,
|
|
@@ -1611,7 +1617,38 @@ var DiagnosticSeverity = {
|
|
|
1611
1617
|
Information: 3,
|
|
1612
1618
|
Hint: 4
|
|
1613
1619
|
};
|
|
1620
|
+
function hoverInfo(contents, range) {
|
|
1621
|
+
return range ? { contents, range } : { contents };
|
|
1622
|
+
}
|
|
1614
1623
|
var DIAGNOSTIC_WAIT_MS = 2e3;
|
|
1624
|
+
var SYMBOL_KIND_NAMES = {
|
|
1625
|
+
1: "File",
|
|
1626
|
+
2: "Module",
|
|
1627
|
+
3: "Namespace",
|
|
1628
|
+
4: "Package",
|
|
1629
|
+
5: "Class",
|
|
1630
|
+
6: "Method",
|
|
1631
|
+
7: "Property",
|
|
1632
|
+
8: "Field",
|
|
1633
|
+
9: "Constructor",
|
|
1634
|
+
10: "Enum",
|
|
1635
|
+
11: "Interface",
|
|
1636
|
+
12: "Function",
|
|
1637
|
+
13: "Variable",
|
|
1638
|
+
14: "Constant",
|
|
1639
|
+
15: "String",
|
|
1640
|
+
16: "Number",
|
|
1641
|
+
17: "Boolean",
|
|
1642
|
+
18: "Array",
|
|
1643
|
+
19: "Object",
|
|
1644
|
+
20: "Key",
|
|
1645
|
+
21: "Null",
|
|
1646
|
+
22: "EnumMember",
|
|
1647
|
+
23: "Struct",
|
|
1648
|
+
24: "Event",
|
|
1649
|
+
25: "Operator",
|
|
1650
|
+
26: "TypeParameter"
|
|
1651
|
+
};
|
|
1615
1652
|
function mapSeverity(severity) {
|
|
1616
1653
|
switch (severity) {
|
|
1617
1654
|
case DiagnosticSeverity.Error:
|
|
@@ -1906,6 +1943,174 @@ var LspServer = class {
|
|
|
1906
1943
|
return () => this.diagnosticsCallbacks.delete(callback);
|
|
1907
1944
|
}
|
|
1908
1945
|
// ============================================================================
|
|
1946
|
+
// Code Navigation Queries
|
|
1947
|
+
// ============================================================================
|
|
1948
|
+
/**
|
|
1949
|
+
* Convert a file:// URI to a local path.
|
|
1950
|
+
* Handles Windows paths (file:///C:/...) and URL-encoded characters.
|
|
1951
|
+
*/
|
|
1952
|
+
uriToPath(uri) {
|
|
1953
|
+
try {
|
|
1954
|
+
return fileURLToPath(uri);
|
|
1955
|
+
} catch {
|
|
1956
|
+
return uri.replace(/^file:\/\//, "");
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
/**
|
|
1960
|
+
* Convert a local path to a file:// URI.
|
|
1961
|
+
*/
|
|
1962
|
+
pathToUri(path) {
|
|
1963
|
+
return `file://${path}`;
|
|
1964
|
+
}
|
|
1965
|
+
/**
|
|
1966
|
+
* Convert an LSP location to our internal CodeLocation.
|
|
1967
|
+
*/
|
|
1968
|
+
toCodeLocation(loc) {
|
|
1969
|
+
return {
|
|
1970
|
+
path: this.uriToPath(loc.uri),
|
|
1971
|
+
line: loc.range.start.line,
|
|
1972
|
+
character: loc.range.start.character,
|
|
1973
|
+
endLine: loc.range.end.line,
|
|
1974
|
+
endCharacter: loc.range.end.character
|
|
1975
|
+
};
|
|
1976
|
+
}
|
|
1977
|
+
/**
|
|
1978
|
+
* Ensure the server is running before making a query.
|
|
1979
|
+
*/
|
|
1980
|
+
requireConnection() {
|
|
1981
|
+
if (this.state !== "running" || !this.connection) {
|
|
1982
|
+
throw new Error("LSP server is not running");
|
|
1983
|
+
}
|
|
1984
|
+
return this.connection;
|
|
1985
|
+
}
|
|
1986
|
+
/**
|
|
1987
|
+
* Normalize a single Location or Location[] response into CodeLocation[].
|
|
1988
|
+
*/
|
|
1989
|
+
normalizeLocations(response) {
|
|
1990
|
+
if (!response) return [];
|
|
1991
|
+
if (Array.isArray(response)) {
|
|
1992
|
+
return response.map((loc) => this.toCodeLocation(loc));
|
|
1993
|
+
}
|
|
1994
|
+
return [this.toCodeLocation(response)];
|
|
1995
|
+
}
|
|
1996
|
+
/**
|
|
1997
|
+
* Find the definition of a symbol at the given position.
|
|
1998
|
+
* Sends textDocument/definition request.
|
|
1999
|
+
*/
|
|
2000
|
+
async getDefinition(path, line, character) {
|
|
2001
|
+
try {
|
|
2002
|
+
const conn = this.requireConnection();
|
|
2003
|
+
const uri = this.pathToUri(path);
|
|
2004
|
+
const result = await conn.sendRequest(LSP.definition, {
|
|
2005
|
+
textDocument: { uri },
|
|
2006
|
+
position: { line, character }
|
|
2007
|
+
});
|
|
2008
|
+
return this.normalizeLocations(result);
|
|
2009
|
+
} catch {
|
|
2010
|
+
return [];
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
/**
|
|
2014
|
+
* Find all references to a symbol at the given position.
|
|
2015
|
+
* Sends textDocument/references request.
|
|
2016
|
+
*/
|
|
2017
|
+
async getReferences(path, line, character) {
|
|
2018
|
+
try {
|
|
2019
|
+
const conn = this.requireConnection();
|
|
2020
|
+
const uri = this.pathToUri(path);
|
|
2021
|
+
const result = await conn.sendRequest(LSP.references, {
|
|
2022
|
+
textDocument: { uri },
|
|
2023
|
+
position: { line, character },
|
|
2024
|
+
context: { includeDeclaration: true }
|
|
2025
|
+
});
|
|
2026
|
+
return this.normalizeLocations(result);
|
|
2027
|
+
} catch {
|
|
2028
|
+
return [];
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
/**
|
|
2032
|
+
* Find the type definition of a symbol at the given position.
|
|
2033
|
+
* Sends textDocument/typeDefinition request.
|
|
2034
|
+
*/
|
|
2035
|
+
async getTypeDefinition(path, line, character) {
|
|
2036
|
+
try {
|
|
2037
|
+
const conn = this.requireConnection();
|
|
2038
|
+
const uri = this.pathToUri(path);
|
|
2039
|
+
const result = await conn.sendRequest(LSP.typeDefinition, {
|
|
2040
|
+
textDocument: { uri },
|
|
2041
|
+
position: { line, character }
|
|
2042
|
+
});
|
|
2043
|
+
return this.normalizeLocations(result);
|
|
2044
|
+
} catch {
|
|
2045
|
+
return [];
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
/**
|
|
2049
|
+
* Search workspace for a symbol by name.
|
|
2050
|
+
* Sends workspace/symbol request.
|
|
2051
|
+
*/
|
|
2052
|
+
async findWorkspaceSymbol(query) {
|
|
2053
|
+
try {
|
|
2054
|
+
const conn = this.requireConnection();
|
|
2055
|
+
const result = await conn.sendRequest(LSP.workspaceSymbol, { query });
|
|
2056
|
+
if (!Array.isArray(result)) return [];
|
|
2057
|
+
return result.map((sym) => {
|
|
2058
|
+
const info = {
|
|
2059
|
+
name: sym.name,
|
|
2060
|
+
kind: this.symbolKindToString(sym.kind),
|
|
2061
|
+
location: this.toCodeLocation(sym.location)
|
|
2062
|
+
};
|
|
2063
|
+
if (sym.containerName) {
|
|
2064
|
+
info.containerName = sym.containerName;
|
|
2065
|
+
}
|
|
2066
|
+
return info;
|
|
2067
|
+
});
|
|
2068
|
+
} catch {
|
|
2069
|
+
return [];
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
/**
|
|
2073
|
+
* Get hover information for a symbol at the given position.
|
|
2074
|
+
* Sends textDocument/hover request.
|
|
2075
|
+
*/
|
|
2076
|
+
async getHoverInfo(path, line, character) {
|
|
2077
|
+
try {
|
|
2078
|
+
const conn = this.requireConnection();
|
|
2079
|
+
const uri = this.pathToUri(path);
|
|
2080
|
+
const result = await conn.sendRequest(LSP.hover, {
|
|
2081
|
+
textDocument: { uri },
|
|
2082
|
+
position: { line, character }
|
|
2083
|
+
});
|
|
2084
|
+
if (!result) return null;
|
|
2085
|
+
const contents = this.extractHoverContents(result.contents);
|
|
2086
|
+
const range = result.range ? {
|
|
2087
|
+
start: { line: result.range.start.line, character: result.range.start.character },
|
|
2088
|
+
end: { line: result.range.end.line, character: result.range.end.character }
|
|
2089
|
+
} : void 0;
|
|
2090
|
+
return hoverInfo(contents, range);
|
|
2091
|
+
} catch {
|
|
2092
|
+
return null;
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
/**
|
|
2096
|
+
* Extract a plain-text string from hover contents (which can be
|
|
2097
|
+
* MarkupContent, MarkedString, or an array of either).
|
|
2098
|
+
*/
|
|
2099
|
+
extractHoverContents(contents) {
|
|
2100
|
+
if (typeof contents === "string") return contents;
|
|
2101
|
+
if (Array.isArray(contents)) {
|
|
2102
|
+
return contents.map((c) => typeof c === "string" ? c : c.value).join("\n\n");
|
|
2103
|
+
}
|
|
2104
|
+
return contents.value;
|
|
2105
|
+
}
|
|
2106
|
+
/**
|
|
2107
|
+
* Convert LSP SymbolKind number to a human-readable string.
|
|
2108
|
+
* See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#symbolKind
|
|
2109
|
+
*/
|
|
2110
|
+
symbolKindToString(kind) {
|
|
2111
|
+
return SYMBOL_KIND_NAMES[kind] ?? "Unknown";
|
|
2112
|
+
}
|
|
2113
|
+
// ============================================================================
|
|
1909
2114
|
// Status
|
|
1910
2115
|
// ============================================================================
|
|
1911
2116
|
isRunning() {
|
|
@@ -1917,13 +2122,22 @@ var LspServer = class {
|
|
|
1917
2122
|
getLanguage() {
|
|
1918
2123
|
return this.config.id;
|
|
1919
2124
|
}
|
|
2125
|
+
hasOpenDocuments() {
|
|
2126
|
+
return this.openDocuments.size > 0;
|
|
2127
|
+
}
|
|
2128
|
+
getExtensions() {
|
|
2129
|
+
return this.config.extensions;
|
|
2130
|
+
}
|
|
1920
2131
|
};
|
|
1921
2132
|
|
|
2133
|
+
// src/server/lsp/manager.ts
|
|
2134
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
2135
|
+
|
|
1922
2136
|
// src/server/utils/which.ts
|
|
1923
2137
|
import { access, constants } from "fs/promises";
|
|
1924
2138
|
import { join, dirname } from "path";
|
|
1925
|
-
import { fileURLToPath } from "url";
|
|
1926
|
-
var __dirname = dirname(
|
|
2139
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
2140
|
+
var __dirname = dirname(fileURLToPath2(import.meta.url));
|
|
1927
2141
|
function getBundledBinPaths() {
|
|
1928
2142
|
const paths = [];
|
|
1929
2143
|
paths.push(join(process.cwd(), "node_modules", ".bin"));
|
|
@@ -1973,9 +2187,9 @@ async function which(command, workdir) {
|
|
|
1973
2187
|
// src/server/lsp/languages.ts
|
|
1974
2188
|
import { extname as extname2, basename } from "path";
|
|
1975
2189
|
import { readFileSync } from "fs";
|
|
1976
|
-
import { fileURLToPath as
|
|
2190
|
+
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
1977
2191
|
import { dirname as dirname2, resolve } from "path";
|
|
1978
|
-
var __dirname2 = dirname2(
|
|
2192
|
+
var __dirname2 = dirname2(fileURLToPath3(import.meta.url));
|
|
1979
2193
|
var languagesJson = JSON.parse(readFileSync(resolve(__dirname2, "languages.json"), "utf-8"));
|
|
1980
2194
|
var LANGUAGES = languagesJson;
|
|
1981
2195
|
var extensionToLanguage = /* @__PURE__ */ new Map();
|
|
@@ -2151,6 +2365,85 @@ var LspManager = class {
|
|
|
2151
2365
|
}
|
|
2152
2366
|
return null;
|
|
2153
2367
|
}
|
|
2368
|
+
// ============================================================================
|
|
2369
|
+
// Code Navigation Queries
|
|
2370
|
+
// ============================================================================
|
|
2371
|
+
/**
|
|
2372
|
+
* Find the definition of a symbol at the given position.
|
|
2373
|
+
*/
|
|
2374
|
+
async getDefinition(path, line, character) {
|
|
2375
|
+
const server = await this.getServerForFile(path);
|
|
2376
|
+
if (!server) return [];
|
|
2377
|
+
return server.getDefinition(path, line, character);
|
|
2378
|
+
}
|
|
2379
|
+
/**
|
|
2380
|
+
* Find all references to a symbol at the given position.
|
|
2381
|
+
*/
|
|
2382
|
+
async getReferences(path, line, character) {
|
|
2383
|
+
const server = await this.getServerForFile(path);
|
|
2384
|
+
if (!server) return [];
|
|
2385
|
+
return server.getReferences(path, line, character);
|
|
2386
|
+
}
|
|
2387
|
+
/**
|
|
2388
|
+
* Find the type definition of a symbol at the given position.
|
|
2389
|
+
*/
|
|
2390
|
+
async getTypeDefinition(path, line, character) {
|
|
2391
|
+
const server = await this.getServerForFile(path);
|
|
2392
|
+
if (!server) return [];
|
|
2393
|
+
return server.getTypeDefinition(path, line, character);
|
|
2394
|
+
}
|
|
2395
|
+
/**
|
|
2396
|
+
* Search workspace for a symbol by name.
|
|
2397
|
+
* Uses the first available server that supports workspace/symbol.
|
|
2398
|
+
*/
|
|
2399
|
+
async findWorkspaceSymbol(query) {
|
|
2400
|
+
for (const server of this.servers.values()) {
|
|
2401
|
+
if (server.isRunning()) {
|
|
2402
|
+
const results = await server.findWorkspaceSymbol(query);
|
|
2403
|
+
if (results.length > 0) return results;
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
return [];
|
|
2407
|
+
}
|
|
2408
|
+
/**
|
|
2409
|
+
* Open a file to seed the LSP server, then search for a workspace symbol.
|
|
2410
|
+
*
|
|
2411
|
+
* Some LSP servers (e.g., typescript-language-server) only index projects
|
|
2412
|
+
* after a file is opened via textDocument/didOpen. This method:
|
|
2413
|
+
* 1. Detects the language from the file and starts the appropriate server
|
|
2414
|
+
* 2. Reads the file from disk and sends didOpen to trigger project indexing
|
|
2415
|
+
* 3. Sends a hover request to flush the notification queue (JSON-RPC processes
|
|
2416
|
+
* requests sequentially, so the server must finish didOpen before responding)
|
|
2417
|
+
* 4. Queries workspace/symbol for the given symbol
|
|
2418
|
+
*/
|
|
2419
|
+
async seedAndFindWorkspaceSymbol(query, filePath) {
|
|
2420
|
+
const server = await this.getServerForFile(filePath);
|
|
2421
|
+
if (!server?.isRunning()) return [];
|
|
2422
|
+
try {
|
|
2423
|
+
const content = readFileSync2(filePath, "utf-8");
|
|
2424
|
+
await server.didOpen(filePath, content);
|
|
2425
|
+
await server.getHoverInfo(filePath, 0, 0);
|
|
2426
|
+
} catch (error) {
|
|
2427
|
+
logger.warn("Failed to seed LSP server", {
|
|
2428
|
+
path: filePath,
|
|
2429
|
+
error: error instanceof Error ? error.message : String(error),
|
|
2430
|
+
sessionId: this.sessionId
|
|
2431
|
+
});
|
|
2432
|
+
return [];
|
|
2433
|
+
}
|
|
2434
|
+
return server.findWorkspaceSymbol(query);
|
|
2435
|
+
}
|
|
2436
|
+
/**
|
|
2437
|
+
* Get hover information for a symbol at the given position.
|
|
2438
|
+
*/
|
|
2439
|
+
async getHoverInfo(path, line, character) {
|
|
2440
|
+
const server = await this.getServerForFile(path);
|
|
2441
|
+
if (!server) return null;
|
|
2442
|
+
return server.getHoverInfo(path, line, character);
|
|
2443
|
+
}
|
|
2444
|
+
// ============================================================================
|
|
2445
|
+
// Shutdown
|
|
2446
|
+
// ============================================================================
|
|
2154
2447
|
/**
|
|
2155
2448
|
* Shutdown all LSP servers.
|
|
2156
2449
|
*/
|
|
@@ -3105,9 +3398,9 @@ function createSkillRoutes(configDir, projectDir) {
|
|
|
3105
3398
|
// src/server/commands/registry.ts
|
|
3106
3399
|
import { writeFile, mkdir, unlink } from "fs/promises";
|
|
3107
3400
|
import { join as join3, dirname as dirname3 } from "path";
|
|
3108
|
-
import { fileURLToPath as
|
|
3401
|
+
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
3109
3402
|
import matter from "gray-matter";
|
|
3110
|
-
var __bundleDir = dirname3(
|
|
3403
|
+
var __bundleDir = dirname3(fileURLToPath4(import.meta.url));
|
|
3111
3404
|
var DEFAULTS_DIR = join3(__bundleDir, "defaults");
|
|
3112
3405
|
var DEFAULTS_DIR_ALT = join3(__bundleDir, "command-defaults");
|
|
3113
3406
|
var COMMAND_EXTENSION = ".command.md";
|
|
@@ -3544,7 +3837,7 @@ import { Router as Router7 } from "express";
|
|
|
3544
3837
|
import { spawn as spawn2 } from "child_process";
|
|
3545
3838
|
|
|
3546
3839
|
// src/constants.ts
|
|
3547
|
-
var VERSION = "2.0.
|
|
3840
|
+
var VERSION = "2.0.40";
|
|
3548
3841
|
|
|
3549
3842
|
// src/server/routes/auto-update.ts
|
|
3550
3843
|
var updateInProgress = false;
|
|
@@ -3659,7 +3952,7 @@ function createAutoUpdateRoutes(options = {}) {
|
|
|
3659
3952
|
}
|
|
3660
3953
|
|
|
3661
3954
|
// src/server/index.ts
|
|
3662
|
-
var __dirname3 = dirname5(
|
|
3955
|
+
var __dirname3 = dirname5(fileURLToPath5(import.meta.url));
|
|
3663
3956
|
async function createServerHandle(config4) {
|
|
3664
3957
|
setRuntimeConfig(config4);
|
|
3665
3958
|
setLogLevel(config4.logging?.level ?? void 0, config4.mode);
|
|
@@ -3741,7 +4034,7 @@ async function createServerHandle(config4) {
|
|
|
3741
4034
|
setMcpTools(mcpTools);
|
|
3742
4035
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
3743
4036
|
}
|
|
3744
|
-
const { signalMcpReady } = await import("./server-
|
|
4037
|
+
const { signalMcpReady } = await import("./server-INICKQAY.js");
|
|
3745
4038
|
signalMcpReady();
|
|
3746
4039
|
});
|
|
3747
4040
|
const app = express();
|
|
@@ -3934,7 +4227,7 @@ async function createServerHandle(config4) {
|
|
|
3934
4227
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
3935
4228
|
const { getEventStore: getEventStore2 } = await import("./events-KZZPCW2Q.js");
|
|
3936
4229
|
const { buildMessagesFromStoredEvents } = await import("./folding-ENYH4LMG.js");
|
|
3937
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
4230
|
+
const { getPendingQuestionsForSession } = await import("./tools-Q32G4RCJ.js");
|
|
3938
4231
|
const session = sessionManager.getSession(req.params.id);
|
|
3939
4232
|
if (!session) {
|
|
3940
4233
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -4085,7 +4378,7 @@ async function createServerHandle(config4) {
|
|
|
4085
4378
|
if (!callId || approved === void 0) {
|
|
4086
4379
|
return res.status(400).json({ error: "callId and approved are required" });
|
|
4087
4380
|
}
|
|
4088
|
-
const { providePathConfirmation } = await import("./tools-
|
|
4381
|
+
const { providePathConfirmation } = await import("./tools-Q32G4RCJ.js");
|
|
4089
4382
|
const result = providePathConfirmation(callId, approved, alwaysAllow);
|
|
4090
4383
|
if (!result.found) {
|
|
4091
4384
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
@@ -4093,7 +4386,7 @@ async function createServerHandle(config4) {
|
|
|
4093
4386
|
const { getEventStore: getEventStore2 } = await import("./events-KZZPCW2Q.js");
|
|
4094
4387
|
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-ENYH4LMG.js");
|
|
4095
4388
|
const { createSessionStateMessage } = await import("./protocol-BKNLAEPJ.js");
|
|
4096
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
4389
|
+
const { getPendingQuestionsForSession } = await import("./tools-Q32G4RCJ.js");
|
|
4097
4390
|
const eventStore = getEventStore2();
|
|
4098
4391
|
const events = eventStore.getEvents(sessionId);
|
|
4099
4392
|
const messages = buildMessagesFromStoredEvents(events);
|
|
@@ -4114,7 +4407,7 @@ async function createServerHandle(config4) {
|
|
|
4114
4407
|
if (!skip && typeof answer !== "string") {
|
|
4115
4408
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
4116
4409
|
}
|
|
4117
|
-
const { provideAnswer } = await import("./tools-
|
|
4410
|
+
const { provideAnswer } = await import("./tools-Q32G4RCJ.js");
|
|
4118
4411
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
4119
4412
|
if (!found) {
|
|
4120
4413
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -4150,8 +4443,8 @@ async function createServerHandle(config4) {
|
|
|
4150
4443
|
if (!session) {
|
|
4151
4444
|
return res.status(404).json({ error: "Session not found" });
|
|
4152
4445
|
}
|
|
4153
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
4154
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
4446
|
+
const { stopSessionExecution } = await import("./chat-handler-KPQ3OM3U.js");
|
|
4447
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-Q32G4RCJ.js");
|
|
4155
4448
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
4156
4449
|
sessionManager.clearMessageQueue(sessionId);
|
|
4157
4450
|
stopSessionExecution(sessionId, sessionManager);
|
|
@@ -4647,7 +4940,7 @@ async function createServerHandle(config4) {
|
|
|
4647
4940
|
});
|
|
4648
4941
|
async function rebuildMcpTools() {
|
|
4649
4942
|
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-B7QP6NLA.js");
|
|
4650
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
4943
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-Q32G4RCJ.js");
|
|
4651
4944
|
const mcpTools = createMcpTools2(mcpManager);
|
|
4652
4945
|
setMcpTools2(mcpTools);
|
|
4653
4946
|
}
|
|
@@ -4926,11 +5219,6 @@ async function createServerHandle(config4) {
|
|
|
4926
5219
|
res.set("Content-Type", "application/javascript");
|
|
4927
5220
|
readFile(join5(distWebDir, "__inspect__.js")).then((content) => res.send(content)).catch(() => res.status(404).send("Not found"));
|
|
4928
5221
|
});
|
|
4929
|
-
app.use("/__inspect__.js", (_req, res) => {
|
|
4930
|
-
res.set("Access-Control-Allow-Origin", "*");
|
|
4931
|
-
res.set("Content-Type", "application/javascript");
|
|
4932
|
-
readFile(join5(distWebDir, "__inspect__.js")).then((content) => res.send(content)).catch(() => res.status(404).send("Not found"));
|
|
4933
|
-
});
|
|
4934
5222
|
app.get("/", (_req, res) => {
|
|
4935
5223
|
readFile(join5(distWebDir, "index.html"), "utf-8").then((content) => res.send(content)).catch(() => {
|
|
4936
5224
|
res.status(404).send("Web UI not built. Run `npm run build:web`");
|
|
@@ -4960,7 +5248,7 @@ async function createServerHandle(config4) {
|
|
|
4960
5248
|
const state = sessionManager.getContextState(sessionId);
|
|
4961
5249
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
4962
5250
|
});
|
|
4963
|
-
const { QueueProcessor } = await import("./processor-
|
|
5251
|
+
const { QueueProcessor } = await import("./processor-PQ5IQ24D.js");
|
|
4964
5252
|
const queueProcessor = new QueueProcessor({
|
|
4965
5253
|
sessionManager,
|
|
4966
5254
|
providerManager,
|
|
@@ -5001,7 +5289,7 @@ async function createServerHandle(config4) {
|
|
|
5001
5289
|
void (async () => {
|
|
5002
5290
|
await devServerManager.stopAll();
|
|
5003
5291
|
await mcpManager.disconnectAll();
|
|
5004
|
-
const { stopAllInspectProxies } = await import("./inspect-proxy-
|
|
5292
|
+
const { stopAllInspectProxies } = await import("./inspect-proxy-UT2LFGJ5.js");
|
|
5005
5293
|
stopAllInspectProxies();
|
|
5006
5294
|
const { cleanupAllProcesses } = await import("./store-OQ45KONN.js");
|
|
5007
5295
|
cleanupAllProcesses();
|
|
@@ -5035,4 +5323,4 @@ export {
|
|
|
5035
5323
|
createServerHandle,
|
|
5036
5324
|
createServer
|
|
5037
5325
|
};
|
|
5038
|
-
//# sourceMappingURL=chunk-
|
|
5326
|
+
//# sourceMappingURL=chunk-J7QZK6WE.js.map
|