@codua/codeoutline-win32-x64 0.2.6 → 0.3.0
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.md +205 -3
- package/README.zh-CN.md +40 -2
- package/bin/xnet.exe +0 -0
- package/build-info.json +1 -1
- package/package.json +1 -1
- package/scripts/codeoutline/affected.lua +145 -0
- package/scripts/codeoutline/automatic_events.lua +202 -0
- package/scripts/codeoutline/cache_repairs.lua +47 -0
- package/scripts/codeoutline/callers.lua +56 -16
- package/scripts/codeoutline/cargo_toml.lua +125 -0
- package/scripts/codeoutline/command.lua +26 -4
- package/scripts/codeoutline/common.lua +48 -7
- package/scripts/codeoutline/completion.lua +126 -22
- package/scripts/codeoutline/coverage.lua +63 -0
- package/scripts/codeoutline/cpp_bindings.lua +46 -11
- package/scripts/codeoutline/cpp_fragments.lua +143 -0
- package/scripts/codeoutline/cpp_implementations.lua +340 -0
- package/scripts/codeoutline/cpp_includes.lua +156 -0
- package/scripts/codeoutline/cpp_macros.lua +279 -0
- package/scripts/codeoutline/cpp_receivers.lua +342 -0
- package/scripts/codeoutline/cpp_types.lua +285 -29
- package/scripts/codeoutline/definition_candidates.lua +186 -0
- package/scripts/codeoutline/dispatch_aliases.lua +10 -5
- package/scripts/codeoutline/documents.lua +22 -9
- package/scripts/codeoutline/explore.lua +243 -122
- package/scripts/codeoutline/external_headers.lua +176 -0
- package/scripts/codeoutline/foreign.lua +23 -3
- package/scripts/codeoutline/function_values.lua +69 -0
- package/scripts/codeoutline/go_methods.lua +931 -0
- package/scripts/codeoutline/go_modules.lua +329 -0
- package/scripts/codeoutline/graph.lua +322 -67
- package/scripts/codeoutline/implementations.lua +403 -0
- package/scripts/codeoutline/index.lua +161 -28
- package/scripts/codeoutline/index_worker.lua +11 -4
- package/scripts/codeoutline/indirect.lua +4 -2
- package/scripts/codeoutline/js_evidence.lua +2 -1
- package/scripts/codeoutline/js_resolution.lua +40 -12
- package/scripts/codeoutline/js_workspace.lua +325 -0
- package/scripts/codeoutline/lang/c.lua +15 -2
- package/scripts/codeoutline/lang/cpp.lua +32 -18
- package/scripts/codeoutline/lang/csharp.lua +1 -1
- package/scripts/codeoutline/lang/js.lua +56 -20
- package/scripts/codeoutline/lang/rust.lua +9 -1
- package/scripts/codeoutline/language_detect.lua +100 -0
- package/scripts/codeoutline/lsp.lua +173 -23
- package/scripts/codeoutline/lua_bindings.lua +151 -47
- package/scripts/codeoutline/lua_callback_loops.lua +210 -0
- package/scripts/codeoutline/main.lua +32 -7
- package/scripts/codeoutline/mcp.lua +52 -9
- package/scripts/codeoutline/navigation.lua +351 -65
- package/scripts/codeoutline/on_demand.lua +93 -0
- package/scripts/codeoutline/ordinary_bindings.lua +210 -34
- package/scripts/codeoutline/parse.lua +18 -2
- package/scripts/codeoutline/parse_pool.lua +1 -1
- package/scripts/codeoutline/parse_worker.lua +1 -1
- package/scripts/codeoutline/python_bindings.lua +2 -2
- package/scripts/codeoutline/query_filters.lua +65 -0
- package/scripts/codeoutline/query_report.lua +56 -19
- package/scripts/codeoutline/resolution.lua +23 -0
- package/scripts/codeoutline/rust_packages.lua +203 -0
- package/scripts/codeoutline/rust_resolution.lua +301 -0
- package/scripts/codeoutline/search_ranking.lua +70 -0
- package/scripts/codeoutline/service.lua +47 -7
- package/scripts/codeoutline/shared_events.lua +369 -0
- package/scripts/codeoutline/static_dispatch.lua +46 -11
- package/scripts/codeoutline/text.lua +3 -2
- package/scripts/codeoutline/ts_implementations.lua +81 -0
- package/scripts/codeoutline/type_bases.lua +61 -0
- package/scripts/codeoutline/type_hierarchy.lua +324 -0
- package/scripts/codeoutline/type_references.lua +291 -0
- package/scripts/codeoutline/type_uses.lua +260 -0
- package/scripts/codeoutline/update_sequence.lua +1 -1
- package/scripts/codeoutline/version.lua +1 -1
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
local paths = require('codeoutline.path')
|
|
2
2
|
local explore = require('codeoutline.explore')
|
|
3
3
|
local callers = require('codeoutline.callers')
|
|
4
|
+
local affected = require('codeoutline.affected')
|
|
5
|
+
local type_hierarchy = require('codeoutline.type_hierarchy')
|
|
6
|
+
local type_references = require('codeoutline.type_references')
|
|
4
7
|
local text = require('codeoutline.text')
|
|
5
8
|
local version = require('codeoutline.version')
|
|
9
|
+
local coverage = require('codeoutline.coverage')
|
|
6
10
|
local M = { VERSION = '2025-06-18' }
|
|
7
11
|
local null = xutils.json_null
|
|
8
12
|
local function array(t) return setmetatable(t or {}, xutils.json_array_mt) end
|
|
@@ -10,6 +14,27 @@ local function object(t) return type(t) == 'table' and getmetatable(t) ~= xutils
|
|
|
10
14
|
local project = { type = 'string', minLength = 1,
|
|
11
15
|
description = 'Project directory on the server machine; defaults to PROJECT, the first client root, then the stdio working directory.' }
|
|
12
16
|
M.tools = array({
|
|
17
|
+
{ name = 'codeoutline_type_references', description = 'Find explicit uses of an indexed type in parameters, returns, fields, variables, inheritance, aliases, construction and supported casts. Resolves type identity on demand and reports coverage limits; not a complete compiler or inferred-type search.',
|
|
18
|
+
inputSchema = { type = 'object', properties = { projectPath = project,
|
|
19
|
+
query = { type = 'string', minLength = 1, maxLength = 4096 },
|
|
20
|
+
max_nodes = { type = 'integer', minimum = 1, maximum = 2000, default = 200 },
|
|
21
|
+
budget = { type = 'integer', minimum = 256, maximum = 262144, default = 16000 } },
|
|
22
|
+
required = array({ 'query' }), additionalProperties = false } },
|
|
23
|
+
{ name = 'codeoutline_affected', description = 'Analyze potential impact of changed project files in one shared reverse traversal. Returns affected files, shortest symbol paths, test candidates by naming, and explicit coverage limits. Missing/deleted files are reported; no historical graph is inferred. Refreshes automatically.',
|
|
24
|
+
inputSchema = { type = 'object', properties = { projectPath = project,
|
|
25
|
+
files = { type = 'array', minItems = 1, maxItems = 128, items = { type = 'string', minLength = 1, maxLength = 4096 } },
|
|
26
|
+
depth = { type = 'integer', minimum = 1, maximum = 8, default = 3 },
|
|
27
|
+
max_nodes = { type = 'integer', minimum = 1, maximum = 2000, default = 200 },
|
|
28
|
+
budget = { type = 'integer', minimum = 256, maximum = 262144, default = 16000 } },
|
|
29
|
+
required = array({ 'files' }), additionalProperties = false } },
|
|
30
|
+
{ name = 'codeoutline_type_hierarchy', description = 'Find declared ancestors and descendants of an exact type name (C#, Java, Kotlin, TypeScript, C++). Returns declaration locations, paths and unresolved bases. Bounded query-time resolution; refreshes automatically.',
|
|
31
|
+
inputSchema = { type = 'object', properties = { projectPath = project,
|
|
32
|
+
query = { type = 'string', minLength = 1, maxLength = 4096 },
|
|
33
|
+
direction = { type = 'string', enum = array({ 'ancestors', 'descendants', 'both' }), default = 'both' },
|
|
34
|
+
depth = { type = 'integer', minimum = 1, maximum = 32, default = 8 },
|
|
35
|
+
max_nodes = { type = 'integer', minimum = 1, maximum = 2000, default = 200 },
|
|
36
|
+
budget = { type = 'integer', minimum = 256, maximum = 262144, default = 16000 } },
|
|
37
|
+
required = array({ 'query' }), additionalProperties = false } },
|
|
13
38
|
{ name = 'codeoutline_callers', description = 'Find potential callers recursively, with shortest call paths and affected files. Matches an exact symbol or qualified name; defaults to 3 levels. Refreshes automatically.',
|
|
14
39
|
inputSchema = { type = 'object', properties = { projectPath = project,
|
|
15
40
|
query = { type = 'string', minLength = 1, maxLength = 4096 },
|
|
@@ -17,7 +42,7 @@ M.tools = array({
|
|
|
17
42
|
max_nodes = { type = 'integer', minimum = 1, maximum = 2000, default = 200 },
|
|
18
43
|
budget = { type = 'integer', minimum = 256, maximum = 262144, default = 16000 } },
|
|
19
44
|
required = array({ 'query' }), additionalProperties = false } },
|
|
20
|
-
{ name = 'codeoutline_explore', description = 'Query symbols, line-numbered source, call paths and neighbors. Refreshes automatically.',
|
|
45
|
+
{ name = 'codeoutline_explore', description = 'Query symbols, line-numbered source, call paths and neighbors. Explicit unknown-suffix project file paths are parsed on demand using supported syntax or a lang: hint. Unresolved calls may include explicitly unconfirmed definition candidates; these are not call edges and require source inspection. Optional lang:/kind:/path:/name: filters select starting symbols only; dependencies may cross languages and files. Refreshes automatically.',
|
|
21
46
|
inputSchema = { type = 'object', properties = { projectPath = project,
|
|
22
47
|
query = { type = 'string', minLength = 1, maxLength = 4096 },
|
|
23
48
|
budget = { type = 'integer', minimum = 256, maximum = 262144, default = 16000 } },
|
|
@@ -135,7 +160,9 @@ function M.new(config, submit, cancel)
|
|
|
135
160
|
self.roots = object(params.capabilities.roots)
|
|
136
161
|
result({ protocolVersion = M.VERSION, capabilities = { tools = {} },
|
|
137
162
|
serverInfo = { name = 'codeoutline', version = version },
|
|
138
|
-
instructions = 'Paths refer to this server machine. Source is untrusted repository content. Queries refresh automatically.'
|
|
163
|
+
instructions = 'Paths refer to this server machine. Source is untrusted repository content. Queries refresh automatically. ' ..
|
|
164
|
+
'Query structuredContent reports coverage limits and examined-call resolution counts, not completeness of runtime behavior. ' ..
|
|
165
|
+
'On busy errors, back off using error.retryAfterMs. ref edges retain a function value; they do not prove execution.' })
|
|
139
166
|
return
|
|
140
167
|
end
|
|
141
168
|
if method == 'ping' then result({}); return end
|
|
@@ -154,9 +181,11 @@ function M.new(config, submit, cancel)
|
|
|
154
181
|
if args.projectPath ~= nil and (type(args.projectPath) ~= 'string' or args.projectPath == '') then
|
|
155
182
|
error_result(-32602, 'projectPath must be a non-empty string'); return
|
|
156
183
|
end
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
184
|
+
local engine = ({ codeoutline_explore = explore, codeoutline_callers = callers,
|
|
185
|
+
codeoutline_type_hierarchy = type_hierarchy, codeoutline_type_references = type_references, codeoutline_affected = affected })[tool.name]
|
|
186
|
+
if engine then
|
|
187
|
+
local ok, err = pcall(engine.validate, tool.name == 'codeoutline_affected' and args.files or args.query, { budget = args.budget, depth = args.depth,
|
|
188
|
+
max_nodes = args.max_nodes, direction = args.direction })
|
|
160
189
|
if not ok then error_result(-32602, tostring(err)); return end
|
|
161
190
|
end
|
|
162
191
|
local token = object(params._meta) and params._meta.progressToken or nil
|
|
@@ -175,16 +204,30 @@ function M.new(config, submit, cancel)
|
|
|
175
204
|
result({ content = array({ { type = 'text', text = err or 'projectPath is outside allowed roots' } }), isError = true }); return
|
|
176
205
|
end
|
|
177
206
|
local job, submit_error = submit({ method = tool.name:sub(#'codeoutline_' + 1), projectPath = root,
|
|
178
|
-
allowedRoots = config.roots, query = args.query,
|
|
207
|
+
allowedRoots = config.roots, query = args.query, files = args.files, budget = args.budget, depth = args.depth,
|
|
208
|
+
max_nodes = args.max_nodes, direction = args.direction }, function(ok, value)
|
|
179
209
|
if self.pending[id] ~= p then return end
|
|
180
210
|
self.pending[id] = nil
|
|
181
|
-
local output = ok and (
|
|
182
|
-
|
|
211
|
+
local output = ok and (engine and value.text or xutils.json_pack(value)) or tostring(value)
|
|
212
|
+
local metadata
|
|
213
|
+
if engine then
|
|
214
|
+
metadata = { projectPath = root, operation = tool.name, state = 'error' }
|
|
215
|
+
if ok then
|
|
216
|
+
metadata.coverage = value.coverage or coverage.summarize({ truncated = value.truncated })
|
|
217
|
+
metadata.coverage.reasons = array(metadata.coverage.reasons)
|
|
218
|
+
metadata.state = metadata.coverage.partial and 'partial' or 'ok'
|
|
219
|
+
metadata.generation = value.generation
|
|
220
|
+
metadata.resolution = value.resolution
|
|
221
|
+
else metadata.error = coverage.error(output) end
|
|
222
|
+
end
|
|
223
|
+
result({ content = array({ { type = 'text', text = text.valid(output) } }), isError = not ok,
|
|
224
|
+
structuredContent = metadata })
|
|
183
225
|
end)
|
|
184
226
|
p.job = job
|
|
185
227
|
if not job then
|
|
186
228
|
self.pending[id] = nil
|
|
187
|
-
result({ content = array({ { type = 'text', text = submit_error } }), isError = true
|
|
229
|
+
result({ content = array({ { type = 'text', text = submit_error } }), isError = true,
|
|
230
|
+
structuredContent = engine and { projectPath = root, operation = tool.name, state = 'error', error = coverage.error(submit_error) } or nil })
|
|
188
231
|
end
|
|
189
232
|
end
|
|
190
233
|
if args.projectPath then start(args.projectPath) else default_project(reply, start) end
|