@tangle-network/sandbox-ui 0.61.0 → 0.62.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.
@@ -1,560 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
-
4
- /**
5
- * Wire + UI types for the in-app assistant panel. The wire shapes mirror the
6
- * SSE contract emitted by `POST /v1/assistant/chat` (platform-api
7
- * `routes/assistant.ts`). Drift here only mis-renders the client; the server
8
- * is the source of truth for what it accepts and emits.
9
- */
10
-
11
- /** Request body for `POST /api/v1/assistant/chat`. */
12
- interface ChatRequest {
13
- message: string;
14
- /** Model slug to run this turn against; omit to use the server default. */
15
- model?: string;
16
- /** Omit to start a new thread; pass to continue an existing one. */
17
- threadId?: string;
18
- /** Per-turn idempotency key — guards against double-charge on retry. */
19
- turnKey?: string;
20
- }
21
- interface ThreadEventData {
22
- threadId: string;
23
- turnId: string;
24
- /** The model slug this turn ran against, when the server reports it. */
25
- model?: string | null;
26
- }
27
- interface DeltaEventData {
28
- text: string;
29
- }
30
- /** A chunk of the model's reasoning/thinking, streamed BEFORE the answer for
31
- * reasoning models. Surfaced as a dim "thinking" block so a long reasoning gap
32
- * doesn't read as a frozen panel. Absent for non-reasoning models. */
33
- interface ReasoningEventData {
34
- text: string;
35
- }
36
- /** Emitted when a read-only tool STARTS running, before its result. Lets the
37
- * panel show live "running <tool>…" progress instead of a silent gap. */
38
- interface ToolCallEventData {
39
- callId: string;
40
- name: string;
41
- /** The parsed arguments the agent invoked the tool with. Lets a renderer show
42
- * exactly what was called. Omitted by servers predating the field. */
43
- args?: Record<string, unknown>;
44
- }
45
- interface ToolResultEventData {
46
- callId: string;
47
- name: string;
48
- ok: boolean;
49
- output?: unknown;
50
- error?: {
51
- code: string;
52
- message: string;
53
- };
54
- }
55
- /** What kind of connection a requirement names — drives the card's label and
56
- * connect target. "integration" is an OAuth/api-key connection on the
57
- * integrations page; "github_app" is the GitHub App installed on the repo (the
58
- * event source for a GitHub trigger), connected via the App install flow. */
59
- type ConnectionRequirementKind = "integration" | "github_app";
60
- /** A connection a proposed workflow references, and whether the user has it
61
- * connected right now. Surfaced on an authoring proposal so the card can show
62
- * what must be connected — and WHERE — before the workflow can be created. */
63
- interface ConnectionRequirement {
64
- provider: string;
65
- connected: boolean;
66
- /** What must be connected. Absent on proposals predating the field — treated
67
- * as "integration" by the card. */
68
- kind?: ConnectionRequirementKind;
69
- /** Where the user connects this requirement, supplied by the server (the
70
- * GitHub App install URL is deploy config the client can't derive). Null when
71
- * there's no link to offer (e.g. a github_app requirement on a deploy with no
72
- * app slug); the card then shows the requirement without a connect link. */
73
- connectUrl?: string | null;
74
- }
75
- interface ToolProposalEventData {
76
- /** Null only if the server has no proposal store wired (tools then unusable). */
77
- proposalId: string | null;
78
- callId: string;
79
- name: string;
80
- args: unknown;
81
- /** Present on a workflow-authoring proposal: the integrations it references
82
- * and their current connection status. Omitted for non-authoring tools. */
83
- requirements?: ConnectionRequirement[];
84
- }
85
- interface UsageEventData {
86
- promptTokens: number | null;
87
- completionTokens: number | null;
88
- costUsd: number | null;
89
- balanceUsd: number | null;
90
- /** Wall-clock duration of the turn in milliseconds, when the server measures
91
- * it. Drives the renderer's tokens/sec figure. Omitted by older servers. */
92
- durationMs?: number | null;
93
- /** True when a completed turn was replayed from storage (no charge). */
94
- replayed?: boolean;
95
- }
96
- interface DoneEventData {
97
- turnId: string;
98
- status: string;
99
- /** True when a mutating tool was proposed and is awaiting confirmation. */
100
- proposed?: boolean;
101
- /** True when the agentic loop hit its tool-round cap. */
102
- capped?: boolean;
103
- }
104
- interface ErrorEventData {
105
- code: string;
106
- message: string;
107
- }
108
- /** Discriminated union the stream reader hands to the reducer. */
109
- type AssistantStreamEvent = {
110
- type: "thread";
111
- data: ThreadEventData;
112
- } | {
113
- type: "delta";
114
- data: DeltaEventData;
115
- } | {
116
- type: "reasoning";
117
- data: ReasoningEventData;
118
- } | {
119
- type: "tool_call";
120
- data: ToolCallEventData;
121
- } | {
122
- type: "tool_result";
123
- data: ToolResultEventData;
124
- } | {
125
- type: "tool_proposal";
126
- data: ToolProposalEventData;
127
- } | {
128
- type: "usage";
129
- data: UsageEventData;
130
- } | {
131
- type: "done";
132
- data: DoneEventData;
133
- } | {
134
- type: "error";
135
- data: ErrorEventData;
136
- };
137
- /** A `tool` message is the inline activity chip for a read-only tool the agent
138
- * ran during a turn (e.g. "Validating workflow… ✓"). */
139
- type ChatRole = "user" | "assistant" | "status" | "tool";
140
- /** Live status of a tool-activity chip. */
141
- type ToolActivityStatus = "running" | "ok" | "failed";
142
- /** The outcome of a finished read-only tool, retained on the chip so a renderer
143
- * can show the result body (not just the name + status). Mirrors the
144
- * `tool_result` event: a success carries the tool's `result`; a failure carries
145
- * the error. Absent while the tool is still running. */
146
- type ToolOutcome = {
147
- ok: true;
148
- result?: unknown;
149
- } | {
150
- ok: false;
151
- error?: {
152
- code: string;
153
- message: string;
154
- };
155
- };
156
- interface ChatMessage {
157
- id: string;
158
- role: ChatRole;
159
- text: string;
160
- /** Present only on `tool` messages — the activity's tool name, the arguments it
161
- * was called with, its state, and (once finished) its outcome. */
162
- tool?: {
163
- name: string;
164
- status: ToolActivityStatus;
165
- args?: Record<string, unknown>;
166
- outcome?: ToolOutcome;
167
- };
168
- }
169
- /** A mutating action the assistant proposed, awaiting the user's confirmation. */
170
- interface PendingProposal {
171
- proposalId: string | null;
172
- callId: string;
173
- name: string;
174
- args: unknown;
175
- /** Integration requirements for a workflow-authoring proposal (each provider
176
- * + whether it's connected); omitted for non-authoring proposals. */
177
- requirements?: ConnectionRequirement[];
178
- /** Inline error shown ON the card after a RETRYABLE confirm failure (an
179
- * unconnected integration): the card stays so the user can connect and
180
- * confirm again. Null/absent when the card has not failed a retry. */
181
- retryError?: string | null;
182
- }
183
- interface UsageInfo {
184
- costUsd: number | null;
185
- balanceUsd: number | null;
186
- /** Token counts + wall-clock duration for the settled turn, when the server
187
- * reports them — drive per-message tokens/sec + cost in a renderer. Optional
188
- * so a consumer constructing this on the prior `{ costUsd, balanceUsd,
189
- * replayed }` shape stays valid; a renderer treats a missing value as null. */
190
- promptTokens?: number | null;
191
- completionTokens?: number | null;
192
- durationMs?: number | null;
193
- replayed: boolean;
194
- }
195
- /**
196
- * The transcript slice handed to a host-supplied `renderTranscript` (see
197
- * {@link AssistantPanelProps}). It lets a host swap ONLY the conversation
198
- * rendering — to use its own message renderer — while the panel keeps owning the
199
- * dock chrome, composer, model picker, history, transport, and proposal
200
- * orchestration. The bound `renderProposal` returns the panel's own proposal
201
- * card so the host can place it (e.g. inline after the proposing turn) without
202
- * re-implementing the confirm/cancel flow.
203
- */
204
- interface AssistantTranscriptView {
205
- messages: ChatMessage[];
206
- /** The current turn's reasoning/thinking text, if any (streamed before the
207
- * answer for reasoning models). */
208
- reasoning: string | null;
209
- /** Id of the assistant message currently accumulating deltas, if any. */
210
- streamingId: string | null;
211
- /** Model slug the current/most-recent turn ran against, or null. */
212
- model: string | null;
213
- /** True while a turn is streaming. */
214
- isStreaming: boolean;
215
- /** True while the agent is working but has produced no visible output yet
216
- * (drives a "thinking" affordance). */
217
- isThinking: boolean;
218
- pendingProposals: PendingProposal[];
219
- /** Cost/tokens/duration for the most recently settled turn, or null before any
220
- * turn settles. Optional so a host predating the field stays a valid consumer;
221
- * a renderer treats a missing value the same as null. */
222
- usage?: UsageInfo | null;
223
- /** The panel's bound proposal card for a pending proposal — render it where the
224
- * confirm/cancel UI should appear. */
225
- renderProposal: (proposal: PendingProposal) => ReactNode;
226
- }
227
-
228
- /**
229
- * Configurable network client for the assistant panel: the chat SSE stream, the
230
- * model/thread/history reads, and the proposal-confirmation call.
231
- *
232
- * The transport is injected via {@link AssistantClientConfig} so the same UI can
233
- * run in different hosts: a same-origin app authenticates with the session
234
- * cookie (`credentials: "include"`) and an `X-Requested-With` marker, while a
235
- * cross-origin host points `baseUrl` at the API and supplies a bearer token via
236
- * `headers`. The request shapes and the defensive wire parsing are identical
237
- * across hosts — only the base URL and the auth headers vary.
238
- */
239
-
240
- /** Host-supplied transport configuration for {@link createAssistantClient}. */
241
- interface AssistantClientConfig {
242
- /**
243
- * Base URL the five assistant endpoints hang off, with no trailing slash —
244
- * e.g. `"/api/v1/assistant"` for a same-origin SSR edge, or
245
- * `"https://id.tangle.tools/api/v1/assistant"` cross-origin. Each method
246
- * appends its own path (`/chat`, `/models`, `/threads`, …).
247
- */
248
- baseUrl: string;
249
- /**
250
- * `fetch` credentials mode. Defaults to `"include"` so a same-origin cookie
251
- * session authenticates; a token-based cross-origin host may pass `"omit"`
252
- * and carry the credential in {@link AssistantClientConfig.headers}.
253
- */
254
- credentials?: RequestCredentials;
255
- /**
256
- * Headers applied to every request — the auth token and/or the CSRF marker.
257
- * Called per request so a rotating token is read fresh, never captured once.
258
- */
259
- headers?: () => Record<string, string>;
260
- }
261
- interface AssistantModelOption {
262
- slug: string;
263
- label: string;
264
- /** USD per million prompt tokens, when the catalog carries pricing. */
265
- promptUsdPerMillion?: number;
266
- /** Context window in tokens, when known. */
267
- contextTokens?: number;
268
- }
269
- interface AssistantModels {
270
- /** The slug the server uses when a turn selects no model. */
271
- default: string | null;
272
- models: AssistantModelOption[];
273
- }
274
- /** One past conversation in the history switcher. */
275
- interface AssistantThreadSummary {
276
- id: string;
277
- /** Truncated first user message; may be null for an untitled thread. */
278
- title: string | null;
279
- createdAt: string;
280
- updatedAt: string;
281
- }
282
- /**
283
- * Outcome of a model-list fetch. `ok` drives caching: the caller caches on `ok`
284
- * and retries on `!ok`. An EMPTY list is reported as `!ok` — the server always
285
- * offers at least the default model when the router is reachable, so an empty
286
- * menu means the catalog couldn't be loaded and should be retried, not cached
287
- * for the whole session.
288
- */
289
- interface AssistantModelsResult {
290
- ok: boolean;
291
- data: AssistantModels;
292
- }
293
- /**
294
- * Outcome of a thread-history restore. The three cases drive different recovery:
295
- * `ok` rehydrates the transcript; `gone` (the thread 404s — deleted or from a
296
- * reset DB) tells the caller to drop the dead thread id so the next turn starts
297
- * fresh; `error` (transient/network/aborted) keeps the thread id and simply
298
- * doesn't restore, so a later attempt or send still targets the live thread.
299
- */
300
- type ThreadHistoryResult = {
301
- status: "ok";
302
- messages: ChatMessage[];
303
- proposals: PendingProposal[];
304
- } | {
305
- status: "gone";
306
- } | {
307
- status: "error";
308
- };
309
- type ConfirmResult = {
310
- ok: true;
311
- output: unknown;
312
- retryable?: boolean;
313
- } | {
314
- ok: false;
315
- error: string;
316
- };
317
- /** The assistant network surface, bound to one host's transport config. */
318
- interface AssistantClient {
319
- fetchModels(signal?: AbortSignal): Promise<AssistantModelsResult>;
320
- fetchThreads(signal?: AbortSignal): Promise<AssistantThreadSummary[] | null>;
321
- fetchThreadHistory(threadId: string, signal?: AbortSignal): Promise<ThreadHistoryResult>;
322
- streamChat(req: ChatRequest, onEvent: (event: AssistantStreamEvent) => void, signal: AbortSignal): Promise<void>;
323
- confirmProposal(proposalId: string): Promise<ConfirmResult>;
324
- /** Delete a thread and its server-side turns/proposals. Resolves `{ ok }`; a
325
- * 404 (already gone) is treated as success so a double-delete is harmless.
326
- * Optional so a host with no delete endpoint stays a valid client — the panel
327
- * hides the delete affordance when it's absent (see `useAssistantThreads`). */
328
- deleteThread?(threadId: string): Promise<{
329
- ok: boolean;
330
- }>;
331
- }
332
- /**
333
- * Build an assistant client bound to one host's transport. The returned methods
334
- * carry no module state, so a host may create one client per config (or share a
335
- * single same-origin client for the whole app).
336
- */
337
- declare function createAssistantClient(config: AssistantClientConfig): AssistantClient;
338
-
339
- declare function AssistantClientProvider({ client, children, }: {
340
- client: AssistantClient;
341
- children: ReactNode;
342
- }): react_jsx_runtime.JSX.Element;
343
- /**
344
- * The assistant client for the current host. Throws when no provider is mounted
345
- * rather than silently falling back to a default transport — a missing provider
346
- * is a wiring bug, and a hidden default would mask it (and could target the
347
- * wrong origin).
348
- */
349
- declare function useAssistantClient(): AssistantClient;
350
-
351
- /**
352
- * Pure state machine driving the assistant panel. Every UI transition — a user
353
- * message, each streamed SSE event, a stream failure, a confirmed/cancelled
354
- * proposal, a manual stop — is modeled as an action here, so the panel's
355
- * behavior can be verified without a DOM or a live stream.
356
- */
357
-
358
- type ChatStatus = "idle" | "streaming" | "awaiting_confirm";
359
- interface AssistantState {
360
- /** The signed-in user this conversation belongs to. Carried in state so it
361
- * moves atomically with the data it labels — persistence keys off it, and a
362
- * render whose owner doesn't match the current user is masked (see
363
- * `selectVisibleState`), preventing a one-frame cross-account leak. */
364
- ownerId: string | null;
365
- /** Persisted across reloads to continue the same server-side thread. */
366
- threadId: string | null;
367
- messages: ChatMessage[];
368
- status: ChatStatus;
369
- /** Id of the assistant message currently accumulating deltas, if any. Set to
370
- * null mid-turn when a tool runs, so the next text delta opens a fresh
371
- * assistant bubble — keeping each reasoning segment visually distinct. */
372
- streamingId: string | null;
373
- /** Base id for the current turn's assistant bubbles (the `send` assistant id).
374
- * Post-tool segments derive a unique id from it; null between turns. */
375
- streamBaseId: string | null;
376
- /** How many assistant bubbles the current turn has opened (0 = just the first).
377
- * Drives the per-segment bubble id so segments never collide across turns. */
378
- segmentSeq: number;
379
- pendingProposals: PendingProposal[];
380
- /** Cost/balance from the most recently settled turn. */
381
- usage: UsageInfo | null;
382
- /** Model slug the current/most-recent turn ran against (from the thread
383
- * event), or null before any turn this session. */
384
- model: string | null;
385
- /** The current turn's accumulated reasoning/thinking text (reasoning models
386
- * stream this before the answer). Shown dim while the answer is still pending;
387
- * reset at the start of each turn. Null when the model emits no reasoning. */
388
- reasoning: string | null;
389
- error: {
390
- code: string;
391
- message: string;
392
- } | null;
393
- }
394
-
395
- /**
396
- * React binding for the assistant panel: owns the reducer, drives the chat SSE
397
- * stream and the proposal-confirmation call, and persists the thread across
398
- * reloads. All rendering decisions live in the pure reducer + presentation
399
- * helpers; this hook is the glue between them and the network.
400
- */
401
-
402
- /** Host integration callbacks for {@link useAssistantChat}. */
403
- interface UseAssistantChatOptions {
404
- /**
405
- * Called after a workflow-mutating tool (`create_workflow`, `author_workflow`,
406
- * …) is confirmed successfully — the host re-fetches its workflow list so the
407
- * result appears without a manual reload. Replaces the in-app cross-module
408
- * signal the platform used.
409
- */
410
- onWorkflowMutation?: () => void;
411
- }
412
- interface AssistantChat {
413
- state: AssistantState;
414
- /** Proposal ids whose confirmation is currently in flight (for disabling). */
415
- confirmingIds: ReadonlySet<string>;
416
- /** The user's selected model slug, or null to use the server default. */
417
- selectedModel: string | null;
418
- /** Choose the model for subsequent turns (persisted per user). */
419
- setModel: (model: string | null) => void;
420
- send: (message: string) => void;
421
- stop: () => void;
422
- confirm: (proposal: PendingProposal) => Promise<void>;
423
- cancel: (proposal: PendingProposal) => void;
424
- reset: () => void;
425
- /** Open an existing thread from history, loading its transcript. */
426
- switchThread: (threadId: string) => void;
427
- /** True while a switched-to thread's transcript is loading — the composer is
428
- * held closed until it resolves so a turn can't run against hidden context. */
429
- restoring: boolean;
430
- }
431
- declare function useAssistantChat(userId: string | null, options?: UseAssistantChatOptions): AssistantChat;
432
-
433
- /**
434
- * The assistant's selectable models for the composer's picker. The list is
435
- * deployment config (not per-user), so it is fetched once per transport and
436
- * shared across panel mounts via a cache keyed by the `AssistantClient`.
437
- *
438
- * The cache has no TTL: it lives for the page session and is revalidated by a
439
- * page refresh — acceptable for deployment-config data that changes only on a
440
- * redeploy. An empty/failed fetch is NOT cached, so it retries on the next mount.
441
- *
442
- * Keyed by client so a host that swaps the transport (a tenant/origin/account
443
- * change) never serves the previous client's catalog or skips the fetch for the
444
- * new one. A WeakMap lets a discarded client's bucket be collected with it.
445
- *
446
- * Client-only by design (a `createRoot` SPA, no React SSR), so the cache lives
447
- * in one browser tab and is never shared across server requests. Under Strict
448
- * Mode's double-mount the two effect runs share the one in-flight fetch; the
449
- * first run's `active = false` makes its callback a no-op, the second commits —
450
- * dedup holds, no torn state.
451
- */
452
-
453
- declare function useAssistantModels(): AssistantModels;
454
-
455
- /**
456
- * The user's recent assistant chat threads for the history switcher. Unlike the
457
- * model list (deployment config, fetched once), the thread list changes as the
458
- * user chats, so it is fetched ON DEMAND — call `refresh()` to (re)load it; the
459
- * panel does so when the history view opens and after a turn settles a new
460
- * thread into being. It does NOT fetch on mount, so `threads` stays empty and
461
- * `loaded` false until the first `refresh()`.
462
- *
463
- * Self-protective across account AND transport swaps. The list is tagged with the
464
- * (user, client) it belongs to and is masked to empty on the SAME commit if that
465
- * no longer matches the current props — so a swap never shows the prior scope's
466
- * threads for even one frame. In flight, a late result is dropped if either the
467
- * user or the client changed, and the request is aborted on the swap.
468
- */
469
-
470
- interface AssistantThreads {
471
- threads: AssistantThreadSummary[];
472
- loading: boolean;
473
- /** True once a fetch has settled at least once (drives empty-vs-loading copy). */
474
- loaded: boolean;
475
- /** Load (or reload) the thread list. Must be called to populate `threads` —
476
- * the hook never fetches on mount (the panel calls this when history opens). */
477
- refresh: () => void;
478
- /** Delete a thread. Optimistically drops it from the list (within the current
479
- * owner scope); on failure the list is reloaded to restore the true state. A
480
- * no-op resolving `{ ok: false }` when the client has no `deleteThread`. */
481
- remove: (threadId: string) => Promise<{
482
- ok: boolean;
483
- }>;
484
- /** Whether the configured client supports deletion — drives whether a host
485
- * shows the delete affordance. */
486
- canRemove: boolean;
487
- }
488
- declare function useAssistantThreads(userId: string | null): AssistantThreads;
489
-
490
- interface AssistantDockProps {
491
- /** The signed-in user this conversation belongs to (null when signed out). */
492
- userId: string | null;
493
- /** Host navigation for error CTAs and connect targets. */
494
- navigate?: (path: string) => void;
495
- balanceUsd?: number | null;
496
- formatMoney?: (usd: number | null) => string;
497
- /** Render workflow YAML as a node graph in a proposal card. */
498
- renderGraph?: (yaml: string) => ReactNode;
499
- /** Called after a workflow-mutating tool is confirmed (host re-fetches its list). */
500
- onWorkflowMutation?: () => void;
501
- /** Swap the conversation rendering for a host-supplied renderer (see
502
- * {@link AssistantPanelProps.renderTranscript}); the dock chrome, composer,
503
- * transport, and proposal flow stay owned by the panel. */
504
- renderTranscript?: (view: AssistantTranscriptView) => ReactNode;
505
- }
506
- declare function AssistantDock({ userId, navigate, balanceUsd, formatMoney, renderGraph, onWorkflowMutation, renderTranscript, }: AssistantDockProps): react_jsx_runtime.JSX.Element;
507
-
508
- interface AssistantPanelProps {
509
- chat: AssistantChat;
510
- userId: string | null;
511
- onClose: () => void;
512
- /** Host navigation for error CTAs and connect targets. */
513
- navigate?: (path: string) => void;
514
- /** The user's credit balance, for the header tile + low-balance nudge. */
515
- balanceUsd?: number | null;
516
- /** Format a USD amount; defaults to Intl currency formatting. */
517
- formatMoney?: (usd: number | null) => string;
518
- /** Render workflow YAML as a node graph in a proposal card (the `./workflows`
519
- * WorkflowGraph). When absent, proposals show YAML as text. */
520
- renderGraph?: (yaml: string) => ReactNode;
521
- /** Swap ONLY the conversation rendering for a host-supplied renderer (e.g. a
522
- * different chat-message component), while the panel keeps owning the header,
523
- * composer, model picker, history, transport, and proposal orchestration.
524
- * Receives the transcript slice plus a bound proposal card to place. When
525
- * absent, the built-in `AgentTimeline` renders the conversation. */
526
- renderTranscript?: (view: AssistantTranscriptView) => ReactNode;
527
- }
528
- declare function AssistantPanel({ chat, userId, onClose, navigate, balanceUsd, formatMoney, renderGraph, renderTranscript, }: AssistantPanelProps): react_jsx_runtime.JSX.Element;
529
-
530
- interface ProposalCardProps {
531
- proposal: PendingProposal;
532
- /** True while this proposal's confirmation is in flight (disables the buttons). */
533
- confirming: boolean;
534
- onConfirm: () => void;
535
- onCancel: () => void;
536
- /** Host navigation for connect targets / the integrations page. */
537
- navigate?: (path: string) => void;
538
- /** Render the workflow YAML as a node graph (the `./workflows` WorkflowGraph).
539
- * When absent, the YAML is shown as text. */
540
- renderGraph?: (yaml: string) => ReactNode;
541
- }
542
- declare function ProposalCard({ proposal, confirming, onConfirm, onCancel, navigate, renderGraph, }: ProposalCardProps): react_jsx_runtime.JSX.Element;
543
-
544
- interface AssistantLauncher {
545
- /** Whether the assistant drawer is open. */
546
- open: boolean;
547
- /** A one-shot starter prompt to prefill the composer with, or null. */
548
- seed: string | null;
549
- /** Open the drawer; optionally prefill the composer with `seed`. */
550
- openAssistant: (seed?: string) => void;
551
- closeAssistant: () => void;
552
- /** Clear the pending seed once the composer has applied it (consume-once). */
553
- clearSeed: () => void;
554
- }
555
- declare function AssistantLauncherProvider({ children, }: {
556
- children: ReactNode;
557
- }): react_jsx_runtime.JSX.Element;
558
- declare function useAssistantLauncher(): AssistantLauncher;
559
-
560
- export { type AssistantChat, type AssistantClient, type AssistantClientConfig, AssistantClientProvider, AssistantDock, type AssistantDockProps, type AssistantLauncher, AssistantLauncherProvider, type AssistantModelOption, type AssistantModels, type AssistantModelsResult, AssistantPanel, type AssistantPanelProps, type AssistantStreamEvent, type AssistantThreadSummary, type AssistantThreads, type AssistantTranscriptView, type ChatMessage, type ChatRequest, type ChatRole, type ConfirmResult, type ConnectionRequirement, type ConnectionRequirementKind, type DeltaEventData, type DoneEventData, type ErrorEventData, type PendingProposal, ProposalCard, type ProposalCardProps, type ReasoningEventData, type ThreadEventData, type ThreadHistoryResult, type ToolActivityStatus, type ToolCallEventData, type ToolOutcome, type ToolProposalEventData, type ToolResultEventData, type UsageEventData, type UsageInfo, type UseAssistantChatOptions, createAssistantClient, useAssistantChat, useAssistantClient, useAssistantLauncher, useAssistantModels, useAssistantThreads };