ast-mcp-server 0.13.1 → 0.14.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/CHANGELOG.md +15 -4
- package/README.md +24 -10
- package/cordis.patch.yml +1 -1
- package/dist/batch/schema.js +1 -1
- package/dist/services/authenticated-publication.js +181 -0
- package/dist/services/call-spines.js +10 -5
- package/dist/services/context-builder.js +2 -1
- package/dist/services/diagnostics.js +293 -9
- package/dist/services/impact.js +46 -14
- package/dist/services/managed-file.js +3 -50
- package/dist/services/operation-plan-file.js +17 -18
- package/dist/services/operations.js +231 -87
- package/dist/services/relationships.js +403 -4
- package/dist/services/test-candidates.js +35 -2
- package/dist/tools/find_test_candidates.js +24 -3
- package/dist/tools/get_impact.js +12 -2
- package/dist/tools/relationship-schema.js +12 -1
- package/docs/support.md +4 -2
- package/package.json +9 -7
- package/skills/structural-code-editing/SKILL.md +8 -0
- package/skills/structural-code-editing/releases.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { FRESHNESS_CAUSES, SNAPSHOT_STATES } from "../services/read-contracts.js";
|
|
3
|
-
import { RELATIONSHIP_CONFIDENCES, RELATIONSHIP_EDGE_KINDS, RELATIONSHIP_PROVENANCES, RELATIONSHIP_RESOLUTIONS, } from "../services/relationships.js";
|
|
3
|
+
import { RELATIONSHIP_CONFIDENCES, RELATIONSHIP_COVERAGE_STATUSES, RELATIONSHIP_EDGE_KINDS, RELATIONSHIP_PROVENANCES, RELATIONSHIP_RESOLUTIONS, } from "../services/relationships.js";
|
|
4
4
|
export const SourceRangeSchema = z.object({
|
|
5
5
|
start_line: z.number().int().positive(),
|
|
6
6
|
start_column: z.number().int().positive().optional(),
|
|
@@ -18,6 +18,17 @@ export const FreshnessSchema = z.object({
|
|
|
18
18
|
causes: z.array(z.enum(FRESHNESS_CAUSES)),
|
|
19
19
|
checked_at: z.string().nullable(),
|
|
20
20
|
});
|
|
21
|
+
export const RelationshipCoverageEntrySchema = z.object({
|
|
22
|
+
kind: z.enum(RELATIONSHIP_EDGE_KINDS),
|
|
23
|
+
direction: z.enum(["incoming", "outgoing"]),
|
|
24
|
+
endpoint_class: z.enum(["module", "symbol"]),
|
|
25
|
+
status: z.enum(RELATIONSHIP_COVERAGE_STATUSES),
|
|
26
|
+
});
|
|
27
|
+
export const RelationshipWorkSchema = z.object({
|
|
28
|
+
work_items: z.number().int().min(0),
|
|
29
|
+
max_work_items: z.number().int().positive(),
|
|
30
|
+
work_limit_reached: z.boolean(),
|
|
31
|
+
});
|
|
21
32
|
export const RelationshipEdgeSchema = z.object({
|
|
22
33
|
relationship_id: z.string(),
|
|
23
34
|
source: RelationshipEndpointSchema,
|
package/docs/support.md
CHANGED
|
@@ -16,7 +16,7 @@ This document defines the supported platform, runtime, persistence, and operatio
|
|
|
16
16
|
|
|
17
17
|
Published v0.12.0 requires Node.js `>=22.13.0`; its immutable matrix targets exact Node.js 22.13.0 and the governed Node.js 24 major. The earlier v0.8.1 Node.js 22.5.0/24 matrix remains historical evidence for those bytes only. A future runtime satisfying an engine range is not automatically a verified release target.
|
|
18
18
|
|
|
19
|
-
The checked-evidence freezer requires GNU coreutils 9.7 `mv` with `--update=none-fail`, `--no-copy`, and `--no-target-directory`.
|
|
19
|
+
The checked-evidence freezer requires GNU coreutils 9.7 `mv` with `--update=none-fail`, `--no-copy`, and `--no-target-directory`. Structural apply and managed setup-file mutation additionally require that same `mv` with `--exchange`, GNU coreutils `ln -L -T`, procfs descriptor paths at `/proc/self/fd`, `O_DIRECTORY`/`O_NOFOLLOW`, and successful owned link/exchange identity probes on each destination parent filesystem before source effects. Missing, denied, or behaviorally incompatible primitives fail closed; there is no rename, copy/delete, or pathname-only fallback. Equivalent semantics have not been verified on other operating systems, architectures, or filesystems.
|
|
20
20
|
|
|
21
21
|
## Local stdio trust boundary
|
|
22
22
|
|
|
@@ -30,7 +30,9 @@ The server does not provide:
|
|
|
30
30
|
- tenant isolation;
|
|
31
31
|
- protection from a malicious process running with the same filesystem authority.
|
|
32
32
|
|
|
33
|
-
Operation locks coordinate cooperating same
|
|
33
|
+
Operation locks coordinate cooperating processes using the same configuration identity; they do not authorize writes against editors, overlapping configurations, network filesystems, continuously mutating writers, or hostile same-user processes. Structural replacement authenticates one exchanged pair at a time, and multi-file apply is sequential rather than globally atomic. Reverse rollback restores only exact owned pairs. Creation is no-clobber, but if a later failure follows its first publication, unlink ownership is not inferred: the destination and hidden stage are preserved and the outcome is `AMBIGUOUS_APPLY`. Deterministic promise barriers prove only the named publication and rollback interleavings, not arbitrary-writer atomicity.
|
|
34
|
+
|
|
35
|
+
Report-set freezer coordination likewise assumes cooperating same-UID processes and cannot defend checked evidence against a malicious process with the same filesystem authority. The freezer guarantees no-replace atomic visibility of the checked directory; it does not claim persistence across sudden power loss because parent-directory `fsync` durability is not established.
|
|
34
36
|
|
|
35
37
|
## Optional supervised compiler worker
|
|
36
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ast-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Structural code MCP server and batch CLI for compact TypeScript/JavaScript reads and hash-bound AST edits.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -60,8 +60,10 @@
|
|
|
60
60
|
"node": ">=22.13.0"
|
|
61
61
|
},
|
|
62
62
|
"resolutions": {
|
|
63
|
-
"
|
|
64
|
-
"
|
|
63
|
+
"fast-uri": "3.1.9",
|
|
64
|
+
"hono": "4.13.13",
|
|
65
|
+
"nanoid": "3.3.18",
|
|
66
|
+
"qs": "6.16.0"
|
|
65
67
|
},
|
|
66
68
|
"scripts": {
|
|
67
69
|
"build": "tsc",
|
|
@@ -98,12 +100,12 @@
|
|
|
98
100
|
"dev": "tsc --watch"
|
|
99
101
|
},
|
|
100
102
|
"dependencies": {
|
|
101
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
103
|
+
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
102
104
|
"@toon-format/toon": "4.1.0",
|
|
103
105
|
"diff": "^9.0.0",
|
|
104
106
|
"jsonc-parser": "^3.3.1",
|
|
105
107
|
"ts-morph": "24.0.0",
|
|
106
|
-
"zod": "^
|
|
108
|
+
"zod": "^4.6.7"
|
|
107
109
|
},
|
|
108
110
|
"devDependencies": {
|
|
109
111
|
"@eslint/js": "^10.0.1",
|
|
@@ -113,8 +115,8 @@
|
|
|
113
115
|
"prettier": "^3.9.6",
|
|
114
116
|
"typescript": "^5.6.0",
|
|
115
117
|
"typescript-eslint": "^8.65.0",
|
|
116
|
-
"vitest": "^4.1.
|
|
118
|
+
"vitest": "^4.1.12",
|
|
117
119
|
"yaml": "^2.9.0"
|
|
118
120
|
},
|
|
119
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "f6e64751398f69eb3f0f1abc808f4221f7d2bc52"
|
|
120
122
|
}
|
|
@@ -29,6 +29,14 @@ Published v0.12.0 requires Node.js `>=22.13.0` and retains immutable release evi
|
|
|
29
29
|
- Nunca reconstruir postimages desde un diff; después del apply, ejecutar el gate canónico del proyecto.
|
|
30
30
|
- Conservar `correlation_id` en errores públicos sin exponer source, paths absolutos, argumentos, environment, cache, stacks ni credenciales.
|
|
31
31
|
|
|
32
|
+
## Impacto y candidatos de test
|
|
33
|
+
|
|
34
|
+
`ast_get_impact` separa dos canales. `coverage` asigna a cada kind/direction/endpoint una de `not_applicable`, `completed`, `unsupported` o `unfinished`; `truncation` y `work` describen límites de recorrido. `incomplete` es true si falla cualquiera. `proven_empty` exige cero edges, cobertura aplicable completa y ningún límite agotado.
|
|
35
|
+
|
|
36
|
+
La selección default conserva los siete kinds. `contains` aplicable es `unsupported`, por lo que el default puede ser semánticamente incompleto sin truncamiento. Calls directas por identificador, `new` y tagged templates pueden ser exactas; property, element, dynamic, unresolved, multiple o external dispatch no generan edges adivinados y dejan esa dirección `unfinished`. No presentar esto como certificación de #219 o #220.
|
|
37
|
+
|
|
38
|
+
`ast_find_test_candidates` fija seis kinds incoming (`reference`, `import`, `export`, `extends`, `implements`, `call`) y excluye `contains`. Solo acepta evidencia fresh/exact/resolved/compiler-authoritative, cobertura completa y trabajo/recorrido sin agotar. Si no, devuelve `INCOMPLETE_EVIDENCE`, no una página vacía. Después de admitir, pagina candidatos ordenados sin partir paths ni ocultar `coverage`/`work`. MCP entrega JSON canónico; TOON de batch debe conservar el mismo significado lógico.
|
|
39
|
+
|
|
32
40
|
## Diagnostic aggregates
|
|
33
41
|
|
|
34
42
|
`ast_get_diagnostics` keeps its existing response shape unless `include_aggregates: true` is requested. Enabled summaries cover the complete normalized snapshot, not only the selected raw page, and cap both code and file groups at 20.
|