@redis-iris/agent-memory 0.1.0 → 0.2.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.
Files changed (278) hide show
  1. package/README.md +10 -20
  2. package/dist/commonjs/funcs/get-session-memory.d.ts +1 -1
  3. package/dist/commonjs/funcs/get-session-memory.d.ts.map +1 -1
  4. package/dist/commonjs/funcs/get-session-memory.js +8 -3
  5. package/dist/commonjs/funcs/get-session-memory.js.map +1 -1
  6. package/dist/commonjs/funcs/list-sessions.d.ts +1 -1
  7. package/dist/commonjs/funcs/list-sessions.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/list-sessions.js +7 -3
  9. package/dist/commonjs/funcs/list-sessions.js.map +1 -1
  10. package/dist/commonjs/funcs/store-health.d.ts +16 -0
  11. package/dist/commonjs/funcs/store-health.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/store-health.js +114 -0
  13. package/dist/commonjs/funcs/store-health.js.map +1 -0
  14. package/dist/commonjs/funcs/update-long-term-memory-fields.d.ts +15 -0
  15. package/dist/commonjs/funcs/update-long-term-memory-fields.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/update-long-term-memory-fields.js +132 -0
  17. package/dist/commonjs/funcs/update-long-term-memory-fields.js.map +1 -0
  18. package/dist/commonjs/lib/config.d.ts +3 -3
  19. package/dist/commonjs/lib/config.js +3 -3
  20. package/dist/commonjs/lib/http.d.ts +1 -1
  21. package/dist/commonjs/lib/http.d.ts.map +1 -1
  22. package/dist/commonjs/lib/http.js +1 -1
  23. package/dist/commonjs/lib/http.js.map +1 -1
  24. package/dist/commonjs/lib/security.d.ts +5 -4
  25. package/dist/commonjs/lib/security.d.ts.map +1 -1
  26. package/dist/commonjs/lib/security.js +6 -7
  27. package/dist/commonjs/lib/security.js.map +1 -1
  28. package/dist/commonjs/models/add-session-event-request-content.d.ts +9 -0
  29. package/dist/commonjs/models/add-session-event-request-content.d.ts.map +1 -1
  30. package/dist/commonjs/models/add-session-event-request-content.js +1 -0
  31. package/dist/commonjs/models/add-session-event-request-content.js.map +1 -1
  32. package/dist/commonjs/models/attribute-filter-clause.d.ts +63 -0
  33. package/dist/commonjs/models/attribute-filter-clause.d.ts.map +1 -0
  34. package/dist/commonjs/models/attribute-filter-clause.js +85 -0
  35. package/dist/commonjs/models/attribute-filter-clause.js.map +1 -0
  36. package/dist/commonjs/models/create-memory-record.d.ts +14 -6
  37. package/dist/commonjs/models/create-memory-record.d.ts.map +1 -1
  38. package/dist/commonjs/models/create-memory-record.js +3 -3
  39. package/dist/commonjs/models/create-memory-record.js.map +1 -1
  40. package/dist/commonjs/models/get-long-term-memory-response-content.d.ts +9 -4
  41. package/dist/commonjs/models/get-long-term-memory-response-content.d.ts.map +1 -1
  42. package/dist/commonjs/models/get-long-term-memory-response-content.js +2 -2
  43. package/dist/commonjs/models/get-long-term-memory-response-content.js.map +1 -1
  44. package/dist/commonjs/models/get-session-memory-response-content.d.ts +14 -1
  45. package/dist/commonjs/models/get-session-memory-response-content.d.ts.map +1 -1
  46. package/dist/commonjs/models/get-session-memory-response-content.js +3 -0
  47. package/dist/commonjs/models/get-session-memory-response-content.js.map +1 -1
  48. package/dist/commonjs/models/index.d.ts +6 -1
  49. package/dist/commonjs/models/index.d.ts.map +1 -1
  50. package/dist/commonjs/models/index.js +6 -1
  51. package/dist/commonjs/models/index.js.map +1 -1
  52. package/dist/commonjs/models/long-term-memory-filter.d.ts +21 -5
  53. package/dist/commonjs/models/long-term-memory-filter.d.ts.map +1 -1
  54. package/dist/commonjs/models/long-term-memory-filter.js +2 -0
  55. package/dist/commonjs/models/long-term-memory-filter.js.map +1 -1
  56. package/dist/commonjs/models/memory-record.d.ts +9 -4
  57. package/dist/commonjs/models/memory-record.d.ts.map +1 -1
  58. package/dist/commonjs/models/memory-record.js +2 -2
  59. package/dist/commonjs/models/memory-record.js.map +1 -1
  60. package/dist/commonjs/models/memory-type-filter.d.ts +1 -1
  61. package/dist/commonjs/models/namespace-filter.d.ts +7 -1
  62. package/dist/commonjs/models/namespace-filter.d.ts.map +1 -1
  63. package/dist/commonjs/models/namespace-filter.js.map +1 -1
  64. package/dist/commonjs/models/operations/get-session-memory.d.ts +5 -0
  65. package/dist/commonjs/models/operations/get-session-memory.d.ts.map +1 -1
  66. package/dist/commonjs/models/operations/get-session-memory.js +1 -0
  67. package/dist/commonjs/models/operations/get-session-memory.js.map +1 -1
  68. package/dist/commonjs/models/operations/index.d.ts +2 -0
  69. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  70. package/dist/commonjs/models/operations/index.js +2 -0
  71. package/dist/commonjs/models/operations/index.js.map +1 -1
  72. package/dist/commonjs/models/operations/list-sessions.d.ts +10 -0
  73. package/dist/commonjs/models/operations/list-sessions.d.ts.map +1 -1
  74. package/dist/commonjs/models/operations/list-sessions.js +2 -0
  75. package/dist/commonjs/models/operations/list-sessions.js.map +1 -1
  76. package/dist/commonjs/models/operations/store-health.d.ts +11 -0
  77. package/dist/commonjs/models/operations/store-health.d.ts.map +1 -0
  78. package/dist/commonjs/models/operations/store-health.js +48 -0
  79. package/dist/commonjs/models/operations/store-health.js.map +1 -0
  80. package/dist/commonjs/models/operations/update-long-term-memory-fields.d.ts +21 -0
  81. package/dist/commonjs/models/operations/update-long-term-memory-fields.d.ts.map +1 -0
  82. package/dist/commonjs/models/operations/update-long-term-memory-fields.js +52 -0
  83. package/dist/commonjs/models/operations/update-long-term-memory-fields.js.map +1 -0
  84. package/dist/commonjs/models/owner-id-filter.d.ts +1 -1
  85. package/dist/commonjs/models/session-id-filter.d.ts +1 -1
  86. package/dist/commonjs/models/session-summary.d.ts +40 -0
  87. package/dist/commonjs/models/session-summary.d.ts.map +1 -0
  88. package/dist/commonjs/models/session-summary.js +56 -0
  89. package/dist/commonjs/models/session-summary.js.map +1 -0
  90. package/dist/commonjs/models/store-health-feature.d.ts +17 -0
  91. package/dist/commonjs/models/store-health-feature.d.ts.map +1 -0
  92. package/dist/commonjs/models/store-health-feature.js +52 -0
  93. package/dist/commonjs/models/store-health-feature.js.map +1 -0
  94. package/dist/commonjs/models/store-health-response-content.d.ts +21 -0
  95. package/dist/commonjs/models/store-health-response-content.d.ts.map +1 -0
  96. package/dist/commonjs/models/store-health-response-content.js +54 -0
  97. package/dist/commonjs/models/store-health-response-content.js.map +1 -0
  98. package/dist/commonjs/models/store-health-status.d.ts +17 -0
  99. package/dist/commonjs/models/store-health-status.d.ts.map +1 -0
  100. package/dist/commonjs/models/{memory-type.js → store-health-status.js} +9 -11
  101. package/dist/commonjs/models/store-health-status.js.map +1 -0
  102. package/dist/commonjs/models/topics-filter.d.ts +1 -1
  103. package/dist/commonjs/models/update-long-term-memory-fields-request-content.d.ts +41 -0
  104. package/dist/commonjs/models/update-long-term-memory-fields-request-content.d.ts.map +1 -0
  105. package/dist/commonjs/models/update-long-term-memory-fields-request-content.js +53 -0
  106. package/dist/commonjs/models/update-long-term-memory-fields-request-content.js.map +1 -0
  107. package/dist/commonjs/models/update-long-term-memory-request-content.d.ts +7 -4
  108. package/dist/commonjs/models/update-long-term-memory-request-content.d.ts.map +1 -1
  109. package/dist/commonjs/models/update-long-term-memory-request-content.js +1 -2
  110. package/dist/commonjs/models/update-long-term-memory-request-content.js.map +1 -1
  111. package/dist/commonjs/models/update-long-term-memory-response-content.d.ts +9 -4
  112. package/dist/commonjs/models/update-long-term-memory-response-content.d.ts.map +1 -1
  113. package/dist/commonjs/models/update-long-term-memory-response-content.js +2 -2
  114. package/dist/commonjs/models/update-long-term-memory-response-content.js.map +1 -1
  115. package/dist/commonjs/sdk/sdk.d.ts +11 -2
  116. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  117. package/dist/commonjs/sdk/sdk.js +18 -4
  118. package/dist/commonjs/sdk/sdk.js.map +1 -1
  119. package/dist/esm/funcs/get-session-memory.d.ts +1 -1
  120. package/dist/esm/funcs/get-session-memory.d.ts.map +1 -1
  121. package/dist/esm/funcs/get-session-memory.js +9 -4
  122. package/dist/esm/funcs/get-session-memory.js.map +1 -1
  123. package/dist/esm/funcs/list-sessions.d.ts +1 -1
  124. package/dist/esm/funcs/list-sessions.d.ts.map +1 -1
  125. package/dist/esm/funcs/list-sessions.js +7 -3
  126. package/dist/esm/funcs/list-sessions.js.map +1 -1
  127. package/dist/esm/funcs/store-health.d.ts +16 -0
  128. package/dist/esm/funcs/store-health.d.ts.map +1 -0
  129. package/dist/esm/funcs/store-health.js +78 -0
  130. package/dist/esm/funcs/store-health.js.map +1 -0
  131. package/dist/esm/funcs/update-long-term-memory-fields.d.ts +15 -0
  132. package/dist/esm/funcs/update-long-term-memory-fields.d.ts.map +1 -0
  133. package/dist/esm/funcs/update-long-term-memory-fields.js +96 -0
  134. package/dist/esm/funcs/update-long-term-memory-fields.js.map +1 -0
  135. package/dist/esm/lib/config.d.ts +3 -3
  136. package/dist/esm/lib/config.js +3 -3
  137. package/dist/esm/lib/http.d.ts +1 -1
  138. package/dist/esm/lib/http.d.ts.map +1 -1
  139. package/dist/esm/lib/http.js +1 -1
  140. package/dist/esm/lib/http.js.map +1 -1
  141. package/dist/esm/lib/security.d.ts +5 -4
  142. package/dist/esm/lib/security.d.ts.map +1 -1
  143. package/dist/esm/lib/security.js +4 -6
  144. package/dist/esm/lib/security.js.map +1 -1
  145. package/dist/esm/models/add-session-event-request-content.d.ts +9 -0
  146. package/dist/esm/models/add-session-event-request-content.d.ts.map +1 -1
  147. package/dist/esm/models/add-session-event-request-content.js +1 -0
  148. package/dist/esm/models/add-session-event-request-content.js.map +1 -1
  149. package/dist/esm/models/attribute-filter-clause.d.ts +63 -0
  150. package/dist/esm/models/attribute-filter-clause.d.ts.map +1 -0
  151. package/dist/esm/models/attribute-filter-clause.js +44 -0
  152. package/dist/esm/models/attribute-filter-clause.js.map +1 -0
  153. package/dist/esm/models/create-memory-record.d.ts +14 -6
  154. package/dist/esm/models/create-memory-record.d.ts.map +1 -1
  155. package/dist/esm/models/create-memory-record.js +3 -3
  156. package/dist/esm/models/create-memory-record.js.map +1 -1
  157. package/dist/esm/models/get-long-term-memory-response-content.d.ts +9 -4
  158. package/dist/esm/models/get-long-term-memory-response-content.d.ts.map +1 -1
  159. package/dist/esm/models/get-long-term-memory-response-content.js +2 -2
  160. package/dist/esm/models/get-long-term-memory-response-content.js.map +1 -1
  161. package/dist/esm/models/get-session-memory-response-content.d.ts +14 -1
  162. package/dist/esm/models/get-session-memory-response-content.d.ts.map +1 -1
  163. package/dist/esm/models/get-session-memory-response-content.js +3 -0
  164. package/dist/esm/models/get-session-memory-response-content.js.map +1 -1
  165. package/dist/esm/models/index.d.ts +6 -1
  166. package/dist/esm/models/index.d.ts.map +1 -1
  167. package/dist/esm/models/index.js +6 -1
  168. package/dist/esm/models/index.js.map +1 -1
  169. package/dist/esm/models/long-term-memory-filter.d.ts +21 -5
  170. package/dist/esm/models/long-term-memory-filter.d.ts.map +1 -1
  171. package/dist/esm/models/long-term-memory-filter.js +2 -0
  172. package/dist/esm/models/long-term-memory-filter.js.map +1 -1
  173. package/dist/esm/models/memory-record.d.ts +9 -4
  174. package/dist/esm/models/memory-record.d.ts.map +1 -1
  175. package/dist/esm/models/memory-record.js +2 -2
  176. package/dist/esm/models/memory-record.js.map +1 -1
  177. package/dist/esm/models/memory-type-filter.d.ts +1 -1
  178. package/dist/esm/models/namespace-filter.d.ts +7 -1
  179. package/dist/esm/models/namespace-filter.d.ts.map +1 -1
  180. package/dist/esm/models/namespace-filter.js.map +1 -1
  181. package/dist/esm/models/operations/get-session-memory.d.ts +5 -0
  182. package/dist/esm/models/operations/get-session-memory.d.ts.map +1 -1
  183. package/dist/esm/models/operations/get-session-memory.js +1 -0
  184. package/dist/esm/models/operations/get-session-memory.js.map +1 -1
  185. package/dist/esm/models/operations/index.d.ts +2 -0
  186. package/dist/esm/models/operations/index.d.ts.map +1 -1
  187. package/dist/esm/models/operations/index.js +2 -0
  188. package/dist/esm/models/operations/index.js.map +1 -1
  189. package/dist/esm/models/operations/list-sessions.d.ts +10 -0
  190. package/dist/esm/models/operations/list-sessions.d.ts.map +1 -1
  191. package/dist/esm/models/operations/list-sessions.js +2 -0
  192. package/dist/esm/models/operations/list-sessions.js.map +1 -1
  193. package/dist/esm/models/operations/store-health.d.ts +11 -0
  194. package/dist/esm/models/operations/store-health.d.ts.map +1 -0
  195. package/dist/esm/models/operations/store-health.js +11 -0
  196. package/dist/esm/models/operations/store-health.js.map +1 -0
  197. package/dist/esm/models/operations/update-long-term-memory-fields.d.ts +21 -0
  198. package/dist/esm/models/operations/update-long-term-memory-fields.d.ts.map +1 -0
  199. package/dist/esm/models/operations/update-long-term-memory-fields.js +15 -0
  200. package/dist/esm/models/operations/update-long-term-memory-fields.js.map +1 -0
  201. package/dist/esm/models/owner-id-filter.d.ts +1 -1
  202. package/dist/esm/models/session-id-filter.d.ts +1 -1
  203. package/dist/esm/models/session-summary.d.ts +40 -0
  204. package/dist/esm/models/session-summary.d.ts.map +1 -0
  205. package/dist/esm/models/session-summary.js +19 -0
  206. package/dist/esm/models/session-summary.js.map +1 -0
  207. package/dist/esm/models/store-health-feature.d.ts +17 -0
  208. package/dist/esm/models/store-health-feature.d.ts.map +1 -0
  209. package/dist/esm/models/store-health-feature.js +15 -0
  210. package/dist/esm/models/store-health-feature.js.map +1 -0
  211. package/dist/esm/models/store-health-response-content.d.ts +21 -0
  212. package/dist/esm/models/store-health-response-content.d.ts.map +1 -0
  213. package/dist/esm/models/store-health-response-content.js +17 -0
  214. package/dist/esm/models/store-health-response-content.js.map +1 -0
  215. package/dist/esm/models/store-health-status.d.ts +17 -0
  216. package/dist/esm/models/store-health-status.d.ts.map +1 -0
  217. package/dist/esm/models/store-health-status.js +16 -0
  218. package/dist/esm/models/store-health-status.js.map +1 -0
  219. package/dist/esm/models/topics-filter.d.ts +1 -1
  220. package/dist/esm/models/update-long-term-memory-fields-request-content.d.ts +41 -0
  221. package/dist/esm/models/update-long-term-memory-fields-request-content.d.ts.map +1 -0
  222. package/dist/esm/models/update-long-term-memory-fields-request-content.js +16 -0
  223. package/dist/esm/models/update-long-term-memory-fields-request-content.js.map +1 -0
  224. package/dist/esm/models/update-long-term-memory-request-content.d.ts +7 -4
  225. package/dist/esm/models/update-long-term-memory-request-content.d.ts.map +1 -1
  226. package/dist/esm/models/update-long-term-memory-request-content.js +1 -2
  227. package/dist/esm/models/update-long-term-memory-request-content.js.map +1 -1
  228. package/dist/esm/models/update-long-term-memory-response-content.d.ts +9 -4
  229. package/dist/esm/models/update-long-term-memory-response-content.d.ts.map +1 -1
  230. package/dist/esm/models/update-long-term-memory-response-content.js +2 -2
  231. package/dist/esm/models/update-long-term-memory-response-content.js.map +1 -1
  232. package/dist/esm/sdk/sdk.d.ts +11 -2
  233. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  234. package/dist/esm/sdk/sdk.js +18 -4
  235. package/dist/esm/sdk/sdk.js.map +1 -1
  236. package/jsr.json +1 -1
  237. package/package.json +3 -3
  238. package/src/funcs/get-session-memory.ts +10 -1
  239. package/src/funcs/list-sessions.ts +10 -0
  240. package/src/funcs/store-health.ts +194 -0
  241. package/src/funcs/update-long-term-memory-fields.ts +220 -0
  242. package/src/lib/config.ts +3 -3
  243. package/src/lib/http.ts +3 -1
  244. package/src/lib/security.ts +10 -5
  245. package/src/models/add-session-event-request-content.ts +10 -0
  246. package/src/models/attribute-filter-clause.ts +135 -0
  247. package/src/models/create-memory-record.ts +13 -8
  248. package/src/models/get-long-term-memory-response-content.ts +9 -5
  249. package/src/models/get-session-memory-response-content.ts +19 -1
  250. package/src/models/index.ts +6 -1
  251. package/src/models/long-term-memory-filter.ts +22 -5
  252. package/src/models/memory-record.ts +9 -5
  253. package/src/models/memory-type-filter.ts +1 -1
  254. package/src/models/namespace-filter.ts +7 -1
  255. package/src/models/operations/get-session-memory.ts +6 -0
  256. package/src/models/operations/index.ts +2 -0
  257. package/src/models/operations/list-sessions.ts +12 -0
  258. package/src/models/operations/store-health.ts +30 -0
  259. package/src/models/operations/update-long-term-memory-fields.ts +45 -0
  260. package/src/models/owner-id-filter.ts +1 -1
  261. package/src/models/session-id-filter.ts +1 -1
  262. package/src/models/session-summary.ts +67 -0
  263. package/src/models/store-health-feature.ts +42 -0
  264. package/src/models/store-health-response-content.ts +48 -0
  265. package/src/models/store-health-status.ts +28 -0
  266. package/src/models/topics-filter.ts +1 -1
  267. package/src/models/update-long-term-memory-fields-request-content.ts +63 -0
  268. package/src/models/update-long-term-memory-request-content.ts +8 -5
  269. package/src/models/update-long-term-memory-response-content.ts +9 -5
  270. package/src/sdk/sdk.ts +39 -0
  271. package/dist/commonjs/models/memory-type.d.ts +0 -19
  272. package/dist/commonjs/models/memory-type.d.ts.map +0 -1
  273. package/dist/commonjs/models/memory-type.js.map +0 -1
  274. package/dist/esm/models/memory-type.d.ts +0 -19
  275. package/dist/esm/models/memory-type.d.ts.map +0 -1
  276. package/dist/esm/models/memory-type.js +0 -18
  277. package/dist/esm/models/memory-type.js.map +0 -1
  278. package/src/models/memory-type.ts +0 -34
