Testing, security, and publishing
Test coverage
In-package tests cover the paths that apply:
- Declarative package: summary, schema, index, integration references.
- Worker: handler registration, invoke, typed error, dispose.
- App: mount,
ready, revoke, abort. - Editable file tab:
readText,writeTextwith revision, external-edit conflict (artifact_revision_conflict). - Chrome / structure surfaces: declared kinds enter the contribution catalog on enable and leave on disable.
- Generation: a candidate missing a required handler rolls back; after a successful switch, old handles are stale.
- Negative fixtures: illegal summary, path escape, unknown integration, oversized document.
vibex-plugin build
vibex-plugin validate
vibex-plugin test
npx vibex plugin add --dev .
vibex plugin run dev
npx vibex plugin test --host
npx vibex plugin pack
npx vibex plugin publish
vibex-plugin doctor .npx vibex plugin test --host against a running Host walks link, enable, contribution appear/withdraw, Skill hot reload, and uninstall. User data is kept by default; the development directory is not deleted. add --dev only links. HMR is started by vibex plugin run dev.
test runs build first. Node tests are packed into a temp directory and handed to node --test; a test file that reads plugin-root files via import.meta.url fails. Export fixtures from the test module or test/*.mjs.
Python packages use the sdk/python harness and await create_worker_harness(...). Rust packages use cargo test -p vibex-plugin-sdk plus in-package tests. A template that ships test/plugin.test.mjs asserts the handler list with createWorkerHarness.
After a linked install, finish enable, Content, Config save, session injection, chrome slots appearing immediately, structure-surface mount, candidate reload after source edits, and uninstall (data kept by default, development directory left) on a running Host. A remote workstation window shows Host-side results. After 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 that digest.
- Candidate bytes are content-addressed. A failed validate, migration, or dependency readiness keeps the previous generation.
- App and Runtime sessions bind a generation and are revoked on disable, replacement, expiry, or uninstall.
- Release listeners, timers, child processes, MessagePorts, and temp files.
onDisposehas a deadline; the Host kills the process after timeout. Persist state during normal requests. - Editable files use
bridge.artifact. The Host owns the canonical path. Saves carry the expected revision. Conflicts show both versions. - Pin or document every external editor, Runtime, executable, and network endpoint. State offline behavior and data flow in the README.
- Validate messages from third-party frames before writing 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 stays in scoped diagnostics.
- The
permissionsarray is compatibility metadata. New packages omit per-capability grant simulation. - Plugin data is isolated by Publisher + Plugin ID. A derived package uses a new identity and does not read the original KV, settings, or secrets.
Full Trust network access uses the language runtime (Node fetch, Python fetch_url, and equivalents). The network.fetch Host RPC returns network_denied. 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.
Publish checklist
- Import only the public SDK modules for the language:
@vibex/plugin-sdk,/worker,/app,/testing,/protocol,/stdio; Pythonvibex-plugin; Rustvibex-plugin-sdk. - README: requirements, operation, offline and network, troubleshooting, licenses, config retention after uninstall.
- A Node package's
dist/worker.mjscontains the stdio loop; a native worker path points at a compiled binary. - The
packsha256 is reproducible. - Release notes state the activation boundary: UI and Provider contributions appear on enable and vanish on disable; Agent-side Skill / MCP arrive in later new or rebound conversations.
Publish with npx vibex plugin publish: upload a .vxp or list a GitHub repository into the review queue. The GitHub owner must match the marketplace username. Use --show-tree to show the package tree for an uploaded archive. After review, one card keeps history. Pin Git with #tag on the install command. A GitHub Release ships both .vxp and .sha256. Product identity is Publisher + ID; marketplace install identity is owner/plugin-name/tag/version.

