pulseed 0.6.0 → 0.6.1

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 (335) hide show
  1. package/README.md +18 -16
  2. package/dist/base/config/identity-loader.d.ts +12 -3
  3. package/dist/base/config/identity-loader.d.ts.map +1 -1
  4. package/dist/base/config/identity-loader.js +15 -7
  5. package/dist/base/config/identity-loader.js.map +1 -1
  6. package/dist/grounding/contracts.d.ts +13 -0
  7. package/dist/grounding/contracts.d.ts.map +1 -1
  8. package/dist/grounding/providers/knowledge-provider.d.ts.map +1 -1
  9. package/dist/grounding/providers/knowledge-provider.js +25 -3
  10. package/dist/grounding/providers/knowledge-provider.js.map +1 -1
  11. package/dist/grounding/providers/soil-provider.d.ts.map +1 -1
  12. package/dist/grounding/providers/soil-provider.js +28 -3
  13. package/dist/grounding/providers/soil-provider.js.map +1 -1
  14. package/dist/grounding/providers/static-policy-provider.d.ts +3 -1
  15. package/dist/grounding/providers/static-policy-provider.d.ts.map +1 -1
  16. package/dist/grounding/providers/static-policy-provider.js +4 -3
  17. package/dist/grounding/providers/static-policy-provider.js.map +1 -1
  18. package/dist/index.d.ts +8 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +4 -0
  21. package/dist/index.js.map +1 -1
  22. package/dist/interface/chat/chat-event-state.d.ts.map +1 -1
  23. package/dist/interface/chat/chat-event-state.js +92 -9
  24. package/dist/interface/chat/chat-event-state.js.map +1 -1
  25. package/dist/interface/chat/chat-events.d.ts +15 -1
  26. package/dist/interface/chat/chat-events.d.ts.map +1 -1
  27. package/dist/interface/chat/chat-runner-event-bridge.d.ts +3 -0
  28. package/dist/interface/chat/chat-runner-event-bridge.d.ts.map +1 -1
  29. package/dist/interface/chat/chat-runner-event-bridge.js +54 -8
  30. package/dist/interface/chat/chat-runner-event-bridge.js.map +1 -1
  31. package/dist/interface/chat/chat-runner-routes.d.ts +20 -0
  32. package/dist/interface/chat/chat-runner-routes.d.ts.map +1 -1
  33. package/dist/interface/chat/chat-runner-routes.js +76 -0
  34. package/dist/interface/chat/chat-runner-routes.js.map +1 -1
  35. package/dist/interface/chat/chat-runner.d.ts.map +1 -1
  36. package/dist/interface/chat/chat-runner.js +26 -2
  37. package/dist/interface/chat/chat-runner.js.map +1 -1
  38. package/dist/interface/chat/cross-platform-session.d.ts.map +1 -1
  39. package/dist/interface/chat/cross-platform-session.js +9 -3
  40. package/dist/interface/chat/cross-platform-session.js.map +1 -1
  41. package/dist/interface/chat/freeform-route-classifier.d.ts +21 -0
  42. package/dist/interface/chat/freeform-route-classifier.d.ts.map +1 -0
  43. package/dist/interface/chat/freeform-route-classifier.js +42 -0
  44. package/dist/interface/chat/freeform-route-classifier.js.map +1 -0
  45. package/dist/interface/chat/grounding.js +1 -1
  46. package/dist/interface/chat/grounding.js.map +1 -1
  47. package/dist/interface/chat/ingress-router.d.ts +9 -0
  48. package/dist/interface/chat/ingress-router.d.ts.map +1 -1
  49. package/dist/interface/chat/ingress-router.js +19 -0
  50. package/dist/interface/chat/ingress-router.js.map +1 -1
  51. package/dist/interface/cli/cli-command-registry.d.ts.map +1 -1
  52. package/dist/interface/cli/cli-command-registry.js +9 -1
  53. package/dist/interface/cli/cli-command-registry.js.map +1 -1
  54. package/dist/interface/cli/cli-runner.d.ts.map +1 -1
  55. package/dist/interface/cli/cli-runner.js +4 -1
  56. package/dist/interface/cli/cli-runner.js.map +1 -1
  57. package/dist/interface/cli/commands/daemon.d.ts.map +1 -1
  58. package/dist/interface/cli/commands/daemon.js +17 -1
  59. package/dist/interface/cli/commands/daemon.js.map +1 -1
  60. package/dist/interface/cli/commands/goal-read.d.ts.map +1 -1
  61. package/dist/interface/cli/commands/goal-read.js +4 -0
  62. package/dist/interface/cli/commands/goal-read.js.map +1 -1
  63. package/dist/interface/cli/commands/memory.d.ts +3 -0
  64. package/dist/interface/cli/commands/memory.d.ts.map +1 -0
  65. package/dist/interface/cli/commands/memory.js +78 -0
  66. package/dist/interface/cli/commands/memory.js.map +1 -0
  67. package/dist/interface/cli/commands/plugin.d.ts.map +1 -1
  68. package/dist/interface/cli/commands/plugin.js +134 -12
  69. package/dist/interface/cli/commands/plugin.js.map +1 -1
  70. package/dist/interface/cli/commands/profile.d.ts +3 -0
  71. package/dist/interface/cli/commands/profile.d.ts.map +1 -0
  72. package/dist/interface/cli/commands/profile.js +459 -0
  73. package/dist/interface/cli/commands/profile.js.map +1 -0
  74. package/dist/interface/cli/commands/runtime.d.ts.map +1 -1
  75. package/dist/interface/cli/commands/runtime.js +101 -2
  76. package/dist/interface/cli/commands/runtime.js.map +1 -1
  77. package/dist/interface/cli/commands/setup-wizard.d.ts.map +1 -1
  78. package/dist/interface/cli/commands/setup-wizard.js +30 -0
  79. package/dist/interface/cli/commands/setup-wizard.js.map +1 -1
  80. package/dist/interface/cli/utils.d.ts.map +1 -1
  81. package/dist/interface/cli/utils.js +4 -2
  82. package/dist/interface/cli/utils.js.map +1 -1
  83. package/dist/interface/tui/intent-recognizer.js +1 -1
  84. package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.d.ts +2 -0
  85. package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.d.ts.map +1 -1
  86. package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js +1 -0
  87. package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js.map +1 -1
  88. package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.d.ts.map +1 -1
  89. package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js +1 -0
  90. package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js.map +1 -1
  91. package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts +1 -0
  92. package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts.map +1 -1
  93. package/dist/orchestrator/execution/agent-loop/agent-loop-events.js.map +1 -1
  94. package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.d.ts.map +1 -1
  95. package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js +3 -0
  96. package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js.map +1 -1
  97. package/dist/orchestrator/execution/agent-loop/agent-timeline.d.ts +109 -0
  98. package/dist/orchestrator/execution/agent-loop/agent-timeline.d.ts.map +1 -0
  99. package/dist/orchestrator/execution/agent-loop/agent-timeline.js +261 -0
  100. package/dist/orchestrator/execution/agent-loop/agent-timeline.js.map +1 -0
  101. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts.map +1 -1
  102. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js +1 -0
  103. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js.map +1 -1
  104. package/dist/orchestrator/execution/agent-loop/execution-policy.d.ts +2 -0
  105. package/dist/orchestrator/execution/agent-loop/execution-policy.d.ts.map +1 -1
  106. package/dist/orchestrator/execution/agent-loop/execution-policy.js +9 -3
  107. package/dist/orchestrator/execution/agent-loop/execution-policy.js.map +1 -1
  108. package/dist/orchestrator/execution/agent-loop/self-protection.d.ts +9 -0
  109. package/dist/orchestrator/execution/agent-loop/self-protection.d.ts.map +1 -0
  110. package/dist/orchestrator/execution/agent-loop/self-protection.js +74 -0
  111. package/dist/orchestrator/execution/agent-loop/self-protection.js.map +1 -0
  112. package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.d.ts.map +1 -1
  113. package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.js +10 -1
  114. package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.js.map +1 -1
  115. package/dist/orchestrator/loop/core-loop/phase-specs.d.ts +85 -0
  116. package/dist/orchestrator/loop/core-loop/phase-specs.d.ts.map +1 -1
  117. package/dist/orchestrator/loop/core-loop/phase-specs.js +7 -0
  118. package/dist/orchestrator/loop/core-loop/phase-specs.js.map +1 -1
  119. package/dist/orchestrator/loop/core-loop/task-cycle.d.ts.map +1 -1
  120. package/dist/orchestrator/loop/core-loop/task-cycle.js +24 -2
  121. package/dist/orchestrator/loop/core-loop/task-cycle.js.map +1 -1
  122. package/dist/platform/corrections/index.d.ts +2 -0
  123. package/dist/platform/corrections/index.d.ts.map +1 -0
  124. package/dist/platform/corrections/index.js +2 -0
  125. package/dist/platform/corrections/index.js.map +1 -0
  126. package/dist/platform/corrections/memory-correction-ledger.d.ts +656 -0
  127. package/dist/platform/corrections/memory-correction-ledger.d.ts.map +1 -0
  128. package/dist/platform/corrections/memory-correction-ledger.js +120 -0
  129. package/dist/platform/corrections/memory-correction-ledger.js.map +1 -0
  130. package/dist/platform/corrections/memory-governance.d.ts +118 -0
  131. package/dist/platform/corrections/memory-governance.d.ts.map +1 -0
  132. package/dist/platform/corrections/memory-governance.js +32 -0
  133. package/dist/platform/corrections/memory-governance.js.map +1 -0
  134. package/dist/platform/corrections/memory-quarantine.d.ts +57 -0
  135. package/dist/platform/corrections/memory-quarantine.d.ts.map +1 -0
  136. package/dist/platform/corrections/memory-quarantine.js +42 -0
  137. package/dist/platform/corrections/memory-quarantine.js.map +1 -0
  138. package/dist/platform/corrections/user-memory-operations.d.ts +31 -0
  139. package/dist/platform/corrections/user-memory-operations.d.ts.map +1 -0
  140. package/dist/platform/corrections/user-memory-operations.js +139 -0
  141. package/dist/platform/corrections/user-memory-operations.js.map +1 -0
  142. package/dist/platform/dream/dream-consolidator.d.ts +5 -0
  143. package/dist/platform/dream/dream-consolidator.d.ts.map +1 -1
  144. package/dist/platform/dream/dream-consolidator.js +235 -13
  145. package/dist/platform/dream/dream-consolidator.js.map +1 -1
  146. package/dist/platform/dream/dream-soil-mutation.d.ts.map +1 -1
  147. package/dist/platform/dream/dream-soil-mutation.js +10 -0
  148. package/dist/platform/dream/dream-soil-mutation.js.map +1 -1
  149. package/dist/platform/dream/dream-types.d.ts +412 -0
  150. package/dist/platform/dream/dream-types.d.ts.map +1 -1
  151. package/dist/platform/dream/dream-types.js +3 -0
  152. package/dist/platform/dream/dream-types.js.map +1 -1
  153. package/dist/platform/dream/playbook-memory.d.ts +14 -14
  154. package/dist/platform/knowledge/knowledge-manager-agent-memory.d.ts +48 -0
  155. package/dist/platform/knowledge/knowledge-manager-agent-memory.d.ts.map +1 -1
  156. package/dist/platform/knowledge/knowledge-manager-agent-memory.js +154 -4
  157. package/dist/platform/knowledge/knowledge-manager-agent-memory.js.map +1 -1
  158. package/dist/platform/knowledge/knowledge-manager-lint.d.ts.map +1 -1
  159. package/dist/platform/knowledge/knowledge-manager-lint.js +98 -4
  160. package/dist/platform/knowledge/knowledge-manager-lint.js.map +1 -1
  161. package/dist/platform/knowledge/knowledge-manager.d.ts +41 -2
  162. package/dist/platform/knowledge/knowledge-manager.d.ts.map +1 -1
  163. package/dist/platform/knowledge/knowledge-manager.js +45 -5
  164. package/dist/platform/knowledge/knowledge-manager.js.map +1 -1
  165. package/dist/platform/knowledge/types/agent-memory.d.ts +1170 -42
  166. package/dist/platform/knowledge/types/agent-memory.d.ts.map +1 -1
  167. package/dist/platform/knowledge/types/agent-memory.js +13 -3
  168. package/dist/platform/knowledge/types/agent-memory.js.map +1 -1
  169. package/dist/platform/profile/proactive-feedback-proposals.d.ts +11 -0
  170. package/dist/platform/profile/proactive-feedback-proposals.d.ts.map +1 -0
  171. package/dist/platform/profile/proactive-feedback-proposals.js +106 -0
  172. package/dist/platform/profile/proactive-feedback-proposals.js.map +1 -0
  173. package/dist/platform/profile/profile-change-proposal.d.ts +464 -0
  174. package/dist/platform/profile/profile-change-proposal.d.ts.map +1 -0
  175. package/dist/platform/profile/profile-change-proposal.js +352 -0
  176. package/dist/platform/profile/profile-change-proposal.js.map +1 -0
  177. package/dist/platform/profile/relationship-profile.d.ts +351 -0
  178. package/dist/platform/profile/relationship-profile.d.ts.map +1 -0
  179. package/dist/platform/profile/relationship-profile.js +351 -0
  180. package/dist/platform/profile/relationship-profile.js.map +1 -0
  181. package/dist/platform/profile/retrieval-context.d.ts +12 -0
  182. package/dist/platform/profile/retrieval-context.d.ts.map +1 -0
  183. package/dist/platform/profile/retrieval-context.js +21 -0
  184. package/dist/platform/profile/retrieval-context.js.map +1 -0
  185. package/dist/platform/profile/user-md-profile-import.d.ts +73 -0
  186. package/dist/platform/profile/user-md-profile-import.d.ts.map +1 -0
  187. package/dist/platform/profile/user-md-profile-import.js +179 -0
  188. package/dist/platform/profile/user-md-profile-import.js.map +1 -0
  189. package/dist/platform/soil/content-projections.d.ts.map +1 -1
  190. package/dist/platform/soil/content-projections.js +17 -7
  191. package/dist/platform/soil/content-projections.js.map +1 -1
  192. package/dist/platform/soil/context-compiler.d.ts +16 -1
  193. package/dist/platform/soil/context-compiler.d.ts.map +1 -1
  194. package/dist/platform/soil/context-compiler.js +142 -4
  195. package/dist/platform/soil/context-compiler.js.map +1 -1
  196. package/dist/platform/soil/contracts.d.ts +720 -60
  197. package/dist/platform/soil/contracts.d.ts.map +1 -1
  198. package/dist/platform/soil/contracts.js +22 -0
  199. package/dist/platform/soil/contracts.js.map +1 -1
  200. package/dist/platform/soil/ddl.d.ts.map +1 -1
  201. package/dist/platform/soil/ddl.js +19 -0
  202. package/dist/platform/soil/ddl.js.map +1 -1
  203. package/dist/platform/soil/display/materialize.d.ts.map +1 -1
  204. package/dist/platform/soil/display/materialize.js.map +1 -1
  205. package/dist/platform/soil/importer.d.ts +6 -6
  206. package/dist/platform/soil/sqlite-repository-helpers.d.ts +4 -0
  207. package/dist/platform/soil/sqlite-repository-helpers.d.ts.map +1 -1
  208. package/dist/platform/soil/sqlite-repository-helpers.js.map +1 -1
  209. package/dist/platform/soil/sqlite-repository-search.d.ts.map +1 -1
  210. package/dist/platform/soil/sqlite-repository-search.js +48 -3
  211. package/dist/platform/soil/sqlite-repository-search.js.map +1 -1
  212. package/dist/platform/soil/sqlite-repository-storage.d.ts +3 -1
  213. package/dist/platform/soil/sqlite-repository-storage.d.ts.map +1 -1
  214. package/dist/platform/soil/sqlite-repository-storage.js +124 -3
  215. package/dist/platform/soil/sqlite-repository-storage.js.map +1 -1
  216. package/dist/platform/soil/sqlite-repository.d.ts +10 -1
  217. package/dist/platform/soil/sqlite-repository.d.ts.map +1 -1
  218. package/dist/platform/soil/sqlite-repository.js +46 -4
  219. package/dist/platform/soil/sqlite-repository.js.map +1 -1
  220. package/dist/platform/soil/types.d.ts +8 -8
  221. package/dist/platform/traits/curiosity-engine.d.ts +3 -1
  222. package/dist/platform/traits/curiosity-engine.d.ts.map +1 -1
  223. package/dist/platform/traits/curiosity-engine.js +3 -1
  224. package/dist/platform/traits/curiosity-engine.js.map +1 -1
  225. package/dist/platform/traits/curiosity-proposals.d.ts +6 -2
  226. package/dist/platform/traits/curiosity-proposals.d.ts.map +1 -1
  227. package/dist/platform/traits/curiosity-proposals.js +9 -3
  228. package/dist/platform/traits/curiosity-proposals.js.map +1 -1
  229. package/dist/reflection/evening-catchup.d.ts.map +1 -1
  230. package/dist/reflection/evening-catchup.js +4 -1
  231. package/dist/reflection/evening-catchup.js.map +1 -1
  232. package/dist/reflection/morning-planning.d.ts.map +1 -1
  233. package/dist/reflection/morning-planning.js +4 -1
  234. package/dist/reflection/morning-planning.js.map +1 -1
  235. package/dist/reflection/weekly-review.d.ts.map +1 -1
  236. package/dist/reflection/weekly-review.js +4 -1
  237. package/dist/reflection/weekly-review.js.map +1 -1
  238. package/dist/runtime/daemon/maintenance.d.ts.map +1 -1
  239. package/dist/runtime/daemon/maintenance.js +21 -2
  240. package/dist/runtime/daemon/maintenance.js.map +1 -1
  241. package/dist/runtime/daemon/runner-resident-curiosity.d.ts.map +1 -1
  242. package/dist/runtime/daemon/runner-resident-curiosity.js +5 -1
  243. package/dist/runtime/daemon/runner-resident-curiosity.js.map +1 -1
  244. package/dist/runtime/daemon/runner-resident-shared.d.ts +1 -1
  245. package/dist/runtime/daemon/runner-resident-shared.d.ts.map +1 -1
  246. package/dist/runtime/daemon/runner-resident-shared.js +16 -0
  247. package/dist/runtime/daemon/runner-resident-shared.js.map +1 -1
  248. package/dist/runtime/daemon/runtime-ownership.d.ts.map +1 -1
  249. package/dist/runtime/daemon/runtime-ownership.js +2 -0
  250. package/dist/runtime/daemon/runtime-ownership.js.map +1 -1
  251. package/dist/runtime/dream-sidecar-review.d.ts +2 -1
  252. package/dist/runtime/dream-sidecar-review.d.ts.map +1 -1
  253. package/dist/runtime/dream-sidecar-review.js +49 -55
  254. package/dist/runtime/dream-sidecar-review.js.map +1 -1
  255. package/dist/runtime/gateway/telegram-gateway-adapter.d.ts.map +1 -1
  256. package/dist/runtime/gateway/telegram-gateway-adapter.js +4 -3
  257. package/dist/runtime/gateway/telegram-gateway-adapter.js.map +1 -1
  258. package/dist/runtime/plugin-loader.d.ts +1 -0
  259. package/dist/runtime/plugin-loader.d.ts.map +1 -1
  260. package/dist/runtime/plugin-loader.js +7 -2
  261. package/dist/runtime/plugin-loader.js.map +1 -1
  262. package/dist/runtime/store/dream-checkpoints.d.ts +3 -0
  263. package/dist/runtime/store/dream-checkpoints.d.ts.map +1 -1
  264. package/dist/runtime/store/dream-checkpoints.js +2 -0
  265. package/dist/runtime/store/dream-checkpoints.js.map +1 -1
  266. package/dist/runtime/store/evidence-ledger.d.ts +1315 -38
  267. package/dist/runtime/store/evidence-ledger.d.ts.map +1 -1
  268. package/dist/runtime/store/evidence-ledger.js +299 -34
  269. package/dist/runtime/store/evidence-ledger.js.map +1 -1
  270. package/dist/runtime/store/index.d.ts +2 -0
  271. package/dist/runtime/store/index.d.ts.map +1 -1
  272. package/dist/runtime/store/index.js +1 -0
  273. package/dist/runtime/store/index.js.map +1 -1
  274. package/dist/runtime/store/proactive-intervention-store.d.ts +360 -0
  275. package/dist/runtime/store/proactive-intervention-store.d.ts.map +1 -0
  276. package/dist/runtime/store/proactive-intervention-store.js +252 -0
  277. package/dist/runtime/store/proactive-intervention-store.js.map +1 -0
  278. package/dist/runtime/store/runtime-paths.d.ts +2 -0
  279. package/dist/runtime/store/runtime-paths.d.ts.map +1 -1
  280. package/dist/runtime/store/runtime-paths.js +4 -0
  281. package/dist/runtime/store/runtime-paths.js.map +1 -1
  282. package/dist/runtime/types/daemon.d.ts +8 -0
  283. package/dist/runtime/types/daemon.d.ts.map +1 -1
  284. package/dist/runtime/types/daemon.js +1 -0
  285. package/dist/runtime/types/daemon.js.map +1 -1
  286. package/dist/runtime/types/plugin.d.ts.map +1 -1
  287. package/dist/runtime/types/plugin.js +1 -1
  288. package/dist/runtime/types/plugin.js.map +1 -1
  289. package/dist/runtime/types/schedule.d.ts +10 -10
  290. package/dist/tools/builtin/exports.d.ts +1 -0
  291. package/dist/tools/builtin/exports.d.ts.map +1 -1
  292. package/dist/tools/builtin/exports.js +1 -0
  293. package/dist/tools/builtin/exports.js.map +1 -1
  294. package/dist/tools/builtin/factory.d.ts.map +1 -1
  295. package/dist/tools/builtin/factory.js +2 -1
  296. package/dist/tools/builtin/factory.js.map +1 -1
  297. package/dist/tools/execution/MemoryConsolidateTool/MemoryConsolidateTool.d.ts +4 -4
  298. package/dist/tools/execution/MemoryCorrectionTool/MemoryCorrectionTool.d.ts +76 -0
  299. package/dist/tools/execution/MemoryCorrectionTool/MemoryCorrectionTool.d.ts.map +1 -0
  300. package/dist/tools/execution/MemoryCorrectionTool/MemoryCorrectionTool.js +79 -0
  301. package/dist/tools/execution/MemoryCorrectionTool/MemoryCorrectionTool.js.map +1 -0
  302. package/dist/tools/execution/MemoryCorrectionTool/constants.d.ts +6 -0
  303. package/dist/tools/execution/MemoryCorrectionTool/constants.d.ts.map +1 -0
  304. package/dist/tools/execution/MemoryCorrectionTool/constants.js +6 -0
  305. package/dist/tools/execution/MemoryCorrectionTool/constants.js.map +1 -0
  306. package/dist/tools/execution/MemoryCorrectionTool/prompt.d.ts +2 -0
  307. package/dist/tools/execution/MemoryCorrectionTool/prompt.d.ts.map +1 -0
  308. package/dist/tools/execution/MemoryCorrectionTool/prompt.js +2 -0
  309. package/dist/tools/execution/MemoryCorrectionTool/prompt.js.map +1 -0
  310. package/dist/tools/execution/MemorySaveTool/MemorySaveTool.d.ts +306 -4
  311. package/dist/tools/execution/MemorySaveTool/MemorySaveTool.d.ts.map +1 -1
  312. package/dist/tools/execution/MemorySaveTool/MemorySaveTool.js +8 -0
  313. package/dist/tools/execution/MemorySaveTool/MemorySaveTool.js.map +1 -1
  314. package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.d.ts.map +1 -1
  315. package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js +37 -4
  316. package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js.map +1 -1
  317. package/dist/tools/fs/FileValidationTool/protected-path-policy.d.ts.map +1 -1
  318. package/dist/tools/fs/FileValidationTool/protected-path-policy.js +12 -0
  319. package/dist/tools/fs/FileValidationTool/protected-path-policy.js.map +1 -1
  320. package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts +16 -4
  321. package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts.map +1 -1
  322. package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.js +12 -0
  323. package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.js.map +1 -1
  324. package/dist/tools/query/SoilQueryTool/SoilQueryTool.d.ts +7 -0
  325. package/dist/tools/query/SoilQueryTool/SoilQueryTool.d.ts.map +1 -1
  326. package/dist/tools/query/SoilQueryTool/SoilQueryTool.js +20 -0
  327. package/dist/tools/query/SoilQueryTool/SoilQueryTool.js.map +1 -1
  328. package/dist/tools/system/ShellTool/ShellTool.d.ts.map +1 -1
  329. package/dist/tools/system/ShellTool/ShellTool.js +1 -1
  330. package/dist/tools/system/ShellTool/ShellTool.js.map +1 -1
  331. package/dist/tools/system/ShellTool/command-policy.d.ts +1 -1
  332. package/dist/tools/system/ShellTool/command-policy.d.ts.map +1 -1
  333. package/dist/tools/system/ShellTool/command-policy.js +25 -1
  334. package/dist/tools/system/ShellTool/command-policy.js.map +1 -1
  335. package/package.json +4 -2
