semantic-js-mcp 0.8.1 → 0.9.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantic-js-mcp",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "Semantic understanding of JavaScript codebases for AI agents",
5
5
  "author": {
6
6
  "name": "Jonathan Muñoz Lucas"
package/CHANGELOG.md CHANGED
@@ -4,6 +4,31 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.0] - 2026-07-16
8
+
9
+ ### Changed
10
+
11
+ - Make count and audit results compact by default while preserving complete requested reference collections for paged follow-up tools.
12
+ - Centralize concise, tool-specific continuation guidance in the versioned protocol vocabulary.
13
+ - Consolidate server and schema identity under `producer`, and represent document fingerprints as `sha256:<hex>`.
14
+ - Return continuation guidance as exact tool-name lists, expose one reusable reference-set identifier per logical response, and remove page fields derivable from the normalized request and presentation counts.
15
+ - Group verified page locations by source file while preserving explicit ranges, discovery methods, location-based pagination, and evidence accounting.
16
+ - Advance the canonical result schema to version 6 for the compact audit presentation contract.
17
+ - Document migration from schema 5 and reject legacy envelopes in canonical-result validation.
18
+ - Report whether named-symbol filtering selected zero, one, or multiple exact definitions, and recommend only continuation tools supported by the returned evidence.
19
+ - Verify import and usage bindings against `fileHint` during named audits without treating the hinted filename as a declaration.
20
+ - Share concurrent diagnostic acquisition, negotiate provider pull support, and reject evidence when file content changes during acquisition.
21
+ - Report the owning diagnostic provider and document language once per result, with source region and embedded language on each diagnostic when its range establishes them.
22
+ - Order continuation tools so position-based disambiguation and unresolved-candidate inspection precede broader follow-up pages when those uncertainties are present.
23
+
24
+ ### Added
25
+
26
+ - Add deterministic release verification, isolated postpublication package verification, and externally configured repository-matrix commands.
27
+ - Reject repository-matrix diagnostic paths whose canonical target escapes the configured repository root.
28
+ - Add model-independent fixtures for compact-result continuation and coverage decisions.
29
+ - Cover named symbol discovery and audits for standalone JavaScript modules at workspace-root and nested source locations.
30
+ - Add npm keywords for MCP, language-server, JavaScript, and semantic-navigation discovery.
31
+
7
32
  ## [0.8.1] - 2026-07-15
8
33
 
9
34
  ### Fixed
package/CONTRIBUTING.md CHANGED
@@ -19,13 +19,17 @@ npm run doctor
19
19
  npm run smoke:ci
20
20
  npm run smoke
21
21
  npm run smoke:vue
22
+ npm run smoke:release
23
+ npm run smoke:evaluation
24
+ npm run smoke:matrix
25
+ npm run smoke:distribution
22
26
  ```
23
27
 
24
28
  Run `npm run benchmark` for changes that affect repository scanning, reference verification, caching, lifecycle, or memory.
25
29
 
26
30
  ## Source Of Truth
27
31
 
28
- - `protocol.mjs` owns public literals, server identity, schema identity, runtime components, and defaults.
32
+ - `protocol.mjs` owns public literals, producer identity, schema identity, runtime components, and defaults.
29
33
  - `.prettierrc.json` and the `format` scripts define the public source style.
30
34
  - `skills/semantic-navigation/references/protocol-literals.md` is generated; update it with `node scripts/generate-protocol-reference.mjs`.
31
35
  - `README.md` documents implemented behavior and known limitations.
@@ -34,6 +38,7 @@ Run `npm run benchmark` for changes that affect repository scanning, reference v
34
38
  ## Change Expectations
35
39
 
36
40
  - Centralize public literals in `protocol.mjs`.
41
+ - Keep release, host, fixture, and CI-only literals in their focused modules rather than expanding the public protocol vocabulary.
37
42
  - Run `npm run format` after changing public source or documentation.
38
43
  - Regenerate protocol documentation instead of editing it directly.
39
44
  - Add isolated fixtures for positive, partial, and failed evidence.
@@ -51,11 +56,22 @@ npm run check:runtime
51
56
  npm run smoke:ci
52
57
  npm run smoke
53
58
  npm run smoke:vue
59
+ npm run smoke:release
60
+ npm run smoke:evaluation
61
+ npm run smoke:matrix
54
62
  npm run smoke:distribution
55
63
  ```
56
64
 
57
65
  Also run `npm run benchmark` when collection cost or memory could change. Run `npm run doctor` when changing runtime resolution, provider startup, the CLI, or diagnostic trust. New behavior should use generic fixtures and cover complete, partial, limited, failed, stale, or untrusted outcomes as applicable.
