@remnic/core 9.63.6 → 9.63.7

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 (262) hide show
  1. package/dist/access-admin-ops-surface.d.ts +1 -1
  2. package/dist/access-admin-ops-surface.js +27 -25
  3. package/dist/access-authorization-probe.d.ts +1 -1
  4. package/dist/access-authorization-probe.js +28 -26
  5. package/dist/access-boundary.d.ts +1 -1
  6. package/dist/access-boundary.js +27 -25
  7. package/dist/access-cli.js +83 -81
  8. package/dist/access-cli.js.map +1 -1
  9. package/dist/access-extraction-force-flush.d.ts +1 -1
  10. package/dist/access-extraction-force-flush.js +27 -25
  11. package/dist/access-http-lcm-compaction.d.ts +1 -1
  12. package/dist/access-http-lifecycle-flush.d.ts +1 -1
  13. package/dist/access-http-offline-stream.d.ts +1 -1
  14. package/dist/access-http-query.js +29 -27
  15. package/dist/access-http.d.ts +2 -2
  16. package/dist/access-http.js +43 -41
  17. package/dist/access-identity-continuity-surface.js +27 -25
  18. package/dist/access-lcm-surface.d.ts +1 -1
  19. package/dist/access-lcm-surface.js +27 -25
  20. package/dist/access-mcp.d.ts +1 -1
  21. package/dist/access-mcp.js +34 -32
  22. package/dist/access-namespace-preflight.js +27 -25
  23. package/dist/access-observe-write-surface.d.ts +1 -1
  24. package/dist/access-observe-write-surface.js +27 -25
  25. package/dist/access-offline-manifest.js +6 -5
  26. package/dist/access-operations-batch.js +29 -27
  27. package/dist/access-operations.d.ts +4 -4
  28. package/dist/access-operations.js +33 -31
  29. package/dist/access-recall-concurrency.d.ts +1 -1
  30. package/dist/access-recall-concurrency.js +27 -25
  31. package/dist/access-recall-response.d.ts +1 -1
  32. package/dist/access-recall-response.js +27 -25
  33. package/dist/access-recall-surface.d.ts +1 -1
  34. package/dist/access-recall-surface.js +27 -25
  35. package/dist/access-schema.d.ts +88 -88
  36. package/dist/access-schema.js +6 -5
  37. package/dist/access-service-helpers.d.ts +1 -1
  38. package/dist/access-service.d.ts +1 -1
  39. package/dist/access-service.js +27 -25
  40. package/dist/access-surface-catalog.d.ts +1 -1
  41. package/dist/access-surface-catalog.js +29 -27
  42. package/dist/access-surface-catalog.js.map +1 -1
  43. package/dist/active-recall.js +5 -3
  44. package/dist/active-recall.js.map +1 -1
  45. package/dist/adapters/index.js +4 -4
  46. package/dist/adapters/registry.js +2 -2
  47. package/dist/{auto-sync-BKRJDMKX.js → auto-sync-3SHMZVQS.js} +5 -3
  48. package/dist/{auto-sync-BKRJDMKX.js.map → auto-sync-3SHMZVQS.js.map} +1 -1
  49. package/dist/briefing.js +10 -10
  50. package/dist/calibration.d.ts +2 -1
  51. package/dist/calibration.js +7 -0
  52. package/dist/calibration.js.map +1 -1
  53. package/dist/causal-consolidation.js +11 -11
  54. package/dist/census-validation.d.ts +19 -0
  55. package/dist/census-validation.js +14 -0
  56. package/dist/census-validation.js.map +1 -0
  57. package/dist/{chunk-LEPOP46W.js → chunk-227UFSEQ.js} +4 -4
  58. package/dist/{chunk-Z4N7SVVF.js → chunk-2L7DKNVE.js} +12 -7
  59. package/dist/chunk-2L7DKNVE.js.map +1 -0
  60. package/dist/{chunk-3Z5TGRFA.js → chunk-3NZAVWU5.js} +9 -9
  61. package/dist/{chunk-I5FLIB2J.js → chunk-3S3PNR5H.js} +2 -2
  62. package/dist/{chunk-R6UMNP5C.js → chunk-3T6HIIKA.js} +2 -2
  63. package/dist/{chunk-77QZW2D6.js → chunk-3TDAA7VA.js} +2 -2
  64. package/dist/{chunk-TWTUGCTY.js → chunk-3YTTAGPB.js} +6 -1
  65. package/dist/chunk-3YTTAGPB.js.map +1 -0
  66. package/dist/{chunk-DXDAQZ2K.js → chunk-42TIIO2M.js} +2 -2
  67. package/dist/{chunk-Y7COCXY2.js → chunk-4F67JJPG.js} +2 -2
  68. package/dist/{chunk-PB4WVYGC.js → chunk-5S5DUJFJ.js} +2 -2
  69. package/dist/{chunk-KYTRF64R.js → chunk-5SCFDQEJ.js} +2 -2
  70. package/dist/{chunk-GG4DN63W.js → chunk-62Y5AGCM.js} +2 -2
  71. package/dist/{chunk-KHCUVYCY.js → chunk-6UKSOXAO.js} +3 -3
  72. package/dist/{chunk-F6JYBVL6.js → chunk-7ZAC2C2U.js} +24 -24
  73. package/dist/{chunk-GF7RQWXC.js → chunk-AJRJDXYR.js} +2 -2
  74. package/dist/{chunk-YEQCMA5L.js → chunk-BOSIHHOH.js} +2 -2
  75. package/dist/{chunk-7LF2OHIJ.js → chunk-BRHKW7GY.js} +2 -2
  76. package/dist/{chunk-LX4TNSAE.js → chunk-CBY54QYW.js} +4 -4
  77. package/dist/chunk-FEHIOYML.js +168 -0
  78. package/dist/chunk-FEHIOYML.js.map +1 -0
  79. package/dist/{chunk-6YMEU6OQ.js → chunk-G72IPMR7.js} +2 -2
  80. package/dist/{chunk-7AF243WZ.js → chunk-GBVRVYF4.js} +1 -1
  81. package/dist/{chunk-GTD4Q62X.js → chunk-H4GQ2Y24.js} +3 -3
  82. package/dist/{chunk-QI5RDDEL.js → chunk-HXZNTZ3Y.js} +6 -6
  83. package/dist/{chunk-CIAI24TQ.js → chunk-IBZQQOM5.js} +3 -3
  84. package/dist/{chunk-RYST72N5.js → chunk-IINVXO3U.js} +4 -154
  85. package/dist/chunk-IINVXO3U.js.map +1 -0
  86. package/dist/{chunk-R7TZ2HCS.js → chunk-JG22O53B.js} +58 -3
  87. package/dist/chunk-JG22O53B.js.map +1 -0
  88. package/dist/{chunk-VPHSMJ2E.js → chunk-JPWSYHLB.js} +2 -2
  89. package/dist/{chunk-X7LEDA74.js → chunk-KFB4YNXM.js} +2 -2
  90. package/dist/{chunk-IPLYGWQF.js → chunk-KQAFEZQX.js} +5 -5
  91. package/dist/chunk-LQWOFU6L.js +17 -0
  92. package/dist/chunk-LQWOFU6L.js.map +1 -0
  93. package/dist/{chunk-ZUPKNWRZ.js → chunk-MIUL6AUZ.js} +3 -3
  94. package/dist/{chunk-EJY3HJMT.js → chunk-MYI3RKI6.js} +2 -2
  95. package/dist/{chunk-NA56NSKL.js → chunk-OOJCXJBN.js} +2 -2
  96. package/dist/{chunk-7KQB4EBS.js → chunk-OPPBTPUU.js} +4 -4
  97. package/dist/{chunk-ERPBRXVZ.js → chunk-PZKWPXRF.js} +2 -2
  98. package/dist/{chunk-FHKXVTM5.js → chunk-Q5XKKDFQ.js} +16 -16
  99. package/dist/{chunk-QRWMS6SI.js → chunk-Q6OL23WM.js} +2 -2
  100. package/dist/{chunk-OW7NVMGQ.js → chunk-QIZOU3FN.js} +2 -2
  101. package/dist/{chunk-V3KIRICY.js → chunk-QQYHYW2N.js} +3 -3
  102. package/dist/{chunk-YFCEBB5P.js → chunk-QTXNS3HB.js} +2 -2
  103. package/dist/{chunk-2QSZNTDO.js → chunk-RKNJBZ55.js} +4 -4
  104. package/dist/{chunk-E4KMY4KR.js → chunk-SNEUAZ6B.js} +2 -2
  105. package/dist/{chunk-TSTI6A3A.js → chunk-SYJW273H.js} +11 -11
  106. package/dist/{chunk-EFKZT6AY.js → chunk-T42L3S6A.js} +6 -11
  107. package/dist/chunk-T42L3S6A.js.map +1 -0
  108. package/dist/{chunk-YXMHUBN2.js → chunk-TOP3FSDW.js} +25 -102
  109. package/dist/chunk-TOP3FSDW.js.map +1 -0
  110. package/dist/{chunk-PBRCYYO7.js → chunk-ULZFZL7K.js} +2 -2
  111. package/dist/{chunk-UGHCZS6K.js → chunk-VFZQXYN5.js} +2 -2
  112. package/dist/{chunk-IVXVLDNT.js → chunk-WKJTMXME.js} +37 -54
  113. package/dist/chunk-WKJTMXME.js.map +1 -0
  114. package/dist/{chunk-NKB43PGI.js → chunk-WZDTSBGQ.js} +2 -2
  115. package/dist/{chunk-2UM6WHME.js → chunk-XE2QCCT2.js} +2 -2
  116. package/dist/{chunk-FPEZ74F7.js → chunk-XNJQZLAP.js} +3 -3
  117. package/dist/{chunk-SYVGVK4S.js → chunk-XTMYB2HY.js} +2 -2
  118. package/dist/{chunk-OETHJBAL.js → chunk-XV6PUXJ5.js} +71 -71
  119. package/dist/{chunk-UCLMKNHA.js → chunk-YIMV2KYM.js} +2 -2
  120. package/dist/{chunk-DYZR3Z6D.js → chunk-YMQKPSB2.js} +4 -4
  121. package/dist/{chunk-AYVCKGA6.js → chunk-YTXNDEUS.js} +2 -2
  122. package/dist/{chunk-L3CHRBHE.js → chunk-ZRUEP4IK.js} +17 -11
  123. package/dist/chunk-ZRUEP4IK.js.map +1 -0
  124. package/dist/{cli-BFBDYV0D.d.ts → cli-BTNj5DzK.d.ts} +1 -1
  125. package/dist/cli.d.ts +2 -2
  126. package/dist/cli.js +59 -57
  127. package/dist/compounding/engine.js +10 -10
  128. package/dist/config.js +5 -3
  129. package/dist/connectors/codex-materialize-runner.js +10 -10
  130. package/dist/connectors/index.js +10 -10
  131. package/dist/consolidation-provenance-check.js +2 -2
  132. package/dist/convergence-refresh.js +12 -12
  133. package/dist/conversation-index/backend.js +2 -2
  134. package/dist/corpus-watermark.js +12 -12
  135. package/dist/entity-retrieval.js +10 -10
  136. package/dist/external-wiki-access.d.ts +1 -1
  137. package/dist/external-wiki-access.js +28 -26
  138. package/dist/external-wiki-mcp-tools.d.ts +1 -1
  139. package/dist/extraction-judge.d.ts +2 -1
  140. package/dist/extraction-judge.js +6 -1
  141. package/dist/extraction-normalization.js +2 -2
  142. package/dist/extraction-prompt.d.ts +20 -1
  143. package/dist/extraction-prompt.js +11 -1
  144. package/dist/extraction.js +13 -13
  145. package/dist/{first-start-migration-4NETATFF.js → first-start-migration-Q2VB2E2D.js} +4 -4
  146. package/dist/harmonic-retrieval.js +1 -1
  147. package/dist/index.d.ts +680 -680
  148. package/dist/index.js +92 -90
  149. package/dist/maintenance/memory-governance.js +10 -10
  150. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +10 -10
  151. package/dist/maintenance/rebuild-memory-projection.js +11 -11
  152. package/dist/mcp-memory-inspector-app.d.ts +1 -1
  153. package/dist/namespaces/migrate.js +11 -11
  154. package/dist/namespaces/search.js +4 -4
  155. package/dist/namespaces/storage.js +10 -10
  156. package/dist/offline-sync.js +3 -2
  157. package/dist/operator-doctor-corpus.js +13 -13
  158. package/dist/operator-toolkit.js +24 -22
  159. package/dist/orchestration/maintenance.js +16 -16
  160. package/dist/orchestrator.js +85 -83
  161. package/dist/{public-http-8PcrDIYi.d.ts → public-http-BmPktTe3.d.ts} +1 -1
  162. package/dist/reconcile/cursor.js +7 -3
  163. package/dist/reconcile/cursor.js.map +1 -1
  164. package/dist/reconcile/manifest.js +3 -7
  165. package/dist/reconcile/plan.d.ts +15 -1
  166. package/dist/reconcile/plan.js +6 -10
  167. package/dist/resume-bundles.js +6 -4
  168. package/dist/schemas.d.ts +108 -108
  169. package/dist/search/factory.js +3 -3
  170. package/dist/search/index.js +3 -3
  171. package/dist/semantic-consolidation.js +16 -16
  172. package/dist/semantic-rule-promotion.js +10 -10
  173. package/dist/semantic-rule-verifier.js +10 -10
  174. package/dist/shared-context/manager.d.ts +8 -8
  175. package/dist/source-agent-qualifier.js +10 -10
  176. package/dist/storage.js +9 -9
  177. package/dist/support-passport/index.d.ts +4 -4
  178. package/dist/support-passport/index.js +30 -28
  179. package/dist/transfer/autodetect.js +1 -1
  180. package/dist/transfer/backup.js +1 -1
  181. package/dist/transfer/capsule-export.js +2 -2
  182. package/dist/transfer/types.d.ts +66 -66
  183. package/dist/verified-recall.js +10 -10
  184. package/package.json +2 -2
  185. package/src/calibration.ts +3 -1
  186. package/src/census-validation.ts +25 -0
  187. package/src/coding/architecture-surfaces.test.ts +9 -10
  188. package/src/coding/architecture-surfaces.ts +2 -35
  189. package/src/coding/codegraph-runtime-loader.test.ts +228 -0
  190. package/src/coding/codegraph-runtime.ts +30 -50
  191. package/src/coding/codegraph-surfaces.ts +2 -2
  192. package/src/coding/coding-knowledge-config.ts +35 -1
  193. package/src/coding/decision-surfaces.test.ts +9 -10
  194. package/src/coding/decision-surfaces.ts +2 -40
  195. package/src/coding/session-delta-surfaces.test.ts +9 -10
  196. package/src/coding/session-delta-surfaces.ts +2 -33
  197. package/src/extraction-judge.ts +3 -1
  198. package/src/extraction-output-language.test.ts +116 -0
  199. package/src/extraction-prompt.ts +70 -1
  200. package/src/extraction.ts +23 -95
  201. package/src/offline-sync.ts +4 -4
  202. package/src/reconcile/census-parity.test.ts +152 -0
  203. package/src/reconcile/cursor.ts +5 -5
  204. package/src/reconcile/manifest.ts +4 -11
  205. package/src/reconcile/plan.ts +18 -15
  206. package/dist/chunk-EFKZT6AY.js.map +0 -1
  207. package/dist/chunk-IVXVLDNT.js.map +0 -1
  208. package/dist/chunk-L3CHRBHE.js.map +0 -1
  209. package/dist/chunk-R7TZ2HCS.js.map +0 -1
  210. package/dist/chunk-RYST72N5.js.map +0 -1
  211. package/dist/chunk-TWTUGCTY.js.map +0 -1
  212. package/dist/chunk-YXMHUBN2.js.map +0 -1
  213. package/dist/chunk-Z4N7SVVF.js.map +0 -1
  214. package/dist/{access-service-cKQrte9Z.d.ts → access-service-CocW74uA.d.ts} +64 -64
  215. /package/dist/{chunk-LEPOP46W.js.map → chunk-227UFSEQ.js.map} +0 -0
  216. /package/dist/{chunk-3Z5TGRFA.js.map → chunk-3NZAVWU5.js.map} +0 -0
  217. /package/dist/{chunk-I5FLIB2J.js.map → chunk-3S3PNR5H.js.map} +0 -0
  218. /package/dist/{chunk-R6UMNP5C.js.map → chunk-3T6HIIKA.js.map} +0 -0
  219. /package/dist/{chunk-77QZW2D6.js.map → chunk-3TDAA7VA.js.map} +0 -0
  220. /package/dist/{chunk-DXDAQZ2K.js.map → chunk-42TIIO2M.js.map} +0 -0
  221. /package/dist/{chunk-Y7COCXY2.js.map → chunk-4F67JJPG.js.map} +0 -0
  222. /package/dist/{chunk-PB4WVYGC.js.map → chunk-5S5DUJFJ.js.map} +0 -0
  223. /package/dist/{chunk-KYTRF64R.js.map → chunk-5SCFDQEJ.js.map} +0 -0
  224. /package/dist/{chunk-GG4DN63W.js.map → chunk-62Y5AGCM.js.map} +0 -0
  225. /package/dist/{chunk-KHCUVYCY.js.map → chunk-6UKSOXAO.js.map} +0 -0
  226. /package/dist/{chunk-F6JYBVL6.js.map → chunk-7ZAC2C2U.js.map} +0 -0
  227. /package/dist/{chunk-GF7RQWXC.js.map → chunk-AJRJDXYR.js.map} +0 -0
  228. /package/dist/{chunk-YEQCMA5L.js.map → chunk-BOSIHHOH.js.map} +0 -0
  229. /package/dist/{chunk-7LF2OHIJ.js.map → chunk-BRHKW7GY.js.map} +0 -0
  230. /package/dist/{chunk-LX4TNSAE.js.map → chunk-CBY54QYW.js.map} +0 -0
  231. /package/dist/{chunk-6YMEU6OQ.js.map → chunk-G72IPMR7.js.map} +0 -0
  232. /package/dist/{chunk-7AF243WZ.js.map → chunk-GBVRVYF4.js.map} +0 -0
  233. /package/dist/{chunk-GTD4Q62X.js.map → chunk-H4GQ2Y24.js.map} +0 -0
  234. /package/dist/{chunk-QI5RDDEL.js.map → chunk-HXZNTZ3Y.js.map} +0 -0
  235. /package/dist/{chunk-CIAI24TQ.js.map → chunk-IBZQQOM5.js.map} +0 -0
  236. /package/dist/{chunk-VPHSMJ2E.js.map → chunk-JPWSYHLB.js.map} +0 -0
  237. /package/dist/{chunk-X7LEDA74.js.map → chunk-KFB4YNXM.js.map} +0 -0
  238. /package/dist/{chunk-IPLYGWQF.js.map → chunk-KQAFEZQX.js.map} +0 -0
  239. /package/dist/{chunk-ZUPKNWRZ.js.map → chunk-MIUL6AUZ.js.map} +0 -0
  240. /package/dist/{chunk-EJY3HJMT.js.map → chunk-MYI3RKI6.js.map} +0 -0
  241. /package/dist/{chunk-NA56NSKL.js.map → chunk-OOJCXJBN.js.map} +0 -0
  242. /package/dist/{chunk-7KQB4EBS.js.map → chunk-OPPBTPUU.js.map} +0 -0
  243. /package/dist/{chunk-ERPBRXVZ.js.map → chunk-PZKWPXRF.js.map} +0 -0
  244. /package/dist/{chunk-FHKXVTM5.js.map → chunk-Q5XKKDFQ.js.map} +0 -0
  245. /package/dist/{chunk-QRWMS6SI.js.map → chunk-Q6OL23WM.js.map} +0 -0
  246. /package/dist/{chunk-OW7NVMGQ.js.map → chunk-QIZOU3FN.js.map} +0 -0
  247. /package/dist/{chunk-V3KIRICY.js.map → chunk-QQYHYW2N.js.map} +0 -0
  248. /package/dist/{chunk-YFCEBB5P.js.map → chunk-QTXNS3HB.js.map} +0 -0
  249. /package/dist/{chunk-2QSZNTDO.js.map → chunk-RKNJBZ55.js.map} +0 -0
  250. /package/dist/{chunk-E4KMY4KR.js.map → chunk-SNEUAZ6B.js.map} +0 -0
  251. /package/dist/{chunk-TSTI6A3A.js.map → chunk-SYJW273H.js.map} +0 -0
  252. /package/dist/{chunk-PBRCYYO7.js.map → chunk-ULZFZL7K.js.map} +0 -0
  253. /package/dist/{chunk-UGHCZS6K.js.map → chunk-VFZQXYN5.js.map} +0 -0
  254. /package/dist/{chunk-NKB43PGI.js.map → chunk-WZDTSBGQ.js.map} +0 -0
  255. /package/dist/{chunk-2UM6WHME.js.map → chunk-XE2QCCT2.js.map} +0 -0
  256. /package/dist/{chunk-FPEZ74F7.js.map → chunk-XNJQZLAP.js.map} +0 -0
  257. /package/dist/{chunk-SYVGVK4S.js.map → chunk-XTMYB2HY.js.map} +0 -0
  258. /package/dist/{chunk-OETHJBAL.js.map → chunk-XV6PUXJ5.js.map} +0 -0
  259. /package/dist/{chunk-UCLMKNHA.js.map → chunk-YIMV2KYM.js.map} +0 -0
  260. /package/dist/{chunk-DYZR3Z6D.js.map → chunk-YMQKPSB2.js.map} +0 -0
  261. /package/dist/{chunk-AYVCKGA6.js.map → chunk-YTXNDEUS.js.map} +0 -0
  262. /package/dist/{first-start-migration-4NETATFF.js.map → first-start-migration-Q2VB2E2D.js.map} +0 -0
