@namzu/lsp 0.3.1 → 0.3.3

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +40 -18
  2. package/README.md +6 -9
  3. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # @namzu/lsp
2
2
 
3
+ ## 0.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 567ada8: Updated package examples and evaluation fixtures for the SDK's `ToolRegistry`
8
+ removal. Browser, computer-use and LSP documentation now show toolsets; the
9
+ evals use `toolsets` when they call the kernel. Provider changes are test
10
+ fixture migrations only, with no provider runtime API change. Consumers that
11
+ pass tools to the SDK should use `toolsets: readonly Toolset[]` and wrap their
12
+ definitions with `toolset(source, definitions)`.
13
+
14
+ ## 0.3.2
15
+
16
+ ### Patch Changes
17
+
18
+ - 8d5223b: Nothing a consumer installs or calls changes, and that is the whole of this
19
+ release. `vitest` moves from `^3.2.6` to `^4.1.11` in the `devDependencies` of
20
+ all nineteen packages that declared it, and `@vitest/coverage-v8` moves with it
21
+ in `@namzu/sdk`. Every occurrence is a devDependency — checked, not assumed —
22
+ so `dependencies`, `peerDependencies`, exports, types, defaults and the wire
23
+ shape are untouched, and the published tarballs differ from the previous
24
+ release only in `package.json#devDependencies`.
25
+
26
+ The reason is a security fix with no 3.x backport. `GHSA-82fw-gwwq-j7x9`
27
+ ("Path Traversal / Arbitrary File Read via `@vitest/mocker` Redirect Mock")
28
+ covers `vitest` and `@vitest/mocker` from `2.1.0` up to `4.1.11`, so `^3.2.6`
29
+ can only be resolved by leaving the 3.x line. `4.1.11` is the first patched
30
+ release and is what the lockfile now resolves for both.
31
+
32
+ What this costs anyone who works on the repository rather than with it: the
33
+ upgrade was not a version bump. Vitest 4 changed test discovery, coverage
34
+ configuration, mock construction and reporter output, and each of those broke
35
+ something here that had to be migrated rather than worked around. Those fixes
36
+ are all under `__tests__/`, `vitest.config.ts` files and `scripts/`, none of
37
+ which is published, which is why this is a patch and not a major.
38
+
39
+ You do not need to do anything. If you pin `vitest` yourself to run this
40
+ project's own suites, note that the config files it ships are now written for
41
+ `>= 4.1.11` and will not run under 3.x.
42
+
3
43
  ## 0.3.1
4
44
 
5
45
  ### Patch Changes
@@ -71,21 +111,3 @@
71
111
  **`RoutingCodeNavigationProvider` maps extension to server**, starting one lazily per language on first use and reusing it. A file whose extension maps to nothing gets `{ kind: 'unsupported' }` naming the extension — not a default server, which would send the file to something that cannot read it and answer nothing, which reads as a symbol with no references. A `symbols` call with no scope asks every configured language, and reports `unsupported` rather than an empty list when every server refused, because "nobody looked" is not "the name does not exist".
72
112
 
73
113
  The `lsp` builtin's input is a discriminated union: position is **required** for `definition`/`references`/`hover` and **absent** for `symbols`. Making it unconditionally optional lets a `definition` with no line silently resolve the top of the file; making it unconditionally required forces a `symbols` call to invent two numbers.