@@ -4,6 +4,11 @@
4
4
  */
5
5
 
6
6
  import * as z from "zod/v3";
7
+ import {
8
+ AttributeFilterClause,
9
+ AttributeFilterClause$Outbound,
10
+ AttributeFilterClause$outboundSchema,
11
+ } from "./attribute-filter-clause.js";
7
12
  import {
8
13
  CreatedAtFilter,
9
14
  CreatedAtFilter$Outbound,
@@ -40,29 +45,39 @@ import {
40
45
  */
41
46
  export type LongTermMemoryFilter = {
42
47
  /**
43
- * Filter by the long-term memory sessionId field.
48
+ * Filter by the long-term memory sessionId field. Matching is case-sensitive.
44
49
  */
45
50
  sessionId?: SessionIdFilter | undefined;
46
51
  /**
47
- * Filter by the long-term memory ownerId field.
52
+ * Filter by the long-term memory ownerId field. Matching is case-sensitive.
48
53
  */
49
54
  ownerId?: OwnerIdFilter | undefined;
50
55
  /**
51
- * Filter by namespace.
56
+ * Filter by namespace. Matching is case-insensitive.
57
+ *
58
+ * @remarks
59
+ *
60
+ * Namespace is optional, so records without one need care. The positive operators (`eq`, `in`, `all`) require the field to be present and therefore never match a record that has no namespace — including memories extracted from a session that has none. `ne` is a plain negation and *does* match those records, so use `eq` or `in` when you need strict namespace isolation rather than `ne` against the namespaces you want to exclude.
61
+ *
62
+ * Omit this filter to search across every namespace, and use it to keep recall inside one project, workspace, team, environment, or tenant.
52
63
  */
53
64
  namespace?: NamespaceFilter | undefined;
54
65
  /**
55
- * Filter by topics.
66
+ * Filter by topics. Matching is case-insensitive.
56
67
  */
57
68
  topics?: TopicsFilter | undefined;
58
69
  /**
59
- * Filter by memory type.
70
+ * Filter by memory type. Matching is case-insensitive.
60
71
  */
61
72
  memoryType?: MemoryTypeFilter | undefined;
62
73
  /**
63
74
  * Filter by creation timestamp.
64
75
  */
65
76
  createdAt?: CreatedAtFilter | undefined;
77
+ /**
78
+ * Per-attribute filter clauses keyed by the custom memory type's field name.
79
+ */
80
+ attributes?: { [k: string]: AttributeFilterClause } | undefined;
66
81
  };
67
82
 
68
83
  /** @internal */
@@ -73,6 +88,7 @@ export type LongTermMemoryFilter$Outbound = {
73
88
  topics?: TopicsFilter$Outbound | undefined;
74
89
  memoryType?: MemoryTypeFilter$Outbound | undefined;
75
90
  createdAt?: CreatedAtFilter$Outbound | undefined;
91
+ attributes?: { [k: string]: AttributeFilterClause$Outbound } | undefined;
76
92
  };
77
93
 
78
94
  /** @internal */
@@ -87,6 +103,7 @@ export const LongTermMemoryFilter$outboundSchema: z.ZodType<
87
103
  topics: TopicsFilter$outboundSchema.optional(),
88
104
  memoryType: MemoryTypeFilter$outboundSchema.optional(),
89
105
  createdAt: CreatedAtFilter$outboundSchema.optional(),
106
+ attributes: z.record(AttributeFilterClause$outboundSchema).optional(),
90
107
  });