@@ -20,26 +20,26 @@ declare const ExportManifestV1Schema: z.ZodObject<{
20
20
  bytes: number;
21
21
  }>, "many">;
22
22
  }, "strip", z.ZodTypeAny, {
23
- format: "openclaw-engram-export";
23
+ schemaVersion: 1;
24
24
  createdAt: string;
25
- pluginVersion: string;
25
+ format: "openclaw-engram-export";
26
26
  files: {
27
27
  path: string;
28
28
  sha256: string;
29
29
  bytes: number;
30
30
  }[];
31
- schemaVersion: 1;
31
+ pluginVersion: string;
32
32
  includesTranscripts: boolean;
33
33
  }, {
34
- format: "openclaw-engram-export";
34
+ schemaVersion: 1;
35
35
  createdAt: string;
36
- pluginVersion: string;
36
+ format: "openclaw-engram-export";
37
37
  files: {
38
38
  path: string;
39
39
  sha256: string;
40
40
  bytes: number;
41
41
  }[];
42
- schemaVersion: 1;
42
+ pluginVersion: string;
43
43
  includesTranscripts: boolean;
44
44
  }>;
45
45
  type ExportManifestV1 = z.infer<typeof ExportManifestV1Schema>;
@@ -75,26 +75,26 @@ declare const ExportBundleV1Schema: z.ZodObject<{
75
75
  bytes: number;
76
76
  }>, "many">;
