Testing, security, and release
Test scope
Package tests cover the paths that apply:
- Declarative package: summary, schema, index, integration refs.
- Worker: registration, invoke, typed error, dispose.
- App: mount,
ready, revoke, abort. - Editable file tab:
readText,writeTextwith revision, external-edit conflict (artifact_revision_conflict). - Generation: rollback when a required handler is missing; old handles stale after a successful switch.
- Negative fixtures: illegal summary, path escape, unknown integration, oversized document.
vibex-plugin build
vibex-plugin validate
vibex-plugin test
vibex-plugin pack
vibex-plugin doctor .test runs build first. The CLI bundles Node tests into a temp directory and hands them to node --test. Reading plugin-root files via import.meta.url fails in that temp directory; put fixtures in the test module or export constants from test/*.mjs.
Python packages use harnesses in sdk/python with await create_worker_harness(...). Rust packages use cargo test -p vibex-plugin-sdk plus in-package tests. Templates that ship test/plugin.test.mjs assert handler lists via createWorkerHarness.
After a linked install, complete enable, Content, Config save, session injection, and uninstall (data kept by default) on a running Host. A workstation window presents results of execution that happens on the Host. On a failed update, the UI and doctor still point at the previous complete generation.
Security
- Deterministic pack: the same source yields the same digest. Activation binds the digest.
- Candidate bytes are content-addressed. A failed validate, migration, or dependency-ready step keeps the previous generation.
- App and Runtime sessions bind a generation and are revoked on disable, replace, expiry, or uninstall.
- Dispose listeners, timers, child processes, MessagePorts, and temp files.
onDisposehas a deadline; the Host force-kills after it. Persist state during normal operations. - Editable files use
bridge.artifact. The Host holds the canonical path. Save carries the expected revision. Conflict shows both versions. - Pin or document external editors, Runtimes, executables, and network endpoints. Offline behavior and data flow belong in the README.
- Validate messages from third-party frames before they touch user data. Licenses and NOTICE live in the package.
- Logs, traces, error details, events, and URLs omit secrets, pairing codes, and device tokens. Worker stderr is scoped diagnostics.
- The
permissionsarray exists so older v4 packages still validate. New packages omit per-capability grant simulation.
Full Trust network access uses the language runtime (Node fetch, Python fetch_url, and equivalents). The network.fetch Host RPC returns network_denied. The Isolated OS sandbox denies socket / connect. Until a workspace root is bound to the Worker, files.read / files.write / files.stat / files.list return files_root_denied. Until a conversation is bound, conversation.read.get and conversation.append.enqueueInput return conversation_scope_denied.
Release checklist
- Import only the public SDK modules for that language:
@vibex/plugin-sdk,/worker,/app,/testing,/protocol,/stdio; Pythonvibex-plugin; Rustvibex-plugin-sdk. - README: requirements, operation, offline and network, troubleshooting, licenses, config retention on uninstall.
- A Node package
dist/worker.mjscontains the stdio loop. A native package worker path points at a compiled binary. sha256frompackis reproducible.- The changelog states the effect on already-enabled conversations: old sessions keep the tool list from creation; new or rebound sessions receive the new list.
Marketplace submissions include the pack, digest, test log, and a linked-install recording. Identity is Publisher + ID.

