@aihu/language-server 0.1.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/LICENSE +21 -0
- package/README.md +123 -0
- package/dist/bin.js +2119 -0
- package/dist/core/index.d.ts +101 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +2 -0
- package/dist/core-BHishSOT.js +1911 -0
- package/dist/core-BHishSOT.js.map +1 -0
- package/dist/server.d.ts +22 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +201 -0
- package/dist/server.js.map +1 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Fellwork
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# @aihu/language-server
|
|
2
|
+
|
|
3
|
+
> **Aihu** — agentic discovery and interaction, for human purpose.
|
|
4
|
+
|
|
5
|
+
Cross-editor Language Server (aihu-language-server) for .aihu Single File Components — diagnostics, hover, completion, and quick-fix code actions.
|
|
6
|
+
|
|
7
|
+
Held-private workspace package. Not yet published to npm.
|
|
8
|
+
|
|
9
|
+
> **Status:** Held private — not yet published to npm. See [v1.1 roadmap](../../docs/roadmap/SUMMARY.md) for ratification gating (e.g. RFC #56 live-binding for `@aihu/plugin` enforcement).
|
|
10
|
+
|
|
11
|
+
<!-- BEGIN_HANDWRITTEN: prose -->
|
|
12
|
+
Cross-editor [Language Server Protocol](https://microsoft.github.io/language-server-protocol/)
|
|
13
|
+
implementation for `.aihu` Single File Components. Ships the runnable
|
|
14
|
+
`aihu-language-server` binary that any LSP-aware editor (VS Code, Neovim, Helix,
|
|
15
|
+
Zed, …) can launch over stdio.
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
- **Diagnostics** — shells out to the `aihu-compile` Rust binary with
|
|
20
|
+
`--machine-errors` (debounced 300 ms) and maps the structured errors onto LSP
|
|
21
|
+
diagnostics.
|
|
22
|
+
- **Hover** — Markdown documentation for the 13 aihu macro keywords, aware of
|
|
23
|
+
`@state` vs `@template` block context.
|
|
24
|
+
- **Completion** — 9 `$`-triggered macro-kind snippets (context-filtered) and 5
|
|
25
|
+
`@`-triggered top-level block names.
|
|
26
|
+
- **Code actions** — QuickFix for the `C440`–`C444` old-spec macro diagnostics,
|
|
27
|
+
backed by the macro-simplification codemod.
|
|
28
|
+
|
|
29
|
+
## Layout
|
|
30
|
+
|
|
31
|
+
The package is laid out with a clean editor-agnostic seam (`src/core/`) so a
|
|
32
|
+
future `@volar/language-core` virtual-code layer can consume the same
|
|
33
|
+
diagnostics/hover/completion/code-action logic without touching the connection
|
|
34
|
+
wiring (arch-4 §2.7). Volar is **not** adopted yet — that is a separate
|
|
35
|
+
Phase-2 decision.
|
|
36
|
+
|
|
37
|
+
- `src/core/*` — pure logic + the compiler bridge (no LSP connection objects).
|
|
38
|
+
- `src/server.ts` — wires the core onto a `vscode-languageserver` connection.
|
|
39
|
+
- `src/bin.ts` — the runnable `aihu-language-server` stdio entry.
|
|
40
|
+
<!-- END_HANDWRITTEN: prose -->
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
<!-- BEGIN_AUTOGEN: install -->
|
|
45
|
+
<!-- regenerate: bun scripts/sync-readme.ts (also runs in pre-commit + CI) -->
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm install @aihu/language-server
|
|
49
|
+
# or
|
|
50
|
+
bun add @aihu/language-server
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
<sub><i>Auto-generated against `@aihu/language-server@0.1.0`.</i></sub>
|
|
54
|
+
|
|
55
|
+
<!-- END_AUTOGEN: install -->
|
|
56
|
+
|
|
57
|
+
## Package facts
|
|
58
|
+
|
|
59
|
+
<!-- BEGIN_AUTOGEN: stats -->
|
|
60
|
+
<!-- regenerate: bun scripts/sync-readme.ts (also runs in pre-commit + CI) -->
|
|
61
|
+
|
|
62
|
+
| | |
|
|
63
|
+
|---|---|
|
|
64
|
+
| **Version** | `0.1.0` |
|
|
65
|
+
| **Tier** | E — Held private (unmapped tier) |
|
|
66
|
+
| **Published files** | 3 entries |
|
|
67
|
+
| **License** | MIT |
|
|
68
|
+
|
|
69
|
+
<sub><i>Auto-generated against `@aihu/language-server@0.1.0`.</i></sub>
|
|
70
|
+
|
|
71
|
+
<!-- END_AUTOGEN: stats -->
|
|
72
|
+
|
|
73
|
+
## Exports
|
|
74
|
+
|
|
75
|
+
<!-- BEGIN_AUTOGEN: exports -->
|
|
76
|
+
<!-- regenerate: bun scripts/sync-readme.ts (also runs in pre-commit + CI) -->
|
|
77
|
+
|
|
78
|
+
| Subpath | ESM | CJS |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| `.` | `./dist/server.js` | `—` |
|
|
81
|
+
| `./core` | `./dist/core/index.js` | `—` |
|
|
82
|
+
|
|
83
|
+
<sub><i>Auto-generated against `@aihu/language-server@0.1.0`.</i></sub>
|
|
84
|
+
|
|
85
|
+
<!-- END_AUTOGEN: exports -->
|
|
86
|
+
|
|
87
|
+
## Dependencies
|
|
88
|
+
|
|
89
|
+
<!-- BEGIN_AUTOGEN: deps -->
|
|
90
|
+
<!-- regenerate: bun scripts/sync-readme.ts (also runs in pre-commit + CI) -->
|
|
91
|
+
|
|
92
|
+
**Dependencies:**
|
|
93
|
+
|
|
94
|
+
- `@aihu/compiler` — `workspace:*`
|
|
95
|
+
- `vscode-languageserver` — `^9.0.1`
|
|
96
|
+
- `vscode-languageserver-textdocument` — `^1.0.11`
|
|
97
|
+
|
|
98
|
+
<sub><i>Auto-generated against `@aihu/language-server@0.1.0`.</i></sub>
|
|
99
|
+
|
|
100
|
+
<!-- END_AUTOGEN: deps -->
|
|
101
|
+
|
|
102
|
+
## See also
|
|
103
|
+
|
|
104
|
+
<!-- BEGIN_AUTOGEN: see-also -->
|
|
105
|
+
<!-- regenerate: bun scripts/sync-readme.ts (also runs in pre-commit + CI) -->
|
|
106
|
+
|
|
107
|
+
- [Aihu framework root](../../README.md)
|
|
108
|
+
- [v1.1 roadmap](../../docs/roadmap/SUMMARY.md)
|
|
109
|
+
|
|
110
|
+
<sub><i>Auto-generated against `@aihu/language-server@0.1.0`.</i></sub>
|
|
111
|
+
|
|
112
|
+
<!-- END_AUTOGEN: see-also -->
|
|
113
|
+
|
|
114
|
+
## License
|
|
115
|
+
|
|
116
|
+
<!-- BEGIN_AUTOGEN: license -->
|
|
117
|
+
<!-- regenerate: bun scripts/sync-readme.ts (also runs in pre-commit + CI) -->
|
|
118
|
+
|
|
119
|
+
MIT — see [LICENSE](../../LICENSE).
|
|
120
|
+
|
|
121
|
+
<sub><i>Auto-generated against `@aihu/language-server@0.1.0`.</i></sub>
|
|
122
|
+
|
|
123
|
+
<!-- END_AUTOGEN: license -->
|