@truefoundry/assistant-ui-runtime 0.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +567 -0
- package/dist/index.d.ts +300 -0
- package/dist/index.js +4440 -0
- package/dist/index.js.map +1 -0
- package/package.json +70 -0
- package/src/agentSessionModule.d.ts +25 -0
- package/src/agentSpec.ts +44 -0
- package/src/askUserQuestion.ts +37 -0
- package/src/attachmentAdapter.test.ts +56 -0
- package/src/attachmentAdapter.ts +58 -0
- package/src/bindDraftAgentSession.test.ts +55 -0
- package/src/bindDraftAgentSession.ts +66 -0
- package/src/buildEditedUserMessageContent.test.ts +61 -0
- package/src/collectPending.test.ts +69 -0
- package/src/collectPending.ts +165 -0
- package/src/constants.ts +2 -0
- package/src/convertTurnMessages.test.ts +1991 -0
- package/src/convertTurnMessages.ts +1251 -0
- package/src/createSubAgent.ts +8 -0
- package/src/draftAgentConfig.test.ts +88 -0
- package/src/draftSessionBridge.ts +28 -0
- package/src/extractTurnUserText.ts +21 -0
- package/src/foldPeerThreads.test.ts +386 -0
- package/src/foldPeerThreads.ts +587 -0
- package/src/hooks.ts +123 -0
- package/src/index.ts +68 -0
- package/src/lastUserMessageText.ts +19 -0
- package/src/loadSessionSnapshot.test.ts +57 -0
- package/src/loadSessionSnapshot.ts +35 -0
- package/src/mcpAuth.ts +44 -0
- package/src/messageCustomMetadata.ts +37 -0
- package/src/modelMessageContent.ts +135 -0
- package/src/modelMessageImageContent.test.ts +109 -0
- package/src/modelMessageImageContent.ts +193 -0
- package/src/requiredActionInputs.test.ts +394 -0
- package/src/requiredActionInputs.ts +65 -0
- package/src/requiredActionsFromActiveUpdate.test.ts +95 -0
- package/src/sessionListStartTimestamp.ts +6 -0
- package/src/sessionSnapshot.ts +107 -0
- package/src/sessions.ts +36 -0
- package/src/streamTurn.test.ts +243 -0
- package/src/streamTurn.ts +119 -0
- package/src/toolApproval.test.ts +137 -0
- package/src/toolApproval.ts +459 -0
- package/src/toolResponse.test.ts +136 -0
- package/src/toolResponse.ts +427 -0
- package/src/truefoundryDraftThreadListAdapter.test.ts +140 -0
- package/src/truefoundryDraftThreadListAdapter.ts +63 -0
- package/src/truefoundryExtras.ts +45 -0
- package/src/truefoundryThreadListAdapter.test.ts +103 -0
- package/src/truefoundryThreadListAdapter.ts +59 -0
- package/src/turnEventHelpers.ts +98 -0
- package/src/turnStreamUpdate.ts +11 -0
- package/src/types.ts +92 -0
- package/src/useDraftAgentSpec.ts +173 -0
- package/src/useTrueFoundryAgentMessages.test.tsx +723 -0
- package/src/useTrueFoundryAgentMessages.ts +757 -0
- package/src/useTrueFoundryAgentRuntime.ts +268 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import * as _assistant_ui_core from '@assistant-ui/core';
|
|
2
|
+
import { ExternalStoreSharedOptions, AttachmentAdapter, SpeechSynthesisAdapter, DictationAdapter, RealtimeVoiceAdapter, FeedbackAdapter, ThreadAssistantMessagePart, ThreadMessage, AppendMessage, ExportedMessageRepositoryItem, RemoteThreadListAdapter } from '@assistant-ui/core';
|
|
3
|
+
import * as truefoundry_gateway_sdk_agents from 'truefoundry-gateway-sdk/agents';
|
|
4
|
+
import { AgentSessionClient, TurnEvent, ThreadCreatedEvent, UserToolResponseEvent, McpAuthRequiredEvent, UserToolApprovalEvent, Turn, TurnInputItem, AgentSession } from 'truefoundry-gateway-sdk/agents';
|
|
5
|
+
export { SandboxCreatedEvent } from 'truefoundry-gateway-sdk/agents';
|
|
6
|
+
import { TruefoundryGatewayApi, TrueFoundryGateway } from 'truefoundry-gateway-sdk';
|
|
7
|
+
import * as _assistant_ui_core_internal from '@assistant-ui/core/internal';
|
|
8
|
+
|
|
9
|
+
type AgentSpec = TruefoundryGatewayApi.AgentSpec;
|
|
10
|
+
type DraftSession = TruefoundryGatewayApi.DraftSession;
|
|
11
|
+
type AgentSpecUpdate = {
|
|
12
|
+
instructions?: string;
|
|
13
|
+
model?: Partial<AgentSpec["model"]> & {
|
|
14
|
+
params?: Partial<NonNullable<AgentSpec["model"]["params"]>>;
|
|
15
|
+
};
|
|
16
|
+
mcpServers?: AgentSpec["mcpServers"];
|
|
17
|
+
skills?: AgentSpec["skills"];
|
|
18
|
+
messages?: AgentSpec["messages"];
|
|
19
|
+
variables?: AgentSpec["variables"];
|
|
20
|
+
responseFormat?: AgentSpec["responseFormat"];
|
|
21
|
+
config?: AgentSpec["config"];
|
|
22
|
+
};
|
|
23
|
+
declare function mergeAgentSpec(base: AgentSpec, update: AgentSpecUpdate): AgentSpec;
|
|
24
|
+
declare function draftSessionTitle(draft: DraftSession): string;
|
|
25
|
+
|
|
26
|
+
type NamedAgentConfig = {
|
|
27
|
+
mode: "named";
|
|
28
|
+
agentName: string;
|
|
29
|
+
};
|
|
30
|
+
type DraftAgentConfig = {
|
|
31
|
+
mode: "draft";
|
|
32
|
+
defaultAgentSpec: AgentSpec;
|
|
33
|
+
onAgentSpecChange?: ((spec: AgentSpec) => void) | undefined;
|
|
34
|
+
};
|
|
35
|
+
type TrueFoundryAgentConfig = NamedAgentConfig | DraftAgentConfig;
|
|
36
|
+
type TrueFoundryAgentRuntimeBaseOptions = ExternalStoreSharedOptions & {
|
|
37
|
+
client: AgentSessionClient;
|
|
38
|
+
initialSessionId?: string | undefined;
|
|
39
|
+
threadId?: string | undefined;
|
|
40
|
+
onThreadIdChange?: ((threadId: string | undefined) => void) | undefined;
|
|
41
|
+
onError?: ((error: unknown) => void) | undefined;
|
|
42
|
+
listEventsConcurrency?: number | undefined;
|
|
43
|
+
adapters?: {
|
|
44
|
+
attachments?: AttachmentAdapter | undefined;
|
|
45
|
+
speech?: SpeechSynthesisAdapter | undefined;
|
|
46
|
+
dictation?: DictationAdapter | undefined;
|
|
47
|
+
voice?: RealtimeVoiceAdapter | undefined;
|
|
48
|
+
feedback?: FeedbackAdapter | undefined;
|
|
49
|
+
} | undefined;
|
|
50
|
+
};
|
|
51
|
+
type UseTrueFoundryAgentRuntimeOptions = TrueFoundryAgentRuntimeBaseOptions & {
|
|
52
|
+
/** Discriminated agent source. Omit when using legacy `agentName`. */
|
|
53
|
+
agent?: TrueFoundryAgentConfig | undefined;
|
|
54
|
+
/** Legacy named-agent shorthand. Prefer `agent: { mode: "named", agentName }`. */
|
|
55
|
+
agentName?: string | undefined;
|
|
56
|
+
/** Required when `agent.mode === "draft"`. */
|
|
57
|
+
gateway?: TrueFoundryGateway | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
declare function useTrueFoundryAgentRuntime(options: UseTrueFoundryAgentRuntimeOptions): _assistant_ui_core.AssistantRuntime;
|
|
61
|
+
|
|
62
|
+
type AssistantContentPart = ThreadAssistantMessagePart;
|
|
63
|
+
|
|
64
|
+
/** Gateway root thread id — always the literal `"main"`. */
|
|
65
|
+
declare const ROOT_THREAD_ID = "main";
|
|
66
|
+
|
|
67
|
+
type AgentInfo = ThreadCreatedEvent["agentInfo"];
|
|
68
|
+
type SubAgentCustomMetadata = {
|
|
69
|
+
threadId: string;
|
|
70
|
+
title?: string;
|
|
71
|
+
name?: string;
|
|
72
|
+
model?: string;
|
|
73
|
+
input?: string;
|
|
74
|
+
};
|
|
75
|
+
type SubAgentArtifact = {
|
|
76
|
+
subAgents: Array<{
|
|
77
|
+
threadId: string;
|
|
78
|
+
title?: string;
|
|
79
|
+
agentInfo?: AgentInfo;
|
|
80
|
+
}>;
|
|
81
|
+
};
|
|
82
|
+
type PendingResponseRef = {
|
|
83
|
+
id: string;
|
|
84
|
+
sourceEventId: string;
|
|
85
|
+
question?: string;
|
|
86
|
+
options?: string[];
|
|
87
|
+
};
|
|
88
|
+
type ApprovalDecisionRef = {
|
|
89
|
+
id: string;
|
|
90
|
+
approved: boolean;
|
|
91
|
+
reason?: string;
|
|
92
|
+
};
|
|
93
|
+
type ThreadBucket = {
|
|
94
|
+
events: Map<string, TurnEvent>;
|
|
95
|
+
modelMessageIds: string[];
|
|
96
|
+
toolResults: Map<string, string>;
|
|
97
|
+
pendingApprovals: Map<string, {
|
|
98
|
+
id: string;
|
|
99
|
+
}>;
|
|
100
|
+
approvalDecisions: Map<string, ApprovalDecisionRef>;
|
|
101
|
+
pendingResponses: Map<string, PendingResponseRef>;
|
|
102
|
+
done: boolean;
|
|
103
|
+
title?: string;
|
|
104
|
+
agentInfo?: AgentInfo;
|
|
105
|
+
};
|
|
106
|
+
type ThreadParentLink = {
|
|
107
|
+
parentThreadId: string;
|
|
108
|
+
toolCallId: string;
|
|
109
|
+
};
|
|
110
|
+
declare class PeerThreadFoldState {
|
|
111
|
+
readonly threads: Map<string, ThreadBucket>;
|
|
112
|
+
readonly threadParents: Map<string, ThreadParentLink>;
|
|
113
|
+
getOrCreateBucket(threadId: string): ThreadBucket;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
declare const TOOL_RESPONSE_THREAD_ID_CUSTOM_KEY = "toolResponseThreadId";
|
|
117
|
+
type RespondToToolResponseOptions = Pick<UserToolResponseEvent, "toolCallId" | "content">;
|
|
118
|
+
declare function messageHasPendingResponses(message: ThreadMessage | undefined): boolean;
|
|
119
|
+
declare function collectResponseInputs(message: ThreadMessage, threadId: string): UserToolResponseEvent[];
|
|
120
|
+
|
|
121
|
+
/** Keys written to `ThreadMessage.metadata.custom` by this runtime adapter. */
|
|
122
|
+
type TrueFoundryMessageCustomMetadata = {
|
|
123
|
+
subAgent?: SubAgentCustomMetadata;
|
|
124
|
+
pendingMcpAuth?: true;
|
|
125
|
+
mcpServers?: McpAuthRequiredEvent["mcpServers"];
|
|
126
|
+
sandboxId?: string;
|
|
127
|
+
[TOOL_APPROVAL_THREAD_ID_CUSTOM_KEY]?: string;
|
|
128
|
+
[TOOL_RESPONSE_THREAD_ID_CUSTOM_KEY]?: string;
|
|
129
|
+
};
|
|
130
|
+
type SubAgentMessageCustomMetadata = Pick<TrueFoundryMessageCustomMetadata, "subAgent">;
|
|
131
|
+
type McpAuthMessageCustomMetadata = Pick<TrueFoundryMessageCustomMetadata, "pendingMcpAuth" | "mcpServers">;
|
|
132
|
+
type SandboxMessageCustomMetadata = Pick<TrueFoundryMessageCustomMetadata, "sandboxId">;
|
|
133
|
+
type ToolApprovalMessageCustomMetadata = Pick<TrueFoundryMessageCustomMetadata, typeof TOOL_APPROVAL_THREAD_ID_CUSTOM_KEY>;
|
|
134
|
+
type ToolResponseMessageCustomMetadata = Pick<TrueFoundryMessageCustomMetadata, typeof TOOL_RESPONSE_THREAD_ID_CUSTOM_KEY>;
|
|
135
|
+
|
|
136
|
+
declare const TOOL_APPROVAL_THREAD_ID_CUSTOM_KEY = "toolApprovalThreadId";
|
|
137
|
+
type RespondToToolApprovalOptions = {
|
|
138
|
+
approvalId: string;
|
|
139
|
+
approved: boolean;
|
|
140
|
+
optionId?: string;
|
|
141
|
+
reason?: string;
|
|
142
|
+
};
|
|
143
|
+
declare function messageHasPendingApprovals(message: ThreadMessage | undefined): boolean;
|
|
144
|
+
declare function collectApprovalInputs(message: ThreadMessage, threadId: string): UserToolApprovalEvent[];
|
|
145
|
+
declare function toTrueFoundryApprovalInputs(message: Extract<ThreadMessage, {
|
|
146
|
+
role: "assistant";
|
|
147
|
+
}>, response: RespondToToolApprovalOptions, defaultThreadId?: string): UserToolApprovalEvent[];
|
|
148
|
+
|
|
149
|
+
type ConvertTurnsResult = {
|
|
150
|
+
messages: ThreadMessage[];
|
|
151
|
+
foldState: PeerThreadFoldState;
|
|
152
|
+
runningTurn?: Turn;
|
|
153
|
+
unstable_resume?: boolean;
|
|
154
|
+
};
|
|
155
|
+
declare function buildTurnAssistantContent(turn: Pick<Turn, "listEvents" | "state">, foldState?: PeerThreadFoldState): Promise<AssistantContentPart[]>;
|
|
156
|
+
declare function convertTurnsToThreadMessages(session: AgentSession): Promise<ConvertTurnsResult>;
|
|
157
|
+
declare function getTurnMessageContent(message: AppendMessage): string;
|
|
158
|
+
/**
|
|
159
|
+
* Gateway `user.message` content (string for text-only, or text/file parts).
|
|
160
|
+
* Derived from SDK `TurnInputItem` so it tracks API changes.
|
|
161
|
+
*/
|
|
162
|
+
type UserMessageContent = Extract<TurnInputItem, {
|
|
163
|
+
type: "user.message";
|
|
164
|
+
}>["content"];
|
|
165
|
+
/**
|
|
166
|
+
* Builds the gateway turn input content from a composer message, forwarding
|
|
167
|
+
* attachments as SDK `FileContent` parts. Mirrors how assistant-ui surfaces
|
|
168
|
+
* attachment content on `message.attachments[].content`.
|
|
169
|
+
*/
|
|
170
|
+
declare function buildUserMessageContent(message: AppendMessage): UserMessageContent;
|
|
171
|
+
/** Strips the `-user` suffix from a projected user message id to recover the turn id. */
|
|
172
|
+
declare function parseTurnIdFromMessageId(messageId: string): string;
|
|
173
|
+
/**
|
|
174
|
+
* Builds resubmit content for a text-only edit: replaces text with `editedText`
|
|
175
|
+
* while preserving original file parts from the turn record.
|
|
176
|
+
*/
|
|
177
|
+
declare function buildEditedUserMessageContent(editedText: string, originalInput: TurnInputItem[] | undefined): UserMessageContent;
|
|
178
|
+
declare function repositoryItemsFromMessages(messages: readonly ThreadMessage[]): ExportedMessageRepositoryItem[];
|
|
179
|
+
|
|
180
|
+
declare function createTrueFoundryDraftThreadListAdapter(options: {
|
|
181
|
+
gateway: TrueFoundryGateway;
|
|
182
|
+
defaultAgentSpec: AgentSpec;
|
|
183
|
+
getAgentSpec?: () => AgentSpec;
|
|
184
|
+
}): RemoteThreadListAdapter;
|
|
185
|
+
|
|
186
|
+
type DraftSessionBridge = {
|
|
187
|
+
syncAgentSpec: (draftSessionId: string, agentSpec: AgentSpec) => Promise<void>;
|
|
188
|
+
getDraftAgentSpec: (draftSessionId: string) => Promise<AgentSpec>;
|
|
189
|
+
};
|
|
190
|
+
declare function createDraftSessionBridge(gateway: TrueFoundryGateway): DraftSessionBridge;
|
|
191
|
+
|
|
192
|
+
type PendingApproval = {
|
|
193
|
+
approvalId: string;
|
|
194
|
+
threadId: string;
|
|
195
|
+
toolName: string;
|
|
196
|
+
args: Record<string, unknown>;
|
|
197
|
+
argsText: string;
|
|
198
|
+
};
|
|
199
|
+
type PendingToolResponse = {
|
|
200
|
+
toolCallId: string;
|
|
201
|
+
threadId: string;
|
|
202
|
+
toolName: string;
|
|
203
|
+
args: Record<string, unknown>;
|
|
204
|
+
argsText: string;
|
|
205
|
+
question?: string;
|
|
206
|
+
options?: string[];
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
type TrueFoundryDraftRuntimeExtras = {
|
|
210
|
+
agentSpec: AgentSpec | null;
|
|
211
|
+
draftSessionId: string | undefined;
|
|
212
|
+
isSpecSyncing: boolean;
|
|
213
|
+
specError: unknown | null;
|
|
214
|
+
updateAgentSpec: (update: AgentSpecUpdate) => void;
|
|
215
|
+
};
|
|
216
|
+
type TrueFoundryRuntimeExtras = {
|
|
217
|
+
pendingApprovals: PendingApproval[];
|
|
218
|
+
pendingToolResponses: PendingToolResponse[];
|
|
219
|
+
pendingMcpAuth: {
|
|
220
|
+
mcpServers: McpAuthRequiredEvent["mcpServers"];
|
|
221
|
+
} | null;
|
|
222
|
+
sandboxId: string | undefined;
|
|
223
|
+
respondToToolApproval: (response: RespondToToolApprovalOptions) => void;
|
|
224
|
+
respondToToolResponse: (response: RespondToToolResponseOptions) => void;
|
|
225
|
+
resumeMcpAuth: () => Promise<void>;
|
|
226
|
+
downloadSandboxFile: (path: string) => Promise<Blob>;
|
|
227
|
+
cancel: () => Promise<void>;
|
|
228
|
+
resetFromTurn: (turnId: string) => Promise<void>;
|
|
229
|
+
draft: TrueFoundryDraftRuntimeExtras | null;
|
|
230
|
+
};
|
|
231
|
+
declare const trueFoundryExtras: _assistant_ui_core_internal.RuntimeExtras<TrueFoundryRuntimeExtras>;
|
|
232
|
+
|
|
233
|
+
/** Pending tool approvals plus a respond action. */
|
|
234
|
+
declare const useTrueFoundryApprovals: () => {
|
|
235
|
+
pending: PendingApproval[];
|
|
236
|
+
respond: (response: RespondToToolApprovalOptions) => void;
|
|
237
|
+
};
|
|
238
|
+
/** Pending ask-user tool responses plus a respond action. */
|
|
239
|
+
declare const useTrueFoundryToolResponses: () => {
|
|
240
|
+
pending: PendingToolResponse[];
|
|
241
|
+
respond: (response: RespondToToolResponseOptions) => void;
|
|
242
|
+
};
|
|
243
|
+
/** Pending MCP OAuth plus a resume action. */
|
|
244
|
+
declare const useTrueFoundryMcpAuth: () => {
|
|
245
|
+
pending: {
|
|
246
|
+
mcpServers: truefoundry_gateway_sdk_agents.McpAuthRequiredEvent["mcpServers"];
|
|
247
|
+
} | null;
|
|
248
|
+
resume: () => Promise<void>;
|
|
249
|
+
};
|
|
250
|
+
/** Returns a function to respond to a tool approval from any render context. */
|
|
251
|
+
declare const useTrueFoundryRespondToToolApproval: () => (response: RespondToToolApprovalOptions) => void;
|
|
252
|
+
/** Returns a function to respond to a pending tool response from any render context. */
|
|
253
|
+
declare const useTrueFoundryRespondToToolResponse: () => (response: RespondToToolResponseOptions) => void;
|
|
254
|
+
/** Returns a function to resume after MCP OAuth from any render context. */
|
|
255
|
+
declare const useTrueFoundryResumeMcpAuth: () => () => Promise<void>;
|
|
256
|
+
/** Current sandboxId for this session, if a sandbox has been created. */
|
|
257
|
+
declare const useTrueFoundrySandboxId: () => string | undefined;
|
|
258
|
+
/** Returns a function to download a sandbox file by path from any render context. */
|
|
259
|
+
declare const useTrueFoundryDownloadSandboxFile: () => (path: string) => Promise<Blob>;
|
|
260
|
+
/** Returns a function to cancel the current run from any render context. */
|
|
261
|
+
declare const useTrueFoundryCancel: () => () => Promise<void>;
|
|
262
|
+
/** Returns a function to reset (re-submit) a user turn from any render context. */
|
|
263
|
+
declare const useTrueFoundryResetFromTurn: () => (turnId: string) => Promise<void>;
|
|
264
|
+
/** Current draft agent spec and sync state (draft mode only). */
|
|
265
|
+
declare const useTrueFoundryAgentSpec: () => {
|
|
266
|
+
agentSpec: AgentSpec | null;
|
|
267
|
+
draftSessionId: string | undefined;
|
|
268
|
+
isSpecSyncing: boolean;
|
|
269
|
+
specError: unknown | null;
|
|
270
|
+
updateAgentSpec: (update: AgentSpecUpdate) => void;
|
|
271
|
+
};
|
|
272
|
+
/** Returns a draft spec updater from any render context. */
|
|
273
|
+
declare const useTrueFoundryUpdateAgentSpec: () => (update: Parameters<TrueFoundryDraftRuntimeExtras["updateAgentSpec"]>[0]) => void | undefined;
|
|
274
|
+
|
|
275
|
+
type RequiredActionInput = Extract<TurnInputItem, UserToolApprovalEvent | UserToolResponseEvent>;
|
|
276
|
+
declare function messageHasPendingRequiredActions(message: ThreadMessage | undefined): boolean;
|
|
277
|
+
declare function collectRequiredActionInputs(message: ThreadMessage, defaultThreadId?: string): RequiredActionInput[];
|
|
278
|
+
declare function findPausedAssistantMessage(messages: readonly ThreadMessage[]): Extract<ThreadMessage, {
|
|
279
|
+
role: "assistant";
|
|
280
|
+
}> | undefined;
|
|
281
|
+
|
|
282
|
+
declare function createTrueFoundryThreadListAdapter(options: {
|
|
283
|
+
client: AgentSessionClient;
|
|
284
|
+
agentName: string;
|
|
285
|
+
}): RemoteThreadListAdapter;
|
|
286
|
+
|
|
287
|
+
type GetSessionOptions = {
|
|
288
|
+
/** When set, validates the draft and binds turns to `/agents/sessions/{id}/turns`. */
|
|
289
|
+
draftGateway?: TrueFoundryGateway;
|
|
290
|
+
};
|
|
291
|
+
/** `sessionId` is the assistant-ui thread `remoteId` from `RemoteThreadListAdapter.initialize`. */
|
|
292
|
+
declare function getSession(client: AgentSessionClient, sessionId: string, options?: GetSessionOptions): Promise<AgentSession>;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Reads composer files into `CompleteAttachment` `file` parts for send.
|
|
296
|
+
* Wire via `adapters: { attachments: trueFoundryAttachmentAdapter }`.
|
|
297
|
+
*/
|
|
298
|
+
declare const trueFoundryAttachmentAdapter: AttachmentAdapter;
|
|
299
|
+
|
|
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 };
|