@remnic/core 9.4.2 → 9.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/dist/access-admin-ops-surface.d.ts +5 -5
  2. package/dist/access-admin-ops-surface.js +26 -26
  3. package/dist/access-boundary.d.ts +26 -7
  4. package/dist/access-boundary.js +31 -27
  5. package/dist/access-cli.js +79 -77
  6. package/dist/access-cli.js.map +1 -1
  7. package/dist/access-http.d.ts +51 -5
  8. package/dist/access-http.js +38 -36
  9. package/dist/access-identity-continuity-surface.d.ts +4 -4
  10. package/dist/access-identity-continuity-surface.js +26 -26
  11. package/dist/access-lcm-surface.d.ts +5 -5
  12. package/dist/access-lcm-surface.js +26 -26
  13. package/dist/access-mcp.d.ts +15 -5
  14. package/dist/access-mcp.js +35 -33
  15. package/dist/access-observe-write-surface.d.ts +5 -5
  16. package/dist/access-observe-write-surface.js +26 -26
  17. package/dist/access-operations-batch.js +31 -30
  18. package/dist/access-operations.d.ts +7 -7
  19. package/dist/access-operations.js +33 -32
  20. package/dist/access-recall-surface.d.ts +5 -5
  21. package/dist/access-recall-surface.js +26 -26
  22. package/dist/access-schema.js +4 -4
  23. package/dist/{access-service-m-2VO_Ig.d.ts → access-service-DZX0sYAv.d.ts} +3 -3
  24. package/dist/access-service.d.ts +5 -5
  25. package/dist/access-service.js +26 -26
  26. package/dist/access-surface-catalog.d.ts +5 -5
  27. package/dist/access-surface-catalog.js +1 -0
  28. package/dist/access-surface-catalog.js.map +1 -1
  29. package/dist/access-token-capabilities.d.ts +174 -0
  30. package/dist/access-token-capabilities.js +33 -0
  31. package/dist/action-confidence.d.ts +1 -1
  32. package/dist/active-memory-bridge.d.ts +1 -1
  33. package/dist/active-recall.d.ts +1 -1
  34. package/dist/active-recall.js +1 -1
  35. package/dist/adapters/index.js +4 -4
  36. package/dist/adapters/registry.js +2 -2
  37. package/dist/{auto-sync-HMHQHUAG.js → auto-sync-G6IU7L6C.js} +3 -3
  38. package/dist/behavior-learner.d.ts +1 -1
  39. package/dist/behavior-signals.d.ts +1 -1
  40. package/dist/bootstrap.d.ts +4 -4
  41. package/dist/briefing.d.ts +1 -1
  42. package/dist/briefing.js +7 -7
  43. package/dist/buffer-surprise-report.d.ts +1 -1
  44. package/dist/buffer.d.ts +1 -1
  45. package/dist/calibration.d.ts +1 -1
  46. package/dist/capabilities.d.ts +1 -1
  47. package/dist/{capsule-crypto-CZJSLEFG.js → capsule-crypto-RAARDY3M.js} +2 -2
  48. package/dist/capsule-crypto-RAARDY3M.js.map +1 -0
  49. package/dist/{catalog-BxWokdC2.d.ts → catalog-DoH2b0OR.d.ts} +1 -1
  50. package/dist/causal-behavior.d.ts +1 -1
  51. package/dist/causal-behavior.js +5 -5
  52. package/dist/causal-chain.js +3 -3
  53. package/dist/causal-consolidation.d.ts +1 -1
  54. package/dist/causal-consolidation.js +11 -11
  55. package/dist/causal-retrieval.js +3 -3
  56. package/dist/causal-trajectory-graph.d.ts +1 -1
  57. package/dist/causal-trajectory.js +1 -1
  58. package/dist/{chunk-7QWMTOIF.js → chunk-2B7DP7AP.js} +31 -31
  59. package/dist/{chunk-4BFRBP45.js → chunk-2JFDHI2K.js} +2 -2
  60. package/dist/{chunk-OHDJ34CC.js → chunk-2SFEFR5I.js} +2 -2
  61. package/dist/{chunk-E2SPGGUI.js → chunk-4OKLXWDZ.js} +13 -6
  62. package/dist/chunk-4OKLXWDZ.js.map +1 -0
  63. package/dist/{chunk-ILFJ7AVS.js → chunk-4WNLSSHL.js} +35 -21
  64. package/dist/chunk-4WNLSSHL.js.map +1 -0
  65. package/dist/{chunk-YDSWRD33.js → chunk-5K5VEDFY.js} +4 -4
  66. package/dist/{chunk-CZAZX7JP.js → chunk-7BAJAXGB.js} +4 -4
  67. package/dist/{chunk-CXLNZXG5.js → chunk-7XGSIUP5.js} +1 -1
  68. package/dist/{chunk-ZPOROUTX.js → chunk-AOYJVCFN.js} +5 -5
  69. package/dist/{chunk-IC6QX5TC.js → chunk-BGMSRN6I.js} +5 -5
  70. package/dist/{chunk-5QZDMSSN.js → chunk-CXEL3Y22.js} +70 -70
  71. package/dist/{chunk-M5QKGHCR.js → chunk-CYWCKFCL.js} +5 -5
  72. package/dist/{chunk-2U2A5HF4.js → chunk-D2XYYU5Q.js} +5 -5
  73. package/dist/chunk-D7FOKIY5.js +173 -0
  74. package/dist/chunk-D7FOKIY5.js.map +1 -0
  75. package/dist/{chunk-DGYCWCQ7.js → chunk-DZSAXE3T.js} +2 -2
  76. package/dist/{chunk-2BFLDH5F.js → chunk-EEIROWEG.js} +2 -2
  77. package/dist/{chunk-6ZIETXZ2.js → chunk-H5PFR5ZT.js} +2 -2
  78. package/dist/{chunk-2FOD2YY3.js → chunk-I74ZEBMA.js} +236 -103
  79. package/dist/chunk-I74ZEBMA.js.map +1 -0
  80. package/dist/chunk-IC2TCZJ2.js +54 -0
  81. package/dist/chunk-IC2TCZJ2.js.map +1 -0
  82. package/dist/{chunk-66FLU5BT.js → chunk-II6WHCCW.js} +6 -6
  83. package/dist/{chunk-YPEMNNNY.js → chunk-ITWTKT2R.js} +6 -6
  84. package/dist/{chunk-AKUCU7CI.js → chunk-JI5AVXYO.js} +5 -5
  85. package/dist/{chunk-27FLVMDC.js → chunk-KMF67QDQ.js} +7 -7
  86. package/dist/{chunk-FLVL4L3L.js → chunk-KTULX4YO.js} +4 -4
  87. package/dist/{chunk-FZGGZAAU.js → chunk-L2QJQSHL.js} +146 -2
  88. package/dist/chunk-L2QJQSHL.js.map +1 -0
  89. package/dist/{chunk-4P4626RY.js → chunk-L4UZBJNM.js} +4 -4
  90. package/dist/{chunk-JLR3JSTL.js → chunk-L6V3WJ55.js} +3 -3
  91. package/dist/{chunk-6BISDEN6.js → chunk-LNHJ32NK.js} +14 -14
  92. package/dist/{chunk-437S3G37.js → chunk-LNQUAJNC.js} +1 -1
  93. package/dist/{chunk-LOR6ZM5R.js → chunk-MFDJ63U5.js} +2 -2
  94. package/dist/{chunk-HRCACVHL.js → chunk-NFTABV56.js} +2 -2
  95. package/dist/{chunk-OUMTBFSQ.js → chunk-NKCPUHCI.js} +5 -5
  96. package/dist/{chunk-KCJ5H6XQ.js → chunk-ODSYJXDU.js} +2 -2
  97. package/dist/{chunk-2QSZNTDO.js → chunk-RKNJBZ55.js} +4 -4
  98. package/dist/{chunk-NG7YBCJO.js → chunk-SNBEVJBX.js} +4 -4
  99. package/dist/{chunk-CZAA5N5S.js → chunk-SNNIUDRS.js} +2 -2
  100. package/dist/{chunk-P6SYWE4G.js → chunk-STCCFQU5.js} +9 -9
  101. package/dist/{chunk-X4A62ET7.js → chunk-TI7IHDBQ.js} +17 -17
  102. package/dist/{chunk-BGTAL46Y.js → chunk-TV7C3HCB.js} +2 -2
  103. package/dist/{chunk-EPGWWCZF.js → chunk-UBGAOYBP.js} +6 -6
  104. package/dist/{chunk-M7GGMGMZ.js → chunk-UDCDGP6A.js} +15 -15
  105. package/dist/{chunk-2MR3MFQB.js → chunk-UPSAT4PY.js} +2 -2
  106. package/dist/{chunk-CGS7UKWM.js → chunk-VCW74PNH.js} +2 -2
  107. package/dist/{chunk-DR6PEJU3.js → chunk-VWEWK2BM.js} +44 -59
  108. package/dist/chunk-VWEWK2BM.js.map +1 -0
  109. package/dist/{chunk-CLX5VDNY.js → chunk-Y4RKAQZ7.js} +4 -4
  110. package/dist/{chunk-EZ25VE3G.js → chunk-YNDLCWXS.js} +4 -4
  111. package/dist/{cli-EiBBOt3r.d.ts → cli-1dghPCO2.d.ts} +3 -3
  112. package/dist/cli.d.ts +6 -6
  113. package/dist/cli.js +57 -55
  114. package/dist/compounding/engine.d.ts +1 -1
  115. package/dist/compounding/engine.js +7 -7
  116. package/dist/compounding/preference-consolidator.d.ts +1 -1
  117. package/dist/compression-optimizer.d.ts +1 -1
  118. package/dist/config.d.ts +1 -1
  119. package/dist/config.js +1 -1
  120. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  121. package/dist/connectors/codex-materialize-runner.js +7 -7
  122. package/dist/connectors/codex-materialize.d.ts +1 -1
  123. package/dist/connectors/index.d.ts +1 -1
  124. package/dist/connectors/index.js +11 -9
  125. package/dist/consolidation-provenance-check.d.ts +1 -1
  126. package/dist/consolidation-undo.d.ts +1 -1
  127. package/dist/contradiction/index.d.ts +1 -1
  128. package/dist/contradiction/index.js +4 -4
  129. package/dist/conversation-index/backend.d.ts +1 -1
  130. package/dist/conversation-index/backend.js +2 -2
  131. package/dist/conversation-index/chunker.d.ts +1 -1
  132. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  133. package/dist/conversation-index/indexer.d.ts +1 -1
  134. package/dist/conversation-index/search.d.ts +1 -1
  135. package/dist/dashboard-runtime.js +2 -2
  136. package/dist/day-summary.d.ts +1 -1
  137. package/dist/delinearize.d.ts +1 -1
  138. package/dist/direct-answer-wiring.d.ts +1 -1
  139. package/dist/direct-answer.d.ts +1 -1
  140. package/dist/embedding-fallback.d.ts +1 -1
  141. package/dist/enrichment/index.d.ts +1 -1
  142. package/dist/entity-retrieval.d.ts +1 -1
  143. package/dist/entity-retrieval.js +7 -7
  144. package/dist/entity-schema.d.ts +1 -1
  145. package/dist/explicit-capture.d.ts +4 -4
  146. package/dist/extraction-faithfulness.d.ts +1 -1
  147. package/dist/extraction-judge-telemetry.d.ts +1 -1
  148. package/dist/extraction-judge-training.d.ts +1 -1
  149. package/dist/extraction-judge.d.ts +1 -1
  150. package/dist/extraction.d.ts +1 -1
  151. package/dist/fallback-llm.d.ts +1 -1
  152. package/dist/{first-start-migration-DY6YCRC2.js → first-start-migration-VBJQL6OI.js} +5 -5
  153. package/dist/graph-dashboard-diff.d.ts +1 -1
  154. package/dist/graph-dashboard-key.d.ts +1 -1
  155. package/dist/graph-dashboard-parser.d.ts +1 -1
  156. package/dist/graph-edge-reinforcement.d.ts +1 -1
  157. package/dist/graph-snapshot.d.ts +1 -1
  158. package/dist/graph.d.ts +1 -1
  159. package/dist/identity-continuity.d.ts +1 -1
  160. package/dist/importance.d.ts +1 -1
  161. package/dist/index.d.ts +13 -10
  162. package/dist/index.js +115 -93
  163. package/dist/intent.d.ts +1 -1
  164. package/dist/lcm/engine.d.ts +1 -1
  165. package/dist/lcm/engine.js +2 -2
  166. package/dist/lcm/index.d.ts +1 -1
  167. package/dist/lcm/index.js +2 -2
  168. package/dist/lcm/tools.d.ts +1 -1
  169. package/dist/lifecycle.d.ts +1 -1
  170. package/dist/live-connectors-runner.d.ts +1 -1
  171. package/dist/local-llm.d.ts +1 -1
  172. package/dist/local-model-endpoint.d.ts +1 -1
  173. package/dist/maintenance/memory-governance.d.ts +1 -1
  174. package/dist/maintenance/memory-governance.js +8 -8
  175. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +7 -7
  176. package/dist/maintenance/rebuild-memory-projection.js +9 -9
  177. package/dist/mcp-memory-inspector-app.d.ts +5 -5
  178. package/dist/mcp-read-only-tools.d.ts +16 -0
  179. package/dist/mcp-read-only-tools.js +8 -0
  180. package/dist/mcp-read-only-tools.js.map +1 -0
  181. package/dist/memory-action-policy.d.ts +1 -1
  182. package/dist/memory-cache.d.ts +1 -1
  183. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  184. package/dist/memory-projection-store.d.ts +1 -1
  185. package/dist/memory-provenance.d.ts +1 -1
  186. package/dist/memory-worth-outcomes.d.ts +1 -1
  187. package/dist/models-json.d.ts +1 -1
  188. package/dist/namespaces/migrate.d.ts +2 -2
  189. package/dist/namespaces/migrate.js +17 -17
  190. package/dist/namespaces/principal.d.ts +1 -1
  191. package/dist/namespaces/search.d.ts +1 -1
  192. package/dist/namespaces/search.js +9 -9
  193. package/dist/namespaces/storage.d.ts +2 -2
  194. package/dist/namespaces/storage.js +7 -7
  195. package/dist/native-knowledge.d.ts +1 -1
  196. package/dist/operator-toolkit.d.ts +1 -1
  197. package/dist/operator-toolkit.js +22 -22
  198. package/dist/orchestration/compression-guideline-coordinator.d.ts +1 -1
  199. package/dist/orchestration/maintenance.d.ts +2 -2
  200. package/dist/orchestration/maintenance.js +9 -9
  201. package/dist/{orchestrator-B2Y28Z9t.d.ts → orchestrator-Dh3WSW_O.d.ts} +3 -3
  202. package/dist/orchestrator.d.ts +4 -4
  203. package/dist/orchestrator.js +81 -79
  204. package/dist/patterns-cli.d.ts +1 -1
  205. package/dist/policy-runtime.d.ts +1 -1
  206. package/dist/provenance.d.ts +1 -1
  207. package/dist/{qmd-Db9mOkzB.d.ts → qmd-DoUVxqND.d.ts} +1 -1
  208. package/dist/qmd-preflight.d.ts +2 -2
  209. package/dist/qmd-recall-cache.d.ts +1 -1
  210. package/dist/qmd.d.ts +2 -2
  211. package/dist/recall-disclosure-escalation.d.ts +1 -1
  212. package/dist/recall-explain-renderer.d.ts +1 -1
  213. package/dist/recall-planner-llm.d.ts +1 -1
  214. package/dist/recall-state.d.ts +1 -1
  215. package/dist/recall-tag-filter.d.ts +1 -1
  216. package/dist/recall-timings.d.ts +1 -1
  217. package/dist/recall-xray-cli.d.ts +1 -1
  218. package/dist/recall-xray-renderer.d.ts +1 -1
  219. package/dist/recall-xray.d.ts +1 -1
  220. package/dist/resolve-auth-token.d.ts +1 -1
  221. package/dist/resume-bundles.js +2 -2
  222. package/dist/retrieval-agents.d.ts +2 -2
  223. package/dist/retrieval-tiers.d.ts +1 -1
  224. package/dist/routing/engine.d.ts +1 -1
  225. package/dist/routing/store.d.ts +1 -1
  226. package/dist/search/embed-helper.d.ts +1 -1
  227. package/dist/search/factory.d.ts +1 -1
  228. package/dist/search/factory.js +8 -8
  229. package/dist/search/index.d.ts +1 -1
  230. package/dist/search/index.js +12 -12
  231. package/dist/search/lancedb-backend.d.ts +1 -1
  232. package/dist/search/lancedb-backend.js +2 -2
  233. package/dist/search/meilisearch-backend.d.ts +1 -1
  234. package/dist/search/meilisearch-backend.js +2 -2
  235. package/dist/search/noop-backend.d.ts +1 -1
  236. package/dist/search/orama-backend.d.ts +1 -1
  237. package/dist/search/orama-backend.js +2 -2
  238. package/dist/search/port.d.ts +1 -1
  239. package/dist/search/remote-backend.d.ts +1 -1
  240. package/dist/{semantic-consolidation-BDVIbLRw.d.ts → semantic-consolidation-Dof1865o.d.ts} +1 -1
  241. package/dist/semantic-consolidation.d.ts +2 -2
  242. package/dist/semantic-consolidation.js +9 -9
  243. package/dist/semantic-rule-promotion.js +7 -7
  244. package/dist/semantic-rule-verifier.d.ts +1 -1
  245. package/dist/semantic-rule-verifier.js +8 -8
  246. package/dist/session-observer-bands.d.ts +1 -1
  247. package/dist/session-observer-state.d.ts +1 -1
  248. package/dist/shared-context/manager.d.ts +1 -1
  249. package/dist/signal.d.ts +1 -1
  250. package/dist/storage.d.ts +1 -1
  251. package/dist/storage.js +6 -6
  252. package/dist/summarizer.d.ts +1 -1
  253. package/dist/summary-snapshot.d.ts +1 -1
  254. package/dist/temporal-supersession.d.ts +1 -1
  255. package/dist/temporal-validity.d.ts +1 -1
  256. package/dist/threading.d.ts +1 -1
  257. package/dist/tier-migration.d.ts +1 -1
  258. package/dist/tier-routing.d.ts +1 -1
  259. package/dist/{tier-stats-TG6GUZ6N.js → tier-stats-5XF4UBRQ.js} +4 -4
  260. package/dist/tokens.d.ts +17 -2
  261. package/dist/tokens.js +3 -1
  262. package/dist/topics.d.ts +1 -1
  263. package/dist/transcript.d.ts +1 -1
  264. package/dist/transfer/backup.js +2 -2
  265. package/dist/transfer/capsule-export.js +3 -3
  266. package/dist/transfer/capsule-import.js +3 -3
  267. package/dist/trust-score-stage.d.ts +1 -1
  268. package/dist/trust-score.d.ts +1 -1
  269. package/dist/{types-ljkd82rn.d.ts → types-C7HUgOuA.d.ts} +1 -1
  270. package/dist/types.d.ts +1 -1
  271. package/dist/utility-runtime.d.ts +1 -1
  272. package/dist/verified-recall.js +8 -8
  273. package/package.json +2 -2
  274. package/src/access-boundary.test.ts +62 -0
  275. package/src/access-boundary.ts +165 -126
  276. package/src/access-http.test.ts +781 -0
  277. package/src/access-http.ts +334 -108
  278. package/src/access-mcp.test.ts +264 -0
  279. package/src/access-mcp.ts +45 -70
  280. package/src/access-operations-batch.ts +35 -12
  281. package/src/access-surface-catalog.test.ts +22 -14
  282. package/src/access-surface-catalog.ts +6 -3
  283. package/src/access-token-capabilities.test.ts +844 -0
  284. package/src/access-token-capabilities.ts +391 -0
  285. package/src/chat/chat-mcp.test.ts +232 -0
  286. package/src/chat/chat-session.ts +34 -0
  287. package/src/index.ts +14 -0
  288. package/src/mcp-read-only-tools.ts +61 -0
  289. package/src/tokens.ts +32 -3
  290. package/dist/chunk-2FOD2YY3.js.map +0 -1
  291. package/dist/chunk-DR6PEJU3.js.map +0 -1
  292. package/dist/chunk-E2SPGGUI.js.map +0 -1
  293. package/dist/chunk-FZGGZAAU.js.map +0 -1
  294. package/dist/chunk-ILFJ7AVS.js.map +0 -1
  295. /package/dist/{capsule-crypto-CZJSLEFG.js.map → access-token-capabilities.js.map} +0 -0
  296. /package/dist/{auto-sync-HMHQHUAG.js.map → auto-sync-G6IU7L6C.js.map} +0 -0
  297. /package/dist/{chunk-7QWMTOIF.js.map → chunk-2B7DP7AP.js.map} +0 -0
  298. /package/dist/{chunk-4BFRBP45.js.map → chunk-2JFDHI2K.js.map} +0 -0
  299. /package/dist/{chunk-OHDJ34CC.js.map → chunk-2SFEFR5I.js.map} +0 -0
  300. /package/dist/{chunk-YDSWRD33.js.map → chunk-5K5VEDFY.js.map} +0 -0
  301. /package/dist/{chunk-CZAZX7JP.js.map → chunk-7BAJAXGB.js.map} +0 -0
  302. /package/dist/{chunk-CXLNZXG5.js.map → chunk-7XGSIUP5.js.map} +0 -0
  303. /package/dist/{chunk-ZPOROUTX.js.map → chunk-AOYJVCFN.js.map} +0 -0
  304. /package/dist/{chunk-IC6QX5TC.js.map → chunk-BGMSRN6I.js.map} +0 -0
  305. /package/dist/{chunk-5QZDMSSN.js.map → chunk-CXEL3Y22.js.map} +0 -0
  306. /package/dist/{chunk-M5QKGHCR.js.map → chunk-CYWCKFCL.js.map} +0 -0
  307. /package/dist/{chunk-2U2A5HF4.js.map → chunk-D2XYYU5Q.js.map} +0 -0
  308. /package/dist/{chunk-DGYCWCQ7.js.map → chunk-DZSAXE3T.js.map} +0 -0
  309. /package/dist/{chunk-2BFLDH5F.js.map → chunk-EEIROWEG.js.map} +0 -0
  310. /package/dist/{chunk-6ZIETXZ2.js.map → chunk-H5PFR5ZT.js.map} +0 -0
  311. /package/dist/{chunk-66FLU5BT.js.map → chunk-II6WHCCW.js.map} +0 -0
  312. /package/dist/{chunk-YPEMNNNY.js.map → chunk-ITWTKT2R.js.map} +0 -0
  313. /package/dist/{chunk-AKUCU7CI.js.map → chunk-JI5AVXYO.js.map} +0 -0
  314. /package/dist/{chunk-27FLVMDC.js.map → chunk-KMF67QDQ.js.map} +0 -0
  315. /package/dist/{chunk-FLVL4L3L.js.map → chunk-KTULX4YO.js.map} +0 -0
  316. /package/dist/{chunk-4P4626RY.js.map → chunk-L4UZBJNM.js.map} +0 -0
  317. /package/dist/{chunk-JLR3JSTL.js.map → chunk-L6V3WJ55.js.map} +0 -0
  318. /package/dist/{chunk-6BISDEN6.js.map → chunk-LNHJ32NK.js.map} +0 -0
  319. /package/dist/{chunk-437S3G37.js.map → chunk-LNQUAJNC.js.map} +0 -0
  320. /package/dist/{chunk-LOR6ZM5R.js.map → chunk-MFDJ63U5.js.map} +0 -0
  321. /package/dist/{chunk-HRCACVHL.js.map → chunk-NFTABV56.js.map} +0 -0
  322. /package/dist/{chunk-OUMTBFSQ.js.map → chunk-NKCPUHCI.js.map} +0 -0
  323. /package/dist/{chunk-KCJ5H6XQ.js.map → chunk-ODSYJXDU.js.map} +0 -0
  324. /package/dist/{chunk-2QSZNTDO.js.map → chunk-RKNJBZ55.js.map} +0 -0
  325. /package/dist/{chunk-NG7YBCJO.js.map → chunk-SNBEVJBX.js.map} +0 -0
  326. /package/dist/{chunk-CZAA5N5S.js.map → chunk-SNNIUDRS.js.map} +0 -0
  327. /package/dist/{chunk-P6SYWE4G.js.map → chunk-STCCFQU5.js.map} +0 -0
  328. /package/dist/{chunk-X4A62ET7.js.map → chunk-TI7IHDBQ.js.map} +0 -0
  329. /package/dist/{chunk-BGTAL46Y.js.map → chunk-TV7C3HCB.js.map} +0 -0
  330. /package/dist/{chunk-EPGWWCZF.js.map → chunk-UBGAOYBP.js.map} +0 -0
  331. /package/dist/{chunk-M7GGMGMZ.js.map → chunk-UDCDGP6A.js.map} +0 -0
  332. /package/dist/{chunk-2MR3MFQB.js.map → chunk-UPSAT4PY.js.map} +0 -0
  333. /package/dist/{chunk-CGS7UKWM.js.map → chunk-VCW74PNH.js.map} +0 -0
  334. /package/dist/{chunk-CLX5VDNY.js.map → chunk-Y4RKAQZ7.js.map} +0 -0
  335. /package/dist/{chunk-EZ25VE3G.js.map → chunk-YNDLCWXS.js.map} +0 -0
  336. /package/dist/{first-start-migration-DY6YCRC2.js.map → first-start-migration-VBJQL6OI.js.map} +0 -0
  337. /package/dist/{tier-stats-TG6GUZ6N.js.map → tier-stats-5XF4UBRQ.js.map} +0 -0
