@crewx/sdk 0.8.8-rc.4 → 0.8.8-rc.5
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/conversation/sqlite-provider.d.ts +10 -3
- package/dist/conversation/types.d.ts +10 -3
- package/dist/esm/index.js +13 -13
- package/dist/esm/plugins/index.js +16 -16
- package/dist/esm/repository/index.js +16 -16
- package/dist/index.browser.js +2 -2
- package/dist/index.js +13 -13
- package/dist/plugins/conversation.d.ts +3 -0
- package/dist/plugins/index.js +15 -15
- package/dist/repository/index.js +16 -16
- package/dist/repository/thread.repository.d.ts +3 -1
- package/dist/types/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -6,10 +6,17 @@ export declare class SqliteConversationProvider implements IConversationHistoryP
|
|
|
6
6
|
updateThread(id: string, patch: {
|
|
7
7
|
title?: string;
|
|
8
8
|
}): void;
|
|
9
|
-
ensureThread(threadId: string, platform: Platform, workspaceId?: string): Promise<
|
|
9
|
+
ensureThread(threadId: string, platform: Platform, workspaceId?: string): Promise<{
|
|
10
|
+
created: boolean;
|
|
11
|
+
}>;
|
|
10
12
|
fetchHistory(threadId: string, options?: FetchHistoryOptions): Promise<ConversationThread>;
|
|
11
|
-
saveUserMessage(threadId: string, text: string, _userId?: string, _metadata?: Record<string, unknown>): Promise<
|
|
12
|
-
|
|
13
|
+
saveUserMessage(threadId: string, text: string, _userId?: string, _metadata?: Record<string, unknown>): Promise<{
|
|
14
|
+
id: string;
|
|
15
|
+
firstMessage: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
saveAssistantMessage(threadId: string, text: string, _agentId: string, _metadata?: Record<string, unknown>): Promise<{
|
|
18
|
+
id: string;
|
|
19
|
+
}>;
|
|
13
20
|
close(): void;
|
|
14
21
|
private rowsToMessages;
|
|
15
22
|
}
|
|
@@ -35,9 +35,16 @@ export interface FetchHistoryOptions {
|
|
|
35
35
|
currentTraceId?: string;
|
|
36
36
|
}
|
|
37
37
|
export interface IConversationHistoryProvider {
|
|
38
|
-
ensureThread(threadId: string, platform: Platform, workspaceId?: string): Promise<
|
|
38
|
+
ensureThread(threadId: string, platform: Platform, workspaceId?: string): Promise<{
|
|
39
|
+
created: boolean;
|
|
40
|
+
}>;
|
|
39
41
|
fetchHistory(threadId: string, options?: FetchHistoryOptions): Promise<ConversationThread>;
|
|
40
|
-
saveUserMessage(threadId: string, text: string, userId?: string, metadata?: Record<string, unknown>): Promise<
|
|
41
|
-
|
|
42
|
+
saveUserMessage(threadId: string, text: string, userId?: string, metadata?: Record<string, unknown>): Promise<{
|
|
43
|
+
id: string;
|
|
44
|
+
firstMessage: boolean;
|
|
45
|
+
}>;
|
|
46
|
+
saveAssistantMessage(threadId: string, text: string, agentId: string, metadata?: Record<string, unknown>): Promise<{
|
|
47
|
+
id: string;
|
|
48
|
+
}>;
|
|
42
49
|
close?(): void;
|
|
43
50
|
}
|