@remnic/core 9.15.0 → 9.15.1

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 (165) hide show
  1. package/dist/access-admin-ops-surface.d.ts +4 -1
  2. package/dist/access-admin-ops-surface.js +18 -18
  3. package/dist/access-boundary.d.ts +4 -1
  4. package/dist/access-boundary.js +18 -19
  5. package/dist/access-cli.js +64 -66
  6. package/dist/access-cli.js.map +1 -1
  7. package/dist/access-http.d.ts +2 -1
  8. package/dist/access-http.js +24 -25
  9. package/dist/access-identity-continuity-surface.js +18 -18
  10. package/dist/access-lcm-surface.d.ts +4 -1
  11. package/dist/access-lcm-surface.js +18 -18
  12. package/dist/access-mcp.d.ts +4 -1
  13. package/dist/access-mcp.js +23 -24
  14. package/dist/access-namespace-preflight-DgJtZCmU.d.ts +146 -0
  15. package/dist/access-namespace-preflight.d.ts +8 -0
  16. package/dist/access-namespace-preflight.js +158 -0
  17. package/dist/access-observe-write-surface.d.ts +4 -1
  18. package/dist/access-observe-write-surface.js +18 -18
  19. package/dist/access-operations-batch.js +20 -21
  20. package/dist/access-operations.d.ts +5 -2
  21. package/dist/access-operations.js +22 -23
  22. package/dist/access-recall-concurrency.d.ts +4 -1
  23. package/dist/access-recall-concurrency.js +18 -18
  24. package/dist/access-recall-response.d.ts +4 -1
  25. package/dist/access-recall-response.js +18 -18
  26. package/dist/access-recall-surface.d.ts +4 -1
  27. package/dist/access-recall-surface.js +18 -18
  28. package/dist/access-schema.js +3 -3
  29. package/dist/{access-service-DbZ1G3zV.d.ts → access-service-bw2p9ULX.d.ts} +6 -114
  30. package/dist/access-service.d.ts +4 -1
  31. package/dist/access-service.js +18 -18
  32. package/dist/access-surface-catalog.d.ts +4 -1
  33. package/dist/active-recall.js +1 -1
  34. package/dist/briefing.js +5 -5
  35. package/dist/{capsule-crypto-GWVG7LGC.js → capsule-crypto-7FJQINUR.js} +2 -2
  36. package/dist/capsule-crypto-7FJQINUR.js.map +1 -0
  37. package/dist/causal-consolidation.js +6 -6
  38. package/dist/{chunk-OWHERGF2.js → chunk-2NLLXCJG.js} +2 -2
  39. package/dist/{chunk-5RZHHANR.js → chunk-63P3PJED.js} +50 -50
  40. package/dist/{chunk-ALSGMEJR.js → chunk-7CPOZH6Y.js} +5 -5
  41. package/dist/{chunk-TY6NBWV4.js → chunk-7FNHLCQE.js} +2 -2
  42. package/dist/{chunk-MMGGVZ4Q.js → chunk-7VZWZVYG.js} +40 -18
  43. package/dist/{chunk-MMGGVZ4Q.js.map → chunk-7VZWZVYG.js.map} +1 -1
  44. package/dist/{chunk-HLG7VAZP.js → chunk-BOP256DB.js} +2 -2
  45. package/dist/{chunk-7G7DVA2C.js → chunk-BVC242OS.js} +2 -2
  46. package/dist/{chunk-CAZ2SHEP.js → chunk-CCNSCRJ2.js} +2 -2
  47. package/dist/{chunk-3332THSR.js → chunk-CVZYPFEH.js} +4 -4
  48. package/dist/{chunk-SK7AMF2J.js → chunk-DETNBTZS.js} +3 -3
  49. package/dist/{chunk-226RNKRU.js → chunk-FFF4XIGB.js} +32 -32
  50. package/dist/{chunk-AS6UOOXF.js → chunk-FMMZQDCT.js} +2 -2
  51. package/dist/{chunk-YQQYS2K4.js → chunk-H3MDWWGN.js} +2 -2
  52. package/dist/{chunk-TC5HBIIT.js → chunk-HBYQAOED.js} +2 -2
  53. package/dist/{chunk-3HYWNJDA.js → chunk-HWFK24UD.js} +420 -42
  54. package/dist/chunk-HWFK24UD.js.map +1 -0
  55. package/dist/{chunk-YO3ZB3PJ.js → chunk-I7DUEPE2.js} +30 -15
  56. package/dist/chunk-I7DUEPE2.js.map +1 -0
  57. package/dist/{chunk-YUQOAKPX.js → chunk-JRXN5LYL.js} +5 -5
  58. package/dist/{chunk-5W7CTZ2E.js → chunk-KQAFEZQX.js} +4 -4
  59. package/dist/{chunk-PYHOAXTI.js → chunk-LRGSLV7M.js} +4 -4
  60. package/dist/{chunk-A56B2AJR.js → chunk-MUQ3BD2C.js} +3 -3
  61. package/dist/{chunk-QJAQNXWI.js → chunk-ONHRRJZM.js} +6 -6
  62. package/dist/{chunk-DF552QUN.js → chunk-QCLQ4BGA.js} +5 -5
  63. package/dist/{chunk-IAHNKI2E.js → chunk-QDNE35FU.js} +2 -2
  64. package/dist/{chunk-W2OST2HH.js → chunk-QLOOCKKE.js} +2 -2
  65. package/dist/{chunk-I4NJ2CDY.js → chunk-RRHEV5HA.js} +4 -6
  66. package/dist/{chunk-I4NJ2CDY.js.map → chunk-RRHEV5HA.js.map} +1 -1
  67. package/dist/{chunk-7HZMTXXB.js → chunk-RWSLO24I.js} +10 -10
  68. package/dist/{chunk-UDIJMITR.js → chunk-SDZWOEZH.js} +22 -22
  69. package/dist/chunk-SDZWOEZH.js.map +1 -0
  70. package/dist/{chunk-QZGN4773.js → chunk-SW2KEZNX.js} +3 -3
  71. package/dist/{chunk-O4K3DWK2.js → chunk-SWVW42CG.js} +2 -2
  72. package/dist/{chunk-UVYI6VIX.js → chunk-X7Y7WX73.js} +1 -1
  73. package/dist/{chunk-CQ6WP3PA.js → chunk-XII2XSHL.js} +5 -5
  74. package/dist/{chunk-YSDVEPV2.js → chunk-XKFXY3ZA.js} +10 -10
  75. package/dist/{chunk-AVPXXV6J.js → chunk-XKGPIWGI.js} +4 -4
  76. package/dist/{chunk-IQFS4AU7.js → chunk-YEU4VEU4.js} +2 -2
  77. package/dist/{chunk-EZ25VE3G.js → chunk-YNDLCWXS.js} +4 -4
  78. package/dist/{chunk-Y6XODVJ4.js → chunk-YS7KIG3A.js} +8 -8
  79. package/dist/{chunk-XRNU7OEQ.js → chunk-ZNFVYUYF.js} +3 -3
  80. package/dist/{cli-5tNLVTvJ.d.ts → cli-DzPVFfGe.d.ts} +1 -1
  81. package/dist/cli.d.ts +5 -2
  82. package/dist/cli.js +45 -46
  83. package/dist/compounding/engine.js +5 -5
  84. package/dist/config.js +1 -1
  85. package/dist/connectors/codex-materialize-runner.js +5 -5
  86. package/dist/connectors/index.js +5 -5
  87. package/dist/contradiction/index.js +4 -4
  88. package/dist/dashboard-runtime.js +2 -2
  89. package/dist/entity-retrieval.js +5 -5
  90. package/dist/index.d.ts +6 -5
  91. package/dist/index.js +76 -78
  92. package/dist/lcm/index.js +3 -3
  93. package/dist/maintenance/memory-governance.js +5 -5
  94. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +5 -5
  95. package/dist/maintenance/rebuild-memory-projection.js +6 -6
  96. package/dist/mcp-memory-inspector-app.d.ts +4 -1
  97. package/dist/namespaces/migrate.js +11 -11
  98. package/dist/namespaces/search.js +5 -5
  99. package/dist/namespaces/storage.js +5 -5
  100. package/dist/offline-sync-impression-drain.js +4 -4
  101. package/dist/operator-toolkit.js +16 -16
  102. package/dist/orchestration/maintenance.js +9 -9
  103. package/dist/orchestrator.js +65 -66
  104. package/dist/qmd.js +4 -4
  105. package/dist/resume-bundles.js +1 -1
  106. package/dist/schemas.d.ts +22 -22
  107. package/dist/search/factory.js +4 -4
  108. package/dist/search/index.js +6 -6
  109. package/dist/semantic-consolidation.js +6 -6
  110. package/dist/semantic-rule-promotion.js +5 -5
  111. package/dist/semantic-rule-verifier.js +5 -5
  112. package/dist/storage.js +4 -4
  113. package/dist/transfer/backup.js +2 -2
  114. package/dist/transfer/capsule-export.js +2 -2
  115. package/dist/transfer/capsule-import.js +2 -2
  116. package/dist/transfer/import-sqlite.js +2 -2
  117. package/dist/transfer/types.d.ts +12 -12
  118. package/dist/verified-recall.js +5 -5
  119. package/package.json +2 -2
  120. package/src/access-http.test.ts +91 -0
  121. package/src/access-http.ts +13 -14
  122. package/src/access-namespace-preflight.test.ts +111 -0
  123. package/src/access-namespace-preflight.ts +111 -0
  124. package/src/access-operations-batch.ts +25 -2
  125. package/src/access-service-observe-scope.test.ts +81 -0
  126. package/src/access-service.ts +64 -32
  127. package/src/scopes/scope-plan.ts +66 -0
  128. package/dist/chunk-3HYWNJDA.js.map +0 -1
  129. package/dist/chunk-KF5EUVKQ.js +0 -289
  130. package/dist/chunk-KF5EUVKQ.js.map +0 -1
  131. package/dist/chunk-UDIJMITR.js.map +0 -1
  132. package/dist/chunk-YO3ZB3PJ.js.map +0 -1
  133. /package/dist/{capsule-crypto-GWVG7LGC.js.map → access-namespace-preflight.js.map} +0 -0
  134. /package/dist/{chunk-OWHERGF2.js.map → chunk-2NLLXCJG.js.map} +0 -0
  135. /package/dist/{chunk-5RZHHANR.js.map → chunk-63P3PJED.js.map} +0 -0
  136. /package/dist/{chunk-ALSGMEJR.js.map → chunk-7CPOZH6Y.js.map} +0 -0
  137. /package/dist/{chunk-TY6NBWV4.js.map → chunk-7FNHLCQE.js.map} +0 -0
  138. /package/dist/{chunk-HLG7VAZP.js.map → chunk-BOP256DB.js.map} +0 -0
  139. /package/dist/{chunk-7G7DVA2C.js.map → chunk-BVC242OS.js.map} +0 -0
  140. /package/dist/{chunk-CAZ2SHEP.js.map → chunk-CCNSCRJ2.js.map} +0 -0
  141. /package/dist/{chunk-3332THSR.js.map → chunk-CVZYPFEH.js.map} +0 -0
  142. /package/dist/{chunk-SK7AMF2J.js.map → chunk-DETNBTZS.js.map} +0 -0
  143. /package/dist/{chunk-226RNKRU.js.map → chunk-FFF4XIGB.js.map} +0 -0
  144. /package/dist/{chunk-AS6UOOXF.js.map → chunk-FMMZQDCT.js.map} +0 -0
  145. /package/dist/{chunk-YQQYS2K4.js.map → chunk-H3MDWWGN.js.map} +0 -0
  146. /package/dist/{chunk-TC5HBIIT.js.map → chunk-HBYQAOED.js.map} +0 -0
  147. /package/dist/{chunk-YUQOAKPX.js.map → chunk-JRXN5LYL.js.map} +0 -0
  148. /package/dist/{chunk-5W7CTZ2E.js.map → chunk-KQAFEZQX.js.map} +0 -0
  149. /package/dist/{chunk-PYHOAXTI.js.map → chunk-LRGSLV7M.js.map} +0 -0
  150. /package/dist/{chunk-A56B2AJR.js.map → chunk-MUQ3BD2C.js.map} +0 -0
  151. /package/dist/{chunk-QJAQNXWI.js.map → chunk-ONHRRJZM.js.map} +0 -0
  152. /package/dist/{chunk-DF552QUN.js.map → chunk-QCLQ4BGA.js.map} +0 -0
  153. /package/dist/{chunk-IAHNKI2E.js.map → chunk-QDNE35FU.js.map} +0 -0
  154. /package/dist/{chunk-W2OST2HH.js.map → chunk-QLOOCKKE.js.map} +0 -0
  155. /package/dist/{chunk-7HZMTXXB.js.map → chunk-RWSLO24I.js.map} +0 -0
  156. /package/dist/{chunk-QZGN4773.js.map → chunk-SW2KEZNX.js.map} +0 -0
  157. /package/dist/{chunk-O4K3DWK2.js.map → chunk-SWVW42CG.js.map} +0 -0
  158. /package/dist/{chunk-UVYI6VIX.js.map → chunk-X7Y7WX73.js.map} +0 -0
  159. /package/dist/{chunk-CQ6WP3PA.js.map → chunk-XII2XSHL.js.map} +0 -0
  160. /package/dist/{chunk-YSDVEPV2.js.map → chunk-XKFXY3ZA.js.map} +0 -0
  161. /package/dist/{chunk-AVPXXV6J.js.map → chunk-XKGPIWGI.js.map} +0 -0
  162. /package/dist/{chunk-IQFS4AU7.js.map → chunk-YEU4VEU4.js.map} +0 -0
  163. /package/dist/{chunk-EZ25VE3G.js.map → chunk-YNDLCWXS.js.map} +0 -0
  164. /package/dist/{chunk-Y6XODVJ4.js.map → chunk-YS7KIG3A.js.map} +0 -0
  165. /package/dist/{chunk-XRNU7OEQ.js.map → chunk-ZNFVYUYF.js.map} +0 -0
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  promoteSemanticRuleFromMemory,
3
3
  setSemanticRulePromotionTestHooks
