Rename: lsp → langservice + cursor split, and project → existdb-openapi#18
Open
joewiz wants to merge 6 commits into
Open
Rename: lsp → langservice + cursor split, and project → existdb-openapi#18joewiz wants to merge 6 commits into
joewiz wants to merge 6 commits into
Conversation
6 tasks
joewiz
added a commit
to joewiz/eXide
that referenced
this pull request
May 16, 2026
Coordinated update for the breaking rename in eXist-db/existdb-openapi#18 (formerly eXist-db/exist-api). All four known consumers (eXide, monex, existdb-langserver, notebook) move together — no backward-compat aliases. XQuery namespace switches in modules/api/query.xqm: - import lsp: -> import lang: (language services) and cursor: (server-side cursor) - lsp:diagnostics/completions/hover/definition/references/symbols -> lang:* - lsp:eval/fetch/close -> cursor:* - function-lookup QName URI updated to .../xquery/cursor URL/XAR coordinate updates: - ../exist-api/api/* -> ../existdb-openapi/api/* in src/eXide.js - CI: download from joewiz/existdb-openapi, pattern existdb-openapi-*.xar - Note: CI is pinned to v0.9.0-pre.2 — a new pre-release tag will be cut from existdb-openapi after PR #18 lands. CI stays red until then. File renames for naming hygiene: - src/lsp-hover.js -> src/lang-hover.js - resources/css/lsp-hover.css -> resources/css/lang-hover.css - CSS classes cm-lsp-hover* -> cm-lang-hover* - Updated import in scripts/bundle.js and link in index.html Comments/docs updated. References to "LSP" as a protocol (e.g., "LSP-aware completions", "LSP protocol messages") are preserved since they describe interop-with-LSP semantics, not the renamed namespace. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
joewiz
added a commit
to joewiz/monex
that referenced
this pull request
May 16, 2026
Coordinated update for eXist-db/existdb-openapi#18 (formerly eXist-db/exist-api). The lsp:eval/fetch/close functions are renamed to cursor:eval/fetch/close (their own namespace), since they are query-execution primitives, not language services. Only modules/query.xql is affected; monex doesn't consume any of the language-service endpoints (lsp:diagnostics/symbols/etc.). BREAKING CHANGE: requires existdb-openapi (formerly exist-api) 1.0.0+ with the cursor namespace. Will not work against older exist-api releases that exposed these functions under the lsp namespace. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
joewiz
added a commit
to joewiz/existdb-langserver
that referenced
this pull request
May 16, 2026
Coordinated update for eXist-db/existdb-openapi#18 (formerly eXist-db/exist-api). All four known consumers (eXide, monex, existdb-langserver, notebook) move together — no backward-compat aliases. URL paths: - /apps/exist-api/api/lsp/* -> /apps/existdb-openapi/api/langservice/* - /apps/exist-api/api/* -> /apps/existdb-openapi/api/* (eval/query) XQuery function references in comments and capability probes: - lsp:diagnostics/symbols -> lang:* - lsp:eval/fetch/close -> cursor:* The probe-hack capability detection (sending dummy query=1 to lsp:eval) is kept in place for now and just renamed to cursor:eval. A follow-up should switch to the new GET /api/langservice/capabilities endpoint introduced in existdb-openapi#17. Test file renames: - test/capability-check.spec.ts: "lsp:eval capability detection" -> "cursor:eval capability detection" (and matching it() titles) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
joewiz
added a commit
to joewiz/notebook
that referenced
this pull request
May 16, 2026
Coordinated update for eXist-db/existdb-openapi#18 (formerly eXist-db/exist-api). The XAR was renamed from exist-api to existdb-openapi, and the /api/lsp/* endpoints were renamed to /api/langservice/*. Changes in resources/js/notebook.js: - /apps/exist-api/api -> /apps/existdb-openapi/api - /lsp/completions, /lsp/hover -> /langservice/completions, /langservice/hover - lspBase variable renamed to langBase - Comments updated to refer to "langservice" rather than "LSP" Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
joewiz
added a commit
to joewiz/eXide
that referenced
this pull request
May 16, 2026
eXist 7.0 parser has a regression where calling pkg:close() fails for any module — even though inspect:inspect-module-uri shows the signature correctly registered. Renamed in existdb-openapi as cursor:release; this commit catches up the eXide-side call site. See eXist-db/existdb-openapi#18 commit f47bbac for the discovery details. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
joewiz
added a commit
to joewiz/eXide
that referenced
this pull request
May 16, 2026
Coordinated update for the breaking rename in eXist-db/existdb-openapi#18 (formerly eXist-db/exist-api). All four known consumers (eXide, monex, existdb-langserver, notebook) move together — no backward-compat aliases. XQuery namespace switches in modules/api/query.xqm: - import lsp: -> import lang: (language services) and cursor: (server-side cursor) - lsp:diagnostics/completions/hover/definition/references/symbols -> lang:* - lsp:eval/fetch/close -> cursor:* - function-lookup QName URI updated to .../xquery/cursor URL/XAR coordinate updates: - ../exist-api/api/* -> ../existdb-openapi/api/* in src/eXide.js - CI: download from joewiz/existdb-openapi, pattern existdb-openapi-*.xar - Note: CI is pinned to v0.9.0-pre.2 — a new pre-release tag will be cut from existdb-openapi after PR #18 lands. CI stays red until then. File renames for naming hygiene: - src/lsp-hover.js -> src/lang-hover.js - resources/css/lsp-hover.css -> resources/css/lang-hover.css - CSS classes cm-lsp-hover* -> cm-lang-hover* - Updated import in scripts/bundle.js and link in index.html Comments/docs updated. References to "LSP" as a protocol (e.g., "LSP-aware completions", "LSP protocol messages") are preserved since they describe interop-with-LSP semantics, not the renamed namespace. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
joewiz
added a commit
to joewiz/eXide
that referenced
this pull request
May 16, 2026
eXist 7.0 parser has a regression where calling pkg:close() fails for any module — even though inspect:inspect-module-uri shows the signature correctly registered. Renamed in existdb-openapi as cursor:release; this commit catches up the eXide-side call site. See eXist-db/existdb-openapi#18 commit f47bbac for the discovery details. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7e09c4b to
c1f492b
Compare
joewiz
added a commit
to joewiz/eXide
that referenced
this pull request
May 17, 2026
Coordinated update for the breaking rename in eXist-db/existdb-openapi#18 (formerly eXist-db/exist-api). All four known consumers (eXide, monex, existdb-langserver, notebook) move together — no backward-compat aliases. XQuery namespace switches in modules/api/query.xqm: - import lsp: -> import lang: (language services) and cursor: (server-side cursor) - lsp:diagnostics/completions/hover/definition/references/symbols -> lang:* - lsp:eval/fetch/close -> cursor:* - function-lookup QName URI updated to .../xquery/cursor URL/XAR coordinate updates: - ../exist-api/api/* -> ../existdb-openapi/api/* in src/eXide.js - CI: download from joewiz/existdb-openapi, pattern existdb-openapi-*.xar - Note: CI is pinned to v0.9.0-pre.2 — a new pre-release tag will be cut from existdb-openapi after PR #18 lands. CI stays red until then. File renames for naming hygiene: - src/lsp-hover.js -> src/lang-hover.js - resources/css/lsp-hover.css -> resources/css/lang-hover.css - CSS classes cm-lsp-hover* -> cm-lang-hover* - Updated import in scripts/bundle.js and link in index.html Comments/docs updated. References to "LSP" as a protocol (e.g., "LSP-aware completions", "LSP protocol messages") are preserved since they describe interop-with-LSP semantics, not the renamed namespace. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 17, 2026
…r own namespace The 'lsp:' XQuery namespace and '/api/lsp/*' URL prefix were inherited from the migrated exist-lsp package and implied a protocol claim that isn't true — exist-api is an HTTP/JSON backend with LSP-inspired data shapes, not an LSP server. See eXist-db#7 for the architecture discussion that drove this rename. This commit also splits the server-side cursor functions (eval / fetch / close) out of the language-services namespace, since they are query-execution primitives, not language services. Naming changes: - URL prefix: /api/lsp/* -> /api/langservice/* - XQuery: 'lsp:' -> 'lang:' (language services) and new 'cursor:' - XQuery URIs: http://exist-db.org/xquery/{langservice,cursor} - Java packages: org.exist.xquery.modules.api.lsp.* -> org.exist.xquery.modules.openapi.{langservice,cursor}.* - New module classes: LangServiceModule, CursorModule (replacing the combined LspModule) Other changes: - ApiModule deleted; its cursor-store configuration role moves to CursorModule (which is what actually uses the store) - New endpoint: GET /api/langservice/capabilities returns the set of language-service features the running instance supports — replaces existdb-langserver's current probe hack (closes eXist-db#17) - MIGRATION.md documents the rename for downstream consumers; removed once eXide / monex / existdb-langserver / notebook are updated No backward-compatibility aliases. All four known consumers are pre-release and will be updated in lockstep. REST request/response shapes are unchanged in this PR; shape tightening to LSP 3.17 isomorphism is tracked separately in eXist-db#16. Closes eXist-db#7 Closes eXist-db#15 Closes eXist-db#17 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
21a08aa to
ed8385d
Compare
Renames the Maven artifactId, XAR target, EXPath package URI, and related coordinates to match the GitHub repo rename in eXist-db#13. The repo itself was renamed from eXist-db/exist-api to eXist-db/existdb-openapi on GitHub (auto-redirect in place). Per eXist-db#13, "existdb-openapi" matches what this project actually is — an OpenAPI-described HTTP surface, distinct from RESTXQ, the legacy REST Server, and XML:DB. The "exist-api" name was too generic given how many APIs eXist already has. Coordinates changed: - artifactId: exist-api -> existdb-openapi - project name: "Platform API Module" -> "eXist-db OpenAPI" - scm/url: github.com/eXist-db/exist-api -> .../existdb-openapi - package-name (EXPath URI): /pkg/api -> /pkg/openapi - package-abbrev: exist-api -> existdb-openapi - XAR target: exist-api -> existdb-openapi - XAR tags: exist-api/platform-api -> existdb-openapi/openapi MIGRATION.md updated to reflect the rename and document the coordinate changes for downstream consumers. Closes eXist-db#13 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The fileSet pointed to a non-existent directory and caused mvn package to fail. Pre-existing issue, not related to the rename, but blocking local XAR builds — removing as part of this PR so the rename is properly buildable. XQSuite tests can be added back later under a real directory when there are tests to ship. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ules
Three fixes from smoke-testing on eXist 7.0-SNAPSHOT:
1. langservice:capabilities used bare true / false in map literals.
XQuery has no boolean literals — they're functions (true(),
false()). Bare identifiers were being parsed as path steps,
raising err:XPDY0002 at runtime. Fixed.
2. Drop ordered=true from CursorModule and LangServiceModule
super(...) calls.
AbstractInternalModule with ordered=true uses binary search over
the FunctionDef[] for call dispatch, which requires alphabetical
sorting of the array. CursorModule's lifecycle-ordered declaration
(eval/fetch/close) violated that invariant, making cursor:close()
silently unparseable at the call site even though
inspect:inspect-module-uri showed the signature registered fine.
The error message ("Unexpectedly received N parameter(s)") was
misleading.
ordered=true is a performance optimization for modules with many
functions (FnModule has ~500). For modules with a handful of
functions, linear scan via the 2-arg super() is strictly better:
no sort invariant to violate, no need to declare functions
alphabetically vs. semantically. Refs eXist-db/exist#6378.
3. Renamed local $cursor variable to $cursor-id in modules/query.xqm
to avoid visual confusion with the cursor: namespace prefix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Local tooling artifacts (Claude Code session state, Codacy analyzer config) that crept in during the rename PR via 'git add -A'. Adding to .gitignore so they stay out. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Covers what existdb-openapi is (and isn't), how it fits among eXist's several historical HTTP surfaces, a quick-start with curl, an endpoint index grouped by concern (db, query, langservice, users/groups/packages, search, system), the two internal XQuery namespaces (lang:* and cursor:*), the cursor lifecycle, configuration knobs (cursor.maximumSize etc.), build instructions, project layout, versioning policy, and pointers to consumers (eXide, existdb-langserver, monex, notebook) and the open 1.0 tracking issues (eXist-db#2, eXist-db#15, eXist-db#16, eXist-db#17, eXist-db#13). The XAR assembly already declared README.md as a fileSet include, so the README ships with the package. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4bfb120 to
a9b10e4
Compare
duncdrum
approved these changes
May 20, 2026
Contributor
duncdrum
left a comment
There was a problem hiding this comment.
no more blockers from my side
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.
Summary
Renames the
lsp:XQuery namespace and/api/lsp/*URL prefix tolangservice/lang, splits the server-side cursor functions (eval/fetch/close) into a newcursor:namespace, adds a capability discovery endpoint, and renames the project fromexist-apitoexistdb-openapi(Maven artifactId, XAR target, EXPath package URI, etc., to match the GitHub repo rename in #13).Implements the naming decisions locked in #7 (LSP/langservice/cursor namespaces) and #13 (repo rename).
Per #7: this project is an HTTP/JSON backend with LSP-inspired data shapes — not an LSP server. The previous
lsp:names (inherited from the migratedexist-lsppackage) implied a protocol claim that wasn't true. Per #13: "exist-api" was too generic given how many APIs eXist already has (RESTXQ, REST Server, XML:DB, etc.); "existdb-openapi" names what this project actually is.No backward-compatibility aliases — all four known consumers (eXide, existdb-langserver, monex, notebook) are pre-release and updated in lockstep.
REST request/response shapes are unchanged in this PR; LSP-isomorphic shape tightening is tracked separately in #16.
Closes
Naming changes
XQuery namespaces / Java packages
/api/lsp/*/api/langservice/*http://exist-db.org/xquery/lsphttp://exist-db.org/xquery/langservicelsplanghttp://exist-db.org/xquery/cursor(new)cursor(new)org.exist.xquery.modules.api.lsp.*org.exist.xquery.modules.openapi.langservice.*org.exist.xquery.modules.openapi.cursor.*LspModuleLangServiceModuleCursorModule(new)The empty placeholder
ApiModuleis deleted; its cursor-store configuration role moves intoCursorModule.Project / repo coordinates
eXist-db/exist-apieXist-db/existdb-openapiartifactIdexist-apiexistdb-openapitarget/package-abbrevexist-apiexistdb-openapipackage-nameURIhttp://exist-db.org/pkg/apihttp://exist-db.org/pkg/openapiscmURLsgithub.com/eXist-db/exist-apigithub.com/eXist-db/existdb-openapiGitHub auto-redirects the old repo URL.
New endpoint
GET /api/langservice/capabilities— returns the set of language-service features the running instance supports. Replaces the probe-hack existdb-langserver currently uses for feature detection.Files touched
CursorModule)modules/lsp.xqm→modules/langservice.xqmmodules/query.xqm,modules/api.xq,modules/api.json— updatespom.xml,xar-assembly.xml,repo.xml— coordinate changessrc/test/resources/conf.xml— builtin-modules entries updatedMIGRATION.md— new; to be removed once consumer rollout completesTest plan
mvn compilepasses (verified locally with Java 21)mvn packageproduces the XAR (thetest/xqsreference inxar-assembly.xmlwas removed in this PR — see commit2ccba84)/api/langservice/*endpoints respond — all 7 endpoints (capabilities, diagnostics, completions, hover, definition, references, symbols) return 200 against eXist 7.0-SNAPSHOT/api/langservice/capabilitiesreturns the expected shape (cursor/diagnostics/hover/symbols/etc. capability map per the OpenAPI spec)/api/eval,/api/query/{id}/results,DELETE /api/query/{id}still work (delegate tocursor:*functions) — full cursor lifecycle round-tripped (POST → GET → DELETE all 200, items returned correctly)joewiz/notebookmain). Each will merge after this PR lands.