@murphai/murph 1.2.0 → 1.2.3

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 (1902) hide show
  1. package/CHANGELOG.md +1298 -0
  2. package/config.schema.json +412 -50
  3. package/dist/cli-entry.d.ts.map +1 -1
  4. package/dist/cli-entry.js +13 -20
  5. package/dist/cli-entry.js.map +1 -1
  6. package/dist/commands/audit-command-helpers.js.map +1 -1
  7. package/dist/commands/audit.js +2 -2
  8. package/dist/commands/automation.d.ts +118 -7
  9. package/dist/commands/automation.d.ts.map +1 -1
  10. package/dist/commands/automation.js +140 -54
  11. package/dist/commands/automation.js.map +1 -1
  12. package/dist/commands/batch.d.ts.map +1 -1
  13. package/dist/commands/batch.js +12 -4
  14. package/dist/commands/batch.js.map +1 -1
  15. package/dist/commands/capture.d.ts +9 -9
  16. package/dist/commands/capture.d.ts.map +1 -1
  17. package/dist/commands/clinical-imports.d.ts +101 -101
  18. package/dist/commands/command-factory-primitives.d.ts +3 -3
  19. package/dist/commands/command-factory-primitives.d.ts.map +1 -1
  20. package/dist/commands/command-factory-primitives.js +1 -1
  21. package/dist/commands/commons.d.ts +9 -9
  22. package/dist/commands/document.d.ts.map +1 -1
  23. package/dist/commands/document.js +3 -0
  24. package/dist/commands/document.js.map +1 -1
  25. package/dist/commands/encounter.d.ts +42 -42
  26. package/dist/commands/encounter.d.ts.map +1 -1
  27. package/dist/commands/event.js +1 -1
  28. package/dist/commands/exercise.js.map +1 -1
  29. package/dist/commands/experiment.d.ts.map +1 -1
  30. package/dist/commands/experiment.js +1 -0
  31. package/dist/commands/experiment.js.map +1 -1
  32. package/dist/commands/export-intake-read-helpers.d.ts +4 -4
  33. package/dist/commands/export-intake-read-helpers.d.ts.map +1 -1
  34. package/dist/commands/export-intake-read-helpers.js +1 -1
  35. package/dist/commands/export-intake-read-helpers.js.map +1 -1
  36. package/dist/commands/export.js +1 -1
  37. package/dist/commands/food.d.ts +4 -4
  38. package/dist/commands/food.js +1 -1
  39. package/dist/commands/group.d.ts +81 -0
  40. package/dist/commands/group.d.ts.map +1 -0
  41. package/dist/commands/group.js +242 -0
  42. package/dist/commands/group.js.map +1 -0
  43. package/dist/commands/habitat.d.ts +3 -0
  44. package/dist/commands/habitat.d.ts.map +1 -0
  45. package/dist/commands/habitat.js +282 -0
  46. package/dist/commands/habitat.js.map +1 -0
  47. package/dist/commands/health-allergy-save.d.ts.map +1 -1
  48. package/dist/commands/health-allergy-save.js +1 -1
  49. package/dist/commands/health-allergy-save.js.map +1 -1
  50. package/dist/commands/health-condition-save.d.ts.map +1 -1
  51. package/dist/commands/health-condition-save.js +1 -1
  52. package/dist/commands/health-condition-save.js.map +1 -1
  53. package/dist/commands/health-goal-save.d.ts.map +1 -1
  54. package/dist/commands/health-goal-save.js +1 -1
  55. package/dist/commands/health-goal-save.js.map +1 -1
  56. package/dist/commands/intake.js +1 -1
  57. package/dist/commands/intervention.d.ts.map +1 -1
  58. package/dist/commands/intervention.js +10 -0
  59. package/dist/commands/intervention.js.map +1 -1
  60. package/dist/commands/knowledge.js +2 -2
  61. package/dist/commands/measurement.d.ts +7 -7
  62. package/dist/commands/measurement.d.ts.map +1 -1
  63. package/dist/commands/medication.d.ts +3 -3
  64. package/dist/commands/memory.d.ts.map +1 -1
  65. package/dist/commands/memory.js +26 -2
  66. package/dist/commands/memory.js.map +1 -1
  67. package/dist/commands/model.js.map +1 -1
  68. package/dist/commands/murph-age.d.ts +499 -498
  69. package/dist/commands/murph-age.d.ts.map +1 -1
  70. package/dist/commands/murph-age.js +3 -2
  71. package/dist/commands/murph-age.js.map +1 -1
  72. package/dist/commands/payload-schema-command.d.ts +1 -1
  73. package/dist/commands/protocol.js +2 -2
  74. package/dist/commands/provider.js +1 -1
  75. package/dist/commands/recipe.js +1 -1
  76. package/dist/commands/record-mutation-command-helpers.d.ts +3 -3
  77. package/dist/commands/record-mutation-command-helpers.d.ts.map +1 -1
  78. package/dist/commands/research.js.map +1 -1
  79. package/dist/commands/sample-batch-command-helpers.js.map +1 -1
  80. package/dist/commands/sample-import-command-helpers.d.ts.map +1 -1
  81. package/dist/commands/sample-query-command-helpers.d.ts +1 -1
  82. package/dist/commands/sample-query-command-helpers.d.ts.map +1 -1
  83. package/dist/commands/sample-query-command-helpers.js.map +1 -1
  84. package/dist/commands/samples.js +2 -2
  85. package/dist/commands/scheduled-log.d.ts +127 -275
  86. package/dist/commands/scheduled-log.d.ts.map +1 -1
  87. package/dist/commands/scheduled-log.js +28 -3
  88. package/dist/commands/scheduled-log.js.map +1 -1
  89. package/dist/commands/search.js +1 -1
  90. package/dist/commands/supplement.js +1 -1
  91. package/dist/commands/vault.d.ts +2 -1
  92. package/dist/commands/vault.d.ts.map +1 -1
  93. package/dist/commands/vault.js +111 -1
  94. package/dist/commands/vault.js.map +1 -1
  95. package/dist/commands/wearables.d.ts +695 -667
  96. package/dist/commands/wearables.d.ts.map +1 -1
  97. package/dist/commands/wearables.js +10 -3
  98. package/dist/commands/wearables.js.map +1 -1
  99. package/dist/commands/workout.d.ts.map +1 -1
  100. package/dist/commands/workout.js +9 -2
  101. package/dist/commands/workout.js.map +1 -1
  102. package/dist/device-services.d.ts.map +1 -1
  103. package/dist/device-services.js +33 -8
  104. package/dist/device-services.js.map +1 -1
  105. package/dist/food-labels.d.ts +39 -39
  106. package/dist/food-labels.js.map +1 -1
  107. package/dist/foreground-terminal-logging.js.map +1 -1
  108. package/dist/hosted-data-api-labels.d.ts +117 -117
  109. package/dist/hosted-data-api-labels.js.map +1 -1
  110. package/dist/incur.generated.d.ts +93 -0
  111. package/dist/incur.generated.d.ts.map +1 -1
  112. package/dist/index.d.ts.map +1 -1
  113. package/dist/mapbox-route-contracts.d.ts +13 -13
  114. package/dist/mapbox-route-contracts.d.ts.map +1 -1
  115. package/dist/mapbox-route.js.map +1 -1
  116. package/dist/research-scout-client.js.map +1 -1
  117. package/dist/supplement-labels.d.ts +39 -39
  118. package/dist/supplement-labels.js.map +1 -1
  119. package/dist/vault-cli-command-manifest.d.ts +1451 -1478
  120. package/dist/vault-cli-command-manifest.d.ts.map +1 -1
  121. package/dist/vault-cli-command-manifest.js +80 -2
  122. package/dist/vault-cli-command-manifest.js.map +1 -1
  123. package/dist/vault-cli-command-routing.d.ts.map +1 -1
  124. package/dist/vault-cli-command-routing.js +79 -2
  125. package/dist/vault-cli-command-routing.js.map +1 -1
  126. package/dist/vault-cli-package.d.ts +1 -1
  127. package/dist/vault-cli-package.d.ts.map +1 -1
  128. package/dist/vault-cli-package.js.map +1 -1
  129. package/dist/vault-cli-routing.d.ts +4 -1
  130. package/dist/vault-cli-routing.d.ts.map +1 -1
  131. package/dist/vault-cli-routing.js +45 -5
  132. package/dist/vault-cli-routing.js.map +1 -1
  133. package/dist/vault-cli-shell.d.ts +3 -1
  134. package/dist/vault-cli-shell.d.ts.map +1 -1
  135. package/dist/vault-cli-shell.js +4 -1
  136. package/dist/vault-cli-shell.js.map +1 -1
  137. package/dist/vault-cli-skill-hash.generated.d.ts +2 -0
  138. package/dist/vault-cli-skill-hash.generated.d.ts.map +1 -0
  139. package/dist/vault-cli-skill-hash.generated.js +3 -0
  140. package/dist/vault-cli-skill-hash.generated.js.map +1 -0
  141. package/dist/vault-cli-vault-context.js.map +1 -1
  142. package/dist/vault-cli.js.map +1 -1
  143. package/node_modules/@murphai/assistant-cli/dist/assistant/automation/run-loop.d.ts +1 -1
  144. package/node_modules/@murphai/assistant-cli/dist/assistant/doctor-security.js.map +1 -1
  145. package/node_modules/@murphai/assistant-cli/dist/assistant/doctor.js.map +1 -1
  146. package/node_modules/@murphai/assistant-cli/dist/assistant/service.d.ts +24 -22
  147. package/node_modules/@murphai/assistant-cli/dist/assistant/service.d.ts.map +1 -1
  148. package/node_modules/@murphai/assistant-cli/dist/assistant/stop.d.ts +1 -1
  149. package/node_modules/@murphai/assistant-cli/dist/assistant/store.d.ts +3 -1
  150. package/node_modules/@murphai/assistant-cli/dist/assistant/store.d.ts.map +1 -1
  151. package/node_modules/@murphai/assistant-cli/dist/assistant/store.js +5 -2
  152. package/node_modules/@murphai/assistant-cli/dist/assistant/store.js.map +1 -1
  153. package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-composer-panel.d.ts +4 -4
  154. package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-composer-panel.d.ts.map +1 -1
  155. package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-layout.d.ts +9 -9
  156. package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-layout.d.ts.map +1 -1
  157. package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-message-text.d.ts +4 -4
  158. package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-message-text.d.ts.map +1 -1
  159. package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-message-text.js.map +1 -1
  160. package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-transcript.d.ts +4 -4
  161. package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-transcript.d.ts.map +1 -1
  162. package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink.js.map +1 -1
  163. package/node_modules/@murphai/assistant-cli/dist/assistant/ui/theme.js.map +1 -1
  164. package/node_modules/@murphai/assistant-cli/dist/assistant/ui/view-model.d.ts +1 -1
  165. package/node_modules/@murphai/assistant-cli/dist/assistant/ui/view-model.d.ts.map +1 -1
  166. package/node_modules/@murphai/assistant-cli/dist/assistant-daemon-client.d.ts.map +1 -1
  167. package/node_modules/@murphai/assistant-cli/dist/assistant-daemon-client.js +2 -2
  168. package/node_modules/@murphai/assistant-cli/dist/assistant-daemon-client.js.map +1 -1
  169. package/node_modules/@murphai/assistant-cli/dist/commands/assistant.d.ts.map +1 -1
  170. package/node_modules/@murphai/assistant-cli/dist/commands/assistant.js +52 -7
  171. package/node_modules/@murphai/assistant-cli/dist/commands/assistant.js.map +1 -1
  172. package/node_modules/@murphai/assistant-cli/dist/run-terminal-logging.js.map +1 -1
  173. package/node_modules/@murphai/assistant-engine/README.md +55 -7
  174. package/node_modules/@murphai/assistant-engine/dist/assistant/active-experiment-context.d.ts.map +1 -1
  175. package/node_modules/@murphai/assistant-engine/dist/assistant/active-experiment-context.js +36 -24
  176. package/node_modules/@murphai/assistant-engine/dist/assistant/active-experiment-context.js.map +1 -1
  177. package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-controller.d.ts +10 -0
  178. package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-controller.d.ts.map +1 -1
  179. package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-controller.js +89 -7
  180. package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-controller.js.map +1 -1
  181. package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-journal.d.ts +36 -36
  182. package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-journal.d.ts.map +1 -1
  183. package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.d.ts +32 -0
  184. package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.d.ts.map +1 -0
  185. package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.js +347 -0
  186. package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.js.map +1 -0
  187. package/node_modules/@murphai/assistant-engine/dist/assistant/attachment-artifact-paths.d.ts +2 -2
  188. package/node_modules/@murphai/assistant-engine/dist/assistant/attachment-artifact-paths.d.ts.map +1 -1
  189. package/node_modules/@murphai/assistant-engine/dist/assistant/attachment-evidence-model.d.ts +5 -0
  190. package/node_modules/@murphai/assistant-engine/dist/assistant/attachment-evidence-model.d.ts.map +1 -1
  191. package/node_modules/@murphai/assistant-engine/dist/assistant/attachment-evidence-model.js +163 -42
  192. package/node_modules/@murphai/assistant-engine/dist/assistant/attachment-evidence-model.js.map +1 -1
  193. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/evidence.d.ts +3 -3
  194. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/evidence.d.ts.map +1 -1
  195. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/evidence.js +8 -7
  196. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/evidence.js.map +1 -1
  197. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/grouping.d.ts +2 -1
  198. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/grouping.d.ts.map +1 -1
  199. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/grouping.js +11 -0
  200. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/grouping.js.map +1 -1
  201. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/input-summary.d.ts +1 -0
  202. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/input-summary.d.ts.map +1 -1
  203. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/input-summary.js +2 -0
  204. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/input-summary.js.map +1 -1
  205. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/operation-scope.d.ts +11 -0
  206. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/operation-scope.d.ts.map +1 -0
  207. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/operation-scope.js +2 -0
  208. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/operation-scope.js.map +1 -0
  209. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/prompt-builder.d.ts +18 -0
  210. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/prompt-builder.d.ts.map +1 -1
  211. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/prompt-builder.js +66 -16
  212. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/prompt-builder.js.map +1 -1
  213. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/reply.d.ts +26 -8
  214. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/reply.d.ts.map +1 -1
  215. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/reply.js +644 -158
  216. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/reply.js.map +1 -1
  217. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/run-loop.d.ts +15 -1
  218. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/run-loop.d.ts.map +1 -1
  219. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/run-loop.js +90 -29
  220. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/run-loop.js.map +1 -1
  221. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/scanner.d.ts +6 -1
  222. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/scanner.d.ts.map +1 -1
  223. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/scanner.js +18 -6
  224. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/scanner.js.map +1 -1
  225. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/shared.d.ts +9 -1
  226. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/shared.d.ts.map +1 -1
  227. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/shared.js.map +1 -1
  228. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/target-override.d.ts +5 -0
  229. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/target-override.d.ts.map +1 -0
  230. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/target-override.js +30 -0
  231. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/target-override.js.map +1 -0
  232. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/turn-envelope.d.ts +4 -1
  233. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/turn-envelope.d.ts.map +1 -1
  234. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/turn-envelope.js +4 -0
  235. package/node_modules/@murphai/assistant-engine/dist/assistant/automation/turn-envelope.js.map +1 -1
  236. package/node_modules/@murphai/assistant-engine/dist/assistant/automation.d.ts +5 -3
  237. package/node_modules/@murphai/assistant-engine/dist/assistant/automation.d.ts.map +1 -1
  238. package/node_modules/@murphai/assistant-engine/dist/assistant/automation.js +3 -2
  239. package/node_modules/@murphai/assistant-engine/dist/assistant/automation.js.map +1 -1
  240. package/node_modules/@murphai/assistant-engine/dist/assistant/bindings.d.ts +2 -0
  241. package/node_modules/@murphai/assistant-engine/dist/assistant/bindings.d.ts.map +1 -1
  242. package/node_modules/@murphai/assistant-engine/dist/assistant/bindings.js +22 -1
  243. package/node_modules/@murphai/assistant-engine/dist/assistant/bindings.js.map +1 -1
  244. package/node_modules/@murphai/assistant-engine/dist/assistant/channel-adapters.d.ts +2 -2
  245. package/node_modules/@murphai/assistant-engine/dist/assistant/channel-adapters.d.ts.map +1 -1
  246. package/node_modules/@murphai/assistant-engine/dist/assistant/channel-adapters.js +1 -1
  247. package/node_modules/@murphai/assistant-engine/dist/assistant/channel-adapters.js.map +1 -1
  248. package/node_modules/@murphai/assistant-engine/dist/assistant/channel-typing.d.ts +4 -2
  249. package/node_modules/@murphai/assistant-engine/dist/assistant/channel-typing.d.ts.map +1 -1
  250. package/node_modules/@murphai/assistant-engine/dist/assistant/channel-typing.js +51 -18
  251. package/node_modules/@murphai/assistant-engine/dist/assistant/channel-typing.js.map +1 -1
  252. package/node_modules/@murphai/assistant-engine/dist/assistant/channels/descriptors.d.ts.map +1 -1
  253. package/node_modules/@murphai/assistant-engine/dist/assistant/channels/descriptors.js +87 -49
  254. package/node_modules/@murphai/assistant-engine/dist/assistant/channels/descriptors.js.map +1 -1
  255. package/node_modules/@murphai/assistant-engine/dist/assistant/channels/helpers.d.ts.map +1 -1
  256. package/node_modules/@murphai/assistant-engine/dist/assistant/channels/helpers.js +5 -0
  257. package/node_modules/@murphai/assistant-engine/dist/assistant/channels/helpers.js.map +1 -1
  258. package/node_modules/@murphai/assistant-engine/dist/assistant/channels/runtime.d.ts +2 -10
  259. package/node_modules/@murphai/assistant-engine/dist/assistant/channels/runtime.d.ts.map +1 -1
  260. package/node_modules/@murphai/assistant-engine/dist/assistant/channels/runtime.js +80 -61
  261. package/node_modules/@murphai/assistant-engine/dist/assistant/channels/runtime.js.map +1 -1
  262. package/node_modules/@murphai/assistant-engine/dist/assistant/channels/types.d.ts +31 -20
  263. package/node_modules/@murphai/assistant-engine/dist/assistant/channels/types.d.ts.map +1 -1
  264. package/node_modules/@murphai/assistant-engine/dist/assistant/channels/types.js.map +1 -1
  265. package/node_modules/@murphai/assistant-engine/dist/assistant/cli-surface-bootstrap.d.ts +5 -24
  266. package/node_modules/@murphai/assistant-engine/dist/assistant/cli-surface-bootstrap.d.ts.map +1 -1
  267. package/node_modules/@murphai/assistant-engine/dist/assistant/cli-surface-bootstrap.js +95 -228
  268. package/node_modules/@murphai/assistant-engine/dist/assistant/cli-surface-bootstrap.js.map +1 -1
  269. package/node_modules/@murphai/assistant-engine/dist/assistant/cli-surface-contract.generated.json +4 -0
  270. package/node_modules/@murphai/assistant-engine/dist/assistant/cli-surface-manifest.js.map +1 -1
  271. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-contract-fingerprint.js.map +1 -1
  272. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-resume-binding.d.ts +4 -0
  273. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-resume-binding.d.ts.map +1 -1
  274. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-resume-binding.js +24 -5
  275. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-resume-binding.js.map +1 -1
  276. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-thread-route.d.ts +2 -0
  277. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-thread-route.d.ts.map +1 -1
  278. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-thread-route.js +26 -0
  279. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-thread-route.js.map +1 -1
  280. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/attempt-observability.d.ts +0 -29
  281. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/attempt-observability.d.ts.map +1 -1
  282. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/attempt-observability.js +50 -129
  283. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/attempt-observability.js.map +1 -1
  284. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/planning.d.ts +22 -19
  285. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/planning.d.ts.map +1 -1
  286. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/planning.js +186 -109
  287. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/planning.js.map +1 -1
  288. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn-runner.d.ts +9 -8
  289. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn-runner.d.ts.map +1 -1
  290. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn-runner.js +42 -73
  291. package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn-runner.js.map +1 -1
  292. package/node_modules/@murphai/assistant-engine/dist/assistant/context-snapshot.d.ts +3 -2
  293. package/node_modules/@murphai/assistant-engine/dist/assistant/context-snapshot.d.ts.map +1 -1
  294. package/node_modules/@murphai/assistant-engine/dist/assistant/context-snapshot.js +83 -91
  295. package/node_modules/@murphai/assistant-engine/dist/assistant/context-snapshot.js.map +1 -1
  296. package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-policy.d.ts +4 -2
  297. package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-policy.d.ts.map +1 -1
  298. package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-policy.js +48 -11
  299. package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-policy.js.map +1 -1
  300. package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-ref.d.ts +1 -1
  301. package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-ref.d.ts.map +1 -1
  302. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/canonical-jobs.d.ts +3 -1
  303. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/canonical-jobs.d.ts.map +1 -1
  304. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/canonical-jobs.js +33 -2
  305. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/canonical-jobs.js.map +1 -1
  306. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/delivery-reconciliation.d.ts.map +1 -1
  307. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/delivery-reconciliation.js +38 -31
  308. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/delivery-reconciliation.js.map +1 -1
  309. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/execution.d.ts +47 -6
  310. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/execution.d.ts.map +1 -1
  311. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/execution.js +881 -117
  312. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/execution.js.map +1 -1
  313. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/schedule.d.ts.map +1 -1
  314. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/schedule.js +84 -19
  315. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/schedule.js.map +1 -1
  316. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/scheduled-log.d.ts +1 -0
  317. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/scheduled-log.d.ts.map +1 -1
  318. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/scheduled-log.js +1 -0
  319. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/scheduled-log.js.map +1 -1
  320. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/store.d.ts +4 -1
  321. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/store.d.ts.map +1 -1
  322. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/store.js +3 -0
  323. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/store.js.map +1 -1
  324. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/targets.d.ts +7 -1
  325. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/targets.d.ts.map +1 -1
  326. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/targets.js +27 -2
  327. package/node_modules/@murphai/assistant-engine/dist/assistant/cron/targets.js.map +1 -1
  328. package/node_modules/@murphai/assistant-engine/dist/assistant/cron.d.ts +9 -2
  329. package/node_modules/@murphai/assistant-engine/dist/assistant/cron.d.ts.map +1 -1
  330. package/node_modules/@murphai/assistant-engine/dist/assistant/cron.js +134 -65
  331. package/node_modules/@murphai/assistant-engine/dist/assistant/cron.js.map +1 -1
  332. package/node_modules/@murphai/assistant-engine/dist/assistant/delivery-service.d.ts +5 -0
  333. package/node_modules/@murphai/assistant-engine/dist/assistant/delivery-service.d.ts.map +1 -1
  334. package/node_modules/@murphai/assistant-engine/dist/assistant/delivery-service.js +131 -22
  335. package/node_modules/@murphai/assistant-engine/dist/assistant/delivery-service.js.map +1 -1
  336. package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-automations.d.ts.map +1 -1
  337. package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-automations.js +58 -90
  338. package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-automations.js.map +1 -1
  339. package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-cron-tags.d.ts +4 -0
  340. package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-cron-tags.d.ts.map +1 -1
  341. package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-cron-tags.js +9 -3
  342. package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-cron-tags.js.map +1 -1
  343. package/node_modules/@murphai/assistant-engine/dist/assistant/diagnostics.d.ts.map +1 -1
  344. package/node_modules/@murphai/assistant-engine/dist/assistant/diagnostics.js +6 -0
  345. package/node_modules/@murphai/assistant-engine/dist/assistant/diagnostics.js.map +1 -1
  346. package/node_modules/@murphai/assistant-engine/dist/assistant/execution-context.d.ts +43 -3
  347. package/node_modules/@murphai/assistant-engine/dist/assistant/execution-context.d.ts.map +1 -1
  348. package/node_modules/@murphai/assistant-engine/dist/assistant/execution-context.js +79 -0
  349. package/node_modules/@murphai/assistant-engine/dist/assistant/execution-context.js.map +1 -1
  350. package/node_modules/@murphai/assistant-engine/dist/assistant/experiment-support-automations.d.ts +5 -3
  351. package/node_modules/@murphai/assistant-engine/dist/assistant/experiment-support-automations.d.ts.map +1 -1
  352. package/node_modules/@murphai/assistant-engine/dist/assistant/experiment-support-automations.js +73 -6
  353. package/node_modules/@murphai/assistant-engine/dist/assistant/experiment-support-automations.js.map +1 -1
  354. package/node_modules/@murphai/assistant-engine/dist/assistant/fault-injection.js.map +1 -1
  355. package/node_modules/@murphai/assistant-engine/dist/assistant/first-contact-welcome.d.ts +1 -1
  356. package/node_modules/@murphai/assistant-engine/dist/assistant/first-contact-welcome.d.ts.map +1 -1
  357. package/node_modules/@murphai/assistant-engine/dist/assistant/generate-cli-surface-contract.js +1 -2
  358. package/node_modules/@murphai/assistant-engine/dist/assistant/generate-cli-surface-contract.js.map +1 -1
  359. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-context-diagnostics.d.ts +1 -1
  360. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-context-diagnostics.d.ts.map +1 -1
  361. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-context-diagnostics.js +0 -27
  362. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-context-diagnostics.js.map +1 -1
  363. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-mailbox-input-items.d.ts +22 -2
  364. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-mailbox-input-items.d.ts.map +1 -1
  365. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-mailbox-input-items.js +78 -4
  366. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-mailbox-input-items.js.map +1 -1
  367. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-tool-context.d.ts +46 -3
  368. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-tool-context.d.ts.map +1 -1
  369. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-tool-context.js +47 -5
  370. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-tool-context.js.map +1 -1
  371. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-turn-timing.d.ts +1 -0
  372. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-turn-timing.d.ts.map +1 -1
  373. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-turn-timing.js +1 -0
  374. package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-turn-timing.js.map +1 -1
  375. package/node_modules/@murphai/assistant-engine/dist/assistant/inbox-attachment-evidence.js +23 -12
  376. package/node_modules/@murphai/assistant-engine/dist/assistant/inbox-attachment-evidence.js.map +1 -1
  377. package/node_modules/@murphai/assistant-engine/dist/assistant/input-source.d.ts +8 -0
  378. package/node_modules/@murphai/assistant-engine/dist/assistant/input-source.d.ts.map +1 -1
  379. package/node_modules/@murphai/assistant-engine/dist/assistant/input-source.js +37 -6
  380. package/node_modules/@murphai/assistant-engine/dist/assistant/input-source.js.map +1 -1
  381. package/node_modules/@murphai/assistant-engine/dist/assistant/input-store.d.ts +109 -44
  382. package/node_modules/@murphai/assistant-engine/dist/assistant/input-store.d.ts.map +1 -1
  383. package/node_modules/@murphai/assistant-engine/dist/assistant/input-store.js +46 -10
  384. package/node_modules/@murphai/assistant-engine/dist/assistant/input-store.js.map +1 -1
  385. package/node_modules/@murphai/assistant-engine/dist/assistant/local-service.d.ts.map +1 -1
  386. package/node_modules/@murphai/assistant-engine/dist/assistant/local-service.js +335 -120
  387. package/node_modules/@murphai/assistant-engine/dist/assistant/local-service.js.map +1 -1
  388. package/node_modules/@murphai/assistant-engine/dist/assistant/maintenance-evidence.d.ts +7 -0
  389. package/node_modules/@murphai/assistant-engine/dist/assistant/maintenance-evidence.d.ts.map +1 -0
  390. package/node_modules/@murphai/assistant-engine/dist/assistant/maintenance-evidence.js +101 -0
  391. package/node_modules/@murphai/assistant-engine/dist/assistant/maintenance-evidence.js.map +1 -0
  392. package/node_modules/@murphai/assistant-engine/dist/assistant/managed-automations.d.ts +69 -1
  393. package/node_modules/@murphai/assistant-engine/dist/assistant/managed-automations.d.ts.map +1 -1
  394. package/node_modules/@murphai/assistant-engine/dist/assistant/managed-automations.js +234 -49
  395. package/node_modules/@murphai/assistant-engine/dist/assistant/managed-automations.js.map +1 -1
  396. package/node_modules/@murphai/assistant-engine/dist/assistant/model-behavior.d.ts +1 -1
  397. package/node_modules/@murphai/assistant-engine/dist/assistant/model-behavior.d.ts.map +1 -1
  398. package/node_modules/@murphai/assistant-engine/dist/assistant/model-behavior.js +3 -4
  399. package/node_modules/@murphai/assistant-engine/dist/assistant/model-behavior.js.map +1 -1
  400. package/node_modules/@murphai/assistant-engine/dist/assistant/newsletter-outbox.d.ts +12 -0
  401. package/node_modules/@murphai/assistant-engine/dist/assistant/newsletter-outbox.d.ts.map +1 -0
  402. package/node_modules/@murphai/assistant-engine/dist/assistant/newsletter-outbox.js +294 -0
  403. package/node_modules/@murphai/assistant-engine/dist/assistant/newsletter-outbox.js.map +1 -0
  404. package/node_modules/@murphai/assistant-engine/dist/assistant/notification-turn.d.ts +20 -1
  405. package/node_modules/@murphai/assistant-engine/dist/assistant/notification-turn.d.ts.map +1 -1
  406. package/node_modules/@murphai/assistant-engine/dist/assistant/notification-turn.js +556 -113
  407. package/node_modules/@murphai/assistant-engine/dist/assistant/notification-turn.js.map +1 -1
  408. package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-automation.d.ts.map +1 -1
  409. package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-automation.js +11 -9
  410. package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-automation.js.map +1 -1
  411. package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-state.d.ts.map +1 -1
  412. package/node_modules/@murphai/assistant-engine/dist/assistant/operator-authority.d.ts +1 -1
  413. package/node_modules/@murphai/assistant-engine/dist/assistant/operator-authority.d.ts.map +1 -1
  414. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/dispatch-state.d.ts +3 -0
  415. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/dispatch-state.d.ts.map +1 -1
  416. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/dispatch-state.js +132 -21
  417. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/dispatch-state.js.map +1 -1
  418. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/ordering.d.ts +7 -0
  419. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/ordering.d.ts.map +1 -0
  420. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/ordering.js +140 -0
  421. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/ordering.js.map +1 -0
  422. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/retry-policy.d.ts +3 -0
  423. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/retry-policy.d.ts.map +1 -1
  424. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/retry-policy.js +79 -1
  425. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/retry-policy.js.map +1 -1
  426. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/store.d.ts.map +1 -1
  427. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/store.js +28 -2
  428. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/store.js.map +1 -1
  429. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox.d.ts +20 -0
  430. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox.d.ts.map +1 -1
  431. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox.js +154 -19
  432. package/node_modules/@murphai/assistant-engine/dist/assistant/outbox.js.map +1 -1
  433. package/node_modules/@murphai/assistant-engine/dist/assistant/progress-constants.d.ts +7 -2
  434. package/node_modules/@murphai/assistant-engine/dist/assistant/progress-constants.d.ts.map +1 -1
  435. package/node_modules/@murphai/assistant-engine/dist/assistant/progress-constants.js +16 -2
  436. package/node_modules/@murphai/assistant-engine/dist/assistant/progress-constants.js.map +1 -1
  437. package/node_modules/@murphai/assistant-engine/dist/assistant/provider-progress.d.ts +1 -1
  438. package/node_modules/@murphai/assistant-engine/dist/assistant/provider-progress.d.ts.map +1 -1
  439. package/node_modules/@murphai/assistant-engine/dist/assistant/providers/codex-cli.d.ts.map +1 -1
  440. package/node_modules/@murphai/assistant-engine/dist/assistant/providers/codex-cli.js +55 -173
  441. package/node_modules/@murphai/assistant-engine/dist/assistant/providers/codex-cli.js.map +1 -1
  442. package/node_modules/@murphai/assistant-engine/dist/assistant/providers/helpers.d.ts.map +1 -1
  443. package/node_modules/@murphai/assistant-engine/dist/assistant/providers/helpers.js +5 -3
  444. package/node_modules/@murphai/assistant-engine/dist/assistant/providers/helpers.js.map +1 -1
  445. package/node_modules/@murphai/assistant-engine/dist/assistant/providers/types.d.ts +24 -25
  446. package/node_modules/@murphai/assistant-engine/dist/assistant/providers/types.d.ts.map +1 -1
  447. package/node_modules/@murphai/assistant-engine/dist/assistant/providers/types.js.map +1 -1
  448. package/node_modules/@murphai/assistant-engine/dist/assistant/receipts.d.ts +1 -0
  449. package/node_modules/@murphai/assistant-engine/dist/assistant/receipts.d.ts.map +1 -1
  450. package/node_modules/@murphai/assistant-engine/dist/assistant/reply-bubbles.d.ts +6 -0
  451. package/node_modules/@murphai/assistant-engine/dist/assistant/reply-bubbles.d.ts.map +1 -0
  452. package/node_modules/@murphai/assistant-engine/dist/assistant/reply-bubbles.js +47 -0
  453. package/node_modules/@murphai/assistant-engine/dist/assistant/reply-bubbles.js.map +1 -0
  454. package/node_modules/@murphai/assistant-engine/dist/assistant/reply-delivery-context.d.ts +1 -1
  455. package/node_modules/@murphai/assistant-engine/dist/assistant/reply-delivery-context.d.ts.map +1 -1
  456. package/node_modules/@murphai/assistant-engine/dist/assistant/reply-delivery-context.js +8 -0
  457. package/node_modules/@murphai/assistant-engine/dist/assistant/reply-delivery-context.js.map +1 -1
  458. package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-budget-policy.d.ts.map +1 -1
  459. package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-budgets.d.ts +2 -0
  460. package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-budgets.d.ts.map +1 -1
  461. package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-budgets.js +92 -40
  462. package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-budgets.js.map +1 -1
  463. package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.d.ts +3 -0
  464. package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.d.ts.map +1 -1
  465. package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.js +107 -37
  466. package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.js.map +1 -1
  467. package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-write-lock.d.ts +1 -1
  468. package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-write-lock.d.ts.map +1 -1
  469. package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-write-lock.js +2 -2
  470. package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-write-lock.js.map +1 -1
  471. package/node_modules/@murphai/assistant-engine/dist/assistant/service-contracts.d.ts +15 -3
  472. package/node_modules/@murphai/assistant-engine/dist/assistant/service-contracts.d.ts.map +1 -1
  473. package/node_modules/@murphai/assistant-engine/dist/assistant/service-turn-routes.d.ts.map +1 -1
  474. package/node_modules/@murphai/assistant-engine/dist/assistant/service-turn-routes.js +11 -2
  475. package/node_modules/@murphai/assistant-engine/dist/assistant/service-turn-routes.js.map +1 -1
  476. package/node_modules/@murphai/assistant-engine/dist/assistant/service-usage.d.ts +2 -0
  477. package/node_modules/@murphai/assistant-engine/dist/assistant/service-usage.d.ts.map +1 -1
  478. package/node_modules/@murphai/assistant-engine/dist/assistant/service-usage.js +9 -1
  479. package/node_modules/@murphai/assistant-engine/dist/assistant/service-usage.js.map +1 -1
  480. package/node_modules/@murphai/assistant-engine/dist/assistant/service.d.ts +29 -24
  481. package/node_modules/@murphai/assistant-engine/dist/assistant/service.d.ts.map +1 -1
  482. package/node_modules/@murphai/assistant-engine/dist/assistant/service.js +5 -0
  483. package/node_modules/@murphai/assistant-engine/dist/assistant/service.js.map +1 -1
  484. package/node_modules/@murphai/assistant-engine/dist/assistant/session-resolution.d.ts +1 -1
  485. package/node_modules/@murphai/assistant-engine/dist/assistant/session-resolution.d.ts.map +1 -1
  486. package/node_modules/@murphai/assistant-engine/dist/assistant/session-resolution.js +81 -13
  487. package/node_modules/@murphai/assistant-engine/dist/assistant/session-resolution.js.map +1 -1
  488. package/node_modules/@murphai/assistant-engine/dist/assistant/state-write-lock.d.ts +1 -1
  489. package/node_modules/@murphai/assistant-engine/dist/assistant/state-write-lock.d.ts.map +1 -1
  490. package/node_modules/@murphai/assistant-engine/dist/assistant/state-write-lock.js +35 -5
  491. package/node_modules/@murphai/assistant-engine/dist/assistant/state-write-lock.js.map +1 -1
  492. package/node_modules/@murphai/assistant-engine/dist/assistant/status.d.ts.map +1 -1
  493. package/node_modules/@murphai/assistant-engine/dist/assistant/status.js +36 -4
  494. package/node_modules/@murphai/assistant-engine/dist/assistant/status.js.map +1 -1
  495. package/node_modules/@murphai/assistant-engine/dist/assistant/store/paths.d.ts +1 -0
  496. package/node_modules/@murphai/assistant-engine/dist/assistant/store/paths.d.ts.map +1 -1
  497. package/node_modules/@murphai/assistant-engine/dist/assistant/store/paths.js +23 -1
  498. package/node_modules/@murphai/assistant-engine/dist/assistant/store/paths.js.map +1 -1
  499. package/node_modules/@murphai/assistant-engine/dist/assistant/store/persistence.d.ts +6 -3
  500. package/node_modules/@murphai/assistant-engine/dist/assistant/store/persistence.d.ts.map +1 -1
  501. package/node_modules/@murphai/assistant-engine/dist/assistant/store/persistence.js +137 -16
  502. package/node_modules/@murphai/assistant-engine/dist/assistant/store/persistence.js.map +1 -1
  503. package/node_modules/@murphai/assistant-engine/dist/assistant/store/types.d.ts +1 -0
  504. package/node_modules/@murphai/assistant-engine/dist/assistant/store/types.d.ts.map +1 -1
  505. package/node_modules/@murphai/assistant-engine/dist/assistant/store.d.ts +6 -1
  506. package/node_modules/@murphai/assistant-engine/dist/assistant/store.d.ts.map +1 -1
  507. package/node_modules/@murphai/assistant-engine/dist/assistant/store.js +94 -22
  508. package/node_modules/@murphai/assistant-engine/dist/assistant/store.js.map +1 -1
  509. package/node_modules/@murphai/assistant-engine/dist/assistant/system-prompt.d.ts +16 -6
  510. package/node_modules/@murphai/assistant-engine/dist/assistant/system-prompt.d.ts.map +1 -1
  511. package/node_modules/@murphai/assistant-engine/dist/assistant/system-prompt.js +546 -230
  512. package/node_modules/@murphai/assistant-engine/dist/assistant/system-prompt.js.map +1 -1
  513. package/node_modules/@murphai/assistant-engine/dist/assistant/transcript-audit.js.map +1 -1
  514. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-finalizer.d.ts +16 -0
  515. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-finalizer.d.ts.map +1 -1
  516. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-finalizer.js +58 -10
  517. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-finalizer.js.map +1 -1
  518. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-input.d.ts +2 -0
  519. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-input.d.ts.map +1 -1
  520. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-input.js.map +1 -1
  521. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-plan.d.ts.map +1 -1
  522. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-plan.js +1 -0
  523. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-plan.js.map +1 -1
  524. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-progress.d.ts +3 -6
  525. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-progress.d.ts.map +1 -1
  526. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-progress.js +29 -22
  527. package/node_modules/@murphai/assistant-engine/dist/assistant/turn-progress.js.map +1 -1
  528. package/node_modules/@murphai/assistant-engine/dist/assistant/turns.d.ts +7 -1
  529. package/node_modules/@murphai/assistant-engine/dist/assistant/turns.d.ts.map +1 -1
  530. package/node_modules/@murphai/assistant-engine/dist/assistant/turns.js +33 -5
  531. package/node_modules/@murphai/assistant-engine/dist/assistant/turns.js.map +1 -1
  532. package/node_modules/@murphai/assistant-engine/dist/assistant/usage-attribution.d.ts +1 -1
  533. package/node_modules/@murphai/assistant-engine/dist/assistant/usage-attribution.d.ts.map +1 -1
  534. package/node_modules/@murphai/assistant-engine/dist/assistant/usage-attribution.js.map +1 -1
  535. package/node_modules/@murphai/assistant-engine/dist/assistant/vault-file-send.d.ts +12 -1
  536. package/node_modules/@murphai/assistant-engine/dist/assistant/vault-file-send.d.ts.map +1 -1
  537. package/node_modules/@murphai/assistant-engine/dist/assistant/vault-file-send.js +53 -1
  538. package/node_modules/@murphai/assistant-engine/dist/assistant/vault-file-send.js.map +1 -1
  539. package/node_modules/@murphai/assistant-engine/dist/assistant-ask.d.ts +70 -0
  540. package/node_modules/@murphai/assistant-engine/dist/assistant-ask.d.ts.map +1 -0
  541. package/node_modules/@murphai/assistant-engine/dist/assistant-ask.js +218 -0
  542. package/node_modules/@murphai/assistant-engine/dist/assistant-ask.js.map +1 -0
  543. package/node_modules/@murphai/assistant-engine/dist/assistant-channel-adapters.d.ts +2 -2
  544. package/node_modules/@murphai/assistant-engine/dist/assistant-channel-adapters.d.ts.map +1 -1
  545. package/node_modules/@murphai/assistant-engine/dist/assistant-channel-adapters.js +1 -1
  546. package/node_modules/@murphai/assistant-engine/dist/assistant-channel-adapters.js.map +1 -1
  547. package/node_modules/@murphai/assistant-engine/dist/assistant-channel-runtime.d.ts +1 -1
  548. package/node_modules/@murphai/assistant-engine/dist/assistant-channel-runtime.d.ts.map +1 -1
  549. package/node_modules/@murphai/assistant-engine/dist/assistant-channel-runtime.js +1 -1
  550. package/node_modules/@murphai/assistant-engine/dist/assistant-channel-runtime.js.map +1 -1
  551. package/node_modules/@murphai/assistant-engine/dist/assistant-cli-access.d.ts.map +1 -1
  552. package/node_modules/@murphai/assistant-engine/dist/assistant-cli-access.js +4 -1
  553. package/node_modules/@murphai/assistant-engine/dist/assistant-cli-access.js.map +1 -1
  554. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-requests.d.ts.map +1 -1
  555. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-requests.js +25 -1
  556. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-requests.js.map +1 -1
  557. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-rpc.d.ts +5 -0
  558. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-rpc.d.ts.map +1 -1
  559. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-rpc.js +12 -5
  560. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-rpc.js.map +1 -1
  561. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/assistant-style.d.ts +82 -0
  562. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/assistant-style.d.ts.map +1 -0
  563. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/assistant-style.js +190 -0
  564. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/assistant-style.js.map +1 -0
  565. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/connected-apps.d.ts +18 -18
  566. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/connected-apps.d.ts.map +1 -1
  567. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/connected-apps.js +2 -2
  568. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/connected-apps.js.map +1 -1
  569. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-song.d.ts +8 -8
  570. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-song.d.ts.map +1 -1
  571. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-song.js +1 -1
  572. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-song.js.map +1 -1
  573. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-voice-memo.d.ts +10 -10
  574. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-voice-memo.d.ts.map +1 -1
  575. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/phone-calls.d.ts +4 -3
  576. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/phone-calls.d.ts.map +1 -1
  577. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/phone-calls.js +17 -8
  578. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/phone-calls.js.map +1 -1
  579. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools.d.ts +1273 -268
  580. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools.d.ts.map +1 -1
  581. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools.js +1724 -34
  582. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools.js.map +1 -1
  583. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/failures.d.ts +1 -1
  584. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/failures.d.ts.map +1 -1
  585. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/failures.js +4 -13
  586. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/failures.js.map +1 -1
  587. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-image-tool.d.ts +3 -3
  588. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-image-tool.d.ts.map +1 -1
  589. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-image-tool.js +352 -74
  590. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-image-tool.js.map +1 -1
  591. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-voice-memo-tool.d.ts +1 -0
  592. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-voice-memo-tool.d.ts.map +1 -1
  593. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-voice-memo-tool.js +6 -12
  594. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-voice-memo-tool.js.map +1 -1
  595. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/image-reference-resolver.d.ts +2 -3
  596. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/image-reference-resolver.d.ts.map +1 -1
  597. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/image-reference-resolver.js +89 -39
  598. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/image-reference-resolver.js.map +1 -1
  599. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/openai-image-generation.d.ts +1 -1
  600. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/openai-image-generation.js +4 -4
  601. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/openai-image-generation.js.map +1 -1
  602. package/node_modules/@murphai/assistant-engine/dist/assistant-codex-events.d.ts +2 -2
  603. package/node_modules/@murphai/assistant-engine/dist/assistant-codex-events.d.ts.map +1 -1
  604. package/node_modules/@murphai/assistant-engine/dist/assistant-codex-events.js +1 -6
  605. package/node_modules/@murphai/assistant-engine/dist/assistant-codex-events.js.map +1 -1
  606. package/node_modules/@murphai/assistant-engine/dist/assistant-codex.d.ts +23 -15
  607. package/node_modules/@murphai/assistant-engine/dist/assistant-codex.d.ts.map +1 -1
  608. package/node_modules/@murphai/assistant-engine/dist/assistant-codex.js +868 -533
  609. package/node_modules/@murphai/assistant-engine/dist/assistant-codex.js.map +1 -1
  610. package/node_modules/@murphai/assistant-engine/dist/assistant-service.d.ts +1 -1
  611. package/node_modules/@murphai/assistant-engine/dist/assistant-service.d.ts.map +1 -1
  612. package/node_modules/@murphai/assistant-engine/dist/assistant-service.js +1 -1
  613. package/node_modules/@murphai/assistant-engine/dist/assistant-service.js.map +1 -1
  614. package/node_modules/@murphai/assistant-engine/dist/assistant-skill-assets.d.ts +140 -48
  615. package/node_modules/@murphai/assistant-engine/dist/assistant-skill-assets.d.ts.map +1 -1
  616. package/node_modules/@murphai/assistant-engine/dist/assistant-skill-assets.js +118 -3
  617. package/node_modules/@murphai/assistant-engine/dist/assistant-skill-assets.js.map +1 -1
  618. package/node_modules/@murphai/assistant-engine/dist/assistant-skill-env.d.ts +2 -2
  619. package/node_modules/@murphai/assistant-engine/dist/attachment-prompt-contracts.d.ts +17 -17
  620. package/node_modules/@murphai/assistant-engine/dist/attachment-prompt-contracts.d.ts.map +1 -1
  621. package/node_modules/@murphai/assistant-engine/dist/codex-lifecycle.d.ts +3 -1
  622. package/node_modules/@murphai/assistant-engine/dist/codex-lifecycle.d.ts.map +1 -1
  623. package/node_modules/@murphai/assistant-engine/dist/codex-lifecycle.js +7 -1
  624. package/node_modules/@murphai/assistant-engine/dist/codex-lifecycle.js.map +1 -1
  625. package/node_modules/@murphai/assistant-engine/dist/inbox-routing-vision.d.ts +2 -2
  626. package/node_modules/@murphai/assistant-engine/dist/inbox-routing-vision.d.ts.map +1 -1
  627. package/node_modules/@murphai/assistant-engine/dist/index.d.ts +2 -0
  628. package/node_modules/@murphai/assistant-engine/dist/index.d.ts.map +1 -1
  629. package/node_modules/@murphai/assistant-engine/dist/index.js +1 -0
  630. package/node_modules/@murphai/assistant-engine/dist/index.js.map +1 -1
  631. package/node_modules/@murphai/assistant-engine/dist/knowledge/service.js.map +1 -1
  632. package/node_modules/@murphai/assistant-engine/dist/outbound-channel.d.ts +3 -2
  633. package/node_modules/@murphai/assistant-engine/dist/outbound-channel.d.ts.map +1 -1
  634. package/node_modules/@murphai/assistant-engine/dist/outbound-channel.js +4 -2
  635. package/node_modules/@murphai/assistant-engine/dist/outbound-channel.js.map +1 -1
  636. package/node_modules/@murphai/assistant-engine/package.json +4 -0
  637. package/node_modules/@murphai/assistant-engine/skills/aerobic-fitness/SKILL.md +56 -0
  638. package/node_modules/@murphai/assistant-engine/skills/appointment-scheduling/SKILL.md +249 -0
  639. package/node_modules/@murphai/assistant-engine/skills/behavior-followthrough/SKILL.md +18 -9
  640. package/node_modules/@murphai/assistant-engine/skills/body-composition/SKILL.md +56 -0
  641. package/node_modules/@murphai/assistant-engine/skills/cardiometabolic-health/SKILL.md +56 -0
  642. package/node_modules/@murphai/assistant-engine/skills/circadian-rhythm/SKILL.md +57 -0
  643. package/node_modules/@murphai/assistant-engine/skills/cognitive-focus/SKILL.md +55 -0
  644. package/node_modules/@murphai/assistant-engine/skills/computer-use/SKILL.md +163 -121
  645. package/node_modules/@murphai/assistant-engine/skills/computer-use/references/health-browser-playbook.md +16 -9
  646. package/node_modules/@murphai/assistant-engine/skills/cycle-hormonal-health/SKILL.md +55 -0
  647. package/node_modules/@murphai/assistant-engine/skills/daily-activity/SKILL.md +55 -0
  648. package/node_modules/@murphai/assistant-engine/skills/energy-fatigue/SKILL.md +57 -0
  649. package/node_modules/@murphai/assistant-engine/skills/experiment-onboarding/SKILL.md +24 -10
  650. package/node_modules/@murphai/assistant-engine/skills/food-journal/SKILL.md +26 -0
  651. package/node_modules/@murphai/assistant-engine/skills/general-eye-health/SKILL.md +77 -0
  652. package/node_modules/@murphai/assistant-engine/skills/general-eye-health/references/evidence-register.md +34 -0
  653. package/node_modules/@murphai/assistant-engine/skills/general-eye-health/references/triage-and-contact-lenses.md +103 -0
  654. package/node_modules/@murphai/assistant-engine/skills/group-challenge/SKILL.md +346 -0
  655. package/node_modules/@murphai/assistant-engine/skills/group-chat/SKILL.md +296 -0
  656. package/node_modules/@murphai/assistant-engine/skills/group-newsletter/SKILL.md +210 -0
  657. package/node_modules/@murphai/assistant-engine/skills/groupchat-comedy/SKILL.md +182 -0
  658. package/node_modules/@murphai/assistant-engine/skills/gut-digestion/SKILL.md +57 -0
  659. package/node_modules/@murphai/assistant-engine/skills/hrv-resting-heart-rate/SKILL.md +55 -0
  660. package/node_modules/@murphai/assistant-engine/skills/micronutrients-supplements/SKILL.md +80 -0
  661. package/node_modules/@murphai/assistant-engine/skills/mobility-posture/SKILL.md +56 -0
  662. package/node_modules/@murphai/assistant-engine/skills/murph-onboarding/SKILL.md +358 -124
  663. package/node_modules/@murphai/assistant-engine/skills/music-generation/SKILL.md +162 -0
  664. package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/SKILL.md +73 -109
  665. package/node_modules/@murphai/assistant-engine/skills/physical-therapy/SKILL.md +3 -1
  666. package/node_modules/@murphai/assistant-engine/skills/recovery-modalities/SKILL.md +57 -0
  667. package/node_modules/@murphai/assistant-engine/skills/red-light-therapy/SKILL.md +145 -0
  668. package/node_modules/@murphai/assistant-engine/skills/red-light-therapy/device-seeds.json +259 -0
  669. package/node_modules/@murphai/assistant-engine/skills/shared/exercise-catalog-runtime.md +29 -0
  670. package/node_modules/@murphai/assistant-engine/skills/shared/murph-character-sheet-v1.png +0 -0
  671. package/node_modules/@murphai/assistant-engine/skills/sleep-improvement/SKILL.md +60 -0
  672. package/node_modules/@murphai/assistant-engine/skills/sleep-recovery-readiness/SKILL.md +68 -178
  673. package/node_modules/@murphai/assistant-engine/skills/strength-training/SKILL.md +1 -1
  674. package/node_modules/@murphai/assistant-engine/skills/substance-load/SKILL.md +56 -0
  675. package/node_modules/@murphai/assistantd/dist/client.js.map +1 -1
  676. package/node_modules/@murphai/assistantd/dist/config.js.map +1 -1
  677. package/node_modules/@murphai/assistantd/dist/http-protocol.d.ts.map +1 -1
  678. package/node_modules/@murphai/assistantd/dist/http-protocol.js.map +1 -1
  679. package/node_modules/@murphai/clinical-records/README.md +82 -0
  680. package/node_modules/@murphai/clinical-records/dist/index.d.ts +1865 -0
  681. package/node_modules/@murphai/clinical-records/dist/index.d.ts.map +1 -0
  682. package/node_modules/@murphai/clinical-records/dist/index.js +488 -0
  683. package/node_modules/@murphai/clinical-records/dist/index.js.map +1 -0
  684. package/node_modules/@murphai/clinical-records/package.json +27 -0
  685. package/node_modules/@murphai/core/dist/atomic-write.d.ts +4 -0
  686. package/node_modules/@murphai/core/dist/atomic-write.d.ts.map +1 -1
  687. package/node_modules/@murphai/core/dist/atomic-write.js +26 -0
  688. package/node_modules/@murphai/core/dist/atomic-write.js.map +1 -1
  689. package/node_modules/@murphai/core/dist/automation.d.ts +8 -2
  690. package/node_modules/@murphai/core/dist/automation.d.ts.map +1 -1
  691. package/node_modules/@murphai/core/dist/automation.js +66 -2
  692. package/node_modules/@murphai/core/dist/automation.js.map +1 -1
  693. package/node_modules/@murphai/core/dist/bank/goals.js.map +1 -1
  694. package/node_modules/@murphai/core/dist/bank/habitat.d.ts +36 -0
  695. package/node_modules/@murphai/core/dist/bank/habitat.d.ts.map +1 -0
  696. package/node_modules/@murphai/core/dist/bank/habitat.js +179 -0
  697. package/node_modules/@murphai/core/dist/bank/habitat.js.map +1 -0
  698. package/node_modules/@murphai/core/dist/bank/regimens.js.map +1 -1
  699. package/node_modules/@murphai/core/dist/constants.d.ts +4 -0
  700. package/node_modules/@murphai/core/dist/constants.d.ts.map +1 -1
  701. package/node_modules/@murphai/core/dist/domains/events/attachment-backed.d.ts +41 -1
  702. package/node_modules/@murphai/core/dist/domains/events/attachment-backed.d.ts.map +1 -1
  703. package/node_modules/@murphai/core/dist/domains/events/attachment-backed.js +311 -5
  704. package/node_modules/@murphai/core/dist/domains/events/attachment-backed.js.map +1 -1
  705. package/node_modules/@murphai/core/dist/domains/events/capture-lookup.d.ts +6 -0
  706. package/node_modules/@murphai/core/dist/domains/events/capture-lookup.d.ts.map +1 -0
  707. package/node_modules/@murphai/core/dist/domains/events/capture-lookup.js +7 -0
  708. package/node_modules/@murphai/core/dist/domains/events/capture-lookup.js.map +1 -0
  709. package/node_modules/@murphai/core/dist/domains/events/ledger.d.ts.map +1 -1
  710. package/node_modules/@murphai/core/dist/domains/events/ledger.js +4 -0
  711. package/node_modules/@murphai/core/dist/domains/events/ledger.js.map +1 -1
  712. package/node_modules/@murphai/core/dist/domains/events.d.ts +2 -2
  713. package/node_modules/@murphai/core/dist/domains/events.d.ts.map +1 -1
  714. package/node_modules/@murphai/core/dist/domains/events.js +1 -1
  715. package/node_modules/@murphai/core/dist/domains/events.js.map +1 -1
  716. package/node_modules/@murphai/core/dist/domains/experiments.d.ts.map +1 -1
  717. package/node_modules/@murphai/core/dist/domains/experiments.js +9 -3
  718. package/node_modules/@murphai/core/dist/domains/experiments.js.map +1 -1
  719. package/node_modules/@murphai/core/dist/domains/shared.js.map +1 -1
  720. package/node_modules/@murphai/core/dist/errors.d.ts.map +1 -1
  721. package/node_modules/@murphai/core/dist/errors.js.map +1 -1
  722. package/node_modules/@murphai/core/dist/event-attachments.d.ts +2 -1
  723. package/node_modules/@murphai/core/dist/event-attachments.d.ts.map +1 -1
  724. package/node_modules/@murphai/core/dist/event-attachments.js +1 -0
  725. package/node_modules/@murphai/core/dist/event-attachments.js.map +1 -1
  726. package/node_modules/@murphai/core/dist/experiment-media-repair.d.ts +33 -0
  727. package/node_modules/@murphai/core/dist/experiment-media-repair.d.ts.map +1 -0
  728. package/node_modules/@murphai/core/dist/experiment-media-repair.js +685 -0
  729. package/node_modules/@murphai/core/dist/experiment-media-repair.js.map +1 -0
  730. package/node_modules/@murphai/core/dist/experiment-storage.d.ts +12 -0
  731. package/node_modules/@murphai/core/dist/experiment-storage.d.ts.map +1 -0
  732. package/node_modules/@murphai/core/dist/experiment-storage.js +70 -0
  733. package/node_modules/@murphai/core/dist/experiment-storage.js.map +1 -0
  734. package/node_modules/@murphai/core/dist/frontmatter.js.map +1 -1
  735. package/node_modules/@murphai/core/dist/fs.d.ts +1 -0
  736. package/node_modules/@murphai/core/dist/fs.d.ts.map +1 -1
  737. package/node_modules/@murphai/core/dist/fs.js +3 -0
  738. package/node_modules/@murphai/core/dist/fs.js.map +1 -1
  739. package/node_modules/@murphai/core/dist/history/api.d.ts +11 -0
  740. package/node_modules/@murphai/core/dist/history/api.d.ts.map +1 -1
  741. package/node_modules/@murphai/core/dist/history/api.js +60 -3
  742. package/node_modules/@murphai/core/dist/history/api.js.map +1 -1
  743. package/node_modules/@murphai/core/dist/history/types.d.ts.map +1 -1
  744. package/node_modules/@murphai/core/dist/ids.js.map +1 -1
  745. package/node_modules/@murphai/core/dist/index.d.ts +12 -6
  746. package/node_modules/@murphai/core/dist/index.d.ts.map +1 -1
  747. package/node_modules/@murphai/core/dist/index.js +6 -4
  748. package/node_modules/@murphai/core/dist/index.js.map +1 -1
  749. package/node_modules/@murphai/core/dist/integration-ingest-migration.d.ts.map +1 -1
  750. package/node_modules/@murphai/core/dist/integration-ingest-migration.js +1 -1
  751. package/node_modules/@murphai/core/dist/integration-ingest-migration.js.map +1 -1
  752. package/node_modules/@murphai/core/dist/integration-ingests.d.ts +73 -2
  753. package/node_modules/@murphai/core/dist/integration-ingests.d.ts.map +1 -1
  754. package/node_modules/@murphai/core/dist/integration-ingests.js +1196 -77
  755. package/node_modules/@murphai/core/dist/integration-ingests.js.map +1 -1
  756. package/node_modules/@murphai/core/dist/jsonl.d.ts +10 -0
  757. package/node_modules/@murphai/core/dist/jsonl.d.ts.map +1 -1
  758. package/node_modules/@murphai/core/dist/jsonl.js +63 -12
  759. package/node_modules/@murphai/core/dist/jsonl.js.map +1 -1
  760. package/node_modules/@murphai/core/dist/markdown-documents.js.map +1 -1
  761. package/node_modules/@murphai/core/dist/memory.d.ts +7 -2
  762. package/node_modules/@murphai/core/dist/memory.d.ts.map +1 -1
  763. package/node_modules/@murphai/core/dist/memory.js +36 -1
  764. package/node_modules/@murphai/core/dist/memory.js.map +1 -1
  765. package/node_modules/@murphai/core/dist/mutations.d.ts +33 -5
  766. package/node_modules/@murphai/core/dist/mutations.d.ts.map +1 -1
  767. package/node_modules/@murphai/core/dist/mutations.js +1684 -205
  768. package/node_modules/@murphai/core/dist/mutations.js.map +1 -1
  769. package/node_modules/@murphai/core/dist/operations/canonical-resource-lock.js.map +1 -1
  770. package/node_modules/@murphai/core/dist/operations/canonical-write-lock.js.map +1 -1
  771. package/node_modules/@murphai/core/dist/operations/index.d.ts +1 -1
  772. package/node_modules/@murphai/core/dist/operations/index.d.ts.map +1 -1
  773. package/node_modules/@murphai/core/dist/operations/index.js +1 -1
  774. package/node_modules/@murphai/core/dist/operations/index.js.map +1 -1
  775. package/node_modules/@murphai/core/dist/operations/write-batch.d.ts +34 -1
  776. package/node_modules/@murphai/core/dist/operations/write-batch.d.ts.map +1 -1
  777. package/node_modules/@murphai/core/dist/operations/write-batch.js +684 -39
  778. package/node_modules/@murphai/core/dist/operations/write-batch.js.map +1 -1
  779. package/node_modules/@murphai/core/dist/path-safety.js.map +1 -1
  780. package/node_modules/@murphai/core/dist/preferences.d.ts +21 -2
  781. package/node_modules/@murphai/core/dist/preferences.d.ts.map +1 -1
  782. package/node_modules/@murphai/core/dist/preferences.js +249 -12
  783. package/node_modules/@murphai/core/dist/preferences.js.map +1 -1
  784. package/node_modules/@murphai/core/dist/public-mutations.d.ts +13 -2
  785. package/node_modules/@murphai/core/dist/public-mutations.d.ts.map +1 -1
  786. package/node_modules/@murphai/core/dist/public-mutations.js +20 -3
  787. package/node_modules/@murphai/core/dist/public-mutations.js.map +1 -1
  788. package/node_modules/@murphai/core/dist/raw-artifact-integrity.js.map +1 -1
  789. package/node_modules/@murphai/core/dist/registry/api.d.ts.map +1 -1
  790. package/node_modules/@murphai/core/dist/scheduled-logs.d.ts +1 -0
  791. package/node_modules/@murphai/core/dist/scheduled-logs.d.ts.map +1 -1
  792. package/node_modules/@murphai/core/dist/scheduled-logs.js +1 -0
  793. package/node_modules/@murphai/core/dist/scheduled-logs.js.map +1 -1
  794. package/node_modules/@murphai/core/dist/vault.d.ts.map +1 -1
  795. package/node_modules/@murphai/core/dist/vault.js +174 -11
  796. package/node_modules/@murphai/core/dist/vault.js.map +1 -1
  797. package/node_modules/@murphai/core/dist/wearable-receipts.js.map +1 -1
  798. package/node_modules/@murphai/core/dist/wearable-storage-migration.js.map +1 -1
  799. package/node_modules/@murphai/core/dist/write-policy.d.ts +3 -0
  800. package/node_modules/@murphai/core/dist/write-policy.d.ts.map +1 -1
  801. package/node_modules/@murphai/core/dist/write-policy.js +54 -3
  802. package/node_modules/@murphai/core/dist/write-policy.js.map +1 -1
  803. package/node_modules/@murphai/device-syncd/README.md +45 -5
  804. package/node_modules/@murphai/device-syncd/dist/callback-redirect.d.ts +7 -0
  805. package/node_modules/@murphai/device-syncd/dist/callback-redirect.d.ts.map +1 -1
  806. package/node_modules/@murphai/device-syncd/dist/callback-redirect.js +9 -0
  807. package/node_modules/@murphai/device-syncd/dist/callback-redirect.js.map +1 -1
  808. package/node_modules/@murphai/device-syncd/dist/client.js.map +1 -1
  809. package/node_modules/@murphai/device-syncd/dist/companion-health-metadata-parser.d.ts +30 -0
  810. package/node_modules/@murphai/device-syncd/dist/companion-health-metadata-parser.d.ts.map +1 -0
  811. package/node_modules/@murphai/device-syncd/dist/companion-health-metadata-parser.js +130 -0
  812. package/node_modules/@murphai/device-syncd/dist/companion-health-metadata-parser.js.map +1 -0
  813. package/node_modules/@murphai/device-syncd/dist/companion-health-metadata.d.ts +18 -0
  814. package/node_modules/@murphai/device-syncd/dist/companion-health-metadata.d.ts.map +1 -0
  815. package/node_modules/@murphai/device-syncd/dist/companion-health-metadata.js +18 -0
  816. package/node_modules/@murphai/device-syncd/dist/companion-health-metadata.js.map +1 -0
  817. package/node_modules/@murphai/device-syncd/dist/config/connect-routes.d.ts +4 -1
  818. package/node_modules/@murphai/device-syncd/dist/config/connect-routes.d.ts.map +1 -1
  819. package/node_modules/@murphai/device-syncd/dist/config/connect-routes.js +39 -4
  820. package/node_modules/@murphai/device-syncd/dist/config/connect-routes.js.map +1 -1
  821. package/node_modules/@murphai/device-syncd/dist/config/env-keys.d.ts.map +1 -1
  822. package/node_modules/@murphai/device-syncd/dist/config/junction-client-config.d.ts +9 -0
  823. package/node_modules/@murphai/device-syncd/dist/config/junction-client-config.d.ts.map +1 -0
  824. package/node_modules/@murphai/device-syncd/dist/config/junction-client-config.js +56 -0
  825. package/node_modules/@murphai/device-syncd/dist/config/junction-client-config.js.map +1 -0
  826. package/node_modules/@murphai/device-syncd/dist/config/junction-config.d.ts +3 -0
  827. package/node_modules/@murphai/device-syncd/dist/config/junction-config.d.ts.map +1 -0
  828. package/node_modules/@murphai/device-syncd/dist/config/junction-config.js +46 -0
  829. package/node_modules/@murphai/device-syncd/dist/config/junction-config.js.map +1 -0
  830. package/node_modules/@murphai/device-syncd/dist/config/junction-connect-sources.d.ts.map +1 -0
  831. package/node_modules/@murphai/device-syncd/dist/{providers → config}/junction-connect-sources.js +1 -1
  832. package/node_modules/@murphai/device-syncd/dist/config/junction-connect-sources.js.map +1 -0
  833. package/node_modules/@murphai/device-syncd/dist/config/provider-configs.d.ts +3 -5
  834. package/node_modules/@murphai/device-syncd/dist/config/provider-configs.d.ts.map +1 -1
  835. package/node_modules/@murphai/device-syncd/dist/config/provider-configs.js +69 -14
  836. package/node_modules/@murphai/device-syncd/dist/config/provider-configs.js.map +1 -1
  837. package/node_modules/@murphai/device-syncd/dist/config/provider-env.d.ts +2 -3
  838. package/node_modules/@murphai/device-syncd/dist/config/provider-env.d.ts.map +1 -1
  839. package/node_modules/@murphai/device-syncd/dist/config/provider-env.js +0 -3
  840. package/node_modules/@murphai/device-syncd/dist/config/provider-env.js.map +1 -1
  841. package/node_modules/@murphai/device-syncd/dist/config/provider-factory.d.ts.map +1 -1
  842. package/node_modules/@murphai/device-syncd/dist/config/provider-factory.js +9 -5
  843. package/node_modules/@murphai/device-syncd/dist/config/provider-factory.js.map +1 -1
  844. package/node_modules/@murphai/device-syncd/dist/config/provider-manifests.d.ts +26 -16
  845. package/node_modules/@murphai/device-syncd/dist/config/provider-manifests.d.ts.map +1 -1
  846. package/node_modules/@murphai/device-syncd/dist/config/provider-manifests.js +236 -339
  847. package/node_modules/@murphai/device-syncd/dist/config/provider-manifests.js.map +1 -1
  848. package/node_modules/@murphai/device-syncd/dist/config/provider-types.d.ts +62 -5
  849. package/node_modules/@murphai/device-syncd/dist/config/provider-types.d.ts.map +1 -1
  850. package/node_modules/@murphai/device-syncd/dist/config/runtime-config.d.ts.map +1 -1
  851. package/node_modules/@murphai/device-syncd/dist/config/runtime-config.js +7 -361
  852. package/node_modules/@murphai/device-syncd/dist/config/runtime-config.js.map +1 -1
  853. package/node_modules/@murphai/device-syncd/dist/config/serializable-provider-configs.d.ts +17 -1
  854. package/node_modules/@murphai/device-syncd/dist/config/serializable-provider-configs.d.ts.map +1 -1
  855. package/node_modules/@murphai/device-syncd/dist/config/serializable-provider-configs.js +104 -11
  856. package/node_modules/@murphai/device-syncd/dist/config/serializable-provider-configs.js.map +1 -1
  857. package/node_modules/@murphai/device-syncd/dist/config.d.ts +5 -3
  858. package/node_modules/@murphai/device-syncd/dist/config.d.ts.map +1 -1
  859. package/node_modules/@murphai/device-syncd/dist/config.js +4 -2
  860. package/node_modules/@murphai/device-syncd/dist/config.js.map +1 -1
  861. package/node_modules/@murphai/device-syncd/dist/configured-provider-descriptors.d.ts +6 -0
  862. package/node_modules/@murphai/device-syncd/dist/configured-provider-descriptors.d.ts.map +1 -0
  863. package/node_modules/@murphai/device-syncd/dist/configured-provider-descriptors.js +7 -0
  864. package/node_modules/@murphai/device-syncd/dist/configured-provider-descriptors.js.map +1 -0
  865. package/node_modules/@murphai/device-syncd/dist/configured-provider-runtime-descriptors.d.ts +3 -0
  866. package/node_modules/@murphai/device-syncd/dist/configured-provider-runtime-descriptors.d.ts.map +1 -0
  867. package/node_modules/@murphai/device-syncd/dist/configured-provider-runtime-descriptors.js +2 -0
  868. package/node_modules/@murphai/device-syncd/dist/configured-provider-runtime-descriptors.js.map +1 -0
  869. package/node_modules/@murphai/device-syncd/dist/connect-config.d.ts +2 -2
  870. package/node_modules/@murphai/device-syncd/dist/connect-config.d.ts.map +1 -1
  871. package/node_modules/@murphai/device-syncd/dist/connect-config.js +4 -11
  872. package/node_modules/@murphai/device-syncd/dist/connect-config.js.map +1 -1
  873. package/node_modules/@murphai/device-syncd/dist/errors.d.ts +8 -0
  874. package/node_modules/@murphai/device-syncd/dist/errors.d.ts.map +1 -1
  875. package/node_modules/@murphai/device-syncd/dist/errors.js +26 -0
  876. package/node_modules/@murphai/device-syncd/dist/errors.js.map +1 -1
  877. package/node_modules/@murphai/device-syncd/dist/hosted-hints.js +1 -1
  878. package/node_modules/@murphai/device-syncd/dist/hosted-hints.js.map +1 -1
  879. package/node_modules/@murphai/device-syncd/dist/hosted-runtime.d.ts +24 -0
  880. package/node_modules/@murphai/device-syncd/dist/hosted-runtime.d.ts.map +1 -1
  881. package/node_modules/@murphai/device-syncd/dist/hosted-runtime.js +187 -28
  882. package/node_modules/@murphai/device-syncd/dist/hosted-runtime.js.map +1 -1
  883. package/node_modules/@murphai/device-syncd/dist/http.d.ts +2 -9
  884. package/node_modules/@murphai/device-syncd/dist/http.d.ts.map +1 -1
  885. package/node_modules/@murphai/device-syncd/dist/http.js +26 -29
  886. package/node_modules/@murphai/device-syncd/dist/http.js.map +1 -1
  887. package/node_modules/@murphai/device-syncd/dist/index.d.ts +7 -7
  888. package/node_modules/@murphai/device-syncd/dist/index.d.ts.map +1 -1
  889. package/node_modules/@murphai/device-syncd/dist/index.js +1 -1
  890. package/node_modules/@murphai/device-syncd/dist/index.js.map +1 -1
  891. package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.d.ts +60 -0
  892. package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.d.ts.map +1 -0
  893. package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.js +382 -0
  894. package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.js.map +1 -0
  895. package/node_modules/@murphai/device-syncd/dist/junction-resources.d.ts +17 -0
  896. package/node_modules/@murphai/device-syncd/dist/junction-resources.d.ts.map +1 -0
  897. package/node_modules/@murphai/device-syncd/dist/junction-resources.js +28 -0
  898. package/node_modules/@murphai/device-syncd/dist/junction-resources.js.map +1 -0
  899. package/node_modules/@murphai/device-syncd/dist/metadata.d.ts +1 -0
  900. package/node_modules/@murphai/device-syncd/dist/metadata.d.ts.map +1 -1
  901. package/node_modules/@murphai/device-syncd/dist/metadata.js +1 -1
  902. package/node_modules/@murphai/device-syncd/dist/metadata.js.map +1 -1
  903. package/node_modules/@murphai/device-syncd/dist/provider-configs.d.ts +3 -0
  904. package/node_modules/@murphai/device-syncd/dist/provider-configs.d.ts.map +1 -0
  905. package/node_modules/@murphai/device-syncd/dist/provider-configs.js +2 -0
  906. package/node_modules/@murphai/device-syncd/dist/provider-configs.js.map +1 -0
  907. package/node_modules/@murphai/device-syncd/dist/provider-credential-policy.d.ts +6 -0
  908. package/node_modules/@murphai/device-syncd/dist/provider-credential-policy.d.ts.map +1 -0
  909. package/node_modules/@murphai/device-syncd/dist/provider-credential-policy.js +22 -0
  910. package/node_modules/@murphai/device-syncd/dist/provider-credential-policy.js.map +1 -0
  911. package/node_modules/@murphai/device-syncd/dist/provider-job-definitions.d.ts +7 -0
  912. package/node_modules/@murphai/device-syncd/dist/provider-job-definitions.d.ts.map +1 -0
  913. package/node_modules/@murphai/device-syncd/dist/provider-job-definitions.js +116 -0
  914. package/node_modules/@murphai/device-syncd/dist/provider-job-definitions.js.map +1 -0
  915. package/node_modules/@murphai/device-syncd/dist/provider-label.d.ts.map +1 -1
  916. package/node_modules/@murphai/device-syncd/dist/provider-label.js +5 -5
  917. package/node_modules/@murphai/device-syncd/dist/provider-label.js.map +1 -1
  918. package/node_modules/@murphai/device-syncd/dist/providers/junction-client.d.ts +22 -5
  919. package/node_modules/@murphai/device-syncd/dist/providers/junction-client.d.ts.map +1 -1
  920. package/node_modules/@murphai/device-syncd/dist/providers/junction-client.js +93 -58
  921. package/node_modules/@murphai/device-syncd/dist/providers/junction-client.js.map +1 -1
  922. package/node_modules/@murphai/device-syncd/dist/providers/junction-config.d.ts +3 -0
  923. package/node_modules/@murphai/device-syncd/dist/providers/junction-config.d.ts.map +1 -0
  924. package/node_modules/@murphai/device-syncd/dist/providers/junction-config.js +2 -0
  925. package/node_modules/@murphai/device-syncd/dist/providers/junction-config.js.map +1 -0
  926. package/node_modules/@murphai/device-syncd/dist/providers/junction.d.ts +5 -28
  927. package/node_modules/@murphai/device-syncd/dist/providers/junction.d.ts.map +1 -1
  928. package/node_modules/@murphai/device-syncd/dist/providers/junction.js +927 -719
  929. package/node_modules/@murphai/device-syncd/dist/providers/junction.js.map +1 -1
  930. package/node_modules/@murphai/device-syncd/dist/providers/oura-webhooks.js.map +1 -1
  931. package/node_modules/@murphai/device-syncd/dist/providers/oura.d.ts +2 -14
  932. package/node_modules/@murphai/device-syncd/dist/providers/oura.d.ts.map +1 -1
  933. package/node_modules/@murphai/device-syncd/dist/providers/oura.js +3 -26
  934. package/node_modules/@murphai/device-syncd/dist/providers/oura.js.map +1 -1
  935. package/node_modules/@murphai/device-syncd/dist/providers/provider-diagnostics.d.ts.map +1 -1
  936. package/node_modules/@murphai/device-syncd/dist/providers/provider-diagnostics.js +34 -30
  937. package/node_modules/@murphai/device-syncd/dist/providers/provider-diagnostics.js.map +1 -1
  938. package/node_modules/@murphai/device-syncd/dist/providers/shared-oauth.js.map +1 -1
  939. package/node_modules/@murphai/device-syncd/dist/providers/strava-webhooks.js.map +1 -1
  940. package/node_modules/@murphai/device-syncd/dist/providers/strava.d.ts +2 -15
  941. package/node_modules/@murphai/device-syncd/dist/providers/strava.d.ts.map +1 -1
  942. package/node_modules/@murphai/device-syncd/dist/providers/strava.js +8 -43
  943. package/node_modules/@murphai/device-syncd/dist/providers/strava.js.map +1 -1
  944. package/node_modules/@murphai/device-syncd/dist/providers/whoop.d.ts +2 -12
  945. package/node_modules/@murphai/device-syncd/dist/providers/whoop.d.ts.map +1 -1
  946. package/node_modules/@murphai/device-syncd/dist/providers/whoop.js +3 -22
  947. package/node_modules/@murphai/device-syncd/dist/providers/whoop.js.map +1 -1
  948. package/node_modules/@murphai/device-syncd/dist/public-account.d.ts +25 -0
  949. package/node_modules/@murphai/device-syncd/dist/public-account.d.ts.map +1 -1
  950. package/node_modules/@murphai/device-syncd/dist/public-account.js +32 -0
  951. package/node_modules/@murphai/device-syncd/dist/public-account.js.map +1 -1
  952. package/node_modules/@murphai/device-syncd/dist/public-ingress.d.ts +9 -4
  953. package/node_modules/@murphai/device-syncd/dist/public-ingress.d.ts.map +1 -1
  954. package/node_modules/@murphai/device-syncd/dist/public-ingress.js +125 -40
  955. package/node_modules/@murphai/device-syncd/dist/public-ingress.js.map +1 -1
  956. package/node_modules/@murphai/device-syncd/dist/public-provider-descriptor-shared.d.ts +3 -0
  957. package/node_modules/@murphai/device-syncd/dist/public-provider-descriptor-shared.d.ts.map +1 -0
  958. package/node_modules/@murphai/device-syncd/dist/public-provider-descriptor-shared.js +4 -0
  959. package/node_modules/@murphai/device-syncd/dist/public-provider-descriptor-shared.js.map +1 -0
  960. package/node_modules/@murphai/device-syncd/dist/public-provider-descriptors.d.ts +10 -0
  961. package/node_modules/@murphai/device-syncd/dist/public-provider-descriptors.d.ts.map +1 -0
  962. package/node_modules/@murphai/device-syncd/dist/public-provider-descriptors.js +41 -0
  963. package/node_modules/@murphai/device-syncd/dist/public-provider-descriptors.js.map +1 -0
  964. package/node_modules/@murphai/device-syncd/dist/registry.js.map +1 -1
  965. package/node_modules/@murphai/device-syncd/dist/service.d.ts +1 -1
  966. package/node_modules/@murphai/device-syncd/dist/service.d.ts.map +1 -1
  967. package/node_modules/@murphai/device-syncd/dist/service.js +219 -61
  968. package/node_modules/@murphai/device-syncd/dist/service.js.map +1 -1
  969. package/node_modules/@murphai/device-syncd/dist/shared.js.map +1 -1
  970. package/node_modules/@murphai/device-syncd/dist/store/accounts.d.ts +6 -0
  971. package/node_modules/@murphai/device-syncd/dist/store/accounts.d.ts.map +1 -1
  972. package/node_modules/@murphai/device-syncd/dist/store/accounts.js +129 -40
  973. package/node_modules/@murphai/device-syncd/dist/store/accounts.js.map +1 -1
  974. package/node_modules/@murphai/device-syncd/dist/store/hosted-account-hydration.d.ts +2 -0
  975. package/node_modules/@murphai/device-syncd/dist/store/hosted-account-hydration.d.ts.map +1 -1
  976. package/node_modules/@murphai/device-syncd/dist/store/hosted-account-hydration.js +80 -6
  977. package/node_modules/@murphai/device-syncd/dist/store/hosted-account-hydration.js.map +1 -1
  978. package/node_modules/@murphai/device-syncd/dist/store/jobs.d.ts +15 -0
  979. package/node_modules/@murphai/device-syncd/dist/store/jobs.d.ts.map +1 -1
  980. package/node_modules/@murphai/device-syncd/dist/store/jobs.js +119 -39
  981. package/node_modules/@murphai/device-syncd/dist/store/jobs.js.map +1 -1
  982. package/node_modules/@murphai/device-syncd/dist/store/oauth-states.d.ts.map +1 -1
  983. package/node_modules/@murphai/device-syncd/dist/store/oauth-states.js +14 -8
  984. package/node_modules/@murphai/device-syncd/dist/store/oauth-states.js.map +1 -1
  985. package/node_modules/@murphai/device-syncd/dist/store/schema.d.ts +1 -1
  986. package/node_modules/@murphai/device-syncd/dist/store/schema.d.ts.map +1 -1
  987. package/node_modules/@murphai/device-syncd/dist/store/schema.js +22 -4
  988. package/node_modules/@murphai/device-syncd/dist/store/schema.js.map +1 -1
  989. package/node_modules/@murphai/device-syncd/dist/store/sync-state.d.ts +9 -1
  990. package/node_modules/@murphai/device-syncd/dist/store/sync-state.d.ts.map +1 -1
  991. package/node_modules/@murphai/device-syncd/dist/store/sync-state.js +57 -52
  992. package/node_modules/@murphai/device-syncd/dist/store/sync-state.js.map +1 -1
  993. package/node_modules/@murphai/device-syncd/dist/store.d.ts +46 -2
  994. package/node_modules/@murphai/device-syncd/dist/store.d.ts.map +1 -1
  995. package/node_modules/@murphai/device-syncd/dist/store.js +103 -6
  996. package/node_modules/@murphai/device-syncd/dist/store.js.map +1 -1
  997. package/node_modules/@murphai/device-syncd/dist/types.d.ts +24 -1
  998. package/node_modules/@murphai/device-syncd/dist/types.d.ts.map +1 -1
  999. package/node_modules/@murphai/device-syncd/dist/types.js.map +1 -1
  1000. package/node_modules/@murphai/device-syncd/package.json +28 -0
  1001. package/node_modules/@murphai/exercise-library/content/seed/at-home-exercise-strength-addon-250.csv +251 -251
  1002. package/node_modules/@murphai/exercise-library/content/seed/at-home-exercise-stretch-addon-500.csv +359 -359
  1003. package/node_modules/@murphai/exercise-library/content/seed/at-home-exercise-stretch.csv +154 -154
  1004. package/node_modules/@murphai/exercise-library/dist/build.js.map +1 -1
  1005. package/node_modules/@murphai/exercise-library/dist/runtime.js.map +1 -1
  1006. package/node_modules/@murphai/exercise-library/dist/schema.d.ts.map +1 -1
  1007. package/node_modules/@murphai/exercise-library/generated/catalog.hash +1 -1
  1008. package/node_modules/@murphai/exercise-library/generated/exercise-details.json +12082 -764
  1009. package/node_modules/@murphai/exercise-library/generated/exercise-facets.json +1 -1
  1010. package/node_modules/@murphai/exercise-library/generated/exercise-index.json +1 -1
  1011. package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-11776448.md +60 -0
  1012. package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-18306161.md +60 -0
  1013. package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-19817517.md +60 -0
  1014. package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-19913903.md +60 -0
  1015. package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-19995444.md +62 -0
  1016. package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-20662037.md +60 -0
  1017. package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-24568233.md +62 -0
  1018. package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-26914684.md +60 -0
  1019. package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-27141153.md +62 -0
  1020. package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-28186867.md +62 -0
  1021. package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-36495670.md +62 -0
  1022. package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-37760145.md +62 -0
  1023. package/node_modules/@murphai/health-commons/dist/build.js.map +1 -1
  1024. package/node_modules/@murphai/health-commons/dist/catalog.d.ts +4 -4
  1025. package/node_modules/@murphai/health-commons/dist/hash-artifact.js.map +1 -1
  1026. package/node_modules/@murphai/health-commons/dist/runtime.d.ts +3 -7
  1027. package/node_modules/@murphai/health-commons/dist/runtime.d.ts.map +1 -1
  1028. package/node_modules/@murphai/health-commons/dist/runtime.js +59 -47
  1029. package/node_modules/@murphai/health-commons/dist/runtime.js.map +1 -1
  1030. package/node_modules/@murphai/health-commons/dist/sync-cloudflare-r2.js.map +1 -1
  1031. package/node_modules/@murphai/health-commons/generated/catalog.hash +1 -1
  1032. package/node_modules/@murphai/health-commons/generated/protocol-family-graph.json +1 -1
  1033. package/node_modules/@murphai/health-commons/generated/protocol-index.json +1 -1
  1034. package/node_modules/@murphai/health-commons/generated/protocol-run-specs.json +1 -1
  1035. package/node_modules/@murphai/health-commons/generated/source-artifact-index.json +1 -1
  1036. package/node_modules/@murphai/health-commons/generated/source-identities.ndjson +54 -0
  1037. package/node_modules/@murphai/health-commons/generated/source-index.json +727 -1
  1038. package/node_modules/@murphai/health-commons/generated/web/browse/biomarkers.json +1 -1
  1039. package/node_modules/@murphai/health-commons/generated/web/browse/experiments.json +1 -1
  1040. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/added-sugar-intake.json +1 -1
  1041. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/adherence.json +1 -1
  1042. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/adverse-symptoms.json +1 -1
  1043. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/alanine-aminotransferase.json +1 -1
  1044. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/alcohol-craving.json +1 -1
  1045. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/alcohol-free-days.json +1 -1
  1046. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/alcohol-intake.json +1 -1
  1047. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/alcohol-withdrawal-symptoms.json +1 -1
  1048. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ankle-knee-to-wall-distance.json +1 -1
  1049. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/apolipoprotein-b.json +1 -1
  1050. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/aspartate-aminotransferase.json +1 -1
  1051. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/bilirubin.json +1 -1
  1052. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/blood-glucose.json +1 -1
  1053. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/blood-ketones-beta-hydroxybutyrate.json +1 -1
  1054. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/blood-oxygen-spo2.json +1 -1
  1055. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/blood-pressure.json +1 -1
  1056. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/blood-urea-nitrogen.json +1 -1
  1057. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/body-fat-percent.json +1 -1
  1058. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/body-weight.json +1 -1
  1059. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/chosen-primary-outcome-score.json +1 -1
  1060. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/continuous-glucose.json +1 -1
  1061. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/creatine-kinase.json +1 -1
  1062. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/daily-energy-intake-kcal.json +1 -1
  1063. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/daily-protein-g-per-kg.json +1 -1
  1064. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/daily-protein-grams.json +1 -1
  1065. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/daily-step-count.json +1 -1
  1066. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/daytime-sleepiness.json +1 -1
  1067. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/deep-sleep-minutes.json +1 -1
  1068. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/dietary-fiber-g-day.json +1 -1
  1069. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/digestive-comfort.json +1 -1
  1070. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/egfr.json +1 -1
  1071. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/estimated-gfr.json +1 -1
  1072. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/estimated-vo2max.json +1 -1
  1073. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/fasting-triglycerides.json +1 -1
  1074. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/gi-symptom-score.json +1 -1
  1075. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/gi-tolerance.json +1 -1
  1076. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/hbot-session-tolerability.json +1 -1
  1077. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/hdl-c.json +1 -1
  1078. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/hrv-rmssd.json +1 -1
  1079. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/lateral-knee-pain.json +1 -1
  1080. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ldl-c.json +1 -1
  1081. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ldl-cholesterol.json +1 -1
  1082. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/lean-body-mass.json +1 -1
  1083. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/lean-mass.json +1 -1
  1084. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/leg-heaviness-score.json +1 -1
  1085. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/liver-enzyme-panel.json +1 -1
  1086. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/macular-health-safety.json +1 -1
  1087. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/moderate-to-vigorous-activity-minutes.json +1 -1
  1088. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/mood-affect.json +1 -1
  1089. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/morning-blood-pressure.json +1 -1
  1090. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/muscle-soreness-score.json +1 -1
  1091. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/musculoskeletal-pain.json +1 -1
  1092. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/non-hdl-c.json +1 -1
  1093. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/non-hdl-cholesterol.json +1 -1
  1094. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/omega-3-index.json +1 -1
  1095. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/perceived-recovery-score.json +1 -1
  1096. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/perceived-recovery.json +1 -1
  1097. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/perceived-stiffness.json +1 -1
  1098. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/perceived-stress.json +1 -1
  1099. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/periocular-wrinkle-score.json +1 -1
  1100. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/postprandial-glucose-excursion.json +1 -1
  1101. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/pre-sleep-arousal.json +1 -1
  1102. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/rem-sleep-minutes.json +1 -1
  1103. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/resting-heart-rate.json +1 -1
  1104. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/running-tolerance.json +1 -1
  1105. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/saturated-fat-g-day.json +1 -1
  1106. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/sedentary-time.json +1 -1
  1107. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/self-reported-mood.json +1 -1
  1108. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/serum-25-hydroxyvitamin-d.json +1 -1
  1109. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/serum-creatinine.json +1 -1
  1110. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/serum-uric-acid.json +1 -1
  1111. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/shoulder-reach-distance.json +1 -1
  1112. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/sit-and-reach-distance.json +1 -1
  1113. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/skin-texture-roughness-score.json +1 -1
  1114. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/skin-tolerability-symptoms.json +1 -1
  1115. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/sleep-efficiency.json +1 -1
  1116. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/sleep-onset-latency.json +1 -1
  1117. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/sleep-quality.json +1 -1
  1118. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/standardized-skin-photo-score.json +1 -1
  1119. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/step-floor-days.json +1 -1
  1120. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/stretching-adherence-sessions.json +1 -1
  1121. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/stretching-session-burden.json +1 -1
  1122. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/stretching-symptoms.json +1 -1
  1123. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/subjective-eye-strain.json +1 -1
  1124. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/subjective-satiety.json +1 -1
  1125. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/supplement-adherence.json +1 -1
  1126. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/task-performance.json +1 -1
  1127. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/toe-touch-distance.json +1 -1
  1128. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/total-cholesterol.json +1 -1
  1129. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/total-sleep-time.json +1 -1
  1130. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/training-performance.json +1 -1
  1131. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/training-volume.json +1 -1
  1132. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/triglycerides.json +1 -1
  1133. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/urine-albumin-creatinine-ratio.json +1 -1
  1134. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/visual-fatigue.json +1 -1
  1135. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/visual-performance.json +1 -1
  1136. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/waist-circumference.json +1 -1
  1137. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/wake-time-variability.json +1 -1
  1138. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/walking-bout-minutes.json +1 -1
  1139. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/walking-cadence.json +1 -1
  1140. package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/walking-safety-events.json +1 -1
  1141. package/node_modules/@murphai/health-commons/generated/web/bundles/measurement_method/clinic-imaging-upgrade.json +1 -1
  1142. package/node_modules/@murphai/health-commons/generated/web/bundles/measurement_method/home-standardized-photo-roi-analysis.json +1 -1
  1143. package/node_modules/@murphai/health-commons/generated/web/bundles/measurement_method/standardized-photo-score-workflow.json +1 -1
  1144. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/at-home-static-stretching-for-flexibility.json +1 -1
  1145. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/bryan-johnson-blueprint.json +1 -1
  1146. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/caffeine-curfew-dose-reset.json +1 -1
  1147. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/cold-plunge.json +1 -1
  1148. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/consistent-wake-time.json +1 -1
  1149. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/creatine-monohydrate.json +1 -1
  1150. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/daily-step-floor.json +1 -1
  1151. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/daily-vitamin-d3-supplementation.json +1 -1
  1152. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/digital-sunset.json +1 -1
  1153. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/finnish-sauna.json +1 -1
  1154. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/hydrolyzed-collagen-peptides.json +1 -1
  1155. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/hyperbaric-oxygen-therapy.json +1 -1
  1156. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/it-band-syndrome-rehab-and-return-to-run.json +1 -1
  1157. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/morning-outdoor-light-exposure.json +1 -1
  1158. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/no-added-sugar-diet.json +1 -1
  1159. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/norwegian-4x4.json +1 -1
  1160. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/oral-epa-dha-supplementation.json +1 -1
  1161. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/pneumatic-compression-pants.json +1 -1
  1162. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/pre-sleep-resonance-breathing-and-meditation.json +1 -1
  1163. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/pre-sleep-silent-meditation.json +1 -1
  1164. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/prolonged-fasting-24-72-hours.json +1 -1
  1165. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/protein-floor-high-protein-intake.json +1 -1
  1166. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/psyllium-husk-for-cholesterol.json +1 -1
  1167. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/red-light-glasses-before-bed.json +1 -1
  1168. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/red-near-infrared-skin-texture-photoaging.json +1 -1
  1169. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/red-yeast-rice-for-cholesterol.json +1 -1
  1170. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/short-term-alcohol-abstinence.json +1 -1
  1171. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/social-media-fast.json +1 -1
  1172. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/tabata-20-10-interval-training.json +1 -1
  1173. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/time-restricted-eating-18-6.json +1 -1
  1174. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/walking-after-every-meal.json +1 -1
  1175. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/whole-body-red-and-near-infrared-light-exposure.json +1 -1
  1176. package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/zone-2-aerobic-base-block.json +1 -1
  1177. package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/blood-oxygen-spo2/overview.json +1 -1
  1178. package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/blood-oxygen-spo2/research.json +1 -1
  1179. package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/deep-sleep-minutes/overview.json +1 -1
  1180. package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/deep-sleep-minutes/research.json +1 -1
  1181. package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/estimated-vo2max/overview.json +1 -1
  1182. package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/estimated-vo2max/research.json +1 -1
  1183. package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/hrv-rmssd/overview.json +1 -1
  1184. package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/hrv-rmssd/research.json +1 -1
  1185. package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/rem-sleep-minutes/overview.json +1 -1
  1186. package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/rem-sleep-minutes/research.json +1 -1
  1187. package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/resting-heart-rate/overview.json +1 -1
  1188. package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/resting-heart-rate/research.json +1 -1
  1189. package/node_modules/@murphai/health-commons/generated/web/routes/index.json +1 -1
  1190. package/node_modules/@murphai/health-commons/generated/web/shell/biomarkers/blood-oxygen-spo2.json +1 -1
  1191. package/node_modules/@murphai/health-commons/generated/web/shell/biomarkers/deep-sleep-minutes.json +1 -1
  1192. package/node_modules/@murphai/health-commons/generated/web/shell/biomarkers/estimated-vo2max.json +1 -1
  1193. package/node_modules/@murphai/health-commons/generated/web/shell/biomarkers/hrv-rmssd.json +1 -1
  1194. package/node_modules/@murphai/health-commons/generated/web/shell/biomarkers/rem-sleep-minutes.json +1 -1
  1195. package/node_modules/@murphai/health-commons/generated/web/shell/biomarkers/resting-heart-rate.json +1 -1
  1196. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/at-home-static-stretching-for-flexibility.json +1 -1
  1197. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/bryan-johnson-blueprint.json +1 -1
  1198. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/caffeine-curfew-dose-reset.json +1 -1
  1199. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/cold-plunge.json +1 -1
  1200. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/consistent-wake-time.json +1 -1
  1201. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/daily-step-floor.json +1 -1
  1202. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/digital-sunset.json +1 -1
  1203. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/finnish-sauna.json +1 -1
  1204. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/hyperbaric-oxygen-therapy.json +1 -1
  1205. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/morning-outdoor-light-exposure.json +1 -1
  1206. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/no-added-sugar-diet.json +1 -1
  1207. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/norwegian-4x4.json +1 -1
  1208. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/pneumatic-compression-pants.json +1 -1
  1209. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/pre-sleep-resonance-breathing-and-meditation.json +1 -1
  1210. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/pre-sleep-silent-meditation.json +1 -1
  1211. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/prolonged-fasting-24-72-hours.json +1 -1
  1212. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/protein-floor-high-protein-intake.json +1 -1
  1213. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/red-light-glasses-before-bed.json +1 -1
  1214. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/red-near-infrared-skin-texture-photoaging.json +1 -1
  1215. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/short-term-alcohol-abstinence.json +1 -1
  1216. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/tabata-20-10-interval-training.json +1 -1
  1217. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/time-restricted-eating-18-6.json +1 -1
  1218. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/walking-after-every-meal.json +1 -1
  1219. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/whole-body-red-and-near-infrared-light-exposure.json +1 -1
  1220. package/node_modules/@murphai/health-commons/generated/web/shell/experiments/zone-2-aerobic-base-block.json +1 -1
  1221. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/at-home-static-stretching-for-flexibility/protocol.json +1 -1
  1222. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/at-home-static-stretching-for-flexibility/research.json +1 -1
  1223. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/at-home-static-stretching-for-flexibility/results-public.json +2 -2
  1224. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/bryan-johnson-blueprint/protocol.json +1 -1
  1225. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/bryan-johnson-blueprint/research.json +1 -1
  1226. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/bryan-johnson-blueprint/results-public.json +2 -2
  1227. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/caffeine-curfew-dose-reset/protocol.json +1 -1
  1228. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/caffeine-curfew-dose-reset/research.json +1 -1
  1229. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/caffeine-curfew-dose-reset/results-public.json +2 -2
  1230. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/cold-plunge/protocol.json +1 -1
  1231. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/cold-plunge/research.json +1 -1
  1232. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/cold-plunge/results-public.json +2 -2
  1233. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/consistent-wake-time/protocol.json +1 -1
  1234. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/consistent-wake-time/research.json +1 -1
  1235. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/consistent-wake-time/results-public.json +2 -2
  1236. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/daily-step-floor/protocol.json +1 -1
  1237. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/daily-step-floor/research.json +1 -1
  1238. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/daily-step-floor/results-public.json +2 -2
  1239. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/digital-sunset/protocol.json +1 -1
  1240. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/digital-sunset/research.json +1 -1
  1241. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/digital-sunset/results-public.json +2 -2
  1242. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/finnish-sauna/protocol.json +1 -1
  1243. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/finnish-sauna/research.json +1 -1
  1244. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/finnish-sauna/results-public.json +2 -2
  1245. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/hyperbaric-oxygen-therapy/protocol.json +1 -1
  1246. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/hyperbaric-oxygen-therapy/research.json +1 -1
  1247. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/hyperbaric-oxygen-therapy/results-public.json +2 -2
  1248. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/morning-outdoor-light-exposure/protocol.json +1 -1
  1249. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/morning-outdoor-light-exposure/research.json +1 -1
  1250. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/morning-outdoor-light-exposure/results-public.json +2 -2
  1251. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/no-added-sugar-diet/protocol.json +1 -1
  1252. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/no-added-sugar-diet/research.json +1 -1
  1253. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/no-added-sugar-diet/results-public.json +2 -2
  1254. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/norwegian-4x4/protocol.json +1 -1
  1255. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/norwegian-4x4/research.json +1 -1
  1256. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/norwegian-4x4/results-public.json +2 -2
  1257. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pneumatic-compression-pants/protocol.json +1 -1
  1258. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pneumatic-compression-pants/research.json +1 -1
  1259. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pneumatic-compression-pants/results-public.json +2 -2
  1260. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pre-sleep-resonance-breathing-and-meditation/protocol.json +1 -1
  1261. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pre-sleep-resonance-breathing-and-meditation/research.json +1 -1
  1262. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pre-sleep-resonance-breathing-and-meditation/results-public.json +2 -2
  1263. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pre-sleep-silent-meditation/protocol.json +1 -1
  1264. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pre-sleep-silent-meditation/research.json +1 -1
  1265. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pre-sleep-silent-meditation/results-public.json +2 -2
  1266. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/prolonged-fasting-24-72-hours/protocol.json +1 -1
  1267. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/prolonged-fasting-24-72-hours/research.json +1 -1
  1268. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/prolonged-fasting-24-72-hours/results-public.json +2 -2
  1269. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/protein-floor-high-protein-intake/protocol.json +1 -1
  1270. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/protein-floor-high-protein-intake/research.json +1 -1
  1271. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/protein-floor-high-protein-intake/results-public.json +2 -2
  1272. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/red-light-glasses-before-bed/protocol.json +1 -1
  1273. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/red-light-glasses-before-bed/research.json +1 -1
  1274. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/red-light-glasses-before-bed/results-public.json +2 -2
  1275. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/red-near-infrared-skin-texture-photoaging/protocol.json +1 -1
  1276. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/red-near-infrared-skin-texture-photoaging/research.json +1 -1
  1277. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/red-near-infrared-skin-texture-photoaging/results-public.json +2 -2
  1278. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/short-term-alcohol-abstinence/protocol.json +1 -1
  1279. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/short-term-alcohol-abstinence/research.json +1 -1
  1280. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/short-term-alcohol-abstinence/results-public.json +2 -2
  1281. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/tabata-20-10-interval-training/protocol.json +1 -1
  1282. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/tabata-20-10-interval-training/research.json +1 -1
  1283. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/tabata-20-10-interval-training/results-public.json +2 -2
  1284. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/time-restricted-eating-18-6/protocol.json +1 -1
  1285. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/time-restricted-eating-18-6/research.json +1 -1
  1286. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/time-restricted-eating-18-6/results-public.json +2 -2
  1287. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/walking-after-every-meal/protocol.json +1 -1
  1288. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/walking-after-every-meal/research.json +1 -1
  1289. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/walking-after-every-meal/results-public.json +2 -2
  1290. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/whole-body-red-and-near-infrared-light-exposure/protocol.json +1 -1
  1291. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/whole-body-red-and-near-infrared-light-exposure/research.json +1 -1
  1292. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/whole-body-red-and-near-infrared-light-exposure/results-public.json +2 -2
  1293. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/zone-2-aerobic-base-block/protocol.json +1 -1
  1294. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/zone-2-aerobic-base-block/research.json +1 -1
  1295. package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/zone-2-aerobic-base-block/results-public.json +2 -2
  1296. package/node_modules/@murphai/health-metrics/README.md +4 -0
  1297. package/node_modules/@murphai/health-metrics/dist/catalog.js.map +1 -1
  1298. package/node_modules/@murphai/health-metrics/dist/definitions/activity.d.ts +15 -1
  1299. package/node_modules/@murphai/health-metrics/dist/definitions/activity.d.ts.map +1 -1
  1300. package/node_modules/@murphai/health-metrics/dist/definitions/activity.js +99 -0
  1301. package/node_modules/@murphai/health-metrics/dist/definitions/activity.js.map +1 -1
  1302. package/node_modules/@murphai/health-metrics/dist/definitions/labs.d.ts +1 -1
  1303. package/node_modules/@murphai/health-metrics/dist/definitions/recovery.d.ts +1 -1
  1304. package/node_modules/@murphai/health-metrics/dist/definitions/recovery.d.ts.map +1 -1
  1305. package/node_modules/@murphai/health-metrics/dist/definitions/recovery.js +12 -0
  1306. package/node_modules/@murphai/health-metrics/dist/definitions/recovery.js.map +1 -1
  1307. package/node_modules/@murphai/health-metrics/dist/definitions/sleep.d.ts +1 -1
  1308. package/node_modules/@murphai/health-metrics/dist/format.js.map +1 -1
  1309. package/node_modules/@murphai/health-metrics/dist/goals.js.map +1 -1
  1310. package/node_modules/@murphai/health-metrics/dist/index.d.ts +0 -2
  1311. package/node_modules/@murphai/health-metrics/dist/index.d.ts.map +1 -1
  1312. package/node_modules/@murphai/health-metrics/dist/index.js +0 -2
  1313. package/node_modules/@murphai/health-metrics/dist/index.js.map +1 -1
  1314. package/node_modules/@murphai/health-metrics/dist/murph-age-source-routes.d.ts.map +1 -1
  1315. package/node_modules/@murphai/health-metrics/dist/murph-age-source-routes.js.map +1 -1
  1316. package/node_modules/@murphai/health-metrics/dist/murph-age.d.ts.map +1 -1
  1317. package/node_modules/@murphai/health-metrics/dist/murph-age.js.map +1 -1
  1318. package/node_modules/@murphai/health-metrics/dist/normalize.js.map +1 -1
  1319. package/node_modules/@murphai/health-metrics/dist/selectors.js.map +1 -1
  1320. package/node_modules/@murphai/health-metrics/dist/wearable-metric-catalog.d.ts.map +1 -1
  1321. package/node_modules/@murphai/health-metrics/dist/wearable-metric-catalog.js.map +1 -1
  1322. package/node_modules/@murphai/health-metrics/dist/wearable-provider-catalog.d.ts.map +1 -1
  1323. package/node_modules/@murphai/health-metrics/dist/wearable-provider-catalog.js.map +1 -1
  1324. package/node_modules/@murphai/health-metrics/package.json +10 -0
  1325. package/node_modules/@murphai/importers/README.md +13 -0
  1326. package/node_modules/@murphai/importers/dist/assessment/import-assessment-response.js.map +1 -1
  1327. package/node_modules/@murphai/importers/dist/clinical-records/index.d.ts +19 -0
  1328. package/node_modules/@murphai/importers/dist/clinical-records/index.d.ts.map +1 -0
  1329. package/node_modules/@murphai/importers/dist/clinical-records/index.js +1523 -0
  1330. package/node_modules/@murphai/importers/dist/clinical-records/index.js.map +1 -0
  1331. package/node_modules/@murphai/importers/dist/core-port.d.ts +1 -0
  1332. package/node_modules/@murphai/importers/dist/core-port.d.ts.map +1 -1
  1333. package/node_modules/@murphai/importers/dist/core-port.js.map +1 -1
  1334. package/node_modules/@murphai/importers/dist/create-importers.d.ts.map +1 -1
  1335. package/node_modules/@murphai/importers/dist/create-importers.js.map +1 -1
  1336. package/node_modules/@murphai/importers/dist/csv-sample-import-planner.js.map +1 -1
  1337. package/node_modules/@murphai/importers/dist/csv-sample-importer.js.map +1 -1
  1338. package/node_modules/@murphai/importers/dist/device-providers/import-device-provider-snapshot.js.map +1 -1
  1339. package/node_modules/@murphai/importers/dist/device-providers/index.d.ts +1 -1
  1340. package/node_modules/@murphai/importers/dist/device-providers/index.d.ts.map +1 -1
  1341. package/node_modules/@murphai/importers/dist/device-providers/index.js +1 -1
  1342. package/node_modules/@murphai/importers/dist/device-providers/index.js.map +1 -1
  1343. package/node_modules/@murphai/importers/dist/device-providers/junction-origin.js.map +1 -1
  1344. package/node_modules/@murphai/importers/dist/device-providers/junction-resources.d.ts +3 -2
  1345. package/node_modules/@murphai/importers/dist/device-providers/junction-resources.d.ts.map +1 -1
  1346. package/node_modules/@murphai/importers/dist/device-providers/junction-resources.js +12 -20
  1347. package/node_modules/@murphai/importers/dist/device-providers/junction-resources.js.map +1 -1
  1348. package/node_modules/@murphai/importers/dist/device-providers/junction.d.ts +18 -0
  1349. package/node_modules/@murphai/importers/dist/device-providers/junction.d.ts.map +1 -1
  1350. package/node_modules/@murphai/importers/dist/device-providers/junction.js +1026 -123
  1351. package/node_modules/@murphai/importers/dist/device-providers/junction.js.map +1 -1
  1352. package/node_modules/@murphai/importers/dist/device-providers/provider-descriptors.d.ts +132 -132
  1353. package/node_modules/@murphai/importers/dist/device-providers/provider-descriptors.d.ts.map +1 -1
  1354. package/node_modules/@murphai/importers/dist/device-providers/provider-descriptors.js.map +1 -1
  1355. package/node_modules/@murphai/importers/dist/device-providers/registry.js.map +1 -1
  1356. package/node_modules/@murphai/importers/dist/device-providers/whoop.js.map +1 -1
  1357. package/node_modules/@murphai/importers/dist/document-importer.js.map +1 -1
  1358. package/node_modules/@murphai/importers/dist/meal-importer.js.map +1 -1
  1359. package/node_modules/@murphai/importers/dist/preset-registry.js.map +1 -1
  1360. package/node_modules/@murphai/importers/package.json +5 -0
  1361. package/node_modules/@murphai/inbox-services/dist/inbox-app/bootstrap-doctor.js.map +1 -1
  1362. package/node_modules/@murphai/inbox-services/dist/inbox-app/environment.js.map +1 -1
  1363. package/node_modules/@murphai/inbox-services/dist/inbox-app/reads.js +1 -1
  1364. package/node_modules/@murphai/inbox-services/dist/inbox-app/reads.js.map +1 -1
  1365. package/node_modules/@murphai/inbox-services/dist/inbox-app/service.d.ts.map +1 -1
  1366. package/node_modules/@murphai/inbox-services/dist/inbox-app/service.js +2 -0
  1367. package/node_modules/@murphai/inbox-services/dist/inbox-app/service.js.map +1 -1
  1368. package/node_modules/@murphai/inbox-services/dist/inbox-app/storage-repair.d.ts +3 -0
  1369. package/node_modules/@murphai/inbox-services/dist/inbox-app/storage-repair.d.ts.map +1 -0
  1370. package/node_modules/@murphai/inbox-services/dist/inbox-app/storage-repair.js +37 -0
  1371. package/node_modules/@murphai/inbox-services/dist/inbox-app/storage-repair.js.map +1 -0
  1372. package/node_modules/@murphai/inbox-services/dist/inbox-app/types.d.ts +22 -2
  1373. package/node_modules/@murphai/inbox-services/dist/inbox-app/types.d.ts.map +1 -1
  1374. package/node_modules/@murphai/inbox-services/dist/inbox-services/connectors.js.map +1 -1
  1375. package/node_modules/@murphai/inbox-services/dist/inbox-services/daemon.js.map +1 -1
  1376. package/node_modules/@murphai/inbox-services/dist/inbox-services/parser.d.ts +1 -1
  1377. package/node_modules/@murphai/inbox-services/dist/inbox-services/parser.js +2 -2
  1378. package/node_modules/@murphai/inbox-services/dist/inbox-services/parser.js.map +1 -1
  1379. package/node_modules/@murphai/inbox-services/dist/inbox-services/promotions.d.ts +2 -2
  1380. package/node_modules/@murphai/inbox-services/dist/inbox-services/promotions.d.ts.map +1 -1
  1381. package/node_modules/@murphai/inbox-services/dist/inbox-services/promotions.js.map +1 -1
  1382. package/node_modules/@murphai/inbox-services/dist/inbox-services/query.d.ts +27 -27
  1383. package/node_modules/@murphai/inbox-services/dist/inbox-services/query.d.ts.map +1 -1
  1384. package/node_modules/@murphai/inbox-services/dist/inbox-services/query.js +2 -2
  1385. package/node_modules/@murphai/inbox-services/dist/inbox-services/query.js.map +1 -1
  1386. package/node_modules/@murphai/inbox-services/dist/inbox-services/state.js.map +1 -1
  1387. package/node_modules/@murphai/inboxd/README.md +3 -2
  1388. package/node_modules/@murphai/inboxd/dist/checkpoint.d.ts +2 -0
  1389. package/node_modules/@murphai/inboxd/dist/checkpoint.d.ts.map +1 -0
  1390. package/node_modules/@murphai/inboxd/dist/checkpoint.js +2 -0
  1391. package/node_modules/@murphai/inboxd/dist/checkpoint.js.map +1 -0
  1392. package/node_modules/@murphai/inboxd/dist/connectors/email/directness.d.ts +11 -0
  1393. package/node_modules/@murphai/inboxd/dist/connectors/email/directness.d.ts.map +1 -0
  1394. package/node_modules/@murphai/inboxd/dist/connectors/email/directness.js +67 -0
  1395. package/node_modules/@murphai/inboxd/dist/connectors/email/directness.js.map +1 -0
  1396. package/node_modules/@murphai/inboxd/dist/connectors/email/normalize-parsed.d.ts +3 -1
  1397. package/node_modules/@murphai/inboxd/dist/connectors/email/normalize-parsed.d.ts.map +1 -1
  1398. package/node_modules/@murphai/inboxd/dist/connectors/email/normalize-parsed.js +18 -9
  1399. package/node_modules/@murphai/inboxd/dist/connectors/email/normalize-parsed.js.map +1 -1
  1400. package/node_modules/@murphai/inboxd/dist/connectors/email/normalize.d.ts +1 -10
  1401. package/node_modules/@murphai/inboxd/dist/connectors/email/normalize.d.ts.map +1 -1
  1402. package/node_modules/@murphai/inboxd/dist/connectors/email/normalize.js +2 -65
  1403. package/node_modules/@murphai/inboxd/dist/connectors/email/normalize.js.map +1 -1
  1404. package/node_modules/@murphai/inboxd/dist/connectors/hosted-conversation.d.ts +0 -15
  1405. package/node_modules/@murphai/inboxd/dist/connectors/hosted-conversation.d.ts.map +1 -1
  1406. package/node_modules/@murphai/inboxd/dist/connectors/hosted-conversation.js +0 -33
  1407. package/node_modules/@murphai/inboxd/dist/connectors/hosted-conversation.js.map +1 -1
  1408. package/node_modules/@murphai/inboxd/dist/connectors/telegram/connector.d.ts.map +1 -1
  1409. package/node_modules/@murphai/inboxd/dist/contracts/capture.d.ts +1 -2
  1410. package/node_modules/@murphai/inboxd/dist/contracts/capture.d.ts.map +1 -1
  1411. package/node_modules/@murphai/inboxd/dist/contracts/search.d.ts +2 -2
  1412. package/node_modules/@murphai/inboxd/dist/contracts/search.d.ts.map +1 -1
  1413. package/node_modules/@murphai/inboxd/dist/index.d.ts +1 -0
  1414. package/node_modules/@murphai/inboxd/dist/index.d.ts.map +1 -1
  1415. package/node_modules/@murphai/inboxd/dist/index.js +1 -0
  1416. package/node_modules/@murphai/inboxd/dist/index.js.map +1 -1
  1417. package/node_modules/@murphai/inboxd/dist/indexing/envelope-migration.d.ts +21 -0
  1418. package/node_modules/@murphai/inboxd/dist/indexing/envelope-migration.d.ts.map +1 -0
  1419. package/node_modules/@murphai/inboxd/dist/indexing/envelope-migration.js +259 -0
  1420. package/node_modules/@murphai/inboxd/dist/indexing/envelope-migration.js.map +1 -0
  1421. package/node_modules/@murphai/inboxd/dist/indexing/parser-derivatives.d.ts +1 -1
  1422. package/node_modules/@murphai/inboxd/dist/indexing/parser-derivatives.d.ts.map +1 -1
  1423. package/node_modules/@murphai/inboxd/dist/indexing/parser-derivatives.js +7 -4
  1424. package/node_modules/@murphai/inboxd/dist/indexing/parser-derivatives.js.map +1 -1
  1425. package/node_modules/@murphai/inboxd/dist/indexing/persist/canonical-records.d.ts +13 -1
  1426. package/node_modules/@murphai/inboxd/dist/indexing/persist/canonical-records.d.ts.map +1 -1
  1427. package/node_modules/@murphai/inboxd/dist/indexing/persist/canonical-records.js +68 -13
  1428. package/node_modules/@murphai/inboxd/dist/indexing/persist/canonical-records.js.map +1 -1
  1429. package/node_modules/@murphai/inboxd/dist/indexing/persist.d.ts +12 -6
  1430. package/node_modules/@murphai/inboxd/dist/indexing/persist.d.ts.map +1 -1
  1431. package/node_modules/@murphai/inboxd/dist/indexing/persist.js +226 -73
  1432. package/node_modules/@murphai/inboxd/dist/indexing/persist.js.map +1 -1
  1433. package/node_modules/@murphai/inboxd/dist/indexing/retention.js.map +1 -1
  1434. package/node_modules/@murphai/inboxd/dist/kernel/pipeline.js +4 -4
  1435. package/node_modules/@murphai/inboxd/dist/kernel/pipeline.js.map +1 -1
  1436. package/node_modules/@murphai/inboxd/dist/kernel/registry.js.map +1 -1
  1437. package/node_modules/@murphai/inboxd/dist/kernel/sqlite/rows.d.ts +2 -2
  1438. package/node_modules/@murphai/inboxd/dist/kernel/sqlite/rows.d.ts.map +1 -1
  1439. package/node_modules/@murphai/inboxd/dist/kernel/sqlite/rows.js +3 -3
  1440. package/node_modules/@murphai/inboxd/dist/kernel/sqlite/rows.js.map +1 -1
  1441. package/node_modules/@murphai/inboxd/dist/kernel/sqlite.d.ts.map +1 -1
  1442. package/node_modules/@murphai/inboxd/dist/kernel/sqlite.js +42 -12
  1443. package/node_modules/@murphai/inboxd/dist/kernel/sqlite.js.map +1 -1
  1444. package/node_modules/@murphai/inboxd/dist/retention.d.ts +2 -0
  1445. package/node_modules/@murphai/inboxd/dist/retention.d.ts.map +1 -0
  1446. package/node_modules/@murphai/inboxd/dist/retention.js +2 -0
  1447. package/node_modules/@murphai/inboxd/dist/retention.js.map +1 -0
  1448. package/node_modules/@murphai/inboxd/dist/runtime.d.ts +2 -1
  1449. package/node_modules/@murphai/inboxd/dist/runtime.d.ts.map +1 -1
  1450. package/node_modules/@murphai/inboxd/dist/runtime.js +1 -0
  1451. package/node_modules/@murphai/inboxd/dist/runtime.js.map +1 -1
  1452. package/node_modules/@murphai/inboxd/package.json +12 -0
  1453. package/node_modules/@murphai/messaging-ingress/README.md +1 -5
  1454. package/node_modules/@murphai/messaging-ingress/dist/internal.d.ts.map +1 -1
  1455. package/node_modules/@murphai/messaging-ingress/dist/internal.js +4 -0
  1456. package/node_modules/@murphai/messaging-ingress/dist/internal.js.map +1 -1
  1457. package/node_modules/@murphai/messaging-ingress/dist/linq-webhook.d.ts.map +1 -1
  1458. package/node_modules/@murphai/messaging-ingress/dist/linq-webhook.js.map +1 -1
  1459. package/node_modules/@murphai/messaging-ingress/package.json +0 -4
  1460. package/node_modules/@murphai/operator-config/dist/agentmail-runtime.js.map +1 -1
  1461. package/node_modules/@murphai/operator-config/dist/assistant/codex-resume-state.d.ts +2 -0
  1462. package/node_modules/@murphai/operator-config/dist/assistant/codex-resume-state.d.ts.map +1 -1
  1463. package/node_modules/@murphai/operator-config/dist/assistant/codex-resume-state.js +5 -0
  1464. package/node_modules/@murphai/operator-config/dist/assistant/codex-resume-state.js.map +1 -1
  1465. package/node_modules/@murphai/operator-config/dist/assistant/current-delivery-route.d.ts +5 -0
  1466. package/node_modules/@murphai/operator-config/dist/assistant/current-delivery-route.d.ts.map +1 -1
  1467. package/node_modules/@murphai/operator-config/dist/assistant/current-delivery-route.js +58 -0
  1468. package/node_modules/@murphai/operator-config/dist/assistant/current-delivery-route.js.map +1 -1
  1469. package/node_modules/@murphai/operator-config/dist/assistant/delivery-failure.d.ts +2 -2
  1470. package/node_modules/@murphai/operator-config/dist/assistant/delivery-failure.d.ts.map +1 -1
  1471. package/node_modules/@murphai/operator-config/dist/assistant/delivery-failure.js.map +1 -1
  1472. package/node_modules/@murphai/operator-config/dist/assistant/hosted-config.d.ts +5 -5
  1473. package/node_modules/@murphai/operator-config/dist/assistant/hosted-config.d.ts.map +1 -1
  1474. package/node_modules/@murphai/operator-config/dist/assistant/target-runtime.d.ts +32 -31
  1475. package/node_modules/@murphai/operator-config/dist/assistant/target-runtime.d.ts.map +1 -1
  1476. package/node_modules/@murphai/operator-config/dist/assistant/target-runtime.js +4 -2
  1477. package/node_modules/@murphai/operator-config/dist/assistant/target-runtime.js.map +1 -1
  1478. package/node_modules/@murphai/operator-config/dist/assistant-backend.d.ts +2 -2
  1479. package/node_modules/@murphai/operator-config/dist/assistant-cli-contracts.d.ts +488 -317
  1480. package/node_modules/@murphai/operator-config/dist/assistant-cli-contracts.d.ts.map +1 -1
  1481. package/node_modules/@murphai/operator-config/dist/assistant-cli-contracts.js +171 -22
  1482. package/node_modules/@murphai/operator-config/dist/assistant-cli-contracts.js.map +1 -1
  1483. package/node_modules/@murphai/operator-config/dist/device-cli-contracts.d.ts +32 -27
  1484. package/node_modules/@murphai/operator-config/dist/device-cli-contracts.d.ts.map +1 -1
  1485. package/node_modules/@murphai/operator-config/dist/device-cli-contracts.js +11 -1
  1486. package/node_modules/@murphai/operator-config/dist/device-cli-contracts.js.map +1 -1
  1487. package/node_modules/@murphai/operator-config/dist/device-daemon/paths.js.map +1 -1
  1488. package/node_modules/@murphai/operator-config/dist/device-daemon.js.map +1 -1
  1489. package/node_modules/@murphai/operator-config/dist/device-sync-browser-opener.js.map +1 -1
  1490. package/node_modules/@murphai/operator-config/dist/device-sync-client.d.ts +1 -1
  1491. package/node_modules/@murphai/operator-config/dist/device-sync-client.d.ts.map +1 -1
  1492. package/node_modules/@murphai/operator-config/dist/device-sync-client.js +6 -2
  1493. package/node_modules/@murphai/operator-config/dist/device-sync-client.js.map +1 -1
  1494. package/node_modules/@murphai/operator-config/dist/hosted-assistant-config-constants.d.ts +1 -1
  1495. package/node_modules/@murphai/operator-config/dist/hosted-assistant-config-constants.d.ts.map +1 -1
  1496. package/node_modules/@murphai/operator-config/dist/hosted-assistant-config.d.ts.map +1 -1
  1497. package/node_modules/@murphai/operator-config/dist/inbox-cli-contracts.d.ts +138 -93
  1498. package/node_modules/@murphai/operator-config/dist/inbox-cli-contracts.d.ts.map +1 -1
  1499. package/node_modules/@murphai/operator-config/dist/inbox-cli-contracts.js +40 -3
  1500. package/node_modules/@murphai/operator-config/dist/inbox-cli-contracts.js.map +1 -1
  1501. package/node_modules/@murphai/operator-config/dist/linq-runtime.d.ts +7 -11
  1502. package/node_modules/@murphai/operator-config/dist/linq-runtime.d.ts.map +1 -1
  1503. package/node_modules/@murphai/operator-config/dist/linq-runtime.js +25 -10
  1504. package/node_modules/@murphai/operator-config/dist/linq-runtime.js.map +1 -1
  1505. package/node_modules/@murphai/operator-config/dist/message-formatting.d.ts.map +1 -1
  1506. package/node_modules/@murphai/operator-config/dist/message-formatting.js +14 -3
  1507. package/node_modules/@murphai/operator-config/dist/message-formatting.js.map +1 -1
  1508. package/node_modules/@murphai/operator-config/dist/operator-config/self-delivery-targets.d.ts +4 -2
  1509. package/node_modules/@murphai/operator-config/dist/operator-config/self-delivery-targets.d.ts.map +1 -1
  1510. package/node_modules/@murphai/operator-config/dist/operator-config/storage.js.map +1 -1
  1511. package/node_modules/@murphai/operator-config/dist/operator-config.d.ts +7 -5
  1512. package/node_modules/@murphai/operator-config/dist/operator-config.d.ts.map +1 -1
  1513. package/node_modules/@murphai/operator-config/dist/operator-config.js.map +1 -1
  1514. package/node_modules/@murphai/operator-config/dist/setup-cli-contracts.d.ts +54 -54
  1515. package/node_modules/@murphai/operator-config/dist/setup-cli-contracts.d.ts.map +1 -1
  1516. package/node_modules/@murphai/operator-config/dist/setup-runtime-env.js.map +1 -1
  1517. package/node_modules/@murphai/operator-config/dist/telegram-runtime.d.ts.map +1 -1
  1518. package/node_modules/@murphai/operator-config/dist/telegram-runtime.js +11 -1
  1519. package/node_modules/@murphai/operator-config/dist/telegram-runtime.js.map +1 -1
  1520. package/node_modules/@murphai/operator-config/dist/vault-cli-contracts.d.ts +85 -85
  1521. package/node_modules/@murphai/operator-config/dist/vault-cli-contracts.js +1 -1
  1522. package/node_modules/@murphai/operator-config/dist/vault-cli-errors.d.ts.map +1 -1
  1523. package/node_modules/@murphai/operator-config/package.json +0 -5
  1524. package/node_modules/@murphai/parsers/README.md +4 -2
  1525. package/node_modules/@murphai/parsers/dist/adapters/ffmpeg.js.map +1 -1
  1526. package/node_modules/@murphai/parsers/dist/adapters/poppler-pdf.js.map +1 -1
  1527. package/node_modules/@murphai/parsers/dist/adapters/text-file.js.map +1 -1
  1528. package/node_modules/@murphai/parsers/dist/adapters/whisper-cpp.js.map +1 -1
  1529. package/node_modules/@murphai/parsers/dist/adapters/zxing-wasm.js.map +1 -1
  1530. package/node_modules/@murphai/parsers/dist/contracts/parser-output.d.ts +15 -0
  1531. package/node_modules/@murphai/parsers/dist/contracts/parser-output.d.ts.map +1 -0
  1532. package/node_modules/@murphai/parsers/dist/contracts/parser-output.js +368 -0
  1533. package/node_modules/@murphai/parsers/dist/contracts/parser-output.js.map +1 -0
  1534. package/node_modules/@murphai/parsers/dist/index.d.ts +5 -2
  1535. package/node_modules/@murphai/parsers/dist/index.d.ts.map +1 -1
  1536. package/node_modules/@murphai/parsers/dist/index.js +3 -1
  1537. package/node_modules/@murphai/parsers/dist/index.js.map +1 -1
  1538. package/node_modules/@murphai/parsers/dist/parser-result.d.ts +2 -0
  1539. package/node_modules/@murphai/parsers/dist/parser-result.d.ts.map +1 -0
  1540. package/node_modules/@murphai/parsers/dist/parser-result.js +2 -0
  1541. package/node_modules/@murphai/parsers/dist/parser-result.js.map +1 -0
  1542. package/node_modules/@murphai/parsers/dist/pipelines/parse-attachment.d.ts.map +1 -1
  1543. package/node_modules/@murphai/parsers/dist/pipelines/parse-attachment.js +2 -245
  1544. package/node_modules/@murphai/parsers/dist/pipelines/parse-attachment.js.map +1 -1
  1545. package/node_modules/@murphai/parsers/dist/pipelines/worker.d.ts +1 -1
  1546. package/node_modules/@murphai/parsers/dist/pipelines/worker.d.ts.map +1 -1
  1547. package/node_modules/@murphai/parsers/dist/pipelines/worker.js +12 -4
  1548. package/node_modules/@murphai/parsers/dist/pipelines/worker.js.map +1 -1
  1549. package/node_modules/@murphai/parsers/dist/publish/legacy-attempt-compactor.d.ts +18 -0
  1550. package/node_modules/@murphai/parsers/dist/publish/legacy-attempt-compactor.d.ts.map +1 -0
  1551. package/node_modules/@murphai/parsers/dist/publish/legacy-attempt-compactor.js +480 -0
  1552. package/node_modules/@murphai/parsers/dist/publish/legacy-attempt-compactor.js.map +1 -0
  1553. package/node_modules/@murphai/parsers/dist/publish/writer.d.ts +26 -8
  1554. package/node_modules/@murphai/parsers/dist/publish/writer.d.ts.map +1 -1
  1555. package/node_modules/@murphai/parsers/dist/publish/writer.js +168 -57
  1556. package/node_modules/@murphai/parsers/dist/publish/writer.js.map +1 -1
  1557. package/node_modules/@murphai/parsers/dist/registry/policy.js.map +1 -1
  1558. package/node_modules/@murphai/parsers/dist/registry/registry.js.map +1 -1
  1559. package/node_modules/@murphai/parsers/dist/shared.js.map +1 -1
  1560. package/node_modules/@murphai/parsers/dist/toolchain/discover.js.map +1 -1
  1561. package/node_modules/@murphai/parsers/package.json +4 -0
  1562. package/node_modules/@murphai/query/dist/automation.d.ts +3 -2
  1563. package/node_modules/@murphai/query/dist/automation.d.ts.map +1 -1
  1564. package/node_modules/@murphai/query/dist/automation.js +68 -5
  1565. package/node_modules/@murphai/query/dist/automation.js.map +1 -1
  1566. package/node_modules/@murphai/query/dist/biomarker-change-sentiment.d.ts +10 -0
  1567. package/node_modules/@murphai/query/dist/biomarker-change-sentiment.d.ts.map +1 -0
  1568. package/node_modules/@murphai/query/dist/biomarker-change-sentiment.js +24 -0
  1569. package/node_modules/@murphai/query/dist/biomarker-change-sentiment.js.map +1 -0
  1570. package/node_modules/@murphai/query/dist/browser-experiments.d.ts +4 -0
  1571. package/node_modules/@murphai/query/dist/browser-experiments.d.ts.map +1 -1
  1572. package/node_modules/@murphai/query/dist/browser-experiments.js +3 -0
  1573. package/node_modules/@murphai/query/dist/browser-experiments.js.map +1 -1
  1574. package/node_modules/@murphai/query/dist/browser-replica/biomarker-panel.js +3 -3
  1575. package/node_modules/@murphai/query/dist/browser-replica/biomarker-panel.js.map +1 -1
  1576. package/node_modules/@murphai/query/dist/browser-replica/build.d.ts.map +1 -1
  1577. package/node_modules/@murphai/query/dist/browser-replica/build.js +20 -0
  1578. package/node_modules/@murphai/query/dist/browser-replica/build.js.map +1 -1
  1579. package/node_modules/@murphai/query/dist/browser-replica/experiments.d.ts +8 -2
  1580. package/node_modules/@murphai/query/dist/browser-replica/experiments.d.ts.map +1 -1
  1581. package/node_modules/@murphai/query/dist/browser-replica/experiments.js +128 -26
  1582. package/node_modules/@murphai/query/dist/browser-replica/experiments.js.map +1 -1
  1583. package/node_modules/@murphai/query/dist/browser-replica/murph-age.d.ts +1 -1
  1584. package/node_modules/@murphai/query/dist/browser-replica/murph-age.d.ts.map +1 -1
  1585. package/node_modules/@murphai/query/dist/browser-replica/murph-age.js +2 -1
  1586. package/node_modules/@murphai/query/dist/browser-replica/murph-age.js.map +1 -1
  1587. package/node_modules/@murphai/query/dist/browser-replica/query.js.map +1 -1
  1588. package/node_modules/@murphai/query/dist/browser-replica/shared.d.ts +1 -1
  1589. package/node_modules/@murphai/query/dist/browser-replica/shared.d.ts.map +1 -1
  1590. package/node_modules/@murphai/query/dist/browser-replica/shared.js +1 -0
  1591. package/node_modules/@murphai/query/dist/browser-replica/shared.js.map +1 -1
  1592. package/node_modules/@murphai/query/dist/browser-replica/views.js +1 -0
  1593. package/node_modules/@murphai/query/dist/browser-replica/views.js.map +1 -1
  1594. package/node_modules/@murphai/query/dist/browser-replica.d.ts +1 -3
  1595. package/node_modules/@murphai/query/dist/browser-replica.d.ts.map +1 -1
  1596. package/node_modules/@murphai/query/dist/browser-replica.js +0 -1
  1597. package/node_modules/@murphai/query/dist/browser-replica.js.map +1 -1
  1598. package/node_modules/@murphai/query/dist/browser.d.ts +2 -2
  1599. package/node_modules/@murphai/query/dist/browser.d.ts.map +1 -1
  1600. package/node_modules/@murphai/query/dist/browser.js +1 -1
  1601. package/node_modules/@murphai/query/dist/browser.js.map +1 -1
  1602. package/node_modules/@murphai/query/dist/canonical-entities.d.ts.map +1 -1
  1603. package/node_modules/@murphai/query/dist/canonical-entities.js +1 -0
  1604. package/node_modules/@murphai/query/dist/canonical-entities.js.map +1 -1
  1605. package/node_modules/@murphai/query/dist/entity-families.d.ts +1 -1
  1606. package/node_modules/@murphai/query/dist/entity-families.d.ts.map +1 -1
  1607. package/node_modules/@murphai/query/dist/entity-families.js +1 -0
  1608. package/node_modules/@murphai/query/dist/entity-families.js.map +1 -1
  1609. package/node_modules/@murphai/query/dist/experiment-adherence.d.ts +55 -2
  1610. package/node_modules/@murphai/query/dist/experiment-adherence.d.ts.map +1 -1
  1611. package/node_modules/@murphai/query/dist/experiment-adherence.js +367 -13
  1612. package/node_modules/@murphai/query/dist/experiment-adherence.js.map +1 -1
  1613. package/node_modules/@murphai/query/dist/experiment-progress-card.d.ts +6 -1
  1614. package/node_modules/@murphai/query/dist/experiment-progress-card.d.ts.map +1 -1
  1615. package/node_modules/@murphai/query/dist/experiment-progress-card.js +48 -13
  1616. package/node_modules/@murphai/query/dist/experiment-progress-card.js.map +1 -1
  1617. package/node_modules/@murphai/query/dist/experiments.d.ts +11 -1
  1618. package/node_modules/@murphai/query/dist/experiments.d.ts.map +1 -1
  1619. package/node_modules/@murphai/query/dist/experiments.js +265 -36
  1620. package/node_modules/@murphai/query/dist/experiments.js.map +1 -1
  1621. package/node_modules/@murphai/query/dist/export-pack.js.map +1 -1
  1622. package/node_modules/@murphai/query/dist/group-weekly.d.ts +32 -0
  1623. package/node_modules/@murphai/query/dist/group-weekly.d.ts.map +1 -0
  1624. package/node_modules/@murphai/query/dist/group-weekly.js +166 -0
  1625. package/node_modules/@murphai/query/dist/group-weekly.js.map +1 -0
  1626. package/node_modules/@murphai/query/dist/health/assessments.js.map +1 -1
  1627. package/node_modules/@murphai/query/dist/health/blood-tests.js.map +1 -1
  1628. package/node_modules/@murphai/query/dist/health/canonical-collector.d.ts +1 -0
  1629. package/node_modules/@murphai/query/dist/health/canonical-collector.d.ts.map +1 -1
  1630. package/node_modules/@murphai/query/dist/health/canonical-collector.js +4 -1
  1631. package/node_modules/@murphai/query/dist/health/canonical-collector.js.map +1 -1
  1632. package/node_modules/@murphai/query/dist/health/foods.js.map +1 -1
  1633. package/node_modules/@murphai/query/dist/health/habitat.d.ts +6 -0
  1634. package/node_modules/@murphai/query/dist/health/habitat.d.ts.map +1 -0
  1635. package/node_modules/@murphai/query/dist/health/habitat.js +12 -0
  1636. package/node_modules/@murphai/query/dist/health/habitat.js.map +1 -0
  1637. package/node_modules/@murphai/query/dist/health/immunizations.js.map +1 -1
  1638. package/node_modules/@murphai/query/dist/health/index.d.ts +1 -0
  1639. package/node_modules/@murphai/query/dist/health/index.d.ts.map +1 -1
  1640. package/node_modules/@murphai/query/dist/health/index.js +1 -0
  1641. package/node_modules/@murphai/query/dist/health/index.js.map +1 -1
  1642. package/node_modules/@murphai/query/dist/health/projections.js.map +1 -1
  1643. package/node_modules/@murphai/query/dist/health/projectors/history.d.ts +1 -1
  1644. package/node_modules/@murphai/query/dist/health/providers.js.map +1 -1
  1645. package/node_modules/@murphai/query/dist/health/recipes.js.map +1 -1
  1646. package/node_modules/@murphai/query/dist/health/registries.d.ts +11 -0
  1647. package/node_modules/@murphai/query/dist/health/registries.d.ts.map +1 -1
  1648. package/node_modules/@murphai/query/dist/health/registries.js +18 -2
  1649. package/node_modules/@murphai/query/dist/health/registries.js.map +1 -1
  1650. package/node_modules/@murphai/query/dist/health/supplements.js.map +1 -1
  1651. package/node_modules/@murphai/query/dist/health/workout-formats.js.map +1 -1
  1652. package/node_modules/@murphai/query/dist/id-families.d.ts +1 -13
  1653. package/node_modules/@murphai/query/dist/id-families.d.ts.map +1 -1
  1654. package/node_modules/@murphai/query/dist/id-families.js +1 -119
  1655. package/node_modules/@murphai/query/dist/id-families.js.map +1 -1
  1656. package/node_modules/@murphai/query/dist/index.d.ts +10 -15
  1657. package/node_modules/@murphai/query/dist/index.d.ts.map +1 -1
  1658. package/node_modules/@murphai/query/dist/index.js +7 -31
  1659. package/node_modules/@murphai/query/dist/index.js.map +1 -1
  1660. package/node_modules/@murphai/query/dist/knowledge-format.js +1 -1
  1661. package/node_modules/@murphai/query/dist/knowledge-graph.js +4 -4
  1662. package/node_modules/@murphai/query/dist/knowledge-model.d.ts +1 -1
  1663. package/node_modules/@murphai/query/dist/knowledge-search.js +2 -2
  1664. package/node_modules/@murphai/query/dist/knowledge-search.js.map +1 -1
  1665. package/node_modules/@murphai/query/dist/meal-nutrition.js.map +1 -1
  1666. package/node_modules/@murphai/query/dist/memory.d.ts +3 -2
  1667. package/node_modules/@murphai/query/dist/memory.d.ts.map +1 -1
  1668. package/node_modules/@murphai/query/dist/memory.js +4 -1
  1669. package/node_modules/@murphai/query/dist/memory.js.map +1 -1
  1670. package/node_modules/@murphai/query/dist/metrics/index.js +23 -1
  1671. package/node_modules/@murphai/query/dist/metrics/index.js.map +1 -1
  1672. package/node_modules/@murphai/query/dist/metrics/projection.d.ts.map +1 -1
  1673. package/node_modules/@murphai/query/dist/metrics/projection.js +101 -7
  1674. package/node_modules/@murphai/query/dist/metrics/projection.js.map +1 -1
  1675. package/node_modules/@murphai/query/dist/murph-age.d.ts +1 -1
  1676. package/node_modules/@murphai/query/dist/murph-age.d.ts.map +1 -1
  1677. package/node_modules/@murphai/query/dist/murph-age.js +2 -1
  1678. package/node_modules/@murphai/query/dist/murph-age.js.map +1 -1
  1679. package/node_modules/@murphai/query/dist/overview-weekly-stats.js.map +1 -1
  1680. package/node_modules/@murphai/query/dist/overview.js.map +1 -1
  1681. package/node_modules/@murphai/query/dist/projection/entity-store.d.ts +2 -0
  1682. package/node_modules/@murphai/query/dist/projection/entity-store.d.ts.map +1 -1
  1683. package/node_modules/@murphai/query/dist/projection/entity-store.js +56 -0
  1684. package/node_modules/@murphai/query/dist/projection/entity-store.js.map +1 -1
  1685. package/node_modules/@murphai/query/dist/projection/rebuild.js.map +1 -1
  1686. package/node_modules/@murphai/query/dist/projection/schema.d.ts +1 -1
  1687. package/node_modules/@murphai/query/dist/projection/schema.js +2 -2
  1688. package/node_modules/@murphai/query/dist/projection/schema.js.map +1 -1
  1689. package/node_modules/@murphai/query/dist/projection/wearable-summary-compose.js +25 -2
  1690. package/node_modules/@murphai/query/dist/projection/wearable-summary-compose.js.map +1 -1
  1691. package/node_modules/@murphai/query/dist/projection/wearable-summary-projector.js +1 -0
  1692. package/node_modules/@murphai/query/dist/projection/wearable-summary-projector.js.map +1 -1
  1693. package/node_modules/@murphai/query/dist/projection/wearable-summary-store.d.ts.map +1 -1
  1694. package/node_modules/@murphai/query/dist/protocols.js.map +1 -1
  1695. package/node_modules/@murphai/query/dist/query-projection-types.d.ts +7 -0
  1696. package/node_modules/@murphai/query/dist/query-projection-types.d.ts.map +1 -1
  1697. package/node_modules/@murphai/query/dist/query-projection.d.ts +3 -2
  1698. package/node_modules/@murphai/query/dist/query-projection.d.ts.map +1 -1
  1699. package/node_modules/@murphai/query/dist/query-projection.js +5 -1
  1700. package/node_modules/@murphai/query/dist/query-projection.js.map +1 -1
  1701. package/node_modules/@murphai/query/dist/read-model.d.ts +4 -0
  1702. package/node_modules/@murphai/query/dist/read-model.d.ts.map +1 -1
  1703. package/node_modules/@murphai/query/dist/read-model.js +1 -0
  1704. package/node_modules/@murphai/query/dist/read-model.js.map +1 -1
  1705. package/node_modules/@murphai/query/dist/scheduled-logs.js.map +1 -1
  1706. package/node_modules/@murphai/query/dist/search-shared.js.map +1 -1
  1707. package/node_modules/@murphai/query/dist/search.js.map +1 -1
  1708. package/node_modules/@murphai/query/dist/summaries.js.map +1 -1
  1709. package/node_modules/@murphai/query/dist/timeline.js.map +1 -1
  1710. package/node_modules/@murphai/query/dist/vault-source.d.ts.map +1 -1
  1711. package/node_modules/@murphai/query/dist/vault-source.js +39 -3
  1712. package/node_modules/@murphai/query/dist/vault-source.js.map +1 -1
  1713. package/node_modules/@murphai/query/dist/wearables/candidates.d.ts +5 -2
  1714. package/node_modules/@murphai/query/dist/wearables/candidates.d.ts.map +1 -1
  1715. package/node_modules/@murphai/query/dist/wearables/candidates.js +305 -7
  1716. package/node_modules/@murphai/query/dist/wearables/candidates.js.map +1 -1
  1717. package/node_modules/@murphai/query/dist/wearables/dedupe.d.ts.map +1 -1
  1718. package/node_modules/@murphai/query/dist/wearables/dedupe.js +3 -1
  1719. package/node_modules/@murphai/query/dist/wearables/dedupe.js.map +1 -1
  1720. package/node_modules/@murphai/query/dist/wearables/observation.js.map +1 -1
  1721. package/node_modules/@murphai/query/dist/wearables/origin.js.map +1 -1
  1722. package/node_modules/@murphai/query/dist/wearables/provider-policy.js.map +1 -1
  1723. package/node_modules/@murphai/query/dist/wearables/public-output.d.ts.map +1 -1
  1724. package/node_modules/@murphai/query/dist/wearables/public-output.js +6 -79
  1725. package/node_modules/@murphai/query/dist/wearables/public-output.js.map +1 -1
  1726. package/node_modules/@murphai/query/dist/wearables/selection.d.ts.map +1 -1
  1727. package/node_modules/@murphai/query/dist/wearables/selection.js +5 -1
  1728. package/node_modules/@murphai/query/dist/wearables/selection.js.map +1 -1
  1729. package/node_modules/@murphai/query/dist/wearables/sleep-association.d.ts +9 -0
  1730. package/node_modules/@murphai/query/dist/wearables/sleep-association.d.ts.map +1 -0
  1731. package/node_modules/@murphai/query/dist/wearables/sleep-association.js +81 -0
  1732. package/node_modules/@murphai/query/dist/wearables/sleep-association.js.map +1 -0
  1733. package/node_modules/@murphai/query/dist/wearables/types.d.ts +29 -4
  1734. package/node_modules/@murphai/query/dist/wearables/types.d.ts.map +1 -1
  1735. package/node_modules/@murphai/query/dist/wearables/types.js.map +1 -1
  1736. package/node_modules/@murphai/query/dist/wearables.d.ts.map +1 -1
  1737. package/node_modules/@murphai/query/dist/wearables.js +50 -50
  1738. package/node_modules/@murphai/query/dist/wearables.js.map +1 -1
  1739. package/node_modules/@murphai/query/package.json +5 -0
  1740. package/node_modules/@murphai/runtime-state/README.md +1 -1
  1741. package/node_modules/@murphai/runtime-state/dist/assistant-state-fs.js.map +1 -1
  1742. package/node_modules/@murphai/runtime-state/dist/assistant-state-security.js +1 -1
  1743. package/node_modules/@murphai/runtime-state/dist/assistant-state-security.js.map +1 -1
  1744. package/node_modules/@murphai/runtime-state/dist/atomic-write.js.map +1 -1
  1745. package/node_modules/@murphai/runtime-state/dist/clinical-records-local-state-descriptors.d.ts +3 -0
  1746. package/node_modules/@murphai/runtime-state/dist/clinical-records-local-state-descriptors.d.ts.map +1 -0
  1747. package/node_modules/@murphai/runtime-state/dist/clinical-records-local-state-descriptors.js +12 -0
  1748. package/node_modules/@murphai/runtime-state/dist/clinical-records-local-state-descriptors.js.map +1 -0
  1749. package/node_modules/@murphai/runtime-state/dist/hosted-bundles.d.ts +1 -0
  1750. package/node_modules/@murphai/runtime-state/dist/hosted-bundles.d.ts.map +1 -1
  1751. package/node_modules/@murphai/runtime-state/dist/hosted-bundles.js +65 -31
  1752. package/node_modules/@murphai/runtime-state/dist/hosted-bundles.js.map +1 -1
  1753. package/node_modules/@murphai/runtime-state/dist/hosted-domain-crypto.d.ts +1 -1
  1754. package/node_modules/@murphai/runtime-state/dist/hosted-domain-crypto.d.ts.map +1 -1
  1755. package/node_modules/@murphai/runtime-state/dist/hosted-domain-crypto.js +10 -0
  1756. package/node_modules/@murphai/runtime-state/dist/hosted-domain-crypto.js.map +1 -1
  1757. package/node_modules/@murphai/runtime-state/dist/hosted-email.d.ts +11 -0
  1758. package/node_modules/@murphai/runtime-state/dist/hosted-email.d.ts.map +1 -1
  1759. package/node_modules/@murphai/runtime-state/dist/hosted-email.js +56 -3
  1760. package/node_modules/@murphai/runtime-state/dist/hosted-email.js.map +1 -1
  1761. package/node_modules/@murphai/runtime-state/dist/hosted-storage.d.ts +1 -1
  1762. package/node_modules/@murphai/runtime-state/dist/hosted-storage.d.ts.map +1 -1
  1763. package/node_modules/@murphai/runtime-state/dist/hosted-storage.js +12 -2
  1764. package/node_modules/@murphai/runtime-state/dist/hosted-storage.js.map +1 -1
  1765. package/node_modules/@murphai/runtime-state/dist/local-state-descriptor-helpers.js.map +1 -1
  1766. package/node_modules/@murphai/runtime-state/dist/local-state-descriptor-manifests.d.ts.map +1 -1
  1767. package/node_modules/@murphai/runtime-state/dist/local-state-descriptor-manifests.js +2 -0
  1768. package/node_modules/@murphai/runtime-state/dist/local-state-descriptor-manifests.js.map +1 -1
  1769. package/node_modules/@murphai/runtime-state/dist/locks.d.ts.map +1 -1
  1770. package/node_modules/@murphai/runtime-state/dist/loopback-control-plane.js.map +1 -1
  1771. package/node_modules/@murphai/runtime-state/dist/process-env.js.map +1 -1
  1772. package/node_modules/@murphai/runtime-state/dist/process-identity.js.map +1 -1
  1773. package/node_modules/@murphai/runtime-state/dist/runtime-paths.d.ts +2 -0
  1774. package/node_modules/@murphai/runtime-state/dist/runtime-paths.d.ts.map +1 -1
  1775. package/node_modules/@murphai/runtime-state/dist/runtime-paths.js +2 -0
  1776. package/node_modules/@murphai/runtime-state/dist/runtime-paths.js.map +1 -1
  1777. package/node_modules/@murphai/runtime-state/dist/shared.js.map +1 -1
  1778. package/node_modules/@murphai/runtime-state/dist/sqlite-warning-filter.js.map +1 -1
  1779. package/node_modules/@murphai/runtime-state/dist/sqlite.js.map +1 -1
  1780. package/node_modules/@murphai/runtime-state/dist/ulid.js.map +1 -1
  1781. package/node_modules/@murphai/setup-cli/dist/setup-agentmail.js.map +1 -1
  1782. package/node_modules/@murphai/setup-cli/dist/setup-assistant-account.js.map +1 -1
  1783. package/node_modules/@murphai/setup-cli/dist/setup-assistant-defaults.js.map +1 -1
  1784. package/node_modules/@murphai/setup-cli/dist/setup-assistant-wizard.js.map +1 -1
  1785. package/node_modules/@murphai/setup-cli/dist/setup-assistant.js.map +1 -1
  1786. package/node_modules/@murphai/setup-cli/dist/setup-cli.d.ts.map +1 -1
  1787. package/node_modules/@murphai/setup-cli/dist/setup-cli.js.map +1 -1
  1788. package/node_modules/@murphai/setup-cli/dist/setup-services/toolchain.js.map +1 -1
  1789. package/node_modules/@murphai/setup-cli/dist/setup-services.js.map +1 -1
  1790. package/node_modules/@murphai/setup-cli/dist/setup-wizard-options.js.map +1 -1
  1791. package/node_modules/@murphai/vault-usecases/README.md +11 -0
  1792. package/node_modules/@murphai/vault-usecases/dist/assistant-vault-paths.js.map +1 -1
  1793. package/node_modules/@murphai/vault-usecases/dist/clinical-records.d.ts +102 -0
  1794. package/node_modules/@murphai/vault-usecases/dist/clinical-records.d.ts.map +1 -0
  1795. package/node_modules/@murphai/vault-usecases/dist/clinical-records.js +374 -0
  1796. package/node_modules/@murphai/vault-usecases/dist/clinical-records.js.map +1 -0
  1797. package/node_modules/@murphai/vault-usecases/dist/commands/query-record-command-helpers.d.ts.map +1 -1
  1798. package/node_modules/@murphai/vault-usecases/dist/commands/query-record-command-helpers.js +13 -4
  1799. package/node_modules/@murphai/vault-usecases/dist/commands/query-record-command-helpers.js.map +1 -1
  1800. package/node_modules/@murphai/vault-usecases/dist/experiment-onboarding-options.d.ts +2 -2
  1801. package/node_modules/@murphai/vault-usecases/dist/health-cli-descriptors.d.ts +3 -3
  1802. package/node_modules/@murphai/vault-usecases/dist/health-cli-descriptors.js +1 -1
  1803. package/node_modules/@murphai/vault-usecases/dist/preferences.d.ts +34 -3
  1804. package/node_modules/@murphai/vault-usecases/dist/preferences.d.ts.map +1 -1
  1805. package/node_modules/@murphai/vault-usecases/dist/preferences.js +84 -1
  1806. package/node_modules/@murphai/vault-usecases/dist/preferences.js.map +1 -1
  1807. package/node_modules/@murphai/vault-usecases/dist/testing/junction-wearable-fixture.d.ts +16 -2
  1808. package/node_modules/@murphai/vault-usecases/dist/testing/junction-wearable-fixture.d.ts.map +1 -1
  1809. package/node_modules/@murphai/vault-usecases/dist/testing/junction-wearable-fixture.js +20 -1
  1810. package/node_modules/@murphai/vault-usecases/dist/testing/junction-wearable-fixture.js.map +1 -1
  1811. package/node_modules/@murphai/vault-usecases/dist/testing.d.ts +2 -2
  1812. package/node_modules/@murphai/vault-usecases/dist/testing.d.ts.map +1 -1
  1813. package/node_modules/@murphai/vault-usecases/dist/testing.js +1 -1
  1814. package/node_modules/@murphai/vault-usecases/dist/testing.js.map +1 -1
  1815. package/node_modules/@murphai/vault-usecases/dist/usecases/capture.d.ts +18 -18
  1816. package/node_modules/@murphai/vault-usecases/dist/usecases/capture.d.ts.map +1 -1
  1817. package/node_modules/@murphai/vault-usecases/dist/usecases/clinical-imports.d.ts +154 -154
  1818. package/node_modules/@murphai/vault-usecases/dist/usecases/clinical-imports.d.ts.map +1 -1
  1819. package/node_modules/@murphai/vault-usecases/dist/usecases/clinical-imports.js +3 -1
  1820. package/node_modules/@murphai/vault-usecases/dist/usecases/clinical-imports.js.map +1 -1
  1821. package/node_modules/@murphai/vault-usecases/dist/usecases/document-meal-read.d.ts +10 -9
  1822. package/node_modules/@murphai/vault-usecases/dist/usecases/document-meal-read.d.ts.map +1 -1
  1823. package/node_modules/@murphai/vault-usecases/dist/usecases/document-meal-read.js +2 -1
  1824. package/node_modules/@murphai/vault-usecases/dist/usecases/document-meal-read.js.map +1 -1
  1825. package/node_modules/@murphai/vault-usecases/dist/usecases/encounter.d.ts +35 -35
  1826. package/node_modules/@murphai/vault-usecases/dist/usecases/experiment-journal-vault.d.ts +38 -37
  1827. package/node_modules/@murphai/vault-usecases/dist/usecases/experiment-journal-vault.d.ts.map +1 -1
  1828. package/node_modules/@murphai/vault-usecases/dist/usecases/experiment-journal-vault.js +37 -5
  1829. package/node_modules/@murphai/vault-usecases/dist/usecases/experiment-journal-vault.js.map +1 -1
  1830. package/node_modules/@murphai/vault-usecases/dist/usecases/explicit-health-family-services.js +7 -7
  1831. package/node_modules/@murphai/vault-usecases/dist/usecases/food.d.ts +2 -2
  1832. package/node_modules/@murphai/vault-usecases/dist/usecases/food.d.ts.map +1 -1
  1833. package/node_modules/@murphai/vault-usecases/dist/usecases/integrated-services.d.ts.map +1 -1
  1834. package/node_modules/@murphai/vault-usecases/dist/usecases/integrated-services.js +57 -20
  1835. package/node_modules/@murphai/vault-usecases/dist/usecases/integrated-services.js.map +1 -1
  1836. package/node_modules/@murphai/vault-usecases/dist/usecases/intervention-experiment-link.d.ts +20 -10
  1837. package/node_modules/@murphai/vault-usecases/dist/usecases/intervention-experiment-link.d.ts.map +1 -1
  1838. package/node_modules/@murphai/vault-usecases/dist/usecases/intervention-experiment-link.js +1 -1
  1839. package/node_modules/@murphai/vault-usecases/dist/usecases/intervention-experiment-link.js.map +1 -1
  1840. package/node_modules/@murphai/vault-usecases/dist/usecases/intervention.d.ts +6 -6
  1841. package/node_modules/@murphai/vault-usecases/dist/usecases/intervention.d.ts.map +1 -1
  1842. package/node_modules/@murphai/vault-usecases/dist/usecases/measurement-read.d.ts +9 -9
  1843. package/node_modules/@murphai/vault-usecases/dist/usecases/measurement-read.d.ts.map +1 -1
  1844. package/node_modules/@murphai/vault-usecases/dist/usecases/measurement.d.ts +4 -4
  1845. package/node_modules/@murphai/vault-usecases/dist/usecases/measurement.d.ts.map +1 -1
  1846. package/node_modules/@murphai/vault-usecases/dist/usecases/provider-event.d.ts +13 -13
  1847. package/node_modules/@murphai/vault-usecases/dist/usecases/provider-event.d.ts.map +1 -1
  1848. package/node_modules/@murphai/vault-usecases/dist/usecases/recipe.d.ts +3 -3
  1849. package/node_modules/@murphai/vault-usecases/dist/usecases/runtime.d.ts.map +1 -1
  1850. package/node_modules/@murphai/vault-usecases/dist/usecases/runtime.js +1 -0
  1851. package/node_modules/@murphai/vault-usecases/dist/usecases/runtime.js.map +1 -1
  1852. package/node_modules/@murphai/vault-usecases/dist/usecases/shared.d.ts +1 -0
  1853. package/node_modules/@murphai/vault-usecases/dist/usecases/shared.d.ts.map +1 -1
  1854. package/node_modules/@murphai/vault-usecases/dist/usecases/shared.js +101 -8
  1855. package/node_modules/@murphai/vault-usecases/dist/usecases/shared.js.map +1 -1
  1856. package/node_modules/@murphai/vault-usecases/dist/usecases/types.d.ts +34 -0
  1857. package/node_modules/@murphai/vault-usecases/dist/usecases/types.d.ts.map +1 -1
  1858. package/node_modules/@murphai/vault-usecases/dist/usecases/vault-usecase-helpers.js.map +1 -1
  1859. package/node_modules/@murphai/vault-usecases/dist/usecases/workout-format.d.ts +33 -33
  1860. package/node_modules/@murphai/vault-usecases/dist/usecases/workout-format.d.ts.map +1 -1
  1861. package/node_modules/@murphai/vault-usecases/dist/usecases/workout-measurement.d.ts +4 -4
  1862. package/node_modules/@murphai/vault-usecases/dist/usecases/workout-model.js.map +1 -1
  1863. package/node_modules/@murphai/vault-usecases/dist/usecases/workout-read.d.ts +8 -8
  1864. package/node_modules/@murphai/vault-usecases/dist/usecases/workout-read.d.ts.map +1 -1
  1865. package/node_modules/@murphai/vault-usecases/dist/usecases/workout-read.js +1 -1
  1866. package/node_modules/@murphai/vault-usecases/dist/usecases/workout-read.js.map +1 -1
  1867. package/node_modules/@murphai/vault-usecases/dist/usecases/workout.d.ts +48 -48
  1868. package/node_modules/@murphai/vault-usecases/dist/usecases/workout.d.ts.map +1 -1
  1869. package/node_modules/@murphai/vault-usecases/dist/vault-services.d.ts.map +1 -1
  1870. package/node_modules/@murphai/vault-usecases/dist/vault-services.js +1 -0
  1871. package/node_modules/@murphai/vault-usecases/dist/vault-services.js.map +1 -1
  1872. package/node_modules/@murphai/vault-usecases/package.json +8 -0
  1873. package/node_modules/incur/dist/Cli.d.ts +4 -0
  1874. package/node_modules/incur/dist/Cli.js +10 -3
  1875. package/node_modules/incur/dist/SyncSkills.d.ts +2 -0
  1876. package/node_modules/incur/dist/SyncSkills.js +5 -2
  1877. package/node_modules/incur/src/Cli.ts +14 -3
  1878. package/node_modules/incur/src/SyncSkills.ts +9 -2
  1879. package/package.json +6 -4
  1880. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/turn-attachment-image-refs.d.ts +0 -15
  1881. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/turn-attachment-image-refs.d.ts.map +0 -1
  1882. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/turn-attachment-image-refs.js +0 -79
  1883. package/node_modules/@murphai/assistant-engine/dist/assistant-codex/turn-attachment-image-refs.js.map +0 -1
  1884. package/node_modules/@murphai/device-syncd/dist/providers/junction-connect-sources.d.ts.map +0 -1
  1885. package/node_modules/@murphai/device-syncd/dist/providers/junction-connect-sources.js.map +0 -1
  1886. package/node_modules/@murphai/messaging-ingress/dist/whatsapp-webhook.d.ts +0 -73
  1887. package/node_modules/@murphai/messaging-ingress/dist/whatsapp-webhook.d.ts.map +0 -1
  1888. package/node_modules/@murphai/messaging-ingress/dist/whatsapp-webhook.js +0 -212
  1889. package/node_modules/@murphai/messaging-ingress/dist/whatsapp-webhook.js.map +0 -1
  1890. package/node_modules/@murphai/operator-config/dist/runtime-errors.d.ts +0 -4
  1891. package/node_modules/@murphai/operator-config/dist/runtime-errors.d.ts.map +0 -1
  1892. package/node_modules/@murphai/operator-config/dist/runtime-errors.js +0 -19
  1893. package/node_modules/@murphai/operator-config/dist/runtime-errors.js.map +0 -1
  1894. package/node_modules/@murphai/operator-config/dist/whatsapp-runtime.d.ts +0 -34
  1895. package/node_modules/@murphai/operator-config/dist/whatsapp-runtime.d.ts.map +0 -1
  1896. package/node_modules/@murphai/operator-config/dist/whatsapp-runtime.js +0 -208
  1897. package/node_modules/@murphai/operator-config/dist/whatsapp-runtime.js.map +0 -1
  1898. package/node_modules/@murphai/vault-usecases/dist/query-id-families.d.ts +0 -4
  1899. package/node_modules/@murphai/vault-usecases/dist/query-id-families.d.ts.map +0 -1
  1900. package/node_modules/@murphai/vault-usecases/dist/query-id-families.js +0 -104
  1901. package/node_modules/@murphai/vault-usecases/dist/query-id-families.js.map +0 -1
  1902. /package/node_modules/@murphai/device-syncd/dist/{providers → config}/junction-connect-sources.d.ts +0 -0
