@nebula-ai/sdk 1.2.0 → 1.3.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 (423) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/LICENSE +4 -23
  3. package/README.md +305 -128
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +205 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +205 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +505 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +501 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/resource.d.mts +6 -0
  37. package/core/resource.d.mts.map +1 -0
  38. package/core/resource.d.ts +6 -0
  39. package/core/resource.d.ts.map +1 -0
  40. package/core/resource.js +11 -0
  41. package/core/resource.js.map +1 -0
  42. package/core/resource.mjs +7 -0
  43. package/core/resource.mjs.map +1 -0
  44. package/core/uploads.d.mts +3 -0
  45. package/core/uploads.d.mts.map +1 -0
  46. package/core/uploads.d.ts +3 -0
  47. package/core/uploads.d.ts.map +1 -0
  48. package/core/uploads.js +6 -0
  49. package/core/uploads.js.map +1 -0
  50. package/core/uploads.mjs +2 -0
  51. package/core/uploads.mjs.map +1 -0
  52. package/error.d.mts +2 -0
  53. package/error.d.mts.map +1 -0
  54. package/error.d.ts +2 -0
  55. package/error.d.ts.map +1 -0
  56. package/error.js +6 -0
  57. package/error.js.map +1 -0
  58. package/error.mjs +2 -0
  59. package/error.mjs.map +1 -0
  60. package/index.d.mts +13 -0
  61. package/index.d.mts.map +1 -0
  62. package/index.d.ts +13 -0
  63. package/index.d.ts.map +1 -0
  64. package/index.js +43 -0
  65. package/index.js.map +1 -0
  66. package/index.mjs +13 -0
  67. package/index.mjs.map +1 -0
  68. package/internal/builtin-types.d.mts +73 -0
  69. package/internal/builtin-types.d.mts.map +1 -0
  70. package/internal/builtin-types.d.ts +73 -0
  71. package/internal/builtin-types.d.ts.map +1 -0
  72. package/internal/builtin-types.js +4 -0
  73. package/internal/builtin-types.js.map +1 -0
  74. package/internal/builtin-types.mjs +3 -0
  75. package/internal/builtin-types.mjs.map +1 -0
  76. package/internal/detect-platform.d.mts +15 -0
  77. package/internal/detect-platform.d.mts.map +1 -0
  78. package/internal/detect-platform.d.ts +15 -0
  79. package/internal/detect-platform.d.ts.map +1 -0
  80. package/internal/detect-platform.js +162 -0
  81. package/internal/detect-platform.js.map +1 -0
  82. package/internal/detect-platform.mjs +157 -0
  83. package/internal/detect-platform.mjs.map +1 -0
  84. package/internal/errors.d.mts +3 -0
  85. package/internal/errors.d.mts.map +1 -0
  86. package/internal/errors.d.ts +3 -0
  87. package/internal/errors.d.ts.map +1 -0
  88. package/internal/errors.js +41 -0
  89. package/internal/errors.js.map +1 -0
  90. package/internal/errors.mjs +36 -0
  91. package/internal/errors.mjs.map +1 -0
  92. package/internal/headers.d.mts +20 -0
  93. package/internal/headers.d.mts.map +1 -0
  94. package/internal/headers.d.ts +20 -0
  95. package/internal/headers.d.ts.map +1 -0
  96. package/internal/headers.js +79 -0
  97. package/internal/headers.js.map +1 -0
  98. package/internal/headers.mjs +74 -0
  99. package/internal/headers.mjs.map +1 -0
  100. package/internal/parse.d.mts +12 -0
  101. package/internal/parse.d.mts.map +1 -0
  102. package/internal/parse.d.ts +12 -0
  103. package/internal/parse.d.ts.map +1 -0
  104. package/internal/parse.js +40 -0
  105. package/internal/parse.js.map +1 -0
  106. package/internal/parse.mjs +37 -0
  107. package/internal/parse.mjs.map +1 -0
  108. package/internal/qs/formats.d.mts +7 -0
  109. package/internal/qs/formats.d.mts.map +1 -0
  110. package/internal/qs/formats.d.ts +7 -0
  111. package/internal/qs/formats.d.ts.map +1 -0
  112. package/internal/qs/formats.js +13 -0
  113. package/internal/qs/formats.js.map +1 -0
  114. package/internal/qs/formats.mjs +9 -0
  115. package/internal/qs/formats.mjs.map +1 -0
  116. package/internal/qs/index.d.mts +10 -0
  117. package/internal/qs/index.d.mts.map +1 -0
  118. package/internal/qs/index.d.ts +10 -0
  119. package/internal/qs/index.d.ts.map +1 -0
  120. package/internal/qs/index.js +14 -0
  121. package/internal/qs/index.js.map +1 -0
  122. package/internal/qs/index.mjs +10 -0
  123. package/internal/qs/index.mjs.map +1 -0
  124. package/internal/qs/stringify.d.mts +3 -0
  125. package/internal/qs/stringify.d.mts.map +1 -0
  126. package/internal/qs/stringify.d.ts +3 -0
  127. package/internal/qs/stringify.d.ts.map +1 -0
  128. package/internal/qs/stringify.js +277 -0
  129. package/internal/qs/stringify.js.map +1 -0
  130. package/internal/qs/stringify.mjs +274 -0
  131. package/internal/qs/stringify.mjs.map +1 -0
  132. package/internal/qs/types.d.mts +57 -0
  133. package/internal/qs/types.d.mts.map +1 -0
  134. package/internal/qs/types.d.ts +57 -0
  135. package/internal/qs/types.d.ts.map +1 -0
  136. package/internal/qs/types.js +3 -0
  137. package/internal/qs/types.js.map +1 -0
  138. package/internal/qs/types.mjs +2 -0
  139. package/internal/qs/types.mjs.map +1 -0
  140. package/internal/qs/utils.d.mts +15 -0
  141. package/internal/qs/utils.d.mts.map +1 -0
  142. package/internal/qs/utils.d.ts +15 -0
  143. package/internal/qs/utils.d.ts.map +1 -0
  144. package/internal/qs/utils.js +230 -0
  145. package/internal/qs/utils.js.map +1 -0
  146. package/internal/qs/utils.mjs +217 -0
  147. package/internal/qs/utils.mjs.map +1 -0
  148. package/internal/request-options.d.mts +79 -0
  149. package/internal/request-options.d.mts.map +1 -0
  150. package/internal/request-options.d.ts +79 -0
  151. package/internal/request-options.d.ts.map +1 -0
  152. package/internal/request-options.js +14 -0
  153. package/internal/request-options.js.map +1 -0
  154. package/internal/request-options.mjs +10 -0
  155. package/internal/request-options.mjs.map +1 -0
  156. package/internal/shim-types.d.mts +17 -0
  157. package/internal/shim-types.d.mts.map +1 -0
  158. package/internal/shim-types.d.ts +17 -0
  159. package/internal/shim-types.d.ts.map +1 -0
  160. package/internal/shim-types.js +4 -0
  161. package/internal/shim-types.js.map +1 -0
  162. package/internal/shim-types.mjs +3 -0
  163. package/internal/shim-types.mjs.map +1 -0
  164. package/internal/shims.d.mts +20 -0
  165. package/internal/shims.d.mts.map +1 -0
  166. package/internal/shims.d.ts +20 -0
  167. package/internal/shims.d.ts.map +1 -0
  168. package/internal/shims.js +92 -0
  169. package/internal/shims.js.map +1 -0
  170. package/internal/shims.mjs +85 -0
  171. package/internal/shims.mjs.map +1 -0
  172. package/internal/to-file.d.mts +45 -0
  173. package/internal/to-file.d.mts.map +1 -0
  174. package/internal/to-file.d.ts +45 -0
  175. package/internal/to-file.d.ts.map +1 -0
  176. package/internal/to-file.js +91 -0
  177. package/internal/to-file.js.map +1 -0
  178. package/internal/to-file.mjs +88 -0
  179. package/internal/to-file.mjs.map +1 -0
  180. package/internal/tslib.js +81 -0
  181. package/internal/tslib.mjs +17 -0
  182. package/internal/types.d.mts +69 -0
  183. package/internal/types.d.mts.map +1 -0
  184. package/internal/types.d.ts +69 -0
  185. package/internal/types.d.ts.map +1 -0
  186. package/internal/types.js +4 -0
  187. package/internal/types.js.map +1 -0
  188. package/internal/types.mjs +3 -0
  189. package/internal/types.mjs.map +1 -0
  190. package/internal/uploads.d.mts +42 -0
  191. package/internal/uploads.d.mts.map +1 -0
  192. package/internal/uploads.d.ts +42 -0
  193. package/internal/uploads.d.ts.map +1 -0
  194. package/internal/uploads.js +141 -0
  195. package/internal/uploads.js.map +1 -0
  196. package/internal/uploads.mjs +131 -0
  197. package/internal/uploads.mjs.map +1 -0
  198. package/internal/utils/base64.d.mts +3 -0
  199. package/internal/utils/base64.d.mts.map +1 -0
  200. package/internal/utils/base64.d.ts +3 -0
  201. package/internal/utils/base64.d.ts.map +1 -0
  202. package/internal/utils/base64.js +38 -0
  203. package/internal/utils/base64.js.map +1 -0
  204. package/internal/utils/base64.mjs +33 -0
  205. package/internal/utils/base64.mjs.map +1 -0
  206. package/internal/utils/bytes.d.mts +4 -0
  207. package/internal/utils/bytes.d.mts.map +1 -0
  208. package/internal/utils/bytes.d.ts +4 -0
  209. package/internal/utils/bytes.d.ts.map +1 -0
  210. package/internal/utils/bytes.js +31 -0
  211. package/internal/utils/bytes.js.map +1 -0
  212. package/internal/utils/bytes.mjs +26 -0
  213. package/internal/utils/bytes.mjs.map +1 -0
  214. package/internal/utils/env.d.mts +9 -0
  215. package/internal/utils/env.d.mts.map +1 -0
  216. package/internal/utils/env.d.ts +9 -0
  217. package/internal/utils/env.d.ts.map +1 -0
  218. package/internal/utils/env.js +22 -0
  219. package/internal/utils/env.js.map +1 -0
  220. package/internal/utils/env.mjs +18 -0
  221. package/internal/utils/env.mjs.map +1 -0
  222. package/internal/utils/log.d.mts +37 -0
  223. package/internal/utils/log.d.mts.map +1 -0
  224. package/internal/utils/log.d.ts +37 -0
  225. package/internal/utils/log.d.ts.map +1 -0
  226. package/internal/utils/log.js +86 -0
  227. package/internal/utils/log.js.map +1 -0
  228. package/internal/utils/log.mjs +80 -0
  229. package/internal/utils/log.mjs.map +1 -0
  230. package/internal/utils/path.d.mts +15 -0
  231. package/internal/utils/path.d.mts.map +1 -0
  232. package/internal/utils/path.d.ts +15 -0
  233. package/internal/utils/path.d.ts.map +1 -0
  234. package/internal/utils/path.js +79 -0
  235. package/internal/utils/path.js.map +1 -0
  236. package/internal/utils/path.mjs +74 -0
  237. package/internal/utils/path.mjs.map +1 -0
  238. package/internal/utils/query.d.mts +2 -0
  239. package/internal/utils/query.d.mts.map +1 -0
  240. package/internal/utils/query.d.ts +2 -0
  241. package/internal/utils/query.d.ts.map +1 -0
  242. package/internal/utils/query.js +10 -0
  243. package/internal/utils/query.js.map +1 -0
  244. package/internal/utils/query.mjs +6 -0
  245. package/internal/utils/query.mjs.map +1 -0
  246. package/internal/utils/sleep.d.mts +2 -0
  247. package/internal/utils/sleep.d.mts.map +1 -0
  248. package/internal/utils/sleep.d.ts +2 -0
  249. package/internal/utils/sleep.d.ts.map +1 -0
  250. package/internal/utils/sleep.js +7 -0
  251. package/internal/utils/sleep.js.map +1 -0
  252. package/internal/utils/sleep.mjs +3 -0
  253. package/internal/utils/sleep.mjs.map +1 -0
  254. package/internal/utils/uuid.d.mts +5 -0
  255. package/internal/utils/uuid.d.mts.map +1 -0
  256. package/internal/utils/uuid.d.ts +5 -0
  257. package/internal/utils/uuid.d.ts.map +1 -0
  258. package/internal/utils/uuid.js +19 -0
  259. package/internal/utils/uuid.js.map +1 -0
  260. package/internal/utils/uuid.mjs +15 -0
  261. package/internal/utils/uuid.mjs.map +1 -0
  262. package/internal/utils/values.d.mts +18 -0
  263. package/internal/utils/values.d.mts.map +1 -0
  264. package/internal/utils/values.d.ts +18 -0
  265. package/internal/utils/values.d.ts.map +1 -0
  266. package/internal/utils/values.js +112 -0
  267. package/internal/utils/values.js.map +1 -0
  268. package/internal/utils/values.mjs +94 -0
  269. package/internal/utils/values.mjs.map +1 -0
  270. package/internal/utils.d.mts +8 -0
  271. package/internal/utils.d.mts.map +1 -0
  272. package/internal/utils.d.ts +8 -0
  273. package/internal/utils.d.ts.map +1 -0
  274. package/internal/utils.js +12 -0
  275. package/internal/utils.js.map +1 -0
  276. package/internal/utils.mjs +9 -0
  277. package/internal/utils.mjs.map +1 -0
  278. package/lib/dx.d.mts +96 -0
  279. package/lib/dx.d.mts.map +1 -0
  280. package/lib/dx.d.ts +96 -0
  281. package/lib/dx.d.ts.map +1 -0
  282. package/lib/dx.js +239 -0
  283. package/lib/dx.js.map +1 -0
  284. package/lib/dx.mjs +235 -0
  285. package/lib/dx.mjs.map +1 -0
  286. package/package.json +144 -58
  287. package/resource.d.mts +2 -0
  288. package/resource.d.mts.map +1 -0
  289. package/resource.d.ts +2 -0
  290. package/resource.d.ts.map +1 -0
  291. package/resource.js +6 -0
  292. package/resource.js.map +1 -0
  293. package/resource.mjs +2 -0
  294. package/resource.mjs.map +1 -0
  295. package/resources/collections.d.mts +289 -0
  296. package/resources/collections.d.mts.map +1 -0
  297. package/resources/collections.d.ts +289 -0
  298. package/resources/collections.d.ts.map +1 -0
  299. package/resources/collections.js +72 -0
  300. package/resources/collections.js.map +1 -0
  301. package/resources/collections.mjs +68 -0
  302. package/resources/collections.mjs.map +1 -0
  303. package/resources/connectors.d.mts +148 -0
  304. package/resources/connectors.d.mts.map +1 -0
  305. package/resources/connectors.d.ts +148 -0
  306. package/resources/connectors.d.ts.map +1 -0
  307. package/resources/connectors.js +50 -0
  308. package/resources/connectors.js.map +1 -0
  309. package/resources/connectors.mjs +46 -0
  310. package/resources/connectors.mjs.map +1 -0
  311. package/resources/index.d.mts +6 -0
  312. package/resources/index.d.mts.map +1 -0
  313. package/resources/index.d.ts +6 -0
  314. package/resources/index.d.ts.map +1 -0
  315. package/resources/index.js +13 -0
  316. package/resources/index.js.map +1 -0
  317. package/resources/index.mjs +6 -0
  318. package/resources/index.mjs.map +1 -0
  319. package/resources/memories.d.mts +1737 -0
  320. package/resources/memories.d.mts.map +1 -0
  321. package/resources/memories.d.ts +1737 -0
  322. package/resources/memories.d.ts.map +1 -0
  323. package/resources/memories.js +157 -0
  324. package/resources/memories.js.map +1 -0
  325. package/resources/memories.mjs +153 -0
  326. package/resources/memories.mjs.map +1 -0
  327. package/resources/snapshots.d.mts +281 -0
  328. package/resources/snapshots.d.mts.map +1 -0
  329. package/resources/snapshots.d.ts +281 -0
  330. package/resources/snapshots.d.ts.map +1 -0
  331. package/resources/snapshots.js +22 -0
  332. package/resources/snapshots.js.map +1 -0
  333. package/resources/snapshots.mjs +18 -0
  334. package/resources/snapshots.mjs.map +1 -0
  335. package/resources/top-level.d.mts +14 -0
  336. package/resources/top-level.d.mts.map +1 -0
  337. package/resources/top-level.d.ts +14 -0
  338. package/resources/top-level.d.ts.map +1 -0
  339. package/resources/top-level.js +4 -0
  340. package/resources/top-level.js.map +1 -0
  341. package/resources/top-level.mjs +3 -0
  342. package/resources/top-level.mjs.map +1 -0
  343. package/resources.d.mts +2 -0
  344. package/resources.d.mts.map +1 -0
  345. package/resources.d.ts +2 -0
  346. package/resources.d.ts.map +1 -0
  347. package/resources.js +5 -0
  348. package/resources.js.map +1 -0
  349. package/resources.mjs +2 -0
  350. package/resources.mjs.map +1 -0
  351. package/src/api-promise.ts +2 -0
  352. package/src/client.ts +892 -0
  353. package/src/core/README.md +3 -0
  354. package/src/core/api-promise.ts +92 -0
  355. package/src/core/error.ts +130 -0
  356. package/src/core/resource.ts +11 -0
  357. package/src/core/uploads.ts +2 -0
  358. package/src/error.ts +2 -0
  359. package/src/index.ts +36 -0
  360. package/src/internal/README.md +3 -0
  361. package/src/internal/builtin-types.ts +93 -0
  362. package/src/internal/detect-platform.ts +196 -0
  363. package/src/internal/errors.ts +33 -0
  364. package/src/internal/headers.ts +97 -0
  365. package/src/internal/parse.ts +56 -0
  366. package/src/internal/qs/LICENSE.md +13 -0
  367. package/src/internal/qs/README.md +3 -0
  368. package/src/internal/qs/formats.ts +10 -0
  369. package/src/internal/qs/index.ts +13 -0
  370. package/src/internal/qs/stringify.ts +385 -0
  371. package/src/internal/qs/types.ts +71 -0
  372. package/src/internal/qs/utils.ts +265 -0
  373. package/src/internal/request-options.ts +93 -0
  374. package/src/internal/shim-types.ts +26 -0
  375. package/src/internal/shims.ts +107 -0
  376. package/src/internal/to-file.ts +154 -0
  377. package/src/internal/types.ts +95 -0
  378. package/src/internal/uploads.ts +187 -0
  379. package/src/internal/utils/base64.ts +40 -0
  380. package/src/internal/utils/bytes.ts +32 -0
  381. package/src/internal/utils/env.ts +18 -0
  382. package/src/internal/utils/log.ts +127 -0
  383. package/src/internal/utils/path.ts +88 -0
  384. package/src/internal/utils/query.ts +7 -0
  385. package/src/internal/utils/sleep.ts +3 -0
  386. package/src/internal/utils/uuid.ts +17 -0
  387. package/src/internal/utils/values.ts +105 -0
  388. package/src/internal/utils.ts +9 -0
  389. package/src/lib/.keep +4 -0
  390. package/src/lib/dx.ts +459 -0
  391. package/src/resource.ts +2 -0
  392. package/src/resources/collections.ts +474 -0
  393. package/src/resources/connectors.ts +236 -0
  394. package/src/resources/index.ts +56 -0
  395. package/src/resources/memories.ts +2409 -0
  396. package/src/resources/snapshots.ts +387 -0
  397. package/src/resources/top-level.ts +19 -0
  398. package/src/resources.ts +1 -0
  399. package/src/tsconfig.json +11 -0
  400. package/src/uploads.ts +2 -0
  401. package/src/version.ts +1 -0
  402. package/uploads.d.mts +2 -0
  403. package/uploads.d.mts.map +1 -0
  404. package/uploads.d.ts +2 -0
  405. package/uploads.d.ts.map +1 -0
  406. package/uploads.js +6 -0
  407. package/uploads.js.map +1 -0
  408. package/uploads.mjs +2 -0
  409. package/uploads.mjs.map +1 -0
  410. package/version.d.mts +2 -0
  411. package/version.d.mts.map +1 -0
  412. package/version.d.ts +2 -0
  413. package/version.d.ts.map +1 -0
  414. package/version.js +5 -0
  415. package/version.js.map +1 -0
  416. package/version.mjs +2 -0
  417. package/version.mjs.map +1 -0
  418. package/dist/index.d.mts +0 -557
  419. package/dist/index.d.ts +0 -557
  420. package/dist/index.js +0 -1282
  421. package/dist/index.js.map +0 -1
  422. package/dist/index.mjs +0 -1267
  423. package/dist/index.mjs.map +0 -1
