@namzu/lsp 0.2.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/src/types.ts ADDED
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Code navigation an agent can trust, which grep is not.
3
+ *
4
+ * The whole code-navigation surface this kernel had was `grep` (regex over
5
+ * file text) and `glob` (filename patterns). An agent asked to find every
6
+ * call site of a function got every textual occurrence — the comment
7
+ * mentioning it, the string literal naming it, the unrelated same-named
8
+ * symbol in another scope — and MISSED the call sites that arrive through a
9
+ * re-export or a destructure. That last half is the one a rename has to get
10
+ * right, and it is exactly the half a regex cannot see.
11
+ *
12
+ * Two operations, deliberately. A provider interface with twenty methods
13
+ * and one implementation is a guess at what a consumer needs; these two are
14
+ * what the failure above actually requires, and the shape is the same one
15
+ * `Sandbox` uses — a host constructs one and hands it over, with no
16
+ * `registerProvider()`-with-discovery indirection in between.
17
+ */
18
+
19
+ /**
20
+ * Re-exported from `@namzu/sdk`, never re-declared.
21
+ *
22
+ * The dependency direction is `sdk ← lsp`, so the kernel owns the shape a
23
+ * tool programs against and this package implements it. A second
24
+ * declaration here would compile — the shapes are structural — and would be
25
+ * a copy that can drift, with the drifted one deciding whether the `lsp`
26
+ * builtin accepts this provider at all.
27
+ */
28
+ export type {
29
+ CodeNavigationProvider,
30
+ CodeNavigationResult,
31
+ HoverResult,
32
+ SourceLocation,
33
+ SymbolLocation,
34
+ SymbolSearchResult,
35
+ } from '@namzu/sdk'