@@ -4,22 +4,22 @@ import {
4
4
  loadSyncState,
5
5
  syncWearableSource,
6
6
  wearableSourceLabel
7
- } from "./chunk-2U2A5HF4.js";
8
- import {
9
- CompressionGuidelineCoordinator
10
- } from "./chunk-BRDJ2HFP.js";
7
+ } from "./chunk-D2XYYU5Q.js";
11
8
  import {
12
9
  MaintenanceScheduler
13
- } from "./chunk-6ZIETXZ2.js";
10
+ } from "./chunk-H5PFR5ZT.js";
14
11
  import {
15
12
  runPeerProfileReasoner
16
13
  } from "./chunk-I74SUMNI.js";
17
14
  import {
18
15
  migrateFromEngram
19
16
  } from "./chunk-7HYPN2GC.js";
17
+ import {
18
+ CompressionGuidelineCoordinator
19
+ } from "./chunk-BRDJ2HFP.js";
20
20
  import {
21
21
  LcmEngine
22
- } from "./chunk-CLX5VDNY.js";
22
+ } from "./chunk-Y4RKAQZ7.js";
23
23
  import {
24
24
  chunkTranscriptEntries
25
25
  } from "./chunk-TECVW3JP.js";
@@ -29,7 +29,7 @@ import {
29
29
  import {
30
30
  CompoundingEngine,
31
31
  defaultTierMigrationCycleBudget
32
- } from "./chunk-CZAA5N5S.js";
32
+ } from "./chunk-SNNIUDRS.js";
33
33
  import {
34
34
  SharedContextManager
35
35
  } from "./chunk-UI4FVU6T.js";
