@snoai/memory 0.0.0-stage → 1.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 (478) hide show
  1. package/LICENSE +176 -0
  2. package/README.md +7 -2
  3. package/config/b-profile-section-registry.json +118 -0
  4. package/config/llm/compiled/2026-05-19T230932Z/manifest.json +25 -0
  5. package/config/llm/compiled/2026-05-19T230932Z/registry-root.json +67 -0
  6. package/config/llm/compiled/2026-05-19T230932Z/resolved/mem_claw/openai_gpt_5_nano.json +5 -0
  7. package/config/llm/compiled/2026-05-19T230932Z/resolved/mem_claw/openrouter_auto.json +5 -0
  8. package/config/llm/compiled/2026-05-19T230932Z/resolved/mem_claw/sno_ai_extract.json +5 -0
  9. package/config/llm/compiled/2026-05-19T230932Z/source/mem_claw/openai_gpt_5_nano.mda +24 -0
  10. package/config/llm/compiled/2026-05-19T230932Z/source/mem_claw/openrouter_auto.mda +24 -0
  11. package/config/llm/compiled/2026-05-19T230932Z/source/mem_claw/sno_ai_extract.mda +24 -0
  12. package/config/llm/compiled/2026-07-21T001311Z/manifest.json +43 -0
  13. package/config/llm/compiled/2026-07-21T001311Z/registry-root.json +97 -0
  14. package/config/llm/compiled/2026-07-21T001311Z/resolved/mem_claw/openai_gpt_5_nano.json +5 -0
  15. package/config/llm/compiled/2026-07-21T001311Z/resolved/mem_claw/openrouter_auto.json +5 -0
  16. package/config/llm/compiled/2026-07-21T001311Z/resolved/mem_claw/sno_ai_extract.json +5 -0
  17. package/config/llm/compiled/2026-07-21T001311Z/resolved/mem_claw/sno_conflict_verdict.json +10 -0
  18. package/config/llm/compiled/2026-07-21T001311Z/resolved/mem_claw/sno_extract_chat.json +10 -0
  19. package/config/llm/compiled/2026-07-21T001311Z/resolved/mem_claw/sno_extract_profile.json +10 -0
  20. package/config/llm/compiled/2026-07-21T001311Z/source/mem_claw/openai_gpt_5_nano.mda +24 -0
  21. package/config/llm/compiled/2026-07-21T001311Z/source/mem_claw/openrouter_auto.mda +24 -0
  22. package/config/llm/compiled/2026-07-21T001311Z/source/mem_claw/sno_ai_extract.mda +24 -0
  23. package/config/llm/compiled/2026-07-21T001311Z/source/mem_claw/sno_conflict_verdict.mda +27 -0
  24. package/config/llm/compiled/2026-07-21T001311Z/source/mem_claw/sno_extract_chat.mda +27 -0
  25. package/config/llm/compiled/2026-07-21T001311Z/source/mem_claw/sno_extract_profile.mda +27 -0
  26. package/config/llm/compiled/2026-08-29T060335Z/manifest.json +43 -0
  27. package/config/llm/compiled/2026-08-29T060335Z/registry-root.json +97 -0
  28. package/config/llm/compiled/2026-08-29T060335Z/resolved/mem_claw/openai_gpt_5_nano.json +5 -0
  29. package/config/llm/compiled/2026-08-29T060335Z/resolved/mem_claw/openrouter_auto.json +5 -0
  30. package/config/llm/compiled/2026-08-29T060335Z/resolved/mem_claw/sno_ai_extract.json +5 -0
  31. package/config/llm/compiled/2026-08-29T060335Z/resolved/mem_claw/sno_conflict_verdict.json +10 -0
  32. package/config/llm/compiled/2026-08-29T060335Z/resolved/mem_claw/sno_extract_chat.json +10 -0
  33. package/config/llm/compiled/2026-08-29T060335Z/resolved/mem_claw/sno_extract_profile.json +10 -0
  34. package/config/llm/compiled/2026-08-29T060335Z/source/mem_claw/openai_gpt_5_nano.mda +24 -0
  35. package/config/llm/compiled/2026-08-29T060335Z/source/mem_claw/openrouter_auto.mda +24 -0
  36. package/config/llm/compiled/2026-08-29T060335Z/source/mem_claw/sno_ai_extract.mda +24 -0
  37. package/config/llm/compiled/2026-08-29T060335Z/source/mem_claw/sno_conflict_verdict.mda +27 -0
  38. package/config/llm/compiled/2026-08-29T060335Z/source/mem_claw/sno_extract_chat.mda +27 -0
  39. package/config/llm/compiled/2026-08-29T060335Z/source/mem_claw/sno_extract_profile.mda +27 -0
  40. package/config/llm/compiled/2026-09-04T004828Z/manifest.json +43 -0
  41. package/config/llm/compiled/2026-09-04T004828Z/registry-root.json +97 -0
  42. package/config/llm/compiled/2026-09-04T004828Z/resolved/mem_claw/openai_gpt_5_nano.json +5 -0
  43. package/config/llm/compiled/2026-09-04T004828Z/resolved/mem_claw/openrouter_auto.json +5 -0
  44. package/config/llm/compiled/2026-09-04T004828Z/resolved/mem_claw/sno_ai_extract.json +5 -0
  45. package/config/llm/compiled/2026-09-04T004828Z/resolved/mem_claw/sno_conflict_verdict.json +10 -0
  46. package/config/llm/compiled/2026-09-04T004828Z/resolved/mem_claw/sno_extract_chat.json +10 -0
  47. package/config/llm/compiled/2026-09-04T004828Z/resolved/mem_claw/sno_extract_profile.json +10 -0
  48. package/config/llm/compiled/2026-09-04T004828Z/source/mem_claw/openai_gpt_5_nano.mda +24 -0
  49. package/config/llm/compiled/2026-09-04T004828Z/source/mem_claw/openrouter_auto.mda +24 -0
  50. package/config/llm/compiled/2026-09-04T004828Z/source/mem_claw/sno_ai_extract.mda +24 -0
  51. package/config/llm/compiled/2026-09-04T004828Z/source/mem_claw/sno_conflict_verdict.mda +27 -0
  52. package/config/llm/compiled/2026-09-04T004828Z/source/mem_claw/sno_extract_chat.mda +27 -0
  53. package/config/llm/compiled/2026-09-04T004828Z/source/mem_claw/sno_extract_profile.mda +27 -0
  54. package/config/llm/current.json +4 -0
  55. package/config/llm/source/mem_claw/openai_gpt_5_nano.mda +24 -0
  56. package/config/llm/source/mem_claw/openrouter_auto.mda +24 -0
  57. package/config/llm/source/mem_claw/sno_ai_extract.mda +24 -0
  58. package/config/llm/source/mem_claw/sno_conflict_verdict.mda +27 -0
  59. package/config/llm/source/mem_claw/sno_extract_chat.mda +27 -0
  60. package/config/llm/source/mem_claw/sno_extract_profile.mda +27 -0
  61. package/config/llm.trust.json +37 -0
  62. package/dist/_types-CUKHSRkS.d.ts +103 -0
  63. package/dist/access-tracker-CSc21GtV.d.ts +110 -0
  64. package/dist/adapter-DMEmCTKo.d.ts +69 -0
  65. package/dist/adapter-XaRHZWZ2.js +333 -0
  66. package/dist/agent-llm-port-5oXgBpzJ.d.ts +53 -0
  67. package/dist/all-resources-BQK2ugjB.js +6379 -0
  68. package/dist/all-resources-Dij6l5h0.d.ts +18 -0
  69. package/dist/ambient-learning-text-normalizer-CxjATmMp.js +170 -0
  70. package/dist/ambient-learning-text-normalizer-_fH3LeuK.d.ts +10 -0
  71. package/dist/atomic-extraction-reply-BJ9XV_9s.js +863 -0
  72. package/dist/atomic-extraction-skill-CcXmuCqL.js +56 -0
  73. package/dist/atomic-memory-extraction-BpOUWPJM.d.ts +327 -0
  74. package/dist/atomic-memory-extraction-sdNf1-B1.js +3605 -0
  75. package/dist/b-profile-section-dictionary-provider-BHkoNqgk.js +1812 -0
  76. package/dist/b-profile-section-dictionary-provider-BxbksLj3.d.ts +62 -0
  77. package/dist/best-effort-BPZSzKk0.d.ts +9 -0
  78. package/dist/calendar-instruction-CzqZbAPG.js +194 -0
  79. package/dist/capture-policy-detector-CHz5GOPA.d.ts +53 -0
  80. package/dist/capture-policy-detector-DaMfy9CZ.js +357 -0
  81. package/dist/classifier-C96uH9OF.d.ts +272 -0
  82. package/dist/client.d.ts +34 -0
  83. package/dist/client.js +305 -0
  84. package/dist/coding-skin.d.ts +51 -0
  85. package/dist/coding-skin.js +55 -0
  86. package/dist/config-tSrvLXgV.js +2577 -0
  87. package/dist/connection-DAbzki8K.d.ts +391 -0
  88. package/dist/connection-DliCOBB2.js +297 -0
  89. package/dist/daily-log-generator-CH_KuWHs.js +469 -0
  90. package/dist/daily-log-generator-CsQPHl4A.d.ts +73 -0
  91. package/dist/daily-spend-estimator-DiwzBlo1.d.ts +8 -0
  92. package/dist/data-bootstrap-CYniFp8b.js +172 -0
  93. package/dist/data-bootstrap-CcJUwkqf.d.ts +30 -0
  94. package/dist/data-paths-C7sNdqvP.d.ts +22 -0
  95. package/dist/derived-suppression-cache-C7bGARc0.d.ts +36 -0
  96. package/dist/diagnostic-encoder.d.ts +6 -0
  97. package/dist/diagnostic-encoder.js +29 -0
  98. package/dist/embedding-provider-client-Q_hJonK9.js +294 -0
  99. package/dist/embedding-provider-client-vynZMuit.d.ts +94 -0
  100. package/dist/entry-metadata-parser-BIVSMCIk.js +20 -0
  101. package/dist/error-D-wb-rZw.js +23 -0
  102. package/dist/error-signals-D8_3vYu4.d.ts +28 -0
  103. package/dist/error-signals-lMH2uAdV.js +134 -0
  104. package/dist/errors-CeVRxf9V.d.ts +49 -0
  105. package/dist/extraction-text-sanitizer-B_AhIecT.d.ts +32 -0
  106. package/dist/i18n-text-DbD6Qify.d.ts +13 -0
  107. package/dist/index-BsMap4It.d.ts +650 -0
  108. package/dist/index-DL8AVj0Z.d.ts +571 -0
  109. package/dist/index-DQ7VL6d3.d.ts +350 -0
  110. package/dist/index.d.ts +65 -0
  111. package/dist/index.js +1201 -0
  112. package/dist/intent-analyzer-B5XVrWwe.d.ts +28 -0
  113. package/dist/internal/config/index.d.ts +2 -0
  114. package/dist/internal/config/index.js +581 -0
  115. package/dist/internal/config/plugin-config-schema.d.ts +2 -0
  116. package/dist/internal/config/plugin-config-schema.js +2 -0
  117. package/dist/internal/config/product-mode.d.ts +2 -0
  118. package/dist/internal/config/product-mode.js +36 -0
  119. package/dist/internal/config/settings.d.ts +2 -0
  120. package/dist/internal/config/settings.js +265 -0
  121. package/dist/internal/config/skill-categories.d.ts +4 -0
  122. package/dist/internal/config/skill-categories.js +68 -0
  123. package/dist/internal/config/skin-defaults.d.ts +6 -0
  124. package/dist/internal/config/skin-defaults.js +6 -0
  125. package/dist/internal/contract/discovery.d.ts +10 -0
  126. package/dist/internal/contract/discovery.js +53 -0
  127. package/dist/internal/contract/profile.d.ts +2 -0
  128. package/dist/internal/contract/profile.js +44 -0
  129. package/dist/internal/contract/routes.d.ts +2 -0
  130. package/dist/internal/contract/routes.js +61 -0
  131. package/dist/internal/engine/bindings/memory-cli-shared.d.ts +47 -0
  132. package/dist/internal/engine/bindings/memory-cli-shared.js +84 -0
  133. package/dist/internal/engine/bindings/memory-forget-tool.d.ts +5 -0
  134. package/dist/internal/engine/bindings/memory-forget-tool.js +66 -0
  135. package/dist/internal/engine/bindings/memory-list-tool.d.ts +5 -0
  136. package/dist/internal/engine/bindings/memory-list-tool.js +57 -0
  137. package/dist/internal/engine/bindings/memory-recall-tool.d.ts +10 -0
  138. package/dist/internal/engine/bindings/memory-recall-tool.js +283 -0
  139. package/dist/internal/engine/bindings/memory-reflection-resolve-tool.d.ts +5 -0
  140. package/dist/internal/engine/bindings/memory-reflection-resolve-tool.js +150 -0
  141. package/dist/internal/engine/bindings/memory-stats-tool.d.ts +5 -0
  142. package/dist/internal/engine/bindings/memory-stats-tool.js +43 -0
  143. package/dist/internal/engine/bindings/memory-store-tool.d.ts +5 -0
  144. package/dist/internal/engine/bindings/memory-store-tool.js +165 -0
  145. package/dist/internal/engine/bindings/memory-tool-access.d.ts +16 -0
  146. package/dist/internal/engine/bindings/memory-tool-access.js +46 -0
  147. package/dist/internal/engine/bindings/memory-tool-formatting.d.ts +62 -0
  148. package/dist/internal/engine/bindings/memory-tool-formatting.js +106 -0
  149. package/dist/internal/engine/bindings/memory-tool-results.d.ts +8 -0
  150. package/dist/internal/engine/bindings/memory-tool-results.js +41 -0
  151. package/dist/internal/engine/bindings/memory-tool-schemas.d.ts +109 -0
  152. package/dist/internal/engine/bindings/memory-tool-schemas.js +75 -0
  153. package/dist/internal/engine/bindings/memory-update-tool.d.ts +5 -0
  154. package/dist/internal/engine/bindings/memory-update-tool.js +127 -0
  155. package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.d.ts +14 -0
  156. package/dist/internal/engine/bindings/sno-station-mem-ambient-learning-hook.js +248 -0
  157. package/dist/internal/engine/bindings/sno-station-mem-auto-recall-hook.d.ts +12 -0
  158. package/dist/internal/engine/bindings/sno-station-mem-auto-recall-hook.js +324 -0
  159. package/dist/internal/engine/bindings/sno-station-mem-hook-types.d.ts +56 -0
  160. package/dist/internal/engine/bindings/sno-station-mem-hook-types.js +1 -0
  161. package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.d.ts +14 -0
  162. package/dist/internal/engine/bindings/sno-station-mem-insight-distill-factory.js +119 -0
  163. package/dist/internal/engine/bindings/sno-station-mem-message-transcript.d.ts +52 -0
  164. package/dist/internal/engine/bindings/sno-station-mem-message-transcript.js +145 -0
  165. package/dist/internal/engine/bindings/sno-station-mem-reset-hook.d.ts +10 -0
  166. package/dist/internal/engine/bindings/sno-station-mem-reset-hook.js +9 -0
  167. package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.d.ts +37 -0
  168. package/dist/internal/engine/bindings/sno-station-mem-runtime-mode.js +105 -0
  169. package/dist/internal/engine/bindings/sno-station-mem-session-state.d.ts +10 -0
  170. package/dist/internal/engine/bindings/sno-station-mem-session-state.js +27 -0
  171. package/dist/internal/engine/eval/trace.d.ts +2 -0
  172. package/dist/internal/engine/eval/trace.js +151 -0
  173. package/dist/internal/engine/extraction/ambient-learning-text-normalizer.d.ts +2 -0
  174. package/dist/internal/engine/extraction/ambient-learning-text-normalizer.js +2 -0
  175. package/dist/internal/engine/extraction/atomic-memory-extraction.d.ts +2 -0
  176. package/dist/internal/engine/extraction/atomic-memory-extraction.js +2 -0
  177. package/dist/internal/engine/extraction/b-profile-section-dictionary-provider.d.ts +2 -0
  178. package/dist/internal/engine/extraction/b-profile-section-dictionary-provider.js +2 -0
  179. package/dist/internal/engine/extraction/b-profile-section-rekey.d.ts +49 -0
  180. package/dist/internal/engine/extraction/b-profile-section-rekey.js +730 -0
  181. package/dist/internal/engine/extraction/capture-policy-detector.d.ts +2 -0
  182. package/dist/internal/engine/extraction/capture-policy-detector.js +2 -0
  183. package/dist/internal/engine/extraction/embedding-provider-client.d.ts +2 -0
  184. package/dist/internal/engine/extraction/embedding-provider-client.js +2 -0
  185. package/dist/internal/engine/extraction/extraction-text-sanitizer.d.ts +2 -0
  186. package/dist/internal/engine/extraction/extraction-text-sanitizer.js +114 -0
  187. package/dist/internal/engine/extraction/memory-metadata-codec.d.ts +3 -0
  188. package/dist/internal/engine/extraction/memory-metadata-codec.js +2 -0
  189. package/dist/internal/engine/extraction/memory-temporality-classifier.d.ts +2 -0
  190. package/dist/internal/engine/extraction/memory-temporality-classifier.js +2 -0
  191. package/dist/internal/engine/i18n/all-resources.d.ts +2 -0
  192. package/dist/internal/engine/i18n/all-resources.js +2 -0
  193. package/dist/internal/engine/i18n/locales.d.ts +2 -0
  194. package/dist/internal/engine/i18n/locales.js +19 -0
  195. package/dist/internal/engine/i18n/res/_types.d.ts +2 -0
  196. package/dist/internal/engine/i18n/res/_types.js +11 -0
  197. package/dist/internal/engine/observability/adapter.d.ts +2 -0
  198. package/dist/internal/engine/observability/adapter.js +2 -0
  199. package/dist/internal/engine/observability/best-effort.d.ts +2 -0
  200. package/dist/internal/engine/observability/best-effort.js +41 -0
  201. package/dist/internal/engine/observability/early-diagnostics.js +2 -0
  202. package/dist/internal/engine/observability/memory-snapshot.d.ts +2 -0
  203. package/dist/internal/engine/observability/memory-snapshot.js +44 -0
  204. package/dist/internal/engine/observability/observable-embedder.d.ts +2 -0
  205. package/dist/internal/engine/observability/observable-embedder.js +43 -0
  206. package/dist/internal/engine/observability/observable-llm-client.d.ts +2 -0
  207. package/dist/internal/engine/observability/observable-llm-client.js +98 -0
  208. package/dist/internal/engine/observability/observable-memory-store.d.ts +2 -0
  209. package/dist/internal/engine/observability/observable-memory-store.js +701 -0
  210. package/dist/internal/engine/observability/observable-retriever.d.ts +2 -0
  211. package/dist/internal/engine/observability/observable-retriever.js +95 -0
  212. package/dist/internal/engine/observability/runtime-diagnostics.d.ts +13 -0
  213. package/dist/internal/engine/observability/runtime-diagnostics.js +96 -0
  214. package/dist/internal/engine/observability/session-registry.d.ts +2 -0
  215. package/dist/internal/engine/observability/session-registry.js +58 -0
  216. package/dist/internal/engine/observability/version-metadata.d.ts +7 -0
  217. package/dist/internal/engine/observability/version-metadata.js +59 -0
  218. package/dist/internal/engine/operations/daily-spend-estimator.d.ts +2 -0
  219. package/dist/internal/engine/operations/daily-spend-estimator.js +97 -0
  220. package/dist/internal/engine/operations/learning-file-maintenance.d.ts +2 -0
  221. package/dist/internal/engine/operations/learning-file-maintenance.js +255 -0
  222. package/dist/internal/engine/operations/memory-tier-promoter.d.ts +2 -0
  223. package/dist/internal/engine/operations/memory-tier-promoter.js +95 -0
  224. package/dist/internal/engine/operations/runtime-audit-log.d.ts +3 -0
  225. package/dist/internal/engine/operations/runtime-audit-log.js +3 -0
  226. package/dist/internal/engine/provider/canonical-memory-corpus.d.ts +38 -0
  227. package/dist/internal/engine/provider/canonical-memory-corpus.js +253 -0
  228. package/dist/internal/engine/provider/provider-registration.d.ts +39 -0
  229. package/dist/internal/engine/provider/provider-registration.js +2 -0
  230. package/dist/internal/engine/provider/provider-row-renderer.d.ts +7 -0
  231. package/dist/internal/engine/provider/provider-row-renderer.js +53 -0
  232. package/dist/internal/engine/provider/provider-types.d.ts +2 -0
  233. package/dist/internal/engine/provider/provider-types.js +1 -0
  234. package/dist/internal/engine/reflection/daily-log-generator.d.ts +2 -0
  235. package/dist/internal/engine/reflection/daily-log-generator.js +2 -0
  236. package/dist/internal/engine/reflection/reflection-command-hooks.d.ts +2 -0
  237. package/dist/internal/engine/reflection/reflection-command-hooks.js +2 -0
  238. package/dist/internal/engine/reflection/reflection-deps.d.ts +2 -0
  239. package/dist/internal/engine/reflection/reflection-deps.js +1 -0
  240. package/dist/internal/engine/reflection/reflection-embedded-generator.d.ts +2 -0
  241. package/dist/internal/engine/reflection/reflection-embedded-generator.js +2 -0
  242. package/dist/internal/engine/reflection/reflection-injection-hooks.d.ts +2 -0
  243. package/dist/internal/engine/reflection/reflection-injection-hooks.js +219 -0
  244. package/dist/internal/engine/reflection/reflection-lifecycle-hooks.d.ts +2 -0
  245. package/dist/internal/engine/reflection/reflection-lifecycle-hooks.js +63 -0
  246. package/dist/internal/engine/reflection/strategy-hook-runner.d.ts +4 -0
  247. package/dist/internal/engine/reflection/strategy-hook-runner.js +3 -0
  248. package/dist/internal/engine/rem/classifier.d.ts +2 -0
  249. package/dist/internal/engine/rem/classifier.js +180 -0
  250. package/dist/internal/engine/rem/index.d.ts +4 -0
  251. package/dist/internal/engine/rem/index.js +2551 -0
  252. package/dist/internal/engine/rem/types.d.ts +2 -0
  253. package/dist/internal/engine/rem/types.js +40 -0
  254. package/dist/internal/engine/retrieval/access-tracker.d.ts +2 -0
  255. package/dist/internal/engine/retrieval/access-tracker.js +314 -0
  256. package/dist/internal/engine/retrieval/intent-analyzer.d.ts +2 -0
  257. package/dist/internal/engine/retrieval/intent-analyzer.js +27 -0
  258. package/dist/internal/engine/retrieval/retrieval-gate.d.ts +2 -0
  259. package/dist/internal/engine/retrieval/retrieval-gate.js +47 -0
  260. package/dist/internal/engine/retrieval/retriever.d.ts +2 -0
  261. package/dist/internal/engine/retrieval/retriever.js +2 -0
  262. package/dist/internal/engine/security/memory-scope-policy.d.ts +2 -0
  263. package/dist/internal/engine/security/memory-scope-policy.js +2 -0
  264. package/dist/internal/engine/security/redact.d.ts +2 -0
  265. package/dist/internal/engine/security/redact.js +34 -0
  266. package/dist/internal/engine/security/scopes.d.ts +3 -0
  267. package/dist/internal/engine/security/scopes.js +3 -0
  268. package/dist/internal/engine/shared/errors.d.ts +2 -0
  269. package/dist/internal/engine/shared/errors.js +66 -0
  270. package/dist/internal/engine/shared/i18n-text.d.ts +2 -0
  271. package/dist/internal/engine/shared/i18n-text.js +58 -0
  272. package/dist/internal/engine/shared/iso-date-time.d.ts +16 -0
  273. package/dist/internal/engine/shared/iso-date-time.js +40 -0
  274. package/dist/internal/engine/shared/lru.d.ts +2 -0
  275. package/dist/internal/engine/shared/lru.js +30 -0
  276. package/dist/internal/engine/shared/memory-kind-policy.d.ts +2 -0
  277. package/dist/internal/engine/shared/memory-kind-policy.js +64 -0
  278. package/dist/internal/engine/shared/paths.d.ts +3 -0
  279. package/dist/internal/engine/shared/paths.js +2 -0
  280. package/dist/internal/engine/shared/types.d.ts +3 -0
  281. package/dist/internal/engine/shared/types.js +25 -0
  282. package/dist/internal/engine/shared/utils.d.ts +2 -0
  283. package/dist/internal/engine/shared/utils.js +175 -0
  284. package/dist/internal/engine/telemetry/memory-telemetry-api.d.ts +134 -0
  285. package/dist/internal/engine/telemetry/memory-telemetry-api.js +730 -0
  286. package/dist/internal/engine/telemetry/memory-telemetry-observability.d.ts +24 -0
  287. package/dist/internal/engine/telemetry/memory-telemetry-observability.js +133 -0
  288. package/dist/internal/engine/telemetry/memory-telemetry-outbox.d.ts +2 -0
  289. package/dist/internal/engine/telemetry/memory-telemetry-outbox.js +443 -0
  290. package/dist/internal/engine/telemetry/memory-telemetry-types.d.ts +2 -0
  291. package/dist/internal/engine/telemetry/memory-telemetry-types.js +21 -0
  292. package/dist/internal/engine/telemetry/observe-ledger.d.ts +30 -0
  293. package/dist/internal/engine/telemetry/observe-ledger.js +111 -0
  294. package/dist/internal/model/agent-llm-port.d.ts +2 -0
  295. package/dist/internal/model/agent-llm-port.js +1 -0
  296. package/dist/internal/model/llm-client.d.ts +3 -0
  297. package/dist/internal/model/llm-client.js +3 -0
  298. package/dist/internal/model/llm-failure.d.ts +26 -0
  299. package/dist/internal/model/llm-failure.js +63 -0
  300. package/dist/internal/model/llm-mode-routing.d.ts +22 -0
  301. package/dist/internal/model/llm-mode-routing.js +37 -0
  302. package/dist/internal/store/atomic-memory-cutover-sql.d.ts +13 -0
  303. package/dist/internal/store/atomic-memory-cutover-sql.js +237 -0
  304. package/dist/internal/store/connection.d.ts +2 -0
  305. package/dist/internal/store/connection.js +2 -0
  306. package/dist/internal/store/data-bootstrap.d.ts +2 -0
  307. package/dist/internal/store/data-bootstrap.js +2 -0
  308. package/dist/internal/store/data-paths.d.ts +2 -0
  309. package/dist/internal/store/data-paths.js +65 -0
  310. package/dist/internal/store/maintenance.d.ts +75 -0
  311. package/dist/internal/store/maintenance.js +1401 -0
  312. package/dist/internal/store/memory-kinds-cutover-migrator.d.ts +28 -0
  313. package/dist/internal/store/memory-kinds-cutover-migrator.js +415 -0
  314. package/dist/internal/store/migrations.d.ts +27 -0
  315. package/dist/internal/store/migrations.js +201 -0
  316. package/dist/internal/store/sqlite-runtime.d.ts +2 -0
  317. package/dist/internal/store/sqlite-runtime.js +109 -0
  318. package/dist/internal/store/store.d.ts +3 -0
  319. package/dist/internal/store/store.js +2 -0
  320. package/dist/learning-file-maintenance-9b-Ut6Kv.d.ts +30 -0
  321. package/dist/llm-client-B7Xoxqou.js +1378 -0
  322. package/dist/llm-client-DOTSGzhe.d.ts +51 -0
  323. package/dist/locales-JxGmkG6t.d.ts +7 -0
  324. package/dist/log-site-catalog.generated-B9WYdnAM.js +2321 -0
  325. package/dist/log-site-catalog.json +1 -0
  326. package/dist/lru-DyoaTyIs.d.ts +14 -0
  327. package/dist/memdump.d.ts +52 -0
  328. package/dist/memdump.js +163 -0
  329. package/dist/memory-entry-projector-DHo8jH10.js +1015 -0
  330. package/dist/memory-kind-policy-LKt0u3gy.d.ts +23 -0
  331. package/dist/memory-metadata-codec-C3oQd47V.d.ts +68 -0
  332. package/dist/memory-metadata-codec-DL1sbJiN.js +577 -0
  333. package/dist/memory-runtime-BZtREuwW.js +19459 -0
  334. package/dist/memory-scope-policy-1gg5QlWZ.d.ts +67 -0
  335. package/dist/memory-scope-policy-DICSCURA.js +283 -0
  336. package/dist/memory-snapshot-3e44ND2i.d.ts +16 -0
  337. package/dist/memory-source-order-BtrIxaIt.js +134 -0
  338. package/dist/memory-store-base-XRA4S9Xl.d.ts +1095 -0
  339. package/dist/memory-store-shared-DeIDkhLj.js +158 -0
  340. package/dist/memory-store-write-validation-B_hDG2zf.js +243 -0
  341. package/dist/memory-telemetry-incidents-BWA9kcZx.js +8 -0
  342. package/dist/memory-telemetry-metadata-CA7W8tK6.js +77 -0
  343. package/dist/memory-telemetry-outbox-ddTdImt7.d.ts +74 -0
  344. package/dist/memory-telemetry-receipts-MAJecvXQ.d.ts +34 -0
  345. package/dist/memory-telemetry-receipts-YsxbwOAf.js +91 -0
  346. package/dist/memory-telemetry-types-CufVmrCs.d.ts +14 -0
  347. package/dist/memory-temporality-classifier-CEdRTN5J.d.ts +43 -0
  348. package/dist/memory-temporality-classifier-CKiTAHXe.js +184 -0
  349. package/dist/memory-tier-promoter-DbTpahkP.d.ts +43 -0
  350. package/dist/memory-tool-dependencies-CLODycUw.js +19 -0
  351. package/dist/memory-tool-dependencies-N69chrQc.d.ts +14 -0
  352. package/dist/model-call-table-CspopkBg.js +563 -0
  353. package/dist/model-reply-text-CKopStP2.js +334 -0
  354. package/dist/observable-embedder-DQnNgf9O.d.ts +17 -0
  355. package/dist/observable-llm-client-uwqPADpN.d.ts +21 -0
  356. package/dist/observable-memory-store-BaZKbhgq.d.ts +73 -0
  357. package/dist/observable-retriever-Dt_NUxAA.d.ts +23 -0
  358. package/dist/operation-cancellation-CTKWwNHk.js +81 -0
  359. package/dist/paths-qVF-5uBq.d.ts +1 -0
  360. package/dist/plugin-config-schema-C0UUbOmG.d.ts +413 -0
  361. package/dist/plugin-config-schema-YJLyIIcJ.js +361 -0
  362. package/dist/profile-TWPJ_myr.d.ts +13 -0
  363. package/dist/profile-section-writer-hIphqpUY.js +2149 -0
  364. package/dist/provider-registration-CF1tg8Xy.js +721 -0
  365. package/dist/provider-runtime-types-DFhtdA6d.d.ts +134 -0
  366. package/dist/provider-types-CZGm6v88.d.ts +23 -0
  367. package/dist/redact-BTIZcHQL.d.ts +5 -0
  368. package/dist/reflection-command-hooks-BeQiJI9-.js +644 -0
  369. package/dist/reflection-command-hooks-C1Vxgb-O.d.ts +32 -0
  370. package/dist/reflection-deps-RpLPFrSc.d.ts +19 -0
  371. package/dist/reflection-embedded-generator-CDUhgV96.js +130 -0
  372. package/dist/reflection-embedded-generator-CxOex5xK.d.ts +14 -0
  373. package/dist/reflection-injection-hooks-DfUgqu8f.d.ts +43 -0
  374. package/dist/reflection-lifecycle-hooks-Ct5HBdSG.d.ts +27 -0
  375. package/dist/relation-dictionary-Cev1kyLe.js +4248 -0
  376. package/dist/release-download.d.ts +8 -0
  377. package/dist/release-download.js +32 -0
  378. package/dist/relevant-memories-context-m8nuFZcM.js +23 -0
  379. package/dist/rem-batch-executor-Cbm5gfSe.js +31644 -0
  380. package/dist/rem-batch-executor-bc0IFlp2.js +2 -0
  381. package/dist/rem-consumer-retrieval-CRpvG8KS.js +246 -0
  382. package/dist/rem-trigger-BTxkcjgT.js +729 -0
  383. package/dist/resolver-Dy-hnjCR.js +103 -0
  384. package/dist/results-C3ZLroMb.js +140 -0
  385. package/dist/retrieval-gate-Bx2Zg7jD.d.ts +31 -0
  386. package/dist/retriever-CygHBazG.js +1757 -0
  387. package/dist/retriever-Ruk3zp7_.d.ts +469 -0
  388. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  389. package/dist/routes-Ce7SQKec.js +59 -0
  390. package/dist/runtime-audit-log-BCeujlEp.js +430 -0
  391. package/dist/runtime-audit-log-zpQiR9HT.d.ts +149 -0
  392. package/dist/scopes-CSOn6zdd.js +71 -0
  393. package/dist/scopes-CtrY-YQ3.d.ts +23 -0
  394. package/dist/server-BPAY4NTG.js +1410 -0
  395. package/dist/session-registry-DBoE7AvZ.d.ts +14 -0
  396. package/dist/sidecar/main.d.ts +1 -0
  397. package/dist/sidecar/main.js +56 -0
  398. package/dist/signed-registry-constants-Bv0fgZ8Q.d.ts +12 -0
  399. package/dist/signed-registry-constants-yq3DlG3B.js +82 -0
  400. package/dist/sno-station-mem-runtime-dependencies-Bu-MiqPX.d.ts +31 -0
  401. package/dist/sno-station-mem-runtime-dependencies-DjLOhB45.js +30 -0
  402. package/dist/sqlite-runtime-L_ywirTm.d.ts +58 -0
  403. package/dist/store-2pM0-dZg.d.ts +27 -0
  404. package/dist/store-DzpZBMEm.js +5830 -0
  405. package/dist/strategy-hook-runner-gBtU47tX.d.ts +16 -0
  406. package/dist/strategy-hook-runner-zmdIYOmQ.js +110 -0
  407. package/dist/token-counter-BD1f48Km.js +73 -0
  408. package/dist/trace-1t1n_wUm.d.ts +86 -0
  409. package/dist/types-DxKqU60b.d.ts +477 -0
  410. package/dist/types-pVomjzqR.d.ts +132 -0
  411. package/dist/unplaced-candidate-migration-CbQHzcEM.js +940 -0
  412. package/dist/utils-Ctb9aevJ.d.ts +34 -0
  413. package/drizzle/0000_initial.sql +10 -0
  414. package/drizzle/0001_virtual_tables.sql +34 -0
  415. package/drizzle/0002_add_indexes.sql +11 -0
  416. package/drizzle/0003_content_hash_lookup_index.sql +2 -0
  417. package/drizzle/0004_chunk_swap.sql +60 -0
  418. package/drizzle/0005_drop_legacy_vec_fts.sql +10 -0
  419. package/drizzle/0006_fts_simple.sql +45 -0
  420. package/drizzle/0007_restore_simple_fts.sql +40 -0
  421. package/drizzle/0008_widen_memory_hash_unique_index.sql +4 -0
  422. package/drizzle/0009_memory_telemetry.sql +109 -0
  423. package/drizzle/0010_provider_mappings.sql +27 -0
  424. package/drizzle/0011_db_optimization.sql +82 -0
  425. package/drizzle/0012_b_profile_lanes.sql +9 -0
  426. package/drizzle/0013_extraction_timestamps.sql +6 -0
  427. package/drizzle/0014_extraction_timestamp_source.sql +3 -0
  428. package/drizzle/0015_task_lifecycle_state.sql +101 -0
  429. package/drizzle/0016_task_lifecycle_legacy_migration.sql +144 -0
  430. package/drizzle/0017_unplaced_candidates.sql +15 -0
  431. package/drizzle/0018_rem_batch_chassis.sql +71 -0
  432. package/drizzle/0019_profile_recovery_entries.sql +17 -0
  433. package/drizzle/0020_rem_scan_retry_progress.down.sql +14 -0
  434. package/drizzle/0020_rem_scan_retry_progress.sql +24 -0
  435. package/drizzle/0021_rem_two_facet_storage.down.sql +14 -0
  436. package/drizzle/0021_rem_two_facet_storage.sql +42 -0
  437. package/drizzle/0022_rem_facet_chunk_versions.down.sql +4 -0
  438. package/drizzle/0022_rem_facet_chunk_versions.sql +4 -0
  439. package/drizzle/0023_rem_defect_ledger.sql +40 -0
  440. package/drizzle/0024_rem_unbuilt_foundations.down.sql +13 -0
  441. package/drizzle/0024_rem_unbuilt_foundations.sql +65 -0
  442. package/drizzle/0025_rem_journal_operation_constraint.sql +28 -0
  443. package/drizzle/0026_rem_journal_detail.sql +1 -0
  444. package/drizzle/0027_legacy_nodix_namespace.sql +3 -0
  445. package/drizzle/0028_memory_timezone.sql +23 -0
  446. package/drizzle/0029_rem_write_hash_symmetry.sql +17 -0
  447. package/drizzle/0030_atomic_memory_additive.sql +105 -0
  448. package/drizzle/0031_atomic_extraction_ledger.sql +23 -0
  449. package/drizzle/0032_atomic_memory_entities.sql +12 -0
  450. package/drizzle/0033_todo_own_store.sql +99 -0
  451. package/drizzle/meta/0000_snapshot.json +87 -0
  452. package/drizzle/meta/_journal.json +244 -0
  453. package/generated/rem-operations.json +1 -0
  454. package/package.json +126 -4
  455. package/scripts/download-simple-tokenizer.mjs +254 -0
  456. package/settings.default.json +243 -0
  457. package/skills/extract-atomic-memory/SKILL.md +298 -0
  458. package/skills/extract-atomic-memory/references/account-for-turns.md +9 -0
  459. package/skills/extract-atomic-memory/references/calendar-meaning.md +64 -0
  460. package/skills/extract-atomic-memory/references/capture.md +120 -0
  461. package/skills/extract-atomic-memory/references/enrichment.md +92 -0
  462. package/skills/extract-atomic-memory/references/missing-durable-half.md +6 -0
  463. package/skills/extract-atomic-memory/references/progress-classification.md +21 -0
  464. package/skills/extract-atomic-memory/references/resolve-subject.md +19 -0
  465. package/skills/extract-atomic-memory/references/surrounding-context.md +10 -0
  466. package/skills/extract-atomic-memory/references/user-subject-guard.md +29 -0
  467. package/skills/judge-group-closure/SKILL.md +25 -0
  468. package/skills/judge-rem-memory-updates/SKILL.md +56 -0
  469. package/skills/judge-rem-memory-updates/agents/openai.yaml +4 -0
  470. package/skills/judge-retired-position/SKILL.md +25 -0
  471. package/skills/judge-task-lifecycle/SKILL.md +45 -0
  472. package/skills/key-state-attribute/SKILL.md +16 -0
  473. package/skills/resolve-entity-identity/SKILL.md +24 -0
  474. package/skills/resolve-relative-time/SKILL.md +22 -0
  475. package/sqlite-extensions/LICENSE-simple-tokenizer +28 -0
  476. package/sqlite-extensions/LICENSE-sqlite-vec +21 -0
  477. package/sqlite-extensions/linux-arm64/vec0.so +0 -0
  478. package/sqlite-extensions/linux-x64/vec0.so +0 -0
