@artooi/ag-ui-web-component 0.4.0 → 0.6.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/CHANGELOG.md +50 -1
- package/README.md +69 -2
- package/dist/ag-ui-web-component.bundle.js +355 -59
- package/dist/ag-ui-web-component.bundle.js.map +4 -4
- package/dist/constants.d.ts +16 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/core/ag_ui_chat.d.ts +17 -1
- package/dist/core/ag_ui_chat.d.ts.map +1 -1
- package/dist/core/agui_client.d.ts +7 -1
- package/dist/core/agui_client.d.ts.map +1 -1
- package/dist/core/attachment.d.ts +35 -0
- package/dist/core/attachment.d.ts.map +1 -0
- package/dist/core/conversation_store.d.ts +37 -8
- package/dist/core/conversation_store.d.ts.map +1 -1
- package/dist/core/remote_conversation_store.d.ts +35 -0
- package/dist/core/remote_conversation_store.d.ts.map +1 -0
- package/dist/core/upload_attachment.d.ts +32 -0
- package/dist/core/upload_attachment.d.ts.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1198 -24
- package/dist/index.js.map +4 -4
- package/dist/ui/attachment_chips.d.ts +13 -0
- package/dist/ui/attachment_chips.d.ts.map +1 -0
- package/dist/ui/attachment_tray.d.ts +42 -0
- package/dist/ui/attachment_tray.d.ts.map +1 -0
- package/dist/ui/relative_time.d.ts +11 -0
- package/dist/ui/relative_time.d.ts.map +1 -0
- package/dist/ui/styles.d.ts +1 -1
- package/dist/ui/styles.d.ts.map +1 -1
- package/dist/ui/thread_drawer.d.ts +33 -0
- package/dist/ui/thread_drawer.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/constants.ts +18 -0
- package/src/core/ag_ui_chat.ts +267 -14
- package/src/core/agui_client.ts +15 -2
- package/src/core/attachment.ts +39 -0
- package/src/core/conversation_store.ts +148 -9
- package/src/core/remote_conversation_store.ts +147 -0
- package/src/core/upload_attachment.ts +113 -0
- package/src/index.ts +8 -0
- package/src/ui/attachment_chips.ts +68 -0
- package/src/ui/attachment_tray.ts +237 -0
- package/src/ui/relative_time.ts +28 -0
- package/src/ui/styles.ts +294 -0
- package/src/ui/thread_drawer.ts +200 -0
- package/src/version.ts +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -57,6 +57,22 @@ export declare const TOOL_CALL_STATUS: {
|
|
|
57
57
|
readonly ERROR: "error";
|
|
58
58
|
readonly DECLINED: "declined";
|
|
59
59
|
};
|
|
60
|
+
/**
|
|
61
|
+
* Lifecycle status of a pending-attachment chip in the composer tray. A chip
|
|
62
|
+
* opens as `UPLOADING` (with a progress bar), then settles to `READY` (a durable
|
|
63
|
+
* ref) or `ERROR` (with a retry control).
|
|
64
|
+
*/
|
|
65
|
+
export declare const ATTACHMENT_STATUS: {
|
|
66
|
+
readonly UPLOADING: "uploading";
|
|
67
|
+
readonly READY: "ready";
|
|
68
|
+
readonly ERROR: "error";
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Default client-side upload size cap (10 MiB), matching django-ag-ui's
|
|
72
|
+
* `ATTACHMENT_MAX_BYTES` default. Overridable per element via
|
|
73
|
+
* `data-attachment-max-bytes`; the server stays authoritative.
|
|
74
|
+
*/
|
|
75
|
+
export declare const DEFAULT_ATTACHMENT_MAX_BYTES: number;
|
|
60
76
|
/**
|
|
61
77
|
* How much detail a tool-call card shows. Set via the `data-tool-display`
|
|
62
78
|
* attribute on `<ag-ui-chat>`; defaults to `full` (back-compatible).
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAGA,wEAAwE;AACxE,eAAO,MAAM,WAAW,eAAe,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C,qCAAqC;AACrC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 import { type PageMap } from "../tools/page_map.js";
|
|
|
6
6
|
import { type RouteMap } from "../tools/route_map.js";
|
|
7
7
|
import { type StateHook } from "../tools/state_hook.js";
|
|
8
8
|
import { type ToolDisplayMode } from "../ui/tool_call_card.js";
|
|
9
|
+
import { type AttachmentRef } from "./attachment.js";
|
|
9
10
|
import { type ClientConversationStore, type NavigationCheckpoint } from "./conversation_store.js";
|
|
10
11
|
import { type AgentFactory } from "./create_http_agent.js";
|
|
12
|
+
import { type UploadHandler } from "./upload_attachment.js";
|
|
11
13
|
/** The role a rendered chat message takes. */
|
|
12
14
|
export type MessageRole = (typeof MESSAGE_ROLE)[keyof typeof MESSAGE_ROLE];
|
|
13
15
|
/** `detail` shape of the {@link SUBMIT_EVENT} CustomEvent. */
|
|
14
16
|
export interface SubmitDetail {
|
|
15
17
|
readonly content: string;
|
|
18
|
+
/** Durable refs for the files attached to this message (empty when none). */
|
|
19
|
+
readonly attachments: readonly AttachmentRef[];
|
|
16
20
|
}
|
|
17
21
|
/** `detail` shape of the {@link TOGGLE_EVENT} CustomEvent. */
|
|
18
22
|
export interface ToggleDetail {
|
|
@@ -62,7 +66,9 @@ export declare class AgUiChat extends HTMLElement {
|
|
|
62
66
|
getTools: () => Tool[];
|
|
63
67
|
/**
|
|
64
68
|
* Per-run context provider. Defaults to the compact page map (when a
|
|
65
|
-
* {@link getPageMap} provider is set and {@link autoInjectPageMap} is on)
|
|
69
|
+
* {@link getPageMap} provider is set and {@link autoInjectPageMap} is on)
|
|
70
|
+
* plus a one-line manifest of the files attached to the message being sent,
|
|
71
|
+
* so the agent knows which `read_attachment` ids are available.
|
|
66
72
|
*/
|
|
67
73
|
getContext: () => Context[];
|
|
68
74
|
/**
|
|
@@ -86,6 +92,16 @@ export declare class AgUiChat extends HTMLElement {
|
|
|
86
92
|
* server-backed store for cross-tab/device durability.
|
|
87
93
|
*/
|
|
88
94
|
conversationStore: ClientConversationStore;
|
|
95
|
+
/**
|
|
96
|
+
* How attached files are uploaded. `null` (default) uses the built-in
|
|
97
|
+
* multipart `POST` to `data-attachments-url`. Set a custom
|
|
98
|
+
* {@link UploadHandler} — `(file, onProgress) => Promise<AttachmentRef>` — to
|
|
99
|
+
* swap the transport (e.g. a `tus-js-client` resumable adapter or
|
|
100
|
+
* direct-to-S3 multipart) without changing the tray, the chips, or the AG-UI
|
|
101
|
+
* wire (refs are transport-agnostic). When set, the 📎 affordance appears even
|
|
102
|
+
* with no `data-attachments-url`; the handler owns its own endpoint + headers.
|
|
103
|
+
*/
|
|
104
|
+
uploadHandler: UploadHandler | null;
|
|
89
105
|
/**
|
|
90
106
|
* Builds the tool result a navigating tool resumes with after the page
|
|
91
107
|
* reloads. Defaults to the landed URL; a host (e.g. the admin package) can
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ag_ui_chat.d.ts","sourceRoot":"","sources":["../../src/core/ag_ui_chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAW,IAAI,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"ag_ui_chat.d.ts","sourceRoot":"","sources":["../../src/core/ag_ui_chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAW,IAAI,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAEL,YAAY,EAOb,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,KAAK,UAAU,EAAsB,MAAM,kCAAkC,CAAC;AAGvF,OAAO,EAAwB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE1E,OAAO,EAAoB,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAU9E,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAO7E,OAAO,EAAE,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AS,CAAC,KAAK,EAAE,OAAO,EAE3B;IAED;;;;OAIG;IACH,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAgBtC,qEAAqE;IACrE,eAAe,IAAI,IAAI;IAIvB;;;OAGG;IACH,OAAO,IAAI,IAAI;IAyJf;;;;;;OAMG;IACH,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc;CAoclE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type AbstractAgent } from "@ag-ui/client";
|
|
2
2
|
import type { Context, Message, Tool } from "@ag-ui/core";
|
|
3
|
+
import type { AttachmentRef } from "./attachment.js";
|
|
3
4
|
/** A tool call surfaced to the host by {@link AgUiClient}. */
|
|
4
5
|
export interface AgUiToolCall {
|
|
5
6
|
readonly id: string;
|
|
@@ -106,8 +107,13 @@ export declare class AgUiClient {
|
|
|
106
107
|
* When the agent calls frontend tools, this executes them and re-runs the
|
|
107
108
|
* agent with the results, looping until the agent stops calling frontend
|
|
108
109
|
* tools (bounded by {@link MAX_TOOL_ROUNDS}).
|
|
110
|
+
*
|
|
111
|
+
* `attachments` ride on the user message as a non-standard field so the
|
|
112
|
+
* default client store round-trips them for history replay; the agent learns
|
|
113
|
+
* the ids from the run context (the server's strict validation ignores the
|
|
114
|
+
* unknown message field), then reads bytes via the `read_attachment` tool.
|
|
109
115
|
*/
|
|
110
|
-
send(content: string): Promise<void>;
|
|
116
|
+
send(content: string, attachments?: readonly AttachmentRef[]): Promise<void>;
|
|
111
117
|
/**
|
|
112
118
|
* Resume the run loop after a navigating tool's result was supplied
|
|
113
119
|
* post-reload (via {@link addToolResult}). Unlike {@link send}, adds no user
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agui_client.d.ts","sourceRoot":"","sources":["../../src/core/agui_client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAoC,MAAM,eAAe,CAAC;AACrF,OAAO,KAAK,EAA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IAAI,IAAI,CAAC;IACjB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;;;;OAKG;IACH,WAAW,IAAI,IAAI,CAAC;IACpB;;;;;;OAMG;IACH,SAAS,IAAI,IAAI,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,MAAM,IAAI,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,OAAO,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,sEAAsE;IACtE,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,oEAAoE;IACpE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,KAAK,IAAI,CAAC;CACpD;AAED;;;;;;GAMG;AACH,qBAAa,UAAU;;gBAWT,MAAM,EAAE,gBAAgB;IASpC,4CAA4C;IAC5C,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,wEAAwE;IACxE,IAAI,QAAQ,IAAI,SAAS,OAAO,EAAE,CAEjC;IAED;;;;;;;;;;;OAWG;IACG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,GAAE,SAAS,aAAa,EAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAatF;;;;OAIG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B,0EAA0E;IAC1E,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAKxD;;;;;;OAMG;IACH,MAAM,IAAI,IAAI;CAgHf"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Message } from "@ag-ui/core";
|
|
2
|
+
/**
|
|
3
|
+
* A durable, lightweight reference to one uploaded file — what an upload
|
|
4
|
+
* returns and what rides on a sent message, never the bytes.
|
|
5
|
+
*
|
|
6
|
+
* Mirrors django-ag-ui's `AttachmentRef`: a file uploads out-of-band to the
|
|
7
|
+
* attachments endpoint, the server hands back this ref, and the agent reads the
|
|
8
|
+
* actual content server-side via the `read_attachment` tool. Keeping the AG-UI
|
|
9
|
+
* message stream free of base64 mirrors how the tool catalog keeps schemas off
|
|
10
|
+
* the wire.
|
|
11
|
+
*/
|
|
12
|
+
export interface AttachmentRef {
|
|
13
|
+
/** Opaque, owner-scoped handle the server resolves back to bytes. */
|
|
14
|
+
readonly id: string;
|
|
15
|
+
/** Original filename, for display on the chip. */
|
|
16
|
+
readonly name: string;
|
|
17
|
+
/** Declared content type (a hint — the server is authoritative). */
|
|
18
|
+
readonly mime: string;
|
|
19
|
+
/** Size in bytes. */
|
|
20
|
+
readonly size: number;
|
|
21
|
+
/** Optional direct fetch URL (the owner-checked download endpoint). */
|
|
22
|
+
readonly url?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The attachment refs a user message carries.
|
|
26
|
+
*
|
|
27
|
+
* Refs are stored on the user message as a non-standard `attachments` field: a
|
|
28
|
+
* web-component augmentation that the default client store round-trips and
|
|
29
|
+
* `@ag-ui/client` preserves through `addMessage` / `structuredClone`, so a
|
|
30
|
+
* restored conversation re-renders its attachment chips. The server's strict
|
|
31
|
+
* `RunAgentInput` validation ignores the unknown field — the model learns the
|
|
32
|
+
* ids from the run context manifest instead.
|
|
33
|
+
*/
|
|
34
|
+
export declare function messageAttachments(message: Message): readonly AttachmentRef[];
|
|
35
|
+
//# sourceMappingURL=attachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../src/core/attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qBAAqB;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,aAAa,EAAE,CAG7E"}
|
|
@@ -9,6 +9,21 @@ export interface NavigationCheckpoint {
|
|
|
9
9
|
/** The tool-call id whose result must be supplied after the reload. */
|
|
10
10
|
readonly toolCallId: string;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Lightweight metadata for one conversation — the thread-drawer row shape.
|
|
14
|
+
*
|
|
15
|
+
* Returned by {@link ClientConversationStore.listThreads} so the drawer can
|
|
16
|
+
* render a list without loading message bodies. `title` defaults to a
|
|
17
|
+
* truncation of the first user message (until an explicit rename); `preview`
|
|
18
|
+
* is a one-line excerpt of the latest message; `updatedAt` is epoch ms of the
|
|
19
|
+
* last change, used to order the list.
|
|
20
|
+
*/
|
|
21
|
+
export interface ThreadMeta {
|
|
22
|
+
readonly threadId: string;
|
|
23
|
+
readonly title: string;
|
|
24
|
+
readonly updatedAt: number;
|
|
25
|
+
readonly preview: string;
|
|
26
|
+
}
|
|
12
27
|
/**
|
|
13
28
|
* Client-side persistence seam for the conversation and a pending-navigation
|
|
14
29
|
* checkpoint, keyed by `thread_id`.
|
|
@@ -16,31 +31,42 @@ export interface NavigationCheckpoint {
|
|
|
16
31
|
* The default {@link SessionStorageStore} keeps everything per-tab in
|
|
17
32
|
* `sessionStorage`, so the chat survives the full page reloads of a
|
|
18
33
|
* multi-page app. A host may inject a server-backed store instead (e.g. one
|
|
19
|
-
* that rehydrates from a history endpoint); `loadMessages`
|
|
20
|
-
* async-friendly. The checkpoint methods stay synchronous — the
|
|
21
|
-
* tiny local hint a server store can derive from history and no-op.
|
|
34
|
+
* that rehydrates from a history endpoint); `loadMessages` and `listThreads`
|
|
35
|
+
* are therefore async-friendly. The checkpoint methods stay synchronous — the
|
|
36
|
+
* marker is a tiny local hint a server store can derive from history and no-op.
|
|
37
|
+
*
|
|
38
|
+
* Thread enumeration (`listThreads` / `setActiveThread` / `renameThread`) backs
|
|
39
|
+
* the chat-history drawer; "delete a thread" reuses {@link clear} and "new
|
|
40
|
+
* chat" reuses {@link threadId} after clearing the active thread.
|
|
22
41
|
*/
|
|
23
42
|
export interface ClientConversationStore {
|
|
24
|
-
/**
|
|
43
|
+
/** The active conversation id, generated and persisted on first read. */
|
|
25
44
|
threadId(): string;
|
|
26
45
|
/** Load the persisted message history, or `null` when none exists. */
|
|
27
46
|
loadMessages(threadId: string): Promise<readonly Message[] | null>;
|
|
28
|
-
/** Persist the message history. */
|
|
47
|
+
/** Persist the message history (and refresh the thread's drawer metadata). */
|
|
29
48
|
saveMessages(threadId: string, messages: readonly Message[]): void;
|
|
30
49
|
/** Load the pending-navigation checkpoint, or `null` when none is set. */
|
|
31
50
|
loadCheckpoint(threadId: string): NavigationCheckpoint | null;
|
|
32
51
|
/** Set the pending-navigation checkpoint, or clear it when given `null`. */
|
|
33
52
|
saveCheckpoint(threadId: string, checkpoint: NavigationCheckpoint | null): void;
|
|
34
|
-
/** Forget the conversation and checkpoint (
|
|
53
|
+
/** Forget the conversation and checkpoint (a "delete thread" / "new chat"). */
|
|
35
54
|
clear(threadId: string): void;
|
|
55
|
+
/** The user's threads as drawer metadata (no message bodies), newest first. */
|
|
56
|
+
listThreads(): Promise<readonly ThreadMeta[]>;
|
|
57
|
+
/** Make `threadId` the active conversation (the drawer selecting a row). */
|
|
58
|
+
setActiveThread(threadId: string): void;
|
|
59
|
+
/** Set a thread's display title (the drawer renaming a row). */
|
|
60
|
+
renameThread(threadId: string, title: string): void;
|
|
36
61
|
}
|
|
37
62
|
/**
|
|
38
63
|
* Default {@link ClientConversationStore}: per-tab `sessionStorage`.
|
|
39
64
|
*
|
|
40
65
|
* Survives full page reloads and same-tab navigation, clears on tab close —
|
|
41
66
|
* the right scope for an embedded agent's conversation in a multi-page app.
|
|
42
|
-
*
|
|
43
|
-
*
|
|
67
|
+
* Tracks multiple threads per tab: the active id lives under one key, the
|
|
68
|
+
* message history / checkpoint are namespaced by id, and a small index feeds
|
|
69
|
+
* the drawer so it works with no server.
|
|
44
70
|
*/
|
|
45
71
|
export declare class SessionStorageStore implements ClientConversationStore {
|
|
46
72
|
#private;
|
|
@@ -50,5 +76,8 @@ export declare class SessionStorageStore implements ClientConversationStore {
|
|
|
50
76
|
loadCheckpoint(threadId: string): NavigationCheckpoint | null;
|
|
51
77
|
saveCheckpoint(threadId: string, checkpoint: NavigationCheckpoint | null): void;
|
|
52
78
|
clear(threadId: string): void;
|
|
79
|
+
listThreads(): Promise<readonly ThreadMeta[]>;
|
|
80
|
+
setActiveThread(threadId: string): void;
|
|
81
|
+
renameThread(threadId: string, title: string): void;
|
|
53
82
|
}
|
|
54
83
|
//# sourceMappingURL=conversation_store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_store.d.ts","sourceRoot":"","sources":["../../src/core/conversation_store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,uEAAuE;IACvE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED
|
|
1
|
+
{"version":3,"file":"conversation_store.d.ts","sourceRoot":"","sources":["../../src/core/conversation_store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,uEAAuE;IACvE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC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IAAI,CAAC;IAIlE,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI;IAKlE,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI;IAI7D,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,oBAAoB,GAAG,IAAI,GAAG,IAAI;IAS/E,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAY7B,WAAW,IAAI,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC;IAO7C,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIvC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;CA2DpD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Message } from "@ag-ui/core";
|
|
2
|
+
import { type ClientConversationStore, type NavigationCheckpoint, type ThreadMeta } from "./conversation_store.js";
|
|
3
|
+
/** Live header source, read per request so rotated tokens / CSRF reach the server. */
|
|
4
|
+
type HeadersProvider = () => Record<string, string>;
|
|
5
|
+
/**
|
|
6
|
+
* A {@link ClientConversationStore} backed by a server thread-index endpoint —
|
|
7
|
+
* django-ag-ui's owner-scoped `ThreadsView`, the URL passed to `<ag-ui-chat>`
|
|
8
|
+
* as `data-threads-url`:
|
|
9
|
+
*
|
|
10
|
+
* - `GET <url>` → list the user's threads (metadata only);
|
|
11
|
+
* - `GET <url><id>/` → that thread's messages;
|
|
12
|
+
* - `PATCH <url><id>/` → rename (`{ "title": … }`);
|
|
13
|
+
* - `DELETE <url><id>/` → delete.
|
|
14
|
+
*
|
|
15
|
+
* It wraps a local store (default {@link SessionStorageStore}) for the
|
|
16
|
+
* client-only concerns — the active thread id, the navigation checkpoint, and a
|
|
17
|
+
* message cache — and as the graceful fallback when a request fails. Rename and
|
|
18
|
+
* delete apply **optimistically** (a small local overlay) so the drawer
|
|
19
|
+
* reflects them at once, before the fire-and-forget server round-trip lands.
|
|
20
|
+
*/
|
|
21
|
+
export declare class RemoteConversationStore implements ClientConversationStore {
|
|
22
|
+
#private;
|
|
23
|
+
constructor(url: string, headers?: HeadersProvider, local?: ClientConversationStore);
|
|
24
|
+
threadId(): string;
|
|
25
|
+
setActiveThread(threadId: string): void;
|
|
26
|
+
saveMessages(threadId: string, messages: readonly Message[]): void;
|
|
27
|
+
loadCheckpoint(threadId: string): NavigationCheckpoint | null;
|
|
28
|
+
saveCheckpoint(threadId: string, checkpoint: NavigationCheckpoint | null): void;
|
|
29
|
+
renameThread(threadId: string, title: string): void;
|
|
30
|
+
clear(threadId: string): void;
|
|
31
|
+
listThreads(): Promise<readonly ThreadMeta[]>;
|
|
32
|
+
loadMessages(threadId: string): Promise<readonly Message[] | null>;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=remote_conversation_store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote_conversation_store.d.ts","sourceRoot":"","sources":["../../src/core/remote_conversation_store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAEzB,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AAUjC,sFAAsF;AACtF,KAAK,eAAe,GAAG,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEpD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,uBAAwB,YAAW,uBAAuB;;gBAQnE,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,eAA4B,EACrC,KAAK,GAAE,uBAAmD;IAO5D,QAAQ,IAAI,MAAM;IAIlB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIvC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI;IAKlE,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI;IAI7D,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,oBAAoB,GAAG,IAAI,GAAG,IAAI;IAI/E,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAMnD,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMvB,WAAW,IAAI,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC;IAQ7C,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,GAAG,IAAI,CAAC;CAqDzE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AttachmentRef } from "./attachment.js";
|
|
2
|
+
/**
|
|
3
|
+
* The composer's upload contract: take a `File`, report `0..1` progress, and
|
|
4
|
+
* resolve to a durable {@link AttachmentRef}. The built-in handler is
|
|
5
|
+
* {@link uploadAttachment} (multipart POST); a host swaps in its own — e.g. a
|
|
6
|
+
* `tus-js-client` or direct-to-S3 adapter — via `AgUiChat.uploadHandler`,
|
|
7
|
+
* **without** touching the tray, the chips, or the AG-UI wire (refs are
|
|
8
|
+
* transport-agnostic).
|
|
9
|
+
*/
|
|
10
|
+
export type UploadHandler = (file: File, onProgress: (fraction: number) => void) => Promise<AttachmentRef>;
|
|
11
|
+
/** Options for {@link uploadAttachment}. */
|
|
12
|
+
export interface UploadOptions {
|
|
13
|
+
/** The attachments endpoint (`data-attachments-url`). */
|
|
14
|
+
readonly url: string;
|
|
15
|
+
/** Extra HTTP headers (CSRF / auth), read fresh per upload. */
|
|
16
|
+
readonly headers?: Record<string, string>;
|
|
17
|
+
/** Progress callback, `0..1`, fired as the body uploads. */
|
|
18
|
+
readonly onProgress?: (fraction: number) => void;
|
|
19
|
+
/** Abort signal to cancel the in-flight upload. */
|
|
20
|
+
readonly signal?: AbortSignal;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Upload one file to the attachments endpoint and resolve to its durable
|
|
24
|
+
* {@link AttachmentRef}.
|
|
25
|
+
*
|
|
26
|
+
* Uses `XMLHttpRequest` (not `fetch`) for real upload-progress events: the file
|
|
27
|
+
* is sent as multipart under the `file` field, with the element's `headers` so
|
|
28
|
+
* CSRF / auth ride along exactly like the skills/tools fetches. A non-2xx
|
|
29
|
+
* response or a network/abort error rejects, so the tray can show an error chip.
|
|
30
|
+
*/
|
|
31
|
+
export declare function uploadAttachment(file: File, options: UploadOptions): Promise<AttachmentRef>;
|
|
32
|
+
//# sourceMappingURL=upload_attachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload_attachment.d.ts","sourceRoot":"","sources":["../../src/core/upload_attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,KACnC,OAAO,CAAC,aAAa,CAAC,CAAC;AAE5B,4CAA4C;AAC5C,MAAM,WAAW,aAAa;IAC5B,yDAAyD;IACzD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,4DAA4D;IAC5D,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,mDAAmD;IACnD,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAyC3F"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export { ELEMENT_TAG, MAX_TOOL_ROUNDS, MESSAGE_ROLE, SUBMIT_EVENT, TOGGLE_EVENT, TOOL_CALL_STATUS, TOOL_DISPLAY, X_CONFIRM_KEY, X_DESTRUCTIVE_KEY, X_NAVIGATES_KEY, X_SUMMARY_KEY, } from "./constants.js";
|
|
2
2
|
export { AgUiChat, type MessageRole, type SubmitDetail, type ToggleDetail, } from "./core/ag_ui_chat.js";
|
|
3
3
|
export { AgUiClient, type AgUiClientConfig, type AgUiClientHandlers, type AgUiRunInputs, type AgUiToolCall, type ExecuteTool, type ToolExecution, } from "./core/agui_client.js";
|
|
4
|
-
export { type
|
|
4
|
+
export { type AttachmentRef, messageAttachments } from "./core/attachment.js";
|
|
5
|
+
export { type ClientConversationStore, type NavigationCheckpoint, SessionStorageStore, type ThreadMeta, } from "./core/conversation_store.js";
|
|
5
6
|
export { type AgentFactory, createHttpAgent, type HttpAgentOptions, } from "./core/create_http_agent.js";
|
|
6
7
|
export { defineAgUiChat } from "./core/define_ag_ui_chat.js";
|
|
8
|
+
export { RemoteConversationStore } from "./core/remote_conversation_store.js";
|
|
9
|
+
export { type UploadHandler, type UploadOptions, uploadAttachment, } from "./core/upload_attachment.js";
|
|
7
10
|
export { type FlashOptions, focusWithFlash, type HighlightClickOptions, highlightThenClick, type PressOptions, prefersReducedMotion, pressThenClick, type SelectOptions, scrollIntoCenterView, selectOption, type TextLikeElement, type ToggleOptions, type TypeOptions, toggleControl, typeInto, } from "./dom/animations.js";
|
|
8
11
|
export { clickElement, type FillFieldOptions, fillField, pressButton, selectControl, setControlValue, toggleCheckbox, } from "./dom/dom_driver.js";
|
|
9
12
|
export { setNativeChecked, setNativeValue } from "./dom/native_setter.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,aAAa,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,mBAAmB,EACnB,KAAK,UAAU,GAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KA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