garret-core
v0.0.3
Published
Pure shared layer for Garret widgets — types, field descriptors, validators, canonical poll keys. No React, no transport; shared verbatim by the host and by third-party widgets.
Readme
garret-core
The pure, framework-agnostic core shared by Garret and its widgets. No React, no transport — safe to import in any realm.
Exports:
- Types —
WidgetManifest,WidgetPlugin,WidgetContext,ServiceDefinition, … - Config fields —
fieldbuilders,ConfigSchema,zodFromSchema,defaultConfig GarretClient— the async, serializable capability interface a widget realm talks to the host through (the seam that lets one widget run natively or sandboxed)canonicalKey— stable poll-job key (must match on both sides of the boundary)defineWidget— identity helper that pins a plugin's config type
Most authors don't depend on this directly — install garret-widget-sdk, which
re-exports everything here plus createSDK and UI helpers.
