Skip to main content

arkitekt-lsp

The Arkitekt language server. It shows what arkitekt check finds in your app, underlined in the BSX of the blok it is about, in any editor that speaks LSP.

uv add --dev arkitekt-lsp   # in the app's project: the server imports the app with its environment

The editor starts arkitekt-lsp (stdio) from that environment. Then:

  • on save of a Python file it runs arkitekt check --json-out for the app the file belongs to, in a child process, and publishes every finding at its blok's string literal: the node's tag, or the line and column of a parse error. Findings follow their blok as the code moves; a blok edited since the check drops them until the next save, and is checked as you type;
  • as you type what its BSX says, against what the last check said the blok declares: its deps.*, args.* and locals. A blok no check has seen yet is judged by the language alone, and a query's value always waits for the next save.

All of this is local: the server talks to nothing, except to pull a published catalog a blok names (see below).

Who would satisfy your dependencies (--connect)

arkitekt-lsp --connect                     # or the setting arkitekt.server.connect
arkitekt-lsp --server https://my.hub       # or arkitekt.server.url; the default is https://go.arkitekt.live

A flag overrides what the editor configures.

With the flag, the server also logs in, as an app of its own, with a token that can only read (rekuest_read). It registers no agent. For each dependency protocol your app declares it asks who would satisfy it, nothing registered, so a protocol you just wrote is asked about on save:

  • above the protocol, a count: 3 agents · 2 connected, and the slots nobody offers;
  • a warning (information, for an optional one) when too few do. Never an error: what is missing may simply not be running yet;
  • on hover of the protocol, or of deps.<key> in a blok, the agents and the count per slot.

A login nobody approves or a server that is gone leaves the server local, and says so.

An editor can also write a dependency for you: the request arkitekt/rekuest/offers ({uri?}) lists the agents with what each offers, and arkitekt/rekuest/declare ({uri, agent, className, actions, states}) writes the @app.declare class of what was picked, as an edit the editor applies. A structure, a model or an enum is written as the class your app's registry has for it, services included (arkitekt>=11.4's report lists them); one it has none for leaves that action as a comment naming it. The next save re-reads the registry, so adding the service is enough.

An editor can start this itself: the notification arkitekt/rekuest/login ({url?}) connects now, also after a failure, and the request arkitekt/rekuest/logout leaves, revokes the login and forgets it ({forgotten}). One that sets clientShowsLogin in its initialization options is told arkitekt/rekuest/challenge ({url, code, link, expiresIn}) instead of getting a plain message.

Which app: the saved file when it declares one (App(), else the arkitekt.target setting, else the project's default (ARKITEKT_APP, or app.py). A project is the nearest directory with a pyproject.toml. A file with several Apps and none named app needs a target that names one (many.py:api), which then wins for that file. Changing the target checks the open files again. The request arkitekt/apps ({} → {apps: [{target, file, line, project}], target}) lists the apps of the workspace, by reading its files without importing any, for a client to offer.

Settings (initialization options, or workspace/didChangeConfiguration under arkitekt): check.onSave (default true), check.timeout (seconds, default 120), check.warnOnFStrings (default true), target, catalogs.

The catalog a blok is written for

A blok names one catalog (app.blok(..., catalog=...)), the base catalog when it names none. The base catalog and the Orkestrator's ship with arkitekt-spec. Any other is published at an address, and is pulled from there:

  • catalogs (a list of addresses) is what every check pulls first (arkitekt check --catalog), so the bloks written for one are held to it. Changing the list checks the open files again;
  • a blok edited since its check is read against the catalog it names, pulled once per session;
  • the request arkitekt/catalog ({id, refresh?} → {id, catalogs: [json, ...], error}) hands a client the catalog and those it extends, as published, the one nearest the base first, without those that ship: what an editor registers to complete against it.

Only an address is ever pulled: https:// only (a redirect elsewhere is refused), capped in size and time, and read as data (JSON, checked to be the catalog that was asked for). Nothing of it is run. What was pulled is kept ($ARKITEKT_CATALOG_CACHE, else ~/.cache/arkitekt/catalogs) and used when the address cannot be reached. A catalog that cannot be had leaves what it adds unchecked; the base catalog still is checked.

A blok written as an f-string with a field gets a warning at its opening quote (blok.generated): Python fills it in once, when the app starts, so it can't follow the app as it runs the way <foreach> and <if> can. arkitekt check still checks what it evaluates to. The warning is the editor's, because a check only ever sees the finished string.

Besides the standard protocol it answers bsx/regions ({textDocument: {uri}} → {regions: [{start, end, value, root, context, kind, exact}]}), the blok literals of a document, which the VS Code extension uses to complete BSX inside Python strings. It notifies arkitekt/status ({state: checking|ok|failed, app, errors?, warnings?, message?}) and takes the notification arkitekt/check ({textDocument: {uri}}) to check now.

Metadata

Release files for arkitekt-lsp 3.0.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 arkitekt-lsp 3.0.0
File Size Uploaded Provenance Actions
arkitekt_lsp-3.0.0.tar.gz 40.8 kB Without provenance Details for arkitekt_lsp-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for arkitekt-lsp 3.0.0
File Interpreter ABI Platform Actions
arkitekt_lsp-3.0.0-py3-none-any.whl Python 3 none any Details for arkitekt_lsp-3.0.0-py3-none-any.whl

Total release size: 87.3 kB

Release files / arkitekt_lsp-3.0.0.tar.gz

Download URL arkitekt_lsp-3.0.0.tar.gz
Size 40.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cc0e3bbec6bda2c1e4aebd266cdc61fd97a096528067cf7a264d74a9e5a8cb0a
BLAKE2b-256 checksum
How to use checksums
bf86491b0b4248290c5e434e8a3e09d3773b0092e8fad2a39643186cb3b38e42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / arkitekt_lsp-3.0.0-py3-none-any.whl

Download URL arkitekt_lsp-3.0.0-py3-none-any.whl
Size 46.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84a5c8fb929f712be2ca3ff994c243648b68318315a783b2a797f8965af8fc02
BLAKE2b-256 checksum
How to use checksums
2014dad9039f45bab70071c0cba4a7f7f1c5c663c4e9087b7c941cb6d43d450d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for arkitekt-lsp 3.0.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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