@@ -0,0 +1,1737 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { RequestOptions } from "../internal/request-options.js";
4
+ export declare class Memories extends APIResource {
5
+ /**
6
+ * Create a new memory (conversation or document) using clean JSON body.
7
+ *
8
+ * - Use `collection_id` (UUID)
9
+ * - `engram_type` is optional and inferred from payload shape:
10
+ * - If `messages` present -> conversation
11
+ * - Otherwise -> document
12
+ * - For conversations: provide `messages` array
13
+ * - For documents: provide `raw_text` or `chunks`
14
+ * - Use `snapshot` for device-memory mode (mutually exclusive with collection_id)
15
+ */
16
+ create(body: MemoryCreateParams, options?: RequestOptions): APIPromise<MemoryCreateResponse>;
17
+ /**
18
+ * Retrieves detailed information about a specific engram by its ID.
19
+ *
20
+ * This endpoint returns the engram's metadata, status, and system information. It
21
+ * does not return the engram's content - use the `/engrams/{id}/download` endpoint
22
+ * for that.
23
+ *
24
+ * Users can only retrieve engrams they own or have access to through collections.
25
+ * Superusers can retrieve any engram.
26
+ */
27
+ retrieve(id: string, options?: RequestOptions): APIPromise<MemoryRetrieveResponse>;
28
+ /**
29
+ * Update memory-level properties including name, metadata, and collection
30
+ * associations.
31
+ *
32
+ * This endpoint allows updating properties of an entire memory (document or
33
+ * conversation) without modifying its content:
34
+ *
35
+ * - **name**: Updates the authoritative engram title
36
+ * - **metadata**: Can replace or merge with existing metadata
37
+ * - **collection_ids**: Updates authoritative engram collection associations
38
+ *
39
+ * Users can only update memories they own or have access to through collections.
40
+ * At least one collection association must be maintained.
41
+ *
42
+ * If collection_id is provided and the engram is shared across collections, a
43
+ * copy-on-write will be performed to create a collection-specific copy before
44
+ * modification.
45
+ */
46
+ update(id: string, params: MemoryUpdateParams, options?: RequestOptions): APIPromise<MemoryUpdateResponse>;
47
+ /**
48
+ * Returns a paginated list of engrams the authenticated user has access to.
49
+ *
50
+ * Results can be filtered by providing specific engram IDs or collection IDs.
51
+ * Regular users will only see engrams they own or have access to through
52
+ * collections. Superusers can see all engrams.
53
+ *
54
+ * The engrams are returned in order of last modification, with most recent first.
55
+ * The response includes the engram's text field if available.
56
+ */
57
+ list(query?: MemoryListParams | null | undefined, options?: RequestOptions): APIPromise<MemoryListResponse>;
58
+ /**
59
+ * Delete a specific engram with graph awareness. All chunks corresponding to the
60
+ * engram are deleted, and graph components (entities/relationships) are updated or
61
+ * deleted based on remaining chunk references from other engrams.
62
+ *
63
+ * This method now properly handles graph components and maintains graph integrity
64
+ * for search operations.
65
+ */
66
+ delete(id: string, options?: RequestOptions): APIPromise<MemoryDeleteResponse>;
67
+ /**
68
+ * Append content to an existing engram.
69
+ *
70
+ * **For conversation engrams:**
71
+ *
72
+ * - Provide `messages` array with content, role, and optional metadata
73
+ * - Works like `/conversations/{id}/messages` endpoint
74
+ *
75
+ * **For document engrams:**
76
+ *
77
+ * - Provide either `raw_text` or `chunks` to append additional content
78
+ * - Content will be processed and added to the engram
79
+ */
80
+ append(id: string, body: MemoryAppendParams, options?: RequestOptions): APIPromise<MemoryAppendResponse>;
81
+ /**
82
+ * Get a presigned URL for uploading large files directly to S3.
83
+ *
84
+ * Use this for files larger than 5MB that cannot be sent inline as base64. After
85
+ * uploading, reference the file in memory creation using S3FileReference.
86
+ *
87
+ * Args: filename: Original filename (e.g., "image.jpg") content_type: MIME type
88
+ * (e.g., "image/jpeg", "application/pdf") file_size: Expected file size in bytes
89
+ * (max 100MB)
90
+ *
91
+ * Returns: dict with: - upload_url: Presigned URL for PUT request (expires in 1
92
+ * hour) - upload_headers: Headers that must be sent with the presigned PUT
93
+ * request - s3_key: The S3 key to reference in memory creation - bucket: S3 bucket
94
+ * name - expires_in: Seconds until URL expires - max_size: Maximum allowed file
95
+ * size
96
+ */
97
+ createUpload(params: MemoryCreateUploadParams, options?: RequestOptions): APIPromise<MemoryCreateUploadResponse>;
98
+ /**
99
+ * Delete one or more engrams.
100
+ *
101
+ * This endpoint efficiently handles both single and batch deletions. When multiple
102
+ * IDs are provided, it uses optimized batch operations.
103
+ *
104
+ * Args: ids: Either a single UUID or a list of UUIDs to delete
105
+ *
106
+ * Returns: For single deletion: boolean success response For batch deletion:
107
+ * detailed results with successful and failed deletions
108
+ */
109
+ deleteMany(params: MemoryDeleteManyParams, options?: RequestOptions): APIPromise<MemoryDeleteManyResponse>;
110
+ /**
111
+ * Delete a file from S3 that was uploaded via a presigned URL. Verifies the caller
112
+ * owns the file via S3 object metadata.
113
+ */
114
+ deleteUpload(params: MemoryDeleteUploadParams, options?: RequestOptions): APIPromise<MemoryDeleteUploadResponse>;
115
+ /**
116
+ * Perform a search query across your memories.
117
+ *
118
+ * **Standard mode** (collection_ids or readable-scope search): returns
119
+ * hierarchical MemoryRecall with semantics, episodes, procedures, and sources.
120
+ *
121
+ * **Snapshot mode** (snapshot field): returns graph-search results with {entities,
122
+ * relationships} from stateless in-memory traversal.
123
+ */
124
+ search(body: MemorySearchParams, options?: RequestOptions): APIPromise<MemorySearchResponse>;
125
+ }
126
+ /**
127
+ * Create-memory success response. Standard memory ingestion returns an accepted
128
+ * async-ingestion envelope; snapshot mode returns the updated snapshot
129
+ * synchronously.
130
+ */
131
+ export type MemoryCreateResponse = MemoryCreateResponse.NebulaResultsMemoryCreateAcceptedResponse | MemoryCreateResponse.NebulaResultsSnapshotMutationResult;
132
+ export declare namespace MemoryCreateResponse {
133
+ interface NebulaResultsMemoryCreateAcceptedResponse {
134
+ /**
135
+ * Accepted-response envelope for async memory ingestion.
136
+ */
137
+ results: NebulaResultsMemoryCreateAcceptedResponse.Results;
138
+ }
139
+ namespace NebulaResultsMemoryCreateAcceptedResponse {
140
+ /**
141
+ * Accepted-response envelope for async memory ingestion.
142
+ */
143
+ interface Results {
144
+ id: string;
145
+ message: string;
146
+ engram_id?: string | null;
147
+ memory_id?: string | null;
148
+ status?: 'parsing' | 'processing' | 'queued' | null;
149
+ task_id?: string | null;
150
+ }
151
+ }
152
+ interface NebulaResultsSnapshotMutationResult {
153
+ /**
154
+ * Updated snapshot returned by snapshot-mode memory writes.
155
+ */
156
+ results: NebulaResultsSnapshotMutationResult.Results;
157
+ }
158
+ namespace NebulaResultsSnapshotMutationResult {
159
+ /**
160
+ * Updated snapshot returned by snapshot-mode memory writes.
161
+ */
162
+ interface Results {
163
+ /**
164
+ * Portable full snapshot owned by the client.
165
+ */
166
+ snapshot: Results.Snapshot;
167
+ }
168
+ namespace Results {
169
+ /**
170
+ * Portable full snapshot owned by the client.
171
+ */
172
+ interface Snapshot {
173
+ collection_id: string;
174
+ root_hash: string;
175
+ created_at?: string;
176
+ format_version?: number;
177
+ generation?: number;
178
+ /**
179
+ * A complete graph payload or a context subgraph payload.
180
+ */
181
+ graph?: Snapshot.Graph;
182
+ }
183
+ namespace Snapshot {
184
+ /**
185
+ * A complete graph payload or a context subgraph payload.
186
+ */
187
+ interface Graph {
188
+ entities?: Array<Graph.Entity>;
189
+ /**
190
+ * A positionally-aligned masked embedding matrix.
191
+ */
192
+ entity_description_embeddings?: Graph.EntityDescriptionEmbeddings;
193
+ /**
194
+ * A positionally-aligned masked embedding matrix.
195
+ */
196
+ relationship_description_embeddings?: Graph.RelationshipDescriptionEmbeddings;
197
+ /**
198
+ * A positionally-aligned masked embedding matrix.
199
+ */
200
+ relationship_relation_embeddings?: Graph.RelationshipRelationEmbeddings;
201
+ relationships?: Array<Graph.Relationship>;
202
+ }
203
+ namespace Graph {
204
+ /**
205
+ * Canonical entity record used in snapshots, WAL ops, and segments.
206
+ */
207
+ interface Entity {
208
+ id: string;
209
+ created_at: string;
210
+ engram_id: string;
211
+ name: string;
212
+ updated_at: string;
213
+ category?: string | null;
214
+ chunk_ids?: Array<string>;
215
+ collection_id?: string;
216
+ description?: string | null;
217
+ fts_terms?: {
218
+ [key: string]: number;
219
+ } | null;
220
+ metadata?: {
221
+ [key: string]: unknown;
222
+ };
223
+ relationship_count?: number;
224
+ }
225
+ /**
226
+ * A positionally-aligned masked embedding matrix.
227
+ */
228
+ interface EntityDescriptionEmbeddings {
229
+ dim?: number;
230
+ encoding?: 'npy-base64';
231
+ mask_b64?: string;
232
+ values_b64?: string;
233
+ }
234
+ /**
235
+ * A positionally-aligned masked embedding matrix.
236
+ */
237
+ interface RelationshipDescriptionEmbeddings {
238
+ dim?: number;
239
+ encoding?: 'npy-base64';
240
+ mask_b64?: string;
241
+ values_b64?: string;
242
+ }
243
+ /**
244
+ * A positionally-aligned masked embedding matrix.
245
+ */
246
+ interface RelationshipRelationEmbeddings {
247
+ dim?: number;
248
+ encoding?: 'npy-base64';
249
+ mask_b64?: string;
250
+ values_b64?: string;
251
+ }
252
+ /**
253
+ * Canonical relationship record used in snapshots, WAL ops, and segments.
254
+ */
255
+ interface Relationship {
256
+ id: string;
257
+ created_at: string;
258
+ object_id: string;
259
+ subject_id: string;
260
+ updated_at: string;
261
+ category?: string | null;
262
+ chunk_ids?: Array<string>;
263
+ collection_id?: string;
264
+ description?: string | null;
265
+ engram_id?: string | null;
266
+ inference_metadata?: {
267
+ [key: string]: unknown;
268
+ } | null;
269
+ metadata?: {
270
+ [key: string]: unknown;
271
+ };
272
+ object?: string | null;
273
+ predicate?: string;
274
+ relationship_type?: string | null;
275
+ subject?: string | null;
276
+ temporal_precision?: string | null;
277
+ valid_span?: {
278
+ [key: string]: unknown;
279
+ } | null;
280
+ weight?: number | null;
281
+ }
282
+ }
283
+ }
284
+ }
285
+ }
286
+ }
287
+ export interface MemoryRetrieveResponse {
288
+ /**
289
+ * Base class for engram information handling.
290
+ */
291
+ results: MemoryRetrieveResponse.Results;
292
+ }
293
+ export declare namespace MemoryRetrieveResponse {
294
+ /**
295
+ * Base class for engram information handling.
296
+ */
297
+ interface Results {
298
+ id: string;
299
+ collection_ids: Array<string>;
300
+ /**
301
+ * Types of file formats that can be stored as engrams.
302
+ */
303
+ document_type: 'mp3' | 'csv' | 'eml' | 'msg' | 'p7s' | 'epub' | 'xls' | 'xlsx' | 'html' | 'htm' | 'bmp' | 'heic' | 'jpeg' | 'png' | 'tiff' | 'jpg' | 'svg' | 'md' | 'org' | 'odt' | 'pdf' | 'txt' | 'json' | 'ppt' | 'pptx' | 'rst' | 'rtf' | 'tsv' | 'gif' | 'doc' | 'docx' | 'py' | 'js' | 'ts' | 'css';
304
+ /**
305
+ * Types of engrams - broader categories that include documents and conversations.
306
+ */
307
+ engram_type: 'document' | 'conversation';
308
+ metadata: {
309
+ [key: string]: unknown;
310
+ };
311
+ owner_id: string;
312
+ chunks?: Array<unknown> | null;
313
+ created_at?: string | null;
314
+ /**
315
+ * Status of graph creation per document.
316
+ */
317
+ extraction_status?: 'pending' | 'processing' | 'success' | 'failed';
318
+ ingestion_attempt_number?: number | null;
319
+ /**
320
+ * Status of document processing.
321
+ */
322
+ ingestion_status?: 'pending' | 'parsing' | 'extracting' | 'chunking' | 'embedding' | 'augmenting' | 'storing' | 'failed' | 'success';
323
+ merkle_root?: string | null;
324
+ search_ready_seq?: number | null;
325
+ size_in_bytes?: number | null;
326
+ text?: string | null;
327
+ title?: string | null;
328
+ total_tokens?: number | null;
329
+ updated_at?: string | null;
330
+ version?: string | null;
331
+ workflow_run_id?: string | null;
332
+ }
333
+ }
334
+ export interface MemoryUpdateResponse {
335
+ /**
336
+ * Base class for engram information handling.
337
+ */
338
+ results: MemoryUpdateResponse.Results;
339
+ }
340
+ export declare namespace MemoryUpdateResponse {
341
+ /**
342
+ * Base class for engram information handling.
343
+ */
344
+ interface Results {
345
+ id: string;
346
+ collection_ids: Array<string>;
347
+ /**
348
+ * Types of file formats that can be stored as engrams.
349
+ */
350
+ document_type: 'mp3' | 'csv' | 'eml' | 'msg' | 'p7s' | 'epub' | 'xls' | 'xlsx' | 'html' | 'htm' | 'bmp' | 'heic' | 'jpeg' | 'png' | 'tiff' | 'jpg' | 'svg' | 'md' | 'org' | 'odt' | 'pdf' | 'txt' | 'json' | 'ppt' | 'pptx' | 'rst' | 'rtf' | 'tsv' | 'gif' | 'doc' | 'docx' | 'py' | 'js' | 'ts' | 'css';
351
+ /**
352
+ * Types of engrams - broader categories that include documents and conversations.
353
+ */
354
+ engram_type: 'document' | 'conversation';
355
+ metadata: {
356
+ [key: string]: unknown;
357
+ };
358
+ owner_id: string;
359
+ chunks?: Array<unknown> | null;
360
+ created_at?: string | null;
361
+ /**
362
+ * Status of graph creation per document.
363
+ */
364
+ extraction_status?: 'pending' | 'processing' | 'success' | 'failed';
365
+ ingestion_attempt_number?: number | null;
366
+ /**
367
+ * Status of document processing.
368
+ */
369
+ ingestion_status?: 'pending' | 'parsing' | 'extracting' | 'chunking' | 'embedding' | 'augmenting' | 'storing' | 'failed' | 'success';
370
+ merkle_root?: string | null;
371
+ search_ready_seq?: number | null;
372
+ size_in_bytes?: number | null;
373
+ text?: string | null;
374
+ title?: string | null;
375
+ total_tokens?: number | null;
376
+ updated_at?: string | null;
377
+ version?: string | null;
378
+ workflow_run_id?: string | null;
379
+ }
380
+ }
381
+ export interface MemoryListResponse {
382
+ results: Array<MemoryListResponse.Result>;
383
+ total_entries: number;
384
+ }
385
+ export declare namespace MemoryListResponse {
386
+ /**
387
+ * Base class for engram information handling.
388
+ */
389
+ interface Result {
390
+ id: string;
391
+ collection_ids: Array<string>;
392
+ /**
393
+ * Types of file formats that can be stored as engrams.
394
+ */
395
+ document_type: 'mp3' | 'csv' | 'eml' | 'msg' | 'p7s' | 'epub' | 'xls' | 'xlsx' | 'html' | 'htm' | 'bmp' | 'heic' | 'jpeg' | 'png' | 'tiff' | 'jpg' | 'svg' | 'md' | 'org' | 'odt' | 'pdf' | 'txt' | 'json' | 'ppt' | 'pptx' | 'rst' | 'rtf' | 'tsv' | 'gif' | 'doc' | 'docx' | 'py' | 'js' | 'ts' | 'css';
396
+ /**
397
+ * Types of engrams - broader categories that include documents and conversations.
398
+ */
399
+ engram_type: 'document' | 'conversation';
400
+ metadata: {
401
+ [key: string]: unknown;
402
+ };
403
+ owner_id: string;
404
+ chunks?: Array<unknown> | null;
405
+ created_at?: string | null;
406
+ /**
407
+ * Status of graph creation per document.
408
+ */
409
+ extraction_status?: 'pending' | 'processing' | 'success' | 'failed';
410
+ ingestion_attempt_number?: number | null;
411
+ /**
412
+ * Status of document processing.
413
+ */
414
+ ingestion_status?: 'pending' | 'parsing' | 'extracting' | 'chunking' | 'embedding' | 'augmenting' | 'storing' | 'failed' | 'success';
415
+ merkle_root?: string | null;
416
+ search_ready_seq?: number | null;
417
+ size_in_bytes?: number | null;
418
+ text?: string | null;
419
+ title?: string | null;
420
+ total_tokens?: number | null;
421
+ updated_at?: string | null;
422
+ version?: string | null;
423
+ workflow_run_id?: string | null;
424
+ }
425
+ }
426
+ export interface MemoryDeleteResponse {
427
+ results: MemoryDeleteResponse.Results;
428
+ }
429
+ export declare namespace MemoryDeleteResponse {
430
+ interface Results {
431
+ success: boolean;
432
+ }
433
+ }
434
+ export type MemoryAppendResponse = MemoryAppendResponse.NebulaResultsAppendMemoryResponse | MemoryAppendResponse.NebulaResultsIngestionResponse;
435
+ export declare namespace MemoryAppendResponse {
436
+ interface NebulaResultsAppendMemoryResponse {
437
+ results: NebulaResultsAppendMemoryResponse.Results;
438
+ }
439
+ namespace NebulaResultsAppendMemoryResponse {
440
+ interface Results {
441
+ id: string;
442
+ message: Results.Message;
443
+ appended_messages?: Array<Results.AppendedMessage>;
444
+ metadata?: {
445
+ [key: string]: unknown;
446
+ };
447
+ }
448
+ namespace Results {
449
+ interface Message {
450
+ role: 'system' | 'user' | 'assistant' | 'function' | 'tool' | (string & {});
451
+ content?: unknown;
452
+ function_call?: {
453
+ [key: string]: unknown;
454
+ } | null;
455
+ image_data?: {
456
+ [key: string]: string;
457
+ } | null;
458
+ image_url?: string | null;
459
+ metadata?: {
460
+ [key: string]: unknown;
461
+ } | null;
462
+ name?: string | null;
463
+ structured_content?: Array<{
464
+ [key: string]: unknown;
465
+ }> | null;
466
+ tool_call_id?: string | null;
467
+ tool_calls?: Array<{
468
+ [key: string]: unknown;
469
+ }> | null;
470
+ }
471
+ interface AppendedMessage {
472
+ message_id: string;
473
+ chunk_ids?: Array<string>;
474
+ }
475
+ }
476
+ }
477
+ interface NebulaResultsIngestionResponse {
478
+ results: NebulaResultsIngestionResponse.Results;
479
+ }
480
+ namespace NebulaResultsIngestionResponse {
481
+ interface Results {
482
+ /**
483
+ * The ID of the engram that was ingested.
484
+ */
485
+ engram_id: string;
486
+ /**
487
+ * A message describing the result of the ingestion request.
488
+ */
489
+ message: string;
490
+ /**
491
+ * The task ID of the ingestion request.
492
+ */
493
+ task_id?: string | null;
494
+ }
495
+ }
496
+ }
497
+ export interface MemoryCreateUploadResponse {
498
+ results: MemoryCreateUploadResponse.Results;
499
+ }
500
+ export declare namespace MemoryCreateUploadResponse {
501
+ interface Results {
502
+ bucket: string;
503
+ download_url: string;
504
+ expires_in: number;
505
+ max_size: number;
506
+ s3_key: string;
507
+ upload_headers: {
508
+ [key: string]: string;
509
+ };
510
+ upload_url: string;
511
+ }
512
+ }
513
+ export type MemoryDeleteManyResponse = MemoryDeleteManyResponse.NebulaResultsGenericBooleanResponse | MemoryDeleteManyResponse.BatchDeleteResponse;
514
+ export declare namespace MemoryDeleteManyResponse {
515
+ interface NebulaResultsGenericBooleanResponse {
516
+ results: NebulaResultsGenericBooleanResponse.Results;
517
+ }
518
+ namespace NebulaResultsGenericBooleanResponse {
519
+ interface Results {
520
+ success: boolean;
521
+ }
522
+ }
523
+ interface BatchDeleteResponse {
524
+ message: string;
525
+ results: BatchDeleteResponse.Results;
526
+ }
527
+ namespace BatchDeleteResponse {
528
+ interface Results {
529
+ failed: Array<{
530
+ [key: string]: unknown;
531
+ }>;
532
+ successful: Array<string>;
533
+ summary: {
534
+ [key: string]: unknown;
535
+ };
536
+ }
537
+ }
538
+ }
539
+ export interface MemoryDeleteUploadResponse {
540
+ results: MemoryDeleteUploadResponse.Results;
541
+ }
542
+ export declare namespace MemoryDeleteUploadResponse {
543
+ interface Results {
544
+ message: string;
545
+ id?: string | null;
546
+ memory_id?: string | null;
547
+ }
548
+ }
549
+ export type MemorySearchResponse = MemorySearchResponse.NebulaResultsCompactMemoryRecallResponse | MemorySearchResponse.NebulaResultsMemoryRecall | MemorySearchResponse.NebulaResultsSnapshotSearchResult;
550
+ export declare namespace MemorySearchResponse {
551
+ interface NebulaResultsCompactMemoryRecallResponse {
552
+ /**
553
+ * Default compact response from /v1/memories/search.
554
+ */
555
+ results: NebulaResultsCompactMemoryRecallResponse.Results;
556
+ }
557
+ namespace NebulaResultsCompactMemoryRecallResponse {
558
+ /**
559
+ * Default compact response from /v1/memories/search.
560
+ */
561
+ interface Results {
562
+ query: string;
563
+ episodic?: Array<{
564
+ [key: string]: unknown;
565
+ }>;
566
+ procedural?: Array<{
567
+ [key: string]: unknown;
568
+ }>;
569
+ semantic?: Array<{
570
+ [key: string]: unknown;
571
+ }>;
572
+ sources?: Array<{
573
+ [key: string]: unknown;
574
+ }>;
575
+ token_count?: number;
576
+ }
577
+ }
578
+ interface NebulaResultsMemoryRecall {
579
+ /**
580
+ * Hierarchical memory response - all layers, weighted by activation.
581
+ *
582
+ * This is the primary response type for conceptual memory retrieval. It contains
583
+ * all layers of the memory hierarchy:
584
+ *
585
+ * 1. **Entities (gestalt/schema layer)**: EntityProfiles that represent the
586
+ * conceptual understanding of activated entities.
587
+ *
588
+ * 2. **Semantics (semantic layer)**: Structured assertions (facts, inferences,
589
+ * tasks) scored by relevance and confidence.
590
+ *
591
+ * 3. **Episodes (temporal clusters)**: Episodic nodegroups that cluster temporally
592
+ * related facts and events.
593
+ *
594
+ * 4. **Sources (episodic layer)**: The raw source material that grounds the
595
+ * structured knowledge in actual moments/quotes.
596
+ */
597
+ results: NebulaResultsMemoryRecall.Results;
598
+ }
599
+ namespace NebulaResultsMemoryRecall {
600
+ /**
601
+ * Hierarchical memory response - all layers, weighted by activation.
602
+ *
603
+ * This is the primary response type for conceptual memory retrieval. It contains
604
+ * all layers of the memory hierarchy:
605
+ *
606
+ * 1. **Entities (gestalt/schema layer)**: EntityProfiles that represent the
607
+ * conceptual understanding of activated entities.
608
+ *
609
+ * 2. **Semantics (semantic layer)**: Structured assertions (facts, inferences,
610
+ * tasks) scored by relevance and confidence.
611
+ *
612
+ * 3. **Episodes (temporal clusters)**: Episodic nodegroups that cluster temporally
613
+ * related facts and events.
614
+ *
615
+ * 4. **Sources (episodic layer)**: The raw source material that grounds the
616
+ * structured knowledge in actual moments/quotes.
617
+ */
618
+ interface Results {
619
+ query: string;
620
+ entities?: Array<Results.Entity>;
621
+ episodic?: Array<Results.Episodic>;
622
+ inference_hints?: Array<Results.InferenceHint>;
623
+ procedural?: Array<Results.Procedural>;
624
+ semantic?: Array<Results.Semantic>;
625
+ sources?: Array<Results.Source>;
626
+ total_traversal_time_ms?: number | null;
627
+ }
628
+ namespace Results {
629
+ /**
630
+ * An entity activated during memory traversal with its profile.
631
+ *
632
+ * Represents a conceptual node in memory that was activated by the query. Contains
633
+ * the full EntityProfile (gestalt) filtered by relevance.
634
+ */
635
+ interface Entity {
636
+ id: string;
637
+ name: string;
638
+ activation_score?: number;
639
+ category?: string | null;
640
+ profile?: unknown;
641
+ }
642
+ /**
643
+ * An episodic nodegroup activated during memory traversal.
644
+ *
645
+ * Represents a cluster of temporally related facts/events discovered during graph
646
+ * traversal.
647
+ */
648
+ interface Episodic {
649
+ id: string;
650
+ name: string;
651
+ activation_score?: number;
652
+ category?: string;
653
+ description?: string | null;
654
+ entity_names?: Array<string>;
655
+ evidence_ids?: Array<string>;
656
+ member_semantic_ids?: Array<string>;
657
+ n_facts?: number;
658
+ status?: string | null;
659
+ t_last?: string | null;
660
+ t_start?: string | null;
661
+ }
662
+ /**
663
+ * A lightweight inference artifact returned alongside MemoryRecall.
664
+ *
665
+ * These are _not_ asserted facts. They are "evidence + weak hints" that may have
666
+ * influenced retrieval (e.g. query expansion) or may be useful for UI
667
+ * transparency.
668
+ */
669
+ interface InferenceHint {
670
+ object: string;
671
+ predicate: string;
672
+ term: string;
673
+ confidence?: number | null;
674
+ inference_metadata?: {
675
+ [key: string]: unknown;
676
+ } | null;
677
+ inferred?: boolean;
678
+ ledger_p_stable?: number | null;
679
+ ledger_p_true?: number | null;
680
+ ledger_p_use?: number | null;
681
+ metadata?: {
682
+ [key: string]: unknown;
683
+ } | null;
684
+ object_id?: string | null;
685
+ relationship_id?: string | null;
686
+ subject_id?: string | null;
687
+ usable_for_rewrite?: boolean;
688
+ used_for_rewrite?: boolean;
689
+ }
690
+ /**
691
+ * A procedure (user preference) activated during memory traversal.
692
+ *
693
+ * Procedures are prescriptive -- they describe what the user prefers, likes,
694
+ * dislikes, or habitually does. Distinct from facts which are descriptive
695
+ * assertions.
696
+ */
697
+ interface Procedural {
698
+ id: string;
699
+ statement: string;
700
+ activation_score?: number;
701
+ belief_kind?: string | null;
702
+ confidence?: number;
703
+ derivation_type?: string;
704
+ entity_id?: string | null;
705
+ entity_name?: string | null;
706
+ is_negated?: boolean;
707
+ metadata?: {
708
+ [key: string]: unknown;
709
+ } | null;
710
+ }
711
+ /**
712
+ * A semantic item activated during memory traversal.
713
+ *
714
+ * Represents a structured assertion (fact, inference, or task) that was found
715
+ * relevant to the query. Links back to its entity and source utterances for
716
+ * provenance.
717
+ */
718
+ interface Semantic {
719
+ id: string;
720
+ predicate: string;
721
+ subject: string;
722
+ value: string;
723
+ activation_score?: number;
724
+ belief_kind?: string | null;
725
+ category?: string;
726
+ corroboration_count?: number;
727
+ description?: string | null;
728
+ entity_id?: string | null;
729
+ entity_name?: string | null;
730
+ evidence_ids?: Array<string>;
731
+ evidence_refs?: Array<Semantic.EvidenceRef>;
732
+ extraction_confidence?: number;
733
+ is_current?: boolean | null;
734
+ reasoning?: string | null;
735
+ resolved_at?: string | null;
736
+ source_nodegroup_ids?: Array<string>;
737
+ stability_confidence?: number | null;
738
+ temporal_precision?: string | null;
739
+ temporal_validity?: unknown;
740
+ truth_confidence?: number | null;
741
+ use_confidence?: number | null;
742
+ }
743
+ namespace Semantic {
744
+ /**
745
+ * Tagged reference to a source of evidence.
746
+ */
747
+ interface EvidenceRef {
748
+ ref_type: 'chunk' | 'table_artifact';
749
+ artifact_id?: string | null;
750
+ chunk_id?: string | null;
751
+ collection_id?: string | null;
752
+ column_names?: Array<string> | null;
753
+ row_indices?: Array<number> | null;
754
+ table_name?: string | null;
755
+ }
756
+ }
757
+ /**
758
+ * A source that grounds facts in episodic memory.
759
+ *
760
+ * This is the raw source material that supports the structured knowledge. Provides
761
+ * the exact quotes and context for verification.
762
+ *
763
+ * `evidence_ref` carries typed provenance so the client can distinguish
764
+ * chunk-backed sources from table-artifact-backed sources (or future modalities)
765
+ * without parsing opaque metadata.
766
+ */
767
+ interface Source {
768
+ id: string;
769
+ text: string;
770
+ activation_score?: number;
771
+ display_name?: string | null;
772
+ engram_id?: string | null;
773
+ /**
774
+ * Tagged reference to a source of evidence.
775
+ */
776
+ evidence_ref?: Source.EvidenceRef | null;
777
+ metadata?: {
778
+ [key: string]: unknown;
779
+ } | null;
780
+ owner_id?: string | null;
781
+ page_number?: number | null;
782
+ section_path?: Array<string> | null;
783
+ source_role?: string | null;
784
+ speaker?: string | null;
785
+ speaker_id?: string | null;
786
+ structure_label?: string | null;
787
+ supporting_fact_ids?: Array<string>;
788
+ timestamp?: string | null;
789
+ }
790
+ namespace Source {
791
+ /**
792
+ * Tagged reference to a source of evidence.
793
+ */
794
+ interface EvidenceRef {
795
+ ref_type: 'chunk' | 'table_artifact';
796
+ artifact_id?: string | null;
797
+ chunk_id?: string | null;
798
+ collection_id?: string | null;
799
+ column_names?: Array<string> | null;
800
+ row_indices?: Array<number> | null;
801
+ table_name?: string | null;
802
+ }
803
+ }
804
+ }
805
+ }
806
+ interface NebulaResultsSnapshotSearchResult {
807
+ /**
808
+ * Stateless snapshot-search response shape.
809
+ */
810
+ results: NebulaResultsSnapshotSearchResult.Results;
811
+ }
812
+ namespace NebulaResultsSnapshotSearchResult {
813
+ /**
814
+ * Stateless snapshot-search response shape.
815
+ */
816
+ interface Results {
817
+ entities?: Array<Results.Entity>;
818
+ relationships?: Array<Results.Relationship>;
819
+ }
820
+ namespace Results {
821
+ interface Entity {
822
+ id: string;
823
+ name: string;
824
+ score: number;
825
+ category?: string | null;
826
+ description?: string | null;
827
+ }
828
+ interface Relationship {
829
+ id: string;
830
+ object_id: string;
831
+ predicate: string;
832
+ subject_id: string;
833
+ description?: string | null;
834
+ weight?: number | null;
835
+ }
836
+ }
837
+ }
838
+ }
839
+ export interface MemoryCreateParams {
840
+ /**
841
+ * Pre-chunked text for document type
842
+ */
843
+ chunks?: Array<string> | null;
844
+ /**
845
+ * Collection UUID (mutually exclusive with snapshot)
846
+ */
847
+ collection_id?: string | null;
848
+ /**
849
+ * Multimodal content parts (text, images, audio, documents) for document type.
850
+ */
851
+ content_parts?: Array<MemoryCreateParams.TextContentRequest | MemoryCreateParams.FileContentRequest | MemoryCreateParams.S3FileReferenceRequest> | null;
852
+ /**
853
+ * Batch content strings for snapshot mode
854
+ */
855
+ contents?: Array<string> | null;
856
+ /**
857
+ * Type of memory to create
858
+ */
859
+ engram_type?: 'document' | 'conversation';
860
+ /**
861
+ * Public ingestion config accepted by memory-ingestion endpoints.
862
+ *
863
+ * This mirrors the supported request payload shape while staying independent from
864
+ * the runtime provider config, which also carries internal-only fields such as
865
+ * `app` and `extra_fields`.
866
+ */
867
+ ingestion_config?: MemoryCreateParams.IngestionConfig | null;
868
+ /**
869
+ * Ingestion mode for documents
870
+ */
871
+ ingestion_mode?: 'hi-res' | 'ocr' | 'fast' | 'custom' | null;
872
+ /**
873
+ * Messages for conversation type
874
+ */
875
+ messages?: Array<MemoryCreateParams.Message> | null;
876
+ /**
877
+ * Metadata for the memory
878
+ */
879
+ metadata?: {
880
+ [key: string]: unknown;
881
+ } | null;
882
+ /**
883
+ * Optional name for the memory
884
+ */
885
+ name?: string | null;
886
+ /**
887
+ * Raw text content for document type
888
+ */
889
+ raw_text?: string | null;
890
+ /**
891
+ * Portable full snapshot owned by the client.
892
+ */
893
+ snapshot?: MemoryCreateParams.Snapshot | null;
894
+ /**
895
+ * UUID of the SourceRole entity creating this memory
896
+ */
897
+ speaker_id?: string | null;
898
+ /**
899
+ * Display name of the speaker/agent creating this memory
900
+ */
901
+ speaker_name?: string | null;
902
+ }
903
+ export declare namespace MemoryCreateParams {
904
+ /**
905
+ * Text content block.
906
+ */
907
+ interface TextContentRequest {
908
+ /**
909
+ * Text content
910
+ */
911
+ text: string;
912
+ type?: 'text';
913
+ }
914
+ /**
915
+ * Unified file content for multimodal messages.
916
+ */
917
+ interface FileContentRequest {
918
+ /**
919
+ * Base64 encoded file data
920
+ */
921
+ data: string;
922
+ /**
923
+ * Duration in seconds (for audio)
924
+ */
925
+ duration_seconds?: number | null;
926
+ /**
927
+ * Original filename
928
+ */
929
+ filename?: string | null;
930
+ /**
931
+ * MIME type
932
+ */
933
+ media_type?: string;
934
+ /**
935
+ * Content kind: file, image, audio, or document.
936
+ */
937
+ type?: 'file' | 'image' | 'audio' | 'document';
938
+ }
939
+ /**
940
+ * Reference to a file uploaded to S3 (for large files).
941
+ */
942
+ interface S3FileReferenceRequest {
943
+ /**
944
+ * S3 object key
945
+ */
946
+ s3_key: string;
947
+ /**
948
+ * S3 bucket (uses default if not specified)
949
+ */
950
+ bucket?: string | null;
951
+ /**
952
+ * Original filename
953
+ */
954
+ filename?: string | null;
955
+ /**
956
+ * MIME type
957
+ */
958
+ media_type?: string;
959
+ /**
960
+ * File size in bytes
961
+ */
962
+ size_bytes?: number | null;
963
+ type?: 's3_ref';
964
+ }
965
+ /**
966
+ * Public ingestion config accepted by memory-ingestion endpoints.
967
+ *
968
+ * This mirrors the supported request payload shape while staying independent from
969
+ * the runtime provider config, which also carries internal-only fields such as
970
+ * `app` and `extra_fields`.
971
+ */
972
+ interface IngestionConfig {
973
+ audio_transcription_model?: string | null;
974
+ automatic_extraction?: boolean;
975
+ /**
976
+ * Settings for chunk enrichment.
977
+ *
978
+ * Model selection for the enrichment LLM call lives in
979
+ * `app.task_llms.chunk_enrichment`; the legacy `generation_config` field was
980
+ * removed in the per-task LLM cleanup pass.
981
+ */
982
+ chunk_enrichment_settings?: IngestionConfig.ChunkEnrichmentSettings;
983
+ chunk_overlap?: number;
984
+ chunk_size?: number;
985
+ chunking_strategy?: string;
986
+ excluded_parsers?: Array<string>;
987
+ extra_parsers?: {
988
+ [key: string]: unknown;
989
+ };
990
+ max_concurrent_vlm_tasks?: number;
991
+ parser_overrides?: {
992
+ [key: string]: string;
993
+ };
994
+ provider?: string;
995
+ vlm?: string | null;
996
+ vlm_batch_size?: number;
997
+ vlm_max_tokens_to_sample?: number;
998
+ vlm_ocr_one_page_per_chunk?: boolean;
999
+ }
1000
+ namespace IngestionConfig {
1001
+ /**
1002
+ * Settings for chunk enrichment.
1003
+ *
1004
+ * Model selection for the enrichment LLM call lives in
1005
+ * `app.task_llms.chunk_enrichment`; the legacy `generation_config` field was
1006
+ * removed in the per-task LLM cleanup pass.
1007
+ */
1008
+ interface ChunkEnrichmentSettings {
1009
+ /**
1010
+ * The prompt to use for chunk enrichment
1011
+ */
1012
+ chunk_enrichment_prompt?: string | null;
1013
+ /**
1014
+ * Whether to enable chunk enrichment or not
1015
+ */
1016
+ enable_chunk_enrichment?: boolean;
1017
+ /**
1018
+ * The number of preceding and succeeding chunks to include. Defaults to 2.
1019
+ */
1020
+ n_chunks?: number;
1021
+ }
1022
+ }
1023
+ /**
1024
+ * A message in a conversation with multimodal support.
1025
+ */
1026
+ interface Message {
1027
+ /**
1028
+ * Message content. Use a string for text-only messages or a list of content parts
1029
+ * for multimodal content.
1030
+ */
1031
+ content: string | Array<Message.TextContentRequest | Message.FileContentRequest | Message.S3FileReferenceRequest>;
1032
+ /**
1033
+ * Role: 'user', 'assistant', or 'system'
1034
+ */
1035
+ role: 'user' | 'assistant' | 'system';
1036
+ /**
1037
+ * Optional authority score
1038
+ */
1039
+ authority?: number | null;
1040
+ /**
1041
+ * Optional message-level metadata
1042
+ */
1043
+ metadata?: {
1044
+ [key: string]: unknown;
1045
+ } | null;
1046
+ /**
1047
+ * Semantic timestamp for when the message was authored. Drives chunk timestamps,
1048
+ * the extraction LLM's temporal anchor, and episodic grouping. Without it,
1049
+ * relative phrases ('this morning') resolve against ingestion wall-clock and
1050
+ * episodes collapse.
1051
+ */
1052
+ timestamp?: string | null;
1053
+ }
1054
+ namespace Message {
1055
+ /**
1056
+ * Text content block.
1057
+ */
1058
+ interface TextContentRequest {
1059
+ /**
1060
+ * Text content
1061
+ */
1062
+ text: string;
1063
+ type?: 'text';
1064
+ }
1065
+ /**
1066
+ * Unified file content for multimodal messages.
1067
+ */
1068
+ interface FileContentRequest {
1069
+ /**
1070
+ * Base64 encoded file data
1071
+ */
1072
+ data: string;
1073
+ /**
1074
+ * Duration in seconds (for audio)
1075
+ */
1076
+ duration_seconds?: number | null;
1077
+ /**
1078
+ * Original filename
1079
+ */
1080
+ filename?: string | null;
1081
+ /**
1082
+ * MIME type
1083
+ */
1084
+ media_type?: string;
1085
+ /**
1086
+ * Content kind: file, image, audio, or document.
1087
+ */
1088
+ type?: 'file' | 'image' | 'audio' | 'document';
1089
+ }
1090
+ /**
1091
+ * Reference to a file uploaded to S3 (for large files).
1092
+ */
1093
+ interface S3FileReferenceRequest {
1094
+ /**
1095
+ * S3 object key
1096
+ */
1097
+ s3_key: string;
1098
+ /**
1099
+ * S3 bucket (uses default if not specified)
1100
+ */
1101
+ bucket?: string | null;
1102
+ /**
1103
+ * Original filename
1104
+ */
1105
+ filename?: string | null;
1106
+ /**
1107
+ * MIME type
1108
+ */
1109
+ media_type?: string;
1110
+ /**
1111
+ * File size in bytes
1112
+ */
1113
+ size_bytes?: number | null;
1114
+ type?: 's3_ref';
1115
+ }
1116
+ }
1117
+ /**
1118
+ * Portable full snapshot owned by the client.
1119
+ */
1120
+ interface Snapshot {
1121
+ collection_id: string;
1122
+ root_hash: string;
1123
+ created_at?: string;
1124
+ format_version?: number;
1125
+ generation?: number;
1126
+ /**
1127
+ * A complete graph payload or a context subgraph payload.
1128
+ */
1129
+ graph?: Snapshot.Graph;
1130
+ }
1131
+ namespace Snapshot {
1132
+ /**
1133
+ * A complete graph payload or a context subgraph payload.
1134
+ */
1135
+ interface Graph {
1136
+ entities?: Array<Graph.Entity>;
1137
+ /**
1138
+ * A positionally-aligned masked embedding matrix.
1139
+ */
1140
+ entity_description_embeddings?: Graph.EntityDescriptionEmbeddings;
1141
+ /**
1142
+ * A positionally-aligned masked embedding matrix.
1143
+ */
1144
+ relationship_description_embeddings?: Graph.RelationshipDescriptionEmbeddings;
1145
+ /**
1146
+ * A positionally-aligned masked embedding matrix.
1147
+ */
1148
+ relationship_relation_embeddings?: Graph.RelationshipRelationEmbeddings;
1149
+ relationships?: Array<Graph.Relationship>;
1150
+ }
1151
+ namespace Graph {
1152
+ /**
1153
+ * Canonical entity record used in snapshots, WAL ops, and segments.
1154
+ */
1155
+ interface Entity {
1156
+ id: string;
1157
+ created_at: string;
1158
+ engram_id: string;
1159
+ name: string;
1160
+ updated_at: string;
1161
+ category?: string | null;
1162
+ chunk_ids?: Array<string>;
1163
+ collection_id?: string;
1164
+ description?: string | null;
1165
+ fts_terms?: {
1166
+ [key: string]: number;
1167
+ } | null;
1168
+ metadata?: {
1169
+ [key: string]: unknown;
1170
+ };
1171
+ relationship_count?: number;
1172
+ }
1173
+ /**
1174
+ * A positionally-aligned masked embedding matrix.
1175
+ */
1176
+ interface EntityDescriptionEmbeddings {
1177
+ dim?: number;
1178
+ encoding?: 'npy-base64';
1179
+ mask_b64?: string;
1180
+ values_b64?: string;
1181
+ }
1182
+ /**
1183
+ * A positionally-aligned masked embedding matrix.
1184
+ */
1185
+ interface RelationshipDescriptionEmbeddings {
1186
+ dim?: number;
1187
+ encoding?: 'npy-base64';
1188
+ mask_b64?: string;
1189
+ values_b64?: string;
1190
+ }
1191
+ /**
1192
+ * A positionally-aligned masked embedding matrix.
1193
+ */
1194
+ interface RelationshipRelationEmbeddings {
1195
+ dim?: number;
1196
+ encoding?: 'npy-base64';
1197
+ mask_b64?: string;
1198
+ values_b64?: string;
1199
+ }
1200
+ /**
1201
+ * Canonical relationship record used in snapshots, WAL ops, and segments.
1202
+ */
1203
+ interface Relationship {
1204
+ id: string;
1205
+ created_at: string;
1206
+ object_id: string;
1207
+ subject_id: string;
1208
+ updated_at: string;
1209
+ category?: string | null;
1210
+ chunk_ids?: Array<string>;
1211
+ collection_id?: string;
1212
+ description?: string | null;
1213
+ engram_id?: string | null;
1214
+ inference_metadata?: {
1215
+ [key: string]: unknown;
1216
+ } | null;
1217
+ metadata?: {
1218
+ [key: string]: unknown;
1219
+ };
1220
+ object?: string | null;
1221
+ predicate?: string;
1222
+ relationship_type?: string | null;
1223
+ subject?: string | null;
1224
+ temporal_precision?: string | null;
1225
+ valid_span?: {
1226
+ [key: string]: unknown;
1227
+ } | null;
1228
+ weight?: number | null;
1229
+ }
1230
+ }
1231
+ }
1232
+ }
1233
+ export interface MemoryUpdateParams {
1234
+ /**
1235
+ * Query param: Collection context for copy-on-write. If provided and engram is
1236
+ * shared, creates a copy before modification.
1237
+ */
1238
+ collection_id?: string | null;
1239
+ /**
1240
+ * Body param: New collection associations
1241
+ */
1242
+ collection_ids?: Array<string> | null;
1243
+ /**
1244
+ * Body param: Merge with existing metadata
1245
+ */
1246
+ merge_metadata?: boolean;
1247
+ /**
1248
+ * Body param: Metadata to update
1249
+ */
1250
+ metadata?: {
1251
+ [key: string]: unknown;
1252
+ } | null;
1253
+ /**
1254
+ * Body param: New name for the memory
1255
+ */
1256
+ name?: string | null;
1257
+ }
1258
+ export interface MemoryListParams {
1259
+ /**
1260
+ * Maximum chunks to inline per engram. Defaults to all chunks for backwards
1261
+ * compatibility; pass 0 to skip chunk hydration.
1262
+ */
1263
+ chunks_limit?: number | null;
1264
+ /**
1265
+ * Optional list of collection IDs to filter engrams by. If provided, exactly one
1266
+ * collection ID must be specified.
1267
+ */
1268
+ collection_ids?: Array<string> | null;
1269
+ /**
1270
+ * A list of engram IDs to retrieve. If not provided, all engrams will be returned.
1271
+ */
1272
+ ids?: Array<string>;
1273
+ /**
1274
+ * Specifies a limit on the number of objects to return, ranging between 1 and 100.
1275
+ * Defaults to 100.
1276
+ */
1277
+ limit?: number;
1278
+ /**
1279
+ * JSON string for metadata filtering. Example: '{"metadata.source": {"$eq":
1280
+ * "playground"}}'
1281
+ */
1282
+ metadata_filters?: string | null;
1283
+ /**
1284
+ * Specifies the number of objects to skip. Defaults to 0.
1285
+ */
1286
+ offset?: number;
1287
+ /**
1288
+ * If true, only returns engrams owned by the user, not all accessible engrams.
1289
+ */
1290
+ owner_only?: boolean;
1291
+ }
1292
+ export interface MemoryAppendParams {
1293
+ /**
1294
+ * Target collection ID for the appended content.
1295
+ */
1296
+ collection_id: string;
1297
+ /**
1298
+ * Pre-processed text chunks to append for document memories.
1299
+ */
1300
+ chunks?: Array<string> | null;
1301
+ /**
1302
+ * Public ingestion config accepted by memory-ingestion endpoints.
1303
+ *
1304
+ * This mirrors the supported request payload shape while staying independent from
1305
+ * the runtime provider config, which also carries internal-only fields such as
1306
+ * `app` and `extra_fields`.
1307
+ */
1308
+ ingestion_config?: MemoryAppendParams.IngestionConfig | null;
1309
+ /**
1310
+ * Ingestion mode for document content.
1311
+ */
1312
+ ingestion_mode?: 'hi-res' | 'ocr' | 'fast' | 'custom';
1313
+ /**
1314
+ * Messages to append for conversation memories. Each message has content, role,
1315
+ * and optional metadata.
1316
+ */
1317
+ messages?: Array<MemoryAppendParams.Message> | null;
1318
+ /**
1319
+ * Additional metadata for the appended content.
1320
+ */
1321
+ metadata?: {
1322
+ [key: string]: unknown;
1323
+ } | null;
1324
+ /**
1325
+ * Raw text content to append for document memories.
1326
+ */
1327
+ raw_text?: string | null;
1328
+ }
1329
+ export declare namespace MemoryAppendParams {
1330
+ /**
1331
+ * Public ingestion config accepted by memory-ingestion endpoints.
1332
+ *
1333
+ * This mirrors the supported request payload shape while staying independent from
1334
+ * the runtime provider config, which also carries internal-only fields such as
1335
+ * `app` and `extra_fields`.
1336
+ */
1337
+ interface IngestionConfig {
1338
+ audio_transcription_model?: string | null;
1339
+ automatic_extraction?: boolean;
1340
+ /**
1341
+ * Settings for chunk enrichment.
1342
+ *
1343
+ * Model selection for the enrichment LLM call lives in
1344
+ * `app.task_llms.chunk_enrichment`; the legacy `generation_config` field was
1345
+ * removed in the per-task LLM cleanup pass.
1346
+ */
1347
+ chunk_enrichment_settings?: IngestionConfig.ChunkEnrichmentSettings;
1348
+ chunk_overlap?: number;
1349
+ chunk_size?: number;
1350
+ chunking_strategy?: string;
1351
+ excluded_parsers?: Array<string>;
1352
+ extra_parsers?: {
1353
+ [key: string]: unknown;
1354
+ };
1355
+ max_concurrent_vlm_tasks?: number;
1356
+ parser_overrides?: {
1357
+ [key: string]: string;
1358
+ };
1359
+ provider?: string;
1360
+ vlm?: string | null;
1361
+ vlm_batch_size?: number;
1362
+ vlm_max_tokens_to_sample?: number;
1363
+ vlm_ocr_one_page_per_chunk?: boolean;
1364
+ }
1365
+ namespace IngestionConfig {
1366
+ /**
1367
+ * Settings for chunk enrichment.
1368
+ *
1369
+ * Model selection for the enrichment LLM call lives in
1370
+ * `app.task_llms.chunk_enrichment`; the legacy `generation_config` field was
1371
+ * removed in the per-task LLM cleanup pass.
1372
+ */
1373
+ interface ChunkEnrichmentSettings {
1374
+ /**
1375
+ * The prompt to use for chunk enrichment
1376
+ */
1377
+ chunk_enrichment_prompt?: string | null;
1378
+ /**
1379
+ * Whether to enable chunk enrichment or not
1380
+ */
1381
+ enable_chunk_enrichment?: boolean;
1382
+ /**
1383
+ * The number of preceding and succeeding chunks to include. Defaults to 2.
1384
+ */
1385
+ n_chunks?: number;
1386
+ }
1387
+ }
1388
+ interface Message {
1389
+ /**
1390
+ * Message content. Use a string for text-only messages or a list of content parts
1391
+ * for multimodal content.
1392
+ */
1393
+ content: string | Array<Message.TextContentRequest | Message.FileContentRequest | Message.S3FileReferenceRequest>;
1394
+ /**
1395
+ * Role: 'user', 'assistant', or 'system'
1396
+ */
1397
+ role: 'user' | 'assistant' | 'system';
1398
+ /**
1399
+ * Optional authority score
1400
+ */
1401
+ authority?: number | null;
1402
+ /**
1403
+ * Optional message-level metadata
1404
+ */
1405
+ metadata?: {
1406
+ [key: string]: unknown;
1407
+ } | null;
1408
+ /**
1409
+ * Optional parent message ID
1410
+ */
1411
+ parent_id?: string | null;
1412
+ /**
1413
+ * Optional SourceRole entity ID
1414
+ */
1415
+ source_role_id?: string | null;
1416
+ /**
1417
+ * Semantic timestamp for when the message was authored. Drives chunk timestamps,
1418
+ * the extraction LLM's temporal anchor, and episodic grouping. Without it,
1419
+ * relative phrases ('this morning') resolve against ingestion wall-clock and
1420
+ * episodes collapse.
1421
+ */
1422
+ timestamp?: string | null;
1423
+ }
1424
+ namespace Message {
1425
+ /**
1426
+ * Text content block.
1427
+ */
1428
+ interface TextContentRequest {
1429
+ /**
1430
+ * Text content
1431
+ */
1432
+ text: string;
1433
+ type?: 'text';
1434
+ }
1435
+ /**
1436
+ * Unified file content for multimodal messages.
1437
+ */
1438
+ interface FileContentRequest {
1439
+ /**
1440
+ * Base64 encoded file data
1441
+ */
1442
+ data: string;
1443
+ /**
1444
+ * Duration in seconds (for audio)
1445
+ */
1446
+ duration_seconds?: number | null;
1447
+ /**
1448
+ * Original filename
1449
+ */
1450
+ filename?: string | null;
1451
+ /**
1452
+ * MIME type
1453
+ */
1454
+ media_type?: string;
1455
+ /**
1456
+ * Content kind: file, image, audio, or document.
1457
+ */
1458
+ type?: 'file' | 'image' | 'audio' | 'document';
1459
+ }
1460
+ /**
1461
+ * Reference to a file uploaded to S3 (for large files).
1462
+ */
1463
+ interface S3FileReferenceRequest {
1464
+ /**
1465
+ * S3 object key
1466
+ */
1467
+ s3_key: string;
1468
+ /**
1469
+ * S3 bucket (uses default if not specified)
1470
+ */
1471
+ bucket?: string | null;
1472
+ /**
1473
+ * Original filename
1474
+ */
1475
+ filename?: string | null;
1476
+ /**
1477
+ * MIME type
1478
+ */
1479
+ media_type?: string;
1480
+ /**
1481
+ * File size in bytes
1482
+ */
1483
+ size_bytes?: number | null;
1484
+ type?: 's3_ref';
1485
+ }
1486
+ }
1487
+ }
1488
+ export interface MemoryCreateUploadParams {
1489
+ /**
1490
+ * MIME type (e.g., 'image/jpeg', 'application/pdf')
1491
+ */
1492
+ content_type: string;
1493
+ /**
1494
+ * Expected file size in bytes (max 100MB)
1495
+ */
1496
+ file_size: number;
1497
+ /**
1498
+ * Original filename (e.g., 'image.jpg')
1499
+ */
1500
+ filename: string;
1501
+ }
1502
+ export type MemoryDeleteManyParams = MemoryDeleteManyParams.Variant0 | MemoryDeleteManyParams.Variant1;
1503
+ export declare namespace MemoryDeleteManyParams {
1504
+ interface Variant0 {
1505
+ body: string;
1506
+ }
1507
+ interface Variant1 {
1508
+ body: Array<string>;
1509
+ }
1510
+ }
1511
+ export interface MemoryDeleteUploadParams {
1512
+ /**
1513
+ * S3 key of the file to delete (returned by POST /memories/upload)
1514
+ */
1515
+ s3_key: string;
1516
+ }
1517
+ export interface MemorySearchParams {
1518
+ /**
1519
+ * Optional list of collection UUIDs or names to scope the search.
1520
+ */
1521
+ collection_ids?: Array<string> | null;
1522
+ /**
1523
+ * Compute effort budget for memory search.
1524
+ *
1525
+ * Effort controls traversal compute (exploration budgets, depth, fanout), not the
1526
+ * size of the returned MemoryRecall projection.
1527
+ */
1528
+ effort?: 'auto' | 'low' | 'medium' | 'high' | null;
1529
+ /**
1530
+ * Optional filters to apply to the search.
1531
+ */
1532
+ filters?: {
1533
+ [key: string]: unknown;
1534
+ } | null;
1535
+ /**
1536
+ * Pre-written NQL script. Executes directly without planner compilation. Mutually
1537
+ * exclusive with `query`.
1538
+ */
1539
+ nql?: string | null;
1540
+ /**
1541
+ * Natural-language search query. Mutually exclusive with `nql`.
1542
+ */
1543
+ query?: string | null;
1544
+ /**
1545
+ * Advanced search settings for fine-tuning search behavior.
1546
+ *
1547
+ * Note: Core parameters (query, collection_ids, filters) are now top-level API
1548
+ * parameters. This class contains advanced tuning options plus internal fields
1549
+ * used by the retrieval service.
1550
+ *
1551
+ * Memory search uses `effort` (auto/low/medium/high) to control compute.
1552
+ */
1553
+ search_settings?: MemorySearchParams.SearchSettings | null;
1554
+ /**
1555
+ * Portable full snapshot owned by the client.
1556
+ */
1557
+ snapshot?: MemorySearchParams.Snapshot | null;
1558
+ }
1559
+ export declare namespace MemorySearchParams {
1560
+ /**
1561
+ * Advanced search settings for fine-tuning search behavior.
1562
+ *
1563
+ * Note: Core parameters (query, collection_ids, filters) are now top-level API
1564
+ * parameters. This class contains advanced tuning options plus internal fields
1565
+ * used by the retrieval service.
1566
+ *
1567
+ * Memory search uses `effort` (auto/low/medium/high) to control compute.
1568
+ */
1569
+ interface SearchSettings {
1570
+ /**
1571
+ * Compute effort budget (auto/low/medium/high). Controls traversal compute for
1572
+ * memory search, not MemoryRecall size.
1573
+ */
1574
+ effort?: 'auto' | 'low' | 'medium' | 'high';
1575
+ /**
1576
+ * Enable conceptual expansion for cross-domain discovery through overlapping
1577
+ * concepts
1578
+ */
1579
+ enable_conceptual_expansion?: boolean;
1580
+ /**
1581
+ * Internal: Filters populated by the API router
1582
+ */
1583
+ filters?: {
1584
+ [key: string]: unknown;
1585
+ };
1586
+ /**
1587
+ * Weight for fulltext search in hybrid mode (0-1). Set to 0 for pure semantic
1588
+ * search.
1589
+ */
1590
+ fulltext_weight?: number;
1591
+ /**
1592
+ * Internal: Graph traversal settings (bfs_max_depth, semantic_threshold, etc.)
1593
+ */
1594
+ graph_settings?: {
1595
+ [key: string]: unknown;
1596
+ };
1597
+ /**
1598
+ * Internal: Set by select_search_filters when an owner_id $in partition-pruning
1599
+ * wrapper has been added around the filter tree. Used by the in-memory graph read
1600
+ * engine to strip the Postgres-only wrapper before evaluating delegation.
1601
+ */
1602
+ has_pruning_gate?: boolean;
1603
+ /**
1604
+ * Whether to include search score values in the search results
1605
+ */
1606
+ include_scores?: boolean;
1607
+ /**
1608
+ * Weight for semantic search in hybrid mode (0-1). Set to 0 for pure fulltext
1609
+ * search.
1610
+ */
1611
+ semantic_weight?: number;
1612
+ /**
1613
+ * Include full internal metadata, UUIDs, and confidence fields in MemoryRecall
1614
+ * responses. When False, returns compact LLM-optimized format.
1615
+ */
1616
+ verbose?: boolean;
1617
+ }
1618
+ /**
1619
+ * Portable full snapshot owned by the client.
1620
+ */
1621
+ interface Snapshot {
1622
+ collection_id: string;
1623
+ root_hash: string;
1624
+ created_at?: string;
1625
+ format_version?: number;
1626
+ generation?: number;
1627
+ /**
1628
+ * A complete graph payload or a context subgraph payload.
1629
+ */
1630
+ graph?: Snapshot.Graph;
1631
+ }
1632
+ namespace Snapshot {
1633
+ /**
1634
+ * A complete graph payload or a context subgraph payload.
1635
+ */
1636
+ interface Graph {
1637
+ entities?: Array<Graph.Entity>;
1638
+ /**
1639
+ * A positionally-aligned masked embedding matrix.
1640
+ */
1641
+ entity_description_embeddings?: Graph.EntityDescriptionEmbeddings;
1642
+ /**
1643
+ * A positionally-aligned masked embedding matrix.
1644
+ */
1645
+ relationship_description_embeddings?: Graph.RelationshipDescriptionEmbeddings;
1646
+ /**
1647
+ * A positionally-aligned masked embedding matrix.
1648
+ */
1649
+ relationship_relation_embeddings?: Graph.RelationshipRelationEmbeddings;
1650
+ relationships?: Array<Graph.Relationship>;
1651
+ }
1652
+ namespace Graph {
1653
+ /**
1654
+ * Canonical entity record used in snapshots, WAL ops, and segments.
1655
+ */
1656
+ interface Entity {
1657
+ id: string;
1658
+ created_at: string;
1659
+ engram_id: string;
1660
+ name: string;
1661
+ updated_at: string;
1662
+ category?: string | null;
1663
+ chunk_ids?: Array<string>;
1664
+ collection_id?: string;
1665
+ description?: string | null;
1666
+ fts_terms?: {
1667
+ [key: string]: number;
1668
+ } | null;
1669
+ metadata?: {
1670
+ [key: string]: unknown;
1671
+ };
1672
+ relationship_count?: number;
1673
+ }
1674
+ /**
1675
+ * A positionally-aligned masked embedding matrix.
1676
+ */
1677
+ interface EntityDescriptionEmbeddings {
1678
+ dim?: number;
1679
+ encoding?: 'npy-base64';
1680
+ mask_b64?: string;
1681
+ values_b64?: string;
1682
+ }
1683
+ /**
1684
+ * A positionally-aligned masked embedding matrix.
1685
+ */
1686
+ interface RelationshipDescriptionEmbeddings {
1687
+ dim?: number;
1688
+ encoding?: 'npy-base64';
1689
+ mask_b64?: string;
1690
+ values_b64?: string;
1691
+ }
1692
+ /**
1693
+ * A positionally-aligned masked embedding matrix.
1694
+ */
1695
+ interface RelationshipRelationEmbeddings {
1696
+ dim?: number;
1697
+ encoding?: 'npy-base64';
1698
+ mask_b64?: string;
1699
+ values_b64?: string;
1700
+ }
1701
+ /**
1702
+ * Canonical relationship record used in snapshots, WAL ops, and segments.
1703
+ */
1704
+ interface Relationship {
1705
+ id: string;
1706
+ created_at: string;
1707
+ object_id: string;
1708
+ subject_id: string;
1709
+ updated_at: string;
1710
+ category?: string | null;
1711
+ chunk_ids?: Array<string>;
1712
+ collection_id?: string;
1713
+ description?: string | null;
1714
+ engram_id?: string | null;
1715
+ inference_metadata?: {
1716
+ [key: string]: unknown;
1717
+ } | null;
1718
+ metadata?: {
1719
+ [key: string]: unknown;
1720
+ };
1721
+ object?: string | null;
1722
+ predicate?: string;
1723
+ relationship_type?: string | null;
1724
+ subject?: string | null;
1725
+ temporal_precision?: string | null;
1726
+ valid_span?: {
1727
+ [key: string]: unknown;
1728
+ } | null;
1729
+ weight?: number | null;
1730
+ }
1731
+ }
1732
+ }
1733
+ }
1734
+ export declare namespace Memories {
1735
+ export { type MemoryCreateResponse as MemoryCreateResponse, type MemoryRetrieveResponse as MemoryRetrieveResponse, type MemoryUpdateResponse as MemoryUpdateResponse, type MemoryListResponse as MemoryListResponse, type MemoryDeleteResponse as MemoryDeleteResponse, type MemoryAppendResponse as MemoryAppendResponse, type MemoryCreateUploadResponse as MemoryCreateUploadResponse, type MemoryDeleteManyResponse as MemoryDeleteManyResponse, type MemoryDeleteUploadResponse as MemoryDeleteUploadResponse, type MemorySearchResponse as MemorySearchResponse, type MemoryCreateParams as MemoryCreateParams, type MemoryUpdateParams as MemoryUpdateParams, type MemoryListParams as MemoryListParams, type MemoryAppendParams as MemoryAppendParams, type MemoryCreateUploadParams as MemoryCreateUploadParams, type MemoryDeleteManyParams as MemoryDeleteManyParams, type MemoryDeleteUploadParams as MemoryDeleteUploadParams, type MemorySearchParams as MemorySearchParams, };
1736
+ }
1737
+ //# sourceMappingURL=memories.d.ts.map