@askdkc/dsh-lsp-server 0.1.11 → 0.1.13

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 (36) hide show
  1. package/README.md +37 -0
  2. package/docs/usage.md +2 -0
  3. package/lib/code-intelligence-DvhxPnpu.js +890 -0
  4. package/lib/code-intelligence-DvhxPnpu.js.map +1 -0
  5. package/lib/code-intelligence-contracts-CWXTofdI.js +8 -0
  6. package/lib/code-intelligence-contracts-CWXTofdI.js.map +1 -0
  7. package/lib/code-intelligence-contracts.js +3 -0
  8. package/lib/code-intelligence.js +5 -0
  9. package/lib/errors-DtyWAUi0.js.map +1 -1
  10. package/lib/extra-tool.js +136 -8
  11. package/lib/extra-tool.js.map +1 -1
  12. package/lib/launch-ByUvgkVv.js.map +1 -1
  13. package/lib/provider.js +653 -40
  14. package/lib/provider.js.map +1 -1
  15. package/lib/structure/grammars/manifest.json +40 -0
  16. package/lib/structure/grammars/tree-sitter-javascript.wasm +0 -0
  17. package/lib/structure/grammars/tree-sitter-tsx.wasm +0 -0
  18. package/lib/structure/grammars/tree-sitter-typescript.wasm +0 -0
  19. package/lib/structure/parser-worker.mjs +200 -0
  20. package/lib/types/code-intelligence-contracts.d.ts +113 -0
  21. package/lib/types/code-intelligence.d.ts +5 -0
  22. package/lib/types/errors.d.ts +1 -1
  23. package/lib/types/extra-tool.d.ts +2 -1
  24. package/lib/types/provider.d.ts +4 -0
  25. package/lib/types/routing/classifier.d.ts +2 -0
  26. package/lib/types/runtime/webstack-runtime.d.ts +13 -1
  27. package/lib/types/service.d.ts +23 -0
  28. package/lib/types/structure/code-intelligence.d.ts +23 -0
  29. package/lib/types/structure/coordinates.d.ts +14 -0
  30. package/lib/types/structure/engine.d.ts +49 -0
  31. package/lib/types/structure/protocol.d.ts +19 -0
  32. package/lib/types/structure/queries.d.ts +4 -0
  33. package/lib/types/structure/snapshots.d.ts +37 -0
  34. package/lib/types/structure/types.d.ts +147 -0
  35. package/lib/types/structure/worker-pool.d.ts +66 -0
  36. package/package.json +17 -4
package/README.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  A read-only LSP plugin for DeepSeek Harness. It provides code navigation, diagnostics, and completion for PHP/Blade, TypeScript/JavaScript, Svelte, HTML, CSS, and Tailwind.
4
4
 