4
- } from "./chunk-AS6UOOXF.js";
5
- import "./chunk-7HZMTXXB.js";
4
+ } from "./chunk-FMMZQDCT.js";
5
+ import "./chunk-RWSLO24I.js";
6
6
  import "./chunk-B3ABVQ36.js";
7
7
  import "./chunk-2QMKMVHH.js";
8
8
  import "./chunk-DEBHXHJR.js";
@@ -11,14 +11,14 @@ import "./chunk-6CIAGZ6X.js";
11
11
  import "./chunk-J6A3CX5N.js";
12
12
  import "./chunk-V57NLO5P.js";
13
13
  import "./chunk-YVKF3HEW.js";
14
- import "./chunk-AVPXXV6J.js";
14
+ import "./chunk-XKGPIWGI.js";
15
15
  import "./chunk-EGGE52UU.js";
16
16
  import "./chunk-GCASGYIO.js";
17
17
  import "./chunk-WL5EBRDH.js";
18
+ import "./chunk-ILGC6JH6.js";
18
19
  import "./chunk-SCU65EZI.js";
19
20
  import "./chunk-347WD2LE.js";
20
21
  import "./chunk-RL6NEVXT.js";
21
- import "./chunk-ILGC6JH6.js";
22
22
  import "./chunk-DM2T26WE.js";