91
108
 
92
109
  export function longTermMemoryFilterToJSON(
@@ -7,7 +7,6 @@ import * as z from "zod/v3";
7
7
  import { safeParse } from "../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../types/fp.js";
9
9
  import { SDKValidationError } from "./errors/sdk-validation-error.js";
10
- import { MemoryType, MemoryType$inboundSchema } from "./memory-type.js";
11
10
 
12
11
  /**
13
12
  * A long-term memory record.
@@ -22,9 +21,9 @@ export type MemoryRecord = {
22
21
  */
23
22
  text: string;
24
23
  /**
25
- * Type of long-term memory.
24
+ * Type of memory. Built-in or a custom type registered on the store.
26
25
  */
27
- memoryType?: MemoryType | undefined;
26
+ memoryType?: string | undefined;
28
27
  /**
29
28
  * Session ID associated with this memory.
30
29
  */
@@ -34,13 +33,17 @@ export type MemoryRecord = {
34
33
  */
35
34
  ownerId?: string | undefined;
36
35
  /**
37
- * Namespace for logical grouping.
36
+ * Namespace for logical grouping. Absent when the record has none: either it was written directly without one, or it was extracted from a session that has no namespace.
38
37
  */
39
38
  namespace?: string | undefined;
40
39
  /**
41
40
  * Topic tags for categorization.
42
41
  */
43
42
  topics?: Array<string> | undefined;
43
+ /**
44
+ * Structured record attributes: a map from the custom memory type's field name to that field's value. Values are arbitrary JSON matching the field's declared type (str, int, float, bool, list[str], list[float], or object).
45
+ */
46
+ attributes?: { [k: string]: any } | undefined;
44
47
  /**
45
48
  * Timestamp when the memory was created (UTC).
46
49
  */
@@ -59,11 +62,12 @@ export const MemoryRecord$inboundSchema: z.ZodType<
59
62
  > = z.object({
60
63
  id: z.string(),
61
64
  text: z.string(),
62
- memoryType: MemoryType$inboundSchema.optional(),
65
+ memoryType: z.string().optional(),
63
66
  sessionId: z.string().optional(),
64
67
  ownerId: z.string().optional(),
65
68
  namespace: z.string().optional(),
66
69
  topics: z.array(z.string()).optional(),
70
+ attributes: z.record(z.any()).optional(),
67
71
  createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
68
72
  updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
69
73
  });
@@ -6,7 +6,7 @@
6
6
  import * as z from "zod/v3";
7
7
 
8
8
  /**
9
- * Filter by memory type.
9
+ * Filter by memory type. Matching is case-insensitive.
10
10
  */
11
11
  export type MemoryTypeFilter = {
12
12
  /**
@@ -6,7 +6,13 @@
6
6
  import * as z from "zod/v3";
7
7
 
8
8
  /**
9
- * Filter by namespace.
9
+ * Filter by namespace. Matching is case-insensitive.
10
+ *
11
+ * @remarks
12
+ *
13
+ * Namespace is optional, so records without one need care. The positive operators (`eq`, `in`, `all`) require the field to be present and therefore never match a record that has no namespace — including memories extracted from a session that has none. `ne` is a plain negation and *does* match those records, so use `eq` or `in` when you need strict namespace isolation rather than `ne` against the namespaces you want to exclude.
14
+ *
15
+ * Omit this filter to search across every namespace, and use it to keep recall inside one project, workspace, team, environment, or tenant.
10
16
  */
11
17
  export type NamespaceFilter = {
12
18
  /**
@@ -14,11 +14,16 @@ export type GetSessionMemoryRequest = {
14
14
  * The session ID.
15
15
  */
16
16
  sessionId: string;
17
+ /**
18
+ * When true, the response includes events that have already been covered by the session summary and have not yet been cleaned up. This flag is not expected to be set under normal usage.
19
+ */
20
+ includeSummarisedEvents?: boolean | undefined;
17
21
  };
18
22
 
19
23
  /** @internal */
20
24
  export type GetSessionMemoryRequest$Outbound = {
21
25
  sessionId: string;
26
+ includeSummarisedEvents?: boolean | undefined;
22
27
  };
23
28
 
24
29
  /** @internal */
@@ -28,6 +33,7 @@ export const GetSessionMemoryRequest$outboundSchema: z.ZodType<
28
33
  GetSessionMemoryRequest
29
34
  > = z.object({
30
35
  sessionId: z.string(),
36
+ includeSummarisedEvents: z.boolean().optional(),
31
37
  });
32
38
 
33
39
  export function getSessionMemoryRequestToJSON(
@@ -13,4 +13,6 @@ export * from "./get-session-event.js";
13
13
  export * from "./get-session-memory.js";
14
14
  export * from "./list-sessions.js";
15
15
  export * from "./search-long-term-memory.js";
16
+ export * from "./store-health.js";
17
+ export * from "./update-long-term-memory-fields.js";
16
18
  export * from "./update-long-term-memory.js";
@@ -18,12 +18,22 @@ export type ListSessionsRequest = {
18
18
  * Opaque token from a previous response for the next page.
19
19
  */
20
20
  pageToken?: string | undefined;
21
+ /**
22
+ * Filter sessions by owner. Matching is case-sensitive. Mutually exclusive with includeAll.
23
+ */
24
+ filterOwnerId?: string | undefined;
25
+ /**
26
+ * Set to true to list all sessions. Required when no filter is given; mutually exclusive with filters.
27
+ */
28
+ includeAll?: boolean | undefined;
21
29
  };
22
30
 
23
31
  /** @internal */
24
32
  export type ListSessionsRequest$Outbound = {
25
33
  limit: number;
26
34
  pageToken?: string | undefined;
35
+ filterOwnerId?: string | undefined;
36
+ includeAll?: boolean | undefined;
27
37
  };
28
38
 
29
39
  /** @internal */
@@ -34,6 +44,8 @@ export const ListSessionsRequest$outboundSchema: z.ZodType<
34
44
  > = z.object({
35
45
  limit: z.number().int().default(100),
36
46
  pageToken: z.string().optional(),
47
+ filterOwnerId: z.string().optional(),
48
+ includeAll: z.boolean().optional(),
37
49
  });
38
50
 
39
51
  export function listSessionsRequestToJSON(
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 3740112e1f1e
4
+ */
5
+
6
+ import * as z from "zod/v3";
7
+
8
+ export type StoreHealthGlobals = {
9
+ storeId?: string | undefined;
10
+ };
11
+
12
+ export type StoreHealthRequest = {};
13
+
14
+ /** @internal */
15
+ export type StoreHealthRequest$Outbound = {};
16
+
17
+ /** @internal */
18
+ export const StoreHealthRequest$outboundSchema: z.ZodType<
19
+ StoreHealthRequest$Outbound,
20
+ z.ZodTypeDef,
21
+ StoreHealthRequest
22
+ > = z.object({});
23
+
24
+ export function storeHealthRequestToJSON(
25
+ storeHealthRequest: StoreHealthRequest,
26
+ ): string {
27
+ return JSON.stringify(
28
+ StoreHealthRequest$outboundSchema.parse(storeHealthRequest),
29
+ );
30
+ }
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 16560932b47d
4
+ */
5
+
6
+ import * as z from "zod/v3";
7
+ import * as models from "../index.js";
8
+
9
+ export type UpdateLongTermMemoryFieldsGlobals = {
10
+ storeId?: string | undefined;
11
+ };
12
+
13
+ export type UpdateLongTermMemoryFieldsRequest = {
14
+ /**
15
+ * The memory record ID.
16
+ */
17
+ memoryId: string;
18
+ body: models.UpdateLongTermMemoryFieldsRequestContent;
19
+ };
20
+
21
+ /** @internal */
22
+ export type UpdateLongTermMemoryFieldsRequest$Outbound = {
23
+ memoryId: string;
24
+ body: models.UpdateLongTermMemoryFieldsRequestContent$Outbound;
25
+ };
26
+
27
+ /** @internal */
28
+ export const UpdateLongTermMemoryFieldsRequest$outboundSchema: z.ZodType<
29
+ UpdateLongTermMemoryFieldsRequest$Outbound,
30
+ z.ZodTypeDef,
31
+ UpdateLongTermMemoryFieldsRequest
32
+ > = z.object({
33
+ memoryId: z.string(),
34
+ body: models.UpdateLongTermMemoryFieldsRequestContent$outboundSchema,
35
+ });
36
+
37
+ export function updateLongTermMemoryFieldsRequestToJSON(
38
+ updateLongTermMemoryFieldsRequest: UpdateLongTermMemoryFieldsRequest,
39
+ ): string {
40
+ return JSON.stringify(
41
+ UpdateLongTermMemoryFieldsRequest$outboundSchema.parse(
42
+ updateLongTermMemoryFieldsRequest,
43
+ ),
44
+ );
45
+ }
@@ -6,7 +6,7 @@
6
6
  import * as z from "zod/v3";
7
7
 
8
8
  /**
9
- * Filter by the long-term memory ownerId field.
9
+ * Filter by the long-term memory ownerId field. Matching is case-sensitive.
10
10
  */
11
11
  export type OwnerIdFilter = {
12
12
  /**
@@ -6,7 +6,7 @@
6
6
  import * as z from "zod/v3";
7
7
 
8
8
  /**
9
- * Filter by the long-term memory sessionId field.
9
+ * Filter by the long-term memory sessionId field. Matching is case-sensitive.
10
10
  */
11
11
  export type SessionIdFilter = {
12
12
  /**
@@ -0,0 +1,67 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 1dc482213cab
4
+ */
5
+
6
+ import * as z from "zod/v3";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
10
+
11
+ /**
12
+ * Compacted summary of older session history for a session.
13
+ *
14
+ * @remarks
15
+ *
16
+ * This is derived session state maintained by the background summarization workflow, not a conversation event. It is present only after at least one summarization cycle has completed.
17
+ */
18
+ export type SessionSummary = {
19
+ /**
20
+ * The summary text, a single coherent block.
21
+ */
22
+ text: string;
23
+ /**
24
+ * Boundary event ID. This event and all events before it (by array position) are covered by the summary; `events` contains the retained turns after this boundary.
25
+ */
26
+ summarizedUpToEventId: string;
27
+ /**
28
+ * Timestamp when the summary was first created (UTC). Preserved across re-summarization cycles.
29
+ */
30
+ createdAt: Date;
31
+ /**
32
+ * Timestamp when the summary was last regenerated (UTC). Updated on every summarization cycle. Equal to createdAt on the first cycle.
33
+ */
34
+ updatedAt: Date;
35
+ /**
36
+ * Metadata as a JSON object (e.g., model name, token count). Always present; defaults to an empty object when no metadata was supplied.
37
+ */
38
+ metadata?: any | undefined;
39
+ /**
40
+ * Cumulative number of session events folded into this summary across all summarization cycles. Always positive. A value of 1 may indicate a summary created before this field was tracked; it self-corrects to a real count on the next summarization cycle.
41
+ */
42
+ summarizedEvents: number;
43
+ };
44
+
45
+ /** @internal */
46
+ export const SessionSummary$inboundSchema: z.ZodType<
47
+ SessionSummary,
48
+ z.ZodTypeDef,
49
+ unknown
50
+ > = z.object({
51
+ text: z.string(),
52
+ summarizedUpToEventId: z.string(),
53
+ createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
54
+ updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
55
+ metadata: z.any().optional(),
56
+ summarizedEvents: z.number().int(),
57
+ });
58
+
59
+ export function sessionSummaryFromJSON(
60
+ jsonString: string,
61
+ ): SafeParseResult<SessionSummary, SDKValidationError> {
62
+ return safeParse(
63
+ jsonString,
64
+ (x) => SessionSummary$inboundSchema.parse(JSON.parse(x)),
65
+ `Failed to parse 'SessionSummary' from JSON`,
66
+ );
67
+ }
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b5d2d2b8c673
4
+ */
5
+
6
+ import * as z from "zod/v3";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
10
+ import {
11
+ StoreHealthStatus,
12
+ StoreHealthStatus$inboundSchema,
13
+ } from "./store-health-status.js";
14
+
15
+ /**
16
+ * Feature-level store health.
17
+ */
18
+ export type StoreHealthFeature = {
19
+ /**
20
+ * Store health status.
21
+ */
22
+ status: StoreHealthStatus;
23
+ };
24
+
25
+ /** @internal */
26
+ export const StoreHealthFeature$inboundSchema: z.ZodType<
27
+ StoreHealthFeature,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ status: StoreHealthStatus$inboundSchema,
32
+ });
33
+
34
+ export function storeHealthFeatureFromJSON(
35
+ jsonString: string,
36
+ ): SafeParseResult<StoreHealthFeature, SDKValidationError> {
37
+ return safeParse(
38
+ jsonString,
39
+ (x) => StoreHealthFeature$inboundSchema.parse(JSON.parse(x)),
40
+ `Failed to parse 'StoreHealthFeature' from JSON`,
41
+ );
42
+ }
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b8bf87d488ff
4
+ */
5
+
6
+ import * as z from "zod/v3";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
10
+ import {
11
+ StoreHealthFeature,
12
+ StoreHealthFeature$inboundSchema,
13
+ } from "./store-health-feature.js";
14
+ import {
15
+ StoreHealthStatus,
16
+ StoreHealthStatus$inboundSchema,
17
+ } from "./store-health-status.js";
18
+
19
+ /**
20
+ * Store-scoped RAM feature health.
21
+ */
22
+ export type StoreHealthResponseContent = {
23
+ /**
24
+ * Store health status.
25
+ */
26
+ status: StoreHealthStatus;
27
+ features: { [k: string]: StoreHealthFeature };
28
+ };
29
+
30
+ /** @internal */
31
+ export const StoreHealthResponseContent$inboundSchema: z.ZodType<
32
+ StoreHealthResponseContent,
33
+ z.ZodTypeDef,
34
+ unknown
35
+ > = z.object({
36
+ status: StoreHealthStatus$inboundSchema,
37
+ features: z.record(StoreHealthFeature$inboundSchema),
38
+ });
39
+
40
+ export function storeHealthResponseContentFromJSON(
41
+ jsonString: string,
42
+ ): SafeParseResult<StoreHealthResponseContent, SDKValidationError> {
43
+ return safeParse(
44
+ jsonString,
45
+ (x) => StoreHealthResponseContent$inboundSchema.parse(JSON.parse(x)),
46
+ `Failed to parse 'StoreHealthResponseContent' from JSON`,
47
+ );
48
+ }
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: d59e984c90e9
4
+ */
5
+
6
+ import * as z from "zod/v3";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { OpenEnum } from "../types/enums.js";
9
+
10
+ /**
11
+ * Store health status.
12
+ */
13
+ export const StoreHealthStatus = {
14
+ Healthy: "healthy",
15
+ Degraded: "degraded",
16
+ Unavailable: "unavailable",
17
+ } as const;
18
+ /**
19
+ * Store health status.
20
+ */
21
+ export type StoreHealthStatus = OpenEnum<typeof StoreHealthStatus>;
22
+
23
+ /** @internal */
24
+ export const StoreHealthStatus$inboundSchema: z.ZodType<
25
+ StoreHealthStatus,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = openEnums.inboundSchema(StoreHealthStatus);
@@ -6,7 +6,7 @@
6
6
  import * as z from "zod/v3";
7
7
 
8
8
  /**
9
- * Filter by topics.
9
+ * Filter by topics. Matching is case-insensitive.
10
10
  */
11
11
  export type TopicsFilter = {
12
12
  /**
@@ -0,0 +1,63 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 3e5d9fd9c7a3
4
+ */
5
+
6
+ import * as z from "zod/v3";
7
+
8
+ /**
9
+ * Type- and namespace-scoped field update request for a custom-typed long-term memory record.
10
+ */
11
+ export type UpdateLongTermMemoryFieldsRequestContent = {
12
+ /**
13
+ * The caller's bound memory type. The update is rejected unless the record's stored memoryType matches.
14
+ */
15
+ memoryType: string;
16
+ /**
17
+ * The caller's namespace. The update is rejected with 409 unless the record's stored namespace matches exactly.
18
+ *
19
+ * @remarks
20
+ *
21
+ * Omit it to assert that the record has no namespace — an omitted value matches only records stored without one, it does not mean "any namespace". The check is applied atomically with the update, so a record cannot be re-filed into another namespace between the check and the write.
22
+ */
23
+ namespace?: string | undefined;
24
+ /**
25
+ * Updated text content (1-50000 chars). Omit to leave the text unchanged.
26
+ */
27
+ text?: string | undefined;
28
+ /**
29
+ * Structured record attributes: a map from the custom memory type's field name to that field's value. Values are arbitrary JSON matching the field's declared type (str, int, float, bool, list[str], list[float], or object).
30
+ */
31
+ attributes?: { [k: string]: any } | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export type UpdateLongTermMemoryFieldsRequestContent$Outbound = {
36
+ memoryType: string;
37
+ namespace?: string | undefined;
38
+ text?: string | undefined;
39
+ attributes?: { [k: string]: any } | undefined;
40
+ };
41
+
42
+ /** @internal */
43
+ export const UpdateLongTermMemoryFieldsRequestContent$outboundSchema: z.ZodType<
44
+ UpdateLongTermMemoryFieldsRequestContent$Outbound,
45
+ z.ZodTypeDef,
46
+ UpdateLongTermMemoryFieldsRequestContent
47
+ > = z.object({
48
+ memoryType: z.string(),
49
+ namespace: z.string().optional(),
50
+ text: z.string().optional(),
51
+ attributes: z.record(z.any()).optional(),
52
+ });
53
+
54
+ export function updateLongTermMemoryFieldsRequestContentToJSON(
55
+ updateLongTermMemoryFieldsRequestContent:
56
+ UpdateLongTermMemoryFieldsRequestContent,
57
+ ): string {
58
+ return JSON.stringify(
59
+ UpdateLongTermMemoryFieldsRequestContent$outboundSchema.parse(
60
+ updateLongTermMemoryFieldsRequestContent,
61
+ ),
62
+ );
63
+ }
@@ -4,7 +4,6 @@
4
4
  */
5
5
 
6
6
  import * as z from "zod/v3";
7
- import { MemoryType, MemoryType$outboundSchema } from "./memory-type.js";
8
7
 
9
8
  /**
10
9
  * Partial update request for a long-term memory record.
@@ -15,19 +14,23 @@ export type UpdateLongTermMemoryRequestContent = {
15
14
  */
16
15
  text?: string | undefined;
17
16
  /**
18
- * Type of long-term memory.
17
+ * Updated memory type. Built-in or a custom type registered on the store.
19
18
  */
20
- memoryType?: MemoryType | undefined;
19
+ memoryType?: string | undefined;
21
20
  /**
22
21
  * Updated topics (max 50 topics, each 1-100 chars).
23
22
  */
24
23
  topics?: Array<string> | undefined;
25
24
  /**
26
25
  * Updated namespace. When provided, must be 1-64 chars alphanumeric and dashes; omit the field or send an empty string to clear.
26
+ *
27
+ * @remarks
28
+ *
29
+ * This is the only way to change the namespace of an existing record, including one produced by extraction: a record inherits its session's namespace at creation and is not revised afterwards, so use this to re-file a record or to add a namespace to one created before the session had any.
27
30
  */
28
31
  namespace?: string | undefined;
29
32
  /**
30
- * Updated owner ID. When provided, must be 1-64 chars alphanumeric and dashes; omit the field or send an empty string to clear.
33
+ * Updated owner ID. When provided, must be 1-64 chars alphanumeric and dashes and non-empty; omit the field to leave unchanged. Clearing is not supported because ownerId is required.
31
34
  */
32
35
  ownerId?: string | undefined;
33
36
  /**
@@ -53,7 +56,7 @@ export const UpdateLongTermMemoryRequestContent$outboundSchema: z.ZodType<
53
56
  UpdateLongTermMemoryRequestContent
54
57
  > = z.object({
55
58
  text: z.string().optional(),
56
- memoryType: MemoryType$outboundSchema.optional(),
59
+ memoryType: z.string().optional(),
57
60
  topics: z.array(z.string()).optional(),
58
61
  namespace: z.string().optional(),
59
62
  ownerId: z.string().optional(),
@@ -7,7 +7,6 @@ import * as z from "zod/v3";
7
7
  import { safeParse } from "../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../types/fp.js";
9
9
  import { SDKValidationError } from "./errors/sdk-validation-error.js";
10
- import { MemoryType, MemoryType$inboundSchema } from "./memory-type.js";
11
10
 
12
11
  /**
13
12
  * A long-term memory record.
@@ -22,9 +21,9 @@ export type UpdateLongTermMemoryResponseContent = {
22
21
  */
23
22
  text: string;
24
23
  /**
25
- * Type of long-term memory.
24
+ * Type of memory. Built-in or a custom type registered on the store.
26
25
  */
27
- memoryType?: MemoryType | undefined;
26
+ memoryType?: string | undefined;
28
27
  /**
29
28
  * Session ID associated with this memory.
30
29
  */
@@ -34,13 +33,17 @@ export type UpdateLongTermMemoryResponseContent = {
34
33
  */
35
34
  ownerId?: string | undefined;
36
35
  /**
37
- * Namespace for logical grouping.
36
+ * Namespace for logical grouping. Absent when the record has none: either it was written directly without one, or it was extracted from a session that has no namespace.
38
37
  */
39
38
  namespace?: string | undefined;
40
39
  /**
41
40
  * Topic tags for categorization.
42
41
  */
43
42
  topics?: Array<string> | undefined;
43
+ /**
44
+ * Structured record attributes: a map from the custom memory type's field name to that field's value. Values are arbitrary JSON matching the field's declared type (str, int, float, bool, list[str], list[float], or object).
45
+ */
46
+ attributes?: { [k: string]: any } | undefined;
44
47
  /**
45
48
  * Timestamp when the memory was created (UTC).
46
49
  */
@@ -59,11 +62,12 @@ export const UpdateLongTermMemoryResponseContent$inboundSchema: z.ZodType<
59
62
  > = z.object({
60
63
  id: z.string(),
61
64
  text: z.string(),
62
- memoryType: MemoryType$inboundSchema.optional(),
65
+ memoryType: z.string().optional(),
63
66
  sessionId: z.string().optional(),
64
67
  ownerId: z.string().optional(),
65
68
  namespace: z.string().optional(),
66
69
  topics: z.array(z.string()).optional(),
70
+ attributes: z.record(z.any()).optional(),
67
71
  createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
68
72
  updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
69
73
  });