@remnic/core 9.69.11 → 9.69.13

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 (360) hide show
  1. package/dist/access-admin-ops-surface.d.ts +11 -11
  2. package/dist/access-admin-ops-surface.js +4 -4
  3. package/dist/access-authorization-probe.d.ts +11 -11
  4. package/dist/access-authorization-probe.js +5 -5
  5. package/dist/access-boundary.d.ts +11 -11
  6. package/dist/access-boundary.js +4 -4
  7. package/dist/access-cli.js +28 -28
  8. package/dist/access-coding-context-resolution.d.ts +1 -1
  9. package/dist/access-extraction-force-flush.d.ts +11 -11
  10. package/dist/access-extraction-force-flush.js +4 -4
  11. package/dist/access-health-types.d.ts +1 -1
  12. package/dist/access-http-lcm-compaction.d.ts +11 -11
  13. package/dist/access-http-lifecycle-flush.d.ts +11 -11
  14. package/dist/access-http-offline-stream.d.ts +11 -11
  15. package/dist/access-http-query.d.ts +2 -2
  16. package/dist/access-http-query.js +4 -4
  17. package/dist/access-http.d.ts +12 -12
  18. package/dist/access-http.js +15 -15
  19. package/dist/access-identity-continuity-surface.d.ts +9 -9
  20. package/dist/access-identity-continuity-surface.js +4 -4
  21. package/dist/access-lcm-surface.d.ts +11 -11
  22. package/dist/access-lcm-surface.js +4 -4
  23. package/dist/access-mcp.d.ts +11 -11
  24. package/dist/access-mcp.js +11 -11
  25. package/dist/access-memory-search-fanout.d.ts +2 -2
  26. package/dist/{access-namespace-preflight-Cy0yPsaE.d.ts → access-namespace-preflight-Rzuo1nGR.d.ts} +1 -1
  27. package/dist/access-namespace-preflight.d.ts +3 -3
  28. package/dist/access-namespace-preflight.js +4 -4
  29. package/dist/access-observe-write-surface.d.ts +11 -11
  30. package/dist/access-observe-write-surface.js +4 -4
  31. package/dist/access-offline-manifest.d.ts +9 -9
  32. package/dist/access-operations-batch.js +5 -5
  33. package/dist/access-operations.d.ts +17 -17
  34. package/dist/access-operations.js +10 -10
  35. package/dist/access-recall-concurrency.d.ts +11 -11
  36. package/dist/access-recall-concurrency.js +4 -4
  37. package/dist/access-recall-response.d.ts +11 -11
  38. package/dist/access-recall-response.js +4 -4
  39. package/dist/access-recall-surface.d.ts +11 -11
  40. package/dist/access-recall-surface.js +4 -4
  41. package/dist/access-schema.d.ts +91 -91
  42. package/dist/{access-service-Cqfk3dD1.d.ts → access-service-Bb2Fykzc.d.ts} +71 -71
  43. package/dist/access-service-helpers.d.ts +11 -11
  44. package/dist/access-service.d.ts +11 -11
  45. package/dist/access-service.js +4 -4
  46. package/dist/access-surface-catalog.d.ts +11 -11
  47. package/dist/access-surface-catalog.js +6 -6
  48. package/dist/access-wearables-meetings-surface.d.ts +3 -3
  49. package/dist/action-confidence.d.ts +1 -1
  50. package/dist/active-memory-bridge.d.ts +1 -1
  51. package/dist/active-recall.d.ts +1 -1
  52. package/dist/active-recall.js +4 -4
  53. package/dist/ambient-provenance.d.ts +1 -1
  54. package/dist/artifact-search.d.ts +1 -1
  55. package/dist/behavior-learner.d.ts +1 -1
  56. package/dist/behavior-signals.d.ts +1 -1
  57. package/dist/bootstrap.d.ts +9 -9
  58. package/dist/briefing-window.d.ts +2 -2
  59. package/dist/briefing.d.ts +2 -2
  60. package/dist/buffer-surprise-report.d.ts +1 -1
  61. package/dist/buffer-turn-helpers.d.ts +1 -1
  62. package/dist/buffer.d.ts +2 -2
  63. package/dist/buffer.js +4 -4
  64. package/dist/bulk-import/index.d.ts +3 -3
  65. package/dist/calibration.d.ts +1 -1
  66. package/dist/capabilities.d.ts +1 -1
  67. package/dist/{catalog-9X8WpZNO.d.ts → catalog-DjTLVOYp.d.ts} +1 -1
  68. package/dist/causal-behavior.d.ts +1 -1
  69. package/dist/causal-consolidation.d.ts +1 -1
  70. package/dist/causal-trajectory-graph.d.ts +1 -1
  71. package/dist/{chunk-TEZ2HTC7.js → chunk-33JKYLPX.js} +2 -2
  72. package/dist/{chunk-MNH2GM4O.js → chunk-3BS2OGDT.js} +6 -19
  73. package/dist/{chunk-MNH2GM4O.js.map → chunk-3BS2OGDT.js.map} +1 -1
  74. package/dist/{chunk-5PTS43CH.js → chunk-4LG4CPOC.js} +2 -2
  75. package/dist/{chunk-Z33VUMKY.js → chunk-5H2G5X4R.js} +2 -2
  76. package/dist/{chunk-XFPHV65N.js → chunk-5JQV4T5Q.js} +2 -2
  77. package/dist/{chunk-OASGWNYL.js → chunk-63I7LMLG.js} +2 -2
  78. package/dist/{chunk-J3NGQ5SC.js → chunk-7GSSHAXC.js} +2 -2
  79. package/dist/{chunk-X4FIZAVQ.js → chunk-7JV4JST3.js} +854 -42
  80. package/dist/chunk-7JV4JST3.js.map +1 -0
  81. package/dist/{chunk-VHAKBUBD.js → chunk-B64IVEOH.js} +2 -2
  82. package/dist/{chunk-R7FXPG4T.js → chunk-C25N5HWX.js} +2 -2
  83. package/dist/{chunk-DH3V7RCQ.js → chunk-F2ERDKY2.js} +7 -7
  84. package/dist/{chunk-LJNLLNEM.js → chunk-HODFGQGT.js} +2 -2
  85. package/dist/{chunk-B75VCEX5.js → chunk-K2IJH4D3.js} +2 -2
  86. package/dist/{chunk-227WJVPY.js → chunk-KLSPKMIO.js} +2 -2
  87. package/dist/{chunk-5P2KNFJZ.js → chunk-MSDIETFC.js} +3 -3
  88. package/dist/{chunk-HFRGCNFY.js → chunk-OAKATRAN.js} +2 -2
  89. package/dist/chunk-OGUKSLYZ.js +560 -0
  90. package/dist/chunk-OGUKSLYZ.js.map +1 -0
  91. package/dist/{chunk-M6L7HI7R.js → chunk-P6FHFTZ7.js} +16 -1
  92. package/dist/chunk-P6FHFTZ7.js.map +1 -0
  93. package/dist/{chunk-LWBSEYW3.js → chunk-PAWIY5OQ.js} +5 -5
  94. package/dist/{chunk-3ITTF7YH.js → chunk-QVI63XSO.js} +90 -383
  95. package/dist/chunk-QVI63XSO.js.map +1 -0
  96. package/dist/{chunk-6TOWUN2R.js → chunk-RE3H6Y2X.js} +2 -2
  97. package/dist/{chunk-V3HUBF7T.js → chunk-S35IIP5P.js} +2 -2
  98. package/dist/{chunk-3YKOFCKP.js → chunk-SXHBZXHK.js} +2 -2
  99. package/dist/{chunk-7NCUHD5U.js → chunk-VAMZYOOV.js} +2 -2
  100. package/dist/{chunk-PGCZLHRB.js → chunk-W272SWN7.js} +3 -3
  101. package/dist/{chunk-5HO3QBAD.js → chunk-W6GEMUZM.js} +2 -2
  102. package/dist/{chunk-UCNQV43K.js → chunk-XQYTSZW3.js} +2 -2
  103. package/dist/{chunk-GR4C3FHT.js → chunk-ZKZCJRRO.js} +2 -2
  104. package/dist/{cli-Dk-lM_tI.d.ts → cli-DXXy60A4.d.ts} +5 -5
  105. package/dist/cli.d.ts +13 -13
  106. package/dist/cli.js +21 -21
  107. package/dist/coding/export-okf-codegraph.d.ts +1 -1
  108. package/dist/coding/pre-action-gate.d.ts +1 -1
  109. package/dist/compounding/engine.d.ts +2 -2
  110. package/dist/compounding/preference-consolidator.d.ts +1 -1
  111. package/dist/compression-optimizer.d.ts +1 -1
  112. package/dist/config.d.ts +1 -1
  113. package/dist/config.js +4 -4
  114. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  115. package/dist/connectors/codex-materialize.d.ts +1 -1
  116. package/dist/connectors/index.d.ts +1 -1
  117. package/dist/consolidation-provenance-check.d.ts +2 -2
  118. package/dist/consolidation-undo.d.ts +2 -2
  119. package/dist/contradiction/index.d.ts +3 -3
  120. package/dist/converge-config.d.ts +1 -1
  121. package/dist/convergence-refresh.d.ts +2 -2
  122. package/dist/conversation-index/backend.d.ts +1 -1
  123. package/dist/conversation-index/chunker.d.ts +1 -1
  124. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  125. package/dist/conversation-index/indexer.d.ts +1 -1
  126. package/dist/conversation-index/search.d.ts +1 -1
  127. package/dist/corpus-watermark.d.ts +1 -1
  128. package/dist/cross-lingual-recall.d.ts +1 -1
  129. package/dist/day-summary.d.ts +1 -1
  130. package/dist/deep-recall-http-glue.d.ts +11 -11
  131. package/dist/deep-recall-mcp-tools.d.ts +11 -11
  132. package/dist/deep-recall-policy-llm.d.ts +1 -1
  133. package/dist/deep-recall-seeds.d.ts +1 -1
  134. package/dist/delinearize.d.ts +1 -1
  135. package/dist/dependency-propagation-config.d.ts +1 -1
  136. package/dist/{dependency-propagation-delivery-BZGUecZf.d.ts → dependency-propagation-delivery-37JdQv_3.d.ts} +1 -1
  137. package/dist/direct-answer-wiring.d.ts +1 -1
  138. package/dist/direct-answer.d.ts +1 -1
  139. package/dist/embedding-fallback.d.ts +1 -1
  140. package/dist/enrichment/index.d.ts +1 -1
  141. package/dist/entity-origin-fields.d.ts +1 -1
  142. package/dist/entity-retrieval.d.ts +2 -2
  143. package/dist/entity-schema.d.ts +1 -1
  144. package/dist/episodic-context.d.ts +1 -1
  145. package/dist/eval-trajectory-contracts.d.ts +1 -1
  146. package/dist/eval-trajectory-store.d.ts +1 -1
  147. package/dist/eval-trajectory.d.ts +1 -1
  148. package/dist/explicit-capture.d.ts +9 -9
  149. package/dist/external-wiki-access.d.ts +11 -11
  150. package/dist/external-wiki-access.js +5 -5
  151. package/dist/external-wiki-collection-registration.d.ts +1 -1
  152. package/dist/external-wiki-collection.d.ts +1 -1
  153. package/dist/external-wiki-mcp-tools.d.ts +11 -11
  154. package/dist/extraction-error-classification.d.ts +1 -1
  155. package/dist/extraction-faithfulness.d.ts +1 -1
  156. package/dist/extraction-judge-telemetry.d.ts +1 -1
  157. package/dist/extraction-judge-training.d.ts +1 -1
  158. package/dist/extraction-judge.d.ts +1 -1
  159. package/dist/extraction-liveness.d.ts +1 -1
  160. package/dist/extraction-normalization.d.ts +1 -1
  161. package/dist/extraction-prompt.d.ts +1 -1
  162. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  163. package/dist/extraction-source-grounding.d.ts +1 -1
  164. package/dist/extraction.d.ts +1 -1
  165. package/dist/extraction.js +5 -5
  166. package/dist/fallback-llm.d.ts +1 -1
  167. package/dist/graph-dashboard-diff.d.ts +1 -1
  168. package/dist/graph-dashboard-key.d.ts +1 -1
  169. package/dist/graph-dashboard-parser.d.ts +1 -1
  170. package/dist/graph-edge-reinforcement.d.ts +1 -1
  171. package/dist/graph-path-reconstruction.d.ts +1 -1
  172. package/dist/graph-path-scoring.d.ts +1 -1
  173. package/dist/graph-snapshot.d.ts +1 -1
  174. package/dist/graph.d.ts +1 -1
  175. package/dist/importance.d.ts +1 -1
  176. package/dist/importers/index.d.ts +1 -1
  177. package/dist/in-flight-reads.d.ts +1 -1
  178. package/dist/{index-B4iTvT-w.d.ts → index-DquhYqsc.d.ts} +2 -2
  179. package/dist/index.d.ts +876 -738
  180. package/dist/index.js +59 -37
  181. package/dist/intent.d.ts +1 -1
  182. package/dist/lcm/engine.d.ts +1 -1
  183. package/dist/lcm/index.d.ts +1 -1
  184. package/dist/lcm/tools.d.ts +1 -1
  185. package/dist/lifecycle.d.ts +1 -1
  186. package/dist/live-connectors-runner.d.ts +1 -1
  187. package/dist/local-llm.d.ts +1 -1
  188. package/dist/local-model-endpoint.d.ts +1 -1
  189. package/dist/location/index.d.ts +3 -3
  190. package/dist/location/index.js +5 -5
  191. package/dist/maintenance/memory-governance.d.ts +1 -1
  192. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  193. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  194. package/dist/{maintenance-BBpNqEeJ.d.ts → maintenance-CizZOycr.d.ts} +3 -3
  195. package/dist/mcp-memory-inspector-app.d.ts +11 -11
  196. package/dist/memory-action-policy.d.ts +1 -1
  197. package/dist/memory-cache.d.ts +1 -1
  198. package/dist/memory-controller.d.ts +1 -1
  199. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  200. package/dist/memory-projection-store.d.ts +1 -1
  201. package/dist/memory-provenance.d.ts +1 -1
  202. package/dist/memory-snapshot.d.ts +1 -1
  203. package/dist/memory-subject-cli.d.ts +11 -11
  204. package/dist/memory-subject.d.ts +11 -11
  205. package/dist/memory-worth-outcomes.d.ts +2 -2
  206. package/dist/models-json.d.ts +1 -1
  207. package/dist/namespaces/migrate.d.ts +3 -3
  208. package/dist/namespaces/principal.d.ts +1 -1
  209. package/dist/namespaces/search.d.ts +1 -1
  210. package/dist/namespaces/storage.d.ts +3 -3
  211. package/dist/native-knowledge.d.ts +1 -1
  212. package/dist/offline-sync-impression-drain.d.ts +1 -1
  213. package/dist/operator-doctor-corpus.d.ts +1 -1
  214. package/dist/operator-doctor-replica.d.ts +1 -1
  215. package/dist/operator-toolkit.d.ts +3 -3
  216. package/dist/operator-toolkit.js +5 -5
  217. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  218. package/dist/orchestration/maintenance.d.ts +4 -4
  219. package/dist/orchestration/maintenance.js +6 -6
  220. package/dist/{orchestrator-DglY1H0w.d.ts → orchestrator-DqLcuNMP.d.ts} +8 -8
  221. package/dist/orchestrator.d.ts +9 -9
  222. package/dist/orchestrator.js +28 -28
  223. package/dist/patterns-cli.d.ts +1 -1
  224. package/dist/{pipeline-C7qRsy6g.d.ts → pipeline-DbJpmcRu.d.ts} +1 -1
  225. package/dist/policy-runtime.d.ts +1 -1
  226. package/dist/proactive-contention.d.ts +1 -1
  227. package/dist/provenance.d.ts +1 -1
  228. package/dist/{public-http-CPpCsi35.d.ts → public-http-NQ3UUp6W.d.ts} +1 -1
  229. package/dist/{qmd-YRLTa3AE.d.ts → qmd-DA_7fbSz.d.ts} +1 -1
  230. package/dist/qmd-preflight.d.ts +2 -2
  231. package/dist/qmd-recall-cache.d.ts +1 -1
  232. package/dist/qmd.d.ts +2 -2
  233. package/dist/recall-concurrency-config.d.ts +1 -1
  234. package/dist/recall-disclosure-escalation.d.ts +1 -1
  235. package/dist/recall-explain-renderer.d.ts +1 -1
  236. package/dist/recall-memory-map.d.ts +1 -1
  237. package/dist/recall-navigate-access.d.ts +1 -1
  238. package/dist/recall-navigate-disclosure.d.ts +1 -1
  239. package/dist/recall-navigate.d.ts +1 -1
  240. package/dist/recall-planner-llm.d.ts +1 -1
  241. package/dist/recall-state.d.ts +1 -1
  242. package/dist/recall-tag-filter.d.ts +1 -1
  243. package/dist/recall-timings.d.ts +1 -1
  244. package/dist/recall-xray-cli.d.ts +1 -1
  245. package/dist/recall-xray-renderer.d.ts +1 -1
  246. package/dist/recall-xray.d.ts +1 -1
  247. package/dist/reconcile/cursor.d.ts +1 -1
  248. package/dist/reconcile/manifest.d.ts +1 -1
  249. package/dist/reconcile/plan.d.ts +1 -1
  250. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  251. package/dist/replay/normalizers/claude.d.ts +1 -1
  252. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  253. package/dist/replay/normalizers/shared.d.ts +1 -1
  254. package/dist/replay/runner.d.ts +1 -1
  255. package/dist/replay/types.d.ts +1 -1
  256. package/dist/replica-divergence.d.ts +1 -1
  257. package/dist/replica-peers-config.d.ts +1 -1
  258. package/dist/resolve-auth-token.d.ts +1 -1
  259. package/dist/resume-bundles.js +5 -5
  260. package/dist/retrieval-agents.d.ts +2 -2
  261. package/dist/retrieval-tiers.d.ts +1 -1
  262. package/dist/routing/engine.d.ts +1 -1
  263. package/dist/routing/store.d.ts +1 -1
  264. package/dist/salvage-envelope.d.ts +1 -1
  265. package/dist/schemas.d.ts +176 -176
  266. package/dist/{scope-profiles-BVvqVzJX.d.ts → scope-profiles-BpiWKZzx.d.ts} +1 -1
  267. package/dist/search/embed-helper.d.ts +1 -1
  268. package/dist/search/factory.d.ts +1 -1
  269. package/dist/search/index.d.ts +1 -1
  270. package/dist/search/lancedb-backend.d.ts +1 -1
  271. package/dist/search/meilisearch-backend.d.ts +1 -1
  272. package/dist/search/noop-backend.d.ts +1 -1
  273. package/dist/search/orama-backend.d.ts +1 -1
  274. package/dist/search/port.d.ts +1 -1
  275. package/dist/search/remote-backend.d.ts +1 -1
  276. package/dist/{semantic-consolidation-BzCI6Kuu.d.ts → semantic-consolidation-NJpaZpkY.d.ts} +1 -1
  277. package/dist/semantic-consolidation.d.ts +2 -2
  278. package/dist/semantic-rule-verifier.d.ts +1 -1
  279. package/dist/{service-DQ3Gscy5.d.ts → service-DdlZjX1D.d.ts} +2 -2
  280. package/dist/session-observer-bands.d.ts +1 -1
  281. package/dist/session-observer-state.d.ts +1 -1
  282. package/dist/shared-context/manager.d.ts +7 -7
  283. package/dist/signal.d.ts +1 -1
  284. package/dist/source-agent-qualifier.d.ts +1 -1
  285. package/dist/source-agent-qualifier.js +4 -4
  286. package/dist/standup/build.js +2 -2
  287. package/dist/{storage-DmTbQdD0.d.ts → storage-C7BWrpU9.d.ts} +1 -1
  288. package/dist/storage.d.ts +2 -2
  289. package/dist/subject-config.d.ts +1 -1
  290. package/dist/summarizer.d.ts +1 -1
  291. package/dist/summary-snapshot.d.ts +1 -1
  292. package/dist/support-passport/index.d.ts +14 -14
  293. package/dist/support-passport/index.js +7 -7
  294. package/dist/temporal-supersession.d.ts +2 -2
  295. package/dist/temporal-timeline-recall.d.ts +1 -1
  296. package/dist/temporal-validity.d.ts +1 -1
  297. package/dist/threading.d.ts +1 -1
  298. package/dist/tier-migration.d.ts +2 -2
  299. package/dist/tier-routing.d.ts +1 -1
  300. package/dist/topics.d.ts +1 -1
  301. package/dist/transcript.d.ts +1 -1
  302. package/dist/transfer/export-okf.d.ts +1 -1
  303. package/dist/transfer/types.d.ts +78 -78
  304. package/dist/trust-score-stage.d.ts +1 -1
  305. package/dist/trust-score.d.ts +1 -1
  306. package/dist/{types-CLRTESSD.d.ts → types-Cy1l6fzp.d.ts} +48 -1
  307. package/dist/types.d.ts +1 -1
  308. package/dist/utility-runtime.d.ts +1 -1
  309. package/dist/who-knows-cli.d.ts +11 -11
  310. package/dist/who-knows.d.ts +11 -11
  311. package/dist/write-envelope.d.ts +1 -1
  312. package/package.json +2 -2
  313. package/src/activity/config.test.ts +94 -1
  314. package/src/activity/config.ts +256 -3
  315. package/src/activity/digest.ts +21 -0
  316. package/src/activity/index.ts +2 -0
  317. package/src/activity/runner.ts +2 -17
  318. package/src/activity/timeline/publish-cli.test.ts +169 -0
  319. package/src/activity/timeline/publish-cli.ts +144 -0
  320. package/src/activity/timeline/query.ts +51 -15
  321. package/src/activity/types.ts +45 -0
  322. package/src/activity/vault-insert.ts +14 -33
  323. package/src/activity/vault-path.ts +100 -22
  324. package/src/activity/vault-publish.test.ts +51 -0
  325. package/src/activity/vault-publish.ts +157 -17
  326. package/src/activity/vault-publisher.test.ts +881 -0
  327. package/src/activity/vault-publisher.ts +597 -0
  328. package/src/activity/vault-region.test.ts +5 -0
  329. package/src/activity/vault-region.ts +7 -2
  330. package/src/cli/timeline-publish-commands.ts +34 -0
  331. package/src/cli.ts +2 -2
  332. package/src/config.test.ts +24 -1
  333. package/dist/chunk-3ITTF7YH.js.map +0 -1
  334. package/dist/chunk-KJUWWN3T.js +0 -237
  335. package/dist/chunk-KJUWWN3T.js.map +0 -1
  336. package/dist/chunk-M6L7HI7R.js.map +0 -1
  337. package/dist/chunk-X4FIZAVQ.js.map +0 -1
  338. /package/dist/{chunk-TEZ2HTC7.js.map → chunk-33JKYLPX.js.map} +0 -0
  339. /package/dist/{chunk-5PTS43CH.js.map → chunk-4LG4CPOC.js.map} +0 -0
  340. /package/dist/{chunk-Z33VUMKY.js.map → chunk-5H2G5X4R.js.map} +0 -0
  341. /package/dist/{chunk-XFPHV65N.js.map → chunk-5JQV4T5Q.js.map} +0 -0
  342. /package/dist/{chunk-OASGWNYL.js.map → chunk-63I7LMLG.js.map} +0 -0
  343. /package/dist/{chunk-J3NGQ5SC.js.map → chunk-7GSSHAXC.js.map} +0 -0
  344. /package/dist/{chunk-VHAKBUBD.js.map → chunk-B64IVEOH.js.map} +0 -0
  345. /package/dist/{chunk-R7FXPG4T.js.map → chunk-C25N5HWX.js.map} +0 -0
  346. /package/dist/{chunk-DH3V7RCQ.js.map → chunk-F2ERDKY2.js.map} +0 -0
  347. /package/dist/{chunk-LJNLLNEM.js.map → chunk-HODFGQGT.js.map} +0 -0
  348. /package/dist/{chunk-B75VCEX5.js.map → chunk-K2IJH4D3.js.map} +0 -0
  349. /package/dist/{chunk-227WJVPY.js.map → chunk-KLSPKMIO.js.map} +0 -0
  350. /package/dist/{chunk-5P2KNFJZ.js.map → chunk-MSDIETFC.js.map} +0 -0
  351. /package/dist/{chunk-HFRGCNFY.js.map → chunk-OAKATRAN.js.map} +0 -0
  352. /package/dist/{chunk-LWBSEYW3.js.map → chunk-PAWIY5OQ.js.map} +0 -0
  353. /package/dist/{chunk-6TOWUN2R.js.map → chunk-RE3H6Y2X.js.map} +0 -0
  354. /package/dist/{chunk-V3HUBF7T.js.map → chunk-S35IIP5P.js.map} +0 -0
  355. /package/dist/{chunk-3YKOFCKP.js.map → chunk-SXHBZXHK.js.map} +0 -0
  356. /package/dist/{chunk-7NCUHD5U.js.map → chunk-VAMZYOOV.js.map} +0 -0
  357. /package/dist/{chunk-PGCZLHRB.js.map → chunk-W272SWN7.js.map} +0 -0
  358. /package/dist/{chunk-5HO3QBAD.js.map → chunk-W6GEMUZM.js.map} +0 -0
  359. /package/dist/{chunk-UCNQV43K.js.map → chunk-XQYTSZW3.js.map} +0 -0
  360. /package/dist/{chunk-GR4C3FHT.js.map → chunk-ZKZCJRRO.js.map} +0 -0
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  ActivityStore,
15
15
  MaintenanceScheduler