58
66
 
67
+ `npm run release:verify` executes the complete local release gate and reports every check in one machine-readable result. It does not publish, tag, or modify an installed plugin.
68
+
69
+ Use `npm run verify:published -- <version>` after publishing npm and the matching `v<version>` repository tag. It queries that exact registry version, installs it with isolated temporary state, verifies the installed executable, runs its doctor, then installs the plugin from the tag-pinned Codex marketplace in a temporary `CODEX_HOME`. Registry or network unavailability returns `blocked` rather than passing or failing the package.
70
+
71
+ Use `npm run validate:repositories -- <configuration.json|yaml>` for authorized real-repository observations. Configuration stays external to the project and contains repository entries with an `id`, absolute `root`, and `probes`. Supported probe kinds are `named-symbol` with `symbol` and optional `fileHint`, and `diagnostics` with a repository-relative `file`. The runner reports tool failures, incomplete evidence, untrusted diagnostics, and unavailable repositories separately.
72
+
73
+ `npm run evaluate:agent` prints model-independent compact-result cases. An answer file can be graded with `npm run evaluate:agent -- --answers <file>`; hosted or local model execution remains optional and outside the fixture contract.
74
+
59
75
  ## Changelog And Versioning
60
76
 
61
77
  - Add user-visible behavior under `Unreleased` while developing.
package/README.md CHANGED
@@ -6,6 +6,8 @@ Coding agents can generate code quickly, but reliable engineering requires more
6
6
 
7
7
  Semantic JS MCP gives coding agents structured, read-only semantic context so they can navigate, review, and change code with explicit uncertainty.
8
8
 
9
+ Its scope is intentionally narrow: it strengthens an agent's understanding of symbol identity, types, references, diagnostics, and evidence coverage. It does not replace architectural reasoning, source inspection, dependency analysis, tests, or runtime observation.
10
+
9
11
  **Better agents begin with better evidence.**
10
12
 
11
13
  It supports the JavaScript ecosystem, including TypeScript, JavaScript, TSX, JSX, Node module variants, and Vue projects. Language servers provide the underlying semantic data, which the server turns into structured results designed for coding agents.
@@ -14,7 +16,7 @@ For each file, it identifies the owning workspace and uses the corresponding Typ
14
16
 
15
17
  ## Project Status
16
18
 
17
- Version `0.8.1` is the current release. APIs and result contracts may evolve while the project remains on the `0.x` release line. See the [roadmap](ROADMAP.md) for areas under consideration.
19
+ Version `0.9.0` is the current release. APIs and result contracts may evolve while the project remains on the `0.x` release line. See the [roadmap](ROADMAP.md) for areas under consideration.
18
20
 
19
21
  ## Installation
20
22
 
@@ -108,30 +110,33 @@ Tools are ordered from smaller responses to deeper evidence:
108
110
  | `lsp_hover` | Inferred type and documentation | `lsp_definition`, `lsp_audit_symbol` |
109
111
  | `lsp_diagnostics` | Focused diagnostics for one file | `lsp_definition`, `lsp_hover` |
110
112
  | `lsp_count_text_matches` | Exact identifier text count without semantic verification | `lsp_count_named_symbol`, `lsp_audit_named_symbol` |
111
- | `lsp_count_named_symbol` | Definition and reference counts by name | `lsp_audit_named_symbol`, `lsp_references` |
112
- | `lsp_count_references` | Reference counts at a position | `lsp_audit_symbol`, `lsp_references` |
113
- | `lsp_audit_named_symbol` | Composed summary by symbol name | `lsp_references` |
114
- | `lsp_audit_symbol` | Composed summary at a position | `lsp_references` |
113
+ | `lsp_count_named_symbol` | Definition and reference counts by name | `lsp_audit_named_symbol`, `lsp_reference_page` |
114
+ | `lsp_count_references` | Reference counts at a position | `lsp_audit_symbol`, `lsp_reference_page` |
115
+ | `lsp_audit_named_symbol` | Compact composed summary by symbol name | `lsp_reference_page` |
116
+ | `lsp_audit_symbol` | Compact composed summary at a position | `lsp_reference_page` |
115
117
  | `lsp_references` | First page of verified locations | `lsp_reference_page` |
116
118
  | `lsp_reference_page` | A later page from the same collection | `lsp_definition` |
117
119
  | `lsp_unresolved_reference_page` | Unresolved candidates with locations and literal reasons | `lsp_definition` |
118
120
 
