@theoremjs/web 0.3.5-next.897.g1c14afe → 0.3.5-next.898.gf800d9a

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 CHANGED
@@ -206,6 +206,7 @@ await chat.submit();
206
206
  - `update(options)` gives the controller your latest options, such as a new `context`, `options`, or `pageTools`. Each turn reads the options as they are when it is sent. `conversation`, `conversationView`, `initialText`, `initialFiles`, `initialVoice`, and `initialPending` are read only when the controller is created.
207
207
  - A live call takes `stated` in its options, and `setStated(stated)` changes it during the call. As with `setOptions`, the call is taken up again with the prompt lines the new value chooses.
208
208
  - Each method is bound to the controller. Pass it as a callback as it is.
209
+ - `state.delivery` says how far the latest message has got: `sending` while it posts, `sent` once the server has it, `delivered` once the model works on it, and `read` once the reply starts. The server's own events (`stage`, `guardrail`, `late_results`, `session`, `hook_failed`, `error`, `done`) leave it at `sent`, because they say nothing of the model. It is `null` before the first message and after its turn fails.
209
210
 
210
211
  `state.phase` is `'idle'`, `'streaming'`, or `'gated'`. The methods for the composer depend on it:
211
212
 
package/client/chat.js CHANGED
@@ -13,7 +13,15 @@ import { isUnknownConversation, } from "./transport.js";
13
13
  import { foldAssistantTurn, issuedOperationId } from "./turn-client.js";
14
14
  const DELIVERY_ORDER = ['sending', 'sent', 'delivered', 'read'];
15
15
  /** The server's own reports (bookkeeping, a failure, the end), which say nothing of the model having the message. */
16
- const SERVER_EVENTS = new Set(['stage', 'guardrail', 'late_results', 'session', 'error', 'done']);
16
+ const SERVER_EVENTS = new Set([
17
+ 'stage',
18
+ 'guardrail',
19
+ 'late_results',
20
+ 'session',
21
+ 'hook_failed',
22
+ 'error',
23
+ 'done',
24
+ ]);
17
25
  /** The reply itself (its thinking and tool calls come before it). */
18
26
  const REPLY_EVENTS = new Set(['text', 'structured', 'media']);
19
27
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theoremjs/web",
3
- "version": "0.3.5-next.897.g1c14afe",
3
+ "version": "0.3.5-next.898.gf800d9a",
4
4
  "description": "Theorem on the web platform, with no UI framework: Web-standard server handlers that serve a profile, and the browser client that talks to them.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -25,6 +25,6 @@
25
25
  },
26
26
  "peerDependencies": {
27
27
  "zod": "^4.6.5",
28
- "@theoremjs/agents": "^0.3.5-next.897.g1c14afe"
28
+ "@theoremjs/agents": "^0.3.5-next.898.gf800d9a"
29
29
  }
30
30
  }