16
- } from "./chunk-MNH2GM4O.js";
16
+ } from "./chunk-3BS2OGDT.js";
17
17
  import {
18
18
  runPeerProfileReasoner
19
19
  } from "./chunk-I74SUMNI.js";
@@ -160,7 +160,7 @@ import {
160
160
  } from "./chunk-OH7QLI6W.js";
161
161
  import {
162
162
  ExtractionEngine
163
- } from "./chunk-B75VCEX5.js";
163
+ } from "./chunk-K2IJH4D3.js";
164
164
  import {
165
165
  parseMemoryActionEligibilityContext
166
166
  } from "./chunk-AJTG3CP7.js";
@@ -215,8 +215,10 @@ import {
215
215
  ensureBuiltInWearableConnectors,
216
216
  getWearableConnector,
217
217
  listWearableConnectors,
218
- screenCandidateFact
219
- } from "./chunk-X4FIZAVQ.js";
218
+ runTimelinePublishCli,
219
+ screenCandidateFact,
220
+ summarizeVaultPublish
221
+ } from "./chunk-7JV4JST3.js";
220
222
  import {
221
223
  RoutingRulesStore
222
224
  } from "./chunk-TBUEE7XF.js";
@@ -246,7 +248,7 @@ import {
246
248
  import {
247
249
  runNamespaceMaintenanceFanout,
248
250
  summarizeNamespaceMaintenanceHealth
249
- } from "./chunk-HFRGCNFY.js";
251
+ } from "./chunk-OAKATRAN.js";
250
252
  import {
251
253
  planNamespaceMaintenance
252
254
  } from "./chunk-BO4PWIJY.js";
