@ai-slot/runtime 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,12 +20,14 @@ npm install @ai-slot/runtime
|
|
|
20
20
|
import { createDomRenderer } from "@ai-slot/adapter-dom";
|
|
21
21
|
|
|
22
22
|
registerRenderer("dom", createDomRenderer(components));
|
|
23
|
-
configureAiSlot({ registry });
|
|
23
|
+
configureAiSlot({ registry, onFailure: (f) => console.debug(f) });
|
|
24
24
|
</script>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Element attributes: `src`, `name`, `renderer` (default `dom`), `editable`, `stream` (SSE skeleton → tree), `live` + `live-src` (invalidation push), `refresh-interval`.
|
|
28
28
|
|
|
29
|
+
Wire format APIs: `registerWireFormat(id, format)` / `unregisterWireFormat(id)` plug alternative wire formats into the fetch pipeline. Failures are observed via `onFailure` as `FetchFailure { stage: "http-non-ok" | "parse" | "validate" | "fetch-error", message }` — set it globally in `configureAiSlot` or per call on `fetchComponentTree`. The silent-fallback behavior never changes; the hook is observation only.
|
|
30
|
+
|
|
29
31
|
> Registration must happen synchronously in the same module graph that imports the runtime — custom element upgrade is synchronous.
|
|
30
32
|
|
|
31
33
|
## Docs
|