@@ -2,14 +2,16 @@ import path from "node:path";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import { createReadStream, promises as fs } from "node:fs";
5
- import { copyFileAtomic, copyFileAtomicExclusive, writeTextFileAtomic, } from "../atomic-write.js";
5
+ import { auditRecordSchema } from "@murphai/contracts";
6
+ import { copyFileAtomic, copyFileAtomicExclusive, writeBytesFileAtomicExclusive, writeTextFileAtomic, } from "../atomic-write.js";
6
7
  import { VaultError } from "../errors.js";
7
8
  import { ensureDirectory, pathExists } from "../fs.js";
8
9
  import { VAULT_LAYOUT } from "../constants.js";
9
10
  import { isJsonlRelativePath, isRawRelativePath, isVaultFilesystemCaseInsensitive, normalizeRelativeVaultPath, normalizeRelativeVaultPathForComparison, normalizeVaultRoot, resolveVaultPath, resolveVaultPathOnDisk, } from "../path-safety.js";
10
11
  import { toIsoTimestamp } from "../time.js";
11
12
  import { isErrnoException, isPlainRecord } from "../types.js";
12
- import { applyImmutableWriteTarget, applyJsonlAppendTarget, applyTextWriteTarget, assertWriteTargetPolicy, assertWriteTargetPolicyForVault, prepareVerifiedDeleteTarget, prepareVerifiedWriteTarget, } from "../write-policy.js";
13
+ import { assertAuthorizedIntegrationIngestAppendPlan, appendArchivedIntegrationIngestShard, buildIntegrationIngestAppendPlan, parseIntegrationIngestAppendPayload, prepareLiveIntegrationIngestAppendPayload, readArchivedIntegrationIngestShardText, truncateArchivedIntegrationIngestShard, } from "../integration-ingests.js";
14
+ import { applyImmutableWriteTarget, applyJsonlAppendTarget, applyTextWriteTarget, assertJsonlAppendTargetCanAppend, isIntegrationIngestJsonlAppendTarget, assertWriteTargetPolicy, assertWriteTargetPolicyForVault, prepareVerifiedDeleteTarget, prepareVerifiedWriteTarget, } from "../write-policy.js";
13
15
  import { acquireCanonicalWriteLock } from "./canonical-write-lock.js";