77
77
  }, "strip", z.ZodTypeAny, {
78
- format: "openclaw-engram-export";
78
+ schemaVersion: 1;
79
79
  createdAt: string;
80
- pluginVersion: string;
80
+ format: "openclaw-engram-export";
81
81
  files: {
82
82
  path: string;
83
83
  sha256: string;
84
84
  bytes: number;
85
85
  }[];
86
- schemaVersion: 1;
86
+ pluginVersion: string;
87
87
  includesTranscripts: boolean;
88
88
  }, {
89
- format: "openclaw-engram-export";
89
+ schemaVersion: 1;
90
90
  createdAt: string;
91
- pluginVersion: string;
91
+ format: "openclaw-engram-export";
92
92
  files: {
93
93
  path: string;
94
94
  sha256: string;
95
95
  bytes: number;
96
96
  }[];
97
- schemaVersion: 1;
97
+ pluginVersion: string;
98
98
  includesTranscripts: boolean;
99
99
  }>;
100
100
  records: z.ZodArray<z.ZodObject<{
@@ -109,15 +109,15 @@ declare const ExportBundleV1Schema: z.ZodObject<{
109
109
  }>, "many">;
110
110
  }, "strip", z.ZodTypeAny, {
111
111
  manifest: {
112
- format: "openclaw-engram-export";
112
+ schemaVersion: 1;
113
113
  createdAt: string;
114
- pluginVersion: string;
114
+ format: "openclaw-engram-export";
115
115
  files: {
116
116
  path: string;
117
117
  sha256: string;
118
118
  bytes: number;
119
119
  }[];
120
- schemaVersion: 1;
120
+ pluginVersion: string;
121
121
  includesTranscripts: boolean;
122
122
  };
123
123
  records: {
@@ -126,15 +126,15 @@ declare const ExportBundleV1Schema: z.ZodObject<{
126
126
  }[];
127
127
  }, {
128
128
  manifest: {
129
- format: "openclaw-engram-export";
129
+ schemaVersion: 1;
130
130
  createdAt: string;
131
- pluginVersion: string;
131
+ format: "openclaw-engram-export";
132
132
  files: {
133
133
  path: string;
134
134
  sha256: string;
135
135
  bytes: number;
136
136
  }[];
137
- schemaVersion: 1;
137
+ pluginVersion: string;
138
138
  includesTranscripts: boolean;
139
139
  };
140
140
  records: {
@@ -313,16 +313,16 @@ declare const CapsuleBlockSchema: z.ZodObject<{
313
313
  peerProfiles: boolean;
314
314
  }>;
315
315
  }, "strip", z.ZodTypeAny, {
316
+ schemaVersion: string;
316
317
  includes: {
317
318
  procedural: boolean;
318
319
  taxonomy: boolean;
319
320
  identityAnchors: boolean;
320
321
  peerProfiles: boolean;
321
322
  };
322
- description: string;
323
323
  id: string;
324
- schemaVersion: string;
325
324
  version: string;
325
+ description: string;
326
326
  parentCapsule: string | null;
327
327
  retrievalPolicy: {
328
328
  tierWeights: Record<string, number>;
@@ -334,16 +334,16 @@ declare const CapsuleBlockSchema: z.ZodObject<{
334
334
  forkRoot: string;
335
335
  } | null;
336
336
  }, {
337
+ schemaVersion: string;
337
338
  includes: {
338
339
  procedural: boolean;
339
340
  taxonomy: boolean;
340
341
  identityAnchors: boolean;
341
342
  peerProfiles: boolean;
342
343
  };
343
- description: string;
344
344
  id: string;
345
- schemaVersion: string;
346
345
  version: string;
346
+ description: string;
347
347
  parentCapsule: string | null;
348
348
  retrievalPolicy: {
349
349
  tierWeights: Record<string, number>;
@@ -464,16 +464,16 @@ declare const ExportManifestV2Schema: z.ZodObject<{
464
464
  peerProfiles: boolean;
465
465
  }>;
466
466
  }, "strip", z.ZodTypeAny, {
467
+ schemaVersion: string;
467
468
  includes: {
468
469
  procedural: boolean;
469
470
  taxonomy: boolean;
470
471
  identityAnchors: boolean;
471
472
  peerProfiles: boolean;
472
473
  };
473
- description: string;
474
474
  id: string;
475
- schemaVersion: string;
476
475
  version: string;
476
+ description: string;
477
477
  parentCapsule: string | null;
478
478
  retrievalPolicy: {
479
479
  tierWeights: Record<string, number>;
@@ -485,16 +485,16 @@ declare const ExportManifestV2Schema: z.ZodObject<{
485
485
  forkRoot: string;
486
486
  } | null;
487
487
  }, {
488
+ schemaVersion: string;
488
489
  includes: {
489
490
  procedural: boolean;
490
491
  taxonomy: boolean;
491
492
  identityAnchors: boolean;
492
493
  peerProfiles: boolean;
493
494
  };
494
- description: string;
495
495
  id: string;
496
- schemaVersion: string;
497
496
  version: string;
497
+ description: string;
498
498
  parentCapsule: string | null;
499
499
  retrievalPolicy: {
500
500
  tierWeights: Record<string, number>;
@@ -507,25 +507,27 @@ declare const ExportManifestV2Schema: z.ZodObject<{
507
507
  } | null | undefined;
508
508
  }>;
509
509
  }, "strip", z.ZodTypeAny, {
510
- format: "openclaw-engram-export";
510
+ schemaVersion: 2;
511
511
  createdAt: string;
512
- pluginVersion: string;
512
+ format: "openclaw-engram-export";
513
513
  files: {
514
514
  path: string;
515
515
  sha256: string;
516
516
  bytes: number;
517
517
  }[];
518
+ pluginVersion: string;
519
+ includesTranscripts: boolean;
518
520
  capsule: {
521
+ schemaVersion: string;
519
522
  includes: {
520
523
  procedural: boolean;
521
524
  taxonomy: boolean;
522
525
  identityAnchors: boolean;
523
526
  peerProfiles: boolean;
524
527
  };
525
- description: string;
526
528
  id: string;
527
- schemaVersion: string;
528
529
  version: string;
530
+ description: string;
529
531
  parentCapsule: string | null;
530
532
  retrievalPolicy: {
531
533
  tierWeights: Record<string, number>;
@@ -537,28 +539,28 @@ declare const ExportManifestV2Schema: z.ZodObject<{
537
539
  forkRoot: string;
538
540
  } | null;
539
541
  };
540
- schemaVersion: 2;
541
- includesTranscripts: boolean;
542
542
  }, {
543
- format: "openclaw-engram-export";
543
+ schemaVersion: 2;
544
544
  createdAt: string;
545
- pluginVersion: string;
545
+ format: "openclaw-engram-export";
546
546
  files: {
547
547
  path: string;
548
548
  sha256: string;
549
549
  bytes: number;
550
550
  }[];
551
+ pluginVersion: string;
552
+ includesTranscripts: boolean;
551
553
  capsule: {
554
+ schemaVersion: string;
552
555
  includes: {
553
556
  procedural: boolean;
554
557
  taxonomy: boolean;
555
558
  identityAnchors: boolean;
556
559
  peerProfiles: boolean;
557
560
  };
558
- description: string;
559
561
  id: string;
560
- schemaVersion: string;
561
562
  version: string;
563
+ description: string;
562
564
  parentCapsule: string | null;
563
565
  retrievalPolicy: {
564
566
  tierWeights: Record<string, number>;
@@ -570,8 +572,6 @@ declare const ExportManifestV2Schema: z.ZodObject<{
570
572
  forkRoot: string;
571
573
  } | null | undefined;
572
574
  };
573
- schemaVersion: 2;
574
- includesTranscripts: boolean;
575
575
  }>;
576
576
  type ExportManifestV2 = z.infer<typeof ExportManifestV2Schema>;
577
577
  declare const ExportBundleV2Schema: z.ZodObject<{
@@ -683,16 +683,16 @@ declare const ExportBundleV2Schema: z.ZodObject<{
683
683
  peerProfiles: boolean;
684
684
  }>;
685
685
  }, "strip", z.ZodTypeAny, {
686
+ schemaVersion: string;
686
687
  includes: {
687
688
  procedural: boolean;
688
689
  taxonomy: boolean;
689
690
  identityAnchors: boolean;
690
691
  peerProfiles: boolean;
691
692
  };
692
- description: string;
693
693
  id: string;
694
- schemaVersion: string;
695
694
  version: string;
695
+ description: string;
696
696
  parentCapsule: string | null;
697
697
  retrievalPolicy: {
698
698
  tierWeights: Record<string, number>;
@@ -704,16 +704,16 @@ declare const ExportBundleV2Schema: z.ZodObject<{
704
704
  forkRoot: string;
705
705
  } | null;
706
706
  }, {
707
+ schemaVersion: string;
707
708
  includes: {
708
709
  procedural: boolean;
709
710
  taxonomy: boolean;
710
711
  identityAnchors: boolean;
711
712
  peerProfiles: boolean;
712
713
  };
713
- description: string;
714
714
  id: string;
715
- schemaVersion: string;
716
715
  version: string;
716
+ description: string;
717
717
  parentCapsule: string | null;
718
718
  retrievalPolicy: {
719
719
  tierWeights: Record<string, number>;
@@ -726,25 +726,27 @@ declare const ExportBundleV2Schema: z.ZodObject<{
726
726
  } | null | undefined;
727
727
  }>;
728
728
  }, "strip", z.ZodTypeAny, {
729
- format: "openclaw-engram-export";
729
+ schemaVersion: 2;
730
730
  createdAt: string;
731
- pluginVersion: string;
731
+ format: "openclaw-engram-export";
732
732
  files: {
733
733
  path: string;
734
734
  sha256: string;
735
735
  bytes: number;
736
736
  }[];
737
+ pluginVersion: string;
738
+ includesTranscripts: boolean;
737
739
  capsule: {
740
+ schemaVersion: string;
738
741
  includes: {
739
742
  procedural: boolean;
740
743
  taxonomy: boolean;
741
744
  identityAnchors: boolean;
742
745
  peerProfiles: boolean;
743
746
  };
744
- description: string;
745
747
  id: string;
746
- schemaVersion: string;
747
748
  version: string;
749
+ description: string;
748
750
  parentCapsule: string | null;
749
751
  retrievalPolicy: {
750
752
  tierWeights: Record<string, number>;
@@ -756,28 +758,28 @@ declare const ExportBundleV2Schema: z.ZodObject<{
756
758
  forkRoot: string;
757
759
  } | null;
758
760
  };
759
- schemaVersion: 2;
760
- includesTranscripts: boolean;
761
761
  }, {
762
- format: "openclaw-engram-export";
762
+ schemaVersion: 2;
763
763
  createdAt: string;
764
- pluginVersion: string;
764
+ format: "openclaw-engram-export";
765
765
  files: {
766
766
  path: string;
767
767
  sha256: string;
768
768
  bytes: number;
769
769
  }[];
770
+ pluginVersion: string;
771
+ includesTranscripts: boolean;
770
772
  capsule: {
773
+ schemaVersion: string;
771
774
  includes: {
772
775
  procedural: boolean;
773
776
  taxonomy: boolean;
774
777
  identityAnchors: boolean;
775
778
  peerProfiles: boolean;
776
779
  };
777
- description: string;
778
780
  id: string;
779
- schemaVersion: string;
780
781
  version: string;
782
+ description: string;
781
783
  parentCapsule: string | null;
782
784
  retrievalPolicy: {
783
785
  tierWeights: Record<string, number>;
@@ -789,8 +791,6 @@ declare const ExportBundleV2Schema: z.ZodObject<{
789
791
  forkRoot: string;
790
792
  } | null | undefined;
791
793
  };
792
- schemaVersion: 2;
793
- includesTranscripts: boolean;
794
794
  }>;
795
795
  records: z.ZodArray<z.ZodObject<{
796
796
  path: z.ZodString;
@@ -804,25 +804,27 @@ declare const ExportBundleV2Schema: z.ZodObject<{
804
804
  }>, "many">;
805
805
  }, "strip", z.ZodTypeAny, {
806
806
  manifest: {
807
- format: "openclaw-engram-export";
807
+ schemaVersion: 2;
808
808
  createdAt: string;
809
- pluginVersion: string;
809
+ format: "openclaw-engram-export";
810
810
  files: {
811
811
  path: string;
812
812
  sha256: string;
813
813
  bytes: number;
814
814
  }[];
815
+ pluginVersion: string;
816
+ includesTranscripts: boolean;
815
817
  capsule: {
818
+ schemaVersion: string;
816
819
  includes: {
817
820
  procedural: boolean;
818
821
  taxonomy: boolean;
819
822
  identityAnchors: boolean;
820
823
  peerProfiles: boolean;
821
824
  };
822
- description: string;
823
825
  id: string;
824
- schemaVersion: string;
825
826
  version: string;
827
+ description: string;
826
828
  parentCapsule: string | null;
827
829
  retrievalPolicy: {
828
830
  tierWeights: Record<string, number>;
@@ -834,8 +836,6 @@ declare const ExportBundleV2Schema: z.ZodObject<{
834
836
  forkRoot: string;
835
837
  } | null;
836
838
  };
837
- schemaVersion: 2;
838
- includesTranscripts: boolean;
839
839
  };
840
840
  records: {
841
841
  content: string;
@@ -843,25 +843,27 @@ declare const ExportBundleV2Schema: z.ZodObject<{
843
843
  }[];
844
844
  }, {
845
845
  manifest: {
846
- format: "openclaw-engram-export";
846
+ schemaVersion: 2;
847
847
  createdAt: string;
848
- pluginVersion: string;
848
+ format: "openclaw-engram-export";
849
849
  files: {
850
850
  path: string;
851
851
  sha256: string;
852
852
  bytes: number;
853
853
  }[];
854
+ pluginVersion: string;
855
+ includesTranscripts: boolean;
854
856
  capsule: {
857
+ schemaVersion: string;
855
858
  includes: {
856
859
  procedural: boolean;
857
860
  taxonomy: boolean;
858
861
  identityAnchors: boolean;
859
862
  peerProfiles: boolean;
860
863
  };
861
- description: string;
862
864
  id: string;
863
- schemaVersion: string;
864
865
  version: string;
866
+ description: string;
865
867
  parentCapsule: string | null;
866
868
  retrievalPolicy: {
867
869
  tierWeights: Record<string, number>;
@@ -873,8 +875,6 @@ declare const ExportBundleV2Schema: z.ZodObject<{
873
875
  forkRoot: string;
874
876
  } | null | undefined;
875
877
  };
876
- schemaVersion: 2;
877
- includesTranscripts: boolean;
878
878
  };
879
879
  records: {
880
880
  content: string;
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  compareVerifiedEpisodeResults,
3
3
  searchVerifiedEpisodes
4
- } from "./chunk-2UM6WHME.js";
4
+ } from "./chunk-XE2QCCT2.js";
5
5
  import "./chunk-B7RWBZXW.js";
6
- import "./chunk-FHKXVTM5.js";
7
- import "./chunk-46WM6JX2.js";
6
+ import "./chunk-Q5XKKDFQ.js";
8
7
  import "./chunk-UHVXE24Y.js";
8
+ import "./chunk-46WM6JX2.js";
9
9
  import "./chunk-SXIMQLGV.js";
10
- import "./chunk-GF7RQWXC.js";
11
- import "./chunk-GG4DN63W.js";
10
+ import "./chunk-AJRJDXYR.js";
11
+ import "./chunk-62Y5AGCM.js";
12
12
  import "./chunk-OQIRBGUU.js";
13
13
  import "./chunk-VANZKHTN.js";
14
14
  import "./chunk-CYEPCZN5.js";
@@ -17,15 +17,15 @@ import "./chunk-VYISFWVX.js";
17
17
  import "./chunk-W7IGLX4G.js";
18
18
  import "./chunk-6KTXE6A3.js";
19
19
  import "./chunk-GUMZC2BO.js";
20
- import "./chunk-LEPOP46W.js";
20
+ import "./chunk-227UFSEQ.js";
21
+ import "./chunk-ET356KSB.js";
21
22
  import "./chunk-72A4L5JJ.js";
22
23
  import "./chunk-A7Q43EUZ.js";
23
- import "./chunk-ET356KSB.js";
24
24
  import "./chunk-S2V7RUCL.js";
25
25
  import "./chunk-AR253JBM.js";
26
+ import "./chunk-SCU65EZI.js";
26
27
  import "./chunk-PO7NXBG2.js";
27
28
  import "./chunk-S2HLHAZ4.js";
28
- import "./chunk-SCU65EZI.js";
29
29
  import "./chunk-DM2T26WE.js";
30
30
  import "./chunk-LDXUBPMO.js";
31
31
  import "./chunk-UG6VXIOK.js";
@@ -33,16 +33,16 @@ import "./chunk-AAD2ZS6P.js";
33
33
  import "./chunk-MUJ4QFUQ.js";
34
34
  import "./chunk-LCU5R6TQ.js";
35
35
  import "./chunk-BT7NVCML.js";
36
- import "./chunk-YXZG5TVN.js";
37
36
  import "./chunk-3ONXXHQO.js";
37
+ import "./chunk-YXZG5TVN.js";
38
38
  import "./chunk-5GINB5LC.js";
39
- import "./chunk-G7D6GZ5J.js";
40
39
  import "./chunk-UFKPQBXH.js";
41
40
  import "./chunk-XCB6QDL6.js";
42
41
  import "./chunk-RBOJCG4T.js";
43
42
  import "./chunk-ZVPVTPGI.js";
44
43
  import "./chunk-5WITETWU.js";
45
44
  import "./chunk-6CIAGZ6X.js";
45
+ import "./chunk-G7D6GZ5J.js";
46
46
  import "./chunk-VYEPACWY.js";
47
47
  import "./chunk-URS5GSM7.js";
48
48
  import "./chunk-ZLQ37WJX.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "9.63.6",
3
+ "version": "9.63.7",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3156,7 +3156,7 @@
3156
3156
  "core"
3157
3157
  ],
3158
3158
  "peerDependencies": {
3159
- "@remnic/coding-graph": "^9.63.6"
3159
+ "@remnic/coding-graph": "^9.63.7"
3160
3160
  },
3161
3161
  "peerDependenciesMeta": {
3162
3162
  "@remnic/coding-graph": {
@@ -20,6 +20,7 @@ import type { AgentPersonaModelConfig, GatewayConfig, MemoryFile } from "./types
20
20
  import { listJsonFiles, readJsonFile } from "./json-store.js";
21
21
  import { isRecord } from "./store-contract.js";
22
22
  import { log } from "./logger.js";
23
+ import { OUTPUT_LANGUAGE_POLICY } from "./extraction-prompt.js";
23
24
 
24
25
  // ─── Types ───────────────────────────────────────────────────────────────────
25
26
 
@@ -193,7 +194,7 @@ async function readCorrectionsImpl(memoryDir: string): Promise<CorrectionMemory[
193
194
 
194
195
  // ─── LLM-Assisted Clustering and Replay ──────────────────────────────────────
195
196
 
196
- const CLUSTER_PROMPT = `You are analyzing user corrections to an AI assistant. Each correction represents a moment where the assistant's prediction of what the user wanted was WRONG.
197
+ export const CLUSTER_PROMPT = `You are analyzing user corrections to an AI assistant. Each correction represents a moment where the assistant's prediction of what the user wanted was WRONG.
197
198
 
198
199
  Your job: Group these corrections into clusters where the SAME TYPE of misunderstanding is happening. Then for each cluster, synthesize a CalibrationRule.
199
200
 
@@ -205,6 +206,7 @@ A CalibrationRule describes:
205
206
  - ruleType: One of "model_tendency", "user_expectation", "scope_boundary", "verification_required"
206
207
 
207
208
  Focus on PATTERNS, not individual corrections. A cluster needs at least 2 corrections to be worth a rule.
209
+ ${OUTPUT_LANGUAGE_POLICY}
208
210
 
209
211
  Output valid JSON only:
210
212
  {
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Census field acceptance shared by offline-sync and the reconcile planner
3
+ * (issue #2477). Both surfaces parse untrusted peer censuses and must accept
4
+ * and reject exactly the same values; when these checks lived as two copies
5
+ * they could drift silently and break convergence. Each surface keeps only a
6
+ * thin wrapper that picks its own error type and message.
7
+ */
8
+
9
+ /** 64-character sha256 hex, either case; the canonical stored form is lowercase. */
10
+ export const SHA256_HEX_PATTERN = /^[a-f0-9]{64}$/i;
11
+
12
+ /** Largest `mtimeMs` a census may carry: `new Date(ms)` must stay a valid Date. */
13
+ export const CENSUS_MAX_MTIME_MS = 8_640_000_000_000_000;
14
+
15
+ export function isSha256Hex(value: unknown): value is string {
16
+ return typeof value === "string" && SHA256_HEX_PATTERN.test(value);
17
+ }
18
+
19
+ /**
20
+ * Fractional values are valid: `fs.stat()` reports sub-millisecond mtimes on
21
+ * common filesystems, so this deliberately does not require an integer.
22
+ */
23
+ export function isCensusMtimeMs(value: unknown): value is number {
24
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 && value <= CENSUS_MAX_MTIME_MS;
25
+ }
@@ -22,8 +22,6 @@ import {
22
22
  ARCHITECTURE_CARD_TAG,
23
23
  ARCHITECTURE_CARD_KIND,
24
24
  handleCodingArchitecture,
25
- isArchitectureCardSurfaceEnabled,
26
- isArchitectureCardSurfaceVisible,
27
25
  isArchitectureSubcommand,
28
26
  formatArchitectureSubcommands,
29
27
  findArchitectureCardMemory,
@@ -31,6 +29,7 @@ import {
31
29
  type ArchitectureSurfaceRequest,
32
30
  type ArchitectureSurfaceStorage,
33
31
  } from "./architecture-surfaces.js";
32
+ import { isCodingKnowledgeFeatureEnabled, isCodingKnowledgeFeatureVisible } from "./coding-knowledge-config.js";
34
33
  import { sealedWriteToLegacyArgs } from "../write-envelope.js";
35
34
  import type { ArchitectureCardBuildResult } from "./architecture-card.js";
36
35
  import type {
@@ -183,28 +182,28 @@ test("subcommands: formatArchitectureSubcommands lists valid options", () => {
183
182
  // ──────────────────────────────────────────────────────────────────────────
184
183
 
185
184
  test("gate: surface enabled when config + architectureCard + coding context all true", () => {
186
- assert.equal(isArchitectureCardSurfaceEnabled(DEFAULT_CONFIG, CODING_CONTEXT), true);
185
+ assert.equal(isCodingKnowledgeFeatureEnabled(DEFAULT_CONFIG, "architectureCard", CODING_CONTEXT), true);
187
186
  });
188
187
 
189
188
  test("gate: surface disabled when master gate off", () => {
190
189
  const config: CodingKnowledgeConfig = { ...DEFAULT_CONFIG, enabled: false };
191
- assert.equal(isArchitectureCardSurfaceEnabled(config, CODING_CONTEXT), false);
190
+ assert.equal(isCodingKnowledgeFeatureEnabled(config, "architectureCard", CODING_CONTEXT), false);
192
191
  });
193
192
 
194
193
  test("gate: surface disabled when architectureCard off", () => {
195
194
  const config: CodingKnowledgeConfig = { ...DEFAULT_CONFIG, architectureCard: false };
196
- assert.equal(isArchitectureCardSurfaceEnabled(config, CODING_CONTEXT), false);
195
+ assert.equal(isCodingKnowledgeFeatureEnabled(config, "architectureCard", CODING_CONTEXT), false);
197
196
  });
198
197
 
199
198
  test("gate: surface disabled when no coding context", () => {
200
- assert.equal(isArchitectureCardSurfaceEnabled(DEFAULT_CONFIG, null), false);
201
- assert.equal(isArchitectureCardSurfaceEnabled(DEFAULT_CONFIG, undefined), false);
199
+ assert.equal(isCodingKnowledgeFeatureEnabled(DEFAULT_CONFIG, "architectureCard", null), false);
200
+ assert.equal(isCodingKnowledgeFeatureEnabled(DEFAULT_CONFIG, "architectureCard", undefined), false);
202
201
  });
203
202
 
204
203
  test("gate: visibility (tools/list) matches config-only check", () => {
205
- assert.equal(isArchitectureCardSurfaceVisible(DEFAULT_CONFIG), true);
206
- assert.equal(isArchitectureCardSurfaceVisible({ ...DEFAULT_CONFIG, enabled: false }), false);
207
- assert.equal(isArchitectureCardSurfaceVisible({ ...DEFAULT_CONFIG, architectureCard: false }), false);
204
+ assert.equal(isCodingKnowledgeFeatureVisible(DEFAULT_CONFIG, "architectureCard"), true);
205
+ assert.equal(isCodingKnowledgeFeatureVisible({ ...DEFAULT_CONFIG, enabled: false }, "architectureCard"), false);
206
+ assert.equal(isCodingKnowledgeFeatureVisible({ ...DEFAULT_CONFIG, architectureCard: false }, "architectureCard"), false);
208
207
  });
209
208
 
210
209
  // ──────────────────────────────────────────────────────────────────────────
@@ -35,6 +35,7 @@ import { stripAttributesSuffix } from "../structured-attributes.js";
35
35
  import { ARCHITECTURE_CARD_TRUNCATION_MARKER, type ArchitectureCardBuildResult } from "./architecture-card.js";
36
36
  import { log } from "../logger.js";
37
37
  import { composeMemoryEnvelope, type SealedMemoryEnvelope } from "../write-envelope.js";
38
+ import { isCodingKnowledgeFeatureEnabled } from "./coding-knowledge-config.js";
38
39
 
39
40
  // ──────────────────────────────────────────────────────────────────────────
40
41
  // Subcommands
@@ -56,40 +57,6 @@ export function formatArchitectureSubcommands(): string {
56
57
  return ARCHITECTURE_SUBCOMMANDS.join(", ");
57
58
  }
58
59
 
59
- // ──────────────────────────────────────────────────────────────────────────
60
- // Gate predicates — rule 39: one predicate, identical on every surface
61
- // ──────────────────────────────────────────────────────────────────────────
62
-
63
- /**
64
- * The single architecture-card surface gate. Returns `true` only when:
65
- * 1. `codingKnowledge.enabled` is true,
66
- * 2. `codingKnowledge.architectureCard` is true,
67
- * 3. a coding context is attached (so a repo root is available).
68
- */
69
- export function isArchitectureCardSurfaceEnabled(
70
- config: CodingKnowledgeConfig,
71
- codingContext: CodingContext | null | undefined,
72
- ): boolean {
73
- return (
74
- config.enabled === true &&
75
- config.architectureCard === true &&
76
- codingContext !== null &&
77
- codingContext !== undefined
78
- );
79
- }
80
-
81
- /**
82
- * Config-only visibility gate — used by the MCP constructor to decide
83
- * whether to advertise `engram.coding_architecture` in `tools/list`.
84
- * When this returns `false` the tools array is byte-identical to
85
- * pre-feature (rule 39).
86
- */
87
- export function isArchitectureCardSurfaceVisible(
88
- config: CodingKnowledgeConfig,
89
- ): boolean {
90
- return config.enabled === true && config.architectureCard === true;
91
- }
92
-
93
60
  // ──────────────────────────────────────────────────────────────────────────
94
61
  // Surface request / response shapes
95
62
  // ──────────────────────────────────────────────────────────────────────────
@@ -228,7 +195,7 @@ export async function handleCodingArchitecture(
228
195
  // narrows it to CodingContext here, with no non-null assertion cast.
229
196
  if (
230
197
  codingContext === null ||
231
- !isArchitectureCardSurfaceEnabled(ctx.codingKnowledge, codingContext)
198
+ !isCodingKnowledgeFeatureEnabled(ctx.codingKnowledge, "architectureCard", codingContext)
232
199
  ) {
233
200
  ctx.throwInputError(
234
201
  "coding_architecture requires codingKnowledge.enabled, codingKnowledge.architectureCard, and an attached coding context",