@tangle-network/agent-app 0.43.42 → 0.43.44

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.
Files changed (39) hide show
  1. package/dist/assistant/index.d.ts +2 -1
  2. package/dist/assistant/index.js +3 -2
  3. package/dist/assistant/index.js.map +1 -1
  4. package/dist/chat-routes/index.d.ts +152 -4
  5. package/dist/chat-routes/index.js +134 -20
  6. package/dist/chat-routes/index.js.map +1 -1
  7. package/dist/chat-store/index.d.ts +2 -2
  8. package/dist/chat-store/index.js +7 -1
  9. package/dist/chat-store/index.js.map +1 -1
  10. package/dist/{chunk-5GWXCSLQ.js → chunk-5RJNEEO2.js} +86 -5
  11. package/dist/chunk-5RJNEEO2.js.map +1 -0
  12. package/dist/chunk-6E2XJSCT.js +298 -0
  13. package/dist/chunk-6E2XJSCT.js.map +1 -0
  14. package/dist/chunk-LCNY3DCM.js +84 -0
  15. package/dist/chunk-LCNY3DCM.js.map +1 -0
  16. package/dist/{chunk-ZLHK25C3.js → chunk-Q4EU6MGU.js} +54 -6
  17. package/dist/chunk-Q4EU6MGU.js.map +1 -0
  18. package/dist/{chunk-UMSOSUEU.js → chunk-QYOD3K56.js} +2 -2
  19. package/dist/chunk-QYOD3K56.js.map +1 -0
  20. package/dist/file-index-Bn6sitKb.d.ts +114 -0
  21. package/dist/index.d.ts +2 -2
  22. package/dist/index.js +17 -3
  23. package/dist/object-store/index.d.ts +6 -4
  24. package/dist/object-store/index.js +1 -1
  25. package/dist/parts-1_3y2JmR.d.ts +368 -0
  26. package/dist/sandbox/index.d.ts +111 -2
  27. package/dist/sandbox/index.js +9 -1
  28. package/dist/web-react/index.d.ts +51 -3
  29. package/dist/web-react/index.js +13 -4
  30. package/package.json +1 -1
  31. package/dist/chunk-2EO7CPL3.js +0 -191
  32. package/dist/chunk-2EO7CPL3.js.map +0 -1
  33. package/dist/chunk-5GWXCSLQ.js.map +0 -1
  34. package/dist/chunk-I2ATYB7R.js +0 -78
  35. package/dist/chunk-I2ATYB7R.js.map +0 -1
  36. package/dist/chunk-UMSOSUEU.js.map +0 -1
  37. package/dist/chunk-ZLHK25C3.js.map +0 -1
  38. package/dist/file-index-Bw_IQE_G.d.ts +0 -194
  39. package/dist/parts-DjX0RRTS.d.ts +0 -182