23
23
  import "./chunk-LDXUBPMO.js";
24
24
  import "./chunk-CGASUJVP.js";
@@ -40,8 +40,8 @@ import "./chunk-45GF7Y3V.js";
40
40
  import "./chunk-RGMVMVMF.js";
41
41
  import "./chunk-N7RWREIQ.js";
42
42
  import "./chunk-5I4M26Q7.js";
43
- import "./chunk-5GKPFL3S.js";
44
43
  import "./chunk-4DJQYKMN.js";
44
+ import "./chunk-5GKPFL3S.js";
45
45
  import "./chunk-PQVCH2AE.js";
46
46
  import "./chunk-EYIEWJNI.js";
47
47
  import "./chunk-JUC24CTX.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  compareVerifiedSemanticRuleResults,
3
3
  searchVerifiedSemanticRules
4
- } from "./chunk-IQFS4AU7.js";
5
- import "./chunk-7HZMTXXB.js";
4
+ } from "./chunk-YEU4VEU4.js";
5
+ import "./chunk-RWSLO24I.js";
6
6
  import "./chunk-B3ABVQ36.js";
7
7
  import "./chunk-2QMKMVHH.js";
8
8
  import "./chunk-DEBHXHJR.js";
@@ -11,14 +11,14 @@ import "./chunk-6CIAGZ6X.js";
11
11
  import "./chunk-J6A3CX5N.js";
