agentfootprint 17.2.0 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (562) hide show
  1. package/AGENTS.md +1 -1
  2. package/CAPABILITIES.md +4 -1
  3. package/ai-instructions/claude-code/SKILL.md +1 -1
  4. package/dist/adapters/memory/agentcore/contract.js +20 -0
  5. package/dist/adapters/memory/agentcore/contract.js.map +1 -0
  6. package/dist/adapters/memory/agentcore/eventPayload.js +183 -0
  7. package/dist/adapters/memory/agentcore/eventPayload.js.map +1 -0
  8. package/dist/adapters/memory/agentcore/identity.js +165 -0
  9. package/dist/adapters/memory/agentcore/identity.js.map +1 -0
  10. package/dist/adapters/memory/agentcore/namespace.js +218 -0
  11. package/dist/adapters/memory/agentcore/namespace.js.map +1 -0
  12. package/dist/adapters/memory/agentcore/sdkClient.js +178 -0
  13. package/dist/adapters/memory/agentcore/sdkClient.js.map +1 -0
  14. package/dist/adapters/memory/agentcore/store.js +499 -0
  15. package/dist/adapters/memory/agentcore/store.js.map +1 -0
  16. package/dist/adapters/memory/agentcore/storedEntry.js +110 -0
  17. package/dist/adapters/memory/agentcore/storedEntry.js.map +1 -0
  18. package/dist/adapters/memory/agentcore.js +10 -1088
  19. package/dist/adapters/memory/agentcore.js.map +1 -1
  20. package/dist/adapters/observability/auditShapes/events/lifecycle.js +1 -0
  21. package/dist/adapters/observability/auditShapes/events/lifecycle.js.map +1 -1
  22. package/dist/adapters/observability/auditShapes/events/resources.js +4 -0
  23. package/dist/adapters/observability/auditShapes/events/resources.js.map +1 -1
  24. package/dist/core/Agent.js +4 -0
  25. package/dist/core/Agent.js.map +1 -1
  26. package/dist/core/agent/arguments/ask/windowBinding/answer.js +20 -4
  27. package/dist/core/agent/arguments/ask/windowBinding/answer.js.map +1 -1
  28. package/dist/core/agent/arguments/ask/windowBinding/fills.js +7 -21
  29. package/dist/core/agent/arguments/ask/windowBinding/fills.js.map +1 -1
  30. package/dist/core/agent/arguments/dispatch.js +14 -2
  31. package/dist/core/agent/arguments/dispatch.js.map +1 -1
  32. package/dist/core/agent/arguments/resolve.js +12 -17
  33. package/dist/core/agent/arguments/resolve.js.map +1 -1
  34. package/dist/core/agent/arguments/serve/fills.js +10 -1
  35. package/dist/core/agent/arguments/serve/fills.js.map +1 -1
  36. package/dist/core/agent/arguments/serve/windows.js +11 -1
  37. package/dist/core/agent/arguments/serve/windows.js.map +1 -1
  38. package/dist/core/agent/arguments/wider.js +20 -0
  39. package/dist/core/agent/arguments/wider.js.map +1 -0
  40. package/dist/core/agent/assistantReplay.js +45 -1
  41. package/dist/core/agent/assistantReplay.js.map +1 -1
  42. package/dist/core/agent/buildAgentChart.js +4 -21
  43. package/dist/core/agent/buildAgentChart.js.map +1 -1
  44. package/dist/core/agent/buildDynamicAgentChart.js +6 -25
  45. package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
  46. package/dist/core/agent/composeRequest.js +3 -1
  47. package/dist/core/agent/composeRequest.js.map +1 -1
  48. package/dist/core/agent/hostEnd/chart.js +21 -0
  49. package/dist/core/agent/hostEnd/chart.js.map +1 -0
  50. package/dist/core/agent/hostEnd/delivery.js +48 -0
  51. package/dist/core/agent/hostEnd/delivery.js.map +1 -0
  52. package/dist/core/agent/hostEnd/entry.js +35 -0
  53. package/dist/core/agent/hostEnd/entry.js.map +1 -0
  54. package/dist/core/agent/hostEnd/projection.js +45 -0
  55. package/dist/core/agent/hostEnd/projection.js.map +1 -0
  56. package/dist/core/agent/hostEnd/settle.js +90 -0
  57. package/dist/core/agent/hostEnd/settle.js.map +1 -0
  58. package/dist/core/agent/memoryWrites.js +30 -0
  59. package/dist/core/agent/memoryWrites.js.map +1 -0
  60. package/dist/core/agent/runValues.js.map +1 -1
  61. package/dist/core/agent/runtime/chart/chartDependencies.js +8 -0
  62. package/dist/core/agent/runtime/chart/chartDependencies.js.map +1 -1
  63. package/dist/core/agent/runtime/configuration/configure.js +3 -0
  64. package/dist/core/agent/runtime/configuration/configure.js.map +1 -1
  65. package/dist/core/agent/runtime/configuration/values.js +1 -0
  66. package/dist/core/agent/runtime/configuration/values.js.map +1 -1
  67. package/dist/core/agent/runtime/context.js +2 -0
  68. package/dist/core/agent/runtime/context.js.map +1 -1
  69. package/dist/core/agent/runtime/conversation/owner.js +6 -6
  70. package/dist/core/agent/runtime/conversation/owner.js.map +1 -1
  71. package/dist/core/agent/runtime/conversation/seedHistory.js +1 -1
  72. package/dist/core/agent/runtime/conversation/seedHistory.js.map +1 -1
  73. package/dist/core/agent/runtime/request/factory.js +3 -1
  74. package/dist/core/agent/runtime/request/factory.js.map +1 -1
  75. package/dist/core/agent/runtime/seed/factory.js +4 -1
  76. package/dist/core/agent/runtime/seed/factory.js.map +1 -1
  77. package/dist/core/agent/runtime/turn/owner.js +18 -4
  78. package/dist/core/agent/runtime/turn/owner.js.map +1 -1
  79. package/dist/core/agent/stages/callLLM/commitResponse.js +1 -1
  80. package/dist/core/agent/stages/callLLM/commitResponse.js.map +1 -1
  81. package/dist/core/agent/stages/prepareFinal.js +1 -18
  82. package/dist/core/agent/stages/prepareFinal.js.map +1 -1
  83. package/dist/core/agent/stages/seed.js +8 -44
  84. package/dist/core/agent/stages/seed.js.map +1 -1
  85. package/dist/core/agent/stages/seedTime.js +44 -0
  86. package/dist/core/agent/stages/seedTime.js.map +1 -0
  87. package/dist/core/agent/stages/timeLayer.js +68 -13
  88. package/dist/core/agent/stages/timeLayer.js.map +1 -1
  89. package/dist/core/agent/stages/toolCalls/execution/resumedInvocation.js +14 -9
  90. package/dist/core/agent/stages/toolCalls/execution/resumedInvocation.js.map +1 -1
  91. package/dist/core/checkpointHistory.js +3 -0
  92. package/dist/core/checkpointHistory.js.map +1 -1
  93. package/dist/core/replyOrigin.js +42 -0
  94. package/dist/core/replyOrigin.js.map +1 -0
  95. package/dist/esm/adapters/memory/agentcore/contract.d.ts +253 -0
  96. package/dist/esm/adapters/memory/agentcore/contract.js +17 -0
  97. package/dist/esm/adapters/memory/agentcore/contract.js.map +1 -0
  98. package/dist/esm/adapters/memory/agentcore/eventPayload.d.ts +37 -0
  99. package/dist/esm/adapters/memory/agentcore/eventPayload.js +175 -0
  100. package/dist/esm/adapters/memory/agentcore/eventPayload.js.map +1 -0
  101. package/dist/esm/adapters/memory/agentcore/identity.d.ts +99 -0
  102. package/dist/esm/adapters/memory/agentcore/identity.js +157 -0
  103. package/dist/esm/adapters/memory/agentcore/identity.js.map +1 -0
  104. package/dist/esm/adapters/memory/agentcore/namespace.d.ts +102 -0
  105. package/dist/esm/adapters/memory/agentcore/namespace.js +205 -0
  106. package/dist/esm/adapters/memory/agentcore/namespace.js.map +1 -0
  107. package/dist/esm/adapters/memory/agentcore/sdkClient.d.ts +19 -0
  108. package/dist/esm/adapters/memory/agentcore/sdkClient.js +173 -0
  109. package/dist/esm/adapters/memory/agentcore/sdkClient.js.map +1 -0
  110. package/dist/esm/adapters/memory/agentcore/store.d.ts +161 -0
  111. package/dist/esm/adapters/memory/agentcore/store.js +495 -0
  112. package/dist/esm/adapters/memory/agentcore/store.js.map +1 -0
  113. package/dist/esm/adapters/memory/agentcore/storedEntry.d.ts +71 -0
  114. package/dist/esm/adapters/memory/agentcore/storedEntry.js +105 -0
  115. package/dist/esm/adapters/memory/agentcore/storedEntry.js.map +1 -0
  116. package/dist/esm/adapters/memory/agentcore.d.ts +7 -436
  117. package/dist/esm/adapters/memory/agentcore.js +6 -1084
  118. package/dist/esm/adapters/memory/agentcore.js.map +1 -1
  119. package/dist/esm/adapters/observability/auditShapes/events/lifecycle.js +1 -0
  120. package/dist/esm/adapters/observability/auditShapes/events/lifecycle.js.map +1 -1
  121. package/dist/esm/adapters/observability/auditShapes/events/resources.d.ts +1 -0
  122. package/dist/esm/adapters/observability/auditShapes/events/resources.js +4 -0
  123. package/dist/esm/adapters/observability/auditShapes/events/resources.js.map +1 -1
  124. package/dist/esm/core/Agent.d.ts +5 -2
  125. package/dist/esm/core/Agent.js +4 -0
  126. package/dist/esm/core/Agent.js.map +1 -1
  127. package/dist/esm/core/agent/arguments/ask/types.d.ts +1 -1
  128. package/dist/esm/core/agent/arguments/ask/windowBinding/answer.js +21 -5
  129. package/dist/esm/core/agent/arguments/ask/windowBinding/answer.js.map +1 -1
  130. package/dist/esm/core/agent/arguments/ask/windowBinding/fills.d.ts +2 -3
  131. package/dist/esm/core/agent/arguments/ask/windowBinding/fills.js +8 -22
  132. package/dist/esm/core/agent/arguments/ask/windowBinding/fills.js.map +1 -1
  133. package/dist/esm/core/agent/arguments/ask/windowBinding/types.d.ts +2 -0
  134. package/dist/esm/core/agent/arguments/dispatch.d.ts +5 -1
  135. package/dist/esm/core/agent/arguments/dispatch.js +14 -2
  136. package/dist/esm/core/agent/arguments/dispatch.js.map +1 -1
  137. package/dist/esm/core/agent/arguments/resolve.d.ts +7 -3
  138. package/dist/esm/core/agent/arguments/resolve.js +13 -18
  139. package/dist/esm/core/agent/arguments/resolve.js.map +1 -1
  140. package/dist/esm/core/agent/arguments/serve/fills.d.ts +6 -2
  141. package/dist/esm/core/agent/arguments/serve/fills.js +10 -1
  142. package/dist/esm/core/agent/arguments/serve/fills.js.map +1 -1
  143. package/dist/esm/core/agent/arguments/serve/windows.js +12 -2
  144. package/dist/esm/core/agent/arguments/serve/windows.js.map +1 -1
  145. package/dist/esm/core/agent/arguments/wider.d.ts +10 -0
  146. package/dist/esm/core/agent/arguments/wider.js +16 -0
  147. package/dist/esm/core/agent/arguments/wider.js.map +1 -0
  148. package/dist/esm/core/agent/assistantReplay.d.ts +11 -0
  149. package/dist/esm/core/agent/assistantReplay.js +40 -0
  150. package/dist/esm/core/agent/assistantReplay.js.map +1 -1
  151. package/dist/esm/core/agent/buildAgentChart.js +4 -21
  152. package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
  153. package/dist/esm/core/agent/buildDynamicAgentChart.js +6 -25
  154. package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
  155. package/dist/esm/core/agent/chartContract.d.ts +1 -0
  156. package/dist/esm/core/agent/composeRequest.js +3 -1
  157. package/dist/esm/core/agent/composeRequest.js.map +1 -1
  158. package/dist/esm/core/agent/hostEnd/chart.d.ts +4 -0
  159. package/dist/esm/core/agent/hostEnd/chart.js +17 -0
  160. package/dist/esm/core/agent/hostEnd/chart.js.map +1 -0
  161. package/dist/esm/core/agent/hostEnd/delivery.d.ts +18 -0
  162. package/dist/esm/core/agent/hostEnd/delivery.js +44 -0
  163. package/dist/esm/core/agent/hostEnd/delivery.js.map +1 -0
  164. package/dist/esm/core/agent/hostEnd/entry.d.ts +14 -0
  165. package/dist/esm/core/agent/hostEnd/entry.js +31 -0
  166. package/dist/esm/core/agent/hostEnd/entry.js.map +1 -0
  167. package/dist/esm/core/agent/hostEnd/projection.d.ts +9 -0
  168. package/dist/esm/core/agent/hostEnd/projection.js +41 -0
  169. package/dist/esm/core/agent/hostEnd/projection.js.map +1 -0
  170. package/dist/esm/core/agent/hostEnd/settle.d.ts +7 -0
  171. package/dist/esm/core/agent/hostEnd/settle.js +86 -0
  172. package/dist/esm/core/agent/hostEnd/settle.js.map +1 -0
  173. package/dist/esm/core/agent/memoryWrites.d.ts +4 -0
  174. package/dist/esm/core/agent/memoryWrites.js +26 -0
  175. package/dist/esm/core/agent/memoryWrites.js.map +1 -0
  176. package/dist/esm/core/agent/runValues.d.ts +5 -0
  177. package/dist/esm/core/agent/runValues.js.map +1 -1
  178. package/dist/esm/core/agent/runtime/chart/chartDependencies.d.ts +3 -2
  179. package/dist/esm/core/agent/runtime/chart/chartDependencies.js +8 -0
  180. package/dist/esm/core/agent/runtime/chart/chartDependencies.js.map +1 -1
  181. package/dist/esm/core/agent/runtime/configuration/configure.js +3 -0
  182. package/dist/esm/core/agent/runtime/configuration/configure.js.map +1 -1
  183. package/dist/esm/core/agent/runtime/configuration/types.d.ts +1 -0
  184. package/dist/esm/core/agent/runtime/configuration/values.d.ts +1 -0
  185. package/dist/esm/core/agent/runtime/configuration/values.js +1 -0
  186. package/dist/esm/core/agent/runtime/configuration/values.js.map +1 -1
  187. package/dist/esm/core/agent/runtime/context.js +2 -0
  188. package/dist/esm/core/agent/runtime/context.js.map +1 -1
  189. package/dist/esm/core/agent/runtime/contracts.d.ts +1 -0
  190. package/dist/esm/core/agent/runtime/conversation/owner.js +7 -7
  191. package/dist/esm/core/agent/runtime/conversation/owner.js.map +1 -1
  192. package/dist/esm/core/agent/runtime/conversation/seedHistory.d.ts +1 -1
  193. package/dist/esm/core/agent/runtime/conversation/seedHistory.js +1 -1
  194. package/dist/esm/core/agent/runtime/conversation/seedHistory.js.map +1 -1
  195. package/dist/esm/core/agent/runtime/request/factory.js +3 -1
  196. package/dist/esm/core/agent/runtime/request/factory.js.map +1 -1
  197. package/dist/esm/core/agent/runtime/seed/factory.js +4 -1
  198. package/dist/esm/core/agent/runtime/seed/factory.js.map +1 -1
  199. package/dist/esm/core/agent/runtime/turn/owner.js +18 -4
  200. package/dist/esm/core/agent/runtime/turn/owner.js.map +1 -1
  201. package/dist/esm/core/agent/stages/callLLM/commitResponse.js +1 -1
  202. package/dist/esm/core/agent/stages/callLLM/commitResponse.js.map +1 -1
  203. package/dist/esm/core/agent/stages/callLLM/types.d.ts +1 -1
  204. package/dist/esm/core/agent/stages/prepareFinal.js +2 -19
  205. package/dist/esm/core/agent/stages/prepareFinal.js.map +1 -1
  206. package/dist/esm/core/agent/stages/seed.d.ts +2 -0
  207. package/dist/esm/core/agent/stages/seed.js +4 -17
  208. package/dist/esm/core/agent/stages/seed.js.map +1 -1
  209. package/dist/esm/core/agent/stages/seedTime.d.ts +11 -0
  210. package/dist/esm/core/agent/stages/seedTime.js +17 -0
  211. package/dist/esm/core/agent/stages/seedTime.js.map +1 -0
  212. package/dist/esm/core/agent/stages/timeLayer.js +69 -14
  213. package/dist/esm/core/agent/stages/timeLayer.js.map +1 -1
  214. package/dist/esm/core/agent/stages/toolCalls/execution/resumedInvocation.js +14 -9
  215. package/dist/esm/core/agent/stages/toolCalls/execution/resumedInvocation.js.map +1 -1
  216. package/dist/esm/core/agent/types/observation.d.ts +15 -0
  217. package/dist/esm/core/agent/types/state/response.d.ts +4 -0
  218. package/dist/esm/core/agent/types.d.ts +2 -15
  219. package/dist/esm/core/checkpointHistory.js +3 -0
  220. package/dist/esm/core/checkpointHistory.js.map +1 -1
  221. package/dist/esm/core/replyOrigin.d.ts +2 -0
  222. package/dist/esm/core/replyOrigin.js +38 -0
  223. package/dist/esm/core/replyOrigin.js.map +1 -0
  224. package/dist/esm/events/payloads/agent.d.ts +2 -0
  225. package/dist/esm/events/registry/memoryEvents.d.ts +14 -0
  226. package/dist/esm/events/registry/memoryEvents.js +2 -0
  227. package/dist/esm/events/registry/memoryEvents.js.map +1 -0
  228. package/dist/esm/events/registry/names.d.ts +1 -0
  229. package/dist/esm/events/registry/names.js +1 -0
  230. package/dist/esm/events/registry/names.js.map +1 -1
  231. package/dist/esm/events/registry.d.ts +3 -7
  232. package/dist/esm/events/registry.js +1 -0
  233. package/dist/esm/events/registry.js.map +1 -1
  234. package/dist/esm/memory-providers.d.ts +1 -1
  235. package/dist/esm/memory-providers.js.map +1 -1
  236. package/dist/esm/provider-contract/toolResultRecord.d.ts +10 -0
  237. package/dist/esm/provider-contract/types.d.ts +2 -2
  238. package/dist/esm/recorders/observability/commentary/commentaryTemplates/dispositions.js +1 -0
  239. package/dist/esm/recorders/observability/commentary/commentaryTemplates/dispositions.js.map +1 -1
  240. package/dist/esm/redaction/knownStrings/fields-1.d.ts +2 -2
  241. package/dist/esm/redaction/knownStrings/fields-1.js +2 -2
  242. package/dist/esm/redaction/knownStrings/fields-1.js.map +1 -1
  243. package/dist/esm/redaction/knownStrings/fields-2.d.ts +2 -0
  244. package/dist/esm/redaction/knownStrings/fields-2.js +2 -0
  245. package/dist/esm/redaction/knownStrings/fields-2.js.map +1 -1
  246. package/dist/esm/redaction/knownStrings/words-0.d.ts +2 -2
  247. package/dist/esm/redaction/knownStrings/words-0.js +2 -2
  248. package/dist/esm/redaction/knownStrings/words-0.js.map +1 -1
  249. package/dist/esm/redaction/knownStrings/words-1.d.ts +2 -2
  250. package/dist/esm/redaction/knownStrings/words-1.js +2 -2
  251. package/dist/esm/redaction/knownStrings/words-1.js.map +1 -1
  252. package/dist/esm/redaction/knownStrings/words-2.d.ts +2 -0
  253. package/dist/esm/redaction/knownStrings/words-2.js +2 -0
  254. package/dist/esm/redaction/knownStrings/words-2.js.map +1 -1
  255. package/dist/esm/semantics/coverage/period.js +12 -35
  256. package/dist/esm/semantics/coverage/period.js.map +1 -1
  257. package/dist/esm/semantics/coverage/shiftedPeriodConclusion.d.ts +20 -0
  258. package/dist/esm/semantics/coverage/shiftedPeriodConclusion.js +34 -0
  259. package/dist/esm/semantics/coverage/shiftedPeriodConclusion.js.map +1 -0
  260. package/dist/esm/time/bind.d.ts +11 -2
  261. package/dist/esm/time/bind.js +69 -3
  262. package/dist/esm/time/bind.js.map +1 -1
  263. package/dist/esm/time/check.d.ts +7 -5
  264. package/dist/esm/time/check.js +98 -31
  265. package/dist/esm/time/check.js.map +1 -1
  266. package/dist/esm/time/checkRecord.d.ts +2 -0
  267. package/dist/esm/time/checkRecord.js +6 -4
  268. package/dist/esm/time/checkRecord.js.map +1 -1
  269. package/dist/esm/time/clock.d.ts +8 -7
  270. package/dist/esm/time/clock.js +10 -6
  271. package/dist/esm/time/clock.js.map +1 -1
  272. package/dist/esm/time/convert/bounds.d.ts +11 -3
  273. package/dist/esm/time/convert/bounds.js +18 -1
  274. package/dist/esm/time/convert/bounds.js.map +1 -1
  275. package/dist/esm/time/convert/covering.d.ts +80 -0
  276. package/dist/esm/time/convert/covering.js +130 -0
  277. package/dist/esm/time/convert/covering.js.map +1 -0
  278. package/dist/esm/time/convert/exact.d.ts +3 -1
  279. package/dist/esm/time/convert/exact.js +46 -7
  280. package/dist/esm/time/convert/exact.js.map +1 -1
  281. package/dist/esm/time/convert/instants.js +9 -2
  282. package/dist/esm/time/convert/instants.js.map +1 -1
  283. package/dist/esm/time/convert/widen.d.ts +4 -1
  284. package/dist/esm/time/convert/widen.js +26 -1
  285. package/dist/esm/time/convert/widen.js.map +1 -1
  286. package/dist/esm/time/convert.d.ts +23 -0
  287. package/dist/esm/time/convert.js +93 -36
  288. package/dist/esm/time/convert.js.map +1 -1
  289. package/dist/esm/time/drift.d.ts +34 -2
  290. package/dist/esm/time/drift.js +61 -4
  291. package/dist/esm/time/drift.js.map +1 -1
  292. package/dist/esm/time/forms.js +29 -3
  293. package/dist/esm/time/forms.js.map +1 -1
  294. package/dist/esm/time/frozenDispatch.d.ts +14 -0
  295. package/dist/esm/time/frozenDispatch.js +48 -0
  296. package/dist/esm/time/frozenDispatch.js.map +1 -0
  297. package/dist/esm/time/present.d.ts +7 -6
  298. package/dist/esm/time/present.js +26 -12
  299. package/dist/esm/time/present.js.map +1 -1
  300. package/dist/esm/time/readingAsk.js +5 -2
  301. package/dist/esm/time/readingAsk.js.map +1 -1
  302. package/dist/esm/time/resolve/lookback.js +4 -1
  303. package/dist/esm/time/resolve/lookback.js.map +1 -1
  304. package/dist/esm/time/resolve.d.ts +3 -6
  305. package/dist/esm/time/resolve.js +9 -11
  306. package/dist/esm/time/resolve.js.map +1 -1
  307. package/dist/esm/time/resolveRecord.d.ts +2 -0
  308. package/dist/esm/time/resolveRecord.js +2 -0
  309. package/dist/esm/time/resolveRecord.js.map +1 -1
  310. package/dist/esm/time/rows/meaning.d.ts +2 -2
  311. package/dist/esm/time/rows/meaning.js +5 -1
  312. package/dist/esm/time/rows/meaning.js.map +1 -1
  313. package/dist/esm/time/rows/shapes.d.ts +7 -0
  314. package/dist/esm/time/rows/shapes.js +53 -0
  315. package/dist/esm/time/rows/shapes.js.map +1 -0
  316. package/dist/esm/time/rows/types.d.ts +24 -5
  317. package/dist/esm/time/rows.d.ts +2 -0
  318. package/dist/esm/time/rows.js +12 -34
  319. package/dist/esm/time/rows.js.map +1 -1
  320. package/dist/esm/time/rowsBuild.d.ts +2 -2
  321. package/dist/esm/time/rowsBuild.js +20 -5
  322. package/dist/esm/time/rowsBuild.js.map +1 -1
  323. package/dist/esm/time/windowEndpoint.d.ts +24 -0
  324. package/dist/esm/time/windowEndpoint.js +62 -0
  325. package/dist/esm/time/windowEndpoint.js.map +1 -0
  326. package/dist/esm/time/windows.d.ts +3 -0
  327. package/dist/esm/time/windows.js +22 -14
  328. package/dist/esm/time/windows.js.map +1 -1
  329. package/dist/events/registry/memoryEvents.js +3 -0
  330. package/dist/events/registry/memoryEvents.js.map +1 -0
  331. package/dist/events/registry/names.js +1 -0
  332. package/dist/events/registry/names.js.map +1 -1
  333. package/dist/events/registry.js +1 -0
  334. package/dist/events/registry.js.map +1 -1
  335. package/dist/memory-providers.js.map +1 -1
  336. package/dist/recorders/observability/commentary/commentaryTemplates/dispositions.js +1 -0
  337. package/dist/recorders/observability/commentary/commentaryTemplates/dispositions.js.map +1 -1
  338. package/dist/redaction/knownStrings/fields-1.js +2 -2
  339. package/dist/redaction/knownStrings/fields-1.js.map +1 -1
  340. package/dist/redaction/knownStrings/fields-2.js +2 -0
  341. package/dist/redaction/knownStrings/fields-2.js.map +1 -1
  342. package/dist/redaction/knownStrings/words-0.js +2 -2
  343. package/dist/redaction/knownStrings/words-0.js.map +1 -1
  344. package/dist/redaction/knownStrings/words-1.js +2 -2
  345. package/dist/redaction/knownStrings/words-1.js.map +1 -1
  346. package/dist/redaction/knownStrings/words-2.js +2 -0
  347. package/dist/redaction/knownStrings/words-2.js.map +1 -1
  348. package/dist/semantics/coverage/period.js +12 -35
  349. package/dist/semantics/coverage/period.js.map +1 -1
  350. package/dist/semantics/coverage/shiftedPeriodConclusion.js +38 -0
  351. package/dist/semantics/coverage/shiftedPeriodConclusion.js.map +1 -0
  352. package/dist/time/bind.js +71 -4
  353. package/dist/time/bind.js.map +1 -1
  354. package/dist/time/check.js +98 -31
  355. package/dist/time/check.js.map +1 -1
  356. package/dist/time/checkRecord.js +5 -3
  357. package/dist/time/checkRecord.js.map +1 -1
  358. package/dist/time/clock.js +10 -6
  359. package/dist/time/clock.js.map +1 -1
  360. package/dist/time/convert/bounds.js +19 -1
  361. package/dist/time/convert/bounds.js.map +1 -1
  362. package/dist/time/convert/covering.js +137 -0
  363. package/dist/time/convert/covering.js.map +1 -0
  364. package/dist/time/convert/exact.js +46 -6
  365. package/dist/time/convert/exact.js.map +1 -1
  366. package/dist/time/convert/instants.js +9 -2
  367. package/dist/time/convert/instants.js.map +1 -1
  368. package/dist/time/convert/widen.js +27 -1
  369. package/dist/time/convert/widen.js.map +1 -1
  370. package/dist/time/convert.js +90 -33
  371. package/dist/time/convert.js.map +1 -1
  372. package/dist/time/drift.js +63 -5
  373. package/dist/time/drift.js.map +1 -1
  374. package/dist/time/forms.js +29 -3
  375. package/dist/time/forms.js.map +1 -1
  376. package/dist/time/frozenDispatch.js +53 -0
  377. package/dist/time/frozenDispatch.js.map +1 -0
  378. package/dist/time/present.js +26 -12
  379. package/dist/time/present.js.map +1 -1
  380. package/dist/time/readingAsk.js +4 -1
  381. package/dist/time/readingAsk.js.map +1 -1
  382. package/dist/time/resolve/lookback.js +4 -1
  383. package/dist/time/resolve/lookback.js.map +1 -1
  384. package/dist/time/resolve.js +9 -11
  385. package/dist/time/resolve.js.map +1 -1
  386. package/dist/time/resolveRecord.js +2 -0
  387. package/dist/time/resolveRecord.js.map +1 -1
  388. package/dist/time/rows/meaning.js +5 -1
  389. package/dist/time/rows/meaning.js.map +1 -1
  390. package/dist/time/rows/shapes.js +58 -0
  391. package/dist/time/rows/shapes.js.map +1 -0
  392. package/dist/time/rows.js +14 -36
  393. package/dist/time/rows.js.map +1 -1
  394. package/dist/time/rowsBuild.js +20 -5
  395. package/dist/time/rowsBuild.js.map +1 -1
  396. package/dist/time/windowEndpoint.js +70 -0
  397. package/dist/time/windowEndpoint.js.map +1 -0
  398. package/dist/time/windows.js +22 -14
  399. package/dist/time/windows.js.map +1 -1
  400. package/dist/types/adapters/memory/agentcore/contract.d.ts +254 -0
  401. package/dist/types/adapters/memory/agentcore/contract.d.ts.map +1 -0
  402. package/dist/types/adapters/memory/agentcore/eventPayload.d.ts +38 -0
  403. package/dist/types/adapters/memory/agentcore/eventPayload.d.ts.map +1 -0
  404. package/dist/types/adapters/memory/agentcore/identity.d.ts +100 -0
  405. package/dist/types/adapters/memory/agentcore/identity.d.ts.map +1 -0
  406. package/dist/types/adapters/memory/agentcore/namespace.d.ts +103 -0
  407. package/dist/types/adapters/memory/agentcore/namespace.d.ts.map +1 -0
  408. package/dist/types/adapters/memory/agentcore/sdkClient.d.ts +20 -0
  409. package/dist/types/adapters/memory/agentcore/sdkClient.d.ts.map +1 -0
  410. package/dist/types/adapters/memory/agentcore/store.d.ts +162 -0
  411. package/dist/types/adapters/memory/agentcore/store.d.ts.map +1 -0
  412. package/dist/types/adapters/memory/agentcore/storedEntry.d.ts +72 -0
  413. package/dist/types/adapters/memory/agentcore/storedEntry.d.ts.map +1 -0
  414. package/dist/types/adapters/memory/agentcore.d.ts +7 -436
  415. package/dist/types/adapters/memory/agentcore.d.ts.map +1 -1
  416. package/dist/types/adapters/observability/auditShapes/events/lifecycle.d.ts.map +1 -1
  417. package/dist/types/adapters/observability/auditShapes/events/resources.d.ts +1 -0
  418. package/dist/types/adapters/observability/auditShapes/events/resources.d.ts.map +1 -1
  419. package/dist/types/core/Agent.d.ts +5 -2
  420. package/dist/types/core/Agent.d.ts.map +1 -1
  421. package/dist/types/core/agent/arguments/ask/types.d.ts +1 -1
  422. package/dist/types/core/agent/arguments/ask/types.d.ts.map +1 -1
  423. package/dist/types/core/agent/arguments/ask/windowBinding/answer.d.ts.map +1 -1
  424. package/dist/types/core/agent/arguments/ask/windowBinding/fills.d.ts +2 -3
  425. package/dist/types/core/agent/arguments/ask/windowBinding/fills.d.ts.map +1 -1
  426. package/dist/types/core/agent/arguments/ask/windowBinding/types.d.ts +2 -0
  427. package/dist/types/core/agent/arguments/ask/windowBinding/types.d.ts.map +1 -1
  428. package/dist/types/core/agent/arguments/dispatch.d.ts +5 -1
  429. package/dist/types/core/agent/arguments/dispatch.d.ts.map +1 -1
  430. package/dist/types/core/agent/arguments/resolve.d.ts +7 -3
  431. package/dist/types/core/agent/arguments/resolve.d.ts.map +1 -1
  432. package/dist/types/core/agent/arguments/serve/fills.d.ts +6 -2
  433. package/dist/types/core/agent/arguments/serve/fills.d.ts.map +1 -1
  434. package/dist/types/core/agent/arguments/serve/windows.d.ts.map +1 -1
  435. package/dist/types/core/agent/arguments/wider.d.ts +11 -0
  436. package/dist/types/core/agent/arguments/wider.d.ts.map +1 -0
  437. package/dist/types/core/agent/assistantReplay.d.ts +11 -0
  438. package/dist/types/core/agent/assistantReplay.d.ts.map +1 -1
  439. package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
  440. package/dist/types/core/agent/buildDynamicAgentChart.d.ts.map +1 -1
  441. package/dist/types/core/agent/chartContract.d.ts +1 -0
  442. package/dist/types/core/agent/chartContract.d.ts.map +1 -1
  443. package/dist/types/core/agent/composeRequest.d.ts.map +1 -1
  444. package/dist/types/core/agent/hostEnd/chart.d.ts +5 -0
  445. package/dist/types/core/agent/hostEnd/chart.d.ts.map +1 -0
  446. package/dist/types/core/agent/hostEnd/delivery.d.ts +19 -0
  447. package/dist/types/core/agent/hostEnd/delivery.d.ts.map +1 -0
  448. package/dist/types/core/agent/hostEnd/entry.d.ts +15 -0
  449. package/dist/types/core/agent/hostEnd/entry.d.ts.map +1 -0
  450. package/dist/types/core/agent/hostEnd/projection.d.ts +10 -0
  451. package/dist/types/core/agent/hostEnd/projection.d.ts.map +1 -0
  452. package/dist/types/core/agent/hostEnd/settle.d.ts +8 -0
  453. package/dist/types/core/agent/hostEnd/settle.d.ts.map +1 -0
  454. package/dist/types/core/agent/memoryWrites.d.ts +5 -0
  455. package/dist/types/core/agent/memoryWrites.d.ts.map +1 -0
  456. package/dist/types/core/agent/runValues.d.ts +5 -0
  457. package/dist/types/core/agent/runValues.d.ts.map +1 -1
  458. package/dist/types/core/agent/runtime/chart/chartDependencies.d.ts +3 -2
  459. package/dist/types/core/agent/runtime/chart/chartDependencies.d.ts.map +1 -1
  460. package/dist/types/core/agent/runtime/configuration/configure.d.ts.map +1 -1
  461. package/dist/types/core/agent/runtime/configuration/types.d.ts +1 -0
  462. package/dist/types/core/agent/runtime/configuration/types.d.ts.map +1 -1
  463. package/dist/types/core/agent/runtime/configuration/values.d.ts +1 -0
  464. package/dist/types/core/agent/runtime/configuration/values.d.ts.map +1 -1
  465. package/dist/types/core/agent/runtime/context.d.ts.map +1 -1
  466. package/dist/types/core/agent/runtime/contracts.d.ts +1 -0
  467. package/dist/types/core/agent/runtime/contracts.d.ts.map +1 -1
  468. package/dist/types/core/agent/runtime/conversation/owner.d.ts.map +1 -1
  469. package/dist/types/core/agent/runtime/conversation/seedHistory.d.ts +1 -1
  470. package/dist/types/core/agent/runtime/conversation/seedHistory.d.ts.map +1 -1
  471. package/dist/types/core/agent/runtime/request/factory.d.ts.map +1 -1
  472. package/dist/types/core/agent/runtime/seed/factory.d.ts.map +1 -1
  473. package/dist/types/core/agent/runtime/turn/owner.d.ts.map +1 -1
  474. package/dist/types/core/agent/stages/callLLM/types.d.ts +1 -1
  475. package/dist/types/core/agent/stages/callLLM/types.d.ts.map +1 -1
  476. package/dist/types/core/agent/stages/prepareFinal.d.ts.map +1 -1
  477. package/dist/types/core/agent/stages/seed.d.ts +2 -0
  478. package/dist/types/core/agent/stages/seed.d.ts.map +1 -1
  479. package/dist/types/core/agent/stages/seedTime.d.ts +12 -0
  480. package/dist/types/core/agent/stages/seedTime.d.ts.map +1 -0
  481. package/dist/types/core/agent/stages/timeLayer.d.ts.map +1 -1
  482. package/dist/types/core/agent/stages/toolCalls/execution/resumedInvocation.d.ts.map +1 -1
  483. package/dist/types/core/agent/types/observation.d.ts +15 -0
  484. package/dist/types/core/agent/types/observation.d.ts.map +1 -1
  485. package/dist/types/core/agent/types/state/response.d.ts +4 -0
  486. package/dist/types/core/agent/types/state/response.d.ts.map +1 -1
  487. package/dist/types/core/agent/types.d.ts +2 -15
  488. package/dist/types/core/agent/types.d.ts.map +1 -1
  489. package/dist/types/core/checkpointHistory.d.ts.map +1 -1
  490. package/dist/types/core/replyOrigin.d.ts +3 -0
  491. package/dist/types/core/replyOrigin.d.ts.map +1 -0
  492. package/dist/types/events/payloads/agent.d.ts +2 -0
  493. package/dist/types/events/payloads/agent.d.ts.map +1 -1
  494. package/dist/types/events/registry/memoryEvents.d.ts +15 -0
  495. package/dist/types/events/registry/memoryEvents.d.ts.map +1 -0
  496. package/dist/types/events/registry/names.d.ts +1 -0
  497. package/dist/types/events/registry/names.d.ts.map +1 -1
  498. package/dist/types/events/registry.d.ts +3 -7
  499. package/dist/types/events/registry.d.ts.map +1 -1
  500. package/dist/types/memory-providers.d.ts +1 -1
  501. package/dist/types/memory-providers.d.ts.map +1 -1
  502. package/dist/types/provider-contract/toolResultRecord.d.ts +10 -0
  503. package/dist/types/provider-contract/toolResultRecord.d.ts.map +1 -1
  504. package/dist/types/provider-contract/types.d.ts +2 -2
  505. package/dist/types/provider-contract/types.d.ts.map +1 -1
  506. package/dist/types/recorders/observability/commentary/commentaryTemplates/dispositions.d.ts.map +1 -1
  507. package/dist/types/redaction/knownStrings/fields-1.d.ts +2 -2
  508. package/dist/types/redaction/knownStrings/fields-2.d.ts +2 -0
  509. package/dist/types/redaction/knownStrings/fields-2.d.ts.map +1 -1
  510. package/dist/types/redaction/knownStrings/words-0.d.ts +2 -2
  511. package/dist/types/redaction/knownStrings/words-1.d.ts +2 -2
  512. package/dist/types/redaction/knownStrings/words-2.d.ts +2 -0
  513. package/dist/types/redaction/knownStrings/words-2.d.ts.map +1 -1
  514. package/dist/types/semantics/coverage/period.d.ts.map +1 -1
  515. package/dist/types/semantics/coverage/shiftedPeriodConclusion.d.ts +21 -0
  516. package/dist/types/semantics/coverage/shiftedPeriodConclusion.d.ts.map +1 -0
  517. package/dist/types/time/bind.d.ts +11 -2
  518. package/dist/types/time/bind.d.ts.map +1 -1
  519. package/dist/types/time/check.d.ts +7 -5
  520. package/dist/types/time/check.d.ts.map +1 -1
  521. package/dist/types/time/checkRecord.d.ts +2 -0
  522. package/dist/types/time/checkRecord.d.ts.map +1 -1
  523. package/dist/types/time/clock.d.ts +8 -7
  524. package/dist/types/time/clock.d.ts.map +1 -1
  525. package/dist/types/time/convert/bounds.d.ts +11 -3
  526. package/dist/types/time/convert/bounds.d.ts.map +1 -1
  527. package/dist/types/time/convert/covering.d.ts +81 -0
  528. package/dist/types/time/convert/covering.d.ts.map +1 -0
  529. package/dist/types/time/convert/exact.d.ts +3 -1
  530. package/dist/types/time/convert/exact.d.ts.map +1 -1
  531. package/dist/types/time/convert/instants.d.ts.map +1 -1
  532. package/dist/types/time/convert/widen.d.ts +4 -1
  533. package/dist/types/time/convert/widen.d.ts.map +1 -1
  534. package/dist/types/time/convert.d.ts +23 -0
  535. package/dist/types/time/convert.d.ts.map +1 -1
  536. package/dist/types/time/drift.d.ts +34 -2
  537. package/dist/types/time/drift.d.ts.map +1 -1
  538. package/dist/types/time/forms.d.ts.map +1 -1
  539. package/dist/types/time/frozenDispatch.d.ts +15 -0
  540. package/dist/types/time/frozenDispatch.d.ts.map +1 -0
  541. package/dist/types/time/present.d.ts +7 -6
  542. package/dist/types/time/present.d.ts.map +1 -1
  543. package/dist/types/time/resolve/lookback.d.ts.map +1 -1
  544. package/dist/types/time/resolve.d.ts +3 -6
  545. package/dist/types/time/resolve.d.ts.map +1 -1
  546. package/dist/types/time/resolveRecord.d.ts +2 -0
  547. package/dist/types/time/resolveRecord.d.ts.map +1 -1
  548. package/dist/types/time/rows/meaning.d.ts +2 -2
  549. package/dist/types/time/rows/meaning.d.ts.map +1 -1
  550. package/dist/types/time/rows/shapes.d.ts +8 -0
  551. package/dist/types/time/rows/shapes.d.ts.map +1 -0
  552. package/dist/types/time/rows/types.d.ts +24 -5
  553. package/dist/types/time/rows/types.d.ts.map +1 -1
  554. package/dist/types/time/rows.d.ts +2 -0
  555. package/dist/types/time/rows.d.ts.map +1 -1
  556. package/dist/types/time/rowsBuild.d.ts +2 -2
  557. package/dist/types/time/rowsBuild.d.ts.map +1 -1
  558. package/dist/types/time/windowEndpoint.d.ts +25 -0
  559. package/dist/types/time/windowEndpoint.d.ts.map +1 -0
  560. package/dist/types/time/windows.d.ts +3 -0
  561. package/dist/types/time/windows.d.ts.map +1 -1
  562. package/package.json +1 -1