@@ -0,0 +1,368 @@
1
+ import { Part } from '@tangle-network/agent-interface';
2
+ import { a as ChatInteractionField, b as ChatInteractionStatus, h as InteractionAnswers, N as NoticeKind } from './contract-KfqJh_au.js';
3
+ import { ChatPlanPersistedPart } from './plans/index.js';
4
+
5
+ /**
6
+ * Wire contract between the chat client (composer + `streamChatTurn`) and the
7
+ * assembled server vertical (`createChatTurnRoutes`). Import-free on purpose:
8
+ * `/web-react` re-exports these types into browser bundles, so nothing here may
9
+ * reach a Node builtin or an engine package.
10
+ *
11
+ * The part shape mirrors the sandbox SDK's `PromptInputPart` structurally
12
+ * (text | image | file with filename/mediaType/url/path/content) — derived
13
+ * here, not imported, so the client bundle never touches the SDK.
14
+ */
15
+ interface ChatTurnTextPartInput {
16
+ type: 'text';
17
+ text: string;
18
+ }
19
+ /** A non-text prompt part the upload route hands back and the client echoes
20
+ * on send. `url` carries an inline `data:` URI for small files; `path` is a
21
+ * sandbox workspace reference for large ones (the >1 MiB gateway body cap
22
+ * makes the two-step upload mandatory). */
23
+ interface ChatTurnFilePartInput {
24
+ type: 'image' | 'file';
25
+ filename?: string;
26
+ mediaType?: string;
27
+ url?: string;
28
+ path?: string;
29
+ content?: string;
30
+ }
31
+ type ChatTurnPartInput = ChatTurnTextPartInput | ChatTurnFilePartInput;
32
+ /** POST body for the turn route. `content` may be empty when `parts` carry the
33
+ * message (an image-only send). Product routing fields (workspaceId etc.) ride
34
+ * alongside and are read by the product's `authorize` seam. */
35
+ interface ChatTurnRequestPayload {
36
+ threadId: string;
37
+ content?: string;
38
+ /** Non-text parts from the upload route, echoed back verbatim. */
39
+ parts?: ChatTurnFilePartInput[];
40
+ /** `@`-picked file mentions for this turn — path references into the
41
+ * workspace sandbox, NOT uploads, so they travel in their own field rather
42
+ * than as `parts` entries. A product whose `parts` field is already spoken
43
+ * for (an attachment sentinel) can still send mentions, and mentions
44
+ * persist as their own `ChatMentionPart`s so a retry rebuilds them. The
45
+ * route validates this field with {@link parseFileMentions} and replaces it
46
+ * on the payload with the validated, deduped list. */
47
+ mentions?: FileMention[];
48
+ model?: string;
49
+ effort?: 'auto' | 'low' | 'medium' | 'high';
50
+ harness?: string;
51
+ /** Client-generated idempotency key for the logical turn (retry-safe). */
52
+ turnId?: string;
53
+ [key: string]: unknown;
54
+ }
55
+ /** `fetch` init for the turn route — the one place the client wire shape is
56
+ * serialized, so composer glue and products never drift from the server's
57
+ * parser. */
58
+ declare function chatTurnRequestInit(payload: ChatTurnRequestPayload): RequestInit;
59
+ declare const INLINE_PARTS_MAX_BYTES = 950000;
60
+ declare class ChatTurnInputError extends Error {
61
+ readonly status: number;
62
+ readonly code: string;
63
+ constructor(message: string, status?: number, code?: string);
64
+ }
65
+ declare function promptPartsByteSize(parts: ChatTurnPartInput[]): number;
66
+ /** Throws `ChatTurnInputError` (413) when the parts' inline payload would blow
67
+ * the gateway cap. Path-ref parts are tiny by construction and always pass. */
68
+ declare function assertPromptPartsWithinCap(parts: ChatTurnPartInput[], maxBytes?: number): void;
69
+ /** A file mention resolved from the composer's `@`-picker: the
70
+ * workspace-relative path plus enough metadata to build a prompt part and
71
+ * pointer text. `path` is the canonical identity — the mention pill's
72
+ * `MentionItem.id` for the file kind (`/web-react`'s `useFileMentions`). */
73
+ interface FileMention {
74
+ path: string;
75
+ name: string;
76
+ size?: number;
77
+ }
78
+ /** The `image/*` mime for a mention path by extension, or `undefined` for
79
+ * anything not in the known image set (dispatched as `type: 'file'`). */
80
+ declare function mediaTypeForMentionPath(path: string): string | undefined;
81
+ /** The image/file split a mention is rendered and persisted under — the
82
+ * composer pill's icon, the dispatched part's `type`, and
83
+ * `ChatMentionPart.mentionKind` are all this one value. */
84
+ type ChatMentionKind = 'image' | 'file';
85
+ /** `image` when the path's extension is in the known image set (the same table
86
+ * {@link mediaTypeForMentionPath} reads), `file` otherwise. Exported so a
87
+ * client that needs only the discriminant — a pill icon, a persisted part's
88
+ * `mentionKind` — never re-declares the extension table; two frozen copies of
89
+ * one mime table is how one gains a format and the other doesn't. */
90
+ declare function mentionKindForPath(path: string): ChatMentionKind;
91
+ interface FileMentionsToPartsOptions {
92
+ /** Resolve a mention's workspace-relative path to the absolute path the
93
+ * dispatched part should carry (e.g. a host prefixing the in-box vault
94
+ * root). Default: identity — the path travels unchanged. */
95
+ resolvePath?: (path: string) => string;
96
+ }
97
+ /** Maps resolved file mentions to path-only `ChatTurnFilePartInput`s —
98
+ * `image` vs `file` by extension, and always a `path`, never a `url` (the
99
+ * url/path XOR invariant: a mention is a sandbox path reference, never
100
+ * inline bytes). */
101
+ declare function fileMentionsToParts(mentions: readonly FileMention[], opts?: FileMentionsToPartsOptions): ChatTurnFilePartInput[];
102
+ /** The agent-facing pointer block appended to the dispatched prompt — never
103
+ * persisted in message `content`. Empty array → `''` so callers can append
104
+ * unconditionally. This is the sole producer of that text: the current
105
+ * turn's dispatch and any history projection built from the same mention
106
+ * list both route through here, so the two can't drift apart. */
107
+ declare function buildMentionPromptBlock(mentions: readonly Pick<FileMention, 'name' | 'path'>[]): string;
108
+ /** Hard cap on mentions per turn. Bounds the prompt pointer block, the
109
+ * persisted parts, and whatever media budget a dispatch draws from them. */
110
+ declare const MENTION_MAX_COUNT = 16;
111
+ type SandboxMentionPathCheck = {
112
+ succeeded: true;
113
+ } | {
114
+ succeeded: false;
115
+ error: string;
116
+ };
117
+ /**
118
+ * Validate a workspace-relative sandbox mention path. Rejects traversal (a
119
+ * `..` path segment), absolute paths (leading `/`), backslashes, and null
120
+ * bytes — the four ways a path picked in a client can escape the root the
121
+ * index route scanned.
122
+ *
123
+ * Spaces and unicode are deliberately ALLOWED: in-box filenames are arbitrary,
124
+ * and an ASCII-only charset would silently drop real files from a feature
125
+ * whose whole job is naming them.
126
+ */
127
+ declare function validateSandboxMentionPath(path: unknown): SandboxMentionPathCheck;
128
+ /**
129
+ * Validates the untyped `mentions` array off the wire, mirroring
130
+ * {@link parseChatTurnParts}: the typed list, or `ChatTurnInputError` (400)
131
+ * naming the offending entry. Never sanitizes-and-continues — a traversal path
132
+ * is a rejected request, not a trimmed one.
133
+ *
134
+ * A path repeated within one turn is deduped to its first occurrence rather
135
+ * than rejected: mentioning the same file twice is plausible user input, not
136
+ * an attack.
137
+ */
138
+ declare function parseFileMentions(raw: unknown): FileMention[];
139
+ /** Validates the untyped `parts` array off the wire. Returns the typed parts
140
+ * or throws `ChatTurnInputError` (400) naming the offending entry. */
141
+ declare function parseChatTurnParts(raw: unknown): ChatTurnFilePartInput[];
142
+
143
+ /**
144
+ * The stored shape of `message.parts` — one typed vocabulary for every part a
145
+ * product persists into a chat transcript. NOT an ad-hoc union reverse-
146
+ * engineered from product schemas; each member is matched field-for-field to
147
+ * its canonical source:
148
+ *
149
+ * - `text` / `reasoning` / `tool`: the persisted projection `/stream`'s
150
+ * `normalizePersistedPart` produces from the harness lane's
151
+ * `message.part.updated` events (ADC sidecar
152
+ * `apps/sidecar/src/events/session-events.ts:56` wraps the canonical part in
153
+ * an `{id, sessionID, messageID}` envelope; the projection strips the
154
+ * session/message ids and keeps the per-segment part id).
155
+ * - `file` / `image` / `step-start` / `step-finish`: the sidecar's canonical
156
+ * `MessagePartSchema` members (ADC
157
+ * `apps/sidecar/src/schemas/agent-schemas.ts:50-154`); `step-finish` carries
158
+ * the harness's per-step usage receipt — tokens
159
+ * `{total, input, output, reasoning, cache{write, read}}` + `cost` — which is
160
+ * also the shape the message-level token/cost columns mirror.
161
+ * - `subtask`: `@tangle-network/agent-interface`'s `SubtaskPart` (a spawned
162
+ * sub-agent task).
163
+ * - `interaction` / `notice`: the persisted-part codecs in
164
+ * `/web-react`'s chat-interactions contract (`interactionToPersistedPart`,
165
+ * `noticePart`) — type-only imports, one source of truth for their statuses
166
+ * and field shapes.
167
+ * - `plan`: the durable-plan projection in `/plans`, derived from the sandbox
168
+ * SDK's authoritative plan lifecycle.
169
+ * - `mention`: an `@`-picked reference to a file that already lives in the
170
+ * workspace sandbox (`FileMention` in `/chat-routes`'s wire contract, plus
171
+ * the image/file discriminant). Neither transport lane produces it — the
172
+ * turn route persists it from the request's `mentions` field — but it is a
173
+ * part a product persists into a transcript, so it belongs in this
174
+ * vocabulary rather than in a parallel one.
175
+ *
176
+ * `@tangle-network/agent-interface` exports the canonical wire `Part` union,
177
+ * but its `PartBase` requires the `sessionID`/`messageID` stream envelope that
178
+ * is deliberately NOT persisted, so the stored union is defined here as the
179
+ * envelope-free projection (a type-level coverage check against the peer's
180
+ * `Part['type']` lives in the tests). Contribute-down candidate: if
181
+ * agent-interface grows envelope-free persisted-part types, re-export them
182
+ * here and delete these definitions.
183
+ *
184
+ * Two transport lanes serialize into this SAME stored shape:
185
+ * - harness lane: canonical `message.part.updated` parts, merged/normalized by
186
+ * `/stream` (`mergePersistedPart`, `finalizeAssistantParts`);
187
+ * - router/openai-compat lane: `text_delta`/`tool_call` stream events are
188
+ * mapped INTO canonical part events first (`/runtime`'s `toLoopEvents` +
189
+ * `/stream`'s `normalizeToolEvent`) and then persisted identically — the
190
+ * store never sees a router-specific shape.
191
+ */
192
+
193
+ /** Start/end wall-clock millis, as normalized by `/stream`'s `normalizeTime`. */
194
+ interface ChatPartTime {
195
+ start?: number;
196
+ end?: number;
197
+ }
198
+ /** `id` is the harness's per-segment identity; absent on legacy/router parts,
199
+ * which collapse to a single logical text stream. Never invented client-side. */
200
+ interface ChatTextPart {
201
+ type: 'text';
202
+ text: string;
203
+ id?: string;
204
+ }
205
+ interface ChatReasoningPart {
206
+ type: 'reasoning';
207
+ text: string;
208
+ id?: string;
209
+ time?: ChatPartTime;
210
+ }
211
+ /** Superset of the sidecar's status enum (`pending|running|completed|failed`)
212
+ * and agent-interface's `ToolState` statuses; `error` is the persisted
213
+ * terminal form `/stream`'s `normalizePersistedPart` settles on. */
214
+ type ChatToolStatus = 'pending' | 'running' | 'completed' | 'error' | 'failed';
215
+ interface ChatToolState {
216
+ status: ChatToolStatus;
217
+ input?: unknown;
218
+ output?: unknown;
219
+ error?: string;
220
+ title?: string;
221
+ metadata?: Record<string, unknown>;
222
+ time?: ChatPartTime;
223
+ }
224
+ interface ChatToolPart {
225
+ type: 'tool';
226
+ id: string;
227
+ tool: string;
228
+ callID?: string;
229
+ state: ChatToolState;
230
+ }
231
+ /** Union of the sidecar's legacy (path-based) and AI-SDK (url-based) file
232
+ * shapes; response-side every field besides `type` is optional. */
233
+ interface ChatFilePart {
234
+ type: 'file';
235
+ id?: string;
236
+ filename?: string;
237
+ mediaType?: string;
238
+ url?: string;
239
+ path?: string;
240
+ content?: string;
241
+ }
242
+ interface ChatImagePart {
243
+ type: 'image';
244
+ filename?: string;
245
+ mediaType?: string;
246
+ url?: string;
247
+ path?: string;
248
+ }
249
+ interface ChatSubtaskPart {
250
+ type: 'subtask';
251
+ prompt: string;
252
+ description: string;
253
+ agent: string;
254
+ id?: string;
255
+ }
256
+ /** OpenCode step-boundary marker — no renderable text; preserved so mappers
257
+ * never coerce it into a "[object Object]" text part. */
258
+ interface ChatStepStartPart {
259
+ type: 'step-start';
260
+ }
261
+ /** Per-step usage receipt as the harness reports it (sidecar
262
+ * `StepFinishPartSchema`). The message-level token/cost columns are this
263
+ * shape flattened. */
264
+ interface ChatUsageTokens {
265
+ total?: number;
266
+ input?: number;
267
+ output?: number;
268
+ reasoning?: number;
269
+ cache?: {
270
+ write?: number;
271
+ read?: number;
272
+ };
273
+ }
274
+ interface ChatStepFinishPart {
275
+ type: 'step-finish';
276
+ reason?: string;
277
+ tokens?: ChatUsageTokens;
278
+ cost?: number;
279
+ }
280
+ /** Persisted human-in-the-loop ask — byte-matches
281
+ * `interactionToPersistedPart` in `/web-react`'s chat-interactions contract. */
282
+ interface ChatInteractionPart {
283
+ type: 'interaction';
284
+ id: string;
285
+ kind: string;
286
+ title: string;
287
+ body?: string;
288
+ answerSpec: {
289
+ fields: ChatInteractionField[];
290
+ };
291
+ status: ChatInteractionStatus;
292
+ answers?: InteractionAnswers;
293
+ cancelReason?: string;
294
+ }
295
+ type ChatPlanPart = ChatPlanPersistedPart;
296
+ /** Persisted one-line transcript notice — byte-matches `noticePart` in
297
+ * `/web-react`'s chat-interactions contract. */
298
+ interface ChatNoticePart {
299
+ type: 'notice';
300
+ id: string;
301
+ noticeKind: NoticeKind;
302
+ text: string;
303
+ }
304
+ /**
305
+ * A file the user `@`-mentioned on this turn: a workspace-relative path into
306
+ * the sandbox, never bytes. `type: 'mention'` is its own discriminant
307
+ * precisely so it does NOT collide with the `file`/`image` attachment parts —
308
+ * an attachment carries content the product uploaded, a mention points at
309
+ * something the box already has, and a transcript renders them differently
310
+ * (an inline pill, not an attachment card).
311
+ *
312
+ * `path` is the identity: mentioning one file twice in a turn folds to one
313
+ * part. `turnId` is optional and set by products that rebuild a turn's
314
+ * mentions on retry.
315
+ */
316
+ interface ChatMentionPart {
317
+ type: 'mention';
318
+ mentionKind: ChatMentionKind;
319
+ path: string;
320
+ name: string;
321
+ size?: number;
322
+ turnId?: string;
323
+ }
324
+ type ChatMessagePart = ChatTextPart | ChatReasoningPart | ChatToolPart | ChatFilePart | ChatImagePart | ChatSubtaskPart | ChatStepStartPart | ChatStepFinishPart | ChatInteractionPart | ChatNoticePart | ChatPlanPart | ChatMentionPart;
325
+ /** Every canonical harness wire-part kind must be storable — compile-time
326
+ * guarantee that a new agent-interface part kind cannot silently fall out of
327
+ * the persisted vocabulary. */
328
+ type StorableHarnessPartKind = Part['type'] & ChatMessagePart['type'];
329
+ /**
330
+ * The typed projection at the `/stream` → `/chat-store` boundary. The stream
331
+ * normalizers (`normalizePersistedPart`/`mergePersistedPart`/
332
+ * `finalizeAssistantParts`) deliberately produce untyped `JsonRecord`s — they
333
+ * normalize wire shapes and do not own the stored vocabulary. THIS module
334
+ * owns it, so this is where rows gain the `ChatMessagePart` type: each entry
335
+ * is validated against its kind's required fields and narrowed, junk is
336
+ * dropped, and — enforced by the exhaustiveness check below — no storable
337
+ * kind can silently fall out (the step-finish/interaction trap).
338
+ */
339
+ declare function toChatMessageParts(parts: Array<Record<string, unknown>>): ChatMessagePart[];
340
+ declare function isChatToolPart(part: ChatMessagePart): part is ChatToolPart;
341
+ declare function isChatTextPart(part: ChatMessagePart): part is ChatTextPart;
342
+ declare function isChatInteractionPart(part: ChatMessagePart): part is ChatInteractionPart;
343
+ declare function isChatPlanPart(part: ChatMessagePart): part is ChatPlanPart;
344
+ declare function isChatStepFinishPart(part: ChatMessagePart): part is ChatStepFinishPart;
345
+ /** Widened to `unknown` — unlike its siblings this guard also runs over raw
346
+ * untyped stored rows (a transcript renderer reads `message.parts` before the
347
+ * typed projection), which is exactly what {@link mentionPartsFromMessageParts}
348
+ * needs. `path` and `name` carry the pill; a row missing either is unrenderable.
349
+ *
350
+ * Mirrors the write contract exactly (`parseFileMention` in `/chat-routes`,
351
+ * then {@link mentionInputToPart}): a blank `name` is rejected there and so is
352
+ * rejected here, and `size` — optional, but typed `number` once present — is
353
+ * type-checked so `'12'` or `null` cannot ride through the guard wearing a
354
+ * type it does not have. Negative sizes are NOT re-rejected: the wire screens
355
+ * them, `mentionInputToPart` trusts its input, and a read guard stricter than
356
+ * what the writer can emit would drop rows it produced itself. */
357
+ declare function isChatMentionPart(part: unknown): part is ChatMentionPart;
358
+ /** Every mention part on one message, in stored order. The projection a
359
+ * transcript renderer runs before deciding which mentions the message text
360
+ * already shows inline (see `segmentMentionContent` in `/web-react`). */
361
+ declare function mentionPartsFromMessageParts(parts: ReadonlyArray<Record<string, unknown>> | ReadonlyArray<ChatMessagePart> | null | undefined): ChatMentionPart[];
362
+ /** A validated wire mention (`parseFileMentions` in `/chat-routes`) as the
363
+ * part the turn route persists. An absent/non-finite `size` is DROPPED rather
364
+ * than stored as `undefined`, so a stored row never carries a key that means
365
+ * nothing. */
366
+ declare function mentionInputToPart(input: FileMention): ChatMentionPart;
367
+
368
+ export { type ChatTurnRequestPayload as A, type ChatTurnPartInput as B, type ChatFilePart as C, type ChatTurnFilePartInput as D, ChatTurnInputError as E, type FileMention as F, type ChatTurnTextPartInput as G, type FileMentionsToPartsOptions as H, INLINE_PARTS_MAX_BYTES as I, type SandboxMentionPathCheck as J, assertPromptPartsWithinCap as K, buildMentionPromptBlock as L, MENTION_MAX_COUNT as M, chatTurnRequestInit as N, fileMentionsToParts as O, mediaTypeForMentionPath as P, mentionKindForPath as Q, parseChatTurnParts as R, type StorableHarnessPartKind as S, parseFileMentions as T, promptPartsByteSize as U, validateSandboxMentionPath as V, type ChatImagePart as a, type ChatInteractionPart as b, type ChatMentionKind as c, type ChatMentionPart as d, type ChatMessagePart as e, type ChatNoticePart as f, type ChatPartTime as g, type ChatPlanPart as h, type ChatReasoningPart as i, type ChatStepFinishPart as j, type ChatStepStartPart as k, type ChatSubtaskPart as l, type ChatTextPart as m, type ChatToolPart as n, type ChatToolState as o, type ChatToolStatus as p, type ChatUsageTokens as q, isChatInteractionPart as r, isChatMentionPart as s, isChatPlanPart as t, isChatStepFinishPart as u, isChatTextPart as v, isChatToolPart as w, mentionInputToPart as x, mentionPartsFromMessageParts as y, toChatMessageParts as z };
@@ -1,4 +1,4 @@
1
- import { AgentProfileMcpServer, ProvisionEvent, AgentProfileFileMount, SandboxInstance, AgentProfile, StorageConfig, ScopedTokenScope, TurnDriveResult, Sandbox } from '@tangle-network/sandbox';
1
+ import { AgentProfileMcpServer, ProvisionEvent, SandboxInstance, AgentProfileFileMount, AgentProfile, StorageConfig, ScopedTokenScope, TurnDriveResult, Sandbox } from '@tangle-network/sandbox';
2
2
  export { StorageConfig } from '@tangle-network/sandbox';