@@ -38,6 +38,12 @@ import {
38
38
  applyUtilityRankingRuntimeDelta,
39
39
  loadUtilityRuntimeValues
40
40
  } from "./chunk-LXOM6IQU.js";
41
+ import {
42
+ decideTierTransition
43
+ } from "./chunk-S75M5ZRK.js";
44
+ import {
45
+ TmtBuilder
46
+ } from "./chunk-ECZU5BJH.js";
41
47
  import {
42
48
  extractTopics
43
49
  } from "./chunk-UHGBNIOS.js";
@@ -49,28 +55,32 @@ import {
49
55
  import {
50
56
  renderEpistemicHedge
51
57
  } from "./chunk-YN2UN7N3.js";
58
+ import {
59
+ buildTargetedFactRecallSection,
60
+ shouldRecallTargetedFactEvidence
61
+ } from "./chunk-4SBW47WK.js";
52
62
  import {
53
63
  CODEX_THREAD_KEY_PREFIX
54
64
  } from "./chunk-4EX5WZ4M.js";
55
65
  import {
56
66
  TierMigrationExecutor
57
67
  } from "./chunk-VOUOLGIP.js";
58
- import {
59
- decideTierTransition
60
- } from "./chunk-S75M5ZRK.js";
61
- import {
62
- TmtBuilder
63
- } from "./chunk-ECZU5BJH.js";
64
68
  import {
65
69
  HourlySummarizer
66
70
  } from "./chunk-XZ5I7OZR.js";
67
- import {
68
- buildTargetedFactRecallSection,
69
- shouldRecallTargetedFactEvidence
70
- } from "./chunk-4SBW47WK.js";
71
71
  import {
72
72
  SessionObserverState
73
73
  } from "./chunk-FDPZVY6D.js";
74
+ import {
75
+ applyRuntimeRetrievalPolicy
76
+ } from "./chunk-5IZL4DCV.js";
77
+ import {
78
+ RelevanceStore
79
+ } from "./chunk-2IZAGAJR.js";
80
+ import {
81
+ RerankCache,
82
+ rerankLocalOrNoop
83
+ } from "./chunk-E3VODCC3.js";
74
84
  import {
75
85
  buildResponseGuidanceRecallSection,
76
86
  shouldRecallResponseGuidance
@@ -93,19 +103,9 @@ import {
93
103
  recencyWindowFromPrompt,
94
104
  resolvePromptTagPrefilterAsync
95
105
  } from "./chunk-MGN7VHWQ.js";
96
- import {
97
- applyRuntimeRetrievalPolicy
98
- } from "./chunk-5IZL4DCV.js";
99
106
  import {
100
107
  findUnresolvedEntityRefs
101
108
  } from "./chunk-X7XN6YU4.js";
102
- import {
103
- RelevanceStore
104
- } from "./chunk-2IZAGAJR.js";
105
- import {
106
- RerankCache,
107
- rerankLocalOrNoop
108
- } from "./chunk-E3VODCC3.js";
109
109
  import {
110
110
  reorderRecallResultsWithMmr
111
111
  } from "./chunk-YDBIWGNI.js";
@@ -121,22 +121,16 @@ import {
121
121
  import {
122
122
  applyReasoningTraceBoost
123
123
  } from "./chunk-ZZTOURJI.js";
124
+ import {
125
+ NegativeExampleStore
126
+ } from "./chunk-A3GOMRJG.js";
124
127
  import {
125
128
  applyMemoryWorthFilter,
126
129
  buildMemoryWorthCounterMap
127
130
  } from "./chunk-3GPTTA4J.js";
128
- import {
129
- NegativeExampleStore
130
- } from "./chunk-A3GOMRJG.js";
131
131
  import {
132
132
  evaluateMemoryActionPolicy
133
133
  } from "./chunk-H63EDPFJ.js";
134
- import {
135
- runLiveConnectorsOnce
136
- } from "./chunk-VU3SVYMA.js";
137
- import {
138
- classifyMemoryKind
139
- } from "./chunk-YAZNBMNF.js";
140
134
  import {
141
135
  hasBroadGraphIntent,
142
136
  inferIntentFromText,
@@ -144,6 +138,12 @@ import {
144
138
  isTaskInitiationIntent,
145
139
  planRecallMode
146
140
  } from "./chunk-PD6O7AXF.js";
141
+ import {
142
+ runLiveConnectorsOnce
143
+ } from "./chunk-VU3SVYMA.js";
144
+ import {
145
+ classifyMemoryKind
146
+ } from "./chunk-YAZNBMNF.js";
147
147
  import {
148
148
  recordJudgeTrainingPair
149
149
  } from "./chunk-AXTXN4T6.js";
@@ -198,7 +198,7 @@ import {
198
198
  buildEntityRecallSection,
199
199
  entityRecentTranscriptLookbackHours,
200
200
  readRecentEntityTranscriptEntries
201
- } from "./chunk-ZPOROUTX.js";
201
+ } from "./chunk-AOYJVCFN.js";
202
202
  import {
203
203
  normalizeReplaySessionKey
204
204
  } from "./chunk-2PRQG7PV.js";
@@ -208,14 +208,14 @@ import {
208
208
  import {
209
209
  compareVerifiedEpisodeResults,
210
210
  searchVerifiedEpisodes
211
- } from "./chunk-66FLU5BT.js";
211
+ } from "./chunk-II6WHCCW.js";
212
212
  import {
213
213
  ThreadingManager
214
214
  } from "./chunk-DBRYEIGY.js";
215
215
  import {
216
216
  compareVerifiedSemanticRuleResults,
217
217
  searchVerifiedSemanticRules
218
- } from "./chunk-YPEMNNNY.js";
218
+ } from "./chunk-ITWTKT2R.js";
219
219
  import {
220
220
  searchWorkProductLedgerEntries
221
221
  } from "./chunk-ZRWB5D4H.js";
@@ -228,14 +228,14 @@ import {
228
228
  import {
229
229
  runNamespaceMaintenanceFanout,
230
230
  summarizeNamespaceMaintenanceHealth
231
- } from "./chunk-P6SYWE4G.js";
231
+ } from "./chunk-STCCFQU5.js";
232
232
  import {
233
233
  NamespaceCatalog,
234
234
  planNamespaceMaintenance
235
- } from "./chunk-LOR6ZM5R.js";
235
+ } from "./chunk-MFDJ63U5.js";
236
236
  import {
237
237
  NamespaceStorageRouter
238
- } from "./chunk-BGTAL46Y.js";
238
+ } from "./chunk-TV7C3HCB.js";
239
239
  import {
240
240
  searchHarmonicRetrieval
241
241
  } from "./chunk-AV5ZEH4M.js";
