@nexusm/sdk 4.0.0 → 5.0.0

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.mts CHANGED
@@ -939,22 +939,25 @@ interface MemorySearchResult {
939
939
  /**
940
940
  * Paginated list of memories.
941
941
  *
942
- * GET /memories?user_id=...
942
+ * GET /memories?user_id=... — mirrors backend `MemoryListResponse` (FLAT
943
+ * container).
944
+ *
945
+ * v5.0.0 BREAKING: was nested `{data, pagination:{total, limit, offset,
946
+ * has_more}}` — that shape never existed on the wire. The backend response
947
+ * is flat `{memories, total_count, limit, offset, has_next}`; the old nested
948
+ * shape meant `result.data` was always `undefined` at runtime.
943
949
  */
944
950
  interface MemoryList {
945
951
  /** Array of memory records */
946
- data: Memory[];
947
- /** Pagination metadata */
948
- pagination: {
949
- /** Total number of memories */
950
- total: number;
951
- /** Current page size limit */
952
- limit: number;
953
- /** Current offset */
954
- offset: number;
955
- /** Whether more results exist */
956
- has_more: boolean;
957
- };
952
+ memories: Memory[];
953
+ /** Total number of memories matching the query */
954
+ total_count: number;
955
+ /** Current page size limit */
956
+ limit: number;
957
+ /** Current offset */
958
+ offset: number;
959
+ /** Whether more results exist beyond this page */
960
+ has_next: boolean;
958
961
  }
959
962
  /**
960
963
  * A single journal entry representing a memory on a specific date.
@@ -1004,8 +1007,13 @@ interface JournalResponse {
1004
1007
  * Parameters for listing memories with optional filtering and pagination.
1005
1008
  */
1006
1009
  interface MemoryListParams {
1007
- /** Filter memories by user ID */
1008
- user_id?: string;
1010
+ /**
1011
+ * User ID within the tenant whose memories to list.
1012
+ *
1013
+ * v5.0.0 BREAKING: now required — backend `GET /memories` declares
1014
+ * `user_id` as `Query(..., min_length=1)`; omitting it returns 422.
1015
+ */
1016
+ user_id: string;
1009
1017
  /** Filter by memory type classification */
1010
1018
  memory_type?: MemoryType;
1011
1019
  /** Maximum number of results per page */
@@ -1027,8 +1035,9 @@ interface MemoryJournalParams {
1027
1035
  user_id?: string;
1028
1036
  }
1029
1037
  /**
1030
- * Service for managing long-term memories via Mem0.
1038
+ * Service for managing long-term memories.
1031
1039
  *
1040
+ * Backed by the Nexus Memory Service (Native pgvector + ProfileWorker).
1032
1041
  * Provides full CRUD operations, semantic search, and the chronological
1033
1042
  * Memory Journal view for reviewing memories over time.
1034
1043
  *
@@ -1151,16 +1160,22 @@ interface Conversation {
1151
1160
  tenant_id: string;
1152
1161
  /** User ID that owns this conversation */
1153
1162
  user_id: string;
1154
- /** Originating agent (null when not agent-created) */
1155
- agent_id?: string | null;
1163
+ /**
1164
+ * Originating agent (null when not agent-created).
1165
+ *
1166
+ * v5.0.0: required-nullable convention — always emitted by the backend
1167
+ * (`ConversationResponse.agent_id: str | None`), value may be null. Was
1168
+ * `agent_id?: string | null` (optional); now `string | null` (required dict).
1169
+ */
1170
+ agent_id: string | null;
1156
1171
  /** Conversation status (e.g. active / archived) */
1157
1172
  status: string;
1158
- /** Auto-generated conversation summary */
1159
- summary?: string | null;
1173
+ /** Auto-generated conversation summary (null until first summary worker run) */
1174
+ summary: string | null;
1160
1175
  /** Total number of messages in the conversation */
1161
1176
  message_count: number;
1162
- /** Additional metadata key-value pairs */
1163
- metadata?: Record<string, unknown>;
1177
+ /** Additional metadata key-value pairs (always emitted, defaults to {}) */
1178
+ metadata: Record<string, unknown>;
1164
1179
  /** Timestamp when the conversation was created (ISO 8601) */
1165
1180
  created_at: string;
1166
1181
  /** Timestamp when the conversation was last updated (ISO 8601) */
@@ -1169,13 +1184,20 @@ interface Conversation {
1169
1184
  /**
1170
1185
  * Request payload for creating a new conversation.
1171
1186
  *
1172
- * POST /conversations
1187
+ * POST /conversations — mirrors backend `CreateConversationRequest`.
1188
+ *
1189
+ * v5.0.0 BREAKING: removed phantom `session_id` — the backend
1190
+ * (`CreateConversationRequest`) does not accept it; it was silently dropped
1191
+ * by Pydantic `extra=ignore`, and the session id is ALWAYS auto-generated
1192
+ * server-side regardless of input (the old "auto-generated if not provided"
1193
+ * doc was false). Added `agent_id` — the backend accepts it but the SDK had
1194
+ * no way to send it.
1173
1195
  */
1174
1196
  interface ConversationCreate {
1175
1197
  /** User ID to associate the conversation with */
1176
1198
  user_id: string;
1177
- /** Custom session ID (auto-generated if not provided) */
1178
- session_id?: string;
1199
+ /** Optional agent identifier to associate the conversation with */
1200
+ agent_id?: string;
1179
1201
  /** Additional metadata key-value pairs */
1180
1202
  metadata?: Record<string, unknown>;
1181
1203
  }
@@ -1295,19 +1317,26 @@ interface ConversationSummary {
1295
1317
  * @module services/conversations
1296
1318
  * @description Conversation Service - Conversation history and auto-summary management.
1297
1319
  *
1298
- * Wraps the Nexus Conversation API powered by Zep OSS. Supports
1299
- * conversation lifecycle management, message operations, and
1300
- * auto-generated summaries via temporal graph analysis.
1320
+ * Wraps the Nexus Conversation API (Native implementation: incremental
1321
+ * summaries produced by the backend SummaryWorker, NOT Zep OSS). Supports
1322
+ * conversation lifecycle management, message operations, and access to
1323
+ * auto-generated summaries.
1301
1324
  *
1302
- * Based on Nexus API v2.0 - /conversations endpoints
1325
+ * v5.0.0: corrected stale "Zep OSS"/"temporal graph"/"API v2.0" docs the
1326
+ * backend has always used a Native SummaryWorker.
1303
1327
  */
1304
1328
 
1305
1329
  /**
1306
1330
  * Parameters for listing conversations with optional filtering and pagination.
1307
1331
  */
1308
1332
  interface ConversationListParams {
1309
- /** Filter conversations by user ID */
1310
- user_id?: string;
1333
+ /**
1334
+ * User ID within the tenant whose conversations to list.
1335
+ *
1336
+ * v5.0.0 BREAKING: now required — backend `GET /conversations` declares
1337
+ * `user_id` as `Query(..., min_length=1)`; omitting it returns 422.
1338
+ */
1339
+ user_id: string;
1311
1340
  /** Maximum number of results per page */
1312
1341
  limit?: number;
1313
1342
  /** Offset for pagination */
@@ -1323,11 +1352,11 @@ interface MessageListParams {
1323
1352
  offset?: number;
1324
1353
  }
1325
1354
  /**
1326
- * Service for managing conversations and messages via Zep OSS.
1355
+ * Service for managing conversations and messages.
1327
1356
  *
1328
1357
  * Provides conversation lifecycle management (create, list, get, delete),
1329
1358
  * message operations (add, list), and access to auto-generated summaries
1330
- * produced by Zep's temporal graph analysis.
1359
+ * produced by the backend SummaryWorker (Native, incremental).
1331
1360
  *
1332
1361
  * @example
1333
1362
  * ```typescript
@@ -1379,11 +1408,11 @@ declare class ConversationService extends BaseService {
1379
1408
  /**
1380
1409
  * Add a message to an existing conversation.
1381
1410
  *
1382
- * The message is appended to the conversation's message sequence.
1383
- * Zep will asynchronously update the conversation summary after
1384
- * new messages are added.
1411
+ * The message is appended to the conversation's message sequence. The
1412
+ * backend SummaryWorker asynchronously updates the conversation summary
1413
+ * after new messages are added.
1385
1414
  *
1386
- * @param conversationId - UUID of the target conversation.
1415
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1387
1416
  * @param message - Message payload including role and content.
1388
1417
  * @returns The newly created message with generated ID and sequence number.
1389
1418
  * @throws {ApiError} 404 if the conversation does not exist.
@@ -1394,7 +1423,7 @@ declare class ConversationService extends BaseService {
1394
1423
  *
1395
1424
  * Messages are returned in chronological order (oldest first).
1396
1425
  *
1397
- * @param conversationId - UUID of the conversation.
1426
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1398
1427
  * @param params - Optional pagination controls (limit, offset).
1399
1428
  * @returns Paginated list of messages.
1400
1429
  * @throws {ApiError} 404 if the conversation does not exist.
@@ -1403,21 +1432,24 @@ declare class ConversationService extends BaseService {
1403
1432
  /**
1404
1433
  * Retrieve the auto-generated summary of a conversation.
1405
1434
  *
1406
- * Summaries are produced by Zep OSS temporal graph analysis and
1407
- * include key points extracted from the conversation history.
1435
+ * Summaries are produced incrementally by the backend SummaryWorker from
1436
+ * the conversation history.
1408
1437
  *
1409
- * @param conversationId - UUID of the conversation.
1410
- * @returns The conversation summary with key points and generation timestamp.
1438
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1439
+ * @returns The conversation summary ({@link ConversationSummary}: summary
1440
+ * text + message counts + created_at). Note: no "key points" or
1441
+ * "generated_at" fields — those were phantom (removed in v4.0.0).
1411
1442
  * @throws {ApiError} 404 if the conversation does not exist.
1412
1443
  */
1413
1444
  getSummary(conversationId: string, options?: RequestOptions): Promise<ConversationSummary>;
1414
1445
  /**
1415
- * Delete a conversation and all its messages.
1446
+ * Delete a conversation.
1416
1447
  *
1417
- * This operation is irreversible. The conversation, all associated
1418
- * messages, and the generated summary will be permanently removed.
1448
+ * Soft-delete: the backend sets `deleted_at` (the conversation stops
1449
+ * appearing in list/get) rather than physically removing the row and its
1450
+ * messages.
1419
1451
  *
1420
- * @param conversationId - UUID of the conversation to delete.
1452
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1421
1453
  * @throws {ApiError} 404 if the conversation does not exist.
1422
1454
  */
1423
1455
  delete(conversationId: string, options?: RequestOptions): Promise<void>;
@@ -1903,9 +1935,12 @@ interface ApiKeyCreate {
1903
1935
  /** Human-readable name for the API key (1-255 characters) */
1904
1936
  name: string;
1905
1937
  /**
1906
- * Permission scopes for the key (known values: read, write, admin, "*").
1907
- * @default ["*"] — the backend default grants the full wildcard; tightening
1908
- * the default is a separate backend security follow-up.
1938
+ * Permission scopes for the key (known values: read, write, admin,
1939
+ * admin:dashboard, feedback:diagnose, "*" wildcard).
1940
+ * @default ["read", "write"] least-privilege default (backend tightened
1941
+ * in security-scopes-admin-hardening, 2026-06-11). The "*" wildcard must be
1942
+ * requested explicitly; the default intentionally omits admin:dashboard /
1943
+ * feedback:diagnose.
1909
1944
  */
1910
1945
  scopes?: string[];
1911
1946
  /**
@@ -2575,16 +2610,16 @@ declare const memorySearchSchema: z.ZodObject<{
2575
2610
 
2576
2611
  declare const conversationCreateSchema: z.ZodObject<{
2577
2612
  user_id: z.ZodString;
2578
- session_id: z.ZodOptional<z.ZodString>;
2613
+ agent_id: z.ZodOptional<z.ZodString>;
2579
2614
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2580
2615
  }, "strip", z.ZodTypeAny, {
2581
2616
  user_id: string;
2582
2617
  metadata?: Record<string, unknown> | undefined;
2583
- session_id?: string | undefined;
2618
+ agent_id?: string | undefined;
2584
2619
  }, {
2585
2620
  user_id: string;
2586
2621
  metadata?: Record<string, unknown> | undefined;
2587
- session_id?: string | undefined;
2622
+ agent_id?: string | undefined;
2588
2623
  }>;
2589
2624
  declare const messageCreateSchema: z.ZodObject<{
2590
2625
  role: z.ZodEnum<["user", "assistant", "system", "tool"]>;
package/dist/index.d.ts CHANGED
@@ -939,22 +939,25 @@ interface MemorySearchResult {
939
939
  /**
940
940
  * Paginated list of memories.
941
941
  *
942
- * GET /memories?user_id=...
942
+ * GET /memories?user_id=... — mirrors backend `MemoryListResponse` (FLAT
943
+ * container).
944
+ *
945
+ * v5.0.0 BREAKING: was nested `{data, pagination:{total, limit, offset,
946
+ * has_more}}` — that shape never existed on the wire. The backend response
947
+ * is flat `{memories, total_count, limit, offset, has_next}`; the old nested
948
+ * shape meant `result.data` was always `undefined` at runtime.
943
949
  */
944
950
  interface MemoryList {
945
951
  /** Array of memory records */
946
- data: Memory[];
947
- /** Pagination metadata */
948
- pagination: {
949
- /** Total number of memories */
950
- total: number;
951
- /** Current page size limit */
952
- limit: number;
953
- /** Current offset */
954
- offset: number;
955
- /** Whether more results exist */
956
- has_more: boolean;
957
- };
952
+ memories: Memory[];
953
+ /** Total number of memories matching the query */
954
+ total_count: number;
955
+ /** Current page size limit */
956
+ limit: number;
957
+ /** Current offset */
958
+ offset: number;
959
+ /** Whether more results exist beyond this page */
960
+ has_next: boolean;
958
961
  }
959
962
  /**
960
963
  * A single journal entry representing a memory on a specific date.
@@ -1004,8 +1007,13 @@ interface JournalResponse {
1004
1007
  * Parameters for listing memories with optional filtering and pagination.
1005
1008
  */
1006
1009
  interface MemoryListParams {
1007
- /** Filter memories by user ID */
1008
- user_id?: string;
1010
+ /**
1011
+ * User ID within the tenant whose memories to list.
1012
+ *
1013
+ * v5.0.0 BREAKING: now required — backend `GET /memories` declares
1014
+ * `user_id` as `Query(..., min_length=1)`; omitting it returns 422.
1015
+ */
1016
+ user_id: string;
1009
1017
  /** Filter by memory type classification */
1010
1018
  memory_type?: MemoryType;
1011
1019
  /** Maximum number of results per page */
@@ -1027,8 +1035,9 @@ interface MemoryJournalParams {
1027
1035
  user_id?: string;
1028
1036
  }
1029
1037
  /**
1030
- * Service for managing long-term memories via Mem0.
1038
+ * Service for managing long-term memories.
1031
1039
  *
1040
+ * Backed by the Nexus Memory Service (Native pgvector + ProfileWorker).
1032
1041
  * Provides full CRUD operations, semantic search, and the chronological
1033
1042
  * Memory Journal view for reviewing memories over time.
1034
1043
  *
@@ -1151,16 +1160,22 @@ interface Conversation {
1151
1160
  tenant_id: string;
1152
1161
  /** User ID that owns this conversation */
1153
1162
  user_id: string;
1154
- /** Originating agent (null when not agent-created) */
1155
- agent_id?: string | null;
1163
+ /**
1164
+ * Originating agent (null when not agent-created).
1165
+ *
1166
+ * v5.0.0: required-nullable convention — always emitted by the backend
1167
+ * (`ConversationResponse.agent_id: str | None`), value may be null. Was
1168
+ * `agent_id?: string | null` (optional); now `string | null` (required dict).
1169
+ */
1170
+ agent_id: string | null;
1156
1171
  /** Conversation status (e.g. active / archived) */
1157
1172
  status: string;
1158
- /** Auto-generated conversation summary */
1159
- summary?: string | null;
1173
+ /** Auto-generated conversation summary (null until first summary worker run) */
1174
+ summary: string | null;
1160
1175
  /** Total number of messages in the conversation */
1161
1176
  message_count: number;
1162
- /** Additional metadata key-value pairs */
1163
- metadata?: Record<string, unknown>;
1177
+ /** Additional metadata key-value pairs (always emitted, defaults to {}) */
1178
+ metadata: Record<string, unknown>;
1164
1179
  /** Timestamp when the conversation was created (ISO 8601) */
1165
1180
  created_at: string;
1166
1181
  /** Timestamp when the conversation was last updated (ISO 8601) */
@@ -1169,13 +1184,20 @@ interface Conversation {
1169
1184
  /**
1170
1185
  * Request payload for creating a new conversation.
1171
1186
  *
1172
- * POST /conversations
1187
+ * POST /conversations — mirrors backend `CreateConversationRequest`.
1188
+ *
1189
+ * v5.0.0 BREAKING: removed phantom `session_id` — the backend
1190
+ * (`CreateConversationRequest`) does not accept it; it was silently dropped
1191
+ * by Pydantic `extra=ignore`, and the session id is ALWAYS auto-generated
1192
+ * server-side regardless of input (the old "auto-generated if not provided"
1193
+ * doc was false). Added `agent_id` — the backend accepts it but the SDK had
1194
+ * no way to send it.
1173
1195
  */
1174
1196
  interface ConversationCreate {
1175
1197
  /** User ID to associate the conversation with */
1176
1198
  user_id: string;
1177
- /** Custom session ID (auto-generated if not provided) */
1178
- session_id?: string;
1199
+ /** Optional agent identifier to associate the conversation with */
1200
+ agent_id?: string;
1179
1201
  /** Additional metadata key-value pairs */
1180
1202
  metadata?: Record<string, unknown>;
1181
1203
  }
@@ -1295,19 +1317,26 @@ interface ConversationSummary {
1295
1317
  * @module services/conversations
1296
1318
  * @description Conversation Service - Conversation history and auto-summary management.
1297
1319
  *
1298
- * Wraps the Nexus Conversation API powered by Zep OSS. Supports
1299
- * conversation lifecycle management, message operations, and
1300
- * auto-generated summaries via temporal graph analysis.
1320
+ * Wraps the Nexus Conversation API (Native implementation: incremental
1321
+ * summaries produced by the backend SummaryWorker, NOT Zep OSS). Supports
1322
+ * conversation lifecycle management, message operations, and access to
1323
+ * auto-generated summaries.
1301
1324
  *
1302
- * Based on Nexus API v2.0 - /conversations endpoints
1325
+ * v5.0.0: corrected stale "Zep OSS"/"temporal graph"/"API v2.0" docs the
1326
+ * backend has always used a Native SummaryWorker.
1303
1327
  */
1304
1328
 
1305
1329
  /**
1306
1330
  * Parameters for listing conversations with optional filtering and pagination.
1307
1331
  */
1308
1332
  interface ConversationListParams {
1309
- /** Filter conversations by user ID */
1310
- user_id?: string;
1333
+ /**
1334
+ * User ID within the tenant whose conversations to list.
1335
+ *
1336
+ * v5.0.0 BREAKING: now required — backend `GET /conversations` declares
1337
+ * `user_id` as `Query(..., min_length=1)`; omitting it returns 422.
1338
+ */
1339
+ user_id: string;
1311
1340
  /** Maximum number of results per page */
1312
1341
  limit?: number;
1313
1342
  /** Offset for pagination */
@@ -1323,11 +1352,11 @@ interface MessageListParams {
1323
1352
  offset?: number;
1324
1353
  }
1325
1354
  /**
1326
- * Service for managing conversations and messages via Zep OSS.
1355
+ * Service for managing conversations and messages.
1327
1356
  *
1328
1357
  * Provides conversation lifecycle management (create, list, get, delete),
1329
1358
  * message operations (add, list), and access to auto-generated summaries
1330
- * produced by Zep's temporal graph analysis.
1359
+ * produced by the backend SummaryWorker (Native, incremental).
1331
1360
  *
1332
1361
  * @example
1333
1362
  * ```typescript
@@ -1379,11 +1408,11 @@ declare class ConversationService extends BaseService {
1379
1408
  /**
1380
1409
  * Add a message to an existing conversation.
1381
1410
  *
1382
- * The message is appended to the conversation's message sequence.
1383
- * Zep will asynchronously update the conversation summary after
1384
- * new messages are added.
1411
+ * The message is appended to the conversation's message sequence. The
1412
+ * backend SummaryWorker asynchronously updates the conversation summary
1413
+ * after new messages are added.
1385
1414
  *
1386
- * @param conversationId - UUID of the target conversation.
1415
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1387
1416
  * @param message - Message payload including role and content.
1388
1417
  * @returns The newly created message with generated ID and sequence number.
1389
1418
  * @throws {ApiError} 404 if the conversation does not exist.
@@ -1394,7 +1423,7 @@ declare class ConversationService extends BaseService {
1394
1423
  *
1395
1424
  * Messages are returned in chronological order (oldest first).
1396
1425
  *
1397
- * @param conversationId - UUID of the conversation.
1426
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1398
1427
  * @param params - Optional pagination controls (limit, offset).
1399
1428
  * @returns Paginated list of messages.
1400
1429
  * @throws {ApiError} 404 if the conversation does not exist.
@@ -1403,21 +1432,24 @@ declare class ConversationService extends BaseService {
1403
1432
  /**
1404
1433
  * Retrieve the auto-generated summary of a conversation.
1405
1434
  *
1406
- * Summaries are produced by Zep OSS temporal graph analysis and
1407
- * include key points extracted from the conversation history.
1435
+ * Summaries are produced incrementally by the backend SummaryWorker from
1436
+ * the conversation history.
1408
1437
  *
1409
- * @param conversationId - UUID of the conversation.
1410
- * @returns The conversation summary with key points and generation timestamp.
1438
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1439
+ * @returns The conversation summary ({@link ConversationSummary}: summary
1440
+ * text + message counts + created_at). Note: no "key points" or
1441
+ * "generated_at" fields — those were phantom (removed in v4.0.0).
1411
1442
  * @throws {ApiError} 404 if the conversation does not exist.
1412
1443
  */
1413
1444
  getSummary(conversationId: string, options?: RequestOptions): Promise<ConversationSummary>;
1414
1445
  /**
1415
- * Delete a conversation and all its messages.
1446
+ * Delete a conversation.
1416
1447
  *
1417
- * This operation is irreversible. The conversation, all associated
1418
- * messages, and the generated summary will be permanently removed.
1448
+ * Soft-delete: the backend sets `deleted_at` (the conversation stops
1449
+ * appearing in list/get) rather than physically removing the row and its
1450
+ * messages.
1419
1451
  *
1420
- * @param conversationId - UUID of the conversation to delete.
1452
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1421
1453
  * @throws {ApiError} 404 if the conversation does not exist.
1422
1454
  */
1423
1455
  delete(conversationId: string, options?: RequestOptions): Promise<void>;
@@ -1903,9 +1935,12 @@ interface ApiKeyCreate {
1903
1935
  /** Human-readable name for the API key (1-255 characters) */
1904
1936
  name: string;
1905
1937
  /**
1906
- * Permission scopes for the key (known values: read, write, admin, "*").
1907
- * @default ["*"] — the backend default grants the full wildcard; tightening
1908
- * the default is a separate backend security follow-up.
1938
+ * Permission scopes for the key (known values: read, write, admin,
1939
+ * admin:dashboard, feedback:diagnose, "*" wildcard).
1940
+ * @default ["read", "write"] least-privilege default (backend tightened
1941
+ * in security-scopes-admin-hardening, 2026-06-11). The "*" wildcard must be
1942
+ * requested explicitly; the default intentionally omits admin:dashboard /
1943
+ * feedback:diagnose.
1909
1944
  */
1910
1945
  scopes?: string[];
1911
1946
  /**
@@ -2575,16 +2610,16 @@ declare const memorySearchSchema: z.ZodObject<{
2575
2610
 
2576
2611
  declare const conversationCreateSchema: z.ZodObject<{
2577
2612
  user_id: z.ZodString;
2578
- session_id: z.ZodOptional<z.ZodString>;
2613
+ agent_id: z.ZodOptional<z.ZodString>;
2579
2614
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2580
2615
  }, "strip", z.ZodTypeAny, {
2581
2616
  user_id: string;
2582
2617
  metadata?: Record<string, unknown> | undefined;
2583
- session_id?: string | undefined;
2618
+ agent_id?: string | undefined;
2584
2619
  }, {
2585
2620
  user_id: string;
2586
2621
  metadata?: Record<string, unknown> | undefined;
2587
- session_id?: string | undefined;
2622
+ agent_id?: string | undefined;
2588
2623
  }>;
2589
2624
  declare const messageCreateSchema: z.ZodObject<{
2590
2625
  role: z.ZodEnum<["user", "assistant", "system", "tool"]>;
package/dist/index.js CHANGED
@@ -1089,7 +1089,7 @@ var import_zod3 = require("zod");
1089
1089
  var messageRoleSchema = import_zod3.z.enum(["user", "assistant", "system", "tool"]);
1090
1090
  var conversationCreateSchema = import_zod3.z.object({
1091
1091
  user_id: import_zod3.z.string().min(1),
1092
- session_id: import_zod3.z.string().optional(),
1092
+ agent_id: import_zod3.z.string().max(255).optional(),
1093
1093
  metadata: import_zod3.z.record(import_zod3.z.unknown()).optional()
1094
1094
  });
1095
1095
  var messageCreateSchema = import_zod3.z.object({
@@ -1139,11 +1139,11 @@ var ConversationService = class extends BaseService {
1139
1139
  /**
1140
1140
  * Add a message to an existing conversation.
1141
1141
  *
1142
- * The message is appended to the conversation's message sequence.
1143
- * Zep will asynchronously update the conversation summary after
1144
- * new messages are added.
1142
+ * The message is appended to the conversation's message sequence. The
1143
+ * backend SummaryWorker asynchronously updates the conversation summary
1144
+ * after new messages are added.
1145
1145
  *
1146
- * @param conversationId - UUID of the target conversation.
1146
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1147
1147
  * @param message - Message payload including role and content.
1148
1148
  * @returns The newly created message with generated ID and sequence number.
1149
1149
  * @throws {ApiError} 404 if the conversation does not exist.
@@ -1160,7 +1160,7 @@ var ConversationService = class extends BaseService {
1160
1160
  *
1161
1161
  * Messages are returned in chronological order (oldest first).
1162
1162
  *
1163
- * @param conversationId - UUID of the conversation.
1163
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1164
1164
  * @param params - Optional pagination controls (limit, offset).
1165
1165
  * @returns Paginated list of messages.
1166
1166
  * @throws {ApiError} 404 if the conversation does not exist.
@@ -1175,23 +1175,26 @@ var ConversationService = class extends BaseService {
1175
1175
  /**
1176
1176
  * Retrieve the auto-generated summary of a conversation.
1177
1177
  *
1178
- * Summaries are produced by Zep OSS temporal graph analysis and
1179
- * include key points extracted from the conversation history.
1178
+ * Summaries are produced incrementally by the backend SummaryWorker from
1179
+ * the conversation history.
1180
1180
  *
1181
- * @param conversationId - UUID of the conversation.
1182
- * @returns The conversation summary with key points and generation timestamp.
1181
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1182
+ * @returns The conversation summary ({@link ConversationSummary}: summary
1183
+ * text + message counts + created_at). Note: no "key points" or
1184
+ * "generated_at" fields — those were phantom (removed in v4.0.0).
1183
1185
  * @throws {ApiError} 404 if the conversation does not exist.
1184
1186
  */
1185
1187
  async getSummary(conversationId, options) {
1186
1188
  return this.http.get(`/conversations/${conversationId}/summary`, void 0, options?.signal);
1187
1189
  }
1188
1190
  /**
1189
- * Delete a conversation and all its messages.
1191
+ * Delete a conversation.
1190
1192
  *
1191
- * This operation is irreversible. The conversation, all associated
1192
- * messages, and the generated summary will be permanently removed.
1193
+ * Soft-delete: the backend sets `deleted_at` (the conversation stops
1194
+ * appearing in list/get) rather than physically removing the row and its
1195
+ * messages.
1193
1196
  *
1194
- * @param conversationId - UUID of the conversation to delete.
1197
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1195
1198
  * @throws {ApiError} 404 if the conversation does not exist.
1196
1199
  */
1197
1200
  async delete(conversationId, options) {