v0.8.0 — API v2 runtimes and views
Types and build helpers for the Agent Code extension platform API v2. Extensions now get one background runtime that owns commands and shared state, plus separate sandboxed views that attach and detach independently.
Install
The SDK is distributed from GitHub, not npm. Its built dist/ is committed.
npm i -D github:Juliusolsson05/agent-code-extension-api#v0.8.0It requires an Agent Code build that includes the extension platform (Juliusolsson05/agent-code#577).
What's new since v0.3.0
- Runtimes and views:
defineRuntimeanddefineViewhelpers, host-issued view identities, bounded JSON requests and published view state, and explicit activation events (onStartupFinished,onCommand:<id>,onView:<id>). - Build preset:
extensionViteConfig({ entries })builds independent runtime and view modules, and the single-entry v1 build still works.- It pins the production JSX transform, so a build run with
NODE_ENV=developmentno longer ships a view that crashes withjsxDEV is not a function. - The package exports now include a
defaultcondition, so avite.config.tsin a CommonJS package can load the SDK.
- It pins the production JSX transform, so a build run with
- Themes: declarative, namespaced themes built from the Agent Code appearance-token vocabulary.
- Project files:
files.readTextandfiles.writeTextfor runtimes and views.- Reads need the
fs.readpermission, and writes needfs.write. - Paths are relative to a live session's project.
- Writes are create-only unless you pass the version from your last read.
- Reads need the
- Notifications:
notifications.show(message)needs thenotifications.showpermission. It posts a short toast attributed to your extension, even when no view is open.
API v1 extensions keep working unchanged. See the README for the full contract and limits.