Skip to main content

doorstop-vscode-server

A small FastAPI server that wraps the Doorstop Python API directly (instead of shelling out to the doorstop CLI). It is designed to serve exactly one client — the Doorstop VS Code extension — and answers requests strictly one at a time; there is no concurrent request handling.

Install (editable, for development)

pip install -e .[dev]

Run

python -m doorstop_server --project <path-to-doorstop-project-root> --host 127.0.0.1 --port 7867

or, after installing:

doorstop-vscode-server --project <path-to-doorstop-project-root> --host 127.0.0.1 --port 7867

API

See src/doorstop_server/routers/ for the endpoint implementations. GET /health and GET /validate are the only routes not serialized behind the request lock. /validate hands the check to a long-lived worker process with its own read-only copy of the tree (validation_worker.py, spec 032), so a running check does not slow other requests down.

  • GET /tree — every document with its items in Doorstop's own order (level, then UID); inactive items included (routers/tree.py)
  • POST /documents/{prefix}/items — create an item; optional level, or after (UID of an item of the same document: the new item gets Doorstop's "append after" level and the followers are renumbered), plus header / text (routers/documents.py)
  • PATCH /items/{uid} — set header and/or text through Doorstop's own setters, one file write (routers/items.py)
  • DELETE /items/{uid} — remove the item and renumber the document like doorstop remove (routers/items.py)

Tests

The test suite exercises the real FastAPI app against a temporary Doorstop project (no mocking of Doorstop itself), so it doubles as a pinned-down contract for the HTTP interface — every request/response shape, status code, and error format a test asserts on is something the extension can rely on.

pip install -e .[dev]
pytest
  • tests/conftest.py — shared fixtures (client, project_root, document) and a set_item_text helper for mutating an item directly via the Doorstop API (bypassing the server) to simulate out-of-band edits.
  • tests/test_serialization.py — proves the one-request-at-a-time guarantee black-box: fires concurrent /items calls and checks for zero UID collisions/gaps, rather than inspecting the lock directly.
  • tests/test_errors.py — pins down the structured {"error": {"code", "message"}} shape for both expected (DoorstopError) and unexpected exceptions.

Doorstop version coupling

src/doorstop_server/validation_rules.py recognises Doorstop's validation output by matching its message wording, because Doorstop 3.2 yields issues as bare DoorstopError / DoorstopWarning / DoorstopInfo objects carrying nothing but a string - no check id, no item reference, no field.

CHECK_TABLE in that file is therefore pinned to Doorstop 3.2. On a Doorstop upgrade, re-check it: run the test suite first (several tests assert exact check ids against real Doorstop output and will fail loudly if the wording moved), then compare against contracts/validation-api.md section 2 in the extension repo.

Two things limit the damage of a missed change:

  • An unmatched message is never dropped. It is returned as check: "unknown" with field: null at Doorstop's own severity, so the user still sees the problem - only its placement degrades to the item's first line.
  • The coupling lives in exactly one named file.

GET /validate must also keep running under read_only_validation(). Doorstop's validation rewrites requirement files with its shipped defaults: a plain get_issues() pass over a 9-item project rewrote 7 files and silently stamped away a suspect link instead of reporting it. test_validate_writes_nothing is the regression test for this.

Metadata

Release files for doorstop-vscode-server 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for doorstop-vscode-server 0.3.0
File Size Uploaded
doorstop_vscode_server-0.3.0.tar.gz 58.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for doorstop-vscode-server 0.3.0
File Interpreter ABI Platform
doorstop_vscode_server-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 94.6 kB

Release files / doorstop_vscode_server-0.3.0.tar.gz

Download URL doorstop_vscode_server-0.3.0.tar.gz
Size 58.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e12c70483ff7d958dc885f48c2d256f0eec007ee106f6c5a9e9c7b575de84586
BLAKE2b-256 checksum
How to use checksums
182494d71cc55aae1a7c7f0ab117ae76c1032f99624d3638b32a8adbc6d043dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / doorstop_vscode_server-0.3.0-py3-none-any.whl

Download URL doorstop_vscode_server-0.3.0-py3-none-any.whl
Size 35.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7cc3c7608caae45953c4f4ae1f6d6211a99933ed47bc68b84e6b0c9991f688b2
BLAKE2b-256 checksum
How to use checksums
8b85f7be99c8626a5756584e8c2992b10966b1cefcd10c9c8aef61c999d25f97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page