3
3
  import { a as ToolHeaderNames } from '../auth-DuptSkWh.js';
4
4
  import { f as AppToolName, c as AppToolContext } from '../types-BEOvc_ue.js';
@@ -14,6 +14,67 @@ type Outcome<T> = {
14
14
  error: Error;
15
15
  };
16
16
 
17
+ /**
18
+ * Reading arbitrary bytes out of a sandbox over an exec channel that only
19
+ * speaks text.
20
+ *
21
+ * `box.exec` returns stdout as a string, so a binary file has to be encoded to
22
+ * survive the trip: `wc -c` gives the on-disk length, `base64` gives the
23
+ * payload, and the decoded byte count is checked against the stat. That last
24
+ * check is the point of the module — an exec channel that caps or clips its
25
+ * output still reports `exitCode: 0` with a short buffer, which decodes into a
26
+ * perfectly valid but TRUNCATED file. Verifying the length turns that silent
27
+ * corruption into a loud failure at the boundary.
28
+ *
29
+ * Both helpers return typed outcomes; callers must inspect `succeeded` before
30
+ * touching `value`.
31
+ */
32
+ /** The `box.exec` surface these helpers use — structural, so a caller can pass
33
+ * the sandbox SDK's `SandboxInstance` directly or a narrower test double. */
34
+ interface SandboxExecChannel {
35
+ exec(command: string, options?: {
36
+ sessionId?: string;
37
+ }): Promise<{
38
+ stdout: string;
39
+ stderr: string;
40
+ exitCode: number;
41
+ }>;
42
+ }
43
+ interface SandboxExecOptions {
44
+ /** Run inside a named session rather than the box's default one. */
45
+ sessionId?: string;
46
+ }
47
+ type SandboxFileSizeOutcome = {
48
+ succeeded: true;
49
+ value: number;
50
+ } | {
51
+ succeeded: false;
52
+ error: string;
53
+ };
54
+ type SandboxFileBytesOutcome = {
55
+ succeeded: true;
56
+ value: {
57
+ bytes: Uint8Array;
58
+ size: number;
59
+ };
60
+ } | {
61
+ succeeded: false;
62
+ error: string;
63
+ };
64
+ /** Wraps a value in single quotes for `sh`, closing and reopening the quote
65
+ * around each embedded quote (`'` → `'"'"'`). Every path these helpers
66
+ * interpolate into a command goes through this — in-box filenames are
67
+ * arbitrary, so spaces, quotes and `$` are ordinary content, not syntax. */
68
+ declare function shellQuote(value: string): string;
69
+ /** Stats a sandbox file's byte length via `wc -c`. A caller enforcing a size
70
+ * cap must check this BEFORE {@link readSandboxBinaryBytes}, so an oversize
71
+ * file is rejected without paying for a base64 round trip of it. */
72
+ declare function statSandboxFileSize(box: SandboxExecChannel, absolutePath: string, options?: SandboxExecOptions): Promise<SandboxFileSizeOutcome>;
73
+ /** Reads a sandbox file as base64 and decodes it, verifying the decoded byte
74
+ * length against `expectedSize` (from a prior {@link statSandboxFileSize}). A
75
+ * mismatch is reported, never returned as a short buffer. */
76
+ declare function readSandboxBinaryBytes(box: SandboxExecChannel, absolutePath: string, expectedSize: number, options?: SandboxExecOptions): Promise<SandboxFileBytesOutcome>;
77
+
17
78
  interface TerminalProxyIdentity {
18
79
  userId: string;
19
80
  workspaceId: string;
@@ -436,6 +497,54 @@ declare function assertProvisionPayloadWithinCap(payload: ProvisionPayloadSectio
436
497
  * every exec inside it dies on the oversized entry.
437
498
  */
438
499
  declare function assertEnvWithinLimits(env: Record<string, string>): void;
500
+ /** What a peek can find. `not-running` carries the platform's own state string
501
+ * (`stopped`, `starting`, `failed`, …) — narrowing it to a union here would
502
+ * drop states the platform adds later, and every caller wants it for a log. */
503
+ type PeekWorkspaceSandboxOutcome = {
504
+ status: 'running';
505
+ box: SandboxInstance;
506
+ } | {
507
+ status: 'not-running';
508
+ state: string;
509
+ box: SandboxInstance;
510
+ } | {
511
+ status: 'absent';
512
+ };
513
+ /**
514
+ * Read-only twin of {@link ensureWorkspaceSandbox}: report whether a
515
+ * workspace's box exists and is running, WITHOUT provisioning, resuming, or
516
+ * bootstrapping anything.
517
+ *
518
+ * This is what a read-mostly path needs — a file-index route's `authorize`
519
+ * seam, a stale-lock reconciliation, a status badge. Calling `ensure` from one
520
+ * of those spins a box up as a side effect of a read (legal-agent #509), and
521
+ * costs the caller a cold start it never asked for.
522
+ *
523
+ * Matching is on BOTH the box key and the display name, IN THAT ORDER.
524
+ * `client.get(id)` keys on the platform's opaque sandbox id, not the
525
+ * deterministic key a product derives from a workspace, and is itself a
526
+ * `list().find` underneath — so a lookup by identity has to list and match.
527
+ * Provisioning here always stamps `name` with the box key, so the key is the
528
+ * authoritative match; the display-name pass exists only to adopt boxes on a
529
+ * host that predates that convention. The order matters: a single unordered
530
+ * `find` returns whichever the platform happens to list first, so a stopped
531
+ * display-name box could shadow a running box-key one and report
532
+ * `not-running` for a live workspace.
533
+ *
534
+ * Unlike `ensure`, this lists ALL statuses in one call: distinguishing "no box"
535
+ * from "box is stopped" is the whole point, and a status-filtered list cannot.
536
+ *
537
+ * A `client.list()` rejection propagates RAW, unlike the `Outcome`-wrapping
538
+ * helpers `ensure` uses internally. That is deliberate: there is no honest
539
+ * outcome to map a listing failure onto — it is not `absent` and not
540
+ * `not-running`, and inventing one would have callers act on a status the
541
+ * platform never reported. Callers that must tolerate it say so explicitly
542
+ * (the stale-turn-lock policy documents "a throw is treated as unreachable").
543
+ */
544
+ declare function peekWorkspaceSandbox(shell: SandboxRuntimeConfig, options: {
545
+ workspaceId: string;
546
+ userId?: string;
547
+ }): Promise<PeekWorkspaceSandboxOutcome>;
439
548
  declare function ensureWorkspaceSandbox(shell: SandboxRuntimeConfig, options: EnsureWorkspaceSandboxOptions): Promise<SandboxInstance>;
440
549
  interface ResolvedModel {
441
550
  model: string;
@@ -549,4 +658,4 @@ declare function classifySeveredStream(event: unknown): SandboxStepTransition |
549
658
  declare function isTerminalPromptEvent(event: unknown): boolean;
550
659
  declare function detectInteractiveQuestion(event: unknown): string | null;
551
660
 
552
- export { type AppToolDescriptor, type AuthenticatedSandboxUser, type BuildAppToolMcpServersOptions, type BuildSandboxToolFileMountsOptions, DEFAULT_SANDBOX_RESOURCES, type DriveSandboxTurnOptions, ENV_TOTAL_MAX_BYTES, ENV_VALUE_MAX_BYTES, type EnsureWorkspaceSandboxOptions, type LivenessProbeConfig, type MemberSyncSeam, type Outcome, PROVISION_PAYLOAD_MAX_BYTES, type ProfileComposeOptions, type PromptInputPart, type ProviderResolutionConfig, type ProvisionPayloadSections, type ProvisionProfileSection, type ResolveSandboxClientCredentialsOptions, type ResolvedModel, type SandboxApiCredentials, type SandboxBuildContext, type SandboxClientCredentials, type SandboxCredentialEnvironment, type SandboxPermissionLevel, type SandboxResourceConfig, type SandboxRestoreSpec, SandboxRuntimeAuthRefreshError, type SandboxRuntimeConfig, type SandboxRuntimeConnection, type SandboxScope, type SandboxStepTransition, type SandboxTerminalTokenOptions, type SandboxTerminalTokenResult, type SandboxTerminalTokenSubject, type SandboxTerminalWsMatch, type SandboxToolPathOptions, type SandboxToolSpec, type ScopedTokenResult, type SecretStore, type StoppedSandboxResumeFailure, type StoppedSandboxResumeRecovery, type StreamSandboxPromptOptions, type TerminalProxyIdentity, type WorkspaceSandboxConnectionArgs, type WorkspaceSandboxConnectionHandlerOptions, type WorkspaceSandboxEnsureContext, type WorkspaceSandboxInstanceLike, type WorkspaceSandboxManager, type WorkspaceSandboxManagerOptions, type WorkspaceSandboxRuntimeProxyArgs, type WorkspaceSandboxRuntimeProxyHandlerOptions, type WorkspaceSandboxTerminalUpgradeHandlerOptions, type WriteProfileFilesOptions, assertEnvWithinLimits, assertProvisionPayloadWithinCap, attachReasoningEffort, bearerSubprotocolToken, bearerToken, buildAppToolMcpServers, buildSandboxRuntimeProxyHeaders, buildSandboxToolFileMounts, buildSandboxToolPathSetupScript, classifySeveredStream, createSandboxTerminalToken, createWorkspaceSandboxConnectionHandler, createWorkspaceSandboxManager, createWorkspaceSandboxRuntimeProxyHandler, createWorkspaceSandboxTerminalUpgradeHandler, deferredCorpusHash, deleteSecret, detectInteractiveQuestion, driveSandboxTurn, encodeSandboxRuntimePath, ensureWorkspaceSandbox, flattenHistory, getClient, isSandboxTerminalWsUpgrade, isTerminalPromptEvent, matchSandboxTerminalWsPath, mergeExtraMcp, mergeHistoryIntoParts, mintSandboxScopedToken, mintTerminalProxyToken, readSecret, resetClientCache, resolveModel, resolveSandboxClientCredentials, runSandboxPrompt, runSandboxToolPathSetup, sandboxToolBinDir, sandboxToolPath, sandboxToolRootDir, secretStoreFromClient, splitDeferredProfileFiles, storeSecret, streamSandboxPrompt, syncSandboxMemberAdd, syncSandboxMemberRemove, syncSandboxMemberRole, terminalTokenFromRequest, verifySandboxTerminalToken, verifyTerminalProxyToken, writeProfileFilesToBox };
661
+ export { type AppToolDescriptor, type AuthenticatedSandboxUser, type BuildAppToolMcpServersOptions, type BuildSandboxToolFileMountsOptions, DEFAULT_SANDBOX_RESOURCES, type DriveSandboxTurnOptions, ENV_TOTAL_MAX_BYTES, ENV_VALUE_MAX_BYTES, type EnsureWorkspaceSandboxOptions, type LivenessProbeConfig, type MemberSyncSeam, type Outcome, PROVISION_PAYLOAD_MAX_BYTES, type PeekWorkspaceSandboxOutcome, type ProfileComposeOptions, type PromptInputPart, type ProviderResolutionConfig, type ProvisionPayloadSections, type ProvisionProfileSection, type ResolveSandboxClientCredentialsOptions, type ResolvedModel, type SandboxApiCredentials, type SandboxBuildContext, type SandboxClientCredentials, type SandboxCredentialEnvironment, type SandboxExecChannel, type SandboxExecOptions, type SandboxFileBytesOutcome, type SandboxFileSizeOutcome, type SandboxPermissionLevel, type SandboxResourceConfig, type SandboxRestoreSpec, SandboxRuntimeAuthRefreshError, type SandboxRuntimeConfig, type SandboxRuntimeConnection, type SandboxScope, type SandboxStepTransition, type SandboxTerminalTokenOptions, type SandboxTerminalTokenResult, type SandboxTerminalTokenSubject, type SandboxTerminalWsMatch, type SandboxToolPathOptions, type SandboxToolSpec, type ScopedTokenResult, type SecretStore, type StoppedSandboxResumeFailure, type StoppedSandboxResumeRecovery, type StreamSandboxPromptOptions, type TerminalProxyIdentity, type WorkspaceSandboxConnectionArgs, type WorkspaceSandboxConnectionHandlerOptions, type WorkspaceSandboxEnsureContext, type WorkspaceSandboxInstanceLike, type WorkspaceSandboxManager, type WorkspaceSandboxManagerOptions, type WorkspaceSandboxRuntimeProxyArgs, type WorkspaceSandboxRuntimeProxyHandlerOptions, type WorkspaceSandboxTerminalUpgradeHandlerOptions, type WriteProfileFilesOptions, assertEnvWithinLimits, assertProvisionPayloadWithinCap, attachReasoningEffort, bearerSubprotocolToken, bearerToken, buildAppToolMcpServers, buildSandboxRuntimeProxyHeaders, buildSandboxToolFileMounts, buildSandboxToolPathSetupScript, classifySeveredStream, createSandboxTerminalToken, createWorkspaceSandboxConnectionHandler, createWorkspaceSandboxManager, createWorkspaceSandboxRuntimeProxyHandler, createWorkspaceSandboxTerminalUpgradeHandler, deferredCorpusHash, deleteSecret, detectInteractiveQuestion, driveSandboxTurn, encodeSandboxRuntimePath, ensureWorkspaceSandbox, flattenHistory, getClient, isSandboxTerminalWsUpgrade, isTerminalPromptEvent, matchSandboxTerminalWsPath, mergeExtraMcp, mergeHistoryIntoParts, mintSandboxScopedToken, mintTerminalProxyToken, peekWorkspaceSandbox, readSandboxBinaryBytes, readSecret, resetClientCache, resolveModel, resolveSandboxClientCredentials, runSandboxPrompt, runSandboxToolPathSetup, sandboxToolBinDir, sandboxToolPath, sandboxToolRootDir, secretStoreFromClient, shellQuote, splitDeferredProfileFiles, statSandboxFileSize, storeSecret, streamSandboxPrompt, syncSandboxMemberAdd, syncSandboxMemberRemove, syncSandboxMemberRole, terminalTokenFromRequest, verifySandboxTerminalToken, verifyTerminalProxyToken, writeProfileFilesToBox };
@@ -34,6 +34,8 @@ import {
34
34
  mergeHistoryIntoParts,
35
35
  mintSandboxScopedToken,
36
36
  mintTerminalProxyToken,
37
+ peekWorkspaceSandbox,
38
+ readSandboxBinaryBytes,
37
39
  readSecret,
38
40
  resetClientCache,
39
41
  resolveModel,
@@ -44,7 +46,9 @@ import {
44
46
  sandboxToolPath,
45
47
  sandboxToolRootDir,
46
48
  secretStoreFromClient,
49
+ shellQuote,
47
50
  splitDeferredProfileFiles,
51
+ statSandboxFileSize,
48
52
  storeSecret,
49
53
  streamSandboxPrompt,
50
54
  syncSandboxMemberAdd,
@@ -54,7 +58,7 @@ import {
54
58
  verifySandboxTerminalToken,
55
59
  verifyTerminalProxyToken,
56
60
  writeProfileFilesToBox
57
- } from "../chunk-5GWXCSLQ.js";
61
+ } from "../chunk-5RJNEEO2.js";
58
62
  import "../chunk-E7QYOOON.js";
59
63
  import "../chunk-PJC4NXPA.js";
60
64
  import "../chunk-7EVZUIHW.js";
@@ -97,6 +101,8 @@ export {
97
101
  mergeHistoryIntoParts,
98
102
  mintSandboxScopedToken,
99
103
  mintTerminalProxyToken,
104
+ peekWorkspaceSandbox,
105
+ readSandboxBinaryBytes,
100
106
  readSecret,
101
107
  resetClientCache,
102
108
  resolveModel,
@@ -107,7 +113,9 @@ export {
107
113
  sandboxToolPath,
108
114
  sandboxToolRootDir,
109
115
  secretStoreFromClient,
116
+ shellQuote,
110
117
  splitDeferredProfileFiles,
118
+ statSandboxFileSize,
111
119
  storeSecret,
112
120
  streamSandboxPrompt,
113
121
  syncSandboxMemberAdd,
@@ -5,13 +5,14 @@ export { d as ComposerAnswerDelivery, I as INTERACTION_CANCEL_EVENT, e as INTERA
5
5
  import { ChatPlan } from '../plans/index.js';
6
6
  import { InteractionData } from '@tangle-network/agent-interface';
7
7
  export { InteractionData, InteractionOutcome, InteractionRequest } from '@tangle-network/agent-interface';
8
- import { j as FileMention } from '../file-index-Bw_IQE_G.js';
9
- export { b as ChatTurnFilePartInput, a as ChatTurnPartInput, C as ChatTurnRequestPayload, g as FileIndexReadyResponse, h as FileIndexResponse, i as FileIndexWarmingResponse, o as buildMentionPromptBlock, p as chatTurnRequestInit, r as fileMentionsToParts, s as mediaTypeForMentionPath } from '../file-index-Bw_IQE_G.js';
8
+ import { F as FileMention, d as ChatMentionPart } from '../parts-1_3y2JmR.js';
9
+ export { c as ChatMentionKind, D as ChatTurnFilePartInput, B as ChatTurnPartInput, A as ChatTurnRequestPayload, L as buildMentionPromptBlock, N as chatTurnRequestInit, O as fileMentionsToParts, P as mediaTypeForMentionPath, x as mentionInputToPart, Q as mentionKindForPath, y as mentionPartsFromMessageParts } from '../parts-1_3y2JmR.js';
10
10
  import { S as StepAgentActivity } from '../agent-activity-C8ZG0F0M.js';
11
11
  import { a as FlowTrace } from '../flow-types-Cb_AblZs.js';
12
12
  export { S as SandboxTerminalConnection, a as SandboxTerminalConnectionResponse, U as UseSandboxTerminalConnectionOptions, b as UseSandboxTerminalConnectionResult, t as tabTerminalConnectionId, u as useSandboxTerminalConnection } from '../sandbox-terminal-BIIC__CP.js';
13
13
  import { CatalogModel } from '../catalog/index.js';
14
14
  import { Harness } from '../harness/index.js';
15
+ export { b as FileIndexReadyResponse, c as FileIndexResponse, d as FileIndexWarmingResponse } from '../file-index-Bn6sitKb.js';
15
16
 
16
17
  type DurablePlanDecision = 'approved' | 'rejected';
17
18
  /** Stable authority receipt for the follow-up turn dispatched by a plan
@@ -608,6 +609,53 @@ interface UseFileMentionsResult {
608
609
  }
609
610
  declare function useFileMentions(options: UseFileMentionsOptions): UseFileMentionsResult;
610
611
 
612
+ /**
613
+ * Transcript-side counterpart to the composer's `@`-mention primitive
614
+ * (sandbox-ui#184). The composer serializes a picked file into the message
615
+ * text as `@<path>`; this module is the exact inverse — it finds those tokens
616
+ * again in a PERSISTED message and splits the text so a renderer can draw a
617
+ * pill where the user typed one and leave the rest as prose.
618
+ *
619
+ * Pure and product-agnostic: no React, no fetch, no DOM. The only input beyond
620
+ * the text is the message's OWN mention parts, so one message can never render
621
+ * a pill for a path another message mentioned.
622
+ *
623
+ * `ChatMentionPart` and the runtime helpers `mentionInputToPart` /
624
+ * `mentionPartsFromMessageParts` are re-exported here from `../chat-store/parts`
625
+ * directly (not the `/chat-store` barrel), so a browser bundle gets the mention
626
+ * vocabulary and its converters without importing `/chat-store`, whose barrel
627
+ * pulls the drizzle peer.
628
+ */
629
+
630
+ /** One run of a segmented message: literal prose, or a matched mention with
631
+ * the part that produced it. `text` for a mention segment is the token as it
632
+ * appears in the message (`@<path>`), so a renderer that ignores `part` still
633
+ * reproduces the original string exactly. */
634
+ interface MentionTextSegment {
635
+ type: 'text' | 'mention';
636
+ text: string;
637
+ part?: ChatMentionPart;
638
+ }
639
+ /**
640
+ * Split a message's text into plain-text and mention segments by matching
641
+ * `@<path>` runs against that message's own mention parts.
642
+ *
643
+ * Only a part whose exact `@<path>` token appears in `content`, at a token
644
+ * boundary on both sides, counts as a match; everything else — including
645
+ * unrelated `@` text — passes through as plain text untouched. When two parts'
646
+ * tokens both match at the same position (one path a prefix of another), the
647
+ * LONGEST token wins, so nested-looking paths split at the right boundary.
648
+ *
649
+ * Returns the matched parts alongside the segments: a caller that also renders
650
+ * a fallback chip row can drop the chip for anything now shown inline and keep
651
+ * it only for mentions the text does not actually contain (a restored draft, a
652
+ * queued message whose text was edited).
653
+ */
654
+ declare function segmentMentionContent(content: string, parts: ReadonlyArray<ChatMentionPart>): {
655
+ segments: MentionTextSegment[];
656
+ matched: Set<ChatMentionPart>;
657
+ };
658
+
611
659
  /**
612
660
  * Provider brand marks — real logo path data (simple-icons / SVG Logos, both
613
661
  * CC0) inlined so the picker shows actual provider identity instead of
@@ -1043,4 +1091,4 @@ declare function useThinkingSeconds(active: boolean): number;
1043
1091
  */
1044
1092
  declare function ChatMessages({ messages, models, renderMarkdown, renderExtras, durableCards, userLabel, agentLabel, loading, approval, onToolCallClick, toolRenderers, error, onRetry, renderEmpty, emptyState, header, }: ChatMessagesProps): react.JSX.Element;
1045
1093
 
1046
- export { type ActivityTone, type AgentActivityPage, AgentActivityPanel, type AgentActivityPanelProps, type AgentActivityRecord, AgentSessionControls, type AgentSessionControlsProps, CatalogModel, ChatComposer, type ChatComposerProps, type ChatEmptyDoor, ChatEmptyState, type ChatEmptyStateProps, ChatInteraction, ChatInteractionField, type ChatInteractionRestoreMode, ChatInteractionStatus, type ChatMessageMetrics, type ChatMessageSegment, ChatMessages, type ChatMessagesProps, ChatSelectField, type ChatStreamCallbacks, type ChatStreamToolCall, type ChatStreamToolResult, type ChatToolCallInfo, type ChatUiMessage, type ComposerFile, type ComposerFilePart, type ComposerMentionProp, type ConsumeChatStreamResult, DEFAULT_EFFORT_LEVELS, DEFAULT_MENTION_EMPTY_TEXT, DEFAULT_MENTION_LIMIT, type DurableChatCard, DurableChatCards, type DurableChatCardsProps, type DurableInteractionAnswerSubmitterOptions, DurablePlanCard, type DurablePlanCardProps, DurablePlanClientError, type DurablePlanCurrentInput, type DurablePlanDecision, type DurablePlanDecisionClient, type DurablePlanDecisionClientOptions, type DurablePlanDecisionInput, type DurablePlanDecisionResult, type DurablePlanFollowUpReceipt, type EffortLevel, EffortPicker, type EffortPickerProps, type FieldValues, FileMention, FlowWaterfall, type FlowWaterfallProps, INDEX_REFRESH_AFTER_MS, INTERACTION_SUBMIT_TIMEOUT_MESSAGE, INTERACTION_SUBMIT_TIMEOUT_MS, InteractionActionButton, type InteractionAnswerSubmission, type InteractionAnswerSubmitterOptions, InteractionAnswers, type InteractionAttemptStore, InteractionBadge, type InteractionBadgeVariant, InteractionCancelData, InteractionPlanCard, type InteractionPlanCardProps, InteractionQuestionCard, type InteractionQuestionCardProps, InteractionRequestWire, type InteractionSubmitResult, type MentionItem, MissionActivityLane, type MissionActivityLaneProps, ModelPicker, type ModelPickerProps, type ProposalApprovalHandlers, ProviderLogo, type ProviderLogoProps, QuestionOptionList, type QuestionOptionListProps, type RestoreChatInteractionsOptions, RunDrillIn, type RunDrillInProps, SeatPaywall, type SeatPaywallProps, type SmoothRevealOptions, type StreamChatOptions, type SubmitInteractionAnswer, type ToolDetailRenderers, type ToolRunRecord, type ToolRunStep, type UseChatInteractionsOptions, type UseChatInteractionsResult, type UseDurablePlanFlowOptions, type UseDurablePlanFlowResult, type UseFileMentionsOptions, type UseFileMentionsResult, type WaterfallRow, activityTone, buildAnswerData, cancelChatInteraction, consumeChatStream, createDurableInteractionAnswerSubmitter, createDurablePlanDecisionClient, createInteractionAnswerSubmitter, createMemoryInteractionAttemptStore, createSessionInteractionAttemptStore, dispatchChatStreamLine, durableChatCardsFromParts, fieldAnswer, fieldValuesFromAnswers, formatActivityCost, formatActivityDuration, formatModelCost, formatTokensPerSecond, hasSecretField, hydrateChatInteractions, interactionStatusLabels, interactionSubmissionSignature, interactionTerminalNotes, isLateAnswerableStatus, lateAnswerMessage, mergeActivityPages, nextRevealCount, pendingApprovalOf, rankFileMentions, resolveChatInteraction, responseErrorMessage, restoreChatInteractions, streamChatTurn, terminalizePendingChatInteractions, upsertChatInteraction, useChatInteractions, useDurablePlanFlow, useFileMentions, usePending, usePopover, useSmoothText, useThinkingSeconds, waterfallLayout };
1094
+ export { type ActivityTone, type AgentActivityPage, AgentActivityPanel, type AgentActivityPanelProps, type AgentActivityRecord, AgentSessionControls, type AgentSessionControlsProps, CatalogModel, ChatComposer, type ChatComposerProps, type ChatEmptyDoor, ChatEmptyState, type ChatEmptyStateProps, ChatInteraction, ChatInteractionField, type ChatInteractionRestoreMode, ChatInteractionStatus, ChatMentionPart, type ChatMessageMetrics, type ChatMessageSegment, ChatMessages, type ChatMessagesProps, ChatSelectField, type ChatStreamCallbacks, type ChatStreamToolCall, type ChatStreamToolResult, type ChatToolCallInfo, type ChatUiMessage, type ComposerFile, type ComposerFilePart, type ComposerMentionProp, type ConsumeChatStreamResult, DEFAULT_EFFORT_LEVELS, DEFAULT_MENTION_EMPTY_TEXT, DEFAULT_MENTION_LIMIT, type DurableChatCard, DurableChatCards, type DurableChatCardsProps, type DurableInteractionAnswerSubmitterOptions, DurablePlanCard, type DurablePlanCardProps, DurablePlanClientError, type DurablePlanCurrentInput, type DurablePlanDecision, type DurablePlanDecisionClient, type DurablePlanDecisionClientOptions, type DurablePlanDecisionInput, type DurablePlanDecisionResult, type DurablePlanFollowUpReceipt, type EffortLevel, EffortPicker, type EffortPickerProps, type FieldValues, FileMention, FlowWaterfall, type FlowWaterfallProps, INDEX_REFRESH_AFTER_MS, INTERACTION_SUBMIT_TIMEOUT_MESSAGE, INTERACTION_SUBMIT_TIMEOUT_MS, InteractionActionButton, type InteractionAnswerSubmission, type InteractionAnswerSubmitterOptions, InteractionAnswers, type InteractionAttemptStore, InteractionBadge, type InteractionBadgeVariant, InteractionCancelData, InteractionPlanCard, type InteractionPlanCardProps, InteractionQuestionCard, type InteractionQuestionCardProps, InteractionRequestWire, type InteractionSubmitResult, type MentionItem, type MentionTextSegment, MissionActivityLane, type MissionActivityLaneProps, ModelPicker, type ModelPickerProps, type ProposalApprovalHandlers, ProviderLogo, type ProviderLogoProps, QuestionOptionList, type QuestionOptionListProps, type RestoreChatInteractionsOptions, RunDrillIn, type RunDrillInProps, SeatPaywall, type SeatPaywallProps, type SmoothRevealOptions, type StreamChatOptions, type SubmitInteractionAnswer, type ToolDetailRenderers, type ToolRunRecord, type ToolRunStep, type UseChatInteractionsOptions, type UseChatInteractionsResult, type UseDurablePlanFlowOptions, type UseDurablePlanFlowResult, type UseFileMentionsOptions, type UseFileMentionsResult, type WaterfallRow, activityTone, buildAnswerData, cancelChatInteraction, consumeChatStream, createDurableInteractionAnswerSubmitter, createDurablePlanDecisionClient, createInteractionAnswerSubmitter, createMemoryInteractionAttemptStore, createSessionInteractionAttemptStore, dispatchChatStreamLine, durableChatCardsFromParts, fieldAnswer, fieldValuesFromAnswers, formatActivityCost, formatActivityDuration, formatModelCost, formatTokensPerSecond, hasSecretField, hydrateChatInteractions, interactionStatusLabels, interactionSubmissionSignature, interactionTerminalNotes, isLateAnswerableStatus, lateAnswerMessage, mergeActivityPages, nextRevealCount, pendingApprovalOf, rankFileMentions, resolveChatInteraction, responseErrorMessage, restoreChatInteractions, segmentMentionContent, streamChatTurn, terminalizePendingChatInteractions, upsertChatInteraction, useChatInteractions, useDurablePlanFlow, useFileMentions, usePending, usePopover, useSmoothText, useThinkingSeconds, waterfallLayout };