@truefoundry/assistant-ui-runtime 0.1.0-rc.1 → 0.1.2

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 (33) hide show
  1. package/README.md +45 -77
  2. package/dist/index.d.ts +14 -2
  3. package/dist/index.js +697 -147
  4. package/dist/index.js.map +1 -1
  5. package/package.json +2 -2
  6. package/src/agentSessionModule.d.ts +14 -2
  7. package/src/convertTurnMessages.test.ts +502 -1
  8. package/src/convertTurnMessages.ts +471 -28
  9. package/src/createSubAgent.ts +13 -5
  10. package/src/draftAgentConfig.test.ts +1 -1
  11. package/src/foldPeerThreads.test.ts +56 -0
  12. package/src/foldPeerThreads.ts +7 -1
  13. package/src/hooks.ts +24 -0
  14. package/src/index.ts +7 -5
  15. package/src/loadSessionSnapshot.test.ts +21 -6
  16. package/src/loadSessionSnapshot.ts +9 -5
  17. package/src/{bindDraftAgentSession.test.ts → private/bindDraftAgentSession.test.ts} +3 -2
  18. package/src/{draftSessionBridge.ts → private/draftSessionBridge.ts} +8 -2
  19. package/src/{truefoundryDraftThreadListAdapter.ts → private/truefoundryDraftThreadListAdapter.ts} +1 -1
  20. package/src/private/useDraftAgentSpec.test.tsx +153 -0
  21. package/src/{useDraftAgentSpec.ts → private/useDraftAgentSpec.ts} +80 -3
  22. package/src/sessionSnapshot.ts +48 -2
  23. package/src/sessions.ts +1 -1
  24. package/src/streamTurn.test.ts +34 -0
  25. package/src/streamTurn.ts +9 -1
  26. package/src/truefoundryExtras.ts +5 -1
  27. package/src/types.ts +1 -1
  28. package/src/useTrueFoundryAgentMessages.test.tsx +275 -1
  29. package/src/useTrueFoundryAgentMessages.ts +263 -70
  30. package/src/useTrueFoundryAgentRuntime.ts +51 -13
  31. /package/src/{agentSpec.ts → private/agentSpec.ts} +0 -0
  32. /package/src/{bindDraftAgentSession.ts → private/bindDraftAgentSession.ts} +0 -0
  33. /package/src/{truefoundryDraftThreadListAdapter.test.ts → private/truefoundryDraftThreadListAdapter.test.ts} +0 -0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @truefoundry/assistant-ui-runtime
1
+ # truefoundry-agents-assistant-ui-runtime
2
2
 
