Bynk for VS Code

Language support for the Bynk language
(.bynk files) in Visual Studio Code: syntax highlighting plus full language
features backed by the
bynk-lsp language
server, which the extension finds or downloads for you.
The extension activates on any .bynk file, or on any workspace containing a
bynk.toml.
Install it from the Visual Studio Marketplace (bynk-lang.bynk-vscode), or run
code --install-extension bynk-lang.bynk-vscode.
Features
The features are grouped below: the editor, testing and debugging, running and
deploying, views of the project, and AI assistance. Each command is listed again
under Commands, and each setting under Settings.
Editing
- Syntax highlighting — a TextMate grammar, mirrored from the
tree-sitter grammar
(the source of truth).
- Colour themes — Bynk Dark and Bynk Light, one palette in two
schemes (amber keywords, cyan types, teal capabilities), with colours for the
language server's semantic tokens (capabilities, services, agents, providers,
annotations) as well as the grammar's scopes. Pick one with Preferences: Color
Theme. Every token colour holds 4.5:1 contrast on the editor background; the
themes are the same palette as the playground.
- Bynk in Markdown —
```bynk and ~~~bynk fenced code blocks in
Markdown files are highlighted in the editor with the same grammar. (VS
Code's built-in Markdown preview highlights with highlight.js, not TextMate,
so fences there stay plain.)
- Markdown in doc comments — the Markdown in
--- doc-blocks and --- text
one-line docs is highlighted: headings, emphasis, inline code, links, list and
quote markers, and ```bynk examples as Bynk. With
bynk.inlineDocRendering.enable the comments are also rendered in place.
- Live diagnostics — errors and warnings as you type, exactly as
bynkc check reports them, each tagged with its dotted category.
Bynk: Explain Diagnostic Code… (and the Explain quick fix) shows the
installed compiler's explanation of a code, offline.
- Hover — type signatures and doc blocks. Hover a refined type for example
values and a box that checks a value you type (Explore Refined Type).
- Go-to-definition and find references for types, functions,
capabilities, services, and agents.
- Rename — workspace-wide and validated.
- Completion, inlay hints (inferred types), and semantic tokens
(type-aware highlighting).
- Code actions — quick fixes for diagnostics that carry a suggestion,
Fill match arms for a non-exhaustive
match, Inline variable,
Generate provider stub, Organise uses/consumes
(source.organizeImports) and Fix all (source.fixAll.bynk). Run them on
save with "editor.codeActionsOnSave": { "source.organizeImports": "explicit", "source.fixAll.bynk": "explicit" } in a "[bynk]" settings block.
- Formatting and range formatting via
bynk-fmt (honours
editor.formatOnSave).
- Document & workspace symbols and document highlights.
- Why does this need
Logger? — hover a capability in a given clause for
the shortest chain of agent-handler calls from that declaration to the
capability's use, each step a link to source; the Show capability path
quick fix opens a peek over every chain.
- Compiled output — Bynk: Show Compiled Output opens the TypeScript the
compiler emits for the active file, read-only, beside it. It is compiled from
your unsaved buffers, and the cursor in either editor highlights the matching
lines in the other.
- Explorer decorations — a two-letter badge naming each file's context, a
red tint on files whose tests failed in the last run, and a warning tint on
files with a contract break. Each is a setting (
bynk.fileDecorations.*).
bynk.toml editing — completion, hover and validation for every table and
key of the project manifest, from the
bynk.toml JSON Schema this
extension associates with it. A TOML extension that reads JSON Schemas does the
editing: install Even Better TOML
(recommended, not required; the extension suggests it once, the first time you
open a bynk.toml without it).
- Dependencies — Bynk: Add Dependency… looks an
org/package up in the
registry, offers its versions and adds it; Fetch Dependencies fetches them;
a CodeLens in bynk.toml shows when a newer version is available (Upgrade
Dependency; turn it off with bynk.dependencies.upgradeLenses);
Bynk: Publish… shows the package, version, registry and file list and
publishes only after you confirm. Every registry query goes through bynk.
- Status bar — the active project name (click to open
bynk.toml) and the
language-server state (click to show its output).
Testing
Run a project's test and integration blocks from the Testing view (or
Bynk: Run Tests). The extension runs bynk test --format ndjson, so each
case's result appears as that case finishes, with its duration (a bynk that
predates the stream is run with --format json instead). Compile failures land
in the Problems panel, and a failing assertion links to its .bynk line.
- Doc examples. A suite with doc-comment examples shows a Doc examples
node holding them (they also carry the
doc-example tag for the view's
filter). Run the node to run just those cases; run the suite to run everything.
- Running a selection. What you select is what runs and what is reported:
any selection of cases and suites is one
bynk test process, narrowed with
--suite and a repeated --case, and only the tests you picked are reported.
(A bynk that predates the set filter is run as before: one process per case
for a handful of cases, and the whole project for more.) A suite whose tests
are all declared in one file opens that file, and Bynk: Run Tests in This
File (also in the editor's context menu) runs every test declared in it.
- In the editor. A
▷ Run Test | Debug Test CodeLens (and native gutter
run/debug glyphs) sit at each test; disable the lens with bynk.testCodeLens.
- Tiers. Each test is tagged with its tier (
unit, integration or
system; set by an as clause on its case or suite), so the Testing
view's filter selects by tier.
- Coverage. Run with Coverage runs
bynk test --coverage: the Test
Coverage view shows each .bynk file's line percentage and the gutter marks
covered and uncovered lines (line level; it needs tsc and node). On a
single test case it measures that case alone and the run is named for it
(Coverage: <case>); on anything else it measures the whole project and says
so in the run output. Reports are never merged across runs, and a case's
report is not a slice of the whole project's.
- Watch. The Run profile has a Watch toggle (continuous run). With it on
for an item, saving a
.bynk file or bynk.toml, or changing one outside the
editor, reruns that item after a one-second quiet period; several saves in a
burst are one rerun. A change during a run cancels it and starts a new one, so
runs never overlap and a cancelled run reports nothing. Turning Watch on does
not itself run the tests. A failure to run (a missing bynk, a crashed
runner) is offered once per Watch session and noted in the run output after
that, and a compile failure still reaches the Problems panel on each run.
Debug, Coverage and Run against… are not continuous.
- Run against a target. The Run against… profile runs the
system
tests against a target: dev (a local bynk dev the driver starts and stops)
or a target declared under [test.targets] in bynk.toml, with the last
choice remembered. A deployed target keeps its state between runs, and the run
output says which target ran. The extension only passes a target's name: the
driver refuses a bare URL and a production = true target, and its message is
shown. A test that uses what a deployed target cannot honour (advance Clock,
say) refuses the run, with a Retry, skipping unsupported cases action. A
test a remote run skipped shows as skipped, with the driver's reason in the run
output, not as a failure. Run against a target is run-only, not offered for
Debug or Coverage.
- Property tests. A failed
property or history property shows its seed and
counterexample as parts of the failure. Re-run with This Seed (on the
test, in the Testing view) runs that one test again with --case and --seed
and reproduces it. Pin This Seed keeps the seed in the workspace (never in
bynk.toml or source), shows it beside the test, and passes it to a run of
that one test; a suite or whole-project run always draws a fresh seed. A pin is
shown as stale, and not passed, once the property tests of its suite change (an
added, removed or reordered one), because the seed could then draw a different
stream; Unpin Seed clears it.
- Agent invariants. A failure that an agent's
invariant or transition
caused names it: a line such as Violated invariant Wallet.nonneg that opens
the declaration. A failed history gets one line for each step the agent refused
(Step 2 (Spend) was refused by invariant Wallet.nonneg), because a refused
step is recorded as data and would otherwise not show which declaration
refused it; the line opens the declaration, and a second line opens the handler
the step called when the language server can place it. A declaration line the
driver could not place opens the failed test instead. A refusal in a system
suite or a remote run is not reported, since the agent runs behind the service
boundary and the case never sees it.
Debugging
- Debugging — set a breakpoint in a
.bynk file and press Debug: in the
Test Explorer (Node, bynk test --inspect) or via a bynk launch.json
config for the dev-server worker (workerd, bynk dev --inspect). On one test
it debugs just that case; on a suite or several tests it debugs that selection
as one run (a bynk that predates the set filter debugs the whole project and
says so). Delegates to VS Code's JavaScript debugger; breakpoints resolve to
the exact .bynk statement through the emitted source maps.
bynkc: check build task — type-check the whole project on demand, errors
routed to the Problems panel.
Running and deploying
- Dev server — Bynk: Start Dev Server (or the
bynk: dev task) serves
the project, or one context you pick, with bynk dev. A status-bar item shows
what is serving (dev: 3 contexts); click it to open or copy a context's URL,
or to stop or restart the server. A failing rebuild lands in the Problems panel
and clears on the next good one. The task works as a preLaunchTask: it
counts as started once every context answers.
- Worker logs — Bynk: Show Worker Logs opens the Bynk Logs output
channel with the dev server's workers' output, tagged by context. A stack
frame is rewritten by the driver to its
.bynk line, so Ctrl/Cmd-click opens
the source that threw. Filter Worker Logs narrows by level and context.
The last 5,000 lines are kept in memory only; nothing is written to disk.
- Plan-first deploy — Bynk: Deploy… picks an environment and a scope,
shows the
bynk deploy --dry-run plan (upload order, what each context
creates or sets, required secrets, orphans), and only then runs bynk deploy
in a terminal, where the driver asks you to confirm. The extension never passes
--yes or --prune, and never handles a secret value.
- State migrations — the sidebar's State Migrations node shows
bynk migrate status for each agent class (version, floor, live and
retirable migrate steps, environments) and links to its agent state view.
Bynk: Sweep State Migrations… shows the sweep plan and runs bynk migrate sweep in a terminal for you to confirm there; production environments first
ask you to type their name.
- Send Request — the
Send request CodeLens above a from http handler
(or Bynk: Send Request) opens a panel that sends that handler a request on
the dev server. It has a field per :name path parameter, a headers box
(shared by the context's routes, so an Authorization header is typed once)
and, for a route with a body, a JSON body pre-filled from the body's type.
It shows the response's status, timing, headers and body, pretty-printed when
it is JSON. It follows the cursor from handler to handler unless pinned, keeps
what you typed per route, and offers to start the dev server when none is
running. The request is sent by the extension, only ever to the URL the dev
server reports for the handler's context.
- Export OpenAPI — Bynk: Export OpenAPI… writes an OpenAPI 3.1 document
for the project's
from http services with bynk openapi, as JSON or YAML by
the file name you choose. It needs a bynk that has the command, and offers to
save unsaved Bynk files first, since the export reads from disk.
- Doctor — Bynk: Doctor shows
bynk doctor's readiness checklist
(compile, test, dev and deploy, editor) with each gap's remedy as buttons: run
it in a terminal after you confirm, open a link or setting, or copy it. A test,
debug or dev-server failure on a missing tool offers Run Doctor.
- Review pending npm requirements — when a check, dev or deploy-plan run
reports an npm package awaiting
bynk approve, it appears in Problems, as a
badge on the Bynk view, and in a notification with Review…. Bynk:
Review Pending npm Requirements… shows each package, what asks for it and
why, and approves one package at a time; Approve all asks you to confirm.
Views of the project
- Project sidebar — a Bynk view in the activity bar lists the project's
contexts, commons, adapters, and test suites. Each unit expands to its
declarations (services and agents expand to their handlers) and to
Consumes / Consumed by groups for its
consumes edges. Every node
opens its source; handler nodes have inline Sequence Diagram and
Wire Contract actions, and unit nodes Show Documentation. The view
refreshes on the same trigger as the live views below.
- Live model views — the sequence diagram, documentation page, architecture
map, wire contract, agent state view and contract diff (see Commands) open
beside the editor and stay current: they refresh when you save (or as you type,
with
bynk.views.refresh), the sequence and wire-contract views follow the
cursor from handler to handler (pin one to freeze it), and open views come back
after a window reload. Open them from the editor title bar, the Command
Palette, the Show Sequence CodeLens above each handler, the Show State
CodeLens on each agent, or an optional Wire contract CodeLens beside a
handler's (bynk.viewsCodeLens). The agent state view follows the cursor from
agent to agent.
- Contract diff — Bynk: Show Contract Diff lists every boundary change
since
bynk.schema.lock (events and agent state), each classified compatible
or breaking, and every service contract whose hash differs from the live
record in bynk.deploy.lock. For a service change the view shows the
compatible/breaking verdict and the reasons behind it, when the language
server has them.
AI assistance
- Tools for AI agents — language-model tools a chat agent in VS Code
(Copilot's agent mode, or another extension) can call to ask the installed
toolchain instead of guessing:
bynk_get_diagnostics,
bynk_explain_diagnostic, bynk_describe_symbol, bynk_get_documentation,
bynk_get_architecture, bynk_get_wire_contract, bynk_check and
bynk_search_book (the Book text of your installed bynk, labelled with its
version). All are read-only. Refer to one in chat with #, for example
#bynkExplain.
@bynk chat participant — @bynk /explain, /learn, /architecture and
/fix in the Chat view, answering from those tools and citing their sources.
/fix proposes an edit as a diff you apply with a button; it never applies one
itself. A proposed fix, and the examples /learn shows, are compiled with
bynk compile before they are shown (your unsaved buffers included, nothing in
the project changed): the answer says whether the fix checked clean, and a fix
that could not be checked is offered as Apply unchecked fix.
All .bynk language features come from bynk-lsp; the extension is the
client that provisions and launches it.
In the browser (vscode.dev, github.dev)
The extension also runs as a web extension, so opening a Bynk repository in
vscode.dev or github.dev (press
. on a GitHub repository) needs no install. There is no bynk-lsp
in a browser: a web worker runs the Bynk compiler built to WebAssembly
(bynk-wasm, the engine behind the playground) and provides:
- syntax highlighting, snippets and inline doc-comment rendering;
- live diagnostics;
- hover (the inferred type at the cursor);
- completion;
- Copy Playground Link and Open in Playground.
A workspace folder with a bynk.toml at its root is read as a project
(its bynk.toml and every .bynk file below it, honouring [paths]), and
analysed as a whole, so a uses of a sibling commons resolves, and every
file's errors show in the Problems panel, open or not. The status bar reads
Bynk (web). A .bynk file outside every project is analysed on its
own (Bynk (web, single-file)): a name from another unit can't resolve
there, so those errors, and the unresolved-name errors they cause, are hidden
rather than shown as false errors. Everything that needs a process or a local
filesystem is desktop-only and hidden on the web: tests, debugging, the dev
server, deploy, Bynk: Doctor, the getting-started walkthrough, tasks, scaffolding, the server download, the Bynk project
sidebar, the sequence, documentation, architecture and wire-contract views,
diagnostic explanations, and the AI-agent tools other than
bynk_get_diagnostics and bynk_describe_symbol. Their settings still show in the Settings editor (VS
Code can't hide a setting per host) but do nothing on the web. Open the folder
in desktop VS Code for the full language server.
The language server
The extension needs the bynk-lsp binary and resolves it in this order, most
explicit first:
- the
bynk.executablePath setting, when set;
bynk-lsp on your PATH (a dev or global install), or bynkc-lsp, its name
before bynk v0.510, if there is no bynk-lsp;
- a copy previously downloaded by the extension;
- otherwise it downloads the release matching this build for your platform
from GitHub, verifies it against the release
SHA256SUMS, and caches it.
So in the common case the extension just works — no manual server install. The
version it downloads is pinned per extension build (bynkServerVersion in
package.json); if a bynk-lsp already on your PATH reports a different
version, the extension warns but still uses it.
If no server can be provisioned — an executablePath that doesn't resolve, an
unsupported platform, or a failed download — the failure is loud and actionable
(an error notification, a status-bar indicator, and commands to retry) rather
than silently degrading to grammar-only highlighting.
On a platform with no prebuilt server, build it from a checkout of the
bynk repository and point the setting at it:
cargo build --release -p bynk-lsp # → target/release/bynk-lsp
Checking, testing, bynk dev, debugging and deploy run the bynk driver, which
compiles in-process: there is no separate bynkc to install (since bynk
v0.510.34). You don't need Rust or cargo install for it. The extension
resolves bynk the way it resolves the server:
- the
bynk.bynkPath setting, when set;
bynk on your PATH;
- otherwise it downloads
bynk from the same release as the server,
verifies it against SHA256SUMS, and caches it beside the server.
The downloaded copy also goes on the PATH of new integrated terminals (after
your own PATH, so an install of yours still wins), so bynk dev and
bynk deploy work there too. Run Bynk: Install Toolchain to fetch it on
demand, or set bynk.toolchain.autoInstall to false to manage it yourself.
Node, tsc and wrangler are separate prerequisites; Bynk: Doctor checks
them.
A release cut before this binary was published has none to download; that
shows as "not installed" in the Bynk LSP output, and the install guide applies.
Commands
Available from the Command Palette under Bynk:
| Command |
What it does |
| Bynk: Restart Language Server |
Re-provision and restart the server. |
| Bynk: Download Language Server |
Force a fresh download of the pinned server. |
| Bynk: Show Language Server Output |
Open the "Bynk LSP" output channel. |
| Bynk: Open Project Config (bynk.toml) |
Open the workspace's bynk.toml. |
| Bynk: New Project / Bynk: New Context |
Scaffold a project or a context file. Works without the server, and never overwrites an existing file. |
| Bynk: Run Tests |
Run the project's tests via bynk test --format ndjson and report them in the Testing view as each case finishes. |
| Bynk: Run Tests in This File |
Run every test declared in the active .bynk file (or the file you right-click). |
| Bynk: Run System Tests Against… |
Pick a target (dev or one from [test.targets]) and run the project's system tests against it (bynk test --against). |
| Bynk: Debug Tests |
Run the tests under the inspector, so breakpoints in .bynk sources pause. |
| Bynk: Show Sequence Diagram |
A sequence diagram of the handler at the cursor: its capability, context, and agent calls, and — in an agent's handler — its writes to the agent's own state, as notes. Follows the cursor into other handlers unless pinned. |
| Bynk: Show Documentation |
The active file's declarations, rendered as a reference page. |
| Bynk: Show Architecture Map |
A whole-project map of contexts and adapters, their consumes edges, and what each one binds. |
| Bynk: Show Wire Contract |
The JSON wire shape of the service handler at the cursor. Follows the cursor into other handlers unless pinned. |
| Bynk: Send Request |
Send the HTTP handler at the cursor a request on the dev server: path parameters, headers and a JSON body pre-filled from its type, then the response. Follows the cursor into other handlers unless pinned. |
| Bynk: Show Agent State |
The state machines of the agent at the cursor: for each store Cell of an enum or sum type, a state diagram generated from its handlers and a handler × state table of what each handler does from each state, with moves a transition would refuse at commit marked ⚠, and each handler's effects — what it writes, reads and calls on each path (shown instead for an agent with no state field). Follows the cursor from agent to agent, highlighting the handler under it. |
| Bynk: Show Contract Diff |
Boundary changes since bynk.schema.lock and service contracts that differ from bynk.deploy.lock's live record, each marked compatible or breaking. Refreshes when either lock changes. |
| Bynk: Show Compiled Output |
The TypeScript the compiler emits for the active file, read-only, beside it. Compiled from your unsaved buffers through bynk compile; the cursor in either editor highlights the matching lines in the other, and the output follows your edits. |
| Bynk: Explain Diagnostic Code… |
The installed compiler's explanation of a diagnostic code, in a panel, offline: pick a code from the Problems panel or type one. The Explain quick fix on a diagnostic opens the same panel. |
| Bynk: Explore Refined Type |
Opened by the Try values… link in a refined type's hover: example values from the type's domain (fixed seed, so they stay put) and a box that checks a value you type against the predicate, naming each clause that fails. Runs none of your project's code. |
| Bynk: Install Toolchain |
Download bynk and bynkc (checksum-verified) and put them on the PATH of new integrated terminals. |
| Bynk: Start Dev Server |
Serve the project with bynk dev in a terminal. In a multi-context project it asks which context to serve (All contexts first). |
| Bynk: Stop Dev Server |
Stop the dev server and every worker it started. |
| Bynk: Restart Dev Server |
Stop the dev server and start it again with the same contexts. |
| Bynk: Dev Server Menu |
The status-bar item's menu: open or copy a context's URL, stop or restart. |
| Bynk: Show Worker Logs |
Open the Bynk Logs channel: the dev server's workers' output, with stack frames at their .bynk lines. |
| Bynk: Filter Worker Logs |
Show only some levels (all, warnings and errors, errors) and some contexts. |
| Bynk: Clear Worker Logs |
Empty the log buffer and the channel. |
| Bynk: Deploy… |
Pick an environment and a scope, review the dry-run plan, then deploy from the plan in a terminal. bynk asks you to confirm before it changes anything. |
| Bynk: Show Deploy Plan |
The same plan for review only. It never deploys. |
| Bynk: Tail Deployed Logs… |
Pick an environment (and a context, when there are several) and stream the deployed Worker's logs with bynk tail, in a terminal, with stack frames at their .bynk lines. Needs a bynk with the command (v0.436.0 or newer). |
| Bynk: Copy Playground Link / Bynk: Open in Playground |
Share the selection (or a single-file program, whole) as a playground link. The code is compressed into the URL fragment, so it never reaches a server; a snippet too large for a link is refused, not truncated. Also in the editor context menu, and on the web. |
| Bynk: Export OpenAPI… |
Write an OpenAPI 3.1 document for the project's from http services (bynk openapi), as JSON or YAML by file name. |
| Bynk: Add Dependency… / Bynk: Fetch Dependencies |
Look an org/package up in the registry and add a version (bynk add); fetch the project's dependencies (bynk fetch). |
| Bynk: Publish… |
Show the package, version, registry and files (bynk publish --dry-run), and publish after you confirm. |
| Bynk: Show Capability Path |
Open the peek over every chain of agent-handler calls from a given capability to its use. Offered as a quick fix. |
| Bynk: Sweep State Migrations… |
Show the sweep plan and run bynk migrate sweep in a terminal. |
| Bynk: Review Pending npm Requirements… |
Review the npm packages dependencies' adapters ask for and approve them per package (bynk approve). |
| Bynk: Doctor |
Check whether this machine can compile, test, serve and deploy Bynk, with a remedy for each gap. |
The model views (sequence diagram, documentation, architecture map, wire
contract, agent state, contract diff) are also buttons on the editor title bar of a .bynk file. Each
refreshes on the trigger bynk.views.refresh sets, has a Refresh button of
its own, and is restored after Developer: Reload Window.
Settings
| Setting |
Default |
Purpose |
bynk.executablePath |
"" (auto-resolve) |
Absolute path to a bynk-lsp binary to use. When empty, the extension resolves the server automatically (see above). |
bynk.bynkPath |
"" (bynk on PATH) |
Path to the bynk driver used by the bynkc: check task, the Test Explorer, debugging, and the dev server. When empty, bynk is taken from PATH, then from the toolchain the extension downloaded. |
bynk.toolchain.autoInstall |
true |
Download bynk when neither bynk.bynkPath nor PATH has a bynk. |
bynk.compilerPath |
"" |
Deprecated, ignored. It pinned a bynkc for bynk (as BYNK_BYNKC). bynk compiles in-process since v0.510.34, so there is nothing to pin; remove the setting. |
bynk.trace.server |
off |
Trace LSP protocol traffic (off / messages / verbose) in the "Bynk LSP" output channel. |
bynk.inlayHints.enable |
true |
Show Bynk inlay hints (both kinds below). A persistent, Bynk-only preference; takes effect on the next edit or scroll. |
bynk.inlayHints.types |
true |
Inferred-type hints on let bindings and lambda parameters. |
bynk.inlayHints.parameterNames |
true |
Parameter-name hints at call arguments. |
bynk.docLinks.reportUnresolved |
hint |
How a [Name] doc-comment link that resolves to nothing is reported: off, hint (faint dots) or warning. A did-you-mean quick fix offers the closest in-scope names; escape intentional brackets as \[TODO] or put them in a code span. |
bynk.testCodeLens |
true |
Show a Run Test \| Debug Test CodeLens above each test case: Run Test runs just that case (bynk test --case <name>), Debug Test runs it under the inspector. The native gutter icons appear regardless. |
bynk.debug.semanticValues |
true |
Show values in the debugger in Bynk's vocabulary (Ok(42), not {tag: "Ok", value: 42}), including the inline values beside the code while paused (VS Code's debug.inlineValues). |
bynk.inlineDocRendering.enable |
true |
Render --- … --- doc comments in place with light Markdown styling while reading the source. |
bynk.views.refresh |
onSave |
When open model views re-request their model: onSave, onType (about 500 ms after the last edit), or manual (the view's Refresh button). A hidden view catches up when shown. |
bynk.viewsCodeLens |
false |
Show a Wire contract CodeLens above each service and agent handler, beside the Show Sequence lens. |
bynk.sendRequest.codeLens |
true |
Show a Send request CodeLens above each from http handler, opening Bynk: Send Request. |
bynk.fileDecorations.contextBadge |
auto |
Two-letter Explorer badge naming each file's context (and each test file's), with the full name in the tooltip. Commons and adapters carry none. |
bynk.fileDecorations.failedTests |
true |
Tint a file red in the Explorer (and its folders) when a test in it failed in the last run. |
bynk.fileDecorations.contractBreaks |
true |
Mark a file in the Explorer (and its folders) with a ! badge and a warning tint when the language server reports a contract break in it against bynk.schema.lock. |
bynk.dependencies.upgradeLenses |
true |
Show an upgrade CodeLens above each registry dependency in bynk.toml when a newer version exists. Each package is looked up at most once per session. |
bynk.dev.basePort |
empty (8787) |
First port the dev server allocates (bynk dev --base-port): context i is served on this port + i. |
bynk.dev.args |
[] |
Extra arguments forwarded to wrangler dev after -- (for example ["--var", "KEY:value"]). |
A bynk: dev task in tasks.json can narrow the contexts and move the ports,
and serve as a debug configuration's preLaunchTask:
{
"label": "serve orders",
"type": "bynk",
"command": "dev",
"contexts": ["commerce.orders"],
"basePort": 9000
}
The dev server and a mode: "dev" debug session bind the same ports, so
starting that debug session while the dev server runs asks whether to stop it
first.
Two built-in VS Code settings also apply:
editor.inlayHints.enabled — the instant, editor-wide on/off for inlay hints (toggles immediately). Use bynk.inlayHints.enable when you want hints off for Bynk specifically and left alone elsewhere.
editor.semanticHighlighting.enabled — turns semantic tokens (the type-aware highlighting) on or off. The extension ships theme fallbacks for Bynk's capability / service / agent / provider / actor / messages / asset token types, so they colour out of the box.
Build & install from source
Clone this repository, then from its root:
npm install
npm run package # bundle, then package a .vsix
code --install-extension bynk-vscode-*.vsix
npm run package bundles the extension with esbuild
and packages it with @vscode/vsce
(both dev dependencies). Use npm run build alone for a plain bundle, or
npm run watch while developing — it rebuilds src/extension.ts only, so
re-run npm run build after changing a webview under src/webview/.
npm run check type-checks and npm test runs the extension tests.
The web extension needs the bynk-wasm module, which npm run fetch:wasm
downloads from the pinned compiler release into wasm/; npm run build:web
then bundles out/web/. npm run package runs both bundles, so
packaging needs the wasm staged first. npm run test:web runs the web smoke
tests in a headless Chromium with
@vscode/test-web (first
npx playwright install chromium).
See also
Set up editor support
for using bynk-lsp with other editors.
License
Licensed under either of Apache-2.0 or MIT at
your option.
| |