74
-
75
- ## 0.2.0
76
-
77
- ### Minor Changes
78
-
79
- - 9914794: New optional package `@namzu/lsp`: language-server-backed code navigation, so an agent asked for the call sites of a function gets symbol resolution rather than regex matches.
80
-
81
- The whole navigation surface a namzu agent had was `grep` and `glob`. Ask for every call site of `computeTotal` and you get the comment that mentions it, the string literal that names it, and the unrelated same-named function in another scope — and you **miss** the call site that arrives through a re-export or a destructure, which is exactly the one a rename has to get right.
82
-
83
- `StdioCodeNavigationProvider` drives one language server over its stdin and stdout: `Content-Length` framing (not JSON lines — a response carrying source text contains newlines), the `initialize`/`shutdown` handshake, request correlation, `textDocument/definition` and `textDocument/references`.
84
-
85
- **Three answers, not two.** `unsupported` means the server does not implement the operation, so a caller can fall back to `grep` and _say_ the answer is textual; `failed` means something broke and the answer is unknown. Neither is `{ kind: 'locations', locations: [] }`, which means "I looked, and there are none" — the answer a deletion depends on. A provider that answered a missing binary with an empty list would tell an agent a symbol has no callers, and the agent would delete it. So a server that never completes `initialize` produces `failed` naming the binary, within a bounded startup timeout, and the failure is remembered rather than respawning a process per call.
86
-
87
- In `@namzu/sdk`: an `lsp` builtin, `CodeNavigationProvider` on `ToolContext` the way `sandbox` already arrives, and `getCodeNavigationTools(provider)` which returns **an empty array when there is no provider**. The tool is not registered at all in a run that cannot use it — one that is always present and always answers "unavailable" costs a decision on every turn to say nothing, and teaches a model a capability exists when it does not.
88
-
89
- Every path is contained through `resolveWithinReal` before it reaches the server, the same containment `read` and `grep` use. A language server indexes a workspace and will answer about anything it is handed; the boundary is the tool's job.
90
-
91
- `dispose()` sends the shutdown handshake before killing, so a server holding a lock file or mid-write on an index gets to finish, and falls back to `SIGKILL` on a bounded timeout so one that ignores `exit` cannot keep the run alive.
package/README.md CHANGED
@@ -6,9 +6,8 @@ description: >-
6
6
  references, symbols and diagnostics from a real server rather than from
7
7
  grep, with one server per language routed by file extension.
8
8
  tags: [readme, package, lsp, code-navigation]
9
- timestamp: 2026-08-17T00:00:00Z
10
- status: active
11
- diataxis: reference
9
+ status: stable
10
+ generated: { by: human:bahadirarda, at: 2026-08-17T00:00:00Z }
12
11
  -->
13
12
 
14
13
  <div align="center">
@@ -29,7 +28,7 @@ diataxis: reference
29
28
 
30
29
  Code navigation for an agent — definitions, references, symbols and
31
30
  diagnostics — served by a real language server rather than by grep. One
32
- server per language, routed by file extension, disposed with the run.
31
+ server per language, routed by file extension, disposed with the session.
33
32
  If either protocol stream closes while the process remains alive, in-flight
34
33
  and later calls fail immediately and the process remains owned until disposal.
35
34
 
@@ -45,7 +44,7 @@ pnpm add @namzu/sdk @namzu/lsp
45
44
 
46
45
  ```ts
47
46
  import { RoutingCodeNavigationProvider } from '@namzu/lsp'
48
- import { getCodeNavigationTools, ToolRegistry } from '@namzu/sdk'
47
+ import { getCodeNavigationTools, toolset } from '@namzu/sdk'
49
48
 
50
49
  const rootDir = process.cwd()
51
50
 
@@ -56,16 +55,14 @@ const codeNavigation = new RoutingCodeNavigationProvider({
56
55
  ],
57
56
  })
58
57
 
59
- const registry = new ToolRegistry()
60
- for (const tool of getCodeNavigationTools(codeNavigation)) registry.register(tool)
58
+ const tools = toolset('lsp', getCodeNavigationTools(codeNavigation))
61
59
 
62
- // …and when the run is over:
60
+ // …and when the session is over:
63
61
  await codeNavigation.dispose()
64
62
  ```
65
63
 
66
64
  ## Documentation
67
65
 
68
- - [Code navigation — routing, the four operations and containment](https://github.com/cogitave/namzu/blob/main/docs/packages/lsp.md)
69
66
  - [Namzu docs](https://github.com/cogitave/namzu/tree/main/docs)
70
67
 
71
68
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@namzu/lsp",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Language-server-backed code navigation for @namzu/sdk. Resolves definitions and references through a real language server over stdio, so an agent asked for call sites gets symbol resolution rather than regex matches.",
5
5
  "license": "FSL-1.1-MIT",
6
6
  "engines": {
@@ -52,8 +52,8 @@
52
52
  "@biomejs/biome": "^1.9.4",
53
53
  "@types/node": "^22.19.17",
54
54
  "typescript": "^5.5.0",
55
- "vitest": "^3.2.6",
56
- "@namzu/sdk": "^33.0.0"
55
+ "vitest": "^4.1.11",
56
+ "@namzu/sdk": "^48.0.0"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "tsc --build",