119
- Composite audits reuse the same internal definition, hover, and reference primitives as the narrow tools. Compatible count, audit, and reference calls reuse a short-lived reference set.
121
+ Composite audits reuse the same internal definition, hover, and reference primitives as the narrow tools. Their default response contains definition identity, signature, reference and text-match counts, unresolved count, files affected, collection status, and freshness. Use `lsp_reference_page` with a returned `referenceSetId` for verified locations and detailed collection evidence, or `lsp_unresolved_reference_page` for unresolved candidates. Use `lsp_references` when starting from an exact source position without an existing reference set.
122
+
123
+ Compatible count, audit, and reference calls reuse a short-lived reference set. Compact presentation changes response size, not collection scope.
120
124
 
121
125
  ## Result Contract
122
126
 
123
127
  Every successful result contains:
124
128
 
125
- - `server`: the literal semantic-js-mcp server name and version that produced the response.
126
- - `resultSchema`: the literal canonical result schema name and version.
129
+ - `producer`: the literal semantic-js-mcp name, server version, and result-schema version that produced the response.
127
130
  - `request`: normalized inputs and explicit limit interpretation.
128
131
  - `result`: evidence produced by the tool.
129
132
  - `collection`: how evidence collection completed.
130
133
  - `presentation`: how much collected evidence appears in this response.
131
- - `continueWith`: exact MCP tool names that can add the next kind of evidence.
134
+ - `continueWith`: a list of exact MCP tool names that can add the next kind of evidence.
132
135
 
133
136
  `structuredContent` is the canonical JSON object. The text content is YAML generated from that same object and parses back to the same data.
134
137
 
138
+ Consumers upgrading from result schema 5 should follow the [schema migration guide](docs/result-schema-migration.md).
139
+
135
140
  ### Collection status
136
141
 
137
142
  - `complete`: the requested collection scope completed and every discovered item was classified.
@@ -139,19 +144,15 @@ Every successful result contains:
139
144
  - `partial`: collection completed with explicitly reported items whose definition or owning file could not be resolved.
140
145
  - `failed`: the tool call failed and the error object explains why.
141
146
 
142
- Collection and presentation are independent. A complete collection may use `presentation.mode: page`, `count-only`, `summary-by-file`, or `subset` without weakening its counts.
147
+ Collection and presentation are independent. A complete collection may use `presentation.mode: compact-summary`, `page`, `count-only`, or `subset` without weakening its counts. Audits use `compact-summary` by default and retain their full reference set for focused follow-up calls.
143
148
 
144
149
  For reference results, `includeDeclaration: false` excludes locations that resolve to the requested declaration. It never excludes the source position merely because that position initiated the query. The reported invariant is `verifiedTotal = foundByOwningWorkspaceLanguageServer + verifiedFromOtherWorkspaces` after declaration filtering and deduplication.
145
150
 
146
- ### Vue template definitions
147
-
148
- Definition lookup uses the Vue language server and TypeScript server first. If both leave a Vue template tag unresolved, the server parses the SFC and follows only a matching local import from `<script>` or `<script setup>`. A successful fallback reports `resolutionMethod: vue-template-import-binding-definition`. This proves an imported component binding; it does not infer global component registration or filename-based identity.
149
-
150
- The Vue parser and TypeScript AST dependencies are loaded lazily only when this fallback is needed.
151
+ Reference pages group the locations returned in that page under `referenceGroups` by their exact source `file`. Each location keeps its explicit `range` and `discoveryMethod`, while `locationsAvailable` and `locationsReturned` continue to count locations rather than file groups. Pagination selects locations before grouping, so grouping does not change page membership or collection status. File groups follow first appearance in the page, and locations preserve their relative order within each file; cross-file interleaving is not part of the reference contract.
151
152
 
152
- ### Signature source
153
+ Named counts and audits report `definitionSelectionStatus` as `no-definition-selected`, `one-definition-selected`, or `multiple-definitions-selected`. This status describes exact declarations remaining after `fileHint` filtering, before any `maxDefinitions` analysis limit. When selection is empty or ambiguous, `continueWith` recommends structural or position-based tools. It recommends `lsp_reference_page` only when the response contains a reusable reference set.
153
154
 
154
- Position audits first request hover information at the query position. If that position has a resolved definition but no hover information, the audit requests hover at the resolved declaration. `signatureSource` reports `query-position-hover`, `resolved-definition-hover`, or `not-reported`; `signatureDefinition` identifies the declaration used by the fallback.
155
+ When `fileHint` selects no declaration, a named audit can verify whether source bindings resolve to the hinted file while keeping declaration identity and uncertainty explicit.
155
156
 
156
157
  ### Limits
157
158
 
@@ -162,30 +163,15 @@ Collection limits accept positive integers only:
162
163
 
