{"_id":"@arvoretech/pi-lsp","_rev":"4-7308dd1e0686b0bba3948b1be1d1c5f8","name":"@arvoretech/pi-lsp","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@arvoretech/pi-lsp","version":"1.0.0","keywords":["pi-package","pi","extension","lsp","language-server","typescript","diagnostics"],"author":{"name":"Arvore"},"license":"MIT","_id":"@arvoretech/pi-lsp@1.0.0","maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"rafsouza","email":"rafasouza@protonmail.com"},{"name":"pedro.adas","email":"pedro.adas@gmail.com"},{"name":"guilhermebs","email":"guilhermebscontact@gmail.com"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"jott4","email":"jvgcunha2002@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"homepage":"https://github.com/arvoreeducacao/arvore-pi-extensions#readme","bugs":{"url":"https://github.com/arvoreeducacao/arvore-pi-extensions/issues"},"pi":{"extensions":["./dist/index.js"]},"dist":{"shasum":"f4c69ba8357aa5a95cac4f71ee43b0b7ca7ea3e1","tarball":"https://registry.npmjs.org/@arvoretech/pi-lsp/-/pi-lsp-1.0.0.tgz","fileCount":26,"integrity":"sha512-CRx6wynVxwXQ+pb0bf7DeFmptcCk8dyrk8auaWtwXViDDeGI1DRUKzGd+IWmaPwZamK/f/G7BAoczYIXykPPqw==","signatures":[{"sig":"MEYCIQDS/2FeG4piHYQiRcvfiEQeFRL2eVR+NzGOTI09HchE6QIhAJR054Luhtz11RHfof37Gb4cZ2u6uew/JL3rKt8qocqF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70160},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"8ff77f03a0321d27844fc09419b76ca1b8c3b278","scripts":{"dev":"tsc --watch","lint":"tsc --noEmit","build":"tsc"},"_npmUser":{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},"repository":{"url":"git+https://github.com/arvoreeducacao/arvore-pi-extensions.git","type":"git","directory":"packages/lsp"},"_npmVersion":"10.9.8","description":"PI extension that bridges Language Server Protocol servers to give the agent real compiler diagnostics, go-to-definition, references, hover and rename","directories":{},"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.10.0","@earendil-works/pi-ai":"0.80.2","@earendil-works/pi-coding-agent":"0.80.2"},"peerDependencies":{"@earendil-works/pi-coding-agent":">=0.74.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-lsp_1.0.0_1782344315383_0.770218151834591","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@arvoretech/pi-lsp","version":"1.0.1","keywords":["pi-package","pi","extension","lsp","language-server","typescript","diagnostics"],"author":{"name":"Arvore"},"license":"MIT","_id":"@arvoretech/pi-lsp@1.0.1","maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"rafsouza","email":"rafasouza@protonmail.com"},{"name":"pedro.adas","email":"pedro.adas@gmail.com"},{"name":"guilhermebs","email":"guilhermebscontact@gmail.com"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"jott4","email":"jvgcunha2002@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"homepage":"https://github.com/arvoreeducacao/arvore-pi-extensions#readme","bugs":{"url":"https://github.com/arvoreeducacao/arvore-pi-extensions/issues"},"pi":{"extensions":["./dist/index.js"]},"dist":{"shasum":"6dfcc3017af2290a9b6e0fa49219bff019a84d24","tarball":"https://registry.npmjs.org/@arvoretech/pi-lsp/-/pi-lsp-1.0.1.tgz","fileCount":26,"integrity":"sha512-ldAaQMgRNNkZluPA4n61fpwyUY6MdB1v0VTrIW1mH4XK+FaNotBvnGUWRcgtTn+MgJ7eYnCqkBzVYrB9nlzEZQ==","signatures":[{"sig":"MEQCIAR4N3/8pcVRQSiUteQR4NtrBACkBs5LR79rjxI4KSmyAiBJhrerTuEwNRIq366ovOEDLmlOEeX5Ch0Buvf5tknXOQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arvoretech%2fpi-lsp@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":70862},"main":"dist/index.js","type":"module","_from":"file:/tmp/arvoretech-pi-lsp-1.0.1.tgz","types":"dist/index.d.ts","scripts":{"dev":"tsc --watch","lint":"tsc --noEmit","build":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bb5617ad-00ba-4ecc-b4c7-082e341f201a"}},"_resolved":"/tmp/arvoretech-pi-lsp-1.0.1.tgz","_integrity":"sha512-ldAaQMgRNNkZluPA4n61fpwyUY6MdB1v0VTrIW1mH4XK+FaNotBvnGUWRcgtTn+MgJ7eYnCqkBzVYrB9nlzEZQ==","repository":{"url":"git+https://github.com/arvoreeducacao/arvore-pi-extensions.git","type":"git","directory":"packages/lsp"},"_npmVersion":"11.17.0","description":"PI extension that bridges Language Server Protocol servers to give the agent real compiler diagnostics, go-to-definition, references, hover and rename","directories":{},"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.10.0","@earendil-works/pi-ai":"0.80.2","@earendil-works/pi-coding-agent":"0.80.2"},"peerDependencies":{"@earendil-works/pi-coding-agent":">=0.74.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-lsp_1.0.1_1782345196174_0.3969425178949375","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@arvoretech/pi-lsp","version":"1.0.2","keywords":["pi-package","pi","extension","lsp","language-server","typescript","diagnostics"],"author":{"name":"Arvore"},"license":"MIT","_id":"@arvoretech/pi-lsp@1.0.2","maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"rafsouza","email":"rafasouza@protonmail.com"},{"name":"pedro.adas","email":"pedro.adas@gmail.com"},{"name":"guilhermebs","email":"guilhermebscontact@gmail.com"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"jott4","email":"jvgcunha2002@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"homepage":"https://github.com/arvoreeducacao/arvore-pi-extensions#readme","bugs":{"url":"https://github.com/arvoreeducacao/arvore-pi-extensions/issues"},"pi":{"extensions":["./dist/index.js"]},"dist":{"shasum":"2effe219778f633d0cc2d3059f52bf34b088f5e6","tarball":"https://registry.npmjs.org/@arvoretech/pi-lsp/-/pi-lsp-1.0.2.tgz","fileCount":26,"integrity":"sha512-oxHSvVdXthBsYKgPJRto6xSZy3q9VlVEKJ0vBhnTxLPHsiIakrhZxpclkwsFgP715tdAaoyuEajndrczZ37cCQ==","signatures":[{"sig":"MEYCIQD/nCxu12M9eWxdda4j9V+4ABlPipv44O8PI0yf7Y9fRwIhAKGkusdlUqg2fkRIC8szs/dwyWfSwQGKcGMaXtLDtQJv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arvoretech%2fpi-lsp@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":72022},"main":"dist/index.js","type":"module","_from":"file:/tmp/arvoretech-pi-lsp-1.0.2.tgz","types":"dist/index.d.ts","scripts":{"dev":"tsc --watch","lint":"tsc --noEmit","build":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bb5617ad-00ba-4ecc-b4c7-082e341f201a"}},"_resolved":"/tmp/arvoretech-pi-lsp-1.0.2.tgz","_integrity":"sha512-oxHSvVdXthBsYKgPJRto6xSZy3q9VlVEKJ0vBhnTxLPHsiIakrhZxpclkwsFgP715tdAaoyuEajndrczZ37cCQ==","repository":{"url":"git+https://github.com/arvoreeducacao/arvore-pi-extensions.git","type":"git","directory":"packages/lsp"},"_npmVersion":"11.17.0","description":"PI extension that bridges Language Server Protocol servers to give the agent real compiler diagnostics, go-to-definition, references, hover and rename","directories":{},"_nodeVersion":"22.23.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.10.0","@earendil-works/pi-ai":"0.80.2","@earendil-works/pi-coding-agent":"0.80.2"},"peerDependencies":{"@earendil-works/pi-coding-agent":">=0.74.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-lsp_1.0.2_1782415438883_0.24268479406770815","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@arvoretech/pi-lsp","version":"1.0.3","description":"PI extension that bridges Language Server Protocol servers to give the agent real compiler diagnostics, go-to-definition, references, hover and rename","main":"dist/index.js","types":"dist/index.d.ts","type":"module","peerDependencies":{"@earendil-works/pi-coding-agent":">=0.74.0"},"devDependencies":{"@earendil-works/pi-coding-agent":"0.80.2","@earendil-works/pi-ai":"0.80.2","@types/node":"^20.10.0","typescript":"^5.3.0"},"pi":{"extensions":["./dist/index.js"]},"keywords":["pi-package","pi","extension","lsp","language-server","typescript","diagnostics"],"repository":{"type":"git","url":"git+https://github.com/arvoreeducacao/arvore-pi-extensions.git","directory":"packages/lsp"},"author":{"name":"Arvore"},"license":"MIT","scripts":{"build":"tsc","dev":"tsc --watch","lint":"tsc --noEmit"},"_id":"@arvoretech/pi-lsp@1.0.3","bugs":{"url":"https://github.com/arvoreeducacao/arvore-pi-extensions/issues"},"homepage":"https://github.com/arvoreeducacao/arvore-pi-extensions#readme","_integrity":"sha512-2dqVACjMVvnSjZrcOxYfEhBjIeQuyBGJgzIAGpcWRfSBDoyxv8fxfEov5mb+1d6bmVAh6HTe0XsSAZ7DInhRDw==","_resolved":"/tmp/arvoretech-pi-lsp-1.0.3.tgz","_from":"file:/tmp/arvoretech-pi-lsp-1.0.3.tgz","_nodeVersion":"22.23.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-2dqVACjMVvnSjZrcOxYfEhBjIeQuyBGJgzIAGpcWRfSBDoyxv8fxfEov5mb+1d6bmVAh6HTe0XsSAZ7DInhRDw==","shasum":"ba1319ca062d0c016e7e6543309104bf98b6e5ac","tarball":"https://registry.npmjs.org/@arvoretech/pi-lsp/-/pi-lsp-1.0.3.tgz","fileCount":26,"unpackedSize":73230,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arvoretech%2fpi-lsp@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDWNm/K//e8hyIAwFz3FVtwzarUlAjgqqHM/qHTQF+3vAIhAKb9+Qb1CDWWwCiHIyYO0JJUJDe/bTiTJ8vsTvjZGhpn"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bb5617ad-00ba-4ecc-b4c7-082e341f201a"}},"directories":{},"maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"rafsouza","email":"rafasouza@protonmail.com"},{"name":"pedro.adas","email":"pedro.adas@gmail.com"},{"name":"guilhermebs","email":"guilhermebscontact@gmail.com"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"jott4","email":"jvgcunha2002@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-lsp_1.0.3_1782475651352_0.9355394379992841"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-24T23:38:35.265Z","modified":"2026-06-26T12:07:31.937Z","1.0.0":"2026-06-24T23:38:35.524Z","1.0.1":"2026-06-24T23:53:16.330Z","1.0.2":"2026-06-25T19:23:59.027Z","1.0.3":"2026-06-26T12:07:31.509Z"},"bugs":{"url":"https://github.com/arvoreeducacao/arvore-pi-extensions/issues"},"author":{"name":"Arvore"},"license":"MIT","homepage":"https://github.com/arvoreeducacao/arvore-pi-extensions#readme","keywords":["pi-package","pi","extension","lsp","language-server","typescript","diagnostics"],"repository":{"type":"git","url":"git+https://github.com/arvoreeducacao/arvore-pi-extensions.git","directory":"packages/lsp"},"description":"PI extension that bridges Language Server Protocol servers to give the agent real compiler diagnostics, go-to-definition, references, hover and rename","maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"rafsouza","email":"rafasouza@protonmail.com"},{"name":"pedro.adas","email":"pedro.adas@gmail.com"},{"name":"guilhermebs","email":"guilhermebscontact@gmail.com"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"jott4","email":"jvgcunha2002@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"readme":"# @arvoretech/pi-lsp\n\nPI extension that bridges Language Server Protocol servers, giving the agent real compiler diagnostics, go-to-definition, find-references, hover types and project-wide rename — instead of guessing from text.\n\n## Tools\n\n| Tool | Purpose |\n| --- | --- |\n| `lsp_diagnostics` | Real type-checker errors/warnings for a file (e.g. `TS2345`). |\n| `lsp_definition` | Resolve a symbol to its definition (1-based line/column). |\n| `lsp_references` | Find all references to a symbol across the project. |\n| `lsp_hover` | Inferred type signature and docs for a symbol. |\n| `lsp_rename` | Compute a safe project-wide rename. Returns edits; does not apply them. |\n\n## Commands\n\n- `/lsp-status` — list configured language servers and their file extensions.\n\n## Supported languages\n\nDriven by a registry (`src/registry.ts`). Currently:\n\n- **TypeScript / JavaScript** (`.ts .tsx .js .jsx .mts .cts .mjs .cjs`) via `typescript-language-server --stdio`.\n\nAdding a language is a single entry in `LANGUAGE_SERVERS` — the JSON-RPC client, lifecycle, and document sync are language-agnostic.\n\n## Requirements\n\nThe language server binary must be on `PATH`. For TS/JS:\n\n```bash\npnpm add -g typescript-language-server typescript\n```\n\nIf a server is missing, the tools return a clear message and the extension stays inert (no crash).\n\n## How it works\n\n- One server instance per `(language, project root)`, lazy-spawned on first use. Root is detected by walking up from the file and preferring the nearest `tsconfig.json` / `jsconfig.json` / `package.json` over `.git`, so files inside a subproject of a monorepo resolve to the subproject (which has its own TypeScript install) rather than the repo root.\n- If a server fails to initialize (e.g. no TypeScript found at the resolved root), the instance is not cached as permanently unavailable — a later call can retry once the root resolution improves.\n- Documents are synced (`didOpen` / `didChange`) from disk on each call; diagnostics are awaited with a short quiet-period debounce.\n- Servers are shut down cleanly on `session_shutdown`.\n\n## Architecture\n\n```\nsrc/\n  protocol.ts   LSP type subset\n  client.ts     JSON-RPC over stdio (Content-Length framing, request/notify)\n  registry.ts   language -> server config\n  manager.ts    spawn / lifecycle / root detection / doc sync / high-level ops\n  tools.ts      lsp_* tool definitions + output formatting\n  index.ts      entry shell (lifecycle + tool registration)\n```\n","readmeFilename":"README.md"}