@irisrun/channel-web 0.1.0 → 0.2.0

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 ADDED
@@ -0,0 +1,28 @@
1
+ # @irisrun/channel-web
2
+
3
+ **Durable, resumable sessions a human can talk to in the browser.** A minimal,
4
+ zero-dependency web chat UI for `iris serve --web` that persists its session
5
+ handle to `localStorage`, so closing the tab or reloading the page resumes the
6
+ *same* durable session while the server is up.
7
+
8
+ ## What it is
9
+
10
+ `makeWebHandler` is a host-side, pre-POST `GET` hook that serves two static assets
11
+ (`index.html` + `iris-web.js`) on the same port as the agent. The browser shell
12
+ speaks the `iris serve` SSE protocol and adopts the rotated `continuationToken`
13
+ the server returns, so resumption uses the same two-identifier discipline as every
14
+ other channel. The shell **mirrors** `@irisrun/client-sdk`'s wire logic (there is
15
+ no bundler, so it can't share the import); it is a static asset that lives
16
+ **outside** the TypeScript include and the test glob.
17
+
18
+ ## Use it
19
+
20
+ ```sh
21
+ iris serve ./image --port 8787 --web # → open http://127.0.0.1:8787/
22
+ ```
23
+
24
+ See **[docs/Channels](../../docs/channels.md)** for the serve protocol and
25
+ the client SDK.
26
+
27
+ ---
28
+ Part of [Iris](../../README.md) — own, portable, verifiable state.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // @irisrun/channel-web — the web channel's HOST side (spec §2.2). `makeWebHandler`
1
+ // @irisrun/channel-web — the web channel's HOST side. `makeWebHandler`
2
2
  // returns a pre-POST GET hook for `makeRestChannel`'s `webHandler` seam: it serves
3
3
  // the two static assets (the chat page + its browser shell) and returns `false` for
4
4
  // everything else, so `/v1/*` POST and the WebSocket upgrade are untouched. Host-side
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@irisrun/channel-web",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
- "description": "Iris web channel — a minimal, zero-dep web chat UI served by `iris serve --web` on the same port. `makeWebHandler` is a pre-POST GET hook (host-side, node:fs/http) that serves two static assets (index.html + iris-web.js). The browser shell talks the iris serve SSE protocol and persists {sessionId, continuationToken} to localStorage so a tab close/reload resumes the same session while the server is up. The shell MIRRORS @irisrun/client-sdk's wire logic (no bundler → no shared import); it is a static asset OUTSIDE the tsc include and the test glob.",
5
+ "description": "Durable, resumable browser sessions — a minimal, zero-dep web chat UI (`iris serve --web`) that persists {sessionId, continuationToken} to localStorage so a tab close/reload resumes the SAME durable session while the server is up. `makeWebHandler` is a host-side pre-POST GET hook serving two static assets (index.html + iris-web.js); the shell talks the iris serve SSE protocol and MIRRORS @irisrun/client-sdk's wire logic (no bundler → no shared import) a static asset OUTSIDE the tsc include and test glob.",
6
6
  "exports": {
7
7
  ".": {
8
8
  "iris-src": "./src/index.ts",