12
12
  import "./chunk-V57NLO5P.js";
13
13
  import "./chunk-YVKF3HEW.js";
14
- import "./chunk-AVPXXV6J.js";
14
+ import "./chunk-XKGPIWGI.js";
15
15
  import "./chunk-EGGE52UU.js";
16
16
  import "./chunk-GCASGYIO.js";
17
17
  import "./chunk-WL5EBRDH.js";
18
+ import "./chunk-ILGC6JH6.js";
18
19
  import "./chunk-SCU65EZI.js";
19
20
  import "./chunk-347WD2LE.js";
20
21
  import "./chunk-RL6NEVXT.js";
21
- import "./chunk-ILGC6JH6.js";
22
22
  import "./chunk-DM2T26WE.js";
23
23
  import "./chunk-LDXUBPMO.js";
24
24
  import "./chunk-CGASUJVP.js";
@@ -40,8 +40,8 @@ import "./chunk-45GF7Y3V.js";
40
40
  import "./chunk-RGMVMVMF.js";
41
41
  import "./chunk-N7RWREIQ.js";
42
42
  import "./chunk-5I4M26Q7.js";
43
- import "./chunk-5GKPFL3S.js";
44
43
  import "./chunk-4DJQYKMN.js";
44
+ import "./chunk-5GKPFL3S.js";
45
45
  import "./chunk-PQVCH2AE.js";
46
46
  import "./chunk-EYIEWJNI.js";
47
47
  import "./chunk-JUC24CTX.js";
package/dist/storage.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  parseFrontmatter,
17
17
  parseFrontmatterStringValue,
18
18
  serializeEntityFile
19
- } from "./chunk-7HZMTXXB.js";
19
+ } from "./chunk-RWSLO24I.js";
20
20
  import "./chunk-B3ABVQ36.js";
21
21
  import "./chunk-2QMKMVHH.js";
22
22
  import "./chunk-DEBHXHJR.js";
@@ -25,14 +25,14 @@ import "./chunk-6CIAGZ6X.js";
25
25
  import "./chunk-J6A3CX5N.js";
26
26
  import "./chunk-V57NLO5P.js";
27
27
  import "./chunk-YVKF3HEW.js";
28
- import "./chunk-AVPXXV6J.js";
28
+ import "./chunk-XKGPIWGI.js";
29
29
  import "./chunk-EGGE52UU.js";
30
30
  import "./chunk-GCASGYIO.js";
31
31
  import "./chunk-WL5EBRDH.js";
32
+ import "./chunk-ILGC6JH6.js";
32
33
  import "./chunk-SCU65EZI.js";
33
34
  import "./chunk-347WD2LE.js";
34
35
  import "./chunk-RL6NEVXT.js";
35
- import "./chunk-ILGC6JH6.js";
36
36
  import "./chunk-DM2T26WE.js";
37
37
  import "./chunk-LDXUBPMO.js";
38
38
  import "./chunk-CGASUJVP.js";
@@ -57,8 +57,8 @@ import "./chunk-45GF7Y3V.js";
57
57
  import "./chunk-RGMVMVMF.js";
58
58
  import "./chunk-N7RWREIQ.js";
59
59
  import "./chunk-5I4M26Q7.js";
60
- import "./chunk-5GKPFL3S.js";
61
60
  import "./chunk-4DJQYKMN.js";
61
+ import "./chunk-5GKPFL3S.js";
62
62
  import "./chunk-PQVCH2AE.js";
63
63
  import "./chunk-EYIEWJNI.js";
64
64
  import "./chunk-JUC24CTX.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  backupMemoryDir
3
- } from "../chunk-OWHERGF2.js";
3
+ } from "../chunk-2NLLXCJG.js";
4
4
  import "../chunk-765K3SAT.js";
5
- import "../chunk-UVYI6VIX.js";
5
+ import "../chunk-X7Y7WX73.js";
6
6
  import "../chunk-J4EB7DNW.js";
7
7
  import "../chunk-BJMBJZ2Y.js";
8
8
  import "../chunk-UKJAGEXH.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  exportCapsule,
3
3
  isValidCapsuleSince
4
- } from "../chunk-5W7CTZ2E.js";
5
- import "../chunk-UVYI6VIX.js";
4
+ } from "../chunk-KQAFEZQX.js";
6
5
  import "../chunk-WEHSQBFR.js";
6
+ import "../chunk-X7Y7WX73.js";
7
7
  import "../chunk-J4EB7DNW.js";
8
8
  import "../chunk-BJMBJZ2Y.js";
9
9
  import "../chunk-UKJAGEXH.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  importCapsule
3
- } from "../chunk-ALSGMEJR.js";
3
+ } from "../chunk-7CPOZH6Y.js";
4
4
  import "../chunk-5VQJBH2G.js";
5
5
  import "../chunk-AITCS2RC.js";
6
6
  import "../chunk-XMMESCPD.js";
7
7
  import "../chunk-42JKGUFJ.js";
8
8
  import "../chunk-PDJTHRAW.js";
9
- import "../chunk-UVYI6VIX.js";
10
9
  import "../chunk-WEHSQBFR.js";