@@ -0,0 +1,656 @@
1
+ import { z } from "zod";
2
+ export declare const MemoryCorrectionTargetKindSchema: z.ZodEnum<["agent_memory", "soil_record", "runtime_evidence", "dream_checkpoint"]>;
3
+ export type MemoryCorrectionTargetKind = z.infer<typeof MemoryCorrectionTargetKindSchema>;
4
+ export declare const MemoryCorrectionKindSchema: z.ZodEnum<["corrected", "superseded", "retracted", "forgotten", "quarantined"]>;
5
+ export type MemoryCorrectionKind = z.infer<typeof MemoryCorrectionKindSchema>;
6
+ export declare const MemoryCorrectionActorSchema: z.ZodEnum<["user", "dream_lint", "runtime_verification", "manual_tool"]>;
7
+ export type MemoryCorrectionActor = z.infer<typeof MemoryCorrectionActorSchema>;
8
+ export declare const MemoryCorrectionAuditStatusSchema: z.ZodEnum<["active", "superseded", "disputed", "destructive_delete_requested"]>;
9
+ export type MemoryCorrectionAuditStatus = z.infer<typeof MemoryCorrectionAuditStatusSchema>;
10
+ export declare const MemoryCorrectionTargetRefSchema: z.ZodObject<{
11
+ kind: z.ZodEnum<["agent_memory", "soil_record", "runtime_evidence", "dream_checkpoint"]>;
12
+ id: z.ZodString;
13
+ scope: z.ZodOptional<z.ZodObject<{
14
+ goal_id: z.ZodOptional<z.ZodString>;
15
+ run_id: z.ZodOptional<z.ZodString>;
16
+ task_id: z.ZodOptional<z.ZodString>;
17
+ }, "strict", z.ZodTypeAny, {
18
+ goal_id?: string | undefined;
19
+ task_id?: string | undefined;
20
+ run_id?: string | undefined;
21
+ }, {
22
+ goal_id?: string | undefined;
23
+ task_id?: string | undefined;
24
+ run_id?: string | undefined;
25
+ }>>;
26
+ }, "strict", z.ZodTypeAny, {
27
+ id: string;
28
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
29
+ scope?: {
30
+ goal_id?: string | undefined;
31
+ task_id?: string | undefined;
32
+ run_id?: string | undefined;
33
+ } | undefined;
34
+ }, {
35
+ id: string;
36
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
37
+ scope?: {
38
+ goal_id?: string | undefined;
39
+ task_id?: string | undefined;
40
+ run_id?: string | undefined;
41
+ } | undefined;
42
+ }>;
43
+ export type MemoryCorrectionTargetRef = z.infer<typeof MemoryCorrectionTargetRefSchema>;
44
+ export declare const MemoryCorrectionProvenanceSchema: z.ZodObject<{
45
+ source: z.ZodEnum<["user", "dream_lint", "runtime_verification", "manual_tool"]>;
46
+ source_ref: z.ZodOptional<z.ZodString>;
47
+ evidence_ref: z.ZodOptional<z.ZodString>;
48
+ confidence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
49
+ note: z.ZodOptional<z.ZodString>;
50
+ }, "strict", z.ZodTypeAny, {
51
+ source: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
52
+ confidence: number | null;
53
+ evidence_ref?: string | undefined;
54
+ source_ref?: string | undefined;
55
+ note?: string | undefined;
56
+ }, {
57
+ source: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
58
+ confidence?: number | null | undefined;
59
+ evidence_ref?: string | undefined;
60
+ source_ref?: string | undefined;
61
+ note?: string | undefined;
62
+ }>;
63
+ export type MemoryCorrectionProvenance = z.infer<typeof MemoryCorrectionProvenanceSchema>;
64
+ export declare const MemoryCorrectionAuditSchema: z.ZodObject<{
65
+ status: z.ZodDefault<z.ZodEnum<["active", "superseded", "disputed", "destructive_delete_requested"]>>;
66
+ retained_for_audit: z.ZodDefault<z.ZodBoolean>;
67
+ destructive_delete_approved_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
68
+ }, "strict", z.ZodTypeAny, {
69
+ status: "active" | "superseded" | "disputed" | "destructive_delete_requested";
70
+ retained_for_audit: boolean;
71
+ destructive_delete_approved_at: string | null;
72
+ }, {
73
+ status?: "active" | "superseded" | "disputed" | "destructive_delete_requested" | undefined;
74
+ retained_for_audit?: boolean | undefined;
75
+ destructive_delete_approved_at?: string | null | undefined;
76
+ }>;
77
+ export type MemoryCorrectionAudit = z.infer<typeof MemoryCorrectionAuditSchema>;
78
+ export declare const MemoryCorrectionEntrySchema: z.ZodObject<{
79
+ schema_version: z.ZodDefault<z.ZodLiteral<"memory-correction-entry-v1">>;
80
+ correction_id: z.ZodString;
81
+ target_ref: z.ZodObject<{
82
+ kind: z.ZodEnum<["agent_memory", "soil_record", "runtime_evidence", "dream_checkpoint"]>;
83
+ id: z.ZodString;
84
+ scope: z.ZodOptional<z.ZodObject<{
85
+ goal_id: z.ZodOptional<z.ZodString>;
86
+ run_id: z.ZodOptional<z.ZodString>;
87
+ task_id: z.ZodOptional<z.ZodString>;
88
+ }, "strict", z.ZodTypeAny, {
89
+ goal_id?: string | undefined;
90
+ task_id?: string | undefined;
91
+ run_id?: string | undefined;
92
+ }, {
93
+ goal_id?: string | undefined;
94
+ task_id?: string | undefined;
95
+ run_id?: string | undefined;
96
+ }>>;
97
+ }, "strict", z.ZodTypeAny, {
98
+ id: string;
99
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
100
+ scope?: {
101
+ goal_id?: string | undefined;
102
+ task_id?: string | undefined;
103
+ run_id?: string | undefined;
104
+ } | undefined;
105
+ }, {
106
+ id: string;
107
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
108
+ scope?: {
109
+ goal_id?: string | undefined;
110
+ task_id?: string | undefined;
111
+ run_id?: string | undefined;
112
+ } | undefined;
113
+ }>;
114
+ correction_kind: z.ZodEnum<["corrected", "superseded", "retracted", "forgotten", "quarantined"]>;
115
+ replacement_ref: z.ZodDefault<z.ZodNullable<z.ZodObject<{
116
+ kind: z.ZodEnum<["agent_memory", "soil_record", "runtime_evidence", "dream_checkpoint"]>;
117
+ id: z.ZodString;
118
+ scope: z.ZodOptional<z.ZodObject<{
119
+ goal_id: z.ZodOptional<z.ZodString>;
120
+ run_id: z.ZodOptional<z.ZodString>;
121
+ task_id: z.ZodOptional<z.ZodString>;
122
+ }, "strict", z.ZodTypeAny, {
123
+ goal_id?: string | undefined;
124
+ task_id?: string | undefined;
125
+ run_id?: string | undefined;
126
+ }, {
127
+ goal_id?: string | undefined;
128
+ task_id?: string | undefined;
129
+ run_id?: string | undefined;
130
+ }>>;
131
+ }, "strict", z.ZodTypeAny, {
132
+ id: string;
133
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
134
+ scope?: {
135
+ goal_id?: string | undefined;
136
+ task_id?: string | undefined;
137
+ run_id?: string | undefined;
138
+ } | undefined;
139
+ }, {
140
+ id: string;
141
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
142
+ scope?: {
143
+ goal_id?: string | undefined;
144
+ task_id?: string | undefined;
145
+ run_id?: string | undefined;
146
+ } | undefined;
147
+ }>>>;
148
+ actor: z.ZodEnum<["user", "dream_lint", "runtime_verification", "manual_tool"]>;
149
+ reason: z.ZodString;
150
+ created_at: z.ZodString;
151
+ provenance: z.ZodObject<{
152
+ source: z.ZodEnum<["user", "dream_lint", "runtime_verification", "manual_tool"]>;
153
+ source_ref: z.ZodOptional<z.ZodString>;
154
+ evidence_ref: z.ZodOptional<z.ZodString>;
155
+ confidence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
156
+ note: z.ZodOptional<z.ZodString>;
157
+ }, "strict", z.ZodTypeAny, {
158
+ source: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
159
+ confidence: number | null;
160
+ evidence_ref?: string | undefined;
161
+ source_ref?: string | undefined;
162
+ note?: string | undefined;
163
+ }, {
164
+ source: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
165
+ confidence?: number | null | undefined;
166
+ evidence_ref?: string | undefined;
167
+ source_ref?: string | undefined;
168
+ note?: string | undefined;
169
+ }>;
170
+ audit: z.ZodDefault<z.ZodObject<{
171
+ status: z.ZodDefault<z.ZodEnum<["active", "superseded", "disputed", "destructive_delete_requested"]>>;
172
+ retained_for_audit: z.ZodDefault<z.ZodBoolean>;
173
+ destructive_delete_approved_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
174
+ }, "strict", z.ZodTypeAny, {
175
+ status: "active" | "superseded" | "disputed" | "destructive_delete_requested";
176
+ retained_for_audit: boolean;
177
+ destructive_delete_approved_at: string | null;
178
+ }, {
179
+ status?: "active" | "superseded" | "disputed" | "destructive_delete_requested" | undefined;
180
+ retained_for_audit?: boolean | undefined;
181
+ destructive_delete_approved_at?: string | null | undefined;
182
+ }>>;
183
+ }, "strict", z.ZodTypeAny, {
184
+ created_at: string;
185
+ reason: string;
186
+ schema_version: "memory-correction-entry-v1";
187
+ provenance: {
188
+ source: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
189
+ confidence: number | null;
190
+ evidence_ref?: string | undefined;
191
+ source_ref?: string | undefined;
192
+ note?: string | undefined;
193
+ };
194
+ correction_id: string;
195
+ target_ref: {
196
+ id: string;
197
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
198
+ scope?: {
199
+ goal_id?: string | undefined;
200
+ task_id?: string | undefined;
201
+ run_id?: string | undefined;
202
+ } | undefined;
203
+ };
204
+ correction_kind: "superseded" | "corrected" | "retracted" | "forgotten" | "quarantined";
205
+ replacement_ref: {
206
+ id: string;
207
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
208
+ scope?: {
209
+ goal_id?: string | undefined;
210
+ task_id?: string | undefined;
211
+ run_id?: string | undefined;
212
+ } | undefined;
213
+ } | null;
214
+ actor: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
215
+ audit: {
216
+ status: "active" | "superseded" | "disputed" | "destructive_delete_requested";
217
+ retained_for_audit: boolean;
218
+ destructive_delete_approved_at: string | null;
219
+ };
220
+ }, {
221
+ created_at: string;
222
+ reason: string;
223
+ provenance: {
224
+ source: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
225
+ confidence?: number | null | undefined;
226
+ evidence_ref?: string | undefined;
227
+ source_ref?: string | undefined;
228
+ note?: string | undefined;
229
+ };
230
+ correction_id: string;
231
+ target_ref: {
232
+ id: string;
233
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
234
+ scope?: {
235
+ goal_id?: string | undefined;
236
+ task_id?: string | undefined;
237
+ run_id?: string | undefined;
238
+ } | undefined;
239
+ };
240
+ correction_kind: "superseded" | "corrected" | "retracted" | "forgotten" | "quarantined";
241
+ actor: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
242
+ schema_version?: "memory-correction-entry-v1" | undefined;
243
+ replacement_ref?: {
244
+ id: string;
245
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
246
+ scope?: {
247
+ goal_id?: string | undefined;
248
+ task_id?: string | undefined;
249
+ run_id?: string | undefined;
250
+ } | undefined;
251
+ } | null | undefined;
252
+ audit?: {
253
+ status?: "active" | "superseded" | "disputed" | "destructive_delete_requested" | undefined;
254
+ retained_for_audit?: boolean | undefined;
255
+ destructive_delete_approved_at?: string | null | undefined;
256
+ } | undefined;
257
+ }>;
258
+ export type MemoryCorrectionEntry = z.infer<typeof MemoryCorrectionEntrySchema>;
259
+ export type MemoryCorrectionEntryInput = z.input<typeof MemoryCorrectionEntrySchema>;
260
+ export declare const MemoryCorrectionLedgerFileSchema: z.ZodObject<{
261
+ schema_version: z.ZodDefault<z.ZodLiteral<"memory-correction-ledger-v1">>;
262
+ generated_at: z.ZodString;
263
+ entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
264
+ schema_version: z.ZodDefault<z.ZodLiteral<"memory-correction-entry-v1">>;
265
+ correction_id: z.ZodString;
266
+ target_ref: z.ZodObject<{
267
+ kind: z.ZodEnum<["agent_memory", "soil_record", "runtime_evidence", "dream_checkpoint"]>;
268
+ id: z.ZodString;
269
+ scope: z.ZodOptional<z.ZodObject<{
270
+ goal_id: z.ZodOptional<z.ZodString>;
271
+ run_id: z.ZodOptional<z.ZodString>;
272
+ task_id: z.ZodOptional<z.ZodString>;
273
+ }, "strict", z.ZodTypeAny, {
274
+ goal_id?: string | undefined;
275
+ task_id?: string | undefined;
276
+ run_id?: string | undefined;
277
+ }, {
278
+ goal_id?: string | undefined;
279
+ task_id?: string | undefined;
280
+ run_id?: string | undefined;
281
+ }>>;
282
+ }, "strict", z.ZodTypeAny, {
283
+ id: string;
284
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
285
+ scope?: {
286
+ goal_id?: string | undefined;
287
+ task_id?: string | undefined;
288
+ run_id?: string | undefined;
289
+ } | undefined;
290
+ }, {
291
+ id: string;
292
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
293
+ scope?: {
294
+ goal_id?: string | undefined;
295
+ task_id?: string | undefined;
296
+ run_id?: string | undefined;
297
+ } | undefined;
298
+ }>;
299
+ correction_kind: z.ZodEnum<["corrected", "superseded", "retracted", "forgotten", "quarantined"]>;
300
+ replacement_ref: z.ZodDefault<z.ZodNullable<z.ZodObject<{
301
+ kind: z.ZodEnum<["agent_memory", "soil_record", "runtime_evidence", "dream_checkpoint"]>;
302
+ id: z.ZodString;
303
+ scope: z.ZodOptional<z.ZodObject<{
304
+ goal_id: z.ZodOptional<z.ZodString>;
305
+ run_id: z.ZodOptional<z.ZodString>;
306
+ task_id: z.ZodOptional<z.ZodString>;
307
+ }, "strict", z.ZodTypeAny, {
308
+ goal_id?: string | undefined;
309
+ task_id?: string | undefined;
310
+ run_id?: string | undefined;
311
+ }, {
312
+ goal_id?: string | undefined;
313
+ task_id?: string | undefined;
314
+ run_id?: string | undefined;
315
+ }>>;
316
+ }, "strict", z.ZodTypeAny, {
317
+ id: string;
318
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
319
+ scope?: {
320
+ goal_id?: string | undefined;
321
+ task_id?: string | undefined;
322
+ run_id?: string | undefined;
323
+ } | undefined;
324
+ }, {
325
+ id: string;
326
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
327
+ scope?: {
328
+ goal_id?: string | undefined;
329
+ task_id?: string | undefined;
330
+ run_id?: string | undefined;
331
+ } | undefined;
332
+ }>>>;
333
+ actor: z.ZodEnum<["user", "dream_lint", "runtime_verification", "manual_tool"]>;
334
+ reason: z.ZodString;
335
+ created_at: z.ZodString;
336
+ provenance: z.ZodObject<{
337
+ source: z.ZodEnum<["user", "dream_lint", "runtime_verification", "manual_tool"]>;
338
+ source_ref: z.ZodOptional<z.ZodString>;
339
+ evidence_ref: z.ZodOptional<z.ZodString>;
340
+ confidence: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
341
+ note: z.ZodOptional<z.ZodString>;
342
+ }, "strict", z.ZodTypeAny, {
343
+ source: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
344
+ confidence: number | null;
345
+ evidence_ref?: string | undefined;
346
+ source_ref?: string | undefined;
347
+ note?: string | undefined;
348
+ }, {
349
+ source: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
350
+ confidence?: number | null | undefined;
351
+ evidence_ref?: string | undefined;
352
+ source_ref?: string | undefined;
353
+ note?: string | undefined;
354
+ }>;
355
+ audit: z.ZodDefault<z.ZodObject<{
356
+ status: z.ZodDefault<z.ZodEnum<["active", "superseded", "disputed", "destructive_delete_requested"]>>;
357
+ retained_for_audit: z.ZodDefault<z.ZodBoolean>;
358
+ destructive_delete_approved_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
359
+ }, "strict", z.ZodTypeAny, {
360
+ status: "active" | "superseded" | "disputed" | "destructive_delete_requested";
361
+ retained_for_audit: boolean;
362
+ destructive_delete_approved_at: string | null;
363
+ }, {
364
+ status?: "active" | "superseded" | "disputed" | "destructive_delete_requested" | undefined;
365
+ retained_for_audit?: boolean | undefined;
366
+ destructive_delete_approved_at?: string | null | undefined;
367
+ }>>;
368
+ }, "strict", z.ZodTypeAny, {
369
+ created_at: string;
370
+ reason: string;
371
+ schema_version: "memory-correction-entry-v1";
372
+ provenance: {
373
+ source: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
374
+ confidence: number | null;
375
+ evidence_ref?: string | undefined;
376
+ source_ref?: string | undefined;
377
+ note?: string | undefined;
378
+ };
379
+ correction_id: string;
380
+ target_ref: {
381
+ id: string;
382
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
383
+ scope?: {
384
+ goal_id?: string | undefined;
385
+ task_id?: string | undefined;
386
+ run_id?: string | undefined;
387
+ } | undefined;
388
+ };
389
+ correction_kind: "superseded" | "corrected" | "retracted" | "forgotten" | "quarantined";
390
+ replacement_ref: {
391
+ id: string;
392
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
393
+ scope?: {
394
+ goal_id?: string | undefined;
395
+ task_id?: string | undefined;
396
+ run_id?: string | undefined;
397
+ } | undefined;
398
+ } | null;
399
+ actor: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
400
+ audit: {
401
+ status: "active" | "superseded" | "disputed" | "destructive_delete_requested";
402
+ retained_for_audit: boolean;
403
+ destructive_delete_approved_at: string | null;
404
+ };
405
+ }, {
406
+ created_at: string;
407
+ reason: string;
408
+ provenance: {
409
+ source: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
410
+ confidence?: number | null | undefined;
411
+ evidence_ref?: string | undefined;
412
+ source_ref?: string | undefined;
413
+ note?: string | undefined;
414
+ };
415
+ correction_id: string;
416
+ target_ref: {
417
+ id: string;
418
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
419
+ scope?: {
420
+ goal_id?: string | undefined;
421
+ task_id?: string | undefined;
422
+ run_id?: string | undefined;
423
+ } | undefined;
424
+ };
425
+ correction_kind: "superseded" | "corrected" | "retracted" | "forgotten" | "quarantined";
426
+ actor: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
427
+ schema_version?: "memory-correction-entry-v1" | undefined;
428
+ replacement_ref?: {
429
+ id: string;
430
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
431
+ scope?: {
432
+ goal_id?: string | undefined;
433
+ task_id?: string | undefined;
434
+ run_id?: string | undefined;
435
+ } | undefined;
436
+ } | null | undefined;
437
+ audit?: {
438
+ status?: "active" | "superseded" | "disputed" | "destructive_delete_requested" | undefined;
439
+ retained_for_audit?: boolean | undefined;
440
+ destructive_delete_approved_at?: string | null | undefined;
441
+ } | undefined;
442
+ }>, "many">>;
443
+ }, "strict", z.ZodTypeAny, {
444
+ entries: {
445
+ created_at: string;
446
+ reason: string;
447
+ schema_version: "memory-correction-entry-v1";
448
+ provenance: {
449
+ source: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
450
+ confidence: number | null;
451
+ evidence_ref?: string | undefined;
452
+ source_ref?: string | undefined;
453
+ note?: string | undefined;
454
+ };
455
+ correction_id: string;
456
+ target_ref: {
457
+ id: string;
458
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
459
+ scope?: {
460
+ goal_id?: string | undefined;
461
+ task_id?: string | undefined;
462
+ run_id?: string | undefined;
463
+ } | undefined;
464
+ };
465
+ correction_kind: "superseded" | "corrected" | "retracted" | "forgotten" | "quarantined";
466
+ replacement_ref: {
467
+ id: string;
468
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
469
+ scope?: {
470
+ goal_id?: string | undefined;
471
+ task_id?: string | undefined;
472
+ run_id?: string | undefined;
473
+ } | undefined;
474
+ } | null;
475
+ actor: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
476
+ audit: {
477
+ status: "active" | "superseded" | "disputed" | "destructive_delete_requested";
478
+ retained_for_audit: boolean;
479
+ destructive_delete_approved_at: string | null;
480
+ };
481
+ }[];
482
+ generated_at: string;
483
+ schema_version: "memory-correction-ledger-v1";
484
+ }, {
485
+ generated_at: string;
486
+ entries?: {
487
+ created_at: string;
488
+ reason: string;
489
+ provenance: {
490
+ source: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
491
+ confidence?: number | null | undefined;
492
+ evidence_ref?: string | undefined;
493
+ source_ref?: string | undefined;
494
+ note?: string | undefined;
495
+ };
496
+ correction_id: string;
497
+ target_ref: {
498
+ id: string;
499
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
500
+ scope?: {
501
+ goal_id?: string | undefined;
502
+ task_id?: string | undefined;
503
+ run_id?: string | undefined;
504
+ } | undefined;
505
+ };
506
+ correction_kind: "superseded" | "corrected" | "retracted" | "forgotten" | "quarantined";
507
+ actor: "user" | "dream_lint" | "runtime_verification" | "manual_tool";
508
+ schema_version?: "memory-correction-entry-v1" | undefined;
509
+ replacement_ref?: {
510
+ id: string;
511
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
512
+ scope?: {
513
+ goal_id?: string | undefined;
514
+ task_id?: string | undefined;
515
+ run_id?: string | undefined;
516
+ } | undefined;
517
+ } | null | undefined;
518
+ audit?: {
519
+ status?: "active" | "superseded" | "disputed" | "destructive_delete_requested" | undefined;
520
+ retained_for_audit?: boolean | undefined;
521
+ destructive_delete_approved_at?: string | null | undefined;
522
+ } | undefined;
523
+ }[] | undefined;
524
+ schema_version?: "memory-correction-ledger-v1" | undefined;
525
+ }>;
526
+ export type MemoryCorrectionLedgerFile = z.infer<typeof MemoryCorrectionLedgerFileSchema>;
527
+ export declare const MemoryCorrectionTargetStateSchema: z.ZodObject<{
528
+ target_ref: z.ZodObject<{
529
+ kind: z.ZodEnum<["agent_memory", "soil_record", "runtime_evidence", "dream_checkpoint"]>;
530
+ id: z.ZodString;
531
+ scope: z.ZodOptional<z.ZodObject<{
532
+ goal_id: z.ZodOptional<z.ZodString>;
533
+ run_id: z.ZodOptional<z.ZodString>;
534
+ task_id: z.ZodOptional<z.ZodString>;
535
+ }, "strict", z.ZodTypeAny, {
536
+ goal_id?: string | undefined;
537
+ task_id?: string | undefined;
538
+ run_id?: string | undefined;
539
+ }, {
540
+ goal_id?: string | undefined;
541
+ task_id?: string | undefined;
542
+ run_id?: string | undefined;
543
+ }>>;
544
+ }, "strict", z.ZodTypeAny, {
545
+ id: string;
546
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
547
+ scope?: {
548
+ goal_id?: string | undefined;
549
+ task_id?: string | undefined;
550
+ run_id?: string | undefined;
551
+ } | undefined;
552
+ }, {
553
+ id: string;
554
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
555
+ scope?: {
556
+ goal_id?: string | undefined;
557
+ task_id?: string | undefined;
558
+ run_id?: string | undefined;
559
+ } | undefined;
560
+ }>;
561
+ status: z.ZodEnum<["active", "corrected", "superseded", "retracted", "forgotten", "quarantined"]>;
562
+ active: z.ZodBoolean;
563
+ latest_correction_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
564
+ replacement_ref: z.ZodDefault<z.ZodNullable<z.ZodObject<{
565
+ kind: z.ZodEnum<["agent_memory", "soil_record", "runtime_evidence", "dream_checkpoint"]>;
566
+ id: z.ZodString;
567
+ scope: z.ZodOptional<z.ZodObject<{
568
+ goal_id: z.ZodOptional<z.ZodString>;
569
+ run_id: z.ZodOptional<z.ZodString>;
570
+ task_id: z.ZodOptional<z.ZodString>;
571
+ }, "strict", z.ZodTypeAny, {
572
+ goal_id?: string | undefined;
573
+ task_id?: string | undefined;
574
+ run_id?: string | undefined;
575
+ }, {
576
+ goal_id?: string | undefined;
577
+ task_id?: string | undefined;
578
+ run_id?: string | undefined;
579
+ }>>;
580
+ }, "strict", z.ZodTypeAny, {
581
+ id: string;
582
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
583
+ scope?: {
584
+ goal_id?: string | undefined;
585
+ task_id?: string | undefined;
586
+ run_id?: string | undefined;
587
+ } | undefined;
588
+ }, {
589
+ id: string;
590
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
591
+ scope?: {
592
+ goal_id?: string | undefined;
593
+ task_id?: string | undefined;
594
+ run_id?: string | undefined;
595
+ } | undefined;
596
+ }>>>;
597
+ retained_for_audit: z.ZodDefault<z.ZodBoolean>;
598
+ reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
599
+ updated_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
600
+ }, "strict", z.ZodTypeAny, {
601
+ status: "active" | "superseded" | "corrected" | "retracted" | "forgotten" | "quarantined";
602
+ active: boolean;
603
+ updated_at: string | null;
604
+ reason: string | null;
605
+ retained_for_audit: boolean;
606
+ target_ref: {
607
+ id: string;
608
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
609
+ scope?: {
610
+ goal_id?: string | undefined;
611
+ task_id?: string | undefined;
612
+ run_id?: string | undefined;
613
+ } | undefined;
614
+ };
615
+ replacement_ref: {
616
+ id: string;
617
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
618
+ scope?: {
619
+ goal_id?: string | undefined;
620
+ task_id?: string | undefined;
621
+ run_id?: string | undefined;
622
+ } | undefined;
623
+ } | null;
624
+ latest_correction_id: string | null;
625
+ }, {
626
+ status: "active" | "superseded" | "corrected" | "retracted" | "forgotten" | "quarantined";
627
+ active: boolean;
628
+ target_ref: {
629
+ id: string;
630
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
631
+ scope?: {
632
+ goal_id?: string | undefined;
633
+ task_id?: string | undefined;
634
+ run_id?: string | undefined;
635
+ } | undefined;
636
+ };
637
+ updated_at?: string | null | undefined;
638
+ reason?: string | null | undefined;
639
+ retained_for_audit?: boolean | undefined;
640
+ replacement_ref?: {
641
+ id: string;
642
+ kind: "runtime_evidence" | "agent_memory" | "soil_record" | "dream_checkpoint";
643
+ scope?: {
644
+ goal_id?: string | undefined;
645
+ task_id?: string | undefined;
646
+ run_id?: string | undefined;
647
+ } | undefined;
648
+ } | null | undefined;
649
+ latest_correction_id?: string | null | undefined;
650
+ }>;
651
+ export type MemoryCorrectionTargetState = z.infer<typeof MemoryCorrectionTargetStateSchema>;
652
+ export declare function memoryCorrectionTargetKey(ref: MemoryCorrectionTargetRef): string;
653
+ export declare function isMemoryCorrectionInactive(kind: MemoryCorrectionKind): boolean;
654
+ export declare function summarizeMemoryCorrectionState(entries: MemoryCorrectionEntry[]): Record<string, MemoryCorrectionTargetState>;
655
+ export declare function correctionStateForTarget(states: Record<string, MemoryCorrectionTargetState>, ref: MemoryCorrectionTargetRef): MemoryCorrectionTargetState;
656
+ //# sourceMappingURL=memory-correction-ledger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-correction-ledger.d.ts","sourceRoot":"","sources":["../../../src/platform/corrections/memory-correction-ledger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gCAAgC,oFAK3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,0BAA0B,iFAMrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B,0EAKtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,iCAAiC,iFAK5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQjC,CAAC;AACZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;EAMlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,2BAA2B;;;;;;;;;;;;EAI7B,CAAC;AACZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW7B,CAAC;AACZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAErF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASnC,CAAC;AACZ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAU5F,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,yBAAyB,GAAG,MAAM,CAQhF;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAE9E;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,qBAAqB,EAAE,GAC/B,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAiB7C;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,EACnD,GAAG,EAAE,yBAAyB,GAC7B,2BAA2B,CAM7B"}