@@ -243,13 +243,13 @@ import {
243
243
  isAboveImportanceThreshold,
244
244
  scoreImportance
245
245
  } from "./chunk-JXS5PDQ7.js";
246
- import {
247
- recordEvalShadowRecall
248
- } from "./chunk-3PY7VHV7.js";
249
246
  import {
250
247
  EXTRACTION_JUDGE_VERDICT_CATEGORY,
251
248
  recordJudgeVerdict
252
249
  } from "./chunk-SMX5267P.js";
250
+ import {
251
+ recordEvalShadowRecall
252
+ } from "./chunk-3PY7VHV7.js";
253
253
  import {
254
254
  collectNativeKnowledgeChunks,
255
255
  formatNativeKnowledgeSection,
@@ -270,7 +270,10 @@ import {
270
270
  materializeAfterSemanticConsolidation,
271
271
  parseConsolidationResponse,
272
272
  parseOperatorAwareConsolidationResponse
273
- } from "./chunk-EPGWWCZF.js";
273
+ } from "./chunk-UBGAOYBP.js";
274
+ import {
275
+ buildRecallQueryPolicy
276
+ } from "./chunk-LBJBNWS2.js";
274
277
  import {
275
278
  buildBehaviorSignalsForMemory,
276
279
  dedupeBehaviorSignalsByMemoryAndHash
@@ -299,9 +302,6 @@ import {
299
302
  loadCorrectionsFile,
300
303
  saveCorrectionsFile
301
304
  } from "./chunk-NDAH7BJ5.js";
302
- import {
303
- buildRecallQueryPolicy
304
- } from "./chunk-LBJBNWS2.js";
305
305
  import {
306
306
  WearablesInputError,
307
307
  describeErrorForOperator
@@ -319,10 +319,10 @@ import {
319
319
  createCorrectionService,
320
320
  detectPassiveCorrections,
321
321
  qmdCollectionPathParts
322
- } from "./chunk-X4A62ET7.js";
322
+ } from "./chunk-TI7IHDBQ.js";
323
323
  import {
324
324
  importCapsule
325
- } from "./chunk-M5QKGHCR.js";
325
+ } from "./chunk-CYWCKFCL.js";
326
326
  import {
327
327
  isCodingGraphInstalled
328
328
  } from "./chunk-VQ7B2Q6M.js";
