@fabrika/canvas-kernel
v0.2.0
Published
Canvas JSX compiler, session/revision store, renderer and interactive component library.
Readme
@fabrika/canvas-kernel
The canvas SDK from Agent Canvas. Ships as TypeScript sources, not a build artifact. It is written for Bun and consumed by bundlers, so a host typechecks it under its own flags.
Canvas-specific functionality over @fabrika/daemon-kit and
@fabrika/annotations:
| Entry | Responsibility |
| --------------------------- | -------------------------------------------------------------------------------------- |
| /server (also .) | JSX compilation, sessions/revisions, watcher, canvas WS protocol and paths |
| /client | Renderer, canvas draft persistence, responses, revision contexts, sidebar and feedback |
| /components | Interactive canvas component library |
| /runtime | Canvas contexts shared by compiled documents and the host |
| /styles.css, /theme.css | Canvas styling and theme |
Migration from 0.1.x
- Replace
/daemonimports with@fabrika/daemon-kit. - Import daemon helpers previously reexported from
/serverdirectly from@fabrika/daemon-kit.createCanvasPathsremains canvas-specific. - Replace
/annotateimports with@fabrika/annotations. - Import annotation UI, locator strategies, marks and utilities previously
reexported from
/clientdirectly from@fabrika/annotations. - The canvas
/clientAnnotationProviderandPersistedStatestill own revisions, responses and feedback entries. The standalone annotations provider instead takesscope,loadState(scope)andsaveState(scope, state)and usesAnnotationStatewith only annotations and a general note. - Standalone annotation hosts use
AnnotationHostContextandAnnotationHost, withoutloadCanvasModule. Canvas hosts keepCanvasHostContext. - Multi-bundle hosts must build and externalize
@fabrika/annotations/runtimein addition to#canvas/runtime, with one import-map entry for each.
The removed entries are not compatibility reexports. All packages release in lockstep with exact internal dependency pins.
License
MIT
