@theoremjs/web 0.3.5-next.1002.g355bde0 → 0.3.5-next.1004.gd674e6b

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theoremjs/web",
3
- "version": "0.3.5-next.1002.g355bde0",
3
+ "version": "0.3.5-next.1004.gd674e6b",
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.1002.g355bde0"
28
+ "@theoremjs/agents": "^0.3.5-next.1004.gd674e6b"
29
29
  }
30
30
  }
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { compactHistory, defaultKernelScope, defineProfile, labelText, runTurn, TheoremError, } from '@theoremjs/agents';
9
9
  import { runConversation, } from '@theoremjs/agents/conversation';
10
- import { interfaceFromProfile, refuseInterfacePick, } from '@theoremjs/agents/interface';
10
+ import { applyToolEvent, interfaceFromProfile, refuseInterfacePick, } from '@theoremjs/agents/interface';
11
11
  import { answerReply, conversationView, messageReply, openConversation, postedMessage, readerConversationHost, rewindConversation, statelessRefusal, waitingCalls, wakeReply, } from "./conversation.js";
12
12
  import { detachedEnd, sessionConversationInbox } from "./conversation-inbox.js";
13
13
  import { unknownConversation, } from "./conversation-store.js";
@@ -589,14 +589,14 @@ async function lateBlock(ctx, at, block, operations, host) {
589
589
  const { tool: state } = settled;
590
590
  if (!('phase' in state) || (state.phase !== 'complete' && state.phase !== 'error'))
591
591
  return block;
592
- return { ...block, tool: { ...tool, state, endedAt: operation.settledAt } };
592
+ return { ...block, tool: { ...applyToolEvent(tool, state), endedAt: operation.settledAt } };
593
593
  }
594
594
  const { name, callId } = tool;
595
595
  const unresolved = detachedEnd({ operationId: id ?? '', callId, name, at: tool.state?.at ?? Date.now() }, operation, labels);
596
596
  if (!unresolved)
597
597
  return block;
598
598
  const { operationId: _id, ...state } = unresolved.event.tool;
599
- return { ...block, tool: { ...tool, state, endedAt: state.at } };
599
+ return { ...block, tool: applyToolEvent(tool, state) };
600
600
  }
601
601
  /** The answer's reply, handed first what the paused reply read, so it tells them as it goes on. */
602
602
  async function* answered(held, paused, reply) {