@@ -350,11 +350,11 @@ import {
350
350
  } from "./chunk-BAVVI5GP.js";
351
351
  import {
352
352
  NamespaceSearchRouter
353
- } from "./chunk-4BFRBP45.js";
353
+ } from "./chunk-2JFDHI2K.js";
354
354
  import {
355
355
  createConversationIndexRuntime,
356
356
  createSearchBackend
357
- } from "./chunk-27FLVMDC.js";
357
+ } from "./chunk-KMF67QDQ.js";
358
358
  import {
359
359
  NoopSearchBackend
360
360
  } from "./chunk-CYEPCZN5.js";
@@ -378,15 +378,19 @@ import {
378
378
  import {
379
379
  shouldSkipImplicitExtraction
380
380
  } from "./chunk-K5LLP4CY.js";
381
+ import {
382
+ searchCausalTrajectories
383
+ } from "./chunk-7XGSIUP5.js";
381
384
  import {
382
385
  GraphIndex
383
386
  } from "./chunk-OBMR4VIX.js";
384
387
  import {
385
- searchCausalTrajectories
386
- } from "./chunk-CXLNZXG5.js";
388
+ decideLifecycleTransition,
389
+ resolveLifecycleState
390
+ } from "./chunk-TBBDFYXW.js";
387
391
  import {
388
392
  buildChainFollowupGenerator
389
- } from "./chunk-DGYCWCQ7.js";
393
+ } from "./chunk-DZSAXE3T.js";
390
394
  import {
391
395
  ContentHashIndex,
392
396
  StorageManager,
@@ -395,7 +399,7 @@ import {
395
399
  normalizeAttributePairs,
396
400
  parseEntityFile,
397
401
  selfDeps
398
- } from "./chunk-M7GGMGMZ.js";
402
+ } from "./chunk-UDCDGP6A.js";
399
403
  import {
400
404
  isValidTranscriptDate,
401
405
  loadSpeakerRegistry,
@@ -419,14 +423,14 @@ import {
419
423
  isValidAsOf,
420
424
  isValidityExpiredNow
421
425
  } from "./chunk-6CIAGZ6X.js";
422
- import {
423
- stripAttributesSuffix
424
- } from "./chunk-SVOZFLIQ.js";
425
426
  import {
426
427
  attachCitation,
427
428
  hasCitationForTemplate,
428
429
  stripCitationForTemplate
429
430
  } from "./chunk-J6A3CX5N.js";
431
+ import {
432
+ stripAttributesSuffix
433
+ } from "./chunk-SVOZFLIQ.js";
430
434
  import {
431
435
  confidenceTier
432
436
  } from "./chunk-JS2HKKOK.js";
@@ -453,13 +457,13 @@ import {
453
457
  fallbackLlmRuntimeContextFromConfig,
454
458
  gatewayTaskChainOptions
455
459
  } from "./chunk-JIKJPDQJ.js";
456
- import {
457
- CAPSULE_ID_PATTERN
458
- } from "./chunk-WEHSQBFR.js";
459
460
  import {
460
461
  keyring_exports,
461
462
  secureStoreDir
462
463
  } from "./chunk-GWTFLF2P.js";
464
+ import {
465
+ CAPSULE_ID_PATTERN
466
+ } from "./chunk-WEHSQBFR.js";
463
467
  import {
464
468
  buildRetrievedMemoryProvenance
465
469
  } from "./chunk-I4WBNM3M.js";
@@ -533,10 +537,6 @@ import {
533
537
  resolveHandle,
534
538
  stripHandles
535
539
  } from "./chunk-JAKIDQB2.js";
536
- import {
537
- decideLifecycleTransition,
538
- resolveLifecycleState
539
- } from "./chunk-TBBDFYXW.js";
540
540
  import {
541
541
  abortError,
542
542
  isAbortError,
@@ -12825,7 +12825,7 @@ var OrchestratorInitCoordinator = class {
12825
12825
  if (signal.aborted) return;
12826
12826
  if (lifecycleCaps.lifecyclePolicy && resolveQmdCapabilities(this.deps.config).qmdTierMigration) {
12827
12827
  try {
12828
- const { runFirstStartMigration } = await import("./first-start-migration-DY6YCRC2.js");
12828
+ const { runFirstStartMigration } = await import("./first-start-migration-VBJQL6OI.js");
12829
12829
  const result = await runFirstStartMigration({
12830
12830
  storage: this.deps.storage,
12831
12831
  config: this.deps.config,
@@ -12848,7 +12848,7 @@ var OrchestratorInitCoordinator = class {
12848
12848
  if (signal.aborted) return;
12849
12849
  if (!this.deps.wearablesAutoSyncHandle && this.deps.config.wearables.enabled && this.deps.config.wearables.autoSyncEnabled && Object.values(this.deps.config.wearables.sources).some((source) => source.enabled)) {
12850
12850
  try {
12851
- const { startWearablesAutoSync } = await import("./auto-sync-HMHQHUAG.js");
12851
+ const { startWearablesAutoSync } = await import("./auto-sync-G6IU7L6C.js");
12852
12852
  if (signal.aborted) return;
12853
12853
  this.deps.wearablesAutoSyncHandle = startWearablesAutoSync(
12854
12854
  {
@@ -22713,4 +22713,4 @@ export {
22713
22713
  blendGraphExpandedRecallScore,
22714
22714
  Orchestrator
22715
22715
  };
22716
- //# sourceMappingURL=chunk-5QZDMSSN.js.map
22716
+ //# sourceMappingURL=chunk-CXEL3Y22.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createVersion
3
3
  } from "./chunk-VF4XKTX3.js";
4
- import {
5
- parseExportBundle
6
- } from "./chunk-WEHSQBFR.js";
7
4
  import {
8
5
  decryptCapsuleFileInMemory,
9
6
  isEncryptedCapsuleFile
10
- } from "./chunk-437S3G37.js";
7
+ } from "./chunk-LNQUAJNC.js";
8
+ import {
9
+ parseExportBundle
10
+ } from "./chunk-WEHSQBFR.js";
11
11
  import {
12
12
  assertIsDirectoryNotSymlink,
13
13
  assertRealpathInsideRoot,
@@ -227,4 +227,4 @@ function mintForkId(capsuleId, originalId, now) {
227
227
  export {
228
228
  importCapsule
229
229
  };
230
- //# sourceMappingURL=chunk-M5QKGHCR.js.map
230
+ //# sourceMappingURL=chunk-CYWCKFCL.js.map
@@ -16,6 +16,10 @@ import {
16
16
  WearablesInputError,
17
17
  describeErrorForOperator
18
18
  } from "./chunk-V7IZKJI3.js";
19
+ import {
20
+ countRecallTokenOverlap,
21
+ normalizeRecallTokens
22
+ } from "./chunk-ZBJMUXZH.js";
19
23
  import {
20
24
  composeDayTranscriptBody,
21
25
  composeDayTranscriptMeta,
@@ -25,10 +29,6 @@ import {
25
29
  resolveSpeaker,
26
30
  serializeDayTranscript
27
31
  } from "./chunk-M7XQSUBB.js";
28
- import {
29
- countRecallTokenOverlap,
30
- normalizeRecallTokens
31
- } from "./chunk-ZBJMUXZH.js";
32
32
 
33
33
  // src/wearables/cleanup.ts
34
34
  var MERGE_GAP_MS = 3e4;
@@ -1182,4 +1182,4 @@ export {
1182
1182
  syncWearableSource,
1183
1183
  defaultTimezone
1184
1184
  };
1185
- //# sourceMappingURL=chunk-2U2A5HF4.js.map
1185
+ //# sourceMappingURL=chunk-D2XYYU5Q.js.map
@@ -0,0 +1,173 @@
1
+ import {
2
+ EngramAccessForbiddenError
3
+ } from "./chunk-RANHFI3P.js";
4
+
5
+ // src/access-token-capabilities.ts
6
+ import { AsyncLocalStorage } from "async_hooks";
7
+ var TOKEN_CAPABILITIES_VERSION = 1;
8
+ var NAMESPACE_VALUE_MAX_LENGTH = 128;
9
+ var NAMESPACE_VALUE_PATTERN = /^[^\s\/\\\x00-\x1F]+$/;
10
+ function isValidNamespaceValue(value) {
11
+ if (typeof value !== "string" || value.length === 0 || value.length > NAMESPACE_VALUE_MAX_LENGTH) {
12
+ return false;
13
+ }
14
+ if (!NAMESPACE_VALUE_PATTERN.test(value)) return false;
15
+ if (value === "." || value === "..") return false;
16
+ return true;
17
+ }
18
+ function isStringArray(value) {
19
+ return Array.isArray(value) && value.every((v) => typeof v === "string");
20
+ }
21
+ function dedupeSort(values) {
22
+ return [...new Set(values)].sort();
23
+ }
24
+ function parseAxis(obj, key, validateValue, valueLabel) {
25
+ if (!Object.prototype.hasOwnProperty.call(obj, key)) return void 0;
26
+ const value = obj[key];
27
+ if (value === void 0 || value === null) return void 0;
28
+ if (!isStringArray(value)) {
29
+ throw new Error(`capabilities ${key} must be an array of non-empty strings`);
30
+ }
31
+ const cleaned = [];
32
+ for (const v of value) {
33
+ if (typeof v !== "string" || v.length === 0) {
34
+ throw new Error(`capabilities ${key} must be an array of non-empty strings`);
35
+ }
36
+ if (!validateValue(v)) {
37
+ throw new Error(`capabilities ${key} contains a malformed ${valueLabel}: ${JSON.stringify(v)}`);
38
+ }
39
+ cleaned.push(v);
40
+ }
41
+ return dedupeSort(cleaned);
42
+ }
43
+ function normalizeCapabilities(raw) {
44
+ if (raw === void 0 || raw === null) return void 0;
45
+ if (typeof raw !== "object" || Array.isArray(raw)) {
46
+ throw new Error("capabilities must be an object with a version marker");
47
+ }
48
+ const obj = raw;
49
+ if (obj.version !== void 0 && obj.version !== TOKEN_CAPABILITIES_VERSION) {
50
+ throw new Error(`capabilities.version must be ${TOKEN_CAPABILITIES_VERSION}`);
51
+ }
52
+ const ops = parseAxis(obj, "ops", () => true, "operation");
53
+ const namespaces = parseAxis(obj, "namespaces", isValidNamespaceValue, "namespace");
54
+ const result = { version: TOKEN_CAPABILITIES_VERSION };
55
+ if (ops !== void 0) result.ops = ops;
56
+ if (namespaces !== void 0) result.namespaces = namespaces;
57
+ return result;
58
+ }
59
+ function validateCapabilitiesForMint(raw, validOps) {
60
+ const result = { version: TOKEN_CAPABILITIES_VERSION };
61
+ if (raw === void 0 || raw === null) {
62
+ return result;
63
+ }
64
+ if (typeof raw !== "object" || Array.isArray(raw)) {
65
+ throw new Error("capabilities must be an object with optional ops/namespaces arrays");
66
+ }
67
+ const obj = raw;
68
+ if (Object.prototype.hasOwnProperty.call(obj, "version") && obj.version !== void 0) {
69
+ if (obj.version !== TOKEN_CAPABILITIES_VERSION) {
70
+ throw new Error(`capabilities.version must be ${TOKEN_CAPABILITIES_VERSION}`);
71
+ }
72
+ }
73
+ const validOpSet = new Set(validOps);
74
+ if (Object.prototype.hasOwnProperty.call(obj, "ops") && obj.ops !== void 0 && obj.ops !== null) {
75
+ if (!isStringArray(obj.ops)) {
76
+ throw new Error("capabilities ops must be an array of non-empty strings");
77
+ }
78
+ const ops = obj.ops;
79
+ for (const v of ops) {
80
+ if (typeof v !== "string" || v.length === 0) {
81
+ throw new Error("capabilities ops must be an array of non-empty strings");
82
+ }
83
+ }
84
+ const unknown = ops.filter((op) => typeof op === "string" && !validOpSet.has(op));
85
+ if (unknown.length > 0) {
86
+ throw new Error(
87
+ `capabilities ops contains unknown operation name(s): ${unknown.map((o) => JSON.stringify(o)).join(", ")}`
88
+ );
89
+ }
90
+ result.ops = dedupeSort(ops);
91
+ }
92
+ if (Object.prototype.hasOwnProperty.call(obj, "namespaces") && obj.namespaces !== void 0 && obj.namespaces !== null) {
93
+ if (!isStringArray(obj.namespaces)) {
94
+ throw new Error("capabilities namespaces must be an array of non-empty strings");
95
+ }
96
+ const namespaces = obj.namespaces;
97
+ for (const v of namespaces) {
98
+ if (typeof v !== "string" || v.length === 0) {
99
+ throw new Error("capabilities namespaces must be an array of non-empty strings");
100
+ }
101
+ if (!isValidNamespaceValue(v)) {
102
+ throw new Error(`capabilities namespaces contains a malformed namespace: ${JSON.stringify(v)}`);
103
+ }
104
+ }
105
+ result.namespaces = dedupeSort(namespaces);
106
+ }
107
+ return result;
108
+ }
109
+ function isCapabilityRestricted(caps) {
110
+ if (!caps) return false;
111
+ return caps.ops !== void 0 || caps.namespaces !== void 0;
112
+ }
113
+ function capabilityAllowsOp(caps, op) {
114
+ if (caps?.ops === void 0) return true;
115
+ return caps.ops.includes(op);
116
+ }
117
+ function capabilityAllowsNamespace(caps, namespace) {
118
+ if (caps?.namespaces === void 0) return true;
119
+ if (namespace === void 0) return false;
120
+ return caps.namespaces.includes(namespace);
121
+ }
122
+ function assertOperationAllowed(caps, op) {
123
+ if (!capabilityAllowsOp(caps, op)) {
124
+ throw new EngramAccessForbiddenError(
125
+ `token is not permitted to call operation: ${op}`
126
+ );
127
+ }
128
+ }
129
+ function assertNamespaceAllowed(caps, namespace) {
130
+ if (!capabilityAllowsNamespace(caps, namespace)) {
131
+ throw new EngramAccessForbiddenError(
132
+ namespace === void 0 ? "token is scoped to specific namespaces and this operation requires an explicit namespace" : `token is not permitted to access namespace: ${namespace}`
133
+ );
134
+ }
135
+ }
136
+ function resolveEffectiveNamespace(namespace, defaultNamespace) {
137
+ const normalized = namespace !== void 0 && namespace.length > 0 ? namespace : void 0;
138
+ return normalized ?? defaultNamespace;
139
+ }
140
+ function enforceNamespaceAllowList(caps, namespace, defaultNamespace) {
141
+ if (caps?.namespaces === void 0) return;
142
+ const effective = resolveEffectiveNamespace(namespace, defaultNamespace);
143
+ if (effective === void 0 || !caps.namespaces.includes(effective)) {
144
+ throw new EngramAccessForbiddenError(
145
+ namespace === void 0 ? "token is scoped to specific namespaces; the server default namespace is not permitted \u2014 supply an allowed namespace" : `token is not permitted to access namespace: ${namespace}`
146
+ );
147
+ }
148
+ }
149
+ function assertFleetWideOperationAllowed(caps) {
150
+ if (!capabilityAllowsNamespace(caps, void 0)) {
151
+ throw new EngramAccessForbiddenError(
152
+ "token is scoped to specific namespaces; this maintenance operation runs across all namespaces and is not permitted for a namespace-scoped token"
153
+ );
154
+ }
155
+ }
156
+ var tokenCapabilityStore = new AsyncLocalStorage();
157
+
158
+ export {
159
+ TOKEN_CAPABILITIES_VERSION,
160
+ isValidNamespaceValue,
161
+ normalizeCapabilities,
162
+ validateCapabilitiesForMint,
163
+ isCapabilityRestricted,
164
+ capabilityAllowsOp,
165
+ capabilityAllowsNamespace,
166
+ assertOperationAllowed,
167
+ assertNamespaceAllowed,
168
+ resolveEffectiveNamespace,
169
+ enforceNamespaceAllowList,
170
+ assertFleetWideOperationAllowed,
171
+ tokenCapabilityStore
172
+ };
173
+ //# sourceMappingURL=chunk-D7FOKIY5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/access-token-capabilities.ts"],"sourcesContent":["/**\n * Per-token capabilities (issue #1837).\n *\n * A token entry MAY carry an explicit, versioned capabilities record. The\n * record's PRESENCE is mechanically detectable, which is load-bearing for\n * security:\n *\n * - ABSENT `capabilities` field ⇒ a PRE-FEATURE legacy entry (minted\n * before this feature). It is UNRESTRICTED — full access — purely for\n * backward compatibility. This is the ONLY path by which \"full access\"\n * is granted by omission.\n *\n * - PRESENT `capabilities` record (always carries a `version` marker) ⇒ a\n * token minted by the capability-aware path. Even a new token minted\n * without `--ops`/`--namespaces` records an EXPLICIT unrestricted record\n * (`{ version: 1 }`) — a deliberate, auditable choice, never an\n * accidentally-omitted field. Within the record, the two axes follow\n * absent-vs-present semantics:\n * * axis ABSENT (e.g. no `ops` key) ⇒ unrestricted on that axis.\n * * axis PRESENT and empty (`ops: []`) ⇒ deny all (fail-closed).\n * * axis PRESENT and non-empty ⇒ allow only the listed values.\n *\n * Malformed capability input at mint time (bad version, non-array axes,\n * non-string elements, unknown op names against the catalog, malformed\n * namespace values) is REJECTED — a token is never created from invalid\n * input (rule: invalid input rejected, not defaulted).\n *\n * This module owns the pure capability logic (shape validation, allow-list\n * checks) and the per-request AsyncLocalStorage carrying the presenting\n * token's resolved capabilities down to the access boundary. It imports\n * nothing else in the package except the forbidden-error class, so it can be\n * reused by the token store, the boundary, and the HTTP/MCP surfaces without\n * cycles.\n */\n\nimport { AsyncLocalStorage } from \"node:async_hooks\";\nimport { EngramAccessForbiddenError } from \"./access-errors.js\";\n\n/** Current capability-record schema version. */\nexport const TOKEN_CAPABILITIES_VERSION = 1 as const;\n\n/**\n * Versioned capabilities record stored on a token entry. Presence of this\n * record (vs. an absent field) is what distinguishes a capability-aware\n * token from a pre-feature legacy entry.\n */\nexport interface TokenCapabilities {\n readonly version: typeof TOKEN_CAPABILITIES_VERSION;\n /**\n * Operations allow-list. `undefined` (key absent) ⇒ unrestricted on this\n * axis. `[]` ⇒ deny all ops (fail-closed). Non-empty ⇒ allow only listed.\n */\n ops?: string[];\n /**\n * Namespaces allow-list. `undefined` ⇒ unrestricted. `[]` ⇒ deny all.\n * Non-empty ⇒ allow only listed.\n */\n namespaces?: string[];\n}\n\n/**\n * Namespace value validation. Namespace identifiers are flexible (default,\n * team, self, principal-prefixed, project-prefixed) but must never contain\n * whitespace, path separators, traversal segments, or control characters —\n * such values are malformed at mint time and rejected, never silently\n * coerced.\n */\nconst NAMESPACE_VALUE_MAX_LENGTH = 128;\n// Non-empty, no whitespace, no path separators, no control chars. `.` and\n// `..` are rejected separately so legitimate dotted names (e.g. a domain)\n// remain allowed while traversal is not.\nconst NAMESPACE_VALUE_PATTERN = /^[^\\s\\/\\\\\\x00-\\x1F]+$/;\n\n/** True when `value` is an acceptable namespace allow-list entry. */\nexport function isValidNamespaceValue(value: unknown): value is string {\n if (typeof value !== \"string\" || value.length === 0 || value.length > NAMESPACE_VALUE_MAX_LENGTH) {\n return false;\n }\n if (!NAMESPACE_VALUE_PATTERN.test(value)) return false;\n if (value === \".\" || value === \"..\") return false;\n return true;\n}\n\nfunction isStringArray(value: unknown): value is unknown[] {\n return Array.isArray(value) && value.every((v) => typeof v === \"string\");\n}\n\nfunction dedupeSort(values: string[]): string[] {\n return [...new Set(values)].sort();\n}\n\n/**\n * Parse one axis (ops or namespaces) for PERSISTENCE/LOAD. Returns the\n * cleaned array (deduped, sorted; possibly empty to preserve \"present ⇒\n * fail-closed\") or `undefined` when the key is absent. Throws on a malformed\n * shape (non-array, non-string elements, malformed namespace values). Op\n * validation against the catalog happens only at mint time.\n */\nfunction parseAxis(\n obj: Record<string, unknown>,\n key: \"ops\" | \"namespaces\",\n validateValue: (v: unknown) => boolean,\n valueLabel: string,\n): string[] | undefined {\n if (!Object.prototype.hasOwnProperty.call(obj, key)) return undefined;\n const value = obj[key];\n if (value === undefined || value === null) return undefined;\n if (!isStringArray(value)) {\n throw new Error(`capabilities ${key} must be an array of non-empty strings`);\n }\n const cleaned: string[] = [];\n for (const v of value) {\n if (typeof v !== \"string\" || v.length === 0) {\n throw new Error(`capabilities ${key} must be an array of non-empty strings`);\n }\n if (!validateValue(v)) {\n throw new Error(`capabilities ${key} contains a malformed ${valueLabel}: ${JSON.stringify(v)}`);\n }\n cleaned.push(v);\n }\n // Preserve presence: an explicitly empty array stays [] (fail-closed),\n // NOT coerced to undefined (which would mean unrestricted).\n return dedupeSort(cleaned);\n}\n\n/**\n * Normalize a capabilities record for PERSISTENCE/LOAD. Returns `undefined`\n * ONLY when the record is entirely absent (a pre-feature legacy entry ⇒\n * unrestricted). When present, an absent/`undefined` `version` is COERCED to\n * the current default (1) — mirroring {@link validateCapabilitiesForMint} — so\n * a record that mint-validated also load-normalizes without a schema throw.\n * An explicitly-present WRONG version (not 1) is still rejected. Throws on a\n * malformed record (non-object, explicitly-wrong version, malformed axes).\n */\nexport function normalizeCapabilities(raw: unknown): TokenCapabilities | undefined {\n if (raw === undefined || raw === null) return undefined;\n if (typeof raw !== \"object\" || Array.isArray(raw)) {\n throw new Error(\"capabilities must be an object with a version marker\");\n }\n const obj = raw as Record<string, unknown>;\n // Coerce absent/undefined version → 1, mirroring validateCapabilitiesForMint\n // (version 1 is the only schema version; coercing keeps mint-validated\n // records reloadable). Only an explicitly-present WRONG version throws.\n if (obj.version !== undefined && obj.version !== TOKEN_CAPABILITIES_VERSION) {\n throw new Error(`capabilities.version must be ${TOKEN_CAPABILITIES_VERSION}`);\n }\n const ops = parseAxis(obj, \"ops\", () => true, \"operation\");\n const namespaces = parseAxis(obj, \"namespaces\", isValidNamespaceValue, \"namespace\");\n const result: TokenCapabilities = { version: TOKEN_CAPABILITIES_VERSION };\n if (ops !== undefined) result.ops = ops;\n if (namespaces !== undefined) result.namespaces = namespaces;\n return result;\n}\n\n/**\n * Validate a capabilities record at MINT time. ALWAYS returns a versioned\n * record (never `undefined`) so every newly-minted token carries an explicit\n * capability decision — a new token can never gain full access by OMITTING\n * the field. When `raw` is absent/null, the result is an explicit\n * unrestricted record (`{ version: 1 }`), a deliberate/auditable choice. A\n * present-but-`undefined` (or absent) `version` is coerced to the current\n * default (1); an explicitly-wrong version is rejected. This version rule is\n * identical to {@link normalizeCapabilities} (mint/load symmetry). Rejects\n * unknown op names against the catalog and malformed namespace values;\n * throws a plain Error — the caller must NOT create a token when this throws.\n */\nexport function validateCapabilitiesForMint(\n raw: unknown,\n validOps: readonly string[],\n): TokenCapabilities {\n const result: TokenCapabilities = { version: TOKEN_CAPABILITIES_VERSION };\n if (raw === undefined || raw === null) {\n return result;\n }\n if (typeof raw !== \"object\" || Array.isArray(raw)) {\n throw new Error(\"capabilities must be an object with optional ops/namespaces arrays\");\n }\n const obj = raw as Record<string, unknown>;\n if (Object.prototype.hasOwnProperty.call(obj, \"version\") && obj.version !== undefined) {\n if (obj.version !== TOKEN_CAPABILITIES_VERSION) {\n throw new Error(`capabilities.version must be ${TOKEN_CAPABILITIES_VERSION}`);\n }\n }\n const validOpSet = new Set(validOps);\n\n if (Object.prototype.hasOwnProperty.call(obj, \"ops\") && obj.ops !== undefined && obj.ops !== null) {\n if (!isStringArray(obj.ops)) {\n throw new Error(\"capabilities ops must be an array of non-empty strings\");\n }\n const ops = obj.ops as unknown[];\n for (const v of ops) {\n if (typeof v !== \"string\" || v.length === 0) {\n throw new Error(\"capabilities ops must be an array of non-empty strings\");\n }\n }\n // Reject unknown op names against the catalog (unknown ⇒ reject, never drop).\n const unknown = ops.filter((op) => typeof op === \"string\" && !validOpSet.has(op));\n if (unknown.length > 0) {\n throw new Error(\n `capabilities ops contains unknown operation name(s): ${unknown.map((o) => JSON.stringify(o)).join(\", \")}`,\n );\n }\n // Preserve presence (empty stays [] ⇒ deny all ops).\n result.ops = dedupeSort(ops as string[]);\n }\n\n if (\n Object.prototype.hasOwnProperty.call(obj, \"namespaces\") &&\n obj.namespaces !== undefined &&\n obj.namespaces !== null\n ) {\n if (!isStringArray(obj.namespaces)) {\n throw new Error(\"capabilities namespaces must be an array of non-empty strings\");\n }\n const namespaces = obj.namespaces as unknown[];\n for (const v of namespaces) {\n if (typeof v !== \"string\" || v.length === 0) {\n throw new Error(\"capabilities namespaces must be an array of non-empty strings\");\n }\n if (!isValidNamespaceValue(v)) {\n throw new Error(`capabilities namespaces contains a malformed namespace: ${JSON.stringify(v)}`);\n }\n }\n result.namespaces = dedupeSort(namespaces as string[]);\n }\n\n return result;\n}\n\n/**\n * True when `caps` imposes any restriction (a present record with at least\n * one axis key). `undefined` (legacy / absent record) ⇒ unrestricted. A\n * present `{ version: 1 }` record with no axes ⇒ also unrestricted (but\n * auditable — it is a deliberate new-token decision, not omission).\n */\nexport function isCapabilityRestricted(caps: TokenCapabilities | undefined | null): boolean {\n if (!caps) return false;\n return caps.ops !== undefined || caps.namespaces !== undefined;\n}\n\n/**\n * True when `caps` permits `op`.\n * - record ABSENT (legacy) ⇒ unrestricted (true).\n * - ops axis ABSENT ⇒ unrestricted on this axis (true).\n * - ops axis PRESENT ⇒ `op` must be listed; `[]` ⇒ false (deny all).\n */\nexport function capabilityAllowsOp(caps: TokenCapabilities | undefined | null, op: string): boolean {\n if (caps?.ops === undefined) return true;\n return caps.ops.includes(op);\n}\n\n/**\n * True when `caps` permits `namespace`.\n * - record ABSENT / namespaces axis ABSENT ⇒ unrestricted (true).\n * - namespaces axis PRESENT ⇒ `namespace` must be listed; undefined\n * namespace ⇒ false; `[]` ⇒ false (deny all).\n */\nexport function capabilityAllowsNamespace(\n caps: TokenCapabilities | undefined | null,\n namespace: string | undefined,\n): boolean {\n if (caps?.namespaces === undefined) return true;\n if (namespace === undefined) return false;\n return caps.namespaces.includes(namespace);\n}\n\n/**\n * Throw {@link EngramAccessForbiddenError} when `caps` restricts ops and\n * `op` is not permitted. No-op for unrestricted tokens.\n */\nexport function assertOperationAllowed(\n caps: TokenCapabilities | undefined | null,\n op: string,\n): void {\n if (!capabilityAllowsOp(caps, op)) {\n throw new EngramAccessForbiddenError(\n `token is not permitted to call operation: ${op}`,\n );\n }\n}\n\n/**\n * Throw {@link EngramAccessForbiddenError} when `caps` restricts namespaces\n * and `namespace` is not permitted. No-op for unrestricted tokens.\n */\nexport function assertNamespaceAllowed(\n caps: TokenCapabilities | undefined | null,\n namespace: string | undefined,\n): void {\n if (!capabilityAllowsNamespace(caps, namespace)) {\n throw new EngramAccessForbiddenError(\n namespace === undefined\n ? \"token is scoped to specific namespaces and this operation requires an explicit namespace\"\n : `token is not permitted to access namespace: ${namespace}`,\n );\n }\n}\n\n/**\n * Resolve the EFFECTIVE namespace an operation runs against: a present,\n * non-empty request namespace wins, otherwise the server default — the same\n * resolution downstream storage applies\n * (`getWritableStorageForNamespace(undefined)` → `defaultNamespace`). Empty\n * strings are treated as absent. Centralized so every invocation surface\n * (HTTP query/body, MCP `tools/call`, id-loaded records, legacy pairs that\n * carry no namespace) applies ONE rule and none can dodge the check by\n * dropping the param. (issue #1850)\n */\nexport function resolveEffectiveNamespace(\n namespace: string | undefined,\n defaultNamespace: string | undefined,\n): string | undefined {\n const normalized = namespace !== undefined && namespace.length > 0 ? namespace : undefined;\n return normalized ?? defaultNamespace;\n}\n\n/**\n * The single effective-namespace allow-list chokepoint (issues #1837/#1850).\n * Throws {@link EngramAccessForbiddenError} when `caps` carries a namespaces\n * allow-list and the EFFECTIVE namespace (request value OR server default) is\n * not a member. FAIL CLOSED:\n * - a scoped token whose allow-list does not cover the effective namespace\n * (explicit OR defaulted) is rejected;\n * - an absent server default (unconfigured) is also rejected for scoped\n * tokens, so omitting `?namespace=` can never bypass the allow-list.\n * No-op for unrestricted tokens (no namespaces axis) so legacy/unrestricted\n * behavior is unchanged. Both the HTTP transport (`resolveNamespace`) and the\n * MCP dispatch route through this ONE function so no surface is missed.\n */\nexport function enforceNamespaceAllowList(\n caps: TokenCapabilities | undefined | null,\n namespace: string | undefined,\n defaultNamespace: string | undefined,\n): void {\n if (caps?.namespaces === undefined) return; // unrestricted token — unchanged\n const effective = resolveEffectiveNamespace(namespace, defaultNamespace);\n if (effective === undefined || !caps.namespaces.includes(effective)) {\n throw new EngramAccessForbiddenError(\n namespace === undefined\n ? \"token is scoped to specific namespaces; the server default namespace is not permitted — supply an allowed namespace\"\n : `token is not permitted to access namespace: ${namespace}`,\n );\n }\n}\n\n/**\n * Fleet-wide / global maintenance operation guard (issue #1850 round 10).\n *\n * A distinct escalation class from the id-addressed routes (round 9) and the\n * param-namespace ops (round 4): some boundary operations inherently run\n * ACROSS ALL namespaces — or against a single global layer (compression\n * guidelines, shared context, compounding) that is not namespace-partitioned\n * — and carry NO `namespace` argument, so the MCP `tools/call` effective-\n * namespace chokepoint ({@link enforceNamespaceAllowList}, which only fires\n * when `toolAcceptsNamespace`) never applies. Without this guard a bearer\n * scoped to ONE tenant could trigger maintenance that mutates state in EVERY\n * namespace (privilege escalation).\n *\n * Fail CLOSED exactly like the other shared guards: a namespace-SCOPED token\n * (namespaces axis present) is rejected; unrestricted / legacy tokens (absent\n * record or no namespaces axis — i.e. cron and internal callers that never\n * bind a capability record) are unaffected. Reuses the EXISTING capability\n * model via {@link capabilityAllowsNamespace} — no new \"all\"/\"*\" scope concept.\n * Must run BEFORE any side effect so a denial never leaks a partial mutation.\n */\nexport function assertFleetWideOperationAllowed(\n caps: TokenCapabilities | undefined | null,\n): void {\n // capabilityAllowsNamespace returns false for ANY scoped token when the\n // namespace is undefined (a fleet-wide op has no single namespace), and\n // true for unrestricted/legacy tokens — exactly the desired policy.\n if (!capabilityAllowsNamespace(caps, undefined)) {\n throw new EngramAccessForbiddenError(\n \"token is scoped to specific namespaces; this maintenance operation runs across all namespaces and is not permitted for a namespace-scoped token\",\n );\n }\n}\n\n/**\n * Per-request AsyncLocalStorage carrying the presenting token's resolved\n * capabilities. The HTTP surface binds the resolved capabilities with\n * `.run(caps, handler)` for the WHOLE authorized request dispatch (NOT\n * `.enterWith()`, which mutates the current async resource and does not\n * reliably isolate the store across the handler's awaits / concurrent\n * requests — risking a fail-open read of undefined mid-handler); the\n * access boundary reads `.getStore()` to enforce the ops allow-list for\n * every boundary operation without each dispatch site threading the value\n * explicitly. Unset (CLI, direct boundary callers, tests) ⇒ undefined ⇒\n * unrestricted (issue #1850 round 7).\n */\nexport const tokenCapabilityStore = new AsyncLocalStorage<TokenCapabilities | undefined>();\n"],"mappings":"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","names":[]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  StorageManager,
3
3
  normalizeEntityName
4
- } from "./chunk-M7GGMGMZ.js";
4
+ } from "./chunk-UDCDGP6A.js";
5
5
  import {
6
6
  serializeMutations
7
7
  } from "./chunk-LTJAMRGI.js";
@@ -956,4 +956,4 @@ export {
956
956
  resolveBriefingSaveDir,
957
957
  briefingFilename
958
958
  };
959
- //# sourceMappingURL=chunk-DGYCWCQ7.js.map
959
+ //# sourceMappingURL=chunk-DZSAXE3T.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-765K3SAT.js";
4
4
  import {
5
5
  encryptCapsuleFile
6
- } from "./chunk-437S3G37.js";
6
+ } from "./chunk-LNQUAJNC.js";
7
7
  import {
8
8
  computeTransferOutputRel,
9
9
  isTransferPathExcluded
@@ -109,4 +109,4 @@ async function enforceRetention(outDirAbs, retentionDays) {
109
109
  export {
110
110
  backupMemoryDir
111
111
  };
112
- //# sourceMappingURL=chunk-2BFLDH5F.js.map
112
+ //# sourceMappingURL=chunk-EEIROWEG.js.map
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  planNamespaceMaintenance,
12
12
  runNamespaceMaintenanceBatchPlan
13
- } from "./chunk-LOR6ZM5R.js";
13
+ } from "./chunk-MFDJ63U5.js";
14
14
  import {
15
15
  resolveConsolidationCapabilities,
16
16
  resolveNamespaceCapabilities,
@@ -447,4 +447,4 @@ var MaintenanceScheduler = class {
447
447
  export {
448
448
  MaintenanceScheduler
449
449
  };
450
- //# sourceMappingURL=chunk-6ZIETXZ2.js.map
450
+ //# sourceMappingURL=chunk-H5PFR5ZT.js.map