@xpert-ai/chatkit-types 0.3.10 → 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 +68 -0
- 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.
|
|
@@ -1687,6 +1724,22 @@ declare type ThemeColor = {
|
|
|
1687
1724
|
light: string;
|
|
1688
1725
|
};
|
|
1689
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
|
+
|
|
1690
1743
|
/**
|
|
1691
1744
|
* Command to resume with streaming after human decision
|
|
1692
1745
|
*/
|
|
@@ -1899,6 +1952,21 @@ export declare type TThreadContextUsageMetrics = {
|
|
|
1899
1952
|
currency?: string | null;
|
|
1900
1953
|
};
|
|
1901
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
|
+
|
|
1902
1970
|
export declare type TXpertChatInterruptPatch = Pick<TInterruptCommand, 'agentKey' | 'toolCalls' | 'update'>;
|
|
1903
1971
|
|
|
1904
1972
|
export declare type TXpertChatResumeDecision = {
|