mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-28 19:14:53 +00:00
A live widget template that declares capabilities.storage gets widget.storage: get and keys read the client's copy of
the space widget.<name>, set and delete write through the client's spaces sync, and widget.on("storage") hears
changes from elsewhere. The run starts with the copy in __input().storage; null means the template didn't declare it
(CapabilityDenied), and a client without spaces sync passes none (Unsupported). The prelude checks the limits (256-char
keys, 64 KiB values, 1,000 keys and 1 MiB per template) so errors land at the template's line; the TypeScript host and
widget-wire's encoder check posts again. widget-wire adds the storage post kind 0B. The server is unchanged.
|
||
|---|---|---|
| .. | ||
| fixtures | ||
| fake.ts | ||
| fixtures.test.ts | ||
| lint.test.ts | ||
| plugin.test.ts | ||
| programs.test.ts | ||
| shader-game.test.ts | ||