@nexusm/sdk 3.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.mjs CHANGED
@@ -1022,7 +1022,7 @@ import { z as z3 } from "zod";
1022
1022
  var messageRoleSchema = z3.enum(["user", "assistant", "system", "tool"]);
1023
1023
  var conversationCreateSchema = z3.object({
1024
1024
  user_id: z3.string().min(1),
1025
- session_id: z3.string().optional(),
1025
+ agent_id: z3.string().max(255).optional(),
1026
1026
  metadata: z3.record(z3.unknown()).optional()
1027
1027
  });
1028
1028
  var messageCreateSchema = z3.object({
@@ -1056,10 +1056,14 @@ var ConversationService = class extends BaseService {
1056
1056
  return this.http.get("/conversations", params, options?.signal);
1057
1057
  }
1058
1058
  /**
1059
- * Retrieve a conversation with its messages included.
1059
+ * Retrieve a conversation.
1060
1060
  *
1061
- * @param conversationId - UUID of the conversation to retrieve.
1062
- * @returns Conversation detail including the full message list.
1061
+ * v4.0.0 BREAKING: returns `Conversation` the backend response has no
1062
+ * `messages` array (the previous `ConversationDetail` shape was a
1063
+ * phantom). Fetch messages via {@link getMessages}.
1064
+ *
1065
+ * @param conversationId - Compound conversation ID to retrieve.
1066
+ * @returns The conversation record.
1063
1067
  * @throws {ApiError} 404 if the conversation does not exist.
1064
1068
  */
1065
1069
  async get(conversationId, options) {
@@ -1068,11 +1072,11 @@ var ConversationService = class extends BaseService {
1068
1072
  /**
1069
1073
  * Add a message to an existing conversation.
1070
1074
  *
1071
- * The message is appended to the conversation's message sequence.
1072
- * Zep will asynchronously update the conversation summary after
1073
- * new messages are added.
1075
+ * The message is appended to the conversation's message sequence. The
1076
+ * backend SummaryWorker asynchronously updates the conversation summary
1077
+ * after new messages are added.
1074
1078
  *
1075
- * @param conversationId - UUID of the target conversation.
1079
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1076
1080
  * @param message - Message payload including role and content.
1077
1081
  * @returns The newly created message with generated ID and sequence number.
1078
1082
  * @throws {ApiError} 404 if the conversation does not exist.
@@ -1089,7 +1093,7 @@ var ConversationService = class extends BaseService {
1089
1093
  *
1090
1094
  * Messages are returned in chronological order (oldest first).
1091
1095
  *
1092
- * @param conversationId - UUID of the conversation.
1096
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1093
1097
  * @param params - Optional pagination controls (limit, offset).
1094
1098
  * @returns Paginated list of messages.
1095
1099
  * @throws {ApiError} 404 if the conversation does not exist.
@@ -1104,23 +1108,26 @@ var ConversationService = class extends BaseService {
1104
1108
  /**
1105
1109
  * Retrieve the auto-generated summary of a conversation.
1106
1110
  *
1107
- * Summaries are produced by Zep OSS temporal graph analysis and
1108
- * include key points extracted from the conversation history.
1111
+ * Summaries are produced incrementally by the backend SummaryWorker from
1112
+ * the conversation history.
1109
1113
  *
1110
- * @param conversationId - UUID of the conversation.
1111
- * @returns The conversation summary with key points and generation timestamp.
1114
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1115
+ * @returns The conversation summary ({@link ConversationSummary}: summary
1116
+ * text + message counts + created_at). Note: no "key points" or
1117
+ * "generated_at" fields — those were phantom (removed in v4.0.0).
1112
1118
  * @throws {ApiError} 404 if the conversation does not exist.
1113
1119
  */
1114
1120
  async getSummary(conversationId, options) {
1115
1121
  return this.http.get(`/conversations/${conversationId}/summary`, void 0, options?.signal);
1116
1122
  }
1117
1123
  /**
1118
- * Delete a conversation and all its messages.
1124
+ * Delete a conversation.
1119
1125
  *
1120
- * This operation is irreversible. The conversation, all associated
1121
- * messages, and the generated summary will be permanently removed.
1126
+ * Soft-delete: the backend sets `deleted_at` (the conversation stops
1127
+ * appearing in list/get) rather than physically removing the row and its
1128
+ * messages.
1122
1129
  *
1123
- * @param conversationId - UUID of the conversation to delete.
1130
+ * @param conversationId - Compound conversation ID ("tenant::user::session").
1124
1131
  * @throws {ApiError} 404 if the conversation does not exist.
1125
1132
  */
1126
1133
  async delete(conversationId, options) {