cogito-client 1.0.44 → 1.0.45

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 CHANGED
@@ -158,6 +158,11 @@ export declare interface CogitoCodeSurface {
158
158
 
159
159
  export declare interface CogitoConfig {
160
160
  agents?: CogitoAgent[];
161
+ webhooks?: {
162
+ events: "message"[];
163
+ uri: string;
164
+ [k: string]: unknown;
165
+ }[];
161
166
  [k: string]: unknown;
162
167
  }
163
168
 
@@ -460,6 +465,7 @@ export declare interface CogitoMessagePayload {
460
465
  export declare interface CogitoMessageWebhook {
461
466
  type?: "message";
462
467
  role: string;
468
+ conversationId?: string;
463
469
  content: string;
464
470
  }
465
471
 
@@ -1294,7 +1300,7 @@ export declare type CogitoWebhookPayload = CogitoMessageWebhook;
1294
1300
 
1295
1301
  export declare type ConnectionState = 'disconnected' | 'connecting' | 'connected' | 'error';
1296
1302
 
1297
- export declare function useCogito({ mode, server, configuration }: UseCogitoOptions): {
1303
+ export declare function useCogito({ mode, server, configuration, id }: UseCogitoOptions): {
1298
1304
  messages: CogitoMessage[];
1299
1305
  connectionState: ConnectionState;
1300
1306
  isLoading: boolean;
@@ -1315,6 +1321,10 @@ declare interface UseCogitoOptions {
1315
1321
  server: string;
1316
1322
  mode: ChatMode;
1317
1323
  configuration: string;
1324
+ /** Optional unique identifier for localStorage conversation key.
1325
+ * When provided, each id gets its own conversation history.
1326
+ * Without it, all agents share a single global conversation. */
1327
+ id?: string;
1318
1328
  }
1319
1329
 
1320
1330
  export declare type UseCogitoReturn = ReturnType<typeof useCogito>;