Author: "ThemisDB Team"
Created: "2026-11-27"
Last Updated: "2026-11-28"
Status: "preview"
AI_Used: true
AI_Models: "unknown"
AI_Contributor: "GitHub Copilot"
Human_Review: false
Human_Author: "unknown"
Exact model backend not verifiable from final document text alone.
ThemisDB DevDB — E2E Preview
This is a deliberately bounded, read-only VS Code extension preview for
local DevDB health and stored PR/issue traceability. It is not
production-ready, a production-readiness assessment, a complete E2E plan, or a
source of truth. The local DevDB and GitHub remain authoritative only within
their documented scopes.
Current capabilities
- Check Local DevDB Health makes explicit
GET /health and GET /version
requests. The output distinguishes both endpoints reachable, partial response,
and unavailable; reachability does not imply readiness.
- Trace a PR (Read Only) makes
GET /entities/prs:<number>,
GET /entities/pr_file_sets:<number>, and
GET /entities/pr_commit_sets:<number>, using the document contract read by
the adapter's themis_trace_pr MCP tool. It supports a caller-selected
offset and page size (1–100).
- Missing PR metadata is shown as
not_imported, not as an empty or nonexistent
GitHub PR. Missing file/commit snapshots remain separately not_imported.
Invalid or incomplete stored snapshots fail closed.
- The result labels
fixes as parsed closing references only, compares file
and commit snapshot head/base SHAs when both are present, and always states
that freshness against GitHub is not checked. File paths are PR-level, not
commit-level.
themis_analyze_pr_path_scope accepts only one explicitly selected PR number
and makes one bounded GET /entities/pr_file_sets:<number>. It counts unique
file.path values and previous_path rename endpoints in that stored
snapshot: exact src/ prefix, exact tests/ prefix, and exact docs/ prefix
plus .md or .markdown suffix (all case-sensitive). It returns counts and
these rules, not paths. Missing, invalid, oversized, internally inconsistent
(including count-detectable truncation), or not-marked-complete snapshots
return unverifiable without counts.
Repeated current-path entries are valid only as one added and one
removed entry.
Counts are mechanical observations only—not evidence of missing tests/docs
or a defect—and establish neither GitHub freshness nor completeness beyond
the stored snapshot.
- An optional bearer token can be entered through a password prompt and stored
in VS Code
SecretStorage under the exact normalized origin and a namespace
generated in the VS Code profile's global state. For every operation with a
stored token, a modal prompt names that origin and requires an explicit
choice to send the token or proceed without it; cancelling sends nothing.
Tokens are not stored in workspace settings or printed to the output channel.
Verify that the intended service is listening before approving token use:
a different local process can reuse a port.
- Enable Unauthenticated Read-Only MCP explicitly offers an extension-provided
stdio MCP server to compatible VS Code Copilot sessions. It exposes only
themis_health, themis_trace_pr, themis_analyze_pr_path_scope,
themis_trace_issue, themis_scan_issue_prs, and themis_suggest_issue_prs,
implemented with the bounded
read-only client. It never reads the extension's SecretStorage or sends a
bearer token; authenticated DevDBs are not supported over MCP.
themis_trace_issue checks only 1–20 distinct caller-selected PR numbers
for exact stored fixes references to the requested issue. Missing records,
invalid records, read errors and candidates not checked after a read error
are explicit; selected_scan_complete is false unless every candidate was
valid and checked. Reads are sequential, not an atomic snapshot. Coverage is
caller_selected_only and GitHub freshness is never checked.
themis_suggest_issue_prs searches the existing prs.title BM25 fulltext
index using the imported issue title and checks exact stored fixes
references on at most 20 returned PRs. It never creates an index, runs AQL,
falls back to the collection scan, or sends credentials. The index may omit
documents written before it was created; title candidates are only a
non-exhaustive suggestion set. Exact checks cover only returned candidates,
reads are not an atomic snapshot, and GitHub freshness is not checked. A
missing index is an error, and an empty result does not prove that no PR
references the issue. The result limit bounds returned candidates, not the
server's posting-list traversal, scoring cost, or total request work.
themis_scan_issue_prs takes a positive safe issue number, an offset from
0–10,000 (default 0), and a limit from 1–50 (default 20). It sends exactly
one fixed, generated read-only AQL POST /query/aql per call. Each page
can read all PRs server-side before applying the limit, so use it only
when that load is acceptable. No caller-supplied query or path is accepted.
Results cover one unordered page with no stable snapshot, global
completeness, issue-existence or GitHub-freshness guarantee. Empty pages and
pages with unverifiable rows return MCP isError; missing/null fixes
can indicate an old runtime or invalid stored record. Never infer that a
link is absent from a page, an error, or sequential pagination.
This preview does not create or traverse graph edges, unlock graph writes,
read or write vectors, run arbitrary AQL, import data, start/stop Docker, or contact
GitHub. The direct commands issue only documented GET requests; MCP uses only
the fixed read-only AQL scan and the fixed indexed fulltext title search POSTs.
Redirects are rejected. Only localhost,
127.0.0.0/8, and [::1] HTTP(S) base URLs are accepted.
Responses are read incrementally and rejected above 2,000,000 bytes (262,144
bytes per issue-trace entity, PR path-scope snapshot, scan response, or indexed
title-search response). Issue tracing, PR path-scope analysis, scanning, and
title candidate search additionally reject invalid
UTF-8, duplicate JSON keys, and JSON nesting deeper than 256 levels; path-scope
analysis validates the stored file-snapshot contract, while issue tracing and
scanning validate closing-reference metadata.
HTTP error
responses report the status code but never log server-supplied error text.
Run and test locally
Requires VS Code 1.120+ and Node.js 20+ for building, testing and packaging.
cd tools\themisdb-devdb-vscode
npm ci
npm test
For an opt-in, read-only MCP protocol test against the existing traceability
pilot, start the pilot separately and run:
$env:THEMIS_DEVDB_LIVE_PILOT = "1"
npm test
Remove-Item Env:THEMIS_DEVDB_LIVE_PILOT
This test requires the unauthenticated pilot at 127.0.0.1:28091 to contain
the imported Issue 66 and PR 67 snapshots (17 files, 6 commits). It fails when
that fixture is unavailable or changed; it never creates data. The test starts
the compiled MCP server and checks its live read-only protocol, not the VS Code
extension host or an actual Copilot conversation. Without the opt-in variable,
the live test is skipped.
Open this directory as a VS Code workspace and press F5 to launch the
Extension Development Host. The extension activates on command use; it does not
make startup network requests.
To package an internal VSIX locally without publishing it, run:
npm run package -- --out .\themisdb-devdb-preview.vsix
The pinned @vscode/vsce tool compiles via vscode:prepublish and excludes
dependencies. The .vscodeignore allowlist includes the manifest, README,
repository license, and compiled runtime JavaScript only; the focused tests
check this file list and the license bytes.
The package is a preview and is not installed or published by this command.
License
The extension uses the repository's MIT License with Government Clause,
not the standard MIT license. The package manifest identifies it as
LicenseRef-ThemisDB-Government-Clause, and the accompanying LICENSE is
an unchanged copy of the repository root license. This identifier is a local
LicenseRef, not a standardized SPDX-listed license.
Configuration and commands
| Setting / command |
Purpose |
themisdbDevdb.baseUrl |
Application/user-level loopback REST URL; workspace and folder overrides are ignored, including in untrusted workspaces. Defaults to http://127.0.0.1:28091 (the traceability pilot). |
themisdbDevdb.requestTimeoutMs |
Per-request timeout, default 15 seconds, range 1–60 seconds. |
ThemisDB DevDB Preview: Enable Unauthenticated Read-Only MCP |
Explicitly approve the current numeric loopback origin and offer the MCP server to compatible connected Copilot sessions. |
ThemisDB DevDB Preview: Disable Read-Only MCP |
Withdraw this window's server definition. Also stop/disable any independently forwarded Copilot server in the session's MCP controls. |
ThemisDB DevDB Preview: Check Local DevDB Health |
Explicit GET health and version check. |
ThemisDB DevDB Preview: Trace a PR (Read Only) |
Prompt for PR number, offset, and page size; issue GETs only. |
ThemisDB DevDB Preview: Store DevDB Bearer Token |
Store an optional token for the current origin and profile namespace in VS Code SecretStorage. |
ThemisDB DevDB Preview: Clear Stored DevDB Bearer Token |
Remove the token for the current origin and the unused legacy unscoped token. |
The previous unscoped token is not automatically used or migrated. Re-enter
it for each intended origin if needed. Clearing a token removes only the
current origin's scoped token (and the old unscoped token); select another
user-level origin to clear its token.
For the direct REST commands, use the adapter's documented THEMIS_DEVDB_BEARER_TOKEN policy: the token is
sent only to the explicitly approved loopback origin and redirects are refused. Configure the
intended database explicitly; the regular DevDB, LLM DevDB, Gemma instances,
and traceability pilot have separate data volumes and may contain different
records. Profile isolation uses VS Code's profile-scoped globalState; profiles
that intentionally share extension state may share this namespace, but token
transmission still requires an explicit choice on every operation.
MCP usage and limitations
- Configure
themisdbDevdb.baseUrl at user level as a numeric loopback
origin such as http://127.0.0.1:28091 or http://[::1]:28091.
MCP rejects localhost to avoid trusting hostname resolution. Workspace
and folder overrides are ignored for both origin and timeout.
- Run Enable Unauthenticated Read-Only MCP and confirm the exact origin.
The extension neither contacts DevDB nor starts the server at enable time.
Approval lasts only in the current window/extension-host session. Origin or
timeout changes withdraw the definition; approve again for the new settings.
- In a connected VS Code Copilot session, open the MCP server/tool controls,
enable or select ThemisDB DevDB Read Only, and ask to use
themis_health, themis_trace_pr with a PR number, or
themis_analyze_pr_path_scope with one PR number,
themis_trace_issue with an issue number and pr_numbers candidate array,
themis_scan_issue_prs with an issue number and optional page parameters,
or themis_suggest_issue_prs with an issue number and optional top-N limit.
Confirm tool use when the host requests it. Forwarding, tool availability and approvals depend on
the Copilot harness and its policy; a standalone Copilot CLI does not load
this extension.
The extension publishes a complete stdio definition using the stable
vscode.lm.registerMcpServerDefinitionProvider API and the VS Code executable
in Node mode. The packaged dependency-free server enforces its six-tool
allowlist, validates inputs, rejects arbitrary paths and non-loopback origins,
and issues only fixed GETs and the fixed read-only scan/search POSTs described
above. It does not expose general AQL, general entity access,
mutation, graph, vector, inference or import tools. It has no dependency on a
workspace checkout or the Python adapter. The Python adapter has additional
tools and is not launched by this integration.
The MCP launch explicitly clears THEMIS_DEVDB_BEARER_TOKEN; it does not
read or pass stored extension credentials. Like other VS Code process launches,
it otherwise inherits the host environment; it is not an environment sandbox.
The MCP server does not read other credentials. Use only a local service you
trust; loopback ports can be reused by other processes. DevDB responses and
tool results may be shared with the selected Copilot model according to its
session settings. Do not select sensitive records.
Fatal MCP startup or transport failures write a fixed, non-data-bearing
message to stderr and exit unsuccessfully; input and error details are not
included in that message.
Disabling or changing settings withdraws the editor definition, but Copilot
may run a forwarded copy independently. Stop or disable it in the Copilot
session's MCP controls as well; do not assume withdrawal revokes an already
running forwarded process. The host may start the enabled server automatically
for discovery; no DevDB requests occur until a tool is called. Restarting the
window requires new approval. The returned data has the same documented
limitations as the adapter's tracing tools: closing-keyword references are
not exhaustive, snapshots may be partial or stale, and freshness is not checked.
The adapter contract and usage conventions may be consulted in a source
checkout that contains tools/themisdb-devdb-mcp/README.md and
.github/skills/themisdb-devdb/SKILL.md. These documents are not included in
the VSIX; their availability in any published repository is not assumed.
Verification record
The requester reported a live read-only check of the compiled client against
the pilot on port 28091: health was reachable and PR 351 file and commit
snapshots were present with matching head/base IDs. This is not a freshness
check against GitHub or an installed-extension test. A subsequent credential-free
MCP scan of one pilot row returned isError: true, unverifiable, and
missing_or_null_fixes_may_indicate_old_runtime_or_invalid_record; this is not
evidence of an absent link or a complete scan.
On 2026-11-27, both MCP implementations read the existing pilot's PR 351
snapshot and reported 0 src/, 0 tests/, and 3 docs/ Markdown paths.
For PR 120, both reported snapshot_not_imported with isError: true and
no counts. These observations describe only the stored snapshots, not GitHub
freshness or whether tests or documentation are sufficient.
On 2026-11-27, a disposable Docker probe rebuilt the AQL handler from the
worktree against the older llm-embed-test-build image and used only synthetic
records in temporary storage. Both Python and VS Code MCP scans distinguished
matching, nonmatching, and empty fixes arrays; the VS Code MCP scan rejected
a missing fixes field. The mixed-source probe is not a release image and did
not modify or validate the running pilot's data. It does not establish stable
pagination, global completeness, or Copilot-session integration.
The internal VSIX is built locally with pinned @vscode/vsce; its archive is
inspected for the expected VSIX metadata, manifest, README, repository license,
and runtime JavaScript files. The focused tests check the package file list,
license, MCP provider gating, and real stdio exchanges against a fake loopback
service, including the bounded PR path-scope analysis. An isolated VS Code 1.148.0 Extension Development Host test registered
the provider, simulated approval, discovered and invoked health, selected
issue tracing, the fixed issue scan, and bounded PR path-scope analysis through VS Code's MCP client against a fake
loopback service. This does not test
real consent interaction, Copilot forwarding or a Copilot-session tool call.
A secret scan
is not proof that no secrets are present. The
VSIX is not installed or published by packaging. This evidence does not
establish compatibility with every deployed DevDB image, correctness of
imported history, security certification, production readiness, or end-to-end
rollout safety.
On 2026-11-28, src/test/vscodeHost.ts was extended to assert that VS Code
discovers and invokes themis_suggest_issue_prs through its MCP client. The
fake loopback service returns a synthetic BM25 hit (pk: "42", score 1.25)
and a stored PR whose fixes array is exactly ["issue:7"]; assertions check
the tool result and request sequence. npm test compiles this source and
passes the Node test suite, but does not execute this Extension Host scenario.
The package has no @vscode/test-electron/vscode-test dependency or host-test
script. A code --extensionTestsPath=... launch with isolated user-data,
extension, and workspace directories returned exit code 0 but did not provide
evidence that the exported host test ran. The VS Code host also attempted to
start ambient GitHub/Playwright MCP providers; no calls to those providers were
made, so this launch is not counted as host-test evidence. The candidate-search
Extension Host invocation remains unverified; this is not a Copilot-session
end-to-end test.
A second attempt on 2026-11-28 used the direct Code.exe with fresh
user-data and extensions directories. It reached only the provider-registration
HOST PASS; before candidate-tool discovery or invocation, logs showed ambient
GitHub, MarkItDown, and Playwright providers entering starting, so the run
was aborted. No candidate-search HOST PASS or Extension Host exit code was
recorded. This does not establish Copilot-session end-to-end behavior.
A later attempt on 2026-11-28 used the installed VS Code executable with
dedicated user-data and extensions directories and an empty temporary workspace.
The host exited with code 0 and logged all seven HOST PASS markers, including
BM25 candidate discovery and invocation against the synthetic loopback service.
The Copilot Agent host still automatically moved its ambient GitHub and
Playwright MCP servers to starting; MarkItDown failed during startup. The
captured test log contains no invocation of those ambient tools, but this run
was not fully isolated and should not be repeated until their automatic startup
can be suppressed. This verifies the VS Code MCP client test only—not a
natural-language Copilot-session tool call, real DevDB access, or Docker
end-to-end behavior.