@axiom-lattice/protocols 2.1.18 → 2.1.20

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.
@@ -14,6 +14,11 @@ export interface Thread {
14
14
  */
15
15
  id: string;
16
16
 
17
+ /**
18
+ * Tenant identifier
19
+ */
20
+ tenantId: string;
21
+
17
22
  /**
18
23
  * Assistant identifier this thread belongs to
19
24
  */
@@ -48,35 +53,38 @@ export interface CreateThreadRequest {
48
53
  /**
49
54
  * ThreadStore interface
50
55
  * Provides CRUD operations for thread data
51
- * All operations are scoped to an assistant ID
56
+ * All operations are scoped to a tenant ID and assistant ID
52
57
  */
53
58
  export interface ThreadStore {
54
59
  /**
55
- * Get all threads for a specific assistant
60
+ * Get all threads for a specific tenant and assistant
61
+ * @param tenantId Tenant identifier
56
62
  * @param assistantId Assistant identifier
57
63
  * @returns Array of threads for the assistant
58
64
  */
59
- getThreadsByAssistantId(assistantId: string): Promise<Thread[]>;
65
+ getThreadsByAssistantId(tenantId: string, assistantId: string): Promise<Thread[]>;
60
66
 
61
67
  /**
62
- * Get a thread by ID for a specific assistant
63
- * @param assistantId Assistant identifier
68
+ * Get a thread by ID for a specific tenant
69
+ * @param tenantId Tenant identifier
64
70
  * @param threadId Thread identifier
65
71
  * @returns Thread if found, undefined otherwise
66
72
  */
67
73
  getThreadById(
68
- assistantId: string,
74
+ tenantId: string,
69
75
  threadId: string
70
76
  ): Promise<Thread | undefined>;
71
77
 
72
78
  /**
73
- * Create a new thread for an assistant
79
+ * Create a new thread for a tenant and assistant
80
+ * @param tenantId Tenant identifier
74
81
  * @param assistantId Assistant identifier
75
82
  * @param threadId Thread identifier
76
83
  * @param data Thread creation data
77
84
  * @returns Created thread
78
85
  */
79
86
  createThread(
87
+ tenantId: string,
80
88
  assistantId: string,
81
89
  threadId: string,
82
90
  data: CreateThreadRequest
@@ -84,30 +92,30 @@ export interface ThreadStore {
84
92
 
85
93
  /**
86
94
  * Update an existing thread
87
- * @param assistantId Assistant identifier
95
+ * @param tenantId Tenant identifier
88
96
  * @param threadId Thread identifier
89
97
  * @param updates Partial thread data to update
90
98
  * @returns Updated thread if found, null otherwise
91
99
  */
92
100
  updateThread(
93
- assistantId: string,
101
+ tenantId: string,
94
102
  threadId: string,
95
103
  updates: Partial<CreateThreadRequest>
96
104
  ): Promise<Thread | null>;
97
105
 
98
106
  /**
99
107
  * Delete a thread by ID
100
- * @param assistantId Assistant identifier
108
+ * @param tenantId Tenant identifier
101
109
  * @param threadId Thread identifier
102
110
  * @returns true if deleted, false otherwise
103
111
  */
104
- deleteThread(assistantId: string, threadId: string): Promise<boolean>;
112
+ deleteThread(tenantId: string, threadId: string): Promise<boolean>;
105
113
 
106
114
  /**
107
115
  * Check if thread exists
108
- * @param assistantId Assistant identifier
116
+ * @param tenantId Tenant identifier
109
117
  * @param threadId Thread identifier
110
118
  * @returns true if thread exists, false otherwise
111
119
  */
112
- hasThread(assistantId: string, threadId: string): Promise<boolean>;
120
+ hasThread(tenantId: string, threadId: string): Promise<boolean>;
113
121
  }