@artooi/ag-ui-web-component 0.41.3 → 0.42.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.
@@ -39,6 +39,13 @@ export interface ToolDispatchHost {
39
39
  readonly conversationStore: () => ClientConversationStore;
40
40
  /** The active thread's id. */
41
41
  readonly threadId: () => string;
42
+ /**
43
+ * The element's current tenure: an identity it replaces on every handover
44
+ * from one principal to another, and never otherwise. Only ever compared, so
45
+ * a call can tell whether the principal it was dispatched for is still the
46
+ * one the element serves.
47
+ */
48
+ readonly tenure: () => object;
42
49
  }
43
50
  /**
44
51
  * Running the frontend tool calls a round produced, and answering the server's
@@ -75,6 +82,12 @@ export declare class ToolDispatch {
75
82
  * Execute one frontend tool call the round produced, against its own card:
76
83
  * refused when the page moved under the round, asked about when a rule gates
77
84
  * it, and settled with what the handler returned or threw.
85
+ *
86
+ * Every await below is a place the run can end, so each is followed by a
87
+ * check that it has not. A Stop while the host's predicate is pending ends
88
+ * the call there, and one while the card is open declines it. A handover
89
+ * during any of the three leaves the call with no transcript to draw in and
90
+ * no store to write to, so it does neither.
78
91
  */
79
92
  execute(call: AgUiToolCall): Promise<ToolExecution | null>;