163
164
  Omitting `maxCandidates` or `maxDefinitions` requests unlimited collection. `pageSize` and `maxResults` only control returned items for tools that expose them as presentation parameters.
164
165
 
165
- ### Text-match accounting
166
-
167
- Repository verification reports:
168
-
169
- - `matchesFound`
170
- - `matchesChecked`
171
- - `matchesToRequestedSymbol`
172
- - `matchesToDifferentSymbols`
173
- - `matchesWhoseDefinitionCouldNotBeResolved`
174
- - `accountingStatus: complete | incomplete`
175
-
176
- `accountingStatus: complete` means every discovered text match appears in exactly one classification. Unresolved matches remain explicit and make semantic collection `partial`.
177
-
178
- Count and audit responses expose the `referenceSetId` and unresolved-candidate count. Use `lsp_unresolved_reference_page` to inspect those candidates without inflating every summary. The server also queries tsserver `projectInfo` for unresolved candidates and reports whether the file belongs to a configured or inferred TypeScript project. Reasons describe only observed behavior; they do not speculate that an alias caused a failure.
179
-
180
166
  ### Freshness
181
167
 
182
- Reusable reference sets store SHA-256 fingerprints for the source file, native reference files, every cross-workspace candidate file, and the relevant `package.json`, `tsconfig.json`, or `jsconfig.json` files. They also store a repository source-inventory fingerprint built from every relevant path, file size, and high-resolution modification time. Reuse and pagination verify both layers, so new, deleted, renamed, or normally modified source files invalidate repository-wide completeness. Changed evidence produces `REFERENCE_SET_CONTENT_CHANGED` and requires a new `lsp_references` collection. Expired or evicted sets produce `REFERENCE_SET_NOT_FOUND_OR_EXPIRED`.
168
+ Reusable reference sets verify participating file content and the repository
169
+ source inventory before returning another page. Added, removed, renamed, or
170
+ changed sources invalidate stale evidence instead of silently reusing it.
183
171
 
184
- The inventory is sampled before and after collection. If repository sources change during collection, the server retries once and then returns `REPOSITORY_CHANGED_DURING_COLLECTION` instead of publishing an unstable result.
185
-
186
- Diagnostics clear their cache on `didChange` and report the analyzed document version and SHA-256 content fingerprint. Only a language-server report for that exact document version appears under `diagnosticsForCurrentDocument`. Otherwise that field is `null`, `evidence.status` is `untrusted`, and any unconfirmed report is isolated under `unconfirmedDiagnosticReport`. Untrusted diagnostics always produce a partial collection.
187
-
188
- Diagnostic severities are preserved literally. If a language server omits severity, the result reports `not-reported`; it is not silently treated as information, warning, or error.
172
+ Diagnostics are current only when the owning provider confirms the analyzed
173
+ document snapshot. Unconfirmed reports remain isolated and explicitly
174
+ `untrusted`; an empty unconfirmed report is never presented as a clean file.
189
175
 
190
176
  ### CI policy adapter
191
177
 