5
+ Markdown and other unsupported documents return an explicit `skipped` diagnostic result, not a tool error or a clean-file claim. `lsp_extra status` reports routing suffixes and server availability. See [diagnostic behavior](docs/usage.md#tools).
6
+
7
+ ## Read-only code structure
8
+
9
+ The provider also bundles Tree-sitter WASM grammars for JavaScript, TypeScript, and TSX. Through `lsp_extra`, open a workspace-relative snapshot, use its opaque handle with `structure` (`outline`, `enclosing`, `query`, or bounded `span`) or `semantic` operations, then release the snapshot. Structure and semantic positions use zero-based UTF-16 coordinates; completion keeps its existing one-based coordinates. Only registered query IDs (`declarations`, `calls`, `imports`) are accepted. No edits or arbitrary Tree-sitter queries are exposed.
10
+
11
+ For example, inspect parser availability, open `src/index.ts` with `operation: "snapshot", action: "open", file_path: "src/index.ts"`, pass the returned handle to `operation: "structure", action: "outline"`, and release it with `operation: "snapshot", action: "release"`. Snapshot documents are capped at 2 MiB; outline/query results, source spans, responses, and evaluation budgets are bounded. Unsupported languages or unavailable semantic servers are reported explicitly rather than treated as empty successful results. Tree-sitter cache entries are bounded and released with their snapshots or worker lifetime.
12
+
13
+ The bundled structural grammar set is currently limited to JavaScript, TypeScript, and TSX. PHP, Blade, Svelte, HTML, CSS, and Rust structural grammars and mixed-language injections are not included yet; their existing LSP routing does not imply structural-parser support.
14
+
5
15
  ## Requirements
6
16
 
7
17
  - Node.js 22.19+ (22.x) or 24+
@@ -20,6 +30,33 @@ pnpm dsh plugin --profile web add @askdkc/dsh-lsp-server@latest
20
30
 
21
31
  `@latest` selects the npm `latest` tag. Older releases declared exact DSH host peers and can be skipped after a DSH update. Local source changes do not update the published package.
22
32
 
33
+ ### Apply a newly published update immediately
34
+
35
+ Bypass pnpm's release-age delay for this operation, including its dependencies:
36
+
37
+ ```sh
38
+ pnpm dsh plugin --profile web add @askdkc/dsh-lsp-server@latest --config.minimum-release-age=0
39
+ ```
40
+
41
+ The flag reaches the pnpm process running inside the Web profile and overrides its release-age setting without changing global configuration. Reuse this command for every release. See [pnpm's release-age settings](https://pnpm.io/settings/dependency-resolution#minimumreleaseage).
42
+
43
+ An `incompatible with dsh` rejection is a separate check. DSH supports only exact plugin/runtime exemptions; there is no wildcard grant that survives upgrades. If you deliberately accept the compatibility risk (crashes or data loss), run this reusable block from the DSH project root. It reads both versions automatically, grants that exact pair, and installs the same plugin version, so a moving `latest` tag cannot select a different release between approval and installation:
44
+
45
+ ```sh
46
+ (
47
+ set -eu
48
+ plugin='@askdkc/dsh-lsp-server'
49
+ profile='web'
50
+ plugin_version=$(pnpm view "$plugin@latest" version)
51
+ dsh_version=$(pnpm --silent dsh --version)
52
+ pnpm dsh plugin --profile "$profile" allow-version "$plugin@$plugin_version" \
53
+ --dsh-version "$dsh_version" --accept-risk
54
+ pnpm dsh plugin --profile "$profile" add "$plugin@$plugin_version" --config.minimum-release-age=0
55
+ )
56
+ ```
57
+
58
+ Change `plugin` and `profile` to reuse it for another plugin or profile. It still creates an exact exemption on each run; it does not make an incompatible plugin compatible. See [DSH's compatibility exemption rules](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/boot/plugin-manager/README.md#version-compatibility-and-exemptions).
59
+
23
60
  Start or restart Web without opening a browser, from the same project root:
24
61
 
25
62
  ```sh
package/docs/usage.md CHANGED
@@ -64,6 +64,8 @@ Additional tool calls:
64
64
 
65
65
  Both tools obtain the workspace from the **calling session**. Completion's line and character are **one-based UTF-16**; diagnostic/output ranges are **zero-based UTF-16**. The model cannot supply a different workspace root. The underlying service API uses zero-based positions.
66
66
 
67
+ Diagnostics on existing unsupported documents such as `PLAN.md` return `{"diagnostics":[],"skipped":{"reason":"unsupported_file_type","filePath":"PLAN.md"}}`. This means no static check was performed; use document content and structure checks instead. Missing files, workspace escapes, read-limit failures, and failures from a supported primary server remain errors. `status.supportedFileSuffixes` describes routing support, while `servers` separately describes enabled/available servers.
68
+
67
69
  Hover and completion can include Tailwind results. Completion ranks the typed prefix before truncating large catalogs. Diagnostics report omitted auxiliary servers; no publication before the deadline is a failure, not a clean-file result. Unsupported navigation returns `LSP_UNSUPPORTED_OPERATION`.
68
70
 
69
71
  For servers that publish diagnostics as notifications, each diagnostic query starts a fresh process if the previous process was already used. This prevents delayed notifications from an earlier document close from being mistaken for a clean result. It adds server startup and project indexing cost to repeated diagnostic queries. Servers supporting `textDocument/diagnostic` reuse their process because responses are associated with request IDs.