Cross-editor diagnostics: toac lsp Language Server (v0.6.0)#3
Merged
Conversation
The diagnostics `toac check` produces now reach any LSP editor — Neovim, Helix, Zed, Emacs, JetBrains — not just VS Code. - editor.ts: editor-agnostic hover/completion services + the KEY_DOCS/ TEMPLATE_DOCS tables, exported from toad-compiler as the single source of truth (0-based positions, browser-safe). - lsp.ts: a dependency-free Language Server over stdio (hand-rolled JSON-RPC framing) reusing analyze/compile/formatAgent/editor.ts. createServer() is a pure synchronous message handler, so the protocol is fully testable without a process; runLanguageServer() wires it to stdio. - toac lsp: new CLI subcommand (lazy-imported; never pulled into the browser bundle). - VS Code extension now consumes the shared services, so it can no longer drift from the LSP. - Tests for both modules (177 pass); docs for per-editor setup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump toad-compiler and toad-runtime to 0.6.0 (the cross-editor LSP release): version constants + tests, the VS Code extension to 0.5.0, the CHANGELOG section, and a release-notes blog entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The blog skipped from 0.2.0 straight to 0.6.0; fill in the three intervening releases (typed tools/fmt/diagnostics, cost measurement, ephemeral results + field projection) so the release history reads continuously. Dates match the release commits. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Spawn the built `toac lsp` over real stdio and assert it initializes (serverInfo + capabilities) and publishes the expected TOA203 diagnostic for an invalid agent. Catches packaging / bin / lazy-import regressions the in-process protocol tests can't — the server is only reachable as a subprocess. Runs as `pnpm smoke:lsp`, wired into CI right after `pnpm build` (it needs the compiler dist). No deps, no API, 10s timeout. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Brings TOAD's compiler diagnostics to every editor, not just VS Code. The launch checklist flagged "in-editor diagnostics (`toac check` → LSP)" as the #1 most-asked roadmap item; this ships it.
How
Capabilities
Diagnostics (live, full-sync), hover, completion (`{`, `.` triggers), document formatting.
Tests
`editor.test.ts` + `lsp.test.ts` (lifecycle, diagnostic mapping, hover/completion/formatting, frame round-trips incl. multi-byte UTF-8, and an end-to-end stream run). 177 compiler + 62 runtime tests pass; typecheck + prettier clean. Verified end-to-end by driving the built `toac lsp` binary over real stdio.
Docs
Per-editor setup (Neovim, Helix, Zed, Emacs, JetBrains) in `site/ecosystem.md`; CLI reference, README, CHANGELOG, blog release notes, and the launch-checklist item ticked.
Release
Second commit bumps `toad-compiler`/`toad-runtime` to 0.6.0 (constants + tests), the VS Code extension to 0.5.0, and adds the 0.6.0 blog entry. Per `RELEASING.md`, npm publish triggers on a `v0.6.0` tag from `main` after merge — not done here (left to you, since it's an irreversible outward publish).
🤖 Generated with Claude Code