@@ -196,42 +182,21 @@ MCP tools report evidence; they do not decide whether a code change passes. `npm
196
182
  - `untrusted`, exit `2`: collection is partial or limited.
197
183
  - `blocked`, exit `3`: the tool failed or the input is not a semantic-js-mcp result.
198
184
 
199
- Pass `--yaml` after the input path for a YAML representation. The adapter accepts canonical JSON or YAML, validates the server and result-schema identity plus public tool and presentation literals, and never converts incomplete evidence into a pass.
200
-
201
- ### Installation doctor
202
-
203
- `semantic-js-mcp doctor` returns a structured installation report with the same deterministic status vocabulary and exit codes as the CI adapter:
204
-
205
- - `pass`, exit `0`: every installation and semantic fixture check passed;
206
- - `fail`, exit `1`: the server ran, but a functional check returned the wrong result;
207
- - `untrusted`, exit `2`: runtime checks passed, but a provider did not confirm current diagnostic evidence;
208
- - `blocked`, exit `3`: a runtime requirement, provider component, or MCP startup step was unavailable.
209
-
210
- Use `semantic-js-mcp doctor --yaml` for a YAML representation. An `untrusted` result is not converted to a package failure by the distribution smoke test, but the reason remains explicit in the report.
185
+ Pass `--yaml` after the input path for a YAML representation. The adapter accepts canonical JSON or YAML, validates the producer and result-schema version plus public tool and presentation literals, and never converts incomplete evidence into a pass.
211
186
 
212
187
  ### Cost visibility
213
188
 
214
- `lsp_count_text_matches` scans repository text without issuing per-match semantic requests. Use it to measure common identifiers before requesting verified counts or audits. Semantic collections preserve omitted limits as unlimited and report text-search time, semantic-verification time, semantic request count, and maximum concurrency. There is no hidden candidate cap.
215
-
216
- The bundled Codex MCP configuration allows up to 300 seconds for one tool call. Reaching a client or language-server timeout returns a failed call; it never changes collection scope or reports a timed-out collection as complete.
189
+ `lsp_count_text_matches` measures a common identifier before semantic
190
+ verification. Compact tools omit operational metrics; detailed reference calls
191
+ retain timing, semantic request, concurrency, and memory observations. The
192
+ server applies no hidden candidate cap.
217
193
 
218
194
  ## Memory Management
219
195
 
220
- Language-server clients and reusable reference sets are released automatically using idle timeout, TTL, and LRU policies. These policies affect reuse only; they do not cap a collection being computed.
221
-
222
- Environment variables:
223
-
224
- - `SEMANTIC_JS_MCP_CLIENT_IDLE_TIMEOUT_MS` default `60000`
225
- - `SEMANTIC_JS_MCP_CLIENT_MINIMUM_EVICTION_AGE_MS` default `15000`
226
- - `SEMANTIC_JS_MCP_MAXIMUM_ACTIVE_CLIENTS` default `4`
227
- - `SEMANTIC_JS_MCP_REFERENCE_SET_TTL_MS` default `300000`
228
- - `SEMANTIC_JS_MCP_MAXIMUM_REFERENCE_SETS` default `12`
229
- - `SEMANTIC_JS_MCP_MAXIMUM_CHANGED_REFERENCE_SET_MARKERS` default `24`
230
- - `SEMANTIC_JS_MCP_MAXIMUM_CACHED_REFERENCE_LOCATIONS` default `50000`
231
- - `SEMANTIC_JS_MCP_DEFAULT_REFERENCE_PAGE_SIZE` default `100`
232
- - `SEMANTIC_JS_MCP_CROSS_WORKSPACE_CONCURRENCY` default `6`
233
-
234
- A single reference collection may exceed the cache-location budget so it can still be paged. Older collections are evicted first.
196
+ Language-server clients and reusable reference sets use idle timeout, TTL, and
197
+ LRU policies. These policies govern reuse; they never impose a hidden limit on
198
+ the collection in progress. Configuration literals and defaults are listed in
199
+ the generated [protocol reference](skills/semantic-navigation/references/protocol-literals.md).
235
200
 
236
201
  ## Verification
237
202
 
package/ROADMAP.md CHANGED
@@ -23,7 +23,7 @@ Semantic JS MCP is under active development. This roadmap outlines areas of inve
23
23
  ## Agent-Facing Results
24
24
 
25
25
  - Keep result vocabulary literal, finite, and versioned.
26
- - Improve compact presentation without hiding collection scope or unresolved evidence.
26
+ - Measure compact audit summaries against large real-world symbols and smaller models without hiding collection scope or unresolved evidence.
27
27
  - Expand examples for combining count, audit, reference, diagnostic, text-search, source-inspection, and test evidence.
28
28
 
29
29
  ## Distribution
@@ -2,30 +2,23 @@
2
2
 
3
3
  This document records accepted product boundaries. These decisions may be revised through an explicit change that documents the reason and migration impact.
4
4
 
5
- ## DEC-001: Independent MCPs By Semantic Domain
6
-
7
- Status: accepted
5
+ ## Independent MCPs By Semantic Domain
8
6
 
9
7
  Semantic support for JavaScript, CSS, PHP, and other domains belongs in independent projects with separate dependencies, processes, releases, installation, and lifecycle management.
10
8
 
11
9
  This project is `semantic-js-mcp`; it does not load or bundle semantic providers for other domains.
12
10
 
13
- ## DEC-002: Composition Belongs To The Consumer
14
-
15
- Status: accepted
11
+ ## Composition Belongs To The Consumer
16
12
 
17
13
  One MCP does not call another MCP. A model, skill, CI adapter, or other consumer decides whether evidence from multiple semantic domains is needed.
18
14
 
19
15
  This avoids runtime coupling, chained failures, implicit configuration, and assumptions that another product exists.
20
16
 
21
- ## DEC-003: Common Representation, Domain-Specific Evidence
22
-
23
- Status: accepted
17
+ ## Common Representation, Domain-Specific Evidence
24
18
 
25
19
  Related semantic MCPs should use a compatible evidence envelope when practical:
26
20
 
27
- - server identity;
28
- - result-schema identity;
21
+ - producer identity and result-schema version;
29
22
  - tool and normalized request;
30
23
  - result;
31
24
  - collection status;
@@ -34,23 +27,27 @@ Related semantic MCPs should use a compatible evidence envelope when practical:
34
27
 
35
28
  Each domain owns the vocabulary inside its result. A CSS class relationship is not represented as a JavaScript LSP reference.
36
29
 
37
- ## DEC-004: Continuations Stay Inside One MCP
38
-
39
- Status: accepted
30
+ ## Continuations Stay Inside One MCP
40
31
 
41
32
  `continueWith` names tools from the server that produced the response. It does not recommend tools from another MCP. Cross-product guidance belongs in consumer documentation or skills.
42
33
 
43
- ## DEC-005: Narrow And Composed Tools Coexist
44
-
45
- Status: accepted
34
+ ## Narrow And Composed Tools Coexist
46
35
 
47
36
  Narrow tools provide one focused fact with a small response. Composed audits reuse the same internal primitives to reduce tool calls for consumers that can use a larger evidence summary.
48
37
 
49
38
  Composed tools do not remove access to narrow tools and do not weaken collection accounting.
50
39
 
51
- ## DEC-006: Preserve Provider-Native Embedded Evidence
40
+ ## Diagnostics Require Current Snapshot Evidence
52
41
 
53
- Status: accepted
42
+ The server uses advertised diagnostic-pull capability when available and push
43
+ notifications otherwise. Concurrent requests for the same document snapshot
44
+ share one acquisition. A version match or completed pull request is not enough
45
+ when the file content changes before the result is returned.
46
+
47
+ Diagnostics that cannot be correlated to the current document remain
48
+ explicitly untrusted.
49
+
50
+ ## Preserve Provider-Native Embedded Evidence
54
51
 
55
52
  The JavaScript ecosystem includes mixed-language documents. When the owning provider reports diagnostics for a Vue template or embedded CSS, SCSS, or Less block, semantic-js-mcp preserves that evidence instead of filtering it according to another provider's domain.
56
53
 
@@ -63,10 +60,26 @@ Where it can be determined safely, diagnostic evidence should identify:
63
60
 
64
61
  Unknown provenance remains explicit. Provider-native style diagnostics do not imply complete CSS graph analysis.
65
62
 
66
- ## DEC-007: Extract Shared Code Only After A Second Implementation
67
-
68
- Status: accepted
63
+ ## Extract Shared Code Only After A Second Implementation
69
64
 
70
65
  The project may document transferable concepts, but it will not create a shared runtime package or universal provider framework before a second semantic MCP demonstrates concrete duplication.
71
66
 
72
67
  Compatibility should begin with result concepts and conformance fixtures, not premature runtime coupling.
68
+
69
+ ## Compact Summaries Preserve Complete Collections
70
+
71
+ Count and audit tools return the smallest summary that preserves symbol identity, signature, reference and text-match accounting, unresolved evidence, collection status, and freshness. They do not include per-file reference groups, locations, performance, or memory observations by default.
72
+
73
+ The complete requested reference set remains available through `lsp_reference_page` and `lsp_unresolved_reference_page` using the returned `referenceSetId`. `lsp_references` creates or reuses a set when the consumer starts from an exact source position.
74
+
75
+ This keeps model context proportional to the question without making a compact response look more complete than its underlying collection. Presentation size never changes `collection.status`.
76
+
77
+ Detailed verified locations may be grouped by their exact source file because the file is a shared property of every location in that group. Pagination and counts remain location-based, and each location keeps its explicit range and discovery method. Reference locations have no cross-file ordering contract. Status, freshness, unresolved candidates, and unlike evidence are not grouped merely to shorten output.
78
+
79
+ ## Named Selection Reports Ambiguity Without Inferring Identity
80
+
81
+ Named-symbol tools report whether exact declaration filtering selected zero, one, or multiple definitions. A `fileHint` narrows declarations already reported by the owning provider; it does not turn a matching filename, Vue component name, import alias, or test double into declaration evidence.
82
+
83
+ When selection is empty or ambiguous, continuation guidance points consumers toward structural or position-based tools. Reference-page guidance appears only when the response contains a reusable reference set. This keeps ambiguity actionable without guessing which homonymous symbol the consumer intended.
84
+
85
+ A named audit may separately verify that an exact text occurrence resolves to a `fileHint` target. This binding evidence retains its source position, target definitions, resolution method, complete classification counts, and unresolved accounting. It does not promote the target filename or local alias into a named declaration, and the lighter count tool does not perform these per-match definition requests.
@@ -52,3 +52,14 @@ npm run smoke:distribution
52
52
  ```