14
16
  export const WRITE_OPERATION_SCHEMA_VERSION = "murph.write-operation.v1";
15
17
  export const WRITE_OPERATION_DIRECTORY = ".runtime/operations";
@@ -146,6 +148,9 @@ function resolveHostedCanonicalWriteReceiptDirectoryFromEnv(env = process.env) {
146
148
  function resolveAmbientHostedCanonicalWritePort() {
147
149
  return hostedCanonicalWritePortStorage.getStore() ?? null;
148
150
  }
151
+ export function readHostedCanonicalWritePort() {
152
+ return resolveAmbientHostedCanonicalWritePort();
153
+ }
149
154
  export async function withHostedCanonicalWritePort(port, run) {
150
155
  return await hostedCanonicalWritePortStorage.run(port, run);
151
156
  }
@@ -178,6 +183,7 @@ export async function applyHostedCanonicalWriteReceipt(input) {
178
183
  ref: action.contentRef,
179
184
  });
180
185
  await applyHostedCanonicalJsonlAppendReceiptAction({
186
+ allowArchivedIntegrationIngestAmendment: action.allowArchivedIntegrationIngestAmendment === true,
181
187
  baseByteLength: action.baseByteLength,
182
188
  baseSha256: action.baseSha256,
183
189
  bytes,
@@ -203,6 +209,18 @@ export async function applyHostedCanonicalWriteReceipt(input) {
203
209
  }
204
210
  case "delete":
205
211
  await applyHostedCanonicalDeleteReceiptAction({
212
+ allowRaw: action.allowRaw === true,
213
+ targetRelativePath: action.targetRelativePath,
214
+ vaultRoot,
215
+ });
216
+ break;
217
+ case "delete_if_match":
218
+ await applyHostedCanonicalDeleteReceiptAction({
219
+ allowRaw: action.allowRaw === true,
220
+ expectedTargetReceipt: {
221
+ byteLength: action.expectedByteLength,
222
+ sha256: action.expectedSha256,
223
+ },
206
224
  targetRelativePath: action.targetRelativePath,
207
225
  vaultRoot,
208
226
  });
@@ -248,6 +266,33 @@ async function applyHostedCanonicalJsonlAppendReceiptAction(input) {
248
266
  const target = await prepareVerifiedWriteTarget(input.vaultRoot, input.targetRelativePath, {
249
267
  kind: "jsonl_append",
250
268
  });
269
+ const comparisonOptions = {
270
+ caseInsensitive: await isVaultFilesystemCaseInsensitive(input.vaultRoot),
271
+ };
272
+ try {
273
+ await assertJsonlAppendTargetCanAppend(target, comparisonOptions);
274
+ }
275
+ catch (error) {
276
+ if (isArchivedIntegrationIngestAppendError(error, target, comparisonOptions)) {
277
+ if (input.allowArchivedIntegrationIngestAmendment) {
278
+ await appendArchivedIntegrationIngestShard({
279
+ expectedBaseByteLength: input.baseByteLength,
280
+ expectedBaseSha256: input.baseSha256,
281
+ payload: Buffer.from(input.bytes).toString("utf8"),
282
+ targetRelativePath: target.relativePath,
283
+ vaultRoot: input.vaultRoot,
284
+ });
285
+ return;
286
+ }
287
+ await assertArchivedIntegrationIngestHostedAppendAlreadyApplied({
288
+ bytes: input.bytes,
289
+ targetRelativePath: target.relativePath,
290
+ vaultRoot: input.vaultRoot,
291
+ });
292
+ return;
293
+ }
294
+ throw error;
295
+ }
251
296
  const originalSize = input.originalSize ?? 0;
252
297
  if (input.baseByteLength !== originalSize) {
253
298
  throw new VaultError("HOSTED_CANONICAL_WRITE_APPEND_BASE_MISMATCH", "Hosted canonical JSONL append base receipt does not match the recorded base size.");
@@ -261,22 +306,110 @@ async function applyHostedCanonicalJsonlAppendReceiptAction(input) {
261
306
  throw error;
262
307
  }
263
308
  }
264
- if (existing.byteLength < originalSize) {
265
- throw new VaultError("HOSTED_CANONICAL_WRITE_APPEND_BASE_MISMATCH", "Hosted canonical JSONL append base size is not present.");
266
- }
267
- const baseReceipt = createCommittedPayloadReceipt(existing.subarray(0, input.baseByteLength));
268
- if (baseReceipt.sha256 !== input.baseSha256 || baseReceipt.byteLength !== input.baseByteLength) {
269
- throw new VaultError("HOSTED_CANONICAL_WRITE_APPEND_BASE_MISMATCH", "Hosted canonical JSONL append base content does not match the receipt.");
309
+ const baseSizeIsPresent = existing.byteLength >= originalSize;
310
+ const baseReceipt = baseSizeIsPresent
311
+ ? createCommittedPayloadReceipt(existing.subarray(0, input.baseByteLength))
312
+ : null;
313
+ const baseMatches = baseReceipt?.sha256 === input.baseSha256
314
+ && baseReceipt.byteLength === input.baseByteLength;
315
+ if (baseMatches) {
316
+ const appendedEnd = originalSize + input.bytes.byteLength;
317
+ if (existing.byteLength >= appendedEnd &&
318
+ Buffer.from(existing.subarray(originalSize, appendedEnd)).equals(Buffer.from(input.bytes))) {
319
+ return;
320
+ }
321
+ if (existing.byteLength === originalSize) {
322
+ await fs.appendFile(target.absolutePath, input.bytes);
323
+ return;
324
+ }
270
325
  }
271
- const appendedEnd = originalSize + input.bytes.byteLength;
272
- if (existing.byteLength >= appendedEnd &&
273
- Buffer.from(existing.subarray(originalSize, appendedEnd)).equals(Buffer.from(input.bytes))) {
326
+ if (await tryReconcileHostedCanonicalAuditAppend({
327
+ bytes: input.bytes,
328
+ comparisonOptions,
329
+ existing,
330
+ target,
331
+ })) {
274
332
  return;
275
333
  }
276
- if (existing.byteLength !== originalSize) {
277
- throw new VaultError("HOSTED_CANONICAL_WRITE_APPEND_BASE_MISMATCH", "Hosted canonical JSONL append base content does not match the receipt.");
334
+ throw new VaultError("HOSTED_CANONICAL_WRITE_APPEND_BASE_MISMATCH", baseSizeIsPresent
335
+ ? "Hosted canonical JSONL append base content does not match the receipt."
336
+ : "Hosted canonical JSONL append base size is not present.");
337
+ }
338
+ async function tryReconcileHostedCanonicalAuditAppend(input) {
339
+ const comparisonRelativePath = normalizeRelativeVaultPathForComparison(input.target.relativePath, input.comparisonOptions);
340
+ const auditDirectory = normalizeRelativeVaultPathForComparison(VAULT_LAYOUT.auditDirectory, input.comparisonOptions);
341
+ if (!comparisonRelativePath.startsWith(`${auditDirectory}/`) ||
342
+ !isJsonlRelativePath(input.target.relativePath, input.comparisonOptions)) {
343
+ return false;
344
+ }
345
+ const payload = Buffer.from(input.bytes).toString("utf8");
346
+ if (!payload.endsWith("\n")) {
347
+ return false;
348
+ }
349
+ const payloadLines = payload.slice(0, -1).split("\n");
350
+ if (payloadLines.length !== 1 || payloadLines[0]?.length === 0) {
351
+ return false;
278
352
  }
279
- await fs.appendFile(target.absolutePath, input.bytes);
353
+ const incomingRecord = parseHostedAuditRecordLine(payloadLines[0]);
354
+ if (!incomingRecord) {
355
+ return false;
356
+ }
357
+ const existingText = Buffer.from(input.existing).toString("utf8");
358
+ if (existingText.length > 0 && !existingText.endsWith("\n")) {
359
+ return false;
360
+ }
361
+ const existingLines = existingText.length === 0 ? [] : existingText.slice(0, -1).split("\n");
362
+ const existingRecordIds = new Set();
363
+ let matchingRecord = null;
364
+ for (const line of existingLines) {
365
+ if (line.length === 0) {
366
+ return false;
367
+ }
368
+ const record = parseHostedAuditRecordLine(line);
369
+ if (!record) {
370
+ return false;
371
+ }
372
+ if (existingRecordIds.has(record.id)) {
373
+ throw new VaultError("HOSTED_CANONICAL_WRITE_APPEND_BASE_MISMATCH", "Hosted canonical audit replay found a duplicate existing audit record ID.");
374
+ }
375
+ existingRecordIds.add(record.id);
376
+ if (record.id === incomingRecord.id) {
377
+ matchingRecord = record;
378
+ }
379
+ }
380
+ if (matchingRecord) {
381
+ if (JSON.stringify(matchingRecord) !== JSON.stringify(incomingRecord)) {
382
+ throw new VaultError("HOSTED_CANONICAL_WRITE_APPEND_BASE_MISMATCH", "Hosted canonical audit replay found conflicting content for an existing audit record ID.");
383
+ }
384
+ return true;
385
+ }
386
+ await fs.appendFile(input.target.absolutePath, input.bytes);
387
+ return true;
388
+ }
389
+ function parseHostedAuditRecordLine(line) {
390
+ let value;
391
+ try {
392
+ value = JSON.parse(line);
393
+ }
394
+ catch {
395
+ return null;
396
+ }
397
+ const result = auditRecordSchema.safeParse(value);
398
+ return result.success ? result.data : null;
399
+ }
400
+ function isArchivedIntegrationIngestAppendError(error, target, options = {}) {
401
+ return error instanceof VaultError
402
+ && error.code === "INTEGRATION_INGEST_SHARD_ARCHIVED"
403
+ && isIntegrationIngestJsonlAppendTarget(target.relativePath, options);
404
+ }
405
+ async function assertArchivedIntegrationIngestHostedAppendAlreadyApplied(input) {
406
+ const payload = Buffer.from(input.bytes).toString("utf8");
407
+ const records = await parseIntegrationIngestAppendPayload(payload, input.targetRelativePath);
408
+ const plan = await buildIntegrationIngestAppendPlan(input.vaultRoot, records);
409
+ if (plan.payloads.size === 0) {
410
+ return;
411
+ }
412
+ throw new VaultError("INTEGRATION_INGEST_SHARD_ARCHIVED", `Integration ingest shard "${input.targetRelativePath}" is archived and cannot be appended.`, { relativePath: input.targetRelativePath });
280
413
  }
281
414
  async function applyHostedCanonicalRawReceiptAction(input) {
282
415
  const target = await prepareVerifiedWriteTarget(input.vaultRoot, input.targetRelativePath, {
@@ -293,8 +426,24 @@ async function applyHostedCanonicalRawReceiptAction(input) {
293
426
  async function applyHostedCanonicalDeleteReceiptAction(input) {
294
427
  const target = await prepareVerifiedDeleteTarget(input.vaultRoot, input.targetRelativePath, {
295
428
  allowAppendOnlyJsonl: true,
429
+ allowRaw: input.allowRaw,
296
430
  kind: "delete",
297
431
  });
432
+ if (input.expectedTargetReceipt) {
433
+ let actualReceipt;
434
+ try {
435
+ actualReceipt = await createFileContentReceipt(target.absolutePath);
436
+ }
437
+ catch (error) {
438
+ if (isErrnoException(error) && error.code === "ENOENT") {
439
+ return;
440
+ }
441
+ throw error;
442
+ }
443
+ if (!receiptsMatch(actualReceipt, input.expectedTargetReceipt)) {
444
+ throw new VaultError("HOSTED_CANONICAL_WRITE_DELETE_CONFLICT", "Hosted canonical guarded delete found conflicting existing bytes.", { relativePath: input.targetRelativePath });
445
+ }
446
+ }
298
447
  await fs.rm(target.absolutePath, { force: true });
299
448
  }
300
449
  async function targetMatchesBytes(absolutePath, bytes) {
@@ -395,10 +544,58 @@ async function safeUnlink(absolutePath) {
395
544
  throw error;
396
545
  }
397
546
  }
547
+ async function removeTreeInterruptibly(absolutePath, signal) {
548
+ signal?.throwIfAborted();
549
+ let stats;
550
+ try {
551
+ stats = await fs.lstat(absolutePath);
552
+ }
553
+ catch (error) {
554
+ signal?.throwIfAborted();
555
+ if (isErrnoException(error) && error.code === "ENOENT") {
556
+ return;
557
+ }
558
+ throw error;
559
+ }
560
+ signal?.throwIfAborted();
561
+ if (!stats.isDirectory()) {
562
+ await safeUnlink(absolutePath);
563
+ signal?.throwIfAborted();
564
+ return;
565
+ }
566
+ let childNames;
567
+ try {
568
+ childNames = await fs.readdir(absolutePath);
569
+ }
570
+ catch (error) {
571
+ signal?.throwIfAborted();
572
+ if (isErrnoException(error) && error.code === "ENOENT") {
573
+ return;
574
+ }
575
+ throw error;
576
+ }
577
+ signal?.throwIfAborted();
578
+ childNames.sort((left, right) => left.localeCompare(right));
579
+ for (const childName of childNames) {
580
+ signal?.throwIfAborted();
581
+ await removeTreeInterruptibly(path.join(absolutePath, childName), signal);
582
+ }
583
+ try {
584
+ await fs.rmdir(absolutePath);
585
+ }
586
+ catch (error) {
587
+ signal?.throwIfAborted();
588
+ if (isErrnoException(error) && error.code === "ENOENT") {
589
+ return;
590
+ }
591
+ throw error;
592
+ }
593
+ signal?.throwIfAborted();
594
+ }
398
595
  export function isTerminalWriteOperationStatus(status) {
399
596
  return status === "committed" || status === "rolled_back";
400
597
  }
401
- export async function listWriteOperationMetadataPaths(vaultRoot) {
598
+ async function readWriteOperationDirectoryEntries(vaultRoot) {
402
599
  const operationDirectory = await resolveVaultPathOnDisk(vaultRoot, WRITE_OPERATION_DIRECTORY);
403
600
  if (!(await pathExists(operationDirectory.absolutePath))) {
404
601
  return [];
@@ -407,13 +604,26 @@ export async function listWriteOperationMetadataPaths(vaultRoot) {
407
604
  if (!stats.isDirectory()) {
408
605
  return [];
409
606
  }
410
- const entries = await fs.readdir(operationDirectory.absolutePath, { withFileTypes: true });
411
- return entries
607
+ return await fs.readdir(operationDirectory.absolutePath, { withFileTypes: true });
608
+ }
609
+ export async function listWriteOperationMetadataPaths(vaultRoot) {
610
+ return (await readWriteOperationDirectoryEntries(vaultRoot))
412
611
  .filter((entry) => entry.isFile() && entry.name.endsWith(".json"))
413
612
  .map((entry) => path.posix.join(WRITE_OPERATION_DIRECTORY, entry.name))
414
613
  .sort((left, right) => left.localeCompare(right));
415
614
  }
615
+ export async function listWriteOperationMetadataPathsWithStageDirectories(vaultRoot) {
616
+ const entries = await readWriteOperationDirectoryEntries(vaultRoot);
617
+ const stageDirectoryNames = new Set(entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name));
618
+ return entries
619
+ .filter((entry) => entry.isFile() &&
620
+ entry.name.endsWith(".json") &&
621
+ stageDirectoryNames.has(entry.name.slice(0, -".json".length)))
622
+ .map((entry) => path.posix.join(WRITE_OPERATION_DIRECTORY, entry.name))
623
+ .sort((left, right) => left.localeCompare(right));
624
+ }
416
625
  export async function pruneTerminalWriteOperationRecords(input) {
626
+ input.signal?.throwIfAborted();
417
627
  const checkpointedAfterMs = parsePruneBoundaryMs(input.checkpointedAfter);
418
628
  const nowMs = parsePruneBoundaryMs(input.now ?? new Date());
419
629
  const retainedOperationCount = normalizeTerminalWriteOperationRetainedCount(input.retainedOperationCount);
@@ -423,6 +633,7 @@ export async function pruneTerminalWriteOperationRecords(input) {
423
633
  prunedByteCount: 0,
424
634
  prunedCount: 0,
425
635
  prunedFileCount: 0,
636
+ prunedStageDirectoryCount: 0,
426
637
  retainedErroredTerminalCount: 0,
427
638
  retainedNewestTerminalCount: 0,
428
639
  retainedProtectedCount: 0,
@@ -436,7 +647,10 @@ export async function pruneTerminalWriteOperationRecords(input) {
436
647
  }
437
648
  const candidates = [];
438
649
  const cutoffMs = nowMs - retentionMs;
439
- for (const relativePath of await listWriteOperationMetadataPaths(input.vaultRoot)) {
650
+ const metadataPaths = await listWriteOperationMetadataPaths(input.vaultRoot);
651
+ input.signal?.throwIfAborted();
652
+ for (const relativePath of metadataPaths) {
653
+ input.signal?.throwIfAborted();
440
654
  result.scannedCount += 1;
441
655
  const operationId = operationIdFromMetadataPath(relativePath);
442
656
  if (!operationId) {
@@ -444,6 +658,7 @@ export async function pruneTerminalWriteOperationRecords(input) {
444
658
  continue;
445
659
  }
446
660
  const operation = await readStrictPrunableWriteOperation(input.vaultRoot, relativePath);
661
+ input.signal?.throwIfAborted();
447
662
  if (!operation || operation.operationId !== operationId) {
448
663
  result.invalidCount += 1;
449
664
  continue;
@@ -461,16 +676,25 @@ export async function pruneTerminalWriteOperationRecords(input) {
461
676
  result.invalidCount += 1;
462
677
  continue;
463
678
  }
679
+ const stageRoot = (await resolveVaultPathOnDisk(input.vaultRoot, path.posix.join(WRITE_OPERATION_DIRECTORY, operationId))).absolutePath;
680
+ input.signal?.throwIfAborted();
464
681
  if (updatedAtMs >= checkpointedAfterMs) {
682
+ const stageRootExists = await pathExists(stageRoot);
683
+ input.signal?.throwIfAborted();
684
+ if (stageRootExists) {
685
+ result.retainedStageDirectoryCount += 1;
686
+ }
465
687
  result.retainedUncheckpointedTerminalCount += 1;
466
688
  continue;
467
689
  }
468
- await resolveVaultPathOnDisk(input.vaultRoot, relativePath);
469
- const stageRoot = (await resolveVaultPathOnDisk(input.vaultRoot, path.posix.join(WRITE_OPERATION_DIRECTORY, operationId))).absolutePath;
470
- if (await pathExists(stageRoot)) {
471
- result.retainedStageDirectoryCount += 1;
472
- continue;
690
+ const stageRootExists = await pathExists(stageRoot);
691
+ input.signal?.throwIfAborted();
692
+ if (stageRootExists) {
693
+ await removeTreeInterruptibly(stageRoot, input.signal);
694
+ result.prunedStageDirectoryCount += 1;
473
695
  }
696
+ await resolveVaultPathOnDisk(input.vaultRoot, relativePath);
697
+ input.signal?.throwIfAborted();
474
698
  candidates.push({
475
699
  metadataRelativePath: relativePath,
476
700
  operationId,
@@ -481,6 +705,7 @@ export async function pruneTerminalWriteOperationRecords(input) {
481
705
  candidates.sort((left, right) => right.updatedAtMs - left.updatedAtMs ||
482
706
  left.operationId.localeCompare(right.operationId));
483
707
  for (const [index, candidate] of candidates.entries()) {
708
+ input.signal?.throwIfAborted();
484
709
  if (index < retainedOperationCount) {
485
710
  result.retainedNewestTerminalCount += 1;
486
711
  continue;
@@ -489,13 +714,18 @@ export async function pruneTerminalWriteOperationRecords(input) {
489
714
  result.retainedRecentTerminalCount += 1;
490
715
  continue;
491
716
  }
492
- if (await pathExists(candidate.stageRoot)) {
493
- result.retainedStageDirectoryCount += 1;
494
- continue;
717
+ const stageRootExists = await pathExists(candidate.stageRoot);
718
+ input.signal?.throwIfAborted();
719
+ if (stageRootExists) {
720
+ await removeTreeInterruptibly(candidate.stageRoot, input.signal);
721
+ result.prunedStageDirectoryCount += 1;
495
722
  }
496
723
  const metadataPath = (await resolveVaultPathOnDisk(input.vaultRoot, candidate.metadataRelativePath)).absolutePath;
724
+ input.signal?.throwIfAborted();
497
725
  const measured = await measureExistingFile(metadataPath);
726
+ input.signal?.throwIfAborted();
498
727
  await safeUnlink(metadataPath);
728
+ input.signal?.throwIfAborted();
499
729
  result.prunedCount += 1;
500
730
  result.prunedFileCount += measured.fileCount;
501
731
  result.prunedByteCount += measured.byteCount;
@@ -575,11 +805,17 @@ function parseStoredAction(value) {
575
805
  if (backupRelativePath === null) {
576
806
  return null;
577
807
  }
808
+ const expectedTargetReceipt = parseCommittedPayloadReceipt(record.expectedTargetReceipt);
809
+ if (expectedTargetReceipt === null) {
810
+ return null;
811
+ }
578
812
  return {
579
813
  kind: "delete",
580
814
  ...base,
815
+ allowRaw: record.allowRaw === true,
581
816
  backupRelativePath,
582
817
  effect: record.effect === "delete" ? record.effect : undefined,
818
+ ...(expectedTargetReceipt ? { expectedTargetReceipt } : {}),
583
819
  };
584
820
  }
585
821
  case "raw_copy": {
@@ -587,11 +823,16 @@ function parseStoredAction(value) {
587
823
  if (!stageRelativePath) {
588
824
  return null;
589
825
  }
826
+ const expectedSourceReceipt = parseCommittedPayloadReceipt(record.expectedSourceReceipt);
827
+ if (expectedSourceReceipt === null) {
828
+ return null;
829
+ }
590
830
  return {
591
831
  kind: "raw_copy",
592
832
  ...base,
593
833
  allowExistingMatch: record.allowExistingMatch === true,
594
834
  effect: record.effect === "copy" || record.effect === "reuse" ? record.effect : undefined,
835
+ ...(expectedSourceReceipt ? { expectedSourceReceipt } : {}),
595
836
  mediaType: typeof record.mediaType === "string" ? record.mediaType : "",
596
837
  originalFileName: typeof record.originalFileName === "string" ? record.originalFileName : "",
597
838
  stageRelativePath,
@@ -610,6 +851,10 @@ function parseStoredAction(value) {
610
851
  if (committedPayloadReceipt === null) {
611
852
  return null;
612
853
  }
854
+ const expectedTargetReceipt = parseCommittedPayloadReceipt(record.expectedTargetReceipt);
855
+ if (expectedTargetReceipt === null) {
856
+ return null;
857
+ }
613
858
  return {
614
859
  kind: "text_write",
615
860
  ...base,
@@ -617,6 +862,7 @@ function parseStoredAction(value) {
617
862
  allowRaw: record.allowRaw === true,
618
863
  backupRelativePath,
619
864
  committedPayloadReceipt,
865
+ ...(expectedTargetReceipt ? { expectedTargetReceipt } : {}),
620
866
  effect: record.effect === "create" || record.effect === "update" || record.effect === "reuse"
621
867
  ? record.effect
622
868
  : undefined,
@@ -633,6 +879,10 @@ function parseStoredAction(value) {
633
879
  if (committedPayloadReceipt === null) {
634
880
  return null;
635
881
  }
882
+ const stagedPayloadReceipt = parseCommittedPayloadReceipt(record.stagedPayloadReceipt);
883
+ if (stagedPayloadReceipt === null) {
884
+ return null;
885
+ }
636
886
  const baseContentReceipt = parseCommittedPayloadReceipt(record.baseContentReceipt);
637
887
  if (baseContentReceipt === null) {
638
888
  return null;
@@ -640,8 +890,10 @@ function parseStoredAction(value) {
640
890
  return {
641
891
  kind: "jsonl_append",
642
892
  ...base,
893
+ allowArchivedIntegrationIngestAmendment: record.allowArchivedIntegrationIngestAmendment === true,
643
894
  baseContentReceipt,
644
895
  committedPayloadReceipt,
896
+ stagedPayloadReceipt,
645
897
  effect: record.effect === "append" ? record.effect : undefined,
646
898
  originalSize: typeof record.originalSize === "number" &&
647
899
  Number.isInteger(record.originalSize) &&
@@ -812,6 +1064,36 @@ export async function readStoredWriteOperation(vaultRoot, relativePath) {
812
1064
  }
813
1065
  return operation;
814
1066
  }
1067
+ export async function readStoredWriteOperationJsonlAppendPayload(input) {
1068
+ const targetRelativePath = normalizeRelativeVaultPath(input.targetRelativePath);
1069
+ const actions = input.operation.actions.filter((action) => action.kind === "jsonl_append" && action.targetRelativePath === targetRelativePath);
1070
+ if (actions.length !== 1) {
1071
+ return null;
1072
+ }
1073
+ const action = actions[0];
1074
+ if (action.state !== "staged" || !action.stagedPayloadReceipt) {
1075
+ return null;
1076
+ }
1077
+ const expectedStagePrefix = `${stageRootRelativePath(input.operation.operationId)}/payloads/`;
1078
+ if (!action.stageRelativePath.startsWith(expectedStagePrefix)) {
1079
+ return null;
1080
+ }
1081
+ let content;
1082
+ try {
1083
+ const stagePath = await resolveVaultPathOnDisk(input.vaultRoot, action.stageRelativePath);
1084
+ content = await fs.readFile(stagePath.absolutePath, "utf8");
1085
+ }
1086
+ catch (error) {
1087
+ if (isErrnoException(error) && error.code === "ENOENT") {
1088
+ return null;
1089
+ }
1090
+ throw error;
1091
+ }
1092
+ if (!receiptsMatch(createCommittedPayloadReceipt(content), action.stagedPayloadReceipt)) {
1093
+ return null;
1094
+ }
1095
+ return content;
1096
+ }
815
1097
  export async function readRecoverableStoredWriteOperation(vaultRoot, relativePath) {
816
1098
  try {
817
1099
  const resolved = resolveVaultPath(vaultRoot, relativePath);
@@ -903,7 +1185,7 @@ export class WriteBatch {
903
1185
  await batch.persist();
904
1186
  return batch;
905
1187
  }
906
- async stageRawCopy({ sourcePath, targetRelativePath, allowExistingMatch = false, originalFileName, mediaType, }) {
1188
+ async stageRawCopy({ sourcePath, targetRelativePath, allowExistingMatch = false, expectedSourceReceipt, originalFileName, mediaType, }) {
907
1189
  this.assertMutable();
908
1190
  const normalizedTarget = normalizeRelativeVaultPath(targetRelativePath);
909
1191
  await assertWriteTargetPolicyForVault(this.vaultRoot, normalizedTarget, {
@@ -924,6 +1206,13 @@ export class WriteBatch {
924
1206
  const stageAbsolutePath = resolveVaultPath(this.vaultRoot, stageRelativePath).absolutePath;
925
1207
  await ensureDirectory(path.dirname(stageAbsolutePath));
926
1208
  await fs.copyFile(sourceAbsolutePath, stageAbsolutePath);
1209
+ if (expectedSourceReceipt) {
1210
+ const stagedReceipt = await createFileContentReceipt(stageAbsolutePath);
1211
+ if (!receiptsMatch(stagedReceipt, expectedSourceReceipt)) {
1212
+ await safeUnlink(stageAbsolutePath);
1213
+ throw new VaultError("OPERATION_PRECONDITION_FAILED", `Raw source for "${normalizedTarget}" changed after it was inspected.`, { relativePath: normalizedTarget });
1214
+ }
1215
+ }
927
1216
  this.record.actions.push({
928
1217
  kind: "raw_copy",
929
1218
  state: "staged",
@@ -932,6 +1221,9 @@ export class WriteBatch {
932
1221
  allowExistingMatch,
933
1222
  originalFileName,
934
1223
  mediaType,
1224
+ expectedSourceReceipt: expectedSourceReceipt
1225
+ ? { ...expectedSourceReceipt }
1226
+ : undefined,
935
1227
  });
936
1228
  await this.persist();
937
1229
  return {
@@ -996,6 +1288,9 @@ export class WriteBatch {
996
1288
  }
997
1289
  async stageTextWrite(targetRelativePath, content, options = {}) {
998
1290
  this.assertMutable();
1291
+ if (options.expectedTargetReceipt && options.overwrite === false) {
1292
+ throw new VaultError("OPERATION_PRECONDITION_INVALID", "Receipt-guarded text writes must replace the inspected target.", { relativePath: targetRelativePath });
1293
+ }
999
1294
  const normalizedTarget = normalizeRelativeVaultPath(targetRelativePath);
1000
1295
  await assertWriteTargetPolicyForVault(this.vaultRoot, normalizedTarget, {
1001
1296
  kind: "text",
@@ -1018,11 +1313,31 @@ export class WriteBatch {
1018
1313
  overwrite: options.overwrite ?? true,
1019
1314
  allowExistingMatch: options.allowExistingMatch ?? false,
1020
1315
  allowRaw: options.allowRaw ?? false,
1316
+ expectedTargetReceipt: options.expectedTargetReceipt
1317
+ ? { ...options.expectedTargetReceipt }
1318
+ : undefined,
1021
1319
  });
1022
1320
  await this.persist();
1023
1321
  return normalizedTarget;
1024
1322
  }
1025
1323
  async stageJsonlAppend(targetRelativePath, content) {
1324
+ return await this.stageJsonlAppendAction(targetRelativePath, content, false);
1325
+ }
1326
+ async stageIntegrationIngestAppendPlan(plan) {
1327
+ this.assertMutable();
1328
+ assertAuthorizedIntegrationIngestAppendPlan(plan);
1329
+ const archivedAmendmentShardPaths = new Set(plan.archivedAmendmentShardPaths);
1330
+ for (const relativePath of [...plan.payloads.keys()].sort()) {
1331
+ const payload = plan.payloads.get(relativePath);
1332
+ if (payload) {
1333
+ const archivedAmendment = archivedAmendmentShardPaths.has(relativePath);
1334
+ await this.stageJsonlAppendAction(relativePath, archivedAmendment
1335
+ ? payload
1336
+ : await prepareLiveIntegrationIngestAppendPayload(this.vaultRoot, relativePath, payload), archivedAmendment);
1337
+ }
1338
+ }
1339
+ }
1340
+ async stageJsonlAppendAction(targetRelativePath, content, allowArchivedIntegrationIngestAmendment) {
1026
1341
  this.assertMutable();
1027
1342
  const normalizedTarget = normalizeRelativeVaultPath(targetRelativePath);
1028
1343
  await assertWriteTargetPolicyForVault(this.vaultRoot, normalizedTarget, {
@@ -1036,11 +1351,14 @@ export class WriteBatch {
1036
1351
  const stageAbsolutePath = resolveVaultPath(this.vaultRoot, stageRelativePath).absolutePath;
1037
1352
  await ensureDirectory(path.dirname(stageAbsolutePath));
1038
1353
  await fs.writeFile(stageAbsolutePath, content, "utf8");
1354
+ const stagedPayloadReceipt = createCommittedPayloadReceipt(content);
1039
1355
  this.record.actions.push({
1040
1356
  kind: "jsonl_append",
1041
1357
  state: "staged",
1042
1358
  targetRelativePath: normalizedTarget,
1043
1359
  stageRelativePath,
1360
+ stagedPayloadReceipt,
1361
+ allowArchivedIntegrationIngestAmendment,
1044
1362
  });
1045
1363
  await this.persist();
1046
1364
  return normalizedTarget;
@@ -1062,6 +1380,9 @@ export class WriteBatch {
1062
1380
  state: "staged",
1063
1381
  targetRelativePath: normalizedTarget,
1064
1382
  allowRaw: options.allowRaw ?? false,
1383
+ expectedTargetReceipt: options.expectedTargetReceipt
1384
+ ? { ...options.expectedTargetReceipt }
1385
+ : undefined,
1065
1386
  });
1066
1387
  await this.persist();
1067
1388
  return normalizedTarget;
@@ -1314,6 +1635,9 @@ export class WriteBatch {
1314
1635
  }
1315
1636
  const bytes = await fs.readFile(resolveVaultPath(this.vaultRoot, action.stageRelativePath).absolutePath);
1316
1637
  const receipt = createCommittedPayloadReceipt(bytes);
1638
+ if (action.kind === "raw_copy") {
1639
+ this.assertExpectedSourceReceipt(action, receipt);
1640
+ }
1317
1641
  const existing = payloadsBySha.get(receipt.sha256);
1318
1642
  if (existing) {
1319
1643
  if (existing.byteLength !== receipt.byteLength) {
@@ -1357,6 +1681,9 @@ export class WriteBatch {
1357
1681
  baseSha256: baseContentReceipt.sha256,
1358
1682
  baseByteLength: baseContentReceipt.byteLength,
1359
1683
  originalSize: action.originalSize ?? null,
1684
+ ...(action.allowArchivedIntegrationIngestAmendment
1685
+ ? { allowArchivedIntegrationIngestAmendment: true }
1686
+ : {}),
1360
1687
  contentRef: createHostedCanonicalWriteReceiptContentRef(payloadReceipt),
1361
1688
  };
1362
1689
  }
@@ -1374,10 +1701,21 @@ export class WriteBatch {
1374
1701
  };
1375
1702
  }
1376
1703
  case "delete":
1704
+ if (action.expectedTargetReceipt) {
1705
+ return {
1706
+ kind: "delete_if_match",
1707
+ targetRelativePath: action.targetRelativePath,
1708
+ existedBefore: action.existedBefore ?? false,
1709
+ expectedSha256: action.expectedTargetReceipt.sha256,
1710
+ expectedByteLength: action.expectedTargetReceipt.byteLength,
1711
+ ...(action.allowRaw ? { allowRaw: true } : {}),
1712
+ };
1713
+ }
1377
1714
  return {
1378
1715
  kind: "delete",
1379
1716
  targetRelativePath: action.targetRelativePath,
1380
1717
  existedBefore: action.existedBefore ?? false,
1718
+ ...(action.allowRaw ? { allowRaw: true } : {}),
1381
1719
  };
1382
1720
  }
1383
1721
  }
@@ -1386,7 +1724,11 @@ export class WriteBatch {
1386
1724
  }
1387
1725
  async createActionPayloadReceiptFromStage(action) {
1388
1726
  const stageAbsolutePath = resolveVaultPath(this.vaultRoot, action.stageRelativePath).absolutePath;
1389
- return createCommittedPayloadReceipt(await fs.readFile(stageAbsolutePath));
1727
+ const receipt = createCommittedPayloadReceipt(await fs.readFile(stageAbsolutePath));
1728
+ if (action.kind === "raw_copy") {
1729
+ this.assertExpectedSourceReceipt(action, receipt);
1730
+ }
1731
+ return receipt;
1390
1732
  }
1391
1733
  async applyAction(index, action) {
1392
1734
  if (action.kind === "raw_copy") {
@@ -1438,6 +1780,146 @@ export class WriteBatch {
1438
1780
  relativePath: action.targetRelativePath,
1439
1781
  });
1440
1782
  }
1783
+ assertExpectedSourceReceipt(action, actualReceipt) {
1784
+ if (action.expectedSourceReceipt
1785
+ && !receiptsMatch(actualReceipt, action.expectedSourceReceipt)) {
1786
+ throw new VaultError("OPERATION_PRECONDITION_FAILED", `Raw source for "${action.targetRelativePath}" changed after it was inspected.`, {
1787
+ operationId: this.operationId,
1788
+ relativePath: action.targetRelativePath,
1789
+ });
1790
+ }
1791
+ }
1792
+ async assertExpectedTargetReceipt(action, absolutePath) {
1793
+ if (!action.expectedTargetReceipt) {
1794
+ return;
1795
+ }
1796
+ let actualReceipt;
1797
+ try {
1798
+ actualReceipt = await createFileContentReceipt(absolutePath);
1799
+ }
1800
+ catch (error) {
1801
+ if (!isErrnoException(error) || error.code !== "ENOENT") {
1802
+ throw error;
1803
+ }
1804
+ throw new VaultError("OPERATION_PRECONDITION_FAILED", `Write target "${action.targetRelativePath}" disappeared after it was inspected.`, {
1805
+ operationId: this.operationId,
1806
+ relativePath: action.targetRelativePath,
1807
+ });
1808
+ }
1809
+ if (!receiptsMatch(actualReceipt, action.expectedTargetReceipt)) {
1810
+ throw new VaultError("OPERATION_PRECONDITION_FAILED", `Write target "${action.targetRelativePath}" changed after it was inspected.`, {
1811
+ operationId: this.operationId,
1812
+ relativePath: action.targetRelativePath,
1813
+ });
1814
+ }
1815
+ }
1816
+ async moveExpectedTargetToBackup(action, targetAbsolutePath) {
1817
+ if (!action.expectedTargetReceipt || !action.backupRelativePath) {
1818
+ throw new VaultError("OPERATION_PRECONDITION_INVALID", `Write target "${action.targetRelativePath}" has incomplete precondition metadata.`, {
1819
+ operationId: this.operationId,
1820
+ relativePath: action.targetRelativePath,
1821
+ });
1822
+ }
1823
+ const backupAbsolutePath = resolveVaultPath(this.vaultRoot, action.backupRelativePath).absolutePath;
1824
+ const backupExists = await pathExists(backupAbsolutePath);
1825
+ if (backupExists) {
1826
+ if (await pathExists(targetAbsolutePath)) {
1827
+ throw new VaultError("OPERATION_PRECONDITION_FAILED", `Write target "${action.targetRelativePath}" was recreated while its inspected bytes were quarantined.`, {
1828
+ operationId: this.operationId,
1829
+ relativePath: action.targetRelativePath,
1830
+ });
1831
+ }
1832
+ }
1833
+ else {
1834
+ await ensureDirectory(path.dirname(backupAbsolutePath));
1835
+ try {
1836
+ await fs.rename(targetAbsolutePath, backupAbsolutePath);
1837
+ }
1838
+ catch (error) {
1839
+ if (!isErrnoException(error) || error.code !== "ENOENT") {
1840
+ throw error;
1841
+ }
1842
+ throw new VaultError("OPERATION_PRECONDITION_FAILED", `Write target "${action.targetRelativePath}" disappeared after it was inspected.`, {
1843
+ operationId: this.operationId,
1844
+ relativePath: action.targetRelativePath,
1845
+ });
1846
+ }
1847
+ }
1848
+ await this.assertExpectedTargetReceipt(action, backupAbsolutePath);
1849
+ return backupAbsolutePath;
1850
+ }
1851
+ async restoreExpectedTargetFromBackup(action) {
1852
+ if (!action.expectedTargetReceipt || !action.backupRelativePath) {
1853
+ return false;
1854
+ }
1855
+ const backupAbsolutePath = resolveVaultPath(this.vaultRoot, action.backupRelativePath).absolutePath;
1856
+ if (!(await pathExists(backupAbsolutePath))) {
1857
+ return false;
1858
+ }
1859
+ const targetAbsolutePath = resolveVaultPath(this.vaultRoot, action.targetRelativePath).absolutePath;
1860
+ const backupReceipt = await createFileContentReceipt(backupAbsolutePath);
1861
+ if (action.kind === "delete") {
1862
+ if (await pathExists(targetAbsolutePath)) {
1863
+ const targetReceipt = await createFileContentReceipt(targetAbsolutePath);
1864
+ if (receiptsMatch(backupReceipt, targetReceipt)) {
1865
+ return true;
1866
+ }
1867
+ throw new VaultError("OPERATION_ROLLBACK_CONFLICT", `Write target "${action.targetRelativePath}" was recreated before rollback; its quarantined bytes were retained.`, {
1868
+ operationId: this.operationId,
1869
+ relativePath: action.targetRelativePath,
1870
+ });
1871
+ }
1872
+ }
1873
+ else {
1874
+ const replacementRelativePath = `${action.backupRelativePath}.replacement`;
1875
+ const replacementAbsolutePath = resolveVaultPath(this.vaultRoot, replacementRelativePath).absolutePath;
1876
+ if (await pathExists(targetAbsolutePath)) {
1877
+ const targetReceipt = await createFileContentReceipt(targetAbsolutePath);
1878
+ if (receiptsMatch(backupReceipt, targetReceipt)) {
1879
+ return true;
1880
+ }
1881
+ if (await pathExists(replacementAbsolutePath)) {
1882
+ throw new VaultError("OPERATION_ROLLBACK_CONFLICT", `Text target "${action.targetRelativePath}" and its replacement quarantine both exist; all bytes were retained.`, {
1883
+ operationId: this.operationId,
1884
+ relativePath: action.targetRelativePath,
1885
+ });
1886
+ }
1887
+ await ensureDirectory(path.dirname(replacementAbsolutePath));
1888
+ await fs.rename(targetAbsolutePath, replacementAbsolutePath);
1889
+ }
1890
+ if (await pathExists(replacementAbsolutePath)) {
1891
+ const replacementReceipt = await createFileContentReceipt(replacementAbsolutePath);
1892
+ if (!action.committedPayloadReceipt
1893
+ || !receiptsMatch(replacementReceipt, action.committedPayloadReceipt)) {
1894
+ try {
1895
+ await copyFileAtomicExclusive(replacementAbsolutePath, targetAbsolutePath);
1896
+ }
1897
+ catch (error) {
1898
+ throw new VaultError("OPERATION_ROLLBACK_CONFLICT", `Text target "${action.targetRelativePath}" changed during rollback; the changed bytes and original backup were retained.`, {
1899
+ cause: error instanceof Error ? error.message : String(error),
1900
+ operationId: this.operationId,
1901
+ relativePath: action.targetRelativePath,
1902
+ });
1903
+ }
1904
+ throw new VaultError("OPERATION_ROLLBACK_CONFLICT", `Text target "${action.targetRelativePath}" changed before rollback; the changed bytes and original backup were retained.`, {
1905
+ operationId: this.operationId,
1906
+ relativePath: action.targetRelativePath,
1907
+ });
1908
+ }
1909
+ }
1910
+ }
1911
+ try {
1912
+ await copyFileAtomicExclusive(backupAbsolutePath, targetAbsolutePath);
1913
+ }
1914
+ catch (error) {
1915
+ throw new VaultError("OPERATION_ROLLBACK_CONFLICT", `Write target "${action.targetRelativePath}" was recreated during rollback; its quarantined bytes were retained.`, {
1916
+ cause: error instanceof Error ? error.message : String(error),
1917
+ operationId: this.operationId,
1918
+ relativePath: action.targetRelativePath,
1919
+ });
1920
+ }
1921
+ return true;
1922
+ }
1441
1923
  getPreparedJsonlBaseReceipt(action) {
1442
1924
  if (action.baseContentReceipt) {
1443
1925
  return action.baseContentReceipt;
@@ -1449,7 +1931,11 @@ export class WriteBatch {
1449
1931
  }
1450
1932
  async applyRawCopy(action) {
1451
1933
  const stageAbsolutePath = resolveVaultPath(this.vaultRoot, action.stageRelativePath).absolutePath;
1452
- const stagedContent = await fs.readFile(stageAbsolutePath);
1934
+ const [stagedContent, stagedStats] = await Promise.all([
1935
+ fs.readFile(stageAbsolutePath),
1936
+ fs.stat(stageAbsolutePath),
1937
+ ]);
1938
+ this.assertExpectedSourceReceipt(action, createCommittedPayloadReceipt(stagedContent));
1453
1939
  await this.applyPreparedAction({
1454
1940
  action,
1455
1941
  finalize: (result) => {
@@ -1473,7 +1959,9 @@ export class WriteBatch {
1473
1959
  mutateTarget: async (target) => await applyImmutableWriteTarget({
1474
1960
  allowExistingMatch: action.allowExistingMatch,
1475
1961
  createEffect: "copy",
1476
- createTarget: () => copyFileAtomicExclusive(stageAbsolutePath, target.absolutePath),
1962
+ createTarget: () => writeBytesFileAtomicExclusive(target.absolutePath, stagedContent, {
1963
+ mode: stagedStats.mode & 0o7777,
1964
+ }),
1477
1965
  existsErrorMessage: "Raw target already exists and may not be overwritten.",
1478
1966
  matchesExistingContent: async () => {
1479
1967
  const existingContent = await fs.readFile(target.absolutePath);
@@ -1525,9 +2013,39 @@ export class WriteBatch {
1525
2013
  return undefined;
1526
2014
  },
1527
2015
  mutateTarget: async (target) => {
1528
- if (action.existedBefore === true && action.overwrite && !(await pathExists(target.absolutePath))) {
2016
+ if (!action.expectedTargetReceipt
2017
+ &&
2018
+ action.existedBefore === true
2019
+ && action.overwrite
2020
+ && !(await pathExists(target.absolutePath))) {
1529
2021
  throw this.buildResumeConflictError(action, `Text target "${action.targetRelativePath}" disappeared while resuming the write batch.`);
1530
2022
  }
2023
+ if (action.expectedTargetReceipt) {
2024
+ if (!action.overwrite || !action.backupRelativePath) {
2025
+ throw new VaultError("OPERATION_PRECONDITION_INVALID", `Receipt-guarded text target "${action.targetRelativePath}" has incomplete replacement metadata.`, {
2026
+ operationId: this.operationId,
2027
+ relativePath: action.targetRelativePath,
2028
+ });
2029
+ }
2030
+ const backupAbsolutePath = await this.moveExpectedTargetToBackup(action, target.absolutePath);
2031
+ const replacementMode = (await fs.stat(backupAbsolutePath)).mode & 0o7777;
2032
+ try {
2033
+ await writeBytesFileAtomicExclusive(target.absolutePath, Buffer.from(stagedContent, "utf8"), { mode: replacementMode });
2034
+ }
2035
+ catch (error) {
2036
+ if (!isErrnoException(error) || error.code !== "EEXIST") {
2037
+ throw error;
2038
+ }
2039
+ throw new VaultError("OPERATION_PRECONDITION_FAILED", `Text target "${action.targetRelativePath}" was recreated while its inspected bytes were quarantined.`, {
2040
+ operationId: this.operationId,
2041
+ relativePath: action.targetRelativePath,
2042
+ });
2043
+ }
2044
+ return {
2045
+ effect: "update",
2046
+ existedBefore: true,
2047
+ };
2048
+ }
1531
2049
  return await applyTextWriteTarget({
1532
2050
  allowExistingMatch: action.allowExistingMatch,
1533
2051
  backupExisting: action.overwrite
@@ -1574,7 +2092,10 @@ export class WriteBatch {
1574
2092
  }
1575
2093
  return changed;
1576
2094
  });
1577
- if (action.overwrite && existedBefore && backupRelativePath) {
2095
+ if (action.overwrite
2096
+ && existedBefore
2097
+ && backupRelativePath
2098
+ && !action.expectedTargetReceipt) {
1578
2099
  await this.ensureBackupArtifactExists(target.absolutePath, backupRelativePath);
1579
2100
  }
1580
2101
  },
@@ -1586,6 +2107,9 @@ export class WriteBatch {
1586
2107
  const payload = await readText(stageAbsolutePath);
1587
2108
  const payloadBytes = Buffer.from(payload, "utf8");
1588
2109
  const payloadReceipt = action.committedPayloadReceipt ?? createCommittedPayloadReceipt(payloadBytes);
2110
+ const comparisonOptions = {
2111
+ caseInsensitive: await isVaultFilesystemCaseInsensitive(this.vaultRoot),
2112
+ };
1589
2113
  await this.applyPreparedAction({
1590
2114
  action,
1591
2115
  finalize: (result) => {
@@ -1600,6 +2124,34 @@ export class WriteBatch {
1600
2124
  return undefined;
1601
2125
  }
1602
2126
  const baseContentReceipt = this.getPreparedJsonlBaseReceipt(action);
2127
+ if (action.allowArchivedIntegrationIngestAmendment) {
2128
+ const archived = await readArchivedIntegrationIngestShardText(this.vaultRoot, action.targetRelativePath);
2129
+ if (archived) {
2130
+ const targetContent = Buffer.from(archived.content, "utf8");
2131
+ if (targetContent.byteLength < action.originalSize) {
2132
+ throw this.buildResumeConflictError(action, `Archived append target "${action.targetRelativePath}" changed unexpectedly while resuming the write batch.`);
2133
+ }
2134
+ const actualBaseReceipt = createCommittedPayloadReceipt(targetContent.subarray(0, action.originalSize));
2135
+ if (!receiptsMatch(actualBaseReceipt, baseContentReceipt)) {
2136
+ throw this.buildResumeConflictError(action, `Archived append target "${action.targetRelativePath}" base content changed while resuming the write batch.`);
2137
+ }
2138
+ if (targetContent.byteLength === action.originalSize) {
2139
+ return undefined;
2140
+ }
2141
+ const expectedSize = action.originalSize + payloadBytes.byteLength;
2142
+ if (targetContent.byteLength !== expectedSize) {
2143
+ throw this.buildResumeConflictError(action, `Archived append target "${action.targetRelativePath}" changed unexpectedly while resuming the write batch.`);
2144
+ }
2145
+ if (!targetContent.subarray(action.originalSize).equals(payloadBytes)) {
2146
+ throw this.buildResumeConflictError(action, `Archived append target "${action.targetRelativePath}" changed unexpectedly while resuming the write batch.`);
2147
+ }
2148
+ return {
2149
+ effect: "append",
2150
+ existedBefore: true,
2151
+ originalSize: action.originalSize,
2152
+ };
2153
+ }
2154
+ }
1603
2155
  if (!(await pathExists(target.absolutePath))) {
1604
2156
  if (action.existedBefore) {
1605
2157
  throw this.buildResumeConflictError(action, `Append target "${action.targetRelativePath}" disappeared while resuming the write batch.`);
@@ -1631,12 +2183,71 @@ export class WriteBatch {
1631
2183
  originalSize: action.originalSize,
1632
2184
  };
1633
2185
  },
1634
- mutateTarget: async (target) => await applyJsonlAppendTarget({
1635
- appendPayload: (payloadChunk) => fs.appendFile(target.absolutePath, payloadChunk, "utf8"),
1636
- readPayload: async () => payload,
1637
- target,
1638
- }),
2186
+ mutateTarget: async (target) => {
2187
+ try {
2188
+ return await applyJsonlAppendTarget({
2189
+ appendPayload: (payloadChunk) => fs.appendFile(target.absolutePath, payloadChunk, "utf8"),
2190
+ readPayload: async () => payload,
2191
+ target,
2192
+ });
2193
+ }
2194
+ catch (error) {
2195
+ if (action.allowArchivedIntegrationIngestAmendment &&
2196
+ isArchivedIntegrationIngestAppendError(error, target, comparisonOptions)) {
2197
+ const baseContentReceipt = action.baseContentReceipt;
2198
+ if (!baseContentReceipt) {
2199
+ throw this.buildResumeConflictError(action, `Archived append target "${action.targetRelativePath}" is missing its prepared base receipt.`);
2200
+ }
2201
+ const result = await appendArchivedIntegrationIngestShard({
2202
+ expectedBaseByteLength: baseContentReceipt.byteLength,
2203
+ expectedBaseSha256: baseContentReceipt.sha256,
2204
+ payload,
2205
+ targetRelativePath: action.targetRelativePath,
2206
+ vaultRoot: this.vaultRoot,
2207
+ });
2208
+ return {
2209
+ effect: "append",
2210
+ existedBefore: true,
2211
+ originalSize: result.originalSize,
2212
+ };
2213
+ }
2214
+ throw error;
2215
+ }
2216
+ },
1639
2217
  prepareMutation: async (target) => {
2218
+ if (action.allowArchivedIntegrationIngestAmendment) {
2219
+ const archived = await readArchivedIntegrationIngestShardText(this.vaultRoot, action.targetRelativePath);
2220
+ if (archived) {
2221
+ const archivedContent = Buffer.from(archived.content, "utf8");
2222
+ const originalSize = action.originalSize ?? archivedContent.byteLength;
2223
+ const baseContentReceipt = action.baseContentReceipt ??
2224
+ createCommittedPayloadReceipt(archivedContent);
2225
+ if (baseContentReceipt.byteLength !== originalSize) {
2226
+ throw this.buildResumeConflictError(action, `Archived append target "${action.targetRelativePath}" base size changed while preparing the write batch.`);
2227
+ }
2228
+ await this.persistPreparedAction(() => {
2229
+ let changed = false;
2230
+ if (action.baseContentReceipt === undefined) {
2231
+ action.baseContentReceipt = baseContentReceipt;
2232
+ changed = true;
2233
+ }
2234
+ if (action.committedPayloadReceipt === undefined) {
2235
+ action.committedPayloadReceipt = payloadReceipt;
2236
+ changed = true;
2237
+ }
2238
+ if (action.existedBefore === undefined) {
2239
+ action.existedBefore = true;
2240
+ changed = true;
2241
+ }
2242
+ if (action.originalSize === undefined) {
2243
+ action.originalSize = originalSize;
2244
+ changed = true;
2245
+ }
2246
+ return changed;
2247
+ });
2248
+ return;
2249
+ }
2250
+ }
1640
2251
  const existedBefore = action.existedBefore ?? (await pathExists(target.absolutePath));
1641
2252
  const originalSize = action.originalSize ?? (existedBefore ? (await fs.stat(target.absolutePath)).size : 0);
1642
2253
  const baseContentReceipt = action.baseContentReceipt ??
@@ -1703,6 +2314,9 @@ export class WriteBatch {
1703
2314
  if (!(await pathExists(backupAbsolutePath))) {
1704
2315
  throw this.buildResumeConflictError(action, `Delete backup "${action.backupRelativePath}" is missing while resuming the write batch.`);
1705
2316
  }
2317
+ if (action.expectedTargetReceipt) {
2318
+ await this.assertExpectedTargetReceipt(action, backupAbsolutePath);
2319
+ }
1706
2320
  return {
1707
2321
  backupRelativePath: action.backupRelativePath,
1708
2322
  existedBefore: true,
@@ -1712,12 +2326,23 @@ export class WriteBatch {
1712
2326
  mutateTarget: async (target) => {
1713
2327
  const existedBefore = await pathExists(target.absolutePath);
1714
2328
  if (!existedBefore) {
2329
+ if (action.expectedTargetReceipt) {
2330
+ await this.assertExpectedTargetReceipt(action, target.absolutePath);
2331
+ }
1715
2332
  return {
1716
2333
  existedBefore: false,
1717
2334
  state: "reused",
1718
2335
  };
1719
2336
  }
1720
2337
  const backupRelativePath = this.resolveActionBackupRelativePath(index, action);
2338
+ if (action.expectedTargetReceipt) {
2339
+ await this.moveExpectedTargetToBackup(action, target.absolutePath);
2340
+ return {
2341
+ backupRelativePath,
2342
+ existedBefore: true,
2343
+ state: "applied",
2344
+ };
2345
+ }
1721
2346
  await this.ensureBackupArtifactExists(target.absolutePath, backupRelativePath);
1722
2347
  await fs.unlink(target.absolutePath);
1723
2348
  return {
@@ -1743,7 +2368,9 @@ export class WriteBatch {
1743
2368
  }
1744
2369
  return changed;
1745
2370
  });
1746
- await this.ensureBackupArtifactExists(target.absolutePath, backupRelativePath);
2371
+ if (!action.expectedTargetReceipt) {
2372
+ await this.ensureBackupArtifactExists(target.absolutePath, backupRelativePath);
2373
+ }
1747
2374
  },
1748
2375
  prepareTarget: async () => await prepareVerifiedDeleteTarget(this.vaultRoot, action.targetRelativePath, {
1749
2376
  kind: "delete",
@@ -1753,6 +2380,13 @@ export class WriteBatch {
1753
2380
  }
1754
2381
  async rollbackAppliedActions() {
1755
2382
  for (const action of [...this.record.actions].reverse()) {
2383
+ if ((action.kind === "delete" || action.kind === "text_write")
2384
+ && action.expectedTargetReceipt
2385
+ && await this.restoreExpectedTargetFromBackup(action)) {
2386
+ action.state = "rolled_back";
2387
+ action.rolledBackAt = nowIso();
2388
+ continue;
2389
+ }
1756
2390
  if (action.state !== "applied") {
1757
2391
  continue;
1758
2392
  }
@@ -1771,7 +2405,18 @@ export class WriteBatch {
1771
2405
  }
1772
2406
  else if (action.kind === "jsonl_append") {
1773
2407
  const targetAbsolutePath = resolveVaultPath(this.vaultRoot, action.targetRelativePath).absolutePath;
1774
- if (!action.existedBefore) {
2408
+ if (action.allowArchivedIntegrationIngestAmendment &&
2409
+ action.baseContentReceipt &&
2410
+ action.originalSize !== undefined &&
2411
+ await readArchivedIntegrationIngestShardText(this.vaultRoot, action.targetRelativePath)) {
2412
+ await truncateArchivedIntegrationIngestShard({
2413
+ expectedBaseByteLength: action.originalSize,
2414
+ expectedBaseSha256: action.baseContentReceipt.sha256,
2415
+ targetRelativePath: action.targetRelativePath,
2416
+ vaultRoot: this.vaultRoot,
2417
+ });
2418
+ }
2419
+ else if (!action.existedBefore) {
1775
2420
  await safeUnlink(targetAbsolutePath);
1776
2421
  }
1777
2422
  else {