@@ -287,7 +289,7 @@ import {
287
289
  } from "./chunk-6TBIWIAG.js";
288
290
  import {
289
291
  SmartBuffer
290
- } from "./chunk-5PTS43CH.js";
292
+ } from "./chunk-4LG4CPOC.js";
291
293
  import {
292
294
  buildRecallQueryPolicy
293
295
  } from "./chunk-C6WMSXCJ.js";
@@ -311,7 +313,7 @@ import {
311
313
  applyNoveltyGate,
312
314
  detectMeetings,
313
315
  embeddingsFromCosineHits
314
- } from "./chunk-PGCZLHRB.js";
316
+ } from "./chunk-W272SWN7.js";
315
317
  import {
316
318
  compileCorrectionRule,
317
319
  correctionsFilePath,
@@ -320,14 +322,14 @@ import {
320
322
  } from "./chunk-ZKOPY4WW.js";
321
323
  import {
322
324
  resolveJournalSource
323
- } from "./chunk-KJUWWN3T.js";
325
+ } from "./chunk-OGUKSLYZ.js";
324
326
  import {
325
327
  AMBIENT_CAPTURE_PROMPT_RULE,
326
328
  isHighImpactPersonalFact
327
329
  } from "./chunk-QW27DOHG.js";
328
330
  import {
329
331
  MeetingsInputError
330
- } from "./chunk-DH3V7RCQ.js";
332
+ } from "./chunk-F2ERDKY2.js";
331
333
  import {
332
334
  WearablesInputError,
333
335
  describeErrorForOperator
@@ -353,7 +355,7 @@ import {
353
355
  isTopLevelArchivePath,
354
356
  journalPath,
355
357
  writeJournalFile
356
- } from "./chunk-5P2KNFJZ.js";
358
+ } from "./chunk-MSDIETFC.js";
357
359
  import {
358
360
  importCapsule
359
361
  } from "./chunk-CTCGHNWN.js";