10
+ import "../chunk-X7Y7WX73.js";
11
11
  import "../chunk-BJMBJZ2Y.js";
12
12
  import "../chunk-UKJAGEXH.js";
13
13
  import "../chunk-FP2373TW.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  importSqlite
3
- } from "../chunk-PYHOAXTI.js";
4
- import "../chunk-Z734BLO3.js";
3
+ } from "../chunk-LRGSLV7M.js";
5
4
  import "../chunk-G4IAEX6D.js";
5
+ import "../chunk-Z734BLO3.js";
6
6
  import "../chunk-RL6NEVXT.js";
7
7
  import "../chunk-GCGJW34D.js";
8
8
  import "../chunk-PZ5AY32C.js";
@@ -313,13 +313,13 @@ declare const CapsuleBlockSchema: z.ZodObject<{
313
313
  peerProfiles: boolean;
314
314
  }>;
315
315
  }, "strip", z.ZodTypeAny, {
316
- schemaVersion: string;
317
316
  includes: {
318
317
  procedural: boolean;
319
318
  taxonomy: boolean;
320
319
  identityAnchors: boolean;
321
320
  peerProfiles: boolean;
322
321
  };
322
+ schemaVersion: string;
323
323
  id: string;
324
324
  version: string;
325
325
  description: string;
@@ -334,13 +334,13 @@ declare const CapsuleBlockSchema: z.ZodObject<{
334
334
  directAnswerEnabled: boolean;
335
335
  };
336
336
  }, {
337
- schemaVersion: string;
338
337
  includes: {
339
338
  procedural: boolean;
340
339
  taxonomy: boolean;
341
340
  identityAnchors: boolean;
342
341
  peerProfiles: boolean;
343
342
  };
343
+ schemaVersion: string;
344
344
  id: string;
345
345
  version: string;
346
346
  description: string;
@@ -464,13 +464,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
464
464
  peerProfiles: boolean;
465
465
  }>;
466
466
  }, "strip", z.ZodTypeAny, {
467
- schemaVersion: string;
468
467
  includes: {
469
468
  procedural: boolean;
470
469
  taxonomy: boolean;
471
470
  identityAnchors: boolean;
472
471
  peerProfiles: boolean;
473
472
  };
473
+ schemaVersion: string;
474
474
  id: string;
475
475
  version: string;
476
476
  description: string;
@@ -485,13 +485,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
485
485
  directAnswerEnabled: boolean;
486
486
  };