80
93
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tool_dispatch.d.ts","sourceRoot":"","sources":["../../src/tools/tool_dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAG7E,OAAO,EACL,KAAK,gBAAgB,EAGtB,MAAM,mCAAmC,CAAC;AAK3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gC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ACvD,QAAQ,CAAC,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;IAC1D,8BAA8B;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,MAAM,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,MAAM,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,qBAAa,YAAY;;IAiBvB,YAAY,IAAI,EAAE,gBAAgB,EAEjC;IAED;;;;;;;;OAQG;IACH,aAAa,IAAI,IAAI,CAEpB;IAED;;;;;;;;OAQG;IACH,YAAY,IAAI,OAAO,EAAE,CAGxB;IAED;;;;;;;;;;OAUG;IACG,OAAO,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAoO/D;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,iBAAiB,CACrB,UAAU,EAAE,SAAS,SAAS,EAAE,GAC/B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CA+F5C;CAqHF"}
@@ -30,10 +30,16 @@ export declare class VoiceInput {
30
30
  /** Start recording when idle, stop (and transcribe) when recording. */
31
31
  toggle(): Promise<void>;
32
32
  /**
33
- * Tear the control down, for a host element removed mid-recording. Stops any
34
- * live `MediaRecorder`, releases the mic tracks so the browser's recording
35
- * indicator clears, and suppresses the pending transcription — a
36
- * disconnected control must not fire `onText` into a detached element.
33
+ * Tear the control down, for a host element removed mid-recording or handed
34
+ * to the next principal. Stops any live `MediaRecorder`, releases the mic
35
+ * tracks so the browser's recording indicator clears, and suppresses the
36
+ * pending transcription — a disconnected control must not fire `onText` into
37
+ * a detached element.
38
+ *
39
+ * Disposal is final: nothing un-disposes an instance, and the host's next
40
+ * wiring builds a new one. So the disposed flag alone tells a stale
41
+ * continuation from a live one, and a clip already posted when this runs is
42
+ * dropped whenever its answer arrives.
37
43
  */
38
44
  dispose(): void;
39
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"voice_input.d.ts","sourceRoot":"","sources":["../../../src/ui/composer/voice_input.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAoBtE,mDAAmD;AACnD,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,yCAAyC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;CAC9B;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,UAAU;;IACrB,kDAAkD;IAClD,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IAapC,YAAY,OAAO,EAAE,iBAAiB,EAmBrC;IAED,uEAAuE;IACjE,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAS5B;IA6CD;;;;;OAKG;IACH,OAAO,IAAI,IAAI,CAQd;CAiEF"}
1
+ {"version":3,"file":"voice_input.d.ts","sourceRoot":"","sources":["../../../src/ui/composer/voice_input.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAoBtE,mDAAmD;AACnD,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,yCAAyC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;CAC9B;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,UAAU;;IACrB,kDAAkD;IAClD,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IAapC,YAAY,OAAO,EAAE,iBAAiB,EAmBrC;IAED,uEAAuE;IACjE,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAS5B;IAuDD;;;;;;;;;;;OAWG;IACH,OAAO,IAAI,IAAI,CAQd;CAgFF"}
@@ -54,6 +54,11 @@ export interface ConversationHistoryHost {
54
54
  * own send does before it starts a run.
55
55
  */
56
56
  readonly announceTurn: (content: string) => void;
57
+ /**
58
+ * Record a turn taken from the composer for arrow-key recall, as the
59
+ * element's own send records one.
60
+ */
61
+ readonly recordTurn: (content: string) => void;
57
62
  /** Resize the composer to its content. */
58
63
  readonly autoGrow: () => void;
59
64
  /**
@@ -81,8 +86,18 @@ export interface ConversationHistoryHost {
81
86
  * client that is not running.
82
87
  */
83
88
  readonly releaseClient: () => void;
84
- /** Whether an interaction is in flight, which the composer owns. */
89
+ /**
90
+ * Whether an interaction is in flight, which the composer owns: from the
91
+ * moment a send or a retry is taken, or a restore that will resume a run
92
+ * starts loading, not only once its run has started.
93
+ */
85
94
  readonly running: () => boolean;
95
+ /**
96
+ * Hold the composer as a send holds it from the moment it is taken: a send
97
+ * refuses, the built-in Send parks its turn, a Retry and a pick refuse. Let
98
+ * go of when the run starts, by a Stop, or by {@link RunHold.release}.
99
+ */
100
+ readonly holdRun: () => RunHold;
86
101
  /** Stop the in-flight run. */
87
102
  readonly cancelRun: () => void;
88
103
  /** Drop the in-memory run and transcript, leaving the thread untouched. */
@@ -90,6 +105,21 @@ export interface ConversationHistoryHost {
90
105
  /** Swap the composer between Send and Stop, which the composer owns. */
91
106
  readonly setRunning: (running: boolean) => void;
92
107
  }
108
+ /**
109
+ * A hold {@link ConversationHistoryHost.holdRun} took.
110
+ *
111
+ * It says nothing about whether the restore that took it was stopped. A
112
+ * restore asks its generation that, because a restore with no run to resume
113
+ * holds nothing and can be stopped all the same -- see
114
+ * {@link ConversationHistory.rehydrate}.
115
+ */
116
+ interface RunHold {
117
+ /**
118
+ * Let go, if nothing else has, and send what the composer parked behind it,
119
+ * because no run is going to settle and send it.
120
+ */
121
+ readonly release: () => void;
122
+ }
93
123
  /**
94
124
  * Which conversation is on screen, and how one gets there: restoring it from
95
125
  * the store, switching to another from the conversation list, and continuing
@@ -195,6 +225,42 @@ export declare class ConversationHistory {
195
225
  * because the resume path answers it from the page the reload landed on; that
196
226
  * exclusion is held by "resumes with the landed page's result, and its card says
197
227
  * so" in `ag_ui_chat_reload_mid_run.test.ts`.
228
+ *
229
+ * **A restore that resumes holds the composer from before the load.** The
230
+ * resume is a run, and it starts only once the store has answered. With a
231
+ * remote store that is a real request, and a send, a Retry or a pick in it
232
+ * was refused by nothing: each built the conversation's client before the
233
+ * conversation had loaded, so a send went out carrying none of it and its
234
+ * first save replaced the stored one, and the resume then ran on that same
235
+ * client as a second run, answering a call the request no longer held. So
236
+ * the composer is held as a send holds it, and the resume gives way to
237
+ * nothing: what was typed parks behind the resumed run and goes out after its
238
+ * answer, and a host's send or Retry is refused as it is behind any run.
239
+ *
240
+ * The other way round, the resume standing down for the send, was rejected.
241
+ * The send that got in first had already gone out without the conversation,
242
+ * so standing down kept that loss, and it also dropped the run the navigation
243
+ * was part of, which the user asked for before the reload: the agent stopped
244
+ * halfway through the task, with the navigating call never answered.
245
+ *
246
+ * **A restore stops where it was stopped, held or not.** New chat, a thread
247
+ * switch, a `user-key` handover, a newer restore or the element leaving the
248
+ * page can each come while the store answers, and from host code the restore
249
+ * runs itself: the activity and tool renderers each replayed message draws
250
+ * through, and `navigationResult`. From then on it draws nothing more and
251
+ * resumes nothing. The hold cannot say so, because a restore with no run to
252
+ * resume holds nothing. So the restore asks its generation, which clearing
253
+ * the conversation moves on as a newer restore does, and asks it after the
254
+ * load, after each replayed message -- as a Retry asks after each one -- and
255
+ * once more before the resume. Stopped by anything but the element leaving
256
+ * the page, it also forgets the checkpoint it loaded, since that was a Stop
257
+ * for the run it would have resumed -- unless what replaced it is a restore
258
+ * of the same conversation, still current, which answers for that run
259
+ * instead; see `#forgetStopped`.
260
+ *
261
+ * What a restore with no run to resume still does not do is refuse a send
262
+ * made while it loads. That send goes out without the stored conversation,
263
+ * and its save replaces it.
198
264
  */
199
265
  rehydrate(): Promise<void>;
200
266
  /**
@@ -205,4 +271,5 @@ export declare class ConversationHistory {
205
271
  */
206
272
  replay(message: Message): void;
207
273
  }
274
+ export {};
208
275
  //# sourceMappingURL=conversation_history.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_history.d.ts","sourceRoot":"","sources":["../../../src/ui/history/conversation_history.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,qEAAqE;AACrE,MAAM,WAAW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;;;;;;;;;;;;;;;;OAkBG;IACG,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAyIpE;IAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiEG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAiG/B;IAsID;;;;;OAKG;IACH,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyF7B;CA2DF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artooi/ag-ui-web-component",
3
- "version": "0.41.3",
3
+ "version": "0.42.0",
4
4
  "description": "Framework-free <ag-ui-chat> Web Component over the AG-UI protocol. Drop-in chat sidebar with a pluggable client-side tool registry, DOM driver primitives, animations, and destructive-action confirmation modal.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/constants.ts CHANGED
@@ -8,7 +8,9 @@ export const ELEMENT_TAG = "ag-ui-chat";
8
8
  * User submitted a message. `detail` is {@link SubmitDetail}.
9
9
  *
10
10
  * Fires for every turn the user sends: with Send, through `sendMessage`, and
11
- * as the next turn of a run resumed or forked from the checkpoint panel.
11
+ * as the next turn of a run resumed or forked from the checkpoint panel. A
12
+ * listener runs while that turn is already the one in flight, so a
13
+ * `sendMessage` from it is refused rather than starting a second run.
12
14
  */
13
15
  export const SUBMIT_EVENT = "ag-ui-submit";
14
16