@@ -558,7 +560,7 @@ import {
558
560
  throwIfRecallAborted,
559
561
  tokenizeRecallQuery,
560
562
  utcDateKeysForLocalDay
561
- } from "./chunk-UCNQV43K.js";
563
+ } from "./chunk-XQYTSZW3.js";
562
564
  import {
563
565
  inferIntentFromText,
564
566
  intentCompatibilityScore,
@@ -614,7 +616,7 @@ import {
614
616
  hashActivityBody,
615
617
  isValidActivityDate,
616
618
  timezoneOffsetIso
617
- } from "./chunk-M6L7HI7R.js";
619
+ } from "./chunk-P6FHFTZ7.js";
618
620
  import {
619
621
  evaluateSubjectGuard,
620
622
  isSharedPromotionTarget,
@@ -2326,7 +2328,7 @@ var RecallRerankCoordinator = class _RecallRerankCoordinator {
2326
2328
  namespaces,
2327
2329
  {
2328
2330
  readNamespaceMemories: async (ns) => (await this.getStorage(ns)).readAllMemories(),
2329
- readMemoryFrontmatter: async (path40, preferredNamespace) => {
2331
+ readMemoryFrontmatter: async (path38, preferredNamespace) => {
2330
2332
  if (!fallbackReader) {
2331
2333
  for (const ns of namespaces) {
2332
2334
  try {
@@ -2338,7 +2340,7 @@ var RecallRerankCoordinator = class _RecallRerankCoordinator {
2338
2340
  }
2339
2341
  if (!fallbackReader) return null;
2340
2342
  const memory = await this.readQmdResultMemory(
2341
- path40,
2343
+ path38,
2342
2344
  fallbackReader,
2343
2345
  namespaces,
2344
2346
  preferredNamespace
@@ -22340,9 +22342,9 @@ function readStructuralSymbol(entry) {
22340
22342
  const rec = entry;
22341
22343
  const symbol = typeof rec.symbol === "string" ? rec.symbol.trim() : "";
22342
22344
  if (!symbol) return null;
22343
- const path40 = typeof rec.path === "string" && rec.path.length > 0 ? rec.path : void 0;
22345
+ const path38 = typeof rec.path === "string" && rec.path.length > 0 ? rec.path : void 0;
22344
22346
  const kind = typeof rec.kind === "string" && rec.kind.length > 0 ? rec.kind : void 0;
22345
- const item = path40 !== void 0 && kind !== void 0 ? { symbol, path: path40, kind } : path40 !== void 0 ? { symbol, path: path40 } : kind !== void 0 ? { symbol, kind } : { symbol };
22347
+ const item = path38 !== void 0 && kind !== void 0 ? { symbol, path: path38, kind } : path38 !== void 0 ? { symbol, path: path38 } : kind !== void 0 ? { symbol, kind } : { symbol };
22346
22348
  return item;
22347
22349
  }
22348
22350
  function classifySpawnError(err) {
@@ -26350,16 +26352,20 @@ var USAGE = `Usage: timeline <command> [options]
26350
26352
  Commands:
26351
26353
  range --from <ISO> --to <ISO> [--format cards|compact] [--categories id,id] [--include-distractions]
26352
26354
  search --query <text> [--from <ISO>] [--to <ISO>] [--limit N]
26355
+ publish [--date YYYY-MM-DD] [--what timeline] [--dry-run]
26353
26356
  `;
26354
- var VALUE_FLAGS = {
26355
- "--from": true,
26356
- "--to": true,
26357
- "--format": true,
26358
- "--categories": true,
26359
- "--query": true,
26360
- "--limit": true
26357
+ var PUBLISH_FLAGS = {
26358
+ value: { "--date": true, "--week": true, "--what": true },
26359
+ boolean: { "--dry-run": true }
26360
+ };
26361
+ var RANGE_FLAGS = {
26362
+ value: { "--from": true, "--to": true, "--format": true, "--categories": true },
26363
+ boolean: { "--include-distractions": true }
26364
+ };
26365
+ var SEARCH_FLAGS = {
26366
+ value: { "--query": true, "--from": true, "--to": true, "--limit": true },
26367
+ boolean: {}
26361
26368
  };
26362
- var BOOLEAN_FLAGS = { "--include-distractions": true };
26363
26369
  function parseInstant(value, label) {
26364
26370
  const ms = parseFlexibleIsoTimestamp(value);
26365
26371
  if (ms === null) {
@@ -26454,16 +26460,16 @@ function queryTimelineSearch(cards, query) {
26454
26460
  }).slice(0, limit).map((row) => row.card);
26455
26461
  return { ok: true, results: ranked };
26456
26462
  }
26457
- function parseFlags(args) {
26463
+ function parseFlags(args, spec) {
26458
26464
  const flags = /* @__PURE__ */ new Map();
26459
26465
  const positional = [];
26460
- for (let i = 0; i < args.length; i++) {
26466
+ for (let i = 0; i < args.length; i += 1) {
26461
26467
  const arg = args[i];
26462
26468
  if (!arg.startsWith("--")) {
26463
26469
  positional.push(arg);
26464
26470
  continue;
26465
26471
  }
26466
- if (VALUE_FLAGS[arg] === true) {
26472
+ if (spec.value[arg] === true) {
26467
26473
  const value = args[i + 1];
26468
26474
  if (value === void 0 || value.startsWith("--")) {
26469
26475
  throw new TypeError(`flag ${arg} requires a value`);
@@ -26472,11 +26478,11 @@ function parseFlags(args) {
26472
26478
  i += 1;
26473
26479
  continue;
26474
26480
  }
26475
- if (BOOLEAN_FLAGS[arg] === true) {
26481
+ if (spec.boolean[arg] === true) {
26476
26482
  flags.set(arg, true);
26477
26483
  continue;
26478
26484
  }
26479
- const known = [...Object.keys(VALUE_FLAGS), ...Object.keys(BOOLEAN_FLAGS)].sort().join(", ");
26485
+ const known = [...Object.keys(spec.value), ...Object.keys(spec.boolean)].sort().join(", ");
26480
26486
  throw new TypeError(`unknown flag ${arg} (valid: ${known})`);
26481
26487
  }
26482
26488
  return { flags, positional };
@@ -26492,11 +26498,28 @@ async function runTimelineCliCommand(deps, args, io) {
26492
26498
  io.stdout.write(USAGE);
26493
26499
  return command === void 0 ? 1 : 0;
26494
26500
  }
26501
+ if (command === "publish") {
26502
+ if (deps.config === void 0) {
26503
+ io.stderr.write("timeline publish requires the Remnic config \u2014 run `remnic doctor`\n");
26504
+ return 1;
26505
+ }
26506
+ const publishFlags = parseFlags(rest, PUBLISH_FLAGS).flags;
26507
+ return runTimelinePublishCli(
26508
+ deps.config,
26509
+ {
26510
+ date: flagString(publishFlags, "--date"),
26511
+ week: flagString(publishFlags, "--week"),
26512
+ what: flagString(publishFlags, "--what"),
26513
+ dryRun: publishFlags.get("--dry-run") === true
26514
+ },
26515
+ io
26516
+ );
26517
+ }
26495
26518
  if (deps.timelineEnabled === false || !deps.qa.enabled) {
26496
26519
  io.stderr.write("timeline qa disabled \u2014 set activity.timeline.qa.enabled=true\n");
26497
26520
  return 1;
26498
26521
  }
26499
- const { flags } = parseFlags(rest);
26522
+ const { flags } = parseFlags(rest, command === "range" ? RANGE_FLAGS : SEARCH_FLAGS);
26500
26523
  if (command === "range") {
26501
26524
  const from = flagString(flags, "--from");
26502
26525
  const to = flagString(flags, "--to");
@@ -26540,7 +26563,7 @@ async function runTimelineCliCommand(deps, args, io) {
26540
26563
  `);
26541
26564
  return result.ok ? 0 : 1;
26542
26565
  }
26543
- throw new TypeError(`unknown command ${command} (valid: range, search)`);
26566
+ throw new TypeError(`unknown command ${command} (valid: range, search, publish)`);
26544
26567
  } catch (err) {
26545
26568
  io.stderr.write(`${err instanceof Error ? err.message : String(err)}
26546
26569
  `);
@@ -28415,300 +28438,6 @@ function filterPrivacyWindow(items, options) {
28415
28438
  });
28416
28439
  }
28417
28440
 
28418
- // src/activity/vault-path.ts
28419
- import path34 from "path";
28420
- var TOKEN_RE = /\{yyyy\}|\{yy\}|\{MM\}|\{dd\}|\{M\}|\{d\}|\{ww\}/g;
28421
- function resolveVaultNotePath(template, date, options) {
28422
- if (!isValidActivityDate(date)) {
28423
- throw new RangeError(`Invalid vault date "${date}"; expected YYYY-MM-DD.`);
28424
- }
28425
- if (options?.timezone !== void 0) {
28426
- assertValidTimezone(options.timezone);
28427
- }
28428
- if (typeof template !== "string" || template.length === 0) {
28429
- throw new RangeError("Vault note path template must be a non-empty relative path.");
28430
- }
28431
- if (path34.posix.isAbsolute(template) || path34.win32.isAbsolute(template)) {
28432
- throw new RangeError("Vault note path template must be relative; absolute templates are rejected.");
28433
- }
28434
- const [yyyy, mm, dd] = date.split("-");
28435
- const tokens = {
28436
- "{yyyy}": yyyy,
28437
- "{yy}": yyyy.slice(2),
28438
- "{MM}": mm,
28439
- "{dd}": dd,
28440
- "{M}": String(Number(mm)),
28441
- "{d}": String(Number(dd)),
28442
- "{ww}": isoWeekNumber(date)
28443
- };
28444
- const expanded = template.replace(TOKEN_RE, (token) => tokens[token] ?? token);
28445
- if (expanded.split(/[\\/]/).some((segment) => segment === "..")) {
28446
- throw new RangeError("Vault note path template must not contain `..` segments.");
28447
- }
28448
- if (path34.posix.isAbsolute(expanded) || path34.win32.isAbsolute(expanded)) {
28449
- throw new RangeError("Vault note path template must be relative; absolute templates are rejected.");
28450
- }
28451
- return expanded;
28452
- }
28453
- function isoWeekNumber(date) {
28454
- const [year, month, day] = date.split("-").map(Number);
28455
- const utc = new Date(Date.UTC(year, month - 1, day));
28456
- const dayNum = utc.getUTCDay() || 7;
28457
- utc.setUTCDate(utc.getUTCDate() + 4 - dayNum);
28458
- const yearStart = new Date(Date.UTC(utc.getUTCFullYear(), 0, 1));
28459
- const weekNo = Math.ceil(((utc.getTime() - yearStart.getTime()) / 864e5 + 1) / 7);
28460
- return String(weekNo).padStart(2, "0");
28461
- }
28462
-
28463
- // src/activity/vault-publish.ts
28464
- import { createHash as createHash10, randomBytes as randomBytes4 } from "crypto";
28465
- import { readFileSync as readFileSync3, renameSync as renameSync2, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync as writeFileSync2 } from "fs";
28466
- import path35 from "path";
28467
- function applyManagedRegion(fileText, opts) {
28468
- if (opts.strategy === "heading") return applyHeadingRegion(fileText, opts.name, opts.content);
28469
- const startMarker = `<!-- remnic:${opts.name}:start -->`;
28470
- const endMarker = `<!-- remnic:${opts.name}:end -->`;
28471
- const startIdx = fileText.indexOf(startMarker);
28472
- if (startIdx === -1) return { ok: false, reason: "no_marker", text: fileText };
28473
- const endIdx = fileText.indexOf(endMarker, startIdx + startMarker.length);
28474
- if (endIdx === -1) return { ok: false, reason: "no_marker", text: fileText };
28475
- const { body, eol } = ownedBody(fileText, opts.content);
28476
- return {
28477
- ok: true,
28478
- text: `${fileText.slice(0, startIdx + startMarker.length)}${eol}${body}${eol}${fileText.slice(endIdx)}`
28479
- };
28480
- }
28481
- function applyHeadingRegion(fileText, name, content) {
28482
- const wanted = name.trim();
28483
- const hits = [];
28484
- for (const row of fileLines(fileText)) {
28485
- const heading = parseAtxHeading3(row.line);
28486
- if (heading && heading.text === wanted) {
28487
- hits.push({ line: row.number, level: heading.level, next: row.next });
28488
- }
28489
- }
28490
- if (hits.length === 0) return { ok: false, reason: "no_heading", text: fileText };
28491
- if (hits.length > 1) {
28492
- return { ok: false, reason: "duplicate_heading", lines: hits.map((hit2) => hit2.line), text: fileText };
28493
- }
28494
- const hit = hits[0];
28495
- let sectionEnd = fileText.length;
28496
- for (const row of fileLines(fileText)) {
28497
- if (row.start < hit.next) continue;
28498
- const heading = parseAtxHeading3(row.line);
28499
- if (heading && heading.level <= hit.level) {
28500
- sectionEnd = row.start;
28501
- break;
28502
- }
28503
- }
28504
- const { body, eol } = ownedBody(fileText, content);
28505
- const prefix = hit.next === fileText.length && !fileText.endsWith("\n") && !fileText.endsWith("\r") ? `${fileText}${eol}` : fileText.slice(0, hit.next);
28506
- return { ok: true, text: `${prefix}${body}${eol}${fileText.slice(sectionEnd)}` };
28507
- }
28508
- function ownedBody(fileText, content) {
28509
- const eol = fileText.includes("\r\n") ? "\r\n" : "\n";
28510
- let body = content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
28511
- if (eol === "\r\n") body = body.replace(/\n/g, "\r\n");
28512
- if (body.endsWith(eol)) body = body.slice(0, -eol.length);
28513
- return { body, eol };
28514
- }
28515
- function fileLines(fileText) {
28516
- const rows = [];
28517
- let start = 0;
28518
- let number = 1;
28519
- while (start < fileText.length) {
28520
- let i = start;
28521
- while (i < fileText.length && fileText[i] !== "\n" && fileText[i] !== "\r") i++;
28522
- let next = i;
28523
- if (fileText[i] === "\r" && fileText[i + 1] === "\n") next = i + 2;
28524
- else if (fileText[i] === "\n" || fileText[i] === "\r") next = i + 1;
28525
- else next = fileText.length;
28526
- rows.push({ line: fileText.slice(start, i), start, next, number });
28527
- number += 1;
28528
- start = next;
28529
- }
28530
- return rows;
28531
- }
28532
- function parseAtxHeading3(line) {
28533
- let level = 0;
28534
- while (level < line.length && level < 6 && line[level] === "#") level++;
28535
- if (level === 0) return null;
28536
- const after = line[level];
28537
- if (after !== " " && after !== " ") return null;
28538
- let start = level + 1;
28539
- let end = line.length;
28540
- while (start < end && (line[start] === " " || line[start] === " ")) start++;
28541
- while (end > start && (line[end - 1] === " " || line[end - 1] === " ")) end--;
28542
- let hashEnd = end;
28543
- while (hashEnd > start && line[hashEnd - 1] === "#") hashEnd--;
28544
- if (hashEnd < end && hashEnd > start && (line[hashEnd - 1] === " " || line[hashEnd - 1] === " ")) {
28545
- end = hashEnd;
28546
- while (end > start && (line[end - 1] === " " || line[end - 1] === " ")) end--;
28547
- }
28548
- return { level, text: line.slice(start, end) };
28549
- }
28550
- function publishVaultRegion(input) {
28551
- const vault = expandTildePath(input.vaultPath);
28552
- try {
28553
- if (!statSync2(vault).isDirectory()) return { ok: false, reason: "not_directory" };
28554
- } catch {
28555
- return { ok: false, reason: "not_directory" };
28556
- }
28557
- if (input.relativeFile.length === 0 || path35.isAbsolute(input.relativeFile)) {
28558
- return { ok: false, reason: "missing_file" };
28559
- }
28560
- const root = path35.resolve(vault);
28561
- const dest = path35.resolve(root, input.relativeFile);
28562
- const rel = path35.relative(root, dest);
28563
- if (rel.length === 0 || rel.startsWith("..") || path35.isAbsolute(rel)) {
28564
- return { ok: false, reason: "missing_file" };
28565
- }
28566
- let existing;
28567
- try {
28568
- if (!statSync2(dest).isFile()) return { ok: false, reason: "missing_file" };
28569
- existing = readFileSync3(dest, "utf8");
28570
- } catch (err) {
28571
- if (err.code === "ENOENT") return { ok: false, reason: "missing_file" };
28572
- throw err;
28573
- }
28574
- const applied = applyManagedRegion(existing, {
28575
- strategy: "markers",
28576
- name: input.name,
28577
- content: input.content
28578
- });
28579
- if (!applied.ok) return { ok: false, reason: "no_marker" };
28580
- const prevHash = createHash10("sha256").update(existing, "utf8").digest("hex");
28581
- const nextHash = createHash10("sha256").update(applied.text, "utf8").digest("hex");
28582
- if (prevHash === nextHash) return { ok: true, status: "unchanged" };
28583
- const tmpPath = path35.join(path35.dirname(dest), `.remnic-vault-${randomBytes4(8).toString("hex")}.tmp`);
28584
- writeFileSync2(tmpPath, applied.text);
28585
- try {
28586
- renameSync2(tmpPath, dest);
28587
- } catch (renameErr) {
28588
- try {
28589
- unlinkSync2(tmpPath);
28590
- } catch {
28591
- }
28592
- throw renameErr;
28593
- }
28594
- return { ok: true, status: "updated" };
28595
- }
28596
-
28597
- // src/activity/vault-status.ts
28598
- var VAULT_PUBLISH_OUTCOMES = ["updated", "unchanged", "skipped", "error"];
28599
- function compareEntries(a, b) {
28600
- if (a.path !== b.path) return a.path < b.path ? -1 : 1;
28601
- const rankA = VAULT_PUBLISH_OUTCOMES.indexOf(a.outcome);
28602
- const rankB = VAULT_PUBLISH_OUTCOMES.indexOf(b.outcome);
28603
- if (rankA !== rankB) return rankA < rankB ? -1 : 1;
28604
- const reasonA = a.reason ?? "";
28605
- const reasonB = b.reason ?? "";
28606
- if (reasonA !== reasonB) return reasonA < reasonB ? -1 : 1;
28607
- return 0;
28608
- }
28609
- function summarizeVaultPublish(results) {
28610
- if (!Array.isArray(results)) {
28611
- throw new TypeError(`summarizeVaultPublish expects an array of results (got ${typeof results})`);
28612
- }
28613
- const entries = [];
28614
- for (const entry of results) {
28615
- if (typeof entry !== "object" || entry === null) {
28616
- throw new TypeError(`vault publish result entries must be objects (got ${typeof entry})`);
28617
- }
28618
- if (typeof entry.path !== "string" || entry.path.trim() === "") {
28619
- throw new RangeError(`vault publish result requires a non-blank path (got ${JSON.stringify(entry.path)})`);
28620
- }
28621
- const outcome = VAULT_PUBLISH_OUTCOMES.find((candidate) => candidate === entry.outcome);
28622
- if (outcome === void 0) {
28623
- throw new TypeError(
28624
- `unknown vault publish outcome ${JSON.stringify(entry.outcome)}; expected one of: ${VAULT_PUBLISH_OUTCOMES.join(", ")}`
28625
- );
28626
- }
28627
- if (outcome === "skipped" || outcome === "error") {
28628
- if (typeof entry.reason !== "string" || entry.reason.trim() === "") {
28629
- throw new TypeError(
28630
- `vault publish outcome "${outcome}" requires a non-blank reason, e.g. "no_marker" (got ${JSON.stringify(entry.reason)})`
28631
- );
28632
- }
28633
- entries.push({ path: entry.path, outcome, reason: entry.reason });
28634
- } else {
28635
- if (entry.reason !== void 0) {
28636
- throw new TypeError(
28637
- `vault publish outcome "${outcome}" must not carry a reason (got ${JSON.stringify(entry.reason)})`
28638
- );
28639
- }
28640
- entries.push({ path: entry.path, outcome });
28641
- }
28642
- }
28643
- const sorted = [...entries].sort(compareEntries);
28644
- const counts = {};
28645
- for (const outcome of VAULT_PUBLISH_OUTCOMES) counts[outcome] = 0;
28646
- for (const entry of sorted) counts[entry.outcome] += 1;
28647
- return {
28648
- results: sorted,
28649
- counts,
28650
- hasError: counts.error > 0
28651
- };
28652
- }
28653
-
28654
- // src/activity/vault-insert.ts
28655
- function insertMarkersUnderHeading(fileText, opts) {
28656
- if (typeof opts.heading !== "string" || opts.heading.length === 0) {
28657
- throw new RangeError("Heading must be non-empty.");
28658
- }
28659
- if (typeof opts.name !== "string" || opts.name.length === 0) {
28660
- throw new RangeError("Region name must be non-empty.");
28661
- }
28662
- const startMarker = `<!-- remnic:${opts.name}:start -->`;
28663
- const endMarker = `<!-- remnic:${opts.name}:end -->`;
28664
- if (fileText.includes(startMarker) && fileText.includes(endMarker)) {
28665
- return { ok: true, text: fileText, inserted: false };
28666
- }
28667
- const rows = fileLines2(fileText);
28668
- const hits = [];
28669
- for (const row of rows) {
28670
- const heading = parseAtxHeading4(row.line);
28671
- if (heading && heading.text === opts.heading) {
28672
- hits.push({ row, level: heading.level });
28673
- }
28674
- }
28675
- if (hits.length === 0) return { ok: false, reason: "no_heading", text: fileText };
28676
- if (hits.length > 1) {
28677
- return { ok: false, reason: "duplicate_heading", lines: hits.map((hit2) => hit2.row.number), text: fileText };
28678
- }
28679
- const hit = hits[0];
28680
- const eol = fileText.includes("\r\n") ? "\r\n" : "\n";
28681
- const prefix = hit.row.next === fileText.length && !fileText.endsWith("\n") && !fileText.endsWith("\r") ? `${fileText}${eol}` : fileText.slice(0, hit.row.next);
28682
- let content = opts.content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
28683
- if (eol === "\r\n") content = content.replace(/\n/g, "\r\n");
28684
- if (content.length > 0 && !content.endsWith(eol)) content += eol;
28685
- const text = `${prefix}${startMarker}${eol}${content}${endMarker}${eol}${fileText.slice(hit.row.next)}`;
28686
- return { ok: true, text, inserted: true };
28687
- }
28688
- function fileLines2(fileText) {
28689
- const rows = [];
28690
- let start = 0;
28691
- let number = 1;
28692
- while (start < fileText.length) {
28693
- let i = start;
28694
- while (i < fileText.length && fileText[i] !== "\n" && fileText[i] !== "\r") i++;
28695
- let next = i;
28696
- if (fileText[i] === "\r" && fileText[i + 1] === "\n") next = i + 2;
28697
- else if (fileText[i] === "\n" || fileText[i] === "\r") next = i + 1;
28698
- else next = fileText.length;
28699
- rows.push({ line: fileText.slice(start, i), start, next, number });
28700
- number += 1;
28701
- start = next;
28702
- }
28703
- return rows;
28704
- }
28705
- function parseAtxHeading4(line) {
28706
- let level = 0;
28707
- while (level < line.length && level < 6 && line[level] === "#") level++;
28708
- if (level === 0 || line[level] !== " ") return null;
28709
- return { level, text: line.slice(level + 1) };
28710
- }
28711
-
28712
28441
  // src/activity/vault-frontmatter.ts
28713
28442
  function assertNoNewlineKey(key) {
28714
28443
  if (key.includes("\n") || key.includes("\r")) {
@@ -28735,7 +28464,7 @@ function applyVaultFrontmatter(existingYaml, updates) {
28735
28464
  }
28736
28465
 
28737
28466
  // src/activity/vault-wikilink.ts
28738
- import path36 from "path";
28467
+ import path34 from "path";
28739
28468
  function formatVaultWikilink(notePath) {
28740
28469
  if (typeof notePath !== "string" || notePath.trim().length === 0) {
28741
28470
  throw new RangeError("Vault wikilink path must be a non-empty relative path.");
@@ -28743,7 +28472,7 @@ function formatVaultWikilink(notePath) {
28743
28472
  if (notePath.includes("\n") || notePath.includes("\r")) {
28744
28473
  throw new RangeError("Vault wikilink path must not contain newlines.");
28745
28474
  }
28746
- if (path36.posix.isAbsolute(notePath) || path36.win32.isAbsolute(notePath)) {
28475
+ if (path34.posix.isAbsolute(notePath) || path34.win32.isAbsolute(notePath)) {
28747
28476
  throw new RangeError("Vault wikilink path must be relative; absolute paths are rejected.");
28748
28477
  }
28749
28478
  if (notePath.split(/[\\/]/).some((segment) => segment === "..")) {
@@ -28756,21 +28485,6 @@ function formatVaultWikilink(notePath) {
28756
28485
  return `[[${stripped}]]`;
28757
28486
  }
28758
28487
 
28759
- // src/activity/vault-region.ts
28760
- function validateRegionName(name) {
28761
- if (typeof name !== "string") {
28762
- return { ok: false, error: "invalid_name" };
28763
- }
28764
- if (name.includes("\n") || name.includes("\r") || name.includes("-->")) {
28765
- return { ok: false, error: "invalid_name" };
28766
- }
28767
- const trimmed = name.trim();
28768
- if (trimmed.length === 0) {
28769
- return { ok: false, error: "invalid_name" };
28770
- }
28771
- return { ok: true, name: trimmed };
28772
- }
28773
-
28774
28488
  // src/activity/vault-suffix.ts
28775
28489
  function stripVaultMdSuffix(notePath) {
28776
28490
  if (typeof notePath !== "string" || notePath.length === 0) {
@@ -28780,7 +28494,7 @@ function stripVaultMdSuffix(notePath) {
28780
28494
  }
28781
28495
 
28782
28496
  // src/activity/vault-join.ts
28783
- import path37 from "path";
28497
+ import path35 from "path";
28784
28498
  function joinVaultSegments(parts) {
28785
28499
  if (parts.length === 0) {
28786
28500
  throw new RangeError("Vault path parts must be a non-empty list.");
@@ -28795,7 +28509,7 @@ function joinVaultSegments(parts) {
28795
28509
  if (part.includes("\n") || part.includes("\r")) {
28796
28510
  throw new RangeError("Vault path part must not contain a newline.");
28797
28511
  }
28798
- if (path37.posix.isAbsolute(part) || path37.win32.isAbsolute(part)) {
28512
+ if (path35.posix.isAbsolute(part) || path35.win32.isAbsolute(part)) {
28799
28513
  throw new RangeError("Vault path part must be relative.");
28800
28514
  }
28801
28515
  if (part.split("/").includes("..")) {
@@ -28848,9 +28562,9 @@ function planVaultDryRun(inputs) {
28848
28562
  }
28849
28563
 
28850
28564
  // src/session-summaries/index.ts
28851
- import { createHash as createHash11 } from "crypto";
28565
+ import { createHash as createHash10 } from "crypto";
28852
28566
  import { lstat as lstat3, mkdir as mkdir7, readFile as readFile7, readdir as readdir4, rename, rm, stat as stat4, writeFile as writeFile7 } from "fs/promises";
28853
- import path38 from "path";
28567
+ import path36 from "path";
28854
28568
 
28855
28569
  // src/session-summaries/adapters.ts
28856
28570
  var VALID_ROLES = /* @__PURE__ */ new Set(["user", "assistant", "tool", "system", "other"]);
@@ -29350,12 +29064,12 @@ var DEFAULT_MAX_FILES = 5e3;
29350
29064
  var DEFAULT_MAX_SESSIONS = 500;
29351
29065
  var SUPPORTED_EXTENSIONS = /* @__PURE__ */ new Set([".json", ".jsonl"]);
29352
29066
  function shortHash(value, length = 16) {
29353
- return createHash11("sha256").update(value).digest("hex").slice(0, length);
29067
+ return createHash10("sha256").update(value).digest("hex").slice(0, length);
29354
29068
  }
29355
29069
  async function listTranscriptFiles(root, maxFiles) {
29356
29070
  const out = [];
29357
29071
  let truncated = false;
29358
- const entrySortKey = (entryName, isDirectory) => isDirectory ? `${entryName}${path38.sep}` : entryName;
29072
+ const entrySortKey = (entryName, isDirectory) => isDirectory ? `${entryName}${path36.sep}` : entryName;
29359
29073
  async function visit(dir) {
29360
29074
  if (truncated) return;
29361
29075
  const entries = (await readdir4(dir, { withFileTypes: true })).sort(
@@ -29365,13 +29079,13 @@ async function listTranscriptFiles(root, maxFiles) {
29365
29079
  if (truncated) return;
29366
29080
  if (entry.name.startsWith(".")) continue;
29367
29081
  if (entry.isSymbolicLink()) continue;
29368
- const fullPath = path38.join(dir, entry.name);
29082
+ const fullPath = path36.join(dir, entry.name);
29369
29083
  if (entry.isDirectory()) {
29370
29084
  await visit(fullPath);
29371
29085
  continue;
29372
29086
  }
29373
29087
  if (!entry.isFile()) continue;
29374
- const ext = path38.extname(entry.name).toLowerCase();
29088
+ const ext = path36.extname(entry.name).toLowerCase();
29375
29089
  if (!SUPPORTED_EXTENSIONS.has(ext)) continue;
29376
29090
  out.push(fullPath);
29377
29091
  if (out.length > maxFiles) {
@@ -29398,7 +29112,7 @@ function normalizeInputDir(inputDir) {
29398
29112
  if (typeof inputDir !== "string" || inputDir.trim().length === 0) {
29399
29113
  throw new Error("inputDir must be a non-empty string");
29400
29114
  }
29401
- return path38.resolve(expandTildePath(inputDir.trim()));
29115
+ return path36.resolve(expandTildePath(inputDir.trim()));
29402
29116
  }
29403
29117
  function initRoleCounts() {
29404
29118
  return {
@@ -29555,11 +29269,11 @@ async function collectLocalSessionSummaries(options) {
29555
29269
  continue;
29556
29270
  }
29557
29271
  seenFileHashes.add(fileHash);
29558
- const fileExtension = path38.extname(filePath).toLowerCase();
29272
+ const fileExtension = path36.extname(filePath).toLowerCase();
29559
29273
  const parsed = await adapter.parseFile(
29560
29274
  {
29561
29275
  content,
29562
- fileName: path38.basename(filePath),
29276
+ fileName: path36.basename(filePath),
29563
29277
  fileExtension,
29564
29278
  fileRef: fileHash
29565
29279
  },
@@ -29615,7 +29329,7 @@ async function collectLocalSessionSummaries(options) {
29615
29329
  }
29616
29330
  async function readRedactionConfig(pathLike) {
29617
29331
  if (!pathLike) return void 0;
29618
- const raw = await readFile7(path38.resolve(expandTildePath(pathLike)), "utf-8");
29332
+ const raw = await readFile7(path36.resolve(expandTildePath(pathLike)), "utf-8");
29619
29333
  const parsed = JSON.parse(raw);
29620
29334
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
29621
29335
  throw new Error("redaction config must be a JSON object");
@@ -29628,15 +29342,15 @@ function toJsonl(drafts) {
29628
29342
  }
29629
29343
  function defaultDraftOutputPath(memoryDir, generatedAt) {
29630
29344
  const stamp = generatedAt.replace(/[:.]/g, "-");
29631
- return path38.join(
29632
- path38.resolve(expandTildePath(memoryDir)),
29345
+ return path36.join(
29346
+ path36.resolve(expandTildePath(memoryDir)),
29633
29347
  "state",
29634
29348
  "session-summary-drafts",
29635
29349
  `session-summaries-${stamp}.jsonl`
29636
29350
  );
29637
29351
  }
29638
29352
  async function writeDrafts(filePath, drafts) {
29639
- await mkdir7(path38.dirname(filePath), { recursive: true });
29353
+ await mkdir7(path36.dirname(filePath), { recursive: true });
29640
29354
  const tempPath = `${filePath}.${process.pid}.${Date.now()}.tmp`;
29641
29355
  try {
29642
29356
  await writeFile7(tempPath, toJsonl(drafts), "utf-8");
@@ -29654,7 +29368,7 @@ async function runLocalSessionSummaryCliCommand(options) {
29654
29368
  });
29655
29369
  const wroteFiles = [];
29656
29370
  if (options.output) {
29657
- const outputPath = path38.resolve(expandTildePath(options.output));
29371
+ const outputPath = path36.resolve(expandTildePath(options.output));
29658
29372
  await writeDrafts(outputPath, report.drafts);
29659
29373
  wroteFiles.push(outputPath);
29660
29374
  }
@@ -29689,19 +29403,19 @@ async function runLocalSessionSummaryCliCommand(options) {
29689
29403
 
29690
29404
  // src/transfer/capsule-fork.ts
29691
29405
  import { lstat as lstat4, mkdir as mkdir8, readFile as readFile8, realpath as realpath3, writeFile as writeFile8 } from "fs/promises";
29692
- import path39 from "path";
29406
+ import path37 from "path";
29693
29407
  async function forkCapsule(opts) {
29694
29408
  validateForkId(opts.forkId);
29695
- const rootAbs = path39.resolve(opts.targetRoot);
29409
+ const rootAbs = path37.resolve(opts.targetRoot);
29696
29410
  await assertIsDirectoryNotSymlink(rootAbs, "forkCapsule", "targetRoot");
29697
- const forkDirAbs = path39.join(rootAbs, "forks", opts.forkId);
29411
+ const forkDirAbs = path37.join(rootAbs, "forks", opts.forkId);
29698
29412
  const forkEntryExists = await pathEntryExists(forkDirAbs);
29699
29413
  if (forkEntryExists) {
29700
29414
  throw new Error(
29701
29415
  `forkCapsule: fork path already exists \u2014 forkId "${opts.forkId}" is already in use at: ${forkDirAbs}`
29702
29416
  );
29703
29417
  }
29704
- const archiveAbs = path39.resolve(opts.sourceArchive);
29418
+ const archiveAbs = path37.resolve(opts.sourceArchive);
29705
29419
  const importResult = await importCapsule({
29706
29420
  archivePath: archiveAbs,
29707
29421
  root: rootAbs,
@@ -29723,10 +29437,10 @@ async function forkCapsule(opts) {
29723
29437
  importedRecords: importResult.imported.length,
29724
29438
  skippedRecords: importResult.skipped.length
29725
29439
  };
29726
- const lineagePath = path39.join(forkDirAbs, "lineage.json");
29440
+ const lineagePath = path37.join(forkDirAbs, "lineage.json");
29727
29441
  const rootReal = await realpath3(rootAbs);
29728
29442
  await assertRealpathInsideRoot(rootReal, lineagePath, `forks/${opts.forkId}/lineage.json`, "forkCapsule");
29729
- await mkdir8(path39.dirname(lineagePath), { recursive: true });
29443
+ await mkdir8(path37.dirname(lineagePath), { recursive: true });
29730
29444
  await writeFile8(lineagePath, JSON.stringify(lineage, null, 2) + "\n", "utf-8");
29731
29445
  return {
29732
29446
  archivePath: archiveAbs,
@@ -29740,11 +29454,11 @@ async function readForkLineage(targetRoot, forkId) {
29740
29454
  if (typeof forkId !== "string" || forkId.length === 0 || forkId.length > 64 || !CAPSULE_ID_PATTERN.test(forkId)) {
29741
29455
  return null;
29742
29456
  }
29743
- const rootAbs = path39.resolve(targetRoot);
29457
+ const rootAbs = path37.resolve(targetRoot);
29744
29458
  const rootReal = await realpath3(rootAbs).catch(() => rootAbs);
29745
- const lineagePath = path39.join(rootReal, "forks", forkId, "lineage.json");
29746
- const rel = path39.relative(rootReal, lineagePath);
29747
- if (rel.startsWith("..") || path39.isAbsolute(rel)) {
29459
+ const lineagePath = path37.join(rootReal, "forks", forkId, "lineage.json");
29460
+ const rel = path37.relative(rootReal, lineagePath);
29461
+ if (rel.startsWith("..") || path37.isAbsolute(rel)) {
29748
29462
  return null;
29749
29463
  }
29750
29464
  if (!await isLineagePathContained(rootReal, lineagePath)) {
@@ -29785,19 +29499,19 @@ async function pathEntryExists(absPath) {
29785
29499
  async function isLineagePathContained(rootReal, lineagePath) {
29786
29500
  let existing = lineagePath;
29787
29501
  const suffix = [];
29788
- while (existing !== path39.dirname(existing)) {
29502
+ while (existing !== path37.dirname(existing)) {
29789
29503
  const st = await lstat4(existing).catch(() => null);
29790
29504
  if (st !== null) break;
29791
- suffix.unshift(path39.basename(existing));
29792
- existing = path39.dirname(existing);
29505
+ suffix.unshift(path37.basename(existing));
29506
+ existing = path37.dirname(existing);
29793
29507
  }
29794
29508
  const existingReal = await realpath3(existing).catch(() => existing);
29795
- const targetReal = suffix.length > 0 ? path39.join(existingReal, ...suffix) : existingReal;
29796
- const rel = path39.relative(rootReal, targetReal);
29509
+ const targetReal = suffix.length > 0 ? path37.join(existingReal, ...suffix) : existingReal;
29510
+ const rel = path37.relative(rootReal, targetReal);
29797
29511
  if (rel === "") return true;
29798
29512
  if (rel === "..") return false;
29799
- if (rel.startsWith(`..${path39.sep}`)) return false;
29800
- if (path39.isAbsolute(rel)) return false;
29513
+ if (rel.startsWith(`..${path37.sep}`)) return false;
29514
+ if (path37.isAbsolute(rel)) return false;
29801
29515
  return true;
29802
29516
  }
29803
29517
 
@@ -29957,15 +29671,8 @@ export {
29957
29671
  ACTIVITY_FEATURE_GATES,
29958
29672
  resolveActivityGates,
29959
29673
  filterPrivacyWindow,
29960
- resolveVaultNotePath,
29961
- applyManagedRegion,
29962
- publishVaultRegion,
29963
- VAULT_PUBLISH_OUTCOMES,
29964
- summarizeVaultPublish,
29965
- insertMarkersUnderHeading,
29966
29674
  applyVaultFrontmatter,
29967
29675
  formatVaultWikilink,
29968
- validateRegionName,
29969
29676
  stripVaultMdSuffix,
29970
29677
  joinVaultSegments,
29971
29678
  planVaultDryRun,
@@ -30002,4 +29709,4 @@ export {
30002
29709
  blendGraphExpandedRecallScore,
30003
29710
  Orchestrator
30004
29711
  };
30005
- //# sourceMappingURL=chunk-3ITTF7YH.js.map
29712
+ //# sourceMappingURL=chunk-QVI63XSO.js.map