@@ -14,8 +14,9 @@
14
14
  * `DeleteEvent`, `@aws-sdk/client-bedrock-agentcore`):
15
15
  * MemoryIdentity.{tenant,principal} ↔ AgentCore `actorId`
16
16
  * MemoryIdentity.conversationId ↔ AgentCore `sessionId`
17
- * MemoryEntry ↔ one event whose `payload` is a single
18
- * `blob` document holding the entry
17
+ * MemoryEntry ↔ one event whose canonical `blob`
18
+ * retains the entry, optionally beside
19
+ * an explicit conversational item
19
20
  *
20
21
  * **AgentCore Memory is an append-only event log, not a key-value store.** The server
21
22
  * assigns each event's `eventId` on `CreateEvent` (you cannot choose it), and there is no
@@ -42,1086 +43,7 @@
42
43
  * Role: Outer ring. Lazy-requires the AWS SDK; zero runtime cost when another adapter is
43
44
  * in use. Emits: N/A (storage adapters don't emit).
44
45
  */
45
- import { storeRequestLimit } from '../../memory/store/requestLimit.js';
46
- import { IDENTITY_ABSENT, identityNamespace } from '../../memory/identity/index.js';
47
- import { lazyRequire } from '../../lib/lazyRequire.js';
48
- import { describeStoredShape } from '../../lib/storedPreview.js';
49
- import { refuseUnhonouredWriteOptions, requestedWriteOptions, } from '../../memory/store/writeOptions.js';
50
- /**
51
- * ListEvents.maxResults: integer 1..100 (AWS API reference, verified 2026-10-19).
52
- * https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_ListEvents.html
53
- */
54
- const MAX_EVENT_PAGE_SIZE = 100;
55
- /**
56
- * RetrieveMemoryRecords.maxResults and SearchCriteria.topK both admit 1..100.
57
- * https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_RetrieveMemoryRecords.html
58
- * https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_SearchCriteria.html
59
- */
60
- const MAX_RETRIEVAL_RESULTS = 100;
61
- /** What this store honours when its client forwards CreateEvent's extraction fields. */
62
- const AGENTCORE_WRITE_OPTIONS = Object.freeze([
63
- 'extraction',
64
- 'namespaceScope',
65
- ]);
66
- /**
67
- * ── Namespace variables: AgentCore's domain, checked here ──
68
- *
69
- * From the AgentCore API reference, `ExtractionConfig.namespaceVariables`: at
70
- * most 5 entries; keys 1–32 characters matching
71
- * `(?!memoryStrategyId$|actorId$|sessionId$)[a-z][a-z0-9]*`; values 1–64
72
- * characters matching `[a-z0-9][a-z0-9-_]*`.
73
- *
74
- * Checked BEFORE the write rather than left to AgentCore, for one reason: its
75
- * `ValidationException` may quote the rejected value, and the value names a
76
- * tenant — a refusal here names the variable and the rule, never the value.
77
- */
78
- const MAX_NAMESPACE_VARIABLES = 5;
79
- /** The refusal of a scope-less write or search on a store that requires one. */
80
- const MISSING_SCOPE = (what) => `AgentCoreStore: this ${what} carries no \`namespaceScope\`, and the store requires one — it ` +
81
- 'was built with `requireNamespaceScope: true`, or it has already served scoped calls. It is ' +
82
- 'refused rather than run under a namespace no tenant owns. Scope the memory that made it ' +
83
- '(`defineMemory({ namespaceScope })`).';
84
- /**
85
- * Refuse, before any call, an identity this store cannot address: not an
86
- * object, or no `conversationId` — an absent one would encode to ONE session
87
- * every such identity shares.
88
- */
89
- function assertAddressable(identity) {
90
- if (identity === null || typeof identity !== 'object') {
91
- throw new TypeError('AgentCoreStore: an identity is required — got none.');
92
- }
93
- const { conversationId, tenant, principal } = identity;
94
- if (typeof conversationId !== 'string' || conversationId === '') {
95
- throw new TypeError('AgentCoreStore: the identity has no `conversationId`. It is refused rather than filed ' +
96
- 'under one session every such identity would share.');
97
- }
98
- for (const [name, value] of [
99
- ['tenant', tenant],
100
- ['principal', principal],
101
- ]) {
102
- if (value !== undefined && value !== null && typeof value !== 'string') {
103
- throw new TypeError(`AgentCoreStore: the identity's \`${name}\` must be a string.`);
104
- }
105
- }
106
- }
107
- /**
108
- * Refuse a search namespace that names no place: not a string, empty, or no
109
- * path segment at all (`''`, `'/'`) — AgentCore matches a prefix, and an empty
110
- * prefix is every record of the memory.
111
- */
112
- function assertNamespace(namespace) {
113
- if (typeof namespace !== 'string' || pathOf(namespace).replace(/^\//, '') === '') {
114
- throw new TypeError('AgentCoreStore.search(): `searchNamespace` returned no namespace — an empty prefix ' +
115
- 'matches every record of the memory, so it is refused. Return a namespace with at ' +
116
- 'least one path segment.');
117
- }
118
- }
119
- const NAMESPACE_KEY = /^(?!memoryStrategyId$|actorId$|sessionId$)[a-z][a-z0-9]{0,31}$/;
120
- const NAMESPACE_VALUE = /^[a-z0-9][a-z0-9_-]{0,63}$/;
121
- const NAMESPACE_VALUE_MAX = 64;
122
- /** Refuse, by variable name and rule, a scope AgentCore would reject. */
123
- function checkNamespaceVariables(scope) {
124
- const keys = Object.keys(scope);
125
- if (keys.length > MAX_NAMESPACE_VARIABLES) {
126
- throw new TypeError(`AgentCoreStore: a namespaceScope may carry at most ${MAX_NAMESPACE_VARIABLES} variables ` +
127
- `(AgentCore's limit); this one has ${keys.length}.`);
128
- }
129
- for (const key of keys) {
130
- if (!NAMESPACE_KEY.test(key)) {
131
- throw new TypeError(`AgentCoreStore: the namespace variable name ${JSON.stringify(key)} is not one ` +
132
- 'AgentCore admits — 1–32 characters, a lowercase letter then lowercase letters or ' +
133
- 'digits (and not memoryStrategyId / actorId / sessionId).');
134
- }
135
- const value = scope[key];
136
- if (typeof value !== 'string' || !NAMESPACE_VALUE.test(value)) {
137
- throw new TypeError(`AgentCoreStore: the value of namespace variable ${JSON.stringify(key)} is not one ` +
138
- 'AgentCore admits — 1–64 characters of [a-z0-9-_], starting with a letter or digit. ' +
139
- 'It is not quoted here: it names a tenant. Map your id with ' +
140
- '`agentCoreNamespaceValue(...)`, which is one-to-one and fits this alphabet.');
141
- }
142
- }
143
- }
144
- /**
145
- * A scope as the store uses it: read ONCE into a frozen plain copy, so the value
146
- * that is checked is the value that is sent — a getter, or an object the
147
- * caller's resolver reuses and edits, cannot change it between the two.
148
- */
149
- function frozenScope(scope) {
150
- return Object.freeze(Object.fromEntries(Object.entries(scope)));
151
- }
152
- /**
153
- * A search under a namespace scope must stay inside it — checked by RENDERING,
154
- * not by looking: `searchNamespace` is asked again with every value replaced
155
- * by a canary, and the two namespaces must agree segment for segment — each
156
- * canary's segment holding exactly that variable's real value, every other
157
- * segment the same literal. So a namespace that ignores the scope, puts a
158
- * variable inside a segment, or merely happens to contain a value elsewhere
159
- * (a tenant named like a literal segment) is refused, naming the variable and
160
- * never quoting its value.
161
- */
162
- function assertSearchWithinScope(render, namespace, namespaceScope) {
163
- const variables = Object.keys(namespaceScope);
164
- const nonce = globalThis.crypto.randomUUID();
165
- const canaries = variables.map((_, i) => `canary${i}-${nonce}`);
166
- const canaryScope = Object.fromEntries(variables.map((v, i) => [v, canaries[i]]));
167
- const real = namespace.split('/');
168
- const probe = render(canaryScope).split('/');
169
- const refuse = (variable) => {
170
- throw new TypeError(`AgentCoreStore.search(): the namespace searched does not hold namespace variable ` +
171
- `${JSON.stringify(variable)} as a path segment of its own, so it could read records ` +
172
- 'filed under another tenant’s scope. Build `searchNamespace` from the ' +
173
- '`namespaceScope` it is handed, one variable per segment (e.g. ' +
174
- '"/tenants/{tenantid}/actors/{actorId}/facts").');
175
- };
176
- const seen = new Set();
177
- if (real.length !== probe.length)
178
- refuse(variables[0] ?? 'namespaceScope');
179
- probe.forEach((segment, i) => {
180
- const at = canaries.indexOf(segment);
181
- if (at === -1) {
182
- if (real[i] !== segment)
183
- refuse(variables[0] ?? 'namespaceScope');
184
- return;
185
- }
186
- const variable = variables[at];
187
- if (real[i] !== namespaceScope[variable])
188
- refuse(variable);
189
- seen.add(variable);
190
- });
191
- for (const variable of variables)
192
- if (!seen.has(variable))
193
- refuse(variable);
194
- }
195
- /**
196
- * Does `namespace` hold `actorId` as whole path segments? (An actor id can
197
- * itself contain `/`, its escape.)
198
- */
199
- function holdsActor(namespace, actorId) {
200
- return `/${pathOf(namespace).replace(/^\//, '')}/`.includes(`/${actorId}/`);
201
- }
202
- /**
203
- * A caller's value — a tenant id — in the alphabet AgentCore admits for a
204
- * namespace variable, ONE-TO-ONE.
205
- *
206
- * The alphabet is narrow (`[a-z0-9][a-z0-9-_]*`, at most 64 characters), so the
207
- * easy mappings fold: lowercasing merges `Acme` with `acme`, stripping merges
208
- * `a.b` with `ab`, truncating merges any two long ids that share a prefix — and
209
- * a fold here files two tenants' derived records under one namespace. This is
210
- * the same law as the actor and session ids above, in this alphabet:
211
- *
212
- * - `[a-z0-9-]` passes through; every other UTF-16 code unit becomes `_`
213
- * plus its four lowercase hex digits (fixed width, so it decodes);
214
- * - every value starts with `v`, so one whose first character had to be
215
- * escaped still starts with a letter — and no two inputs share an output;
216
- * - every value ENDS with `_z`, which cannot occur inside an encoding (an
217
- * `_` there is always followed by four hex digits) — so no tenant's value
218
- * is the beginning of another's (`1` and `12` would otherwise be `v1` and
219
- * `v12`), and a prefix match over namespaces cannot reach a neighbour;
220
- * - too long is REFUSED, never truncated.
221
- *
222
- * `agentCoreNamespaceValue('acme')` is `'vacme_z'`; `'Acme'` is `'v_0041cme_z'`.
223
- * Use the same mapping wherever the namespace is read back (`searchNamespace`).
224
- *
225
- * @throws {TypeError} for an empty value — an absent tenant is not a tenant
226
- * @throws {RangeError} when the encoding exceeds 64 characters (the value is
227
- * not quoted: it names a tenant)
228
- */
229
- export function agentCoreNamespaceValue(raw) {
230
- if (typeof raw !== 'string' || raw === '') {
231
- throw new TypeError('agentCoreNamespaceValue: needs a non-empty string — an absent tenant is not a tenant, ' +
232
- 'and giving it a stand-in value would share that namespace with whoever is named it.');
233
- }
234
- let out = 'v';
235
- for (let i = 0; i < raw.length; i++) {
236
- const ch = raw[i];
237
- out += /[a-z0-9-]/.test(ch) ? ch : `_${raw.charCodeAt(i).toString(16).padStart(4, '0')}`;
238
- }
239
- out += '_z';
240
- if (out.length > NAMESPACE_VALUE_MAX) {
241
- throw new RangeError(`agentCoreNamespaceValue: this value encodes to ${out.length} characters, over AgentCore's ` +
242
- `${NAMESPACE_VALUE_MAX}. It is not truncated to fit — two ids truncated to one value ` +
243
- 'share a namespace. The value is not quoted here: it names a tenant.');
244
- }
245
- return out;
246
- }
247
- /**
248
- * Thrown when an event carries a blob that is **present but unreadable** where a
249
- * `MemoryEntry` should be.
250
- *
251
- * The same law the session store inherits from `hosting/envelope`, applied to
252
- * this port's own shape: an unreadable stored memory and an absent one are
253
- * different facts, and only one of them is safe to answer with silence. A
254
- * memory that exists and cannot be decoded, quietly skipped, is an agent that
255
- * answers as if it were never told — indistinguishable from working, until
256
- * somebody notices the assistant has forgotten a customer's address.
257
- *
258
- * ── Why the law lives HERE and not in a shared reader ────────────────────────
259
- * `MemoryStore` has no envelope and no shared reading path — nothing on this
260
- * port corresponds to `hosting`'s `readFormat`, the single choke point every
261
- * session adapter reads through — so the refusal belongs at the one place raw
262
- * bytes become an entry: this adapter's decode step. If a `MemoryStore` reading
263
- * path ever grows such a choke point, the law moves there and this becomes a
264
- * caller of it.
265
- *
266
- * ── Why this one QUOTES NOTHING, where the session refusal quotes a prefix ───
267
- * Same discipline — "never the stored content" — and the same shared helper, but
268
- * a different answer, because the two shapes differ in where content begins. A
269
- * `CheckpointEnvelope` opens `{ format, data, savedAt }`, so a capped prefix is
270
- * metadata. A `MemoryEntry` opens `{ id, value, … }`, so its SECOND field is the
271
- * thing somebody asked the agent to remember, and even a short prefix would
272
- * print it. `storedShape` therefore reports type, length, JSON-ness and the
273
- * opening character and nothing else — still enough to recognise "an object
274
- * stringified by something that was not JSON", which is the only diagnosis this
275
- * message needs to support.
276
- */
277
- export class UnreadableMemoryEntryError extends TypeError {
278
- code = 'ERR_UNREADABLE_MEMORY_ENTRY';
279
- /** AgentCore's id for the event those bytes came from. */
280
- eventId;
281
- /** The AgentCore session (this store's conversation) it was stored under. */
282
- sessionId;
283
- /**
284
- * What came back, described by SHAPE — type, length, JSON-ness, opening
285
- * character. Never a quote: on this port the stored bytes are the memory.
286
- */
287
- storedShape;
288
- constructor(input) {
289
- const shape = describeStoredShape(input.stored);
290
- super(`[memory] AgentCoreStore: event '${input.eventId}' in session '${input.sessionId}' holds ` +
291
- `a STORED memory this adapter cannot read. An unreadable stored memory and an absent ` +
292
- `one are different facts, and only one of them is safe to answer with silence — so ` +
293
- `this refuses rather than handing back a shorter list that reads as "nothing was ` +
294
- `remembered". What the store handed back is ${shape}; none of it is quoted here, ` +
295
- `because on this port those bytes ARE the memory. Entries written before 7.22.1 were ` +
296
- `stored as objects and come back as this service's own toString() rendering, which is ` +
297
- `lossy and cannot be decoded: delete them, or point this store at a fresh memory ` +
298
- `resource.`);
299
- this.name = 'UnreadableMemoryEntryError';
300
- this.eventId = input.eventId;
301
- this.sessionId = input.sessionId;
302
- this.storedShape = shape;
303
- }
304
- }
305
- /**
306
- * ── The AgentCore id encoders: the tenant boundary, in AWS's alphabet ──
307
- *
308
- * `actorId` and `sessionId` are where a `MemoryIdentity` becomes the address
309
- * AgentCore stores rows under, so the same law `identity/encode.ts` states
310
- * applies here word for word: the mapping must be **injective**, because two
311
- * tuples that spell one id are one scope reading and overwriting another's
312
- * memory — no race, no misconfiguration, just arithmetic.
313
- *
314
- * It was not. Until this fix the id was a lossy slug: every character outside
315
- * `[A-Za-z0-9_-]` became `-`, so `a.b`, `a/b` and `a b` were one actor; and the
316
- * two fields were joined with a bare `_`, so tenant `a_b` + principal `c` was
317
- * the same actor as tenant `a` + principal `b_c`. Both are cross-tenant.
318
- *
319
- * **Why this cannot call `encodeIdentityField`.** The shared encoder escapes to
320
- * `%25`/`%2F`/`%5F`, and AWS admits no `%` in either id. The constraints, read
321
- * from the AgentCore Memory data-plane API reference (`CreateEvent`, verified
322
- * 2026-08) rather than assumed, are:
323
- *
324
- * actorId 1..255 `[a-zA-Z0-9][a-zA-Z0-9-_/]*(?::[a-zA-Z0-9-_/]+)*[a-zA-Z0-9-_/]*`
325
- * sessionId 1..100 `[a-zA-Z0-9][a-zA-Z0-9-_]*`
326
- *
327
- * So the LAW is borrowed and the code is not: same three rules (escape the
328
- * escape, escape the separator, keep a present value off the absence marker),
329
- * a different alphabet. `shadowKey` below still delegates to the shared
330
- * encoder, because a process-local Map key has no charset to obey.
331
- *
332
- * **What is preserved byte for byte.** A field made only of `[A-Za-z0-9-]`
333
- * passes through untouched, and the joiner and the absence marker are the ones
334
- * this adapter always used — so `{ tenant: 'acme', principal: 'alice' }` is
335
- * still `afp-acme_alice`, and an omitted tenant is still a bare `_`. That is
336
- * what makes the fix deployable: an existing row written under a simple id
337
- * keeps its address. The ids that move are the ones that were sharing an
338
- * address with somebody else, and those were already broken.
339
- *
340
- * `_` is the one character a well-behaved-looking value does NOT keep: it is
341
- * the field joiner and the absence marker, so a value containing it must be
342
- * escaped or it would donate a field boundary — exactly what `/` does in the
343
- * shared encoder.
344
- */
345
- /** AgentCore's own maxima, not a shared guess — see the note above. */
346
- const ACTOR_ID_MAX = 255;
347
- const SESSION_ID_MAX = 100;
348
- /** Characters an escaped segment carries through unchanged. */
349
- const VERBATIM_ID_CHAR = /[A-Za-z0-9-]/;
350
- /**
351
- * Escape one identity field into AgentCore's alphabet, reversibly.
352
- *
353
- * Every code unit outside {@link VERBATIM_ID_CHAR} becomes `introducer` + its
354
- * four-digit hex — fixed width, so a decoder reading `introducer` always knows
355
- * exactly how much to consume, which is what makes this a left inverse and
356
- * therefore injective.
357
- *
358
- * The escape character escapes ITSELF for free here, and that is deliberate:
359
- * `identity/encode.ts` has to order its two `.replace()` passes so `%` goes
360
- * first (reverse them and `a%2Fb` lands on the value that produced it). A
361
- * single left-to-right pass over code units has no ordering to get wrong — the
362
- * introducer is simply not in the verbatim set, so it is escaped like any other
363
- * character. Do not "optimise" this back into chained replaces.
364
- *
365
- * Code UNITS, not code points: a lone surrogate is a legal JS string and would
366
- * be flattened to U+FFFD by a UTF-8 pass, which is a collision.
367
- */
368
- function escapeIdSegment(raw, introducer) {
369
- let out = '';
370
- for (let i = 0; i < raw.length; i++) {
371
- const ch = raw[i];
372
- out += VERBATIM_ID_CHAR.test(ch)
373
- ? ch
374
- : introducer + raw.charCodeAt(i).toString(16).toUpperCase().padStart(4, '0');
375
- }
376
- return out;
377
- }
378
- /**
379
- * One half of the actor tuple. Absence has exactly one spelling — `undefined`,
380
- * `null` and `''` all mean "not given" — and it is {@link IDENTITY_ABSENT},
381
- * the same sentinel the shared encoder uses.
382
- *
383
- * A present value can never spell the sentinel, because `_` is not verbatim:
384
- * a tenant literally named `_` encodes to `/005F`. That is the third rule,
385
- * satisfied by construction rather than by a special case.
386
- */
387
- function actorSegment(raw) {
388
- return raw === undefined || raw === null || raw === ''
389
- ? IDENTITY_ABSENT
390
- : escapeIdSegment(raw, '/');
391
- }
392
- /**
393
- * Apply AgentCore's length ceiling — by refusing, never by truncating.
394
- *
395
- * Truncation (with or without a hash tail, which is what this adapter used to
396
- * do) maps infinitely many identities onto finitely many ids, so it cannot be
397
- * injective: it converts "your id is too long" into "your tenant occasionally
398
- * reads someone else's memory", silently. A caller can shorten an id; a caller
399
- * cannot detect a collision.
400
- *
401
- * The offending value is NOT quoted. This is the identity boundary, and an
402
- * error string is the one place a tenant id must never travel.
403
- */
404
- function boundedId(body, max, field) {
405
- const id = `afp-${body}`;
406
- if (id.length <= max)
407
- return id;
408
- throw new RangeError(`AgentCoreStore: the ${field} id for this identity encodes to ${id.length} characters, over ` +
409
- `AgentCore's ${max}-character limit for ${field}Id. It is deliberately not truncated to fit — ` +
410
- `truncating two identities to one id is how one tenant reads another's memory, and a hash tail ` +
411
- `makes that unlikely rather than impossible. Shorten the ` +
412
- `${field === 'actor' ? '`tenant` / `principal`' : '`conversationId`'} at the call site. (Anything ` +
413
- `outside [A-Za-z0-9-] escapes to five characters, so punctuation and non-ASCII count for more ` +
414
- `than they look.) The value is not quoted here on purpose: it addresses a tenant.`);
415
- }
416
- /**
417
- * AgentCore Memory-backed `MemoryStore`. Implements every method except `search()`.
418
- *
419
- * @throws when `@aws-sdk/client-bedrock-agentcore` is not installed and no `client`/`sdk`
420
- * is supplied.
421
- */
422
- export class AgentCoreStore {
423
- /**
424
- * **No.** `search()` below exists, but it is `RetrieveMemoryRecords`:
425
- * AgentCore embeds and ranks on its own side, over the records its
426
- * extraction strategies derived, and never over the vectors written
427
- * through `put`/`putMany`. Embeddings handed to this store are stored
428
- * inside the event blob and are never ranked by anything.
429
- *
430
- * Declared (8.19.0) because a method's presence could not say that.
431
- * `indexCorpus` used to accept this store, embed a whole corpus, pay for
432
- * it and report success — and the chunks were unreachable forever. The
433
- * corpus builders read this bit and refuse, naming this store and what to
434
- * use instead; nothing else changes, and `defineMemory` over AgentCore's
435
- * own retrieval is untouched.
436
- */
437
- supportsVectorSearch = false;
438
- /**
439
- * **Words, not a vector.** `search()` is `RetrieveMemoryRecords`, whose
440
- * query is natural-language text: it reads {@link SearchOptions.text} and
441
- * refuses by name without it.
442
- *
443
- * {@link supportsVectorSearch} already said this store cannot serve back the
444
- * embeddings written into it — the question a corpus BUILDER asks. This
445
- * answers the next one down, which is what a corpus READER needs: what query
446
- * form does `search()` take? Declaring it is what lets `defineRAG` know,
447
- * before the first turn rather than after the bill, that a retriever over
448
- * this store needs no `Embedder` at all — embedding the question anyway is
449
- * spend on a vector discarded on arrival.
450
- *
451
- * Added in the same batch as the Google column's Memory Bank store, which is
452
- * the second adapter of this shape. Two stores that behave identically and
453
- * declare it differently is how a capability check quietly stops meaning
454
- * anything.
455
- */
456
- ranksBy = 'server-text';
457
- /**
458
- * **Both write options, translated to `CreateEvent`'s own fields:**
459
- *
460
- * `extraction: 'skip'` → `extractionMode: 'SKIP'` — the event stays in
461
- * short-term memory and is excluded from
462
- * long-term extraction.
463
- * `namespaceScope` → `extractionConfig: { namespaceVariables }` —
464
- * substituted into the memory's
465
- * `namespaceTemplates` during extraction, which
466
- * is how one tenant's derived records stay in
467
- * that tenant's namespace.
468
- *
469
- * Absent — and both refused by name — when they could not reach AgentCore:
470
- * an injected client that does not declare `forwardsWriteOptions`, or an
471
- * installed SDK too old to MODEL the two fields (its serializer would drop
472
- * them without a word). The variables are checked here against AgentCore's
473
- * documented domain before anything is sent (see `checkNamespaceVariables`).
474
- *
475
- * A getter, not a field: a wrapper built by spreading this store
476
- * (`{ ...store, put }`) does not copy it — and a wrapper that does not carry
477
- * the third argument must not carry the declaration either.
478
- */
479
- get writeOptions() {
480
- return this.writeOptionsRefusal === undefined ? AGENTCORE_WRITE_OPTIONS : undefined;
481
- }
482
- client;
483
- memoryId;
484
- pageSize;
485
- searchNamespace;
486
- searchStrategyId;
487
- requireNamespaceScope;
488
- /**
489
- * Set by the first write or search that carries a scope: from then on this
490
- * store is a SCOPED store, and a call without one is refused — a second
491
- * memory, a `defineRAG` or a direct call that forgot its scope never reads
492
- * or files across the tenants the first one kept apart.
493
- */
494
- servedScoped = false;
495
- searchAcrossPrincipals;
496
- /** Why the write options cannot be honoured — `undefined` when they can. */
497
- writeOptionsRefusal;
498
- closed = false;
499
- // In-process shadow state for things AgentCore doesn't surface natively.
500
- signatures = new Map();
501
- feedbackBag = new Map();
502
- constructor(options) {
503
- if (!options.memoryId)
504
- throw new Error('AgentCoreStore requires `memoryId`.');
505
- this.memoryId = options.memoryId;
506
- const pageSize = options.pageSize ?? MAX_EVENT_PAGE_SIZE;
507
- if (!Number.isInteger(pageSize) || pageSize < 1 || pageSize > MAX_EVENT_PAGE_SIZE) {
508
- throw new RangeError(`AgentCoreStore: \`pageSize\` must be an integer from 1 to ${MAX_EVENT_PAGE_SIZE} ` +
509
- '(the ListEvents limit). Use list() cursors to read more than one page.');
510
- }
511
- this.pageSize = pageSize;
512
- this.searchNamespace =
513
- options.searchNamespace ??
514
- (({ actorId, sessionId }) => `/actors/${actorId}/sessions/${sessionId}`);
515
- this.searchStrategyId = options.searchStrategyId;
516
- this.requireNamespaceScope = options.requireNamespaceScope === true;
517
- this.searchAcrossPrincipals = options.searchAcrossPrincipals === true;
518
- const injected = options._client ?? options.client;
519
- this.client = injected ?? createAgentCoreClient(options.region, options.sdk);
520
- this.writeOptionsRefusal =
521
- this.client.forwardsWriteOptions === true
522
- ? undefined
523
- : injected !== undefined
524
- ? 'its injected client does not declare `forwardsWriteOptions: true`, so it may drop ' +
525
- "CreateEvent's `extractionMode` / `extractionConfig`. Declare it on the client once it " +
526
- 'forwards both fields unchanged'
527
- : "the installed `@aws-sdk/client-bedrock-agentcore` does not model CreateEvent's " +
528
- '`extractionMode` / `extractionConfig`, and its serializer drops a field it does not ' +
529
- 'model. Upgrade the SDK to `@aws-sdk/client-bedrock-agentcore` >=3.1114.0';
530
- }
531
- // MemoryIdentity → AgentCore (actorId, sessionId). The actor is the user/tenant; the
532
- // session is the conversation. Both are derived deterministically, id-safe and
533
- // INJECTIVELY — see the encoder note above `escapeIdSegment` for why that last word
534
- // is the whole isolation guarantee and not a tidiness claim.
535
- actorId(identity) {
536
- // `_` joins the two halves and neither half can contain one (it is escaped),
537
- // so the join cannot move a field boundary.
538
- return boundedId(`${actorSegment(identity.tenant)}_${actorSegment(identity.principal)}`, ACTOR_ID_MAX, 'actor');
539
- }
540
- sessionId(identity) {
541
- // One field, so no joiner — but `sessionId` admits no `/`, so it escapes with
542
- // `_` instead. `-` stays verbatim in both, which is what keeps a UUID a UUID.
543
- return boundedId(escapeIdSegment(identity.conversationId, '_'), SESSION_ID_MAX, 'session');
544
- }
545
- scope(identity) {
546
- assertAddressable(identity);
547
- return {
548
- memoryId: this.memoryId,
549
- actorId: this.actorId(identity),
550
- sessionId: this.sessionId(identity),
551
- };
552
- }
553
- // The in-process shadow maps (dedup signatures, feedback) are keyed by the
554
- // SHARED namespace encoder rather than a hand-rolled copy of it: a copy of
555
- // the tuple layout is a copy of whatever is wrong with it, and this one was
556
- // a copy of the version where a `/` inside a tenant donated a field boundary
557
- // — two different identities sharing one dedup set and one feedback bag.
558
- shadowKey(identity) {
559
- assertAddressable(identity);
560
- return identityNamespace(identity);
561
- }
562
- feedbackKey(identity, id) {
563
- return `${this.shadowKey(identity)}::${id}`;
564
- }
565
- /** Walk every event in the session (paginated). */
566
- async *eachEvent(identity) {
567
- let nextToken;
568
- do {
569
- const page = await this.client.listEvents({
570
- ...this.scope(identity),
571
- maxResults: this.pageSize,
572
- ...(nextToken !== undefined && { nextToken }),
573
- });
574
- for (const ev of page.events)
575
- yield ev;
576
- nextToken = page.nextToken;
577
- } while (nextToken);
578
- }
579
- // ── MemoryStore implementation ──────────────────────────────────
580
- async get(identity, id) {
581
- this.ensureOpen('get');
582
- // Append-log: an id may have several events (each update appends one). Last write wins —
583
- // pick the highest version (ties → last seen), independent of AgentCore's list order.
584
- let found = null;
585
- for await (const ev of this.eachEvent(identity)) {
586
- if (ev.entry?.id !== id)
587
- continue;
588
- const entry = ev.entry;
589
- if (found === null || (entry.version ?? 0) >= (found.version ?? 0))
590
- found = entry;
591
- }
592
- if (found && found.ttl !== undefined && found.ttl <= Date.now())
593
- return null;
594
- return found;
595
- }
596
- async put(identity, entry, options) {
597
- this.ensureOpen('put');
598
- await this.createEvent(identity, entry, this.extractionFields(options));
599
- }
600
- /** One event, with the write options already turned into fields (and checked) once. */
601
- async createEvent(identity, entry, extraction) {
602
- if (entry.ttl !== undefined && entry.ttl <= Date.now())
603
- return;
604
- await this.client.createEvent({
605
- ...this.scope(identity),
606
- entry: entry,
607
- ...extraction,
608
- });
609
- }
610
- async putMany(identity, entries, options) {
611
- this.ensureOpen('putMany');
612
- // AgentCore has no batch-write API; per-session events are conceptually ordered, so
613
- // sequentialize and let the SDK retry policy handle backoff. The options ride
614
- // every event of the batch — a batch is N writes, each asked the same thing,
615
- // and turned into fields ONCE, so no await between events can change them.
616
- if (entries.length === 0)
617
- return;
618
- const extraction = this.extractionFields(options);
619
- for (const entry of entries)
620
- await this.createEvent(identity, entry, extraction);
621
- }
622
- /**
623
- * Emulated optimistic concurrency. AgentCore appends unconditionally; we read-then-write
624
- * inside a JS critical section — adequate for single-writer-per-session deployments.
625
- */
626
- async putIfVersion(identity, entry, expectedVersion, options) {
627
- this.ensureOpen('putIfVersion');
628
- // Refused BEFORE the read, so an unhonoured option never costs a list.
629
- const extraction = this.extractionFields(options);
630
- const current = await this.get(identity, entry.id);
631
- if (current === null) {
632
- if (expectedVersion !== 0)
633
- return { applied: false };
634
- }
635
- else if (current.version !== expectedVersion) {
636
- return { applied: false, currentVersion: current.version };
637
- }
638
- await this.createEvent(identity, entry, extraction);
639
- return { applied: true };
640
- }
641
- /**
642
- * The namespace one search reads — rendered by `searchNamespace` and refused
643
- * by name when it could read beyond this identity: a wildcard, a namespace
644
- * that does not hold the scope segment for segment, or one that stops above
645
- * this identity's actor while the identity names a principal.
646
- */
647
- namespaceFor(identity, ids, given) {
648
- // An empty scope asks for nothing — the same rule writes follow
649
- // (`requestedWriteOptions`) — so it is treated as no scope at all.
650
- const copied = given === undefined ? undefined : frozenScope(given);
651
- const namespaceScope = copied === undefined || Object.keys(copied).length === 0 ? undefined : copied;
652
- if (namespaceScope === undefined && (this.requireNamespaceScope || this.servedScoped)) {
653
- throw new TypeError(MISSING_SCOPE('search'));
654
- }
655
- if (namespaceScope !== undefined)
656
- this.servedScoped = true;
657
- if (namespaceScope !== undefined)
658
- checkNamespaceVariables(namespaceScope);
659
- const render = (scope) => this.searchNamespace({
660
- actorId: ids.actorId,
661
- sessionId: ids.sessionId,
662
- identity,
663
- ...(scope !== undefined && { namespaceScope: scope }),
664
- });
665
- const namespace = render(namespaceScope);
666
- assertNamespace(namespace);
667
- if (namespace.includes('*')) {
668
- throw new TypeError('AgentCoreStore.search(): `searchNamespace` returned a namespace containing `*`. ' +
669
- 'Results are kept only when they are filed at that namespace or under it, and a ' +
670
- 'wildcard cannot be checked that way — so it is refused rather than matching nothing. ' +
671
- 'Name the namespace exactly.');
672
- }
673
- if (namespaceScope !== undefined)
674
- assertSearchWithinScope(render, namespace, namespaceScope);
675
- // The actor is required when the identity names a principal — and on EVERY
676
- // unscoped search: with no scope to confine it, the actor is the only thing
677
- // that keeps the read on this identity (a namespace template rendered with
678
- // no tenant collapses to a prefix every tenant shares).
679
- // `searchAcrossPrincipals` widens a SCOPED search to the tenant's
680
- // principals; with no scope there is no tenant to stay inside, so it never
681
- // lifts the actor requirement there.
682
- const actorRequired = namespaceScope === undefined ||
683
- (identity.principal !== undefined && !this.searchAcrossPrincipals);
684
- if (actorRequired && !holdsActor(namespace, ids.actorId)) {
685
- throw new TypeError('AgentCoreStore.search(): the namespace searched does not hold this identity’s ' +
686
- '`actorId`, so it would read records AgentCore derived from every principal it ' +
687
- 'covers. Put `{actorId}` in the strategy’s namespace template and in ' +
688
- '`searchNamespace` (e.g. "/tenants/{tenantid}/actors/{actorId}/facts"), or set ' +
689
- '`searchAcrossPrincipals: true` if the memory is shared on purpose.');
690
- }
691
- return namespace;
692
- }
693
- /**
694
- * The write options as `CreateEvent`'s own fields — or a refusal by name for
695
- * any this store's client cannot carry. The ONE place the vendor-neutral
696
- * names become AWS's.
697
- */
698
- extractionFields(options) {
699
- refuseUnhonouredWriteOptions('AgentCoreStore', this.writeOptions, options, this.writeOptionsRefusal ?? '');
700
- const asked = requestedWriteOptions(options);
701
- // Copy FIRST, then decide on the copy — the same rule as a search: an empty
702
- // copy is no scope, whatever the caller's object reported a moment earlier.
703
- const given = options?.namespaceScope;
704
- const copied = given === undefined ? undefined : frozenScope(given);
705
- const scope = copied === undefined || Object.keys(copied).length === 0 ? undefined : copied;
706
- if (scope === undefined && (this.requireNamespaceScope || this.servedScoped)) {
707
- throw new TypeError(MISSING_SCOPE('write'));
708
- }
709
- if (scope !== undefined)
710
- this.servedScoped = true;
711
- if (scope !== undefined)
712
- checkNamespaceVariables(scope);
713
- return {
714
- ...(asked.includes('extraction') && { extractionMode: 'SKIP' }),
715
- ...(scope !== undefined && { extractionConfig: { namespaceVariables: scope } }),
716
- };
717
- }
718
- async list(identity, options = {}) {
719
- this.ensureOpen('list');
720
- const limit = storeRequestLimit(options.limit, 'limit') ?? this.pageSize;
721
- const page = await this.client.listEvents({
722
- ...this.scope(identity),
723
- maxResults: Math.min(limit, MAX_EVENT_PAGE_SIZE),
724
- ...(options.cursor !== undefined && { nextToken: options.cursor }),
725
- });
726
- const out = [];
727
- for (const ev of page.events) {
728
- const entry = ev.entry;
729
- if (!entry)
730
- continue;
731
- if (entry.ttl !== undefined && entry.ttl <= Date.now())
732
- continue;
733
- if (options.tiers && (!entry.tier || !options.tiers.includes(entry.tier)))
734
- continue;
735
- out.push(entry);
736
- }
737
- return page.nextToken ? { entries: out, cursor: page.nextToken } : { entries: out };
738
- }
739
- async delete(identity, id) {
740
- this.ensureOpen('delete');
741
- for await (const ev of this.eachEvent(identity)) {
742
- if (ev.entry?.id === id) {
743
- await this.client.deleteEvent({ ...this.scope(identity), eventId: ev.eventId });
744
- }
745
- }
746
- this.feedbackBag.delete(this.feedbackKey(identity, id));
747
- }
748
- async seen(identity, signature) {
749
- this.ensureOpen('seen');
750
- return this.signatures.get(this.shadowKey(identity))?.has(signature) ?? false;
751
- }
752
- async recordSignature(identity, signature) {
753
- this.ensureOpen('recordSignature');
754
- const key = this.shadowKey(identity);
755
- const set = this.signatures.get(key) ?? new Set();
756
- set.add(signature);
757
- this.signatures.set(key, set);
758
- }
759
- async feedback(identity, id, usefulness) {
760
- this.ensureOpen('feedback');
761
- if (!Number.isFinite(usefulness))
762
- return;
763
- const clamped = Math.max(-1, Math.min(1, usefulness));
764
- const key = this.feedbackKey(identity, id);
765
- const cur = this.feedbackBag.get(key) ?? { sum: 0, count: 0 };
766
- this.feedbackBag.set(key, { sum: cur.sum + clamped, count: cur.count + 1 });
767
- }
768
- async getFeedback(identity, id) {
769
- this.ensureOpen('getFeedback');
770
- const cur = this.feedbackBag.get(this.feedbackKey(identity, id));
771
- if (!cur || cur.count === 0)
772
- return null;
773
- return { average: cur.sum / cur.count, count: cur.count };
774
- }
775
- /** GDPR "everything for this identity, gone." No DeleteSession on AgentCore → delete every event. */
776
- async forget(identity) {
777
- this.ensureOpen('forget');
778
- const ids = [];
779
- for await (const ev of this.eachEvent(identity))
780
- ids.push(ev.eventId);
781
- for (const eventId of ids)
782
- await this.client.deleteEvent({ ...this.scope(identity), eventId });
783
- const shadowKey = this.shadowKey(identity);
784
- this.signatures.delete(shadowKey);
785
- for (const key of [...this.feedbackBag.keys()]) {
786
- if (key.startsWith(`${shadowKey}::`))
787
- this.feedbackBag.delete(key);
788
- }
789
- }
790
- /**
791
- * Server-side semantic retrieval over AgentCore's extracted memory records
792
- * (`RetrieveMemoryRecords`).
793
- *
794
- * ── Read this before you call it ─────────────────────────────────────────
795
- * **It takes TEXT, not the vector.** AgentCore embeds and ranks on its own
796
- * side, so `query` — the port's vector — is unusable here, and the query it
797
- * actually needs travels in `options.text`. Omit that and this method throws
798
- * a corrective error naming what is missing, because the alternative is
799
- * ranking nothing and handing back `[]`, which reads as "no matches" when it
800
- * really means "wrong query form". Pass both and every store can serve you:
801
- * local-ranking backends use the vector and ignore the text.
802
- *
803
- * **It searches a DIFFERENT population than `list()`.** `list` returns the
804
- * events this store wrote. This returns the records AgentCore's extraction
805
- * strategies derived FROM those events — summaries, semantic facts, user
806
- * preferences. The ids therefore belong to AgentCore, not to entries you
807
- * `put()`, and `store.get(entry.id)` will not find them. They arrive as
808
- * entries so ranking code needs no special case, with `metadata.source`
809
- * saying plainly where they came from, and each value is `{ content }` —
810
- * the record's text where every memory formatter reads it.
811
- *
812
- * Filters: `searchStrategyId` and the namespace reach AgentCore's own side;
813
- * `k`, `minScore` and `tiers` are applied to what comes back.
814
- *
815
- * @throws when `options.text` is absent, or when the client cannot retrieve.
816
- */
817
- async search(identity, query, options = {}) {
818
- this.ensureOpen('search');
819
- const k = Math.min(storeRequestLimit(options.k, 'k') ?? 10, MAX_RETRIEVAL_RESULTS);
820
- const text = options.text?.trim();
821
- if (!text) {
822
- throw new Error('AgentCoreStore.search() needs the query as TEXT, in `options.text`.\n' +
823
- ` AgentCore embeds and ranks server-side (RetrieveMemoryRecords), so the ${query.length}-dimension\n` +
824
- ' vector this method was handed cannot be sent anywhere — and returning [] would look\n' +
825
- ' like "no matches" rather than "wrong query form".\n' +
826
- ' Fix: store.search(identity, vector, { text: theUserQuestion })\n' +
827
- ' Backends that rank locally ignore `text`, so passing both is always safe.');
828
- }
829
- if (!this.client.retrieveRecords) {
830
- throw new Error('AgentCoreStore.search() requires a client that implements `retrieveRecords`.\n' +
831
- ' The built-in client does; a custom or older injected `client` / `_client` may not.');
832
- }
833
- const scope = this.scope(identity);
834
- const namespace = this.namespaceFor(identity, scope, options.namespaceScope);
835
- const page = await this.client.retrieveRecords({
836
- memoryId: this.memoryId,
837
- namespace,
838
- searchQuery: text,
839
- maxResults: k,
840
- ...(this.searchStrategyId !== undefined && { memoryStrategyId: this.searchStrategyId }),
841
- });
842
- const scored = [];
843
- for (const record of page.records) {
844
- // `namespace` is a PREFIX to AgentCore ("namespaces that start with the
845
- // provided prefix"), so `/tenants/v1` also returns `/tenants/v12`'s
846
- // records. Keep only what is filed AT the namespace asked for or under
847
- // it — and drop a record that names no namespace, which cannot be shown
848
- // to belong here, or that may be filed under ANOTHER actor (see
849
- // `filedUnder`).
850
- if (!filedUnder(record, namespace, scope.actorId))
851
- continue;
852
- const score = record.score ?? 0;
853
- if (options.minScore !== undefined && score < options.minScore)
854
- continue;
855
- // AgentCore records carry no tier. A tier filter therefore excludes them
856
- // all rather than silently ignoring the filter the caller asked for.
857
- if (options.tiers && options.tiers.length > 0)
858
- continue;
859
- const createdAt = record.createdAt ?? Date.now();
860
- const entry = {
861
- id: record.memoryRecordId,
862
- // The store's record shape, `{ content }` — never the bare string.
863
- // Both prompt formatters read the text off `.content` (the memory
864
- // flavour as a message, the rag flavour as a passage), so a bare string
865
- // rendered as an EMPTY block: the record was found and the model never
866
- // saw it. No `role`: nobody said this; AgentCore derived it.
867
- // Text only: a client outside the type hands back no non-string.
868
- value: { content: typeof record.content === 'string' ? record.content : '' },
869
- version: 1,
870
- createdAt,
871
- updatedAt: createdAt,
872
- lastAccessedAt: Date.now(),
873
- accessCount: 0,
874
- metadata: {
875
- // Says plainly that this did not come from an event this store wrote.
876
- source: 'agentcore-memory-record',
877
- ...(record.memoryStrategyId !== undefined && {
878
- memoryStrategyId: record.memoryStrategyId,
879
- }),
880
- ...(record.namespace !== undefined && { namespace: record.namespace }),
881
- },
882
- };
883
- scored.push({ entry, score });
884
- }
885
- // AgentCore returns its own ranking; re-sort anyway so the port's
886
- // "descending by score" holds even if a future API version reorders.
887
- scored.sort((a, b) => b.score !== a.score ? b.score - a.score : a.entry.id < b.entry.id ? -1 : 1);
888
- return scored.slice(0, k);
889
- }
890
- async close() {
891
- if (this.closed)
892
- return;
893
- this.closed = true;
894
- }
895
- ensureOpen(op) {
896
- if (this.closed)
897
- throw new Error(`AgentCoreStore.${op}() called after close().`);
898
- }
899
- }
900
- /**
901
- * Does the installed SDK model CreateEvent's `extractionMode` and
902
- * `extractionConfig`? Its serializer drops a field it does not model, without a
903
- * word, so an older SDK would accept the write options and send neither.
904
- *
905
- * Read off the SDK's own schema of the input (`CreateEventInput$`, whose member
906
- * names include both since 3.1114.0). The SDK changelog first adds
907
- * `extractionConfig` in that version (it adds `extractionMode` in 3.1074.0):
908
- * https://github.com/aws/aws-sdk-js-v3/blob/v3.1114.0/clients/client-bedrock-agentcore/CHANGELOG.md
909
- * Anything that cannot be read that way counts
910
- * as "no" — the options are then refused by name, never sent into a drop.
911
- */
912
- function sdkModelsExtraction(mod) {
913
- const schema = mod.CreateEventInput$;
914
- if (!Array.isArray(schema))
915
- return false;
916
- const members = schema.find((part) => Array.isArray(part) && part.includes('memoryId'));
917
- return (members !== undefined &&
918
- members.includes('extractionMode') &&
919
- members.includes('extractionConfig'));
920
- }
921
- /**
922
- * Pull the MemoryEntry out of an AgentCore event's `payload` (a single `blob`
923
- * document) — this adapter's ONE decode step, and therefore the only place that
924
- * can tell "no entry here" apart from "an entry nobody can read".
925
- *
926
- * ── Why a string is the normal case ──────────────────────────────────────────
927
- * Entries are written as JSON **text** (see `createEvent` below), so the blob
928
- * comes back a string and is parsed here. Objects are still accepted: a
929
- * caller-supplied `client` may hand back a real object, and refusing it would
930
- * break a seam that never had this problem.
931
- *
932
- * Three outcomes, and the middle one is the fix:
933
- * • no `blob` in any part → `null`. Nothing claimed to be an entry — AgentCore
934
- * writes events of its own into the same log — so it is skipped.
935
- * • a blob that cannot be decoded → **throws** {@link UnreadableMemoryEntryError}.
936
- * Skipping it would shorten a `list()` by one and read as "that memory was
937
- * never stored", which is the silent failure this release exists to end.
938
- * • a decodable blob → the entry.
939
- */
940
- function entryFromPayload(payload, event) {
941
- if (!Array.isArray(payload))
942
- return null;
943
- for (const p of payload) {
944
- if (!p || typeof p !== 'object' || !('blob' in p))
945
- continue;
946
- const blob = p.blob;
947
- // A part with no blob VALUE is not an entry either — keep looking.
948
- if (blob === null || blob === undefined)
949
- continue;
950
- if (typeof blob === 'object')
951
- return blob;
952
- if (typeof blob === 'string') {
953
- try {
954
- const parsed = JSON.parse(blob);
955
- if (parsed !== null && typeof parsed === 'object')
956
- return parsed;
957
- }
958
- catch {
959
- /* fall through to the refusal, with the ORIGINAL bytes to describe */
960
- }
961
- }
962
- throw new UnreadableMemoryEntryError({ ...event, stored: blob });
963
- }
964
- return null;
965
- }
966
- /**
967
- * Map the entry-semantic `AgentCoreLikeClient` onto the real AgentCore SDK commands.
968
- * If AWS renames commands, only this function changes.
969
- */
970
- function createAgentCoreClient(region, injected) {
971
- let mod;
972
- if (injected) {
973
- mod = injected;
974
- }
975
- else {
976
- try {
977
- mod = lazyRequire('@aws-sdk/client-bedrock-agentcore');
978
- }
979
- catch {
980
- throw new Error('AgentCoreStore requires the `@aws-sdk/client-bedrock-agentcore` peer dependency.\n' +
981
- ' Install: npm install @aws-sdk/client-bedrock-agentcore\n' +
982
- ' Or pass `sdk` for a statically imported module, or `client` for a pre-built client.');
983
- }
984
- }
985
- if (!mod.BedrockAgentCoreClient) {
986
- throw new Error('AgentCoreStore: `@aws-sdk/client-bedrock-agentcore` is installed but ' +
987
- '`BedrockAgentCoreClient` was not found. Update the SDK.');
988
- }
989
- const sdk = new mod.BedrockAgentCoreClient({ ...(region && { region }) });
990
- const send = async (Ctor, name, input) => {
991
- if (!Ctor) {
992
- throw new Error(`AgentCoreStore: \`@aws-sdk/client-bedrock-agentcore\` is missing ${name}. Upgrade the SDK.`);
993
- }
994
- // The public module keeps the SDK's narrower constructor input opaque.
995
- // This boundary supplies the wire shape owned by this adapter below.
996
- const Command = Ctor;
997
- return sdk.send(new Command(input));
998
- };
999
- return {
1000
- // The two extraction fields below are forwarded as they are — but only an
1001
- // SDK that MODELS them sends them, so the declaration follows the SDK.
1002
- ...(sdkModelsExtraction(mod) && { forwardsWriteOptions: true }),
1003
- async createEvent({ memoryId, actorId, sessionId, entry, extractionMode, extractionConfig }) {
1004
- // The entry is stored as a single `blob` document (PayloadType.blob =
1005
- // __DocumentType), and it goes in as JSON TEXT, not as the object.
1006
- // Field-learned on the session store and true of every blob this service
1007
- // holds: hand it an object and it stores its own host language's
1008
- // `toString()` rendering — `{id=m-1, value={...}}` — and returns THAT
1009
- // string, which is not JSON and cannot be turned back into an entry. A
1010
- // `MemoryEntry` is defined as something a store can hold (the port's
1011
- // stores round-trip it through JSON already), so the encoding is ours to
1012
- // pick and the honest pick is the one whose bytes come back unchanged.
1013
- await send(mod.CreateEventCommand, 'CreateEventCommand', {
1014
- memoryId,
1015
- actorId,
1016
- sessionId,
1017
- eventTimestamp: new Date(),
1018
- payload: [{ blob: JSON.stringify(entry) }],
1019
- // `CreateEventInput`'s own names (`ExtractionMode.SKIP`,
1020
- // `ExtractionConfig.namespaceVariables`), present only when asked —
1021
- // an event without them is extracted exactly as before.
1022
- ...(extractionMode !== undefined && { extractionMode }),
1023
- ...(extractionConfig !== undefined && {
1024
- extractionConfig: { namespaceVariables: { ...extractionConfig.namespaceVariables } },
1025
- }),
1026
- });
1027
- },
1028
- async listEvents({ memoryId, actorId, sessionId, maxResults, nextToken }) {
1029
- const r = (await send(mod.ListEventsCommand, 'ListEventsCommand', {
1030
- memoryId,
1031
- actorId,
1032
- sessionId,
1033
- includePayloads: true,
1034
- ...(maxResults !== undefined && { maxResults }),
1035
- ...(nextToken !== undefined && { nextToken }),
1036
- }));
1037
- const events = (r?.events ?? []).map((ev) => {
1038
- const eventId = ev.eventId ?? '';
1039
- // A page containing one unreadable entry fails the READ. Returning the
1040
- // rest would be a list that is quietly one memory short, which is the
1041
- // shape of the failure nobody notices.
1042
- return { eventId, entry: entryFromPayload(ev.payload, { eventId, sessionId }) };
1043
- });
1044
- return r?.nextToken ? { events, nextToken: r.nextToken } : { events };
1045
- },
1046
- async deleteEvent({ memoryId, actorId, sessionId, eventId }) {
1047
- await send(mod.DeleteEventCommand, 'DeleteEventCommand', {
1048
- memoryId,
1049
- actorId,
1050
- sessionId,
1051
- eventId,
1052
- });
1053
- },
1054
- async retrieveRecords({ memoryId, namespace, searchQuery, maxResults, memoryStrategyId }) {
1055
- // AgentCore nests the query under `searchCriteria`; the strategy id is the
1056
- // metadata filter that reaches its side rather than being applied after.
1057
- const r = (await send(mod.RetrieveMemoryRecordsCommand, 'RetrieveMemoryRecordsCommand', {
1058
- memoryId,
1059
- namespace,
1060
- searchCriteria: {
1061
- searchQuery,
1062
- ...(maxResults !== undefined && { topK: maxResults }),
1063
- ...(memoryStrategyId !== undefined && { memoryStrategyId }),
1064
- },
1065
- ...(maxResults !== undefined && { maxResults }),
1066
- }));
1067
- const records = (r?.memoryRecordSummaries ?? []).map((s) => {
1068
- const content = typeof s.content === 'string' ? s.content : s.content?.text ?? '';
1069
- const namespaces = (Array.isArray(s.namespaces)
1070
- ? s.namespaces
1071
- : Array.isArray(s.namespace)
1072
- ? s.namespace
1073
- : typeof s.namespace === 'string'
1074
- ? [s.namespace]
1075
- : []).filter((n) => typeof n === 'string');
1076
- const namespaceValue = namespaces[0];
1077
- const createdAt = s.createdAt === undefined ? undefined : new Date(s.createdAt).getTime();
1078
- return {
1079
- memoryRecordId: s.memoryRecordId ?? '',
1080
- content,
1081
- ...(typeof s.score === 'number' && { score: s.score }),
1082
- ...(s.memoryStrategyId !== undefined && { memoryStrategyId: s.memoryStrategyId }),
1083
- ...(typeof namespaceValue === 'string' && { namespace: namespaceValue }),
1084
- ...(namespaces.length > 0 && { namespaces }),
1085
- ...(createdAt !== undefined && Number.isFinite(createdAt) && { createdAt }),
1086
- };
1087
- });
1088
- return { records };
1089
- },
1090
- };
1091
- }
1092
- /** A namespace compared as a path: repeated `/` collapsed, a trailing one dropped. */
1093
- function pathOf(namespace) {
1094
- return namespace.replace(/\/{2,}/g, '/').replace(/\/$/, '');
1095
- }
1096
- /** What the start of another actor's id extending this one looks like. */
1097
- const ACTOR_ESCAPE_AHEAD = /^[0-9A-F]{4}/;
1098
- /**
1099
- * Is `record` filed AT `asked` or under it? Compared on whole path segments —
1100
- * repeated and trailing `/` ignored on both sides — because AgentCore's
1101
- * `namespace` filter is a string prefix, and `/tenants/v1` must not admit
1102
- * `/tenants/v12`.
1103
- *
1104
- * One more case, because an actor id can hold a `/`: its escape is `/` + four
1105
- * hex digits (`bob@x.com` → `bob/0040x/002Ecom`), so another actor's id can
1106
- * EXTEND this one by whole segments (`bob@x.com.au` adds `/002Eau`). When the
1107
- * namespace asked for ends with this identity's `actorId`, a record filed under
1108
- * a continuation that starts with four uppercase hex digits may be that other
1109
- * actor's — and is dropped. A sub-namespace of your own that starts that way
1110
- * is dropped too (put a literal segment after `{actorId}`), never served across
1111
- * actors. That literal must not itself start with four uppercase hex digits,
1112
- * or the guard cannot tell it from another actor's id.
1113
- */
1114
- function filedUnder(record, asked, actorId) {
1115
- const base = pathOf(asked);
1116
- const guardActor = base.endsWith(actorId);
1117
- const filed = record.namespaces ?? (record.namespace !== undefined ? [record.namespace] : []);
1118
- return filed.some((ns) => {
1119
- const n = pathOf(ns);
1120
- if (n === base)
1121
- return true;
1122
- if (!n.startsWith(`${base}/`))
1123
- return false;
1124
- return !(guardActor && ACTOR_ESCAPE_AHEAD.test(n.slice(base.length + 1)));
1125
- });
1126
- }
46
+ export { AgentCoreStore } from './agentcore/store.js';
47
+ export { agentCoreNamespaceValue } from './agentcore/namespace.js';
48
+ export { UnreadableMemoryEntryError } from './agentcore/storedEntry.js';
1127
49
  //# sourceMappingURL=agentcore.js.map