53
53
 
54
54
  Run `npm run doctor` separately when the structured installation evidence is part of the review. Exit `2` is an explicit untrusted diagnostic result and must not be described as a clean semantic pass.
55
+
56
+ ## Release Verification
57
+
58
+ ```bash
59
+ npm run release:verify
60
+ npm run verify:published -- <version>
61
+ ```
62
+
63
+ The local release gate runs every configured source, runtime, semantic, evaluation, distribution, and benchmark check and reports all failures instead of stopping at the first one. It performs no publication or installed-plugin mutation.
64
+
65
+ Postpublication verification requires an explicit version and the matching `v<version>` repository tag. It queries that immutable registry version, installs it with a fresh temporary npm cache and consumer project, verifies the installed executable and manifest, then runs the installed doctor to cover MCP startup, tool discovery, TypeScript evidence, and Vue navigation. It also installs the plugin from the tag-pinned marketplace inside a temporary `CODEX_HOME` and verifies the enabled plugin version. Temporary state is removed afterward. An unavailable registry, marketplace, or network is reported as `blocked`.
@@ -0,0 +1,56 @@
1
+ # Result Schema Migration
2
+
3
+ Semantic JS MCP increments `producer.resultSchemaVersion` when a tool-result
4
+ shape changes incompatibly. Consumers should validate this value before parsing
5
+ tool-specific evidence.
6
+
7
+ ## Schema 6
8
+
9
+ Schema 6 replaces representational duplication with a compact response while
10
+ preserving collection scope and reusable evidence.
11
+
12
+ | Schema 5 | Schema 6 |
13
+ | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
14
+ | `server` and `resultSchema` objects | one `producer` object with `name`, `version`, and `resultSchemaVersion` |
15
+ | `continueWith` objects containing `tool` and `provides` | a list of exact tool names |
16
+ | `presentation.mode: summary-by-file` for audits | `presentation.mode: compact-summary` |
17
+ | per-file locations and operational metrics in count and audit summaries | `filesContainingReferences` plus a reusable `referenceSetId` |
18
+ | flat `result.locations` in reference pages | `result.referenceGroups`, grouped by exact source file |
19
+ | repeated `referenceSetId` values across result sections | one identifier in the initial count, audit, or reference result |
20
+ | diagnostic algorithm and hash in separate fields | `contentFingerprint: sha256:<hex>` |
21
+ | page offsets, requested page size, and derivable subset flags in presentation | normalized request values, returned counts, and `nextCursor` |
22
+
23
+ Use `lsp_reference_page` with a count or audit `referenceSetId` to retrieve
24
+ verified locations. Use `lsp_references` when starting from an exact source
25
+ position without an existing reference set.
26
+
27
+ Named counts and audits also report `definitionSelectionStatus`. Continuation
28
+ lists include `lsp_reference_page` only when at least one selected definition
29
+ produced a reusable reference set. Empty or multiple selection recommends
30
+ structural or position-based navigation instead of implying that a filename or
31
+ common symbol name established identity.
32
+
33
+ When `fileHint` selects no exact declaration, a named audit may additionally
34
+ return `fileHintResolution`. Its counts classify exact text matches by whether
35
+ their definitions resolve to the hinted path, elsewhere, or not at all. A
36
+ reported `sourcePositionForAudit` is one verified follow-up position and does
37
+ not change `definitionSelectionStatus`.
38
+
39
+ The collection contract is unchanged: omitted collection limits remain
40
+ unlimited, pagination affects presentation only, and unresolved candidates keep
41
+ the collection partial. Schema 6 does not convert incomplete evidence into a
42
+ complete result.
43
+
44
+ The CI adapter accepts only its canonical schema version. A schema 5 result is
45
+ reported as `blocked` rather than being interpreted through schema 6 rules.
46
+
47
+ Schema 6 diagnostic evidence may use
48
+ `current-document-snapshot-confirmed` for a pull result or
49
+ `document-content-changed-during-diagnostic-acquisition` when the source no
50
+ longer matches the analyzed snapshot.
51
+
52
+ Diagnostic results include one `provenance` object with `provider` and
53
+ `documentLanguage`. Each diagnostic item includes `embeddedRegion` and
54
+ `embeddedLanguage`. The finite values are generated in the protocol reference;
55
+ `unknown` means the source range or declared language did not establish a
56
+ supported classification.
package/package.json CHANGED
@@ -1,7 +1,19 @@
1
1
  {
2
2
  "name": "semantic-js-mcp",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "Semantic understanding of JavaScript codebases for AI agents",
5
+ "keywords": [
6
+ "mcp",
7
+ "model-context-protocol",
8
+ "lsp",
9
+ "language-server-protocol",
10
+ "javascript",
11
+ "typescript",
12
+ "vue",
13
+ "semantic-analysis",
14
+ "code-navigation",
15
+ "ai-agents"
16
+ ],
5
17
  "author": {
6
18
  "name": "Jonathan Muñoz Lucas",
7
19
  "email": "git@jonathanmunoz.dev",
@@ -32,7 +44,7 @@
32
44
  "node": ">=22"
33
45
  },
34
46
  "scripts": {
35
- "check": "npm run format:check && node --check protocol.mjs && node --check server.mjs && node --check cli.mjs && node --check lib/runtime.mjs && node --check lib/doctor.mjs && node --check scripts/generate-protocol-reference.mjs && node --check scripts/check-protocol-literals.mjs && node --check scripts/check-runtime.mjs && node --check scripts/semantic-js-mcp-ci.mjs && node --check scripts/ci-smoke.mjs && node --check scripts/smoke.mjs && node --check scripts/vue-smoke.mjs && node --check scripts/benchmark.mjs && node --check scripts/distribution-policy.mjs && node --check scripts/distribution-smoke.mjs && node scripts/generate-protocol-reference.mjs --check && node scripts/check-protocol-literals.mjs",
47
+ "check": "npm run format:check && node --check protocol.mjs && node --check server.mjs && node --check cli.mjs && node --check lib/runtime.mjs && node --check lib/doctor.mjs && node --check scripts/generate-protocol-reference.mjs && node --check scripts/check-protocol-literals.mjs && node --check scripts/check-runtime.mjs && node --check scripts/semantic-js-mcp-ci.mjs && node --check scripts/ci-smoke.mjs && node --check scripts/smoke.mjs && node --check scripts/vue-smoke.mjs && node --check scripts/benchmark.mjs && node --check scripts/distribution-policy.mjs && node --check scripts/distribution-smoke.mjs && node --check scripts/release-contract.mjs && node --check scripts/release-verify.mjs && node --check scripts/release-smoke.mjs && node --check scripts/postpublication-smoke.mjs && node --check scripts/codex-plugin-verification.mjs && node --check scripts/agent-evaluation-contract.mjs && node --check scripts/agent-evaluation.mjs && node --check scripts/agent-evaluation-smoke.mjs && node --check scripts/repository-matrix-contract.mjs && node --check scripts/repository-matrix.mjs && node --check scripts/repository-matrix-smoke.mjs && node scripts/generate-protocol-reference.mjs --check && node scripts/check-protocol-literals.mjs",
36
48
  "check:runtime": "node scripts/check-runtime.mjs",
37
49
  "doctor": "node cli.mjs doctor",
38
50
  "ci:evaluate": "node scripts/semantic-js-mcp-ci.mjs",
@@ -40,6 +52,13 @@
40
52
  "smoke:ci": "node scripts/ci-smoke.mjs",
41
53
  "smoke:vue": "node scripts/vue-smoke.mjs",
42
54
  "smoke:distribution": "node scripts/distribution-smoke.mjs",
55
+ "smoke:release": "node scripts/release-smoke.mjs",
56
+ "smoke:evaluation": "node scripts/agent-evaluation-smoke.mjs",
57
+ "smoke:matrix": "node scripts/repository-matrix-smoke.mjs",
58
+ "evaluate:agent": "node scripts/agent-evaluation.mjs",
59
+ "validate:repositories": "node scripts/repository-matrix.mjs",
60
+ "release:verify": "node scripts/release-verify.mjs",
61
+ "verify:published": "node scripts/postpublication-smoke.mjs",
43
62
  "benchmark": "node scripts/benchmark.mjs",
44
63
  "format": "prettier --write \".codex-plugin/**/*.json\" \".agents/plugins/marketplace.json\" \".mcp.json\" \".prettierrc.json\" \"package.json\" \"package-lock.json\" \"CHANGELOG.md\" \"CONTRIBUTING.md\" \"README.md\" \"ROADMAP.md\" \"SECURITY.md\" \"*.mjs\" \"docs/**/*.md\" \"lib/**/*.mjs\" \"scripts/**/*.mjs\" \"skills/**/SKILL.md\" \"skills/**/agents/*.yaml\"",
45
64
  "format:check": "prettier --check \".codex-plugin/**/*.json\" \".agents/plugins/marketplace.json\" \".mcp.json\" \".prettierrc.json\" \"package.json\" \"package-lock.json\" \"CHANGELOG.md\" \"CONTRIBUTING.md\" \"README.md\" \"ROADMAP.md\" \"SECURITY.md\" \"*.mjs\" \"docs/**/*.md\" \"lib/**/*.mjs\" \"scripts/**/*.mjs\" \"skills/**/SKILL.md\" \"skills/**/agents/*.yaml\""