487
487
  }, {
488
- schemaVersion: string;
489
488
  includes: {
490
489
  procedural: boolean;
491
490
  taxonomy: boolean;
492
491
  identityAnchors: boolean;
493
492
  peerProfiles: boolean;
494
493
  };
494
+ schemaVersion: string;
495
495
  id: string;
496
496
  version: string;
497
497
  description: string;
@@ -518,13 +518,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
518
518
  pluginVersion: string;
519
519
  includesTranscripts: boolean;
520
520
  capsule: {
521
- schemaVersion: string;
522
521
  includes: {
523
522
  procedural: boolean;
524
523
  taxonomy: boolean;
525
524
  identityAnchors: boolean;
526
525
  peerProfiles: boolean;
527
526
  };
527
+ schemaVersion: string;
528
528
  id: string;
529
529
  version: string;
530
530
  description: string;
@@ -551,13 +551,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
551
551
  pluginVersion: string;
552
552
  includesTranscripts: boolean;
553
553
  capsule: {
554
- schemaVersion: string;
555
554
  includes: {
556
555
  procedural: boolean;
557
556
  taxonomy: boolean;
558
557
  identityAnchors: boolean;
559
558
  peerProfiles: boolean;
560
559
  };
560
+ schemaVersion: string;
561
561
  id: string;
562
562
  version: string;
563
563
  description: string;
@@ -683,13 +683,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
683
683
  peerProfiles: boolean;
684
684
  }>;
685
685
  }, "strip", z.ZodTypeAny, {
686
- schemaVersion: string;
687
686
  includes: {
688
687
  procedural: boolean;
689
688
  taxonomy: boolean;
690
689
  identityAnchors: boolean;
691
690
  peerProfiles: boolean;
692
691
  };
692
+ schemaVersion: string;
693
693
  id: string;
694
694
  version: string;
695
695
  description: string;
@@ -704,13 +704,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
704
704
  directAnswerEnabled: boolean;
705
705
  };
706
706
  }, {
707
- schemaVersion: string;
708
707
  includes: {
709
708
  procedural: boolean;
710
709
  taxonomy: boolean;
711
710
  identityAnchors: boolean;
712
711
  peerProfiles: boolean;
713
712
  };
713
+ schemaVersion: string;
714
714
  id: string;
715
715
  version: string;
716
716
  description: string;
@@ -737,13 +737,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
737
737
  pluginVersion: string;
738
738
  includesTranscripts: boolean;
739
739
  capsule: {
740
- schemaVersion: string;
741
740
  includes: {
742
741
  procedural: boolean;
743
742
  taxonomy: boolean;
744
743
  identityAnchors: boolean;
745
744
  peerProfiles: boolean;
746
745
  };
746
+ schemaVersion: string;
747
747
  id: string;
748
748
  version: string;
749
749
  description: string;
@@ -770,13 +770,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
770
770
  pluginVersion: string;
771
771
  includesTranscripts: boolean;
772
772
  capsule: {
773
- schemaVersion: string;
774
773
  includes: {
775
774
  procedural: boolean;
776
775
  taxonomy: boolean;
777
776
  identityAnchors: boolean;
778
777
  peerProfiles: boolean;
779
778
  };
779
+ schemaVersion: string;
780
780
  id: string;
781
781
  version: string;
782
782
  description: string;
@@ -815,13 +815,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
815
815
  pluginVersion: string;
816
816
  includesTranscripts: boolean;
817
817
  capsule: {
818
- schemaVersion: string;
819
818
  includes: {
820
819
  procedural: boolean;
821
820
  taxonomy: boolean;
822
821
  identityAnchors: boolean;
823
822
  peerProfiles: boolean;
824
823
  };
824
+ schemaVersion: string;
825
825
  id: string;
826
826
  version: string;
827
827
  description: string;
@@ -854,13 +854,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
854
854
  pluginVersion: string;
855
855
  includesTranscripts: boolean;
856
856
  capsule: {
857
- schemaVersion: string;
858
857
  includes: {
859
858
  procedural: boolean;
860
859
  taxonomy: boolean;
861
860
  identityAnchors: boolean;
862
861
  peerProfiles: boolean;
863
862
  };
863
+ schemaVersion: string;
864
864
  id: string;
865
865
  version: string;
866
866
  description: string;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  compareVerifiedEpisodeResults,
3
3
  searchVerifiedEpisodes
4
- } from "./chunk-W2OST2HH.js";
4
+ } from "./chunk-QLOOCKKE.js";
5
5
  import "./chunk-B7RWBZXW.js";
6
- import "./chunk-7HZMTXXB.js";
6
+ import "./chunk-RWSLO24I.js";
7
7
  import "./chunk-B3ABVQ36.js";
8
8
  import "./chunk-2QMKMVHH.js";
9
9
  import "./chunk-DEBHXHJR.js";
@@ -12,14 +12,14 @@ import "./chunk-6CIAGZ6X.js";
12
12
  import "./chunk-J6A3CX5N.js";
13
13
  import "./chunk-V57NLO5P.js";
14
14
  import "./chunk-YVKF3HEW.js";
15
- import "./chunk-AVPXXV6J.js";
15
+ import "./chunk-XKGPIWGI.js";
16
16
  import "./chunk-EGGE52UU.js";
17
17
  import "./chunk-GCASGYIO.js";
18
18
  import "./chunk-WL5EBRDH.js";
19
+ import "./chunk-ILGC6JH6.js";
19
20
  import "./chunk-SCU65EZI.js";
20
21
  import "./chunk-347WD2LE.js";
21
22
  import "./chunk-RL6NEVXT.js";
22
- import "./chunk-ILGC6JH6.js";
23
23
  import "./chunk-DM2T26WE.js";
24
24
  import "./chunk-LDXUBPMO.js";
25
25
  import "./chunk-CGASUJVP.js";
@@ -41,8 +41,8 @@ import "./chunk-45GF7Y3V.js";
41
41
  import "./chunk-RGMVMVMF.js";
42
42
  import "./chunk-N7RWREIQ.js";
43
43
  import "./chunk-5I4M26Q7.js";
44
- import "./chunk-5GKPFL3S.js";
45
44
  import "./chunk-4DJQYKMN.js";
45
+ import "./chunk-5GKPFL3S.js";
46
46
  import "./chunk-PQVCH2AE.js";
47
47
  import "./chunk-EYIEWJNI.js";
48
48
  import "./chunk-JUC24CTX.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "9.15.0",
3
+ "version": "9.15.1",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3045,7 +3045,7 @@
3045
3045
  "core"
3046
3046
  ],
3047
3047
  "peerDependencies": {
3048
- "@remnic/coding-graph": "^9.15.0"
3048
+ "@remnic/coding-graph": "^9.15.1"
3049
3049
  },
3050
3050
  "peerDependenciesMeta": {
3051
3051
  "@remnic/coding-graph": {
@@ -2727,6 +2727,10 @@ test("HTTP namespace/writable preflight returns the structured writability resul
2727
2727
  // is a valid 200 answer (read via `ok`), not an HTTP error.
2728
2728
  const service = {
2729
2729
  configRef: parseConfig({ memoryDir: "/tmp/remnic-http-preflight-test", defaultNamespace: "default" }),
2730
+ namespaceWritablePreflight: async ({ namespace }: { namespace?: string }) =>
2731
+ namespace && namespace !== "default"
2732
+ ? { ok: false as const, reason: "not_writable" as const, namespace }
2733
+ : { ok: true as const, namespace: "default" },
2730
2734
  } as unknown as EngramAccessService;
2731
2735
  const server = new EngramAccessHttpServer({
2732
2736
  service,
@@ -2757,9 +2761,90 @@ test("HTTP namespace/writable preflight returns the structured writability resul
2757
2761
  }
2758
2762
  });
2759
2763
 
2764
+ test("HTTP namespace/writable forwards project context to the scoped write preflight", async () => {
2765
+ let received:
2766
+ | {
2767
+ namespace?: string;
2768
+ sessionKey?: string;
2769
+ projectTag?: string;
2770
+ cwd?: string;
2771
+ }
2772
+ | undefined;
2773
+ const service = {
2774
+ configRef: parseConfig({ memoryDir: "/tmp/remnic-http-preflight-context", defaultNamespace: "default" }),
2775
+ namespaceWritablePreflight: async (request: {
2776
+ namespace?: string;
2777
+ sessionKey?: string;
2778
+ projectTag?: string;
2779
+ cwd?: string;
2780
+ }) => {
2781
+ received = request;
2782
+ return { ok: true as const, namespace: "derived-project-namespace" };
2783
+ },
2784
+ } as unknown as EngramAccessService;
2785
+ const server = new EngramAccessHttpServer({
2786
+ service,
2787
+ port: 0,
2788
+ authToken: "test-token",
2789
+ adminConsoleEnabled: false,
2790
+ });
2791
+
2792
+ const status = await server.start();
2793
+ try {
2794
+ const response = await fetch(
2795
+ `http://127.0.0.1:${status.port}/engram/v1/namespace/writable?session=s-1&projectTag=Acme%2FWebshop&cwd=%2Ftmp%2Frepo`,
2796
+ { headers: { authorization: "Bearer test-token" } },
2797
+ );
2798
+ assert.deepEqual(await response.json(), { ok: true, namespace: "derived-project-namespace" });
2799
+ assert.deepEqual(received, {
2800
+ namespace: undefined,
2801
+ sessionKey: "s-1",
2802
+ authenticatedPrincipal: undefined,
2803
+ projectTag: "Acme/Webshop",
2804
+ cwd: "/tmp/repo",
2805
+ });
2806
+ } finally {
2807
+ await server.stop();
2808
+ }
2809
+ });
2810
+
2811
+ test("HTTP namespace/writable checks token scope against the effective scoped namespace", async () => {
2812
+ const service = {
2813
+ configRef: parseConfig({ memoryDir: "/tmp/remnic-http-preflight-effective", defaultNamespace: "default" }),
2814
+ namespaceWritablePreflight: async () => ({
2815
+ ok: true as const,
2816
+ namespace: "principal-project-derived",
2817
+ }),
2818
+ } as unknown as EngramAccessService;
2819
+ const server = new EngramAccessHttpServer({
2820
+ service,
2821
+ port: 0,
2822
+ authTokenEntriesGetter: () => [
2823
+ { token: "default-only", capabilities: { version: 1, ops: ["observe"], namespaces: ["default"] } },
2824
+ ],
2825
+ adminConsoleEnabled: false,
2826
+ });
2827
+
2828
+ const status = await server.start();
2829
+ try {
2830
+ const response = await fetch(
2831
+ `http://127.0.0.1:${status.port}/engram/v1/namespace/writable?session=s-1&projectTag=Acme%2FWebshop`,
2832
+ { headers: { authorization: "Bearer default-only" } },
2833
+ );
2834
+ assert.deepEqual(await response.json(), {
2835
+ ok: false,
2836
+ reason: "not_writable",
2837
+ namespace: "principal-project-derived",
2838
+ });
2839
+ } finally {
2840
+ await server.stop();
2841
+ }
2842
+ });
2843
+
2760
2844
  test("HTTP namespace/writable preflight admits write-scoped tokens and rejects read-only ops", async () => {
2761
2845
  const service = {
2762
2846
  configRef: parseConfig({ memoryDir: "/tmp/remnic-http-preflight-ops-test", defaultNamespace: "default" }),
2847
+ namespaceWritablePreflight: async () => ({ ok: true as const, namespace: "default" }),
2763
2848
  } as unknown as EngramAccessService;
2764
2849
  const server = new EngramAccessHttpServer({
2765
2850
  service,
@@ -2800,6 +2885,12 @@ test("HTTP namespace/writable preflight admits write-scoped tokens and rejects r
2800
2885
  assert.equal(await okOf(diag), false);
2801
2886
  // A read-only token cannot write, so it has nothing to preflight → 403.
2802
2887
  assert.equal((await request("read-only")).status, 403);
2888
+ const invalidOp = await request("write-scoped", "memory_stroe");
2889
+ assert.equal(invalidOp.status, 400);
2890
+ assert.match(
2891
+ JSON.stringify(await invalidOp.json()),
2892
+ /unsupported namespace preflight operation: memory_stroe/,
2893
+ );
2803
2894
  } finally {
2804
2895
  await server.stop();
2805
2896
  }
@@ -37,7 +37,7 @@ import {
37
37
  import { expandTildePath } from "./utils/path.js";
38
38
  import { projectTagProjectId } from "./coding/coding-namespace.js";
39
39
  import { getOperation, type OperationName } from "./access-boundary.js";
40
- import { resolveNamespacePreflight } from "./scopes/scope-plan.js";
40
+ import { resolveQueryNamespaceWritablePreflight } from "./access-namespace-preflight.js";
41
41
  import {
42
42
  assertOperationAllowed,
43
43
  capabilityAllowsOp,
@@ -1467,20 +1467,19 @@ export class EngramAccessHttpServer {
1467
1467
  return;
1468
1468
  }
1469
1469
 
1470
- // Namespace-writability preflight (issue #1888 part 3): would the client's
1471
- // enabled write (`?op=observe|memory_store`, default observe) to the
1472
- // requested namespace by THIS token succeed? Out-of-allow-list → 200
1473
- // {ok:false}; any allowedByOps token may run it (HTTP + batch admit alike).
1474
1470
  if (req.method === "GET" && pathname === "/engram/v1/namespace/writable") {
1475
- const preflightOp = getOperation("namespace_writable"); // boundary marker (catalog parity, issue #1888)
1476
- const caps = tokenCapabilityStore.getStore();
1477
- if (!(preflightOp?.spec.allowedByOps ?? []).some((op) => capabilityAllowsOp(caps, op))) {
1478
- throw new EngramAccessForbiddenError("token is not permitted to run the namespace preflight");
1479
- }
1480
- const ns = parsed.searchParams.get("namespace") || undefined;
1481
- const sk = parsed.searchParams.get("session") || undefined;
1482
- const writeOp = parsed.searchParams.get("op") === "memory_store" ? "memory_store" : "observe";
1483
- this.respondJson(res, 200, resolveNamespacePreflight(caps, ns, sk, this.resolveRequestPrincipal(req), this.service.configRef, writeOp));
1471
+ if (!getOperation("namespace_writable")) throw new Error("namespace_writable operation is not registered");
1472
+ this.respondJson(
1473
+ res,
1474
+ 200,
1475
+ await resolveQueryNamespaceWritablePreflight(
1476
+ tokenCapabilityStore.getStore(),
1477
+ parsed.searchParams,
1478
+ this.resolveRequestPrincipal(req),
1479
+ this.service.configRef.defaultNamespace,
1480
+ (request) => this.service.namespaceWritablePreflight(request),
1481
+ ),
1482
+ );
1484
1483
  return;
1485
1484
  }
1486
1485
 
@@ -0,0 +1,111 @@
1
+ import assert from "node:assert/strict";
2
+ import test from "node:test";
3
+
4
+ import "./access-operations.js";
5
+ import { getOperation } from "./access-boundary.js";
6
+ import { tokenCapabilityStore, type TokenCapabilities } from "./access-token-capabilities.js";
7
+ import {
8
+ assertNamespacePreflightPermitted,
9
+ resolveAuthorizedNamespaceWritablePreflight,
10
+ resolveQueryNamespaceWritablePreflight,
11
+ type EngramAccessNamespaceWritableRequest,
12
+ } from "./access-namespace-preflight.js";
13
+ import type { EngramAccessService } from "./access-service.js";
14
+
15
+ test("namespace_writable forwards coding context through the batch boundary", async () => {
16
+ let received: EngramAccessNamespaceWritableRequest | undefined;
17
+ const service = {
18
+ configRef: { defaultNamespace: "default" },
19
+ namespaceWritablePreflight: async (request: EngramAccessNamespaceWritableRequest) => {
20
+ received = request;
21
+ return { ok: true as const, namespace: "principal-project" };
22
+ },
23
+ } as unknown as EngramAccessService;
24
+ const operation = getOperation("namespace_writable");
25
+ assert.ok(operation);
26
+
27
+ const caps: TokenCapabilities = { version: 1, ops: ["observe"] };
28
+ const output = await tokenCapabilityStore.run(caps, () =>
29
+ operation.run(
30
+ {
31
+ sessionKey: "session-1",
32
+ cwd: "/workspace/project",
33
+ projectTag: "project-tag",
34
+ },
35
+ { service, authenticatedPrincipal: "principal" },
36
+ ),
37
+ );
38
+
39
+ assert.deepEqual(output, { result: { ok: true, namespace: "principal-project" } });
40
+ assert.deepEqual(received, {
41
+ sessionKey: "session-1",
42
+ authenticatedPrincipal: "principal",
43
+ cwd: "/workspace/project",
44
+ projectTag: "project-tag",
45
+ });
46
+ });
47
+
48
+ test("namespace_writable rejects unsupported write operations", async () => {
49
+ const operation = getOperation("namespace_writable");
50
+ assert.ok(operation);
51
+ const service = {
52
+ configRef: { defaultNamespace: "default" },
53
+ namespaceWritablePreflight: async () => ({ ok: true as const, namespace: "default" }),
54
+ } as unknown as EngramAccessService;
55
+
56
+ await assert.rejects(
57
+ () =>
58
+ tokenCapabilityStore.run({ version: 1, ops: ["observe"] }, () =>
59
+ operation.run({ op: "memory_stroe" }, { service }),
60
+ ),
61
+ /unsupported namespace preflight operation: memory_stroe/,
62
+ );
63
+ assert.throws(
64
+ () =>
65
+ resolveQueryNamespaceWritablePreflight(
66
+ { version: 1, ops: ["observe"] },
67
+ new URLSearchParams({ op: "memory_stroe" }),
68
+ undefined,
69
+ "default",
70
+ async () => ({ ok: true, namespace: "default" }),
71
+ ),
72
+ /unsupported namespace preflight operation: memory_stroe/,
73
+ );
74
+ });
75
+
76
+ test("namespace_writable rejects unavailable preflight and denied write scope", async () => {
77
+ assert.throws(
78
+ () => assertNamespacePreflightPermitted({ version: 1, ops: ["memory_get"] }),
79
+ /token is not permitted to run the namespace preflight/,
80
+ );
81
+ assert.deepEqual(
82
+ await resolveAuthorizedNamespaceWritablePreflight(
83
+ { version: 1, ops: ["observe"] },
84
+ { namespace: "default" },
85
+ "default",
86
+ "memory_store",
87
+ async () => ({ ok: true, namespace: "default" }),
88
+ ),
89
+ { ok: false, reason: "not_writable", namespace: "default" },
90
+ );
91
+ assert.deepEqual(
92
+ await resolveAuthorizedNamespaceWritablePreflight(
93
+ { version: 1, ops: ["observe"], namespaces: ["team-a"] },
94
+ {},
95
+ "default",
96
+ "observe",
97
+ async () => ({ ok: true, namespace: "default" }),
98
+ ),
99
+ { ok: false, reason: "not_writable", namespace: "default" },
100
+ );
101
+ assert.deepEqual(
102
+ await resolveAuthorizedNamespaceWritablePreflight(
103
+ { version: 1, ops: ["observe"], namespaces: ["team-a"] },
104
+ { namespace: "outside-scope" },
105
+ "default",
106
+ "observe",
107
+ async () => ({ ok: false, reason: "unsupported", namespace: "outside-scope" }),
108
+ ),
109
+ { ok: false, reason: "not_writable", namespace: "outside-scope" },
110
+ );
111
+ });