Loading...
Loading...
Builds reactive real-time backends on the iii engine. Use when building event-driven apps where state changes automatically trigger side effects, clients receive live updates via streams or websockets, or you need a real-time database layer with pub/sub and CRUD endpoints.
npx skill4agent add iii-hq/skills iii-reactive-backendstate::set/get/update/delete/listHTTP CRUD endpoints
→ state::set/update/delete (writes to 'todos' scope)
↓ (automatic state triggers)
→ on-change → stream::send (push to clients)
→ update-metrics → state::update (aggregate counters)
HTTP GET /metrics → reads from 'todo-metrics' scope
WebSocket clients ← stream 'todos-live'| Primitive | Purpose |
|---|---|
| Initialize the worker and connect to iii |
| CRUD handlers and reactive side effects |
| Database layer |
| React to any change in a scope |
| Fire-and-forget stream push to clients |
| REST endpoints |
registerWorker(url, { workerName })trigger({ function_id: 'state::set/get', payload: { scope, key, value } })registerTrigger({ type: 'state', function_id, config: { scope } })async (event) => { const { new_value, old_value, key } = event }trigger({ function_id: 'stream::send', payload, action: TriggerAction.Void() })const logger = new Logger()eventnew_valueold_valuekeytodosws://host:port/stream/{stream_name}/{group_id}registerFunction{ path, id }iii-http-invoked-functionsiii-reactive-backendiii-reactive-backend