@xpert-ai/chatkit-types 0.3.9 → 0.3.11
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/dist/index.d.ts +74 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -261,6 +261,37 @@ export declare type ChatKitEvents = {
|
|
|
261
261
|
}>;
|
|
262
262
|
};
|
|
263
263
|
|
|
264
|
+
export declare type ChatKitGoalAdapter = {
|
|
265
|
+
getGoal: (params: {
|
|
266
|
+
threadId: string;
|
|
267
|
+
signal?: AbortSignal;
|
|
268
|
+
}) => Promise<ThreadGoal | null>;
|
|
269
|
+
setGoal: (params: {
|
|
270
|
+
threadId?: string | null;
|
|
271
|
+
assistantId: string;
|
|
272
|
+
objective: string;
|
|
273
|
+
runtimeCapabilities?: RuntimeCapabilitiesSelection | null;
|
|
274
|
+
signal?: AbortSignal;
|
|
275
|
+
}) => Promise<ChatKitGoalSetResult>;
|
|
276
|
+
updateGoal: (params: {
|
|
277
|
+
threadId: string;
|
|
278
|
+
objective?: string;
|
|
279
|
+
status?: ChatKitGoalCommandStatus;
|
|
280
|
+
signal?: AbortSignal;
|
|
281
|
+
}) => Promise<ThreadGoal>;
|
|
282
|
+
clearGoal: (params: {
|
|
283
|
+
threadId: string;
|
|
284
|
+
signal?: AbortSignal;
|
|
285
|
+
}) => Promise<ThreadGoal | null>;
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
export declare type ChatKitGoalCommandStatus = Extract<ThreadGoalStatus, 'active' | 'paused'>;
|
|
289
|
+
|
|
290
|
+
export declare type ChatKitGoalSetResult = {
|
|
291
|
+
threadId: string;
|
|
292
|
+
goal: ThreadGoal;
|
|
293
|
+
};
|
|
294
|
+
|
|
264
295
|
export declare type ChatKitI18nText = LocalizedText;
|
|
265
296
|
|
|
266
297
|
export declare type ChatKitImageReference = ChatKitReferenceBase & {
|
|
@@ -305,6 +336,12 @@ export declare type ChatKitOptions = {
|
|
|
305
336
|
* from this ChatKit instance.
|
|
306
337
|
*/
|
|
307
338
|
request?: ChatKitRequestOptions;
|
|
339
|
+
/**
|
|
340
|
+
* Optional persistent goal adapter used by runtime `/goal` commands.
|
|
341
|
+
* When omitted, ChatKit may use a platform-specific default adapter if the
|
|
342
|
+
* active client exposes one.
|
|
343
|
+
*/
|
|
344
|
+
goal?: ChatKitGoalAdapter;
|
|
308
345
|
/**
|
|
309
346
|
* Locale override for ChatKit UI. If not provided, the browser's locale
|
|
310
347
|
* will be used. If the locale is not supported, will fall back to English.
|
|
@@ -1596,10 +1633,15 @@ export declare type TChatRequest = {
|
|
|
1596
1633
|
};
|
|
1597
1634
|
|
|
1598
1635
|
/**
|
|
1599
|
-
* Human input message,
|
|
1636
|
+
* Human input message, including uploaded file handles and references.
|
|
1600
1637
|
*/
|
|
1601
1638
|
export declare type TChatRequestHuman = {
|
|
1602
1639
|
input?: string;
|
|
1640
|
+
/**
|
|
1641
|
+
* Uploaded file handles submitted with the message. ChatKit UI now sends
|
|
1642
|
+
* AgentFile/FileAsset-shaped objects here; raw browser File objects should be
|
|
1643
|
+
* uploaded before submission.
|
|
1644
|
+
*/
|
|
1603
1645
|
files?: Partial<File>[];
|
|
1604
1646
|
references?: ChatKitReference[];
|
|
1605
1647
|
referenceComposition?: ChatKitReferenceCompositionMode;
|
|
@@ -1682,6 +1724,22 @@ declare type ThemeColor = {
|
|
|
1682
1724
|
light: string;
|
|
1683
1725
|
};
|
|
1684
1726
|
|
|
1727
|
+
export declare type ThreadGoal = {
|
|
1728
|
+
id?: string;
|
|
1729
|
+
conversationId?: string;
|
|
1730
|
+
threadId: string;
|
|
1731
|
+
objective: string;
|
|
1732
|
+
status: ThreadGoalStatus;
|
|
1733
|
+
tokensUsed: number;
|
|
1734
|
+
elapsedSeconds: number;
|
|
1735
|
+
continuationCount: number;
|
|
1736
|
+
statusUpdatedAt?: string | Date | null;
|
|
1737
|
+
completedAt?: string | Date | null;
|
|
1738
|
+
blockedAt?: string | Date | null;
|
|
1739
|
+
};
|
|
1740
|
+
|
|
1741
|
+
export declare type ThreadGoalStatus = 'active' | 'paused' | 'blocked' | 'usage_limited' | 'budget_limited' | 'complete';
|
|
1742
|
+
|
|
1685
1743
|
/**
|
|
1686
1744
|
* Command to resume with streaming after human decision
|
|
1687
1745
|
*/
|
|
@@ -1894,6 +1952,21 @@ export declare type TThreadContextUsageMetrics = {
|
|
|
1894
1952
|
currency?: string | null;
|
|
1895
1953
|
};
|
|
1896
1954
|
|
|
1955
|
+
export declare type TThreadGoalClearedEvent = {
|
|
1956
|
+
type: 'thread_goal_cleared';
|
|
1957
|
+
conversationId?: string;
|
|
1958
|
+
threadId: string;
|
|
1959
|
+
updatedAt: string;
|
|
1960
|
+
};
|
|
1961
|
+
|
|
1962
|
+
export declare type TThreadGoalUpdatedEvent = {
|
|
1963
|
+
type: 'thread_goal_updated';
|
|
1964
|
+
conversationId?: string;
|
|
1965
|
+
threadId: string;
|
|
1966
|
+
goal: ThreadGoal;
|
|
1967
|
+
updatedAt: string;
|
|
1968
|
+
};
|
|
1969
|
+
|
|
1897
1970
|
export declare type TXpertChatInterruptPatch = Pick<TInterruptCommand, 'agentKey' | 'toolCalls' | 'update'>;
|
|
1898
1971
|
|
|
1899
1972
|
export declare type TXpertChatResumeDecision = {
|