@@ -0,0 +1,19 @@
1
+ ## Resolve an unresolved subject
2
+
3
+ You are shown claims whose subject was `unresolved`, and a list of candidates, each with its
4
+ `display_name`. For each claim, pick the candidate whose display name is the thing the claim
5
+ states a field of.
6
+
7
+ A claim that says "the budget", "the proposal's deadline" or "a key point of the email" is a
8
+ field of the document the conversation is editing — pick that document. A claim left unresolved
9
+ is stored where no later revision can ever replace it, and the old and the new value are then
10
+ both reported as current.
11
+
12
+ A claim that adds, removes or changes a field of "the email", "the document", "the meeting" or
13
+ "the proposal" is a field of the document the conversation is editing, and a candidate whose
14
+ display name is that document's purpose or title sentence is the document even though the claim
15
+ never repeats the name. Only when the turns show a second document of the same kind being
16
+ started, and the claim belongs to it, is a candidate named earlier not the one: answer null then.
17
+
18
+ Answer null only when no candidate is the thing: two candidates could equally be it, or the claim
19
+ is about something none of them names. Answer with the candidate's id, never with a new name.
@@ -0,0 +1,10 @@
1
+ ## Surrounding context
2
+
3
+ `preceding_context` and `following_context` contain earlier and later conversation turns,
4
+ for understanding only. Resolve a short answer against its question and resolve references
5
+ against what those turns actually say. Do not guess a new activity or object when the
6
+ surrounding conversation names it.
7
+
8
+ Extract and classify only the numbered `transcript`, not the surrounding context. A claim
9
+ may use a name or relationship supplied by the context, but its source quote and turn index
10
+ must come from the numbered transcript. Do not copy context-only claims into new records.
@@ -0,0 +1,29 @@
1
+ ## User-subject guard
2
+
3
+ You are shown a numbered batch of profile records. Decide each one separately: does the quoted
4
+ user text support the claim as a fact about the user?
5
+
6
+ Judge the meaning; the quote and the claim may be in different languages. A change the user
7
+ reports about themselves ("I switched my editor to Emacs", "我把主力编辑器换成了 Emacs", "I moved
8
+ to Austin") supports the state it leaves behind. An intention is a fact about the user too: what
9
+ they say they need to do, plan to do, want, or look forward to supports a claim about that
10
+ intention — "I also need to visit the university library sometime soon" supports "the user needs
11
+ to visit the university library". Do not answer no because the thing has not happened yet. A
12
+ liking, a taste, an opinion the user states as their own is a fact about the user whether or not
13
+ a key was found for it; the presence or absence of an attribute is not evidence either way.
14
+
15
+ Answer no when the quoted text is about another person, is the assistant's words, or does not
16
+ mention the claim — "I switched to Emacs" does not say the user likes Emacs, and one question
17
+ about a topic does not say the user is interested in it. A quote that cannot be read on its own
18
+ ("I really liked it") supports nothing. The subject proposal, the claim text and the attribute are
19
+ not evidence by themselves; only the quote is.
20
+
21
+ An explicit first-person preference ("My favorite drink is tea") directly supports the same
22
+ preference stated about the user. No additional biography or evidence of repeated behavior is
23
+ needed. This does not support a different preference that the quote never states.
24
+
25
+ For this task, return only the `decisions` object in the supplied response schema, not the
26
+ extraction `claims_found`/`records` envelope. Return one boolean decision for every supplied
27
+ `record_index`, copying each index exactly once. Do not omit an index or return null: use true
28
+ when the quote supports the claim and false when it does not. Check that every supplied index
29
+ has one decision before returning.
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: judge-group-closure
3
+ description: Judge which offered rows one nominated statement retires or replaces.
4
+ ---
5
+
6
+ # Judge Group Closure
7
+
8
+ ## Group Closure
9
+
10
+ - A nominated row is a retirement statement when it says that a fact in one candidate row is no
11
+ longer current, including when it describes that fact as a past preference.
12
+ - Past tense or a shared topic is not enough. Choose a target only when the nominated row makes
13
+ the candidate row's present claim no longer true.
14
+ - Return null when both rows can be true at the same time, including when they describe different
15
+ strengths of interest or different aspects of one topic.
16
+ - Treat strength as part of the fact. A past strong preference does not retire a present weaker
17
+ interest in the same topic. It retires only a candidate that claims the same strong preference
18
+ is current.
19
+ - Example: "used to be interested in X" retires "enjoys X" because it says the base interest is
20
+ no longer current.
21
+ - Counterexample: "used to really like X" does not retire "is currently drawn to X" because a
22
+ former strong preference and a present weaker interest can both be true. Return null.
23
+ - Choose every candidate row whose current meaning the nominated row retires.
24
+ - Return those candidate row ids. Return an empty set when the nominated row retires no offered candidate.
25
+ - Choose only by meaning. Shared words, text order, and age do not identify the target row.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: judge-rem-memory-updates
3
+ description: Judge REM memory relations, rewrites, verification, and clause carry by meaning. Use for REM update model calls that decide which older facts are superseded, which facts remain current, and whether a proposed rewrite preserves all surviving facts.
4
+ ---
5
+
6
+ # Judge REM Memory Updates
7
+
8
+ Judge meaning. Do not decide from shared words, punctuation, or text position.
9
+
10
+ ## Relation Judgment
11
+
12
+ - Mark `supersedes` true only when the newer record replaces meaning in the older record.
13
+ - Mark `retires_anything` true only when at least one meaning in the older record stops being current.
14
+ - Mark `supersedes_everything` true only when every current meaning in the older record is replaced.
15
+
16
+ ## Source Rewrite
17
+
18
+ - Put only the facts that remain current in `proposed_current`.
19
+ - Quote each superseded value from the source row in `retired_values`.
20
+ - Drop the wording that exists only to describe the change itself — what the value was
21
+ before, when it changed, and who changed it. That wording retires with the value it
22
+ describes. "currently $1,100,000, updated from $900,000 on 2025-06-06" rewrites to
23
+ "currently $1,100,000", and `retired_values` carries "$900,000".
24
+ - This holds in every language and for every kind of value, not only amounts. Any phrasing of
25
+ the shape "changed from A to B", "shifted from A to B", "switched from A to B", "moved from A
26
+ to B", "A is now B", "no longer A but B" leaves ONLY B in `proposed_current` and puts A in
27
+ `retired_values`. The old value must not appear anywhere in the rewrite, not even inside the
28
+ phrase that describes the change — copying "shifted from A to B" into `proposed_current`
29
+ keeps the retired value alive and is wrong. Rewrite it as B alone.
30
+ English: "shifted from morning tea to coffee" rewrites to "coffee", retiring "morning tea".
31
+ Spanish: "cambió de té matutino a café" rewrites to "café", retiring "té matutino".
32
+ - A line that says an item is no longer needed, no longer tracked, done with, or that asks
33
+ for it to be removed from the list, IS a retirement instruction. Drop that whole line from
34
+ `proposed_current`, and drop the item it names as well. Quote the named item in
35
+ `retired_values`. Leaving either one in place is wrong: the instruction line is wording
36
+ about a change, and the item it names is the value that change retires.
37
+ - Return no retired values when nothing was superseded.
38
+ - Return an empty proposed value when nothing remains current.
39
+
40
+ ## Rewrite Verification
41
+
42
+ - Mark `faithful` true only when source evidence supports every claim in the rewrite.
43
+ - When a newer record is provided, retire only meanings that the newer record replaces.
44
+ - Reject any unsupported fact, entity, quantity, or claim.
45
+ - Mark `retired_absent` true only when no retired meaning remains current in the rewrite.
46
+ - Mark `all_facts_accounted` true only when every source fact remains current or appears in the retired values.
47
+ - Wording that exists only to describe the change — the prior value, the date it changed,
48
+ who changed it — is part of the retirement, not a surviving fact. Its absence from the
49
+ rewrite never makes `all_facts_accounted` false.
50
+ - Accept paraphrases that keep the same meaning.
51
+
52
+ ## Clause Carry
53
+
54
+ - Mark a clause already current only when the survivor asserts the same meaning as current.
55
+ - A negation, quotation, or past description is not a current assertion.
56
+ - Different words with the same meaning count as current.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Judge REM memory updates"
3
+ short_description: "Judge which memory facts stay current"
4
+ default_prompt: "Judge the supplied REM memory update by meaning and return the requested JSON contract."
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: judge-retired-position
3
+ description: Judge whether one stored row states a retired profile position as current.
4
+ ---
5
+
6
+ # Judge Retired Position
7
+
8
+ ## Current Position Match
9
+
10
+ - Answer yes only when the candidate row states, as current, the same position that the profile lifecycle retired.
11
+ - A simple present statement such as "The user likes X" states a current position. It does not need the word "now".
12
+ - When the candidate repeats that position with the same meaning, answer yes.
13
+ - A dated occurrence is history. Answer no even when it mentions the same subject or words.
14
+ - A plan, quotation, comparison, question, or third-party statement is not the user's current position.
15
+ - Surface similarity is not enough. Judge the meaning of the whole row.
16
+ - When the evidence does not settle the meaning, answer no.
17
+
18
+ ## Retirement Recheck
19
+
20
+ - Judge one retirement inside a current-state profile section.
21
+ - A stored clause was retired when the incoming assertion arrived. Decide whether that retirement is right.
22
+ - Answer retire=true only when the incoming assertion states a newer value of the same fact, removes it, makes it historical, or restates this same fact in other words so that keeping both would say one thing twice.
23
+ - For section preferences.general only: retire=true is also right when a listed live sibling section already states this same fact in its content.
24
+ - A clause about a different subject stays. A clause the incoming assertion does not mention stays, even when it is the same broad topic.
25
+ - When the evidence does not settle it, answer retire=false.
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: judge-task-lifecycle
3
+ description: Judge how a memory changes active-task state and whether it refers to an existing task. Use for mem-claw task-lifecycle model calls.
4
+ ---
5
+
6
+ # Judge Task Lifecycle
7
+
8
+ Judge task meaning. Do not decide from exact wording alone.
9
+
10
+ ## Active Task State
11
+
12
+ Apply the `To-do Boundary` section supplied from `extract-atomic-memory` before these state rules.
13
+
14
+ Decide in this order and stop at the first step that applies.
15
+
16
+ 1. **Does the candidate report OR INSTRUCT that an existing active task is done, finished,
17
+ handled, cancelled, or dropped?** If yes, the answer is `complete` or `remove` on THAT task.
18
+ Never `open_or_refine`, and never `none`.
19
+ A report ("I finished X", "X is done") and an instruction ("mark X complete", "tick X off",
20
+ "close X", "remove X from my list") both land here. An instruction to change a task's state
21
+ IS the state change; do not treat it as a request you decline to act on.
22
+ A candidate that speaks about an active task's ending is never a new task, however it is worded,
23
+ and restating the task's name inside such a sentence is naming the task to close, not opening one.
24
+ 2. Otherwise, if the candidate describes work still to be done, use `open_or_refine`.
25
+ 3. Otherwise use `none`.
26
+
27
+ - Use `open_or_refine` only for a current task that remains active.
28
+ - Use `complete` only when the candidate says an active task was achieved.
29
+ - Use `remove` only when the candidate says an active task was cancelled or should no longer be tracked.
30
+ - An explicit instruction to mark a task complete, done, or finished is `complete`, even when it is
31
+ phrased as an edit to a list — "mark X complete on my todo list" and "tick X off" are `complete`,
32
+ not `remove`. Taking a finished task off a list is what completing it looks like; the words that
33
+ decide are whether the work was done. Reserve `remove` for a task abandoned, cancelled, called off,
34
+ no longer needed, or added by mistake — cases where the work will NOT happen.
35
+ - Use `none` when the candidate does not change active-task state.
36
+ - A candidate that reports a task as finished, cancelled, or already handled never opens one.
37
+ - If that task is active, complete or remove it. If it is not active, make no task change.
38
+ - Match tasks by meaning, not exact wording. Refine an existing task instead of opening a duplicate.
39
+
40
+ ## Existing Task Relation
41
+
42
+ - Use `same_instance` when the assertion refers to one listed active task, including different wording with the same meaning.
43
+ - Use `distinct_instance` when the assertion is a different active task.
44
+ - Use `none` when the assertion does not describe an active-task relation.
45
+ - Use `uncertain` when the evidence does not settle the relation.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: key-state-attribute
3
+ description: Choose one offered state attribute for a stored statement about a named thing.
4
+ ---
5
+
6
+ # Key State Attribute
7
+
8
+ ## State Attribute
9
+
10
+ - Read the complete statement before you choose.
11
+ - Choose the offered slug whose meaning best describes the fact in the statement.
12
+ - Choose only one slug from the offered list.
13
+ - Return `null` when no offered slug describes the fact.
14
+ - Return `null` when you are not certain.
15
+ - Do not choose from shared words alone.
16
+ - Return only the slug or `null`. Do not add prose.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: resolve-entity-identity
3
+ description: Resolve a new entity display name to an existing entity id or to a new entity.
4
+ ---
5
+
6
+ # Resolve Entity Identity
7
+
8
+ ## Entity Identity
9
+
10
+ - You are shown one new display name and the project's existing entity display names.
11
+ - Answer with an existing entity id only when the new display name identifies that same entity.
12
+ - The same entity is very often written more than one way. A shortening ("ACME Rebrand" for
13
+ "Acme Corp Rebrand"), a change of case or spacing, an added or dropped type word ("… project",
14
+ "… proposal", "… email"), an added or dropped honorific, or the name wrapped in quotes all
15
+ name the SAME entity. Answer that entity's id.
16
+ - Otherwise answer `new`.
17
+ - Answer `new` when you are in doubt whether two different things are meant — two people who
18
+ share a surname, two documents with similar titles. A different spelling of one name is not
19
+ doubt.
20
+ - A wrong merge silently fuses the facts of two people or two documents.
21
+ - A wrong split leaves two current values for a thing that can only have one — two budgets for
22
+ one project — and both are served as true.
23
+ - Return exactly one JSON object and no prose: `{ "entity_id": "new" }`.
24
+ - Set `entity_id` to `new` or to one entity id shown with the existing display names.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: resolve-relative-time
3
+ description: Understand temporal meaning in context without performing calendar arithmetic.
4
+ ---
5
+
6
+ # Understand Relative Time
7
+
8
+ Read the complete context to determine which event a time expression describes and whether
9
+ it is past, future, ongoing, quoted, or uncertain. Preserve the source words and its precision.
10
+ Never calculate a replacement date. The shared date resolver asks for a structured calendar
11
+ instruction and code performs that instruction. Keywords alone cannot settle temporal meaning.
12
+
13
+ ## With Session Anchor
14
+
15
+ Use the session as a reference only when the speaker refers to it. Distinguish a duration from
16
+ an event date and a current report from an event happening now. The same words can describe
17
+ different times in different contexts. Preserve the fact when its date remains unknown.
18
+
19
+ ## Without Session Anchor
20
+
21
+ Keep relative expressions unresolved when their reference is absent. Preserve explicit date
22
+ components that the source states. Do not supply the current year or day from your own clock.
@@ -0,0 +1,28 @@
1
+ Vendored binaries in this directory are built from
2
+ https://github.com/wangfenjin/simple (release v0.7.1).
3
+
4
+ Upstream is dual-licensed MIT/GPLv3+ at the user's choice. We redistribute
5
+ under the MIT terms reproduced below.
6
+
7
+ ----------------------------------------------------------------------
8
+ Copyright (c) 2020, 2025 Wang Fenjin
9
+
10
+ MIT License
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Alex Garcia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.