3
3
  TrueFoundry Gateway agent runtime adapter for [assistant-ui](https://www.assistant-ui.com/).
4
4
 
@@ -14,7 +14,7 @@ Connect assistant-ui components (`Thread`, `Composer`, tool UIs, `ThreadList`) t
14
14
  ## Installation
15
15
 
16
16
  ```bash
17
- npm install @assistant-ui/react @truefoundry/assistant-ui-runtime truefoundry-gateway-sdk@^0.2.0
17
+ npm install @assistant-ui/react truefoundry-agents-assistant-ui-runtime truefoundry-gateway-sdk@^0.1.0-rc.1
18
18
  ```
19
19
 
20
20
  ## Quickstart
@@ -40,7 +40,7 @@ For production, point `fetch` or `auth` at your own backend proxy so secrets nev
40
40
  "use client";
41
41
 
42
42
  import { AssistantRuntimeProvider } from "@assistant-ui/react";
43
- import { useTrueFoundryAgentRuntime } from "@truefoundry/assistant-ui-runtime";
43
+ import { useTrueFoundryAgentRuntime } from "truefoundry-agents-assistant-ui-runtime";
44
44
  import { Thread } from "@/components/assistant-ui/thread";
45
45
 
46
46
  const AGENT_NAME = process.env.TFY_AGENT_NAME!;
@@ -85,79 +85,30 @@ See the assistant-ui [Thread UI guide](https://www.assistant-ui.com/docs/ui/thre
85
85
  | Option | Type | Required | Description |
86
86
  |--------|------|----------|-------------|
87
87
  | `client` | `AgentSessionClient` | Yes | Pre-built gateway client. The runtime never reads credentials itself. |
88
- | `agent` | `{ mode: "named", agentName }` \| `{ mode: "draft", defaultAgentSpec }` | Yes* | Discriminated agent source. *Or legacy `agentName` for named mode. |
89
- | `agentName` | `string` | Named only | Legacy shorthand for `agent: { mode: "named", agentName }`. |
90
- | `gateway` | `TrueFoundryGateway` | Draft only | Low-level gateway client for `agents.private.draftSessions` CRUD. |
88
+ | `agentName` | `string` | Yes | Saved agent to run (gateway agent name). |
91
89
  | `initialSessionId` | `string` | No | Pin an existing session once on mount (uncontrolled). |
92
90
  | `threadId` | `string` | No | Controlled active session id; reactive and URL-syncable. |
93
91
  | `onThreadIdChange` | `(threadId: string \| undefined) => void` | No | Fires when the active session changes. |
94
92
  | `onError` | `(error: unknown) => void` | No | Invoked on stream/load/turn errors. |
95
93
  | `adapters` | `{ attachments?, speech?, dictation?, voice?, feedback? }` | No | Optional assistant-ui adapters forwarded to the runtime. See [Unsupported assistant-ui features](#unsupported-assistant-ui-features). |
96
94
 
97
- ### Named agent mode (saved agent)
95
+ ### Specifying the agent
98
96
 
99
- ```tsx
100
- const runtime = useTrueFoundryAgentRuntime({
101
- client,
102
- agent: { mode: "named", agentName: "support-bot" },
103
- });
104
- ```
105
-
106
- Legacy `agentName` shorthand is still supported.
107
-
108
- ### Draft agent mode (inline `AgentSpec`)
109
-
110
- Draft mode lists **draft sessions** (`agents.private.draftSessions.*`) in the thread list. Each thread's `remoteId` is a `DraftSession.id`. The runtime syncs `AgentSpec` edits via `agents.private.draftSessions.update`. Turns and history use `/agents/sessions/{draftSessionId}/turns` after validating the draft via `agents.private.draftSessions.get` — no separate conversation session is created.
97
+ Pass the saved agent name as `agentName`:
111
98
 
112
99
  ```tsx
113
- import { TrueFoundryGateway } from "truefoundry-gateway-sdk";
114
- import { useTrueFoundryAgentRuntime } from "@truefoundry/assistant-ui-runtime";
115
-
116
- const client = new AgentSessionClient({ apiKey, baseUrl });
117
- const gateway = new TrueFoundryGateway({ apiKey, baseUrl });
118
-
119
100
  const runtime = useTrueFoundryAgentRuntime({
120
101
  client,
121
- gateway,
122
- agent: {
123
- mode: "draft",
124
- defaultAgentSpec: {
125
- model: { name: "anthropic/claude-sonnet-4-6" },
126
- instructions: "You are a helpful assistant.",
127
- mcpServers: [],
128
- skills: [],
129
- },
130
- },
102
+ agentName: "support-bot",
131
103
  });
132
104
  ```
133
105
 
134
- Read and update the active draft spec from UI:
135
-
136
- ```tsx
137
- import { useTrueFoundryAgentSpec } from "@truefoundry/assistant-ui-runtime";
138
-
139
- function DraftModelPicker() {
140
- const { agentSpec, updateAgentSpec, isSpecSyncing } = useTrueFoundryAgentSpec();
141
- if (agentSpec == null) return null;
142
-
143
- return (
144
- <select
145
- value={agentSpec.model.name}
146
- disabled={isSpecSyncing}
147
- onChange={(e) => updateAgentSpec({ model: { name: e.target.value } })}
148
- />
149
- );
150
- }
151
- ```
152
-
153
- `AgentSpec` maps the runtime fields from the [Agent manifest reference](https://www.truefoundry.com/docs/agent-platform/agent-harness/sdk/agent-manifest-reference) (`model`, `instructions`, `mcpServers`, `skills`, `config`, etc.). Registry metadata (`name`, `description`, `collaborators`) is not part of `AgentSpec`.
154
-
155
106
  ### Adding adapters
156
107
 
157
108
  Pass optional assistant-ui adapters through `adapters`. Attachments are **opt-in**: wire the built-in adapter when you want composer file pick / previews and gateway forwarding on send.
158
109
 
159
110
  ```tsx
160
- import { trueFoundryAttachmentAdapter, useTrueFoundryAgentRuntime } from "@truefoundry/assistant-ui-runtime";
111
+ import { trueFoundryAttachmentAdapter, useTrueFoundryAgentRuntime } from "truefoundry-agents-assistant-ui-runtime";
161
112
 
162
113
  const runtime = useTrueFoundryAgentRuntime({
163
114
  client,
@@ -215,7 +166,7 @@ Render nested threads with `MessagePartPrimitive.Messages` inside your tool fall
215
166
  ```tsx
216
167
  import { MessagePartPrimitive, MessagePrimitive } from "@assistant-ui/react";
217
168
  import { useAuiState } from "@assistant-ui/store";
218
- import type { TrueFoundryMessageCustomMetadata } from "@truefoundry/assistant-ui-runtime";
169
+ import type { TrueFoundryMessageCustomMetadata } from "truefoundry-agents-assistant-ui-runtime";
219
170
 
220
171
  function NestedSubAgentAssistantMessage() {
221
172
  const custom = useAuiState(
@@ -275,8 +226,6 @@ Do not send partial resumes; the backend rejects incomplete input sets.
275
226
 
276
227
  When MCP OAuth is required, the paused assistant message has `metadata.custom.pendingMcpAuth === true` and structured `metadata.custom.mcpServers` (`{ id, name, authUrl }[]`) — both fields are on `TrueFoundryMessageCustomMetadata`. After the user completes OAuth in the browser, call `resumeMcpAuth()` from extras (or `startRun` with `runConfig.custom.resumeMcpAuth: true`).
277
228
 
278
- This package only exposes the raw pending state and a resume action — the per-server authorize links and the "Continue" button live in `packages/agent-ui-sdk`'s `McpAuthContainer`/`McpAuthPrompt` (see that package's README). Resuming is always a manual user action; there is no background polling or auto-resume.
279
-
280
229
  ## Runtime extras
281
230
 
282
231
  Typed escape hatch for adapter-specific state and actions — same pattern as `@assistant-ui/react-google-adk`. Read pending state with selector hooks; call actions via `trueFoundryExtras.get(aui)` when rendering inside nested sub-agent threads (readonly context).
@@ -288,7 +237,7 @@ import {
288
237
  useTrueFoundryApprovals,
289
238
  useTrueFoundryToolResponses,
290
239
  useTrueFoundryMcpAuth,
291
- } from "@truefoundry/assistant-ui-runtime";
240
+ } from "truefoundry-agents-assistant-ui-runtime";
292
241
 
293
242
  function ApprovalBar() {
294
243
  const { pending, respond } = useTrueFoundryApprovals();
@@ -345,7 +294,7 @@ function McpAuthContinue() {
345
294
  ### Action hooks (any render context, including nested sub-agents)
346
295
 
347
296
  ```tsx
348
- import { useTrueFoundryRespondToToolApproval } from "@truefoundry/assistant-ui-runtime";
297
+ import { useTrueFoundryRespondToToolApproval } from "truefoundry-agents-assistant-ui-runtime";
349
298
 
350
299
  function NestedToolApprovalButton({ approvalId }: { approvalId: string }) {
351
300
  const respond = useTrueFoundryRespondToToolApproval();
@@ -365,7 +314,7 @@ import {
365
314
  useTrueFoundryRespondToToolResponse,
366
315
  useTrueFoundryResumeMcpAuth,
367
316
  useTrueFoundryCancel,
368
- } from "@truefoundry/assistant-ui-runtime";
317
+ } from "truefoundry-agents-assistant-ui-runtime";
369
318
 
370
319
  const respondToApproval = useTrueFoundryRespondToToolApproval();
371
320
  const respondToResponse = useTrueFoundryRespondToToolResponse();
@@ -389,8 +338,7 @@ void cancel();
389
338
  | `useTrueFoundryRespondToToolResponse()` | `(r: RespondToToolResponseOptions) => void` | Respond to an ask-user / `tool.response_required` prompt from any render context. |
390
339
  | `useTrueFoundryResumeMcpAuth()` | `() => Promise<void>` | Resume the paused turn after the user completes MCP OAuth in the browser. |
391
340
  | `useTrueFoundryCancel()` | `() => Promise<void>` | Cancel the active turn. Calls `session.cancel()` and drains the stream to its terminal `turn.done`. |
392
- | `useTrueFoundryAgentSpec()` | `{ agentSpec, draftSessionId, isSpecSyncing, specError, updateAgentSpec }` | Draft mode only current inline spec and debounced sync state. |
393
- | `useTrueFoundryUpdateAgentSpec()` | `(update: AgentSpecUpdate) => void` | Draft mode only — update spec from any render context. |
341
+ | `useTrueFoundryHistoryPagination()` | `{ hasOlderHistory, isLoadingOlderHistory, loadOlderHistory }` | Scroll-up older history: call `loadOlderHistory()` when the user nears the top of the thread. |
394
342
 
395
343
  Where:
396
344
 
@@ -404,7 +352,7 @@ Where:
404
352
  ### Low-level namespace
405
353
 
406
354
  ```tsx
407
- import { trueFoundryExtras, type TrueFoundryRuntimeExtras } from "@truefoundry/assistant-ui-runtime";
355
+ import { trueFoundryExtras, type TrueFoundryRuntimeExtras } from "truefoundry-agents-assistant-ui-runtime";
408
356
 
409
357
  // Throws outside useTrueFoundryAgentRuntime:
410
358
  const extras = trueFoundryExtras.use();
@@ -424,7 +372,13 @@ const pending = trueFoundryExtras.use((e) => e.pendingApprovals, []);
424
372
  | `respondToToolResponse` | `(r: { toolCallId, content }) => void` | Stage answer; batch-send when complete |
425
373
  | `resumeMcpAuth` | `() => Promise<void>` | Resume after OAuth |
426
374
  | `cancel` | `() => Promise<void>` | Cancel the active turn: calls `session.cancel()` and lets the stream drain to its terminal `turn.done` (reconciles on next session load) |
427
- | `draft` | `TrueFoundryDraftRuntimeExtras \| null` | Draft mode only inline `AgentSpec`, sync state, and `updateAgentSpec` |
375
+ | `resetFromTurn` | `(turnId: string) => Promise<void>` | Re-submit a user turn (branch/reset) |
376
+ | `reload` | `() => void` | Retry the current session load |
377
+ | `downloadSandboxFile` | `(path: string) => Promise<Blob>` | Download a file from the session sandbox |
378
+ | `hasOlderHistory` | `boolean` | True when another older `listEvents` page is available |
379
+ | `isLoadingOlderHistory` | `boolean` | True while `loadOlderHistory` is in flight |
380
+ | `loadOlderHistory` | `() => Promise<void>` | Prepend the next older history window (scroll-up) |
381
+ | `draft` | `TrueFoundryDraftRuntimeExtras \| null` | Draft-mode agent spec sync extras |
428
382
 
429
383
  Per-part `respondToApproval` from assistant-ui still works for root-thread tool UIs; extras complements that for global chrome and nested renderers.
430
384
 
@@ -442,9 +396,31 @@ Works out of the box — no server route or Redis store. TrueFoundry persists ev
442
396
 
443
397
  Contrast with the [AI SDK resumable streams guide](https://www.assistant-ui.com/docs/guides/resumable-streams), which requires a separate encoded-byte store.
444
398
 
399
+ ## History pagination
400
+
401
+ Thread open no longer drains every turn. Initial load:
402
+
403
+ 1. `listTurns({ limit: 1 })` once — detect a running turn (does **not** walk `page_token`).
404
+ 2. One (or a few) `listEvents` page(s) for the newest complete user-message group.
405
+ 3. Clears `isLoading`, then resumes a running turn via subscribe if needed.
406
+
407
+ Older history is opt-in via extras / `useTrueFoundryHistoryPagination()`:
408
+
409
+ ```tsx
410
+ const { hasOlderHistory, isLoadingOlderHistory, loadOlderHistory } =
411
+ useTrueFoundryHistoryPagination();
412
+
413
+ // e.g. IntersectionObserver at the top of the message list
414
+ if (hasOlderHistory && !isLoadingOlderHistory) {
415
+ void loadOlderHistory();
416
+ }
417
+ ```
418
+
419
+ `loadOlderHistory` prepends older turns without aborting an active stream.
420
+
445
421
  ## Public API
446
422
 
447
- Everything below is exported from the package root (`@truefoundry/assistant-ui-runtime`).
423
+ Everything below is exported from the package root (`truefoundry-agents-assistant-ui-runtime`).
448
424
 
449
425
  | Export | Kind | Purpose |
450
426
  |--------|------|---------|
@@ -457,14 +433,11 @@ Everything below is exported from the package root (`@truefoundry/assistant-ui-r
457
433
  | `useTrueFoundryRespondToToolResponse` | hook | Same pattern for tool responses. |
458
434
  | `useTrueFoundryResumeMcpAuth` | hook | Same pattern for MCP resume. |
459
435
  | `useTrueFoundryCancel` | hook | Same pattern for cancel. |
436
+ | `useTrueFoundryHistoryPagination` | hook | `{ hasOlderHistory, isLoadingOlderHistory, loadOlderHistory }` for scroll-up history. |
460
437
  | `trueFoundryExtras` | namespace | `createRuntimeExtras` channel — `.use()`, `.get(aui)`, `.provide()`. |
461
438
  | `TrueFoundryRuntimeExtras` | type | Shape provided into the runtime extras slot. |
462
439
  | `PendingApproval`, `PendingToolResponse` | types | Derived pending items for UI rendering. |
463
440
  | `createTrueFoundryThreadListAdapter` | fn | Builds the cursor-paginated `RemoteThreadListAdapter` powering `<ThreadList>` (`list({ after })` → `nextCursor`). Used internally; exported for custom wiring. |
464
- | `createTrueFoundryDraftThreadListAdapter` | fn | Draft-session variant of the thread-list adapter (`agents.private.draftSessions.list/create/get`). |
465
- | `createDraftSessionBridge` | fn | Reads and syncs a draft session's `AgentSpec` (`agents.private.draftSessions.get/update`). |
466
- | `mergeAgentSpec` | fn | Immutable merge helper for partial `AgentSpec` updates. |
467
- | `AgentSpec`, `AgentSpecUpdate`, `DraftSession` | types | Gateway inline agent definition types (re-exported). |
468
441
  | `getSession` | fn | `(client, sessionId) => Promise<AgentSession>` convenience wrapper. |
469
442
  | `convertTurnsToThreadMessages` | fn | Loads a session's turns and folds them into assistant-ui `ThreadMessage[]` (`ConvertTurnsResult`). |
470
443
  | `buildTurnAssistantContent` | fn | Folds a single turn's events into assistant content parts. |
@@ -497,11 +470,6 @@ For contributors and agents working inside this package. Source lives in `src/`;
497
470
  | `collectPending.ts` | Derives `pendingApprovals`, `pendingToolResponses`, `pendingMcpAuth` from messages. |
498
471
  | `requiredActionInputs.ts` | Combined gate + `collectRequiredActionInputs` for batched resume. |
499
472
  | `truefoundryThreadListAdapter.ts` | `RemoteThreadListAdapter` — cursor-paginated session list (`list({ after })` → `nextCursor`), create/fetch sessions. |
500
- | `truefoundryDraftThreadListAdapter.ts` | Draft-session `RemoteThreadListAdapter` backed by `agents.private.draftSessions.*`. |
501
- | `draftSessionBridge.ts` | Reads and syncs a draft session's `AgentSpec` via `agents.private.draftSessions.get/update`. |
502
- | `bindDraftAgentSession.ts` | Validates a draft session via `agents.private.draftSessions.get`, then binds turns to it at `/agents/sessions/{draftSessionId}/turns`. |
503
- | `useDraftAgentSpec.ts` | Debounced draft spec state + `agents.private.draftSessions.update` wiring. |
504
- | `agentSpec.ts` | `AgentSpec` helpers and `mergeAgentSpec`. |
505
473
  | `convertTurnMessages.ts` | `projectSessionMessages` pure projector; `buildSnapshotFromSession` history ingest; `convertTurnsToThreadMessages` wrapper; stream-event aggregation. |
506
474
  | `foldPeerThreads.ts` | `PeerThreadFoldState` — folds peer/sub-agent threads under their spawning tool call. |
507
475
  | `messageCustomMetadata.ts` | `TrueFoundryMessageCustomMetadata` — typed `metadata.custom` keys for this adapter. |
package/dist/index.d.ts CHANGED
@@ -184,7 +184,7 @@ declare function createTrueFoundryDraftThreadListAdapter(options: {
184
184
  }): RemoteThreadListAdapter;
185
185
 
186
186
  type DraftSessionBridge = {
187
- syncAgentSpec: (draftSessionId: string, agentSpec: AgentSpec) => Promise<void>;
187
+ syncAgentSpec: (draftSessionId: string, agentSpec: AgentSpec) => Promise<string>;
188
188
  getDraftAgentSpec: (draftSessionId: string) => Promise<AgentSpec>;
189
189
  };
190
190
  declare function createDraftSessionBridge(gateway: TrueFoundryGateway): DraftSessionBridge;
@@ -226,6 +226,10 @@ type TrueFoundryRuntimeExtras = {
226
226
  downloadSandboxFile: (path: string) => Promise<Blob>;
227
227
  cancel: () => Promise<void>;
228
228
  resetFromTurn: (turnId: string) => Promise<void>;
229
+ reload: () => void;
230
+ hasOlderHistory: boolean;
231
+ isLoadingOlderHistory: boolean;
232
+ loadOlderHistory: () => Promise<void>;
229
233
  draft: TrueFoundryDraftRuntimeExtras | null;
230
234
  };
231
235
  declare const trueFoundryExtras: _assistant_ui_core_internal.RuntimeExtras<TrueFoundryRuntimeExtras>;
@@ -259,6 +263,14 @@ declare const useTrueFoundrySandboxId: () => string | undefined;
259
263
  declare const useTrueFoundryDownloadSandboxFile: () => (path: string) => Promise<Blob>;
260
264
  /** Returns a function to cancel the current run from any render context. */
261
265
  declare const useTrueFoundryCancel: () => () => Promise<void>;
266
+ /** Returns a function to reload (retry) the current session from any render context. */
267
+ declare const useTrueFoundryReload: () => () => void;
268
+ /** Older history pagination state plus a load-more action for scroll-up. */
269
+ declare const useTrueFoundryHistoryPagination: () => {
270
+ hasOlderHistory: boolean;
271
+ isLoadingOlderHistory: boolean;
272
+ loadOlderHistory: () => Promise<void>;
273
+ };
262
274
  /** Returns a function to reset (re-submit) a user turn from any render context. */
263
275
  declare const useTrueFoundryResetFromTurn: () => (turnId: string) => Promise<void>;
264
276
  /** Current draft agent spec and sync state (draft mode only). */
@@ -297,4 +309,4 @@ declare function getSession(client: AgentSessionClient, sessionId: string, optio
297
309
  */
298
310
  declare const trueFoundryAttachmentAdapter: AttachmentAdapter;
299
311
 
300
- export { type AgentSpec, type AgentSpecUpdate, type ConvertTurnsResult, type DraftAgentConfig, type DraftSession, type DraftSessionBridge, type McpAuthMessageCustomMetadata, type NamedAgentConfig, type PendingApproval, type PendingToolResponse, ROOT_THREAD_ID, type SandboxMessageCustomMetadata, type SubAgentArtifact, type SubAgentCustomMetadata, type SubAgentMessageCustomMetadata, TOOL_RESPONSE_THREAD_ID_CUSTOM_KEY, type ToolApprovalMessageCustomMetadata, type ToolResponseMessageCustomMetadata, type TrueFoundryAgentConfig, type TrueFoundryDraftRuntimeExtras, type TrueFoundryMessageCustomMetadata, type TrueFoundryRuntimeExtras, type UseTrueFoundryAgentRuntimeOptions, type UserMessageContent, buildEditedUserMessageContent, buildTurnAssistantContent, buildUserMessageContent, collectApprovalInputs, collectRequiredActionInputs, collectResponseInputs, convertTurnsToThreadMessages, createDraftSessionBridge, createTrueFoundryDraftThreadListAdapter, createTrueFoundryThreadListAdapter, draftSessionTitle, findPausedAssistantMessage, getSession, getTurnMessageContent, mergeAgentSpec, messageHasPendingApprovals, messageHasPendingRequiredActions, messageHasPendingResponses, parseTurnIdFromMessageId, repositoryItemsFromMessages, toTrueFoundryApprovalInputs, trueFoundryAttachmentAdapter, trueFoundryExtras, useTrueFoundryAgentRuntime, useTrueFoundryAgentSpec, useTrueFoundryApprovals, useTrueFoundryCancel, useTrueFoundryDownloadSandboxFile, useTrueFoundryMcpAuth, useTrueFoundryResetFromTurn, useTrueFoundryRespondToToolApproval, useTrueFoundryRespondToToolResponse, useTrueFoundryResumeMcpAuth, useTrueFoundrySandboxId, useTrueFoundryToolResponses, useTrueFoundryUpdateAgentSpec };
312
+ export { type AgentSpec, type AgentSpecUpdate, type ConvertTurnsResult, type DraftAgentConfig, type DraftSession, type DraftSessionBridge, type McpAuthMessageCustomMetadata, type NamedAgentConfig, type PendingApproval, type PendingToolResponse, ROOT_THREAD_ID, type SandboxMessageCustomMetadata, type SubAgentArtifact, type SubAgentCustomMetadata, type SubAgentMessageCustomMetadata, TOOL_RESPONSE_THREAD_ID_CUSTOM_KEY, type ToolApprovalMessageCustomMetadata, type ToolResponseMessageCustomMetadata, type TrueFoundryAgentConfig, type TrueFoundryDraftRuntimeExtras, type TrueFoundryMessageCustomMetadata, type TrueFoundryRuntimeExtras, type UseTrueFoundryAgentRuntimeOptions, type UserMessageContent, buildEditedUserMessageContent, buildTurnAssistantContent, buildUserMessageContent, collectApprovalInputs, collectRequiredActionInputs, collectResponseInputs, convertTurnsToThreadMessages, createDraftSessionBridge, createTrueFoundryDraftThreadListAdapter, createTrueFoundryThreadListAdapter, draftSessionTitle, findPausedAssistantMessage, getSession, getTurnMessageContent, mergeAgentSpec, messageHasPendingApprovals, messageHasPendingRequiredActions, messageHasPendingResponses, parseTurnIdFromMessageId, repositoryItemsFromMessages, toTrueFoundryApprovalInputs, trueFoundryAttachmentAdapter, trueFoundryExtras, useTrueFoundryAgentRuntime, useTrueFoundryAgentSpec, useTrueFoundryApprovals, useTrueFoundryCancel, useTrueFoundryDownloadSandboxFile, useTrueFoundryHistoryPagination, useTrueFoundryMcpAuth, useTrueFoundryReload, useTrueFoundryResetFromTurn, useTrueFoundryRespondToToolApproval, useTrueFoundryRespondToToolResponse, useTrueFoundryResumeMcpAuth, useTrueFoundrySandboxId, useTrueFoundryToolResponses, useTrueFoundryUpdateAgentSpec };