@remnic/core 9.3.614 → 9.3.616

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 (49) hide show
  1. package/dist/access-cli.js +3 -3
  2. package/dist/access-http.d.ts +1 -1
  3. package/dist/access-http.js +5 -5
  4. package/dist/access-mcp.d.ts +1 -1
  5. package/dist/access-mcp.js +4 -4
  6. package/dist/access-schema.d.ts +48 -36
  7. package/dist/access-schema.js +1 -1
  8. package/dist/{access-service-DGG_2xPK.d.ts → access-service-CBNEKjzN.d.ts} +70 -5
  9. package/dist/access-service.d.ts +1 -1
  10. package/dist/access-service.js +2 -2
  11. package/dist/{chunk-B6FDZPCF.js → chunk-5OHHEORR.js} +50 -15
  12. package/dist/chunk-5OHHEORR.js.map +1 -0
  13. package/dist/{chunk-T5XWMMU2.js → chunk-EXUAP5LH.js} +2 -2
  14. package/dist/{chunk-EUML3N6B.js → chunk-IMA6GU4Y.js} +3 -3
  15. package/dist/chunk-IMA6GU4Y.js.map +1 -0
  16. package/dist/{chunk-7YQFWOF7.js → chunk-KGLPJROV.js} +4 -4
  17. package/dist/{chunk-VPGUMLBA.js → chunk-NM5NQYJE.js} +16 -16
  18. package/dist/chunk-NM5NQYJE.js.map +1 -0
  19. package/dist/{chunk-QEMCQFDW.js → chunk-WD2W4234.js} +8 -2
  20. package/dist/chunk-WD2W4234.js.map +1 -0
  21. package/dist/{chunk-ADNZVFXG.js → chunk-ZK32E74R.js} +142 -31
  22. package/dist/chunk-ZK32E74R.js.map +1 -0
  23. package/dist/{cli-DWeu7eTY.d.ts → cli-Cw729yLf.d.ts} +1 -1
  24. package/dist/cli.d.ts +2 -2
  25. package/dist/cli.js +6 -6
  26. package/dist/explicit-capture.d.ts +10 -0
  27. package/dist/explicit-capture.js +1 -1
  28. package/dist/index.d.ts +2 -2
  29. package/dist/index.js +7 -7
  30. package/dist/mcp-memory-inspector-app.d.ts +1 -1
  31. package/dist/orchestrator.js +2 -2
  32. package/dist/schemas.d.ts +64 -64
  33. package/dist/shared-context/manager.d.ts +2 -2
  34. package/dist/transfer/types.d.ts +12 -12
  35. package/package.json +1 -1
  36. package/src/access-http.ts +21 -10
  37. package/src/access-mcp.test.ts +109 -0
  38. package/src/access-mcp.ts +46 -2
  39. package/src/access-schema.ts +11 -0
  40. package/src/access-service-coding-write.test.ts +478 -0
  41. package/src/access-service.ts +237 -32
  42. package/src/explicit-capture.ts +19 -2
  43. package/dist/chunk-ADNZVFXG.js.map +0 -1
  44. package/dist/chunk-B6FDZPCF.js.map +0 -1
  45. package/dist/chunk-EUML3N6B.js.map +0 -1
  46. package/dist/chunk-QEMCQFDW.js.map +0 -1
  47. package/dist/chunk-VPGUMLBA.js.map +0 -1
  48. /package/dist/{chunk-T5XWMMU2.js.map → chunk-EXUAP5LH.js.map} +0 -0
  49. /package/dist/{chunk-7YQFWOF7.js.map → chunk-KGLPJROV.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Orchestrator
3
- } from "./chunk-T5XWMMU2.js";
3
+ } from "./chunk-EXUAP5LH.js";
4
4
  import "./chunk-5RIRL3XL.js";
5
5
  import "./chunk-4HFJQCJZ.js";
6
6
  import "./chunk-6BDVBBBY.js";
@@ -140,7 +140,7 @@ import "./chunk-PVGDJXVK.js";
140
140
  import "./chunk-OADWQ5CR.js";
141
141
  import {
142
142
  EngramAccessService
143
- } from "./chunk-ADNZVFXG.js";
143
+ } from "./chunk-ZK32E74R.js";
144
144
  import "./chunk-GDASG7NC.js";
145
145
  import "./chunk-GDB4J2H3.js";
146
146
  import "./chunk-DGNQRNLL.js";
@@ -161,7 +161,7 @@ import "./chunk-EI6V5UXY.js";
161
161
  import "./chunk-QY7YA7OL.js";
162
162
  import "./chunk-NNVTUXEB.js";
163
163
  import "./chunk-QDW3E4RD.js";
164
- import "./chunk-EUML3N6B.js";
164
+ import "./chunk-IMA6GU4Y.js";
165
165
  import "./chunk-ODPLEWB6.js";
166
166
  import "./chunk-XL7FK7PJ.js";
167
167
  import "./chunk-2LSZVONP.js";
@@ -1,5 +1,5 @@
1
1
  import { IncomingMessage } from 'node:http';
2
- import { E as EngramAccessService } from './access-service-DGG_2xPK.js';
2
+ import { E as EngramAccessService } from './access-service-CBNEKjzN.js';
3
3
  import { ResolvedIdentity } from './adapters/types.js';
4
4
  import { AdapterRegistry } from './adapters/registry.js';
5
5
  import './storage.js';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  EngramAccessHttpServer
3
- } from "./chunk-VPGUMLBA.js";
3
+ } from "./chunk-NM5NQYJE.js";
4
4
  import "./chunk-SEDEKFYQ.js";
5
5
  import "./chunk-2QSZNTDO.js";
6
6
  import "./chunk-RSUYKGGZ.js";
@@ -8,10 +8,10 @@ import "./chunk-42NQ7AVG.js";
8
8
  import "./chunk-TMSXWOBZ.js";
9
9
  import "./chunk-J64TK33U.js";
10
10
  import "./chunk-7RXCMVFQ.js";
11
- import "./chunk-B6FDZPCF.js";
11
+ import "./chunk-5OHHEORR.js";
12
12
  import "./chunk-6L46YAEZ.js";
13
13
  import "./chunk-D24OXEPB.js";
14
- import "./chunk-ADNZVFXG.js";
14
+ import "./chunk-ZK32E74R.js";
15
15
  import "./chunk-GDASG7NC.js";
16
16
  import "./chunk-GDB4J2H3.js";
17
17
  import "./chunk-DGNQRNLL.js";
@@ -32,7 +32,7 @@ import "./chunk-EI6V5UXY.js";
32
32
  import "./chunk-QY7YA7OL.js";
33
33
  import "./chunk-NNVTUXEB.js";
34
34
  import "./chunk-QDW3E4RD.js";
35
- import "./chunk-EUML3N6B.js";
35
+ import "./chunk-IMA6GU4Y.js";
36
36
  import "./chunk-ODPLEWB6.js";
37
37
  import "./chunk-XL7FK7PJ.js";
38
38
  import "./chunk-2LSZVONP.js";
@@ -68,7 +68,7 @@ import "./chunk-TVVEYCNW.js";
68
68
  import "./chunk-RFYAYKTD.js";
69
69
  import "./chunk-LBLXEFWK.js";
70
70
  import "./chunk-VFUEZZBS.js";
71
- import "./chunk-QEMCQFDW.js";
71
+ import "./chunk-WD2W4234.js";
72
72
  import "./chunk-VDX2J7OX.js";
73
73
  import "./chunk-WEHSQBFR.js";
74
74
  import "./chunk-DQEMWVMT.js";
@@ -1,5 +1,5 @@
1
1
  import { Readable, Writable } from 'node:stream';
2
- import { E as EngramAccessService } from './access-service-DGG_2xPK.js';
2
+ import { E as EngramAccessService } from './access-service-CBNEKjzN.js';
3
3
  import './storage.js';
4
4
  import './page-versioning.js';
5
5
  import './consolidation-operator.js';
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  EngramMcpServer
3
- } from "./chunk-B6FDZPCF.js";
3
+ } from "./chunk-5OHHEORR.js";
4
4
  import "./chunk-6L46YAEZ.js";
5
5
  import "./chunk-D24OXEPB.js";
6
- import "./chunk-ADNZVFXG.js";
6
+ import "./chunk-ZK32E74R.js";
7
7
  import "./chunk-GDASG7NC.js";
8
8
  import "./chunk-GDB4J2H3.js";
9
9
  import "./chunk-DGNQRNLL.js";
@@ -24,7 +24,7 @@ import "./chunk-EI6V5UXY.js";
24
24
  import "./chunk-QY7YA7OL.js";
25
25
  import "./chunk-NNVTUXEB.js";
26
26
  import "./chunk-QDW3E4RD.js";
27
- import "./chunk-EUML3N6B.js";
27
+ import "./chunk-IMA6GU4Y.js";
28
28
  import "./chunk-ODPLEWB6.js";
29
29
  import "./chunk-XL7FK7PJ.js";
30
30
  import "./chunk-2LSZVONP.js";
@@ -60,7 +60,7 @@ import "./chunk-TVVEYCNW.js";
60
60
  import "./chunk-RFYAYKTD.js";
61
61
  import "./chunk-LBLXEFWK.js";
62
62
  import "./chunk-VFUEZZBS.js";
63
- import "./chunk-QEMCQFDW.js";
63
+ import "./chunk-WD2W4234.js";
64
64
  import "./chunk-VDX2J7OX.js";
65
65
  import "./chunk-WEHSQBFR.js";
66
66
  import "./chunk-DQEMWVMT.js";
@@ -104,15 +104,15 @@ declare const recallRequestSchema: z.ZodObject<{
104
104
  includeLowConfidence: z.ZodOptional<z.ZodBoolean>;
105
105
  }, "strip", z.ZodTypeAny, {
106
106
  query: string;
107
+ namespace?: string | undefined;
107
108
  sessionKey?: string | undefined;
108
109
  tags?: string[] | undefined;
109
- namespace?: string | undefined;
110
110
  topK?: number | undefined;
111
111
  mode?: "no_recall" | "minimal" | "full" | "graph_mode" | "auto" | undefined;
112
112
  cwd?: string | undefined;
113
113
  includeLowConfidence?: boolean | undefined;
114
- disclosure?: "chunk" | "section" | "raw" | undefined;
115
114
  idempotencyKey?: string | undefined;
115
+ disclosure?: "chunk" | "section" | "raw" | undefined;
116
116
  asOf?: string | undefined;
117
117
  includeDebug?: boolean | undefined;
118
118
  codingContext?: {
@@ -125,15 +125,15 @@ declare const recallRequestSchema: z.ZodObject<{
125
125
  tagMatch?: "all" | "any" | undefined;
126
126
  }, {
127
127
  query: string;
128
+ namespace?: string | undefined;
128
129
  sessionKey?: string | undefined;
129
130
  tags?: string[] | undefined;
130
- namespace?: string | undefined;
131
131
  topK?: number | undefined;
132
132
  mode?: "no_recall" | "minimal" | "full" | "graph_mode" | "auto" | undefined;
133
133
  cwd?: string | undefined;
134
134
  includeLowConfidence?: boolean | undefined;
135
- disclosure?: "chunk" | "section" | "raw" | undefined;
136
135
  idempotencyKey?: string | undefined;
136
+ disclosure?: "chunk" | "section" | "raw" | undefined;
137
137
  asOf?: string | undefined;
138
138
  includeDebug?: boolean | undefined;
139
139
  codingContext?: {
@@ -149,11 +149,11 @@ declare const recallExplainRequestSchema: z.ZodObject<{
149
149
  sessionKey: z.ZodOptional<z.ZodString>;
150
150
  namespace: z.ZodOptional<z.ZodString>;
151
151
  }, "strip", z.ZodTypeAny, {
152
- sessionKey?: string | undefined;
153
152
  namespace?: string | undefined;
154
- }, {
155
153
  sessionKey?: string | undefined;
154
+ }, {
156
155
  namespace?: string | undefined;
156
+ sessionKey?: string | undefined;
157
157
  }>;
158
158
  /**
159
159
  * Standalone "set coding context" request. Used by the HTTP endpoint
@@ -361,32 +361,38 @@ declare const memoryStoreRequestSchema: z.ZodObject<{
361
361
  entityRef: z.ZodOptional<z.ZodString>;
362
362
  ttl: z.ZodOptional<z.ZodString>;
363
363
  sourceReason: z.ZodOptional<z.ZodString>;
364
+ cwd: z.ZodOptional<z.ZodString>;
365
+ projectTag: z.ZodOptional<z.ZodString>;
364
366
  }, "strip", z.ZodTypeAny, {
365
367
  content: string;
368
+ namespace?: string | undefined;
369
+ category?: "fact" | "preference" | "correction" | "entity" | "decision" | "relationship" | "principle" | "commitment" | "moment" | "skill" | "rule" | "procedure" | "reasoning_trace" | undefined;
370
+ confidence?: number | undefined;
371
+ ttl?: string | undefined;
366
372
  schemaVersion?: number | undefined;
367
373
  sessionKey?: string | undefined;
368
374
  tags?: string[] | undefined;
369
375
  dryRun?: boolean | undefined;
370
- namespace?: string | undefined;
371
- category?: "fact" | "preference" | "correction" | "entity" | "decision" | "relationship" | "principle" | "commitment" | "moment" | "skill" | "rule" | "procedure" | "reasoning_trace" | undefined;
372
- confidence?: number | undefined;
373
376
  entityRef?: string | undefined;
374
- ttl?: string | undefined;
375
377
  sourceReason?: string | undefined;
378
+ cwd?: string | undefined;
376
379
  idempotencyKey?: string | undefined;
380
+ projectTag?: string | undefined;
377
381
  }, {
378
382
  content: string;
383
+ namespace?: string | undefined;
384
+ category?: "fact" | "preference" | "correction" | "entity" | "decision" | "relationship" | "principle" | "commitment" | "moment" | "skill" | "rule" | "procedure" | "reasoning_trace" | undefined;
385
+ confidence?: number | undefined;
386
+ ttl?: string | undefined;
379
387
  schemaVersion?: number | undefined;
380
388
  sessionKey?: string | undefined;
381
389
  tags?: string[] | undefined;
382
390
  dryRun?: boolean | undefined;
383
- namespace?: string | undefined;
384
- category?: "fact" | "preference" | "correction" | "entity" | "decision" | "relationship" | "principle" | "commitment" | "moment" | "skill" | "rule" | "procedure" | "reasoning_trace" | undefined;
385
- confidence?: number | undefined;
386
391
  entityRef?: string | undefined;
387
- ttl?: string | undefined;
388
392
  sourceReason?: string | undefined;
393
+ cwd?: string | undefined;
389
394
  idempotencyKey?: string | undefined;
395
+ projectTag?: string | undefined;
390
396
  }>;
391
397
  declare const suggestionSubmitRequestSchema: z.ZodObject<{
392
398
  schemaVersion: z.ZodOptional<z.ZodNumber>;
@@ -401,32 +407,38 @@ declare const suggestionSubmitRequestSchema: z.ZodObject<{
401
407
  entityRef: z.ZodOptional<z.ZodString>;
402
408
  ttl: z.ZodOptional<z.ZodString>;
403
409
  sourceReason: z.ZodOptional<z.ZodString>;
410
+ cwd: z.ZodOptional<z.ZodString>;
411
+ projectTag: z.ZodOptional<z.ZodString>;
404
412
  }, "strip", z.ZodTypeAny, {
405
413
  content: string;
414
+ namespace?: string | undefined;
415
+ category?: "fact" | "preference" | "correction" | "entity" | "decision" | "relationship" | "principle" | "commitment" | "moment" | "skill" | "rule" | "procedure" | "reasoning_trace" | undefined;
416
+ confidence?: number | undefined;
417
+ ttl?: string | undefined;
406
418
  schemaVersion?: number | undefined;
407
419
  sessionKey?: string | undefined;
408
420
  tags?: string[] | undefined;
409
421
  dryRun?: boolean | undefined;
410
- namespace?: string | undefined;
411
- category?: "fact" | "preference" | "correction" | "entity" | "decision" | "relationship" | "principle" | "commitment" | "moment" | "skill" | "rule" | "procedure" | "reasoning_trace" | undefined;
412
- confidence?: number | undefined;
413
422
  entityRef?: string | undefined;
414
- ttl?: string | undefined;
415
423
  sourceReason?: string | undefined;
424
+ cwd?: string | undefined;
416
425
  idempotencyKey?: string | undefined;
426
+ projectTag?: string | undefined;
417
427
  }, {
418
428
  content: string;
429
+ namespace?: string | undefined;
430
+ category?: "fact" | "preference" | "correction" | "entity" | "decision" | "relationship" | "principle" | "commitment" | "moment" | "skill" | "rule" | "procedure" | "reasoning_trace" | undefined;
431
+ confidence?: number | undefined;
432
+ ttl?: string | undefined;
419
433
  schemaVersion?: number | undefined;
420
434
  sessionKey?: string | undefined;
421
435
  tags?: string[] | undefined;
422
436
  dryRun?: boolean | undefined;
423
- namespace?: string | undefined;
424
- category?: "fact" | "preference" | "correction" | "entity" | "decision" | "relationship" | "principle" | "commitment" | "moment" | "skill" | "rule" | "procedure" | "reasoning_trace" | undefined;
425
- confidence?: number | undefined;
426
437
  entityRef?: string | undefined;
427
- ttl?: string | undefined;
428
438
  sourceReason?: string | undefined;
439
+ cwd?: string | undefined;
429
440
  idempotencyKey?: string | undefined;
441
+ projectTag?: string | undefined;
430
442
  }>;
431
443
  declare const reviewDispositionRequestSchema: z.ZodObject<{
432
444
  memoryId: z.ZodString;
@@ -456,18 +468,18 @@ declare const trustZonePromoteRequestSchema: z.ZodObject<{
456
468
  recordId: string;
457
469
  targetZone: "working" | "trusted";
458
470
  promotionReason: string;
471
+ namespace?: string | undefined;
459
472
  recordedAt?: string | undefined;
460
473
  summary?: string | undefined;
461
474
  dryRun?: boolean | undefined;
462
- namespace?: string | undefined;
463
475
  }, {
464
476
  recordId: string;
465
477
  targetZone: "working" | "trusted";
466
478
  promotionReason: string;
479
+ namespace?: string | undefined;
467
480
  recordedAt?: string | undefined;
468
481
  summary?: string | undefined;
469
482
  dryRun?: boolean | undefined;
470
- namespace?: string | undefined;
471
483
  }>;
472
484
  declare const trustZoneDemoSeedRequestSchema: z.ZodObject<{
473
485
  scenario: z.ZodOptional<z.ZodString>;
@@ -475,14 +487,14 @@ declare const trustZoneDemoSeedRequestSchema: z.ZodObject<{
475
487
  dryRun: z.ZodOptional<z.ZodBoolean>;
476
488
  namespace: z.ZodOptional<z.ZodString>;
477
489
  }, "strip", z.ZodTypeAny, {
490
+ namespace?: string | undefined;
478
491
  recordedAt?: string | undefined;
479
492
  dryRun?: boolean | undefined;
480
- namespace?: string | undefined;
481
493
  scenario?: string | undefined;
482
494
  }, {
495
+ namespace?: string | undefined;
483
496
  recordedAt?: string | undefined;
484
497
  dryRun?: boolean | undefined;
485
- namespace?: string | undefined;
486
498
  scenario?: string | undefined;
487
499
  }>;
488
500
  declare const lcmSearchRequestSchema: z.ZodObject<{
@@ -493,15 +505,15 @@ declare const lcmSearchRequestSchema: z.ZodObject<{
493
505
  limit: z.ZodOptional<z.ZodNumber>;
494
506
  }, "strip", z.ZodTypeAny, {
495
507
  query: string;
496
- sessionKey?: string | undefined;
497
508
  namespace?: string | undefined;
498
509
  limit?: number | undefined;
510
+ sessionKey?: string | undefined;
499
511
  sessionPrefix?: string | undefined;
500
512
  }, {
501
513
  query: string;
502
- sessionKey?: string | undefined;
503
514
  namespace?: string | undefined;
504
515
  limit?: number | undefined;
516
+ sessionKey?: string | undefined;
505
517
  sessionPrefix?: string | undefined;
506
518
  }>;
507
519
  declare const lcmCompactionFlushRequestSchema: z.ZodObject<{
@@ -535,12 +547,12 @@ declare const daySummaryRequestSchema: z.ZodObject<{
535
547
  sessionKey: z.ZodOptional<z.ZodString>;
536
548
  namespace: z.ZodOptional<z.ZodString>;
537
549
  }, "strip", z.ZodTypeAny, {
538
- sessionKey?: string | undefined;
539
550
  namespace?: string | undefined;
551
+ sessionKey?: string | undefined;
540
552
  memories?: string | undefined;
541
553
  }, {
542
- sessionKey?: string | undefined;
543
554
  namespace?: string | undefined;
555
+ sessionKey?: string | undefined;
544
556
  memories?: string | undefined;
545
557
  }>;
546
558
  declare const capsuleExportRequestSchema: z.ZodObject<{
@@ -730,11 +742,11 @@ declare const actionConfidenceRequestSchema: z.ZodObject<{
730
742
  safety: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodEnum<["safe", "requires-review", "blocked"]>>>, NonNullable<"blocked" | "safe" | "requires-review"> | undefined, "blocked" | "safe" | "requires-review" | null | undefined>;
731
743
  safetyReasons: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>, string[] | undefined, string[] | null | undefined>;
732
744
  }, "strict", z.ZodTypeAny, {
745
+ confidence?: number | undefined;
733
746
  source?: string | undefined;
734
747
  stale?: boolean | undefined;
735
748
  created?: string | undefined;
736
749
  updated?: string | undefined;
737
- confidence?: number | undefined;
738
750
  scope?: string | undefined;
739
751
  retrievalReason?: string | undefined;
740
752
  safety?: NonNullable<"blocked" | "safe" | "requires-review"> | undefined;
@@ -744,11 +756,11 @@ declare const actionConfidenceRequestSchema: z.ZodObject<{
744
756
  safetyReasons?: string[] | undefined;
745
757
  userContextScopes?: string[] | undefined;
746
758
  }, {
759
+ confidence?: number | null | undefined;
747
760
  source?: string | null | undefined;
748
761
  stale?: boolean | null | undefined;
749
762
  created?: string | null | undefined;
750
763
  updated?: string | null | undefined;
751
- confidence?: number | null | undefined;
752
764
  scope?: string | null | undefined;
753
765
  retrievalReason?: string | null | undefined;
754
766
  safety?: "blocked" | "safe" | "requires-review" | null | undefined;
@@ -758,11 +770,11 @@ declare const actionConfidenceRequestSchema: z.ZodObject<{
758
770
  safetyReasons?: string[] | null | undefined;
759
771
  userContextScopes?: string[] | null | undefined;
760
772
  }>, "many">>>, {
773
+ confidence?: number | undefined;
761
774
  source?: string | undefined;
762
775
  stale?: boolean | undefined;
763
776
  created?: string | undefined;
764
777
  updated?: string | undefined;
765
- confidence?: number | undefined;
766
778
  scope?: string | undefined;
767
779
  retrievalReason?: string | undefined;
768
780
  safety?: NonNullable<"blocked" | "safe" | "requires-review"> | undefined;
@@ -772,11 +784,11 @@ declare const actionConfidenceRequestSchema: z.ZodObject<{
772
784
  safetyReasons?: string[] | undefined;
773
785
  userContextScopes?: string[] | undefined;
774
786
  }[] | undefined, {
787
+ confidence?: number | null | undefined;
775
788
  source?: string | null | undefined;
776
789
  stale?: boolean | null | undefined;
777
790
  created?: string | null | undefined;
778
791
  updated?: string | null | undefined;
779
- confidence?: number | null | undefined;
780
792
  scope?: string | null | undefined;
781
793
  retrievalReason?: string | null | undefined;
782
794
  safety?: "blocked" | "safe" | "requires-review" | null | undefined;
@@ -798,11 +810,11 @@ declare const actionConfidenceRequestSchema: z.ZodObject<{
798
810
  matched?: boolean | undefined;
799
811
  }[] | undefined;
800
812
  retrievedMemories?: {
813
+ confidence?: number | undefined;
801
814
  source?: string | undefined;
802
815
  stale?: boolean | undefined;
803
816
  created?: string | undefined;
804
817
  updated?: string | undefined;
805
- confidence?: number | undefined;
806
818
  scope?: string | undefined;
807
819
  retrievalReason?: string | undefined;
808
820
  safety?: NonNullable<"blocked" | "safe" | "requires-review"> | undefined;
@@ -824,11 +836,11 @@ declare const actionConfidenceRequestSchema: z.ZodObject<{
824
836
  matched?: boolean | null | undefined;
825
837
  }[] | null | undefined;
826
838
  retrievedMemories?: {
839
+ confidence?: number | null | undefined;
827
840
  source?: string | null | undefined;
828
841
  stale?: boolean | null | undefined;
829
842
  created?: string | null | undefined;
830
843
  updated?: string | null | undefined;
831
- confidence?: number | null | undefined;
832
844
  scope?: string | null | undefined;
833
845
  retrievalReason?: string | null | undefined;
834
846
  safety?: "blocked" | "safe" | "requires-review" | null | undefined;
@@ -25,7 +25,7 @@ import {
25
25
  trustZoneDemoSeedRequestSchema,
26
26
  trustZonePromoteRequestSchema,
27
27
  validateRequest
28
- } from "./chunk-QEMCQFDW.js";
28
+ } from "./chunk-WD2W4234.js";
29
29
  import "./chunk-VDX2J7OX.js";
30
30
  import "./chunk-WEHSQBFR.js";
31
31
  import "./chunk-DQEMWVMT.js";
@@ -644,9 +644,18 @@ interface EngramAccessWriteEnvelope {
644
644
  */
645
645
  authenticatedPrincipal?: string;
646
646
  }
647
- interface EngramAccessMemoryStoreRequest extends EngramAccessWriteEnvelope, ExplicitCaptureInput {
647
+ /**
648
+ * Optional git/project context for project-scoped writes (#1434). When no
649
+ * explicit `namespace` is supplied, these route the write to the same project
650
+ * namespace recall/observe resolve from `cwd`/`projectTag` (rule 42 symmetry).
651
+ */
652
+ interface CodingScopedWriteInput {
653
+ cwd?: string;
654
+ projectTag?: string;
648
655
  }
649
- interface EngramAccessSuggestionSubmitRequest extends EngramAccessWriteEnvelope, ExplicitCaptureInput {
656
+ interface EngramAccessMemoryStoreRequest extends EngramAccessWriteEnvelope, ExplicitCaptureInput, CodingScopedWriteInput {
657
+ }
658
+ interface EngramAccessSuggestionSubmitRequest extends EngramAccessWriteEnvelope, ExplicitCaptureInput, CodingScopedWriteInput {
650
659
  }
651
660
  interface EngramAccessWriteResponse {
652
661
  schemaVersion: 1;
@@ -774,6 +783,47 @@ declare class EngramAccessService {
774
783
  private resolveRecallNamespace;
775
784
  private resolveRequestPrincipal;
776
785
  private resolveWritableNamespace;
786
+ /**
787
+ * Resolve a coding context from `cwd`/`projectTag` WITHOUT persisting it to
788
+ * any session — the read-only half of `maybeAttachCodingContext`. Returns
789
+ * null when project scoping is off or nothing resolves. `projectTag` takes
790
+ * priority over `cwd` (matching `maybeAttachCodingContext`).
791
+ */
792
+ private resolveCodingContextFromOptions;
793
+ /**
794
+ * Resolve the write namespace for explicit-write tools (memory_store /
795
+ * suggestion_submit), project-scoping the write the same way recall does so a
796
+ * memory stored with a client-injected `cwd`/`projectTag` is discoverable by
797
+ * project-scoped recall (#1434, rule 42).
798
+ *
799
+ * Precedence:
800
+ * - An explicit `namespace` always wins and is authorized strictly via
801
+ * `resolveWritableNamespace` → `canWriteNamespace`. A coding-overlay
802
+ * namespace string (`<base>-project-*`) is NOT a writable target via the
803
+ * explicit field — project scoping is requested with `cwd`/`projectTag`,
804
+ * never by naming the derived namespace — so there is no way to bypass the
805
+ * policy allow-list by guessing/forging an overlay name (Codex review).
806
+ * - With NO coding overlay, the write stays on `config.defaultNamespace` —
807
+ * exactly the pre-#1434 behavior, so an unqualified write is NOT silently
808
+ * moved to a principal self namespace (Codex review).
809
+ * - WITH a coding overlay, the base is the principal self namespace
810
+ * (`defaultNamespaceForPrincipal`, write-checked) — the SAME base recall,
811
+ * observe, and the orchestrator buffer-flush write path overlay onto
812
+ * (rule 42 / Cursor) — so a project-scoped store lands exactly where
813
+ * project-scoped recall searches. The overlay namespace is always REBUILT
814
+ * from the authenticated principal's base, never accepted as a caller
815
+ * string, so a caller can never reach another principal's subtree.
816
+ *
817
+ * Read-only: this NEVER mutates session coding context, so the idempotency
818
+ * peeks and dryRun preflights that call it stay side-effect free (Codex
819
+ * review). It prefers the per-call `cwd`/`projectTag` (the project explicitly
820
+ * identified for this write), else the session's existing context. The HTTP
821
+ * surface lets the peek and the write each resolve independently; the peek's
822
+ * namespace only gates rate-limiting (memory_store/suggestion_submit run their
823
+ * own idempotency check), so a benign session-context change between the two
824
+ * never fails a write — there is no namespace to "pin".
825
+ */
826
+ private resolveCodingScopedWriteNamespace;
777
827
  private objectiveStateStoreLocationForNamespace;
778
828
  private resolveReadableNamespace;
779
829
  private buildRecallDebug;
@@ -831,6 +881,17 @@ declare class EngramAccessService {
831
881
  * being in a repo is a normal runtime state.
832
882
  */
833
883
  private maybeAttachCodingContext;
884
+ /**
885
+ * Seed the session's coding binding AFTER a committed, project-scoped explicit
886
+ * write (memory_store / suggestion_submit), mirroring the recall path's
887
+ * `maybeAttachCodingContext` so a later bare recall/write on the same session
888
+ * is scoped to the same project. Called only from the post-persist path, so it
889
+ * never fires on dryRun, replay/conflict, or quota-rejected requests. Skips
890
+ * when an explicit `namespace` was supplied — that write bypassed the coding
891
+ * overlay, so binding the session to a project it never wrote to would make
892
+ * later bare recalls miss (Codex review).
893
+ */
894
+ private attachCodingContextAfterScopedWrite;
834
895
  recall(request: EngramAccessRecallRequest): Promise<EngramAccessRecallResponse>;
835
896
  private executeRecall;
836
897
  recallExplain(request?: EngramAccessRecallExplainRequest): Promise<EngramAccessRecallExplainResponse>;
@@ -889,9 +950,13 @@ declare class EngramAccessService {
889
950
  recall?: EngramAccessRecallResponse;
890
951
  }>;
891
952
  private xrayQueue;
892
- memoryStore(request: EngramAccessMemoryStoreRequest): Promise<EngramAccessWriteResponse>;
953
+ memoryStore(request: EngramAccessMemoryStoreRequest, hooks?: {
954
+ enforceWriteQuota?: () => void | Promise<void>;
955
+ }): Promise<EngramAccessWriteResponse>;
893
956
  peekMemoryStoreIdempotency(request: EngramAccessMemoryStoreRequest): Promise<EngramAccessIdempotencyStatus>;
894
- suggestionSubmit(request: EngramAccessSuggestionSubmitRequest): Promise<EngramAccessWriteResponse>;
957
+ suggestionSubmit(request: EngramAccessSuggestionSubmitRequest, hooks?: {
958
+ enforceWriteQuota?: () => void | Promise<void>;
959
+ }): Promise<EngramAccessWriteResponse>;
895
960
  peekSuggestionSubmitIdempotency(request: EngramAccessSuggestionSubmitRequest): Promise<EngramAccessIdempotencyStatus>;
896
961
  private validateWriteCandidate;
897
962
  memoryGet(memoryId: string, namespace?: string, principal?: string): Promise<EngramAccessMemoryResponse>;
@@ -1489,4 +1554,4 @@ declare class EngramAccessService {
1489
1554
  }): Promise<DreamsRunResult>;
1490
1555
  }
1491
1556
 
1492
- export { type EngramAccessReviewDispositionResponse as $, type EngramAccessMemoryBrowseRequest as A, type EngramAccessMemoryBrowseResponse as B, type EngramAccessMemoryRecord as C, type EngramAccessMemoryResponse as D, EngramAccessService as E, type EngramAccessMemoryStoreRequest as F, type EngramAccessMemorySummary as G, type EngramAccessObserveMessage as H, type EngramAccessObserveRequest as I, type EngramAccessObserveResponse as J, type EngramAccessOfflineSyncApplyFileContentRequest as K, type EngramAccessOfflineSyncApplyFileContentResponse as L, type EngramAccessOfflineSyncApplyRequest as M, type EngramAccessOfflineSyncApplyResponse as N, type EngramAccessOfflineSyncFileContentRequest as O, type ProcedureStatsConfigSnapshot as P, type EngramAccessOfflineSyncFileContentResponse as Q, type EngramAccessOfflineSyncFilesRequest as R, type EngramAccessOfflineSyncFilesResponse as S, type EngramAccessOfflineSyncSnapshotRequest as T, type EngramAccessOfflineSyncSnapshotResponse as U, type EngramAccessOfflineSyncSnapshotStreamResponse as V, type EngramAccessQualityResponse as W, type EngramAccessRecallExplainRequest as X, type EngramAccessRecallExplainResponse as Y, type EngramAccessRecallRequest as Z, type EngramAccessReviewDispositionRequest as _, type EngramAccessRecallResponse as a, type EngramAccessReviewQueueResponse as a0, type EngramAccessSetCodingContextRequest as a1, type EngramAccessSuggestionSubmitRequest as a2, type EngramAccessTimelineResponse as a3, type EngramAccessTrustZoneBrowseRequest as a4, type EngramAccessTrustZoneBrowseResponse as a5, type EngramAccessTrustZoneDemoSeedRequest as a6, type EngramAccessTrustZoneDemoSeedResponse as a7, type EngramAccessTrustZonePromoteRequest as a8, type EngramAccessTrustZonePromoteResponse as a9, type EngramAccessTrustZoneRecordSummary as aa, type EngramAccessTrustZoneStatusResponse as ab, type EngramAccessWriteEnvelope as ac, type EngramAccessWriteResponse as ad, shapeMemorySummary as ae, EngramAccessInputError as b, type ProcedureStatsRecent as c, type ProcedureStatsReport as d, type ProcedureStatusCounts as e, computeProcedureStats as f, formatProcedureStatsText as g, ENGRAM_ACCESS_WRITE_SCHEMA_VERSION as h, type EngramAccessActionConfidenceRequest as i, type EngramAccessActionConfidenceResponse as j, type EngramAccessBriefingRequest as k, type EngramAccessBriefingResponse as l, type EngramAccessCapsuleListResponse as m, type EngramAccessDaySummaryRequest as n, type EngramAccessEntityListResponse as o, type EngramAccessEntityResponse as p, type EngramAccessEntitySummary as q, type EngramAccessHealthResponse as r, type EngramAccessLcmCompactionFlushRequest as s, type EngramAccessLcmCompactionFlushResponse as t, type EngramAccessLcmCompactionRecordRequest as u, type EngramAccessLcmCompactionRecordResponse as v, type EngramAccessLcmSearchRequest as w, type EngramAccessLcmSearchResponse as x, type EngramAccessLcmStatusResponse as y, type EngramAccessMaintenanceResponse as z };
1557
+ export { type EngramAccessReviewDispositionRequest as $, type EngramAccessMemoryBrowseRequest as A, type EngramAccessMemoryBrowseResponse as B, type CodingScopedWriteInput as C, type EngramAccessMemoryRecord as D, EngramAccessService as E, type EngramAccessMemoryResponse as F, type EngramAccessMemoryStoreRequest as G, type EngramAccessMemorySummary as H, type EngramAccessObserveMessage as I, type EngramAccessObserveRequest as J, type EngramAccessObserveResponse as K, type EngramAccessOfflineSyncApplyFileContentRequest as L, type EngramAccessOfflineSyncApplyFileContentResponse as M, type EngramAccessOfflineSyncApplyRequest as N, type EngramAccessOfflineSyncApplyResponse as O, type ProcedureStatsConfigSnapshot as P, type EngramAccessOfflineSyncFileContentRequest as Q, type EngramAccessOfflineSyncFileContentResponse as R, type EngramAccessOfflineSyncFilesRequest as S, type EngramAccessOfflineSyncFilesResponse as T, type EngramAccessOfflineSyncSnapshotRequest as U, type EngramAccessOfflineSyncSnapshotResponse as V, type EngramAccessOfflineSyncSnapshotStreamResponse as W, type EngramAccessQualityResponse as X, type EngramAccessRecallExplainRequest as Y, type EngramAccessRecallExplainResponse as Z, type EngramAccessRecallRequest as _, type EngramAccessRecallResponse as a, type EngramAccessReviewDispositionResponse as a0, type EngramAccessReviewQueueResponse as a1, type EngramAccessSetCodingContextRequest as a2, type EngramAccessSuggestionSubmitRequest as a3, type EngramAccessTimelineResponse as a4, type EngramAccessTrustZoneBrowseRequest as a5, type EngramAccessTrustZoneBrowseResponse as a6, type EngramAccessTrustZoneDemoSeedRequest as a7, type EngramAccessTrustZoneDemoSeedResponse as a8, type EngramAccessTrustZonePromoteRequest as a9, type EngramAccessTrustZonePromoteResponse as aa, type EngramAccessTrustZoneRecordSummary as ab, type EngramAccessTrustZoneStatusResponse as ac, type EngramAccessWriteEnvelope as ad, type EngramAccessWriteResponse as ae, shapeMemorySummary as af, EngramAccessInputError as b, type ProcedureStatsRecent as c, type ProcedureStatsReport as d, type ProcedureStatusCounts as e, computeProcedureStats as f, formatProcedureStatsText as g, ENGRAM_ACCESS_WRITE_SCHEMA_VERSION as h, type EngramAccessActionConfidenceRequest as i, type EngramAccessActionConfidenceResponse as j, type EngramAccessBriefingRequest as k, type EngramAccessBriefingResponse as l, type EngramAccessCapsuleListResponse as m, type EngramAccessDaySummaryRequest as n, type EngramAccessEntityListResponse as o, type EngramAccessEntityResponse as p, type EngramAccessEntitySummary as q, type EngramAccessHealthResponse as r, type EngramAccessLcmCompactionFlushRequest as s, type EngramAccessLcmCompactionFlushResponse as t, type EngramAccessLcmCompactionRecordRequest as u, type EngramAccessLcmCompactionRecordResponse as v, type EngramAccessLcmSearchRequest as w, type EngramAccessLcmSearchResponse as x, type EngramAccessLcmStatusResponse as y, type EngramAccessMaintenanceResponse as z };
@@ -1,6 +1,6 @@
1
1
  import './storage.js';
2
2
  import './types-B1VHaf2w.js';
3
- export { h as ENGRAM_ACCESS_WRITE_SCHEMA_VERSION, i as EngramAccessActionConfidenceRequest, j as EngramAccessActionConfidenceResponse, k as EngramAccessBriefingRequest, l as EngramAccessBriefingResponse, m as EngramAccessCapsuleListResponse, n as EngramAccessDaySummaryRequest, o as EngramAccessEntityListResponse, p as EngramAccessEntityResponse, q as EngramAccessEntitySummary, r as EngramAccessHealthResponse, b as EngramAccessInputError, s as EngramAccessLcmCompactionFlushRequest, t as EngramAccessLcmCompactionFlushResponse, u as EngramAccessLcmCompactionRecordRequest, v as EngramAccessLcmCompactionRecordResponse, w as EngramAccessLcmSearchRequest, x as EngramAccessLcmSearchResponse, y as EngramAccessLcmStatusResponse, z as EngramAccessMaintenanceResponse, A as EngramAccessMemoryBrowseRequest, B as EngramAccessMemoryBrowseResponse, C as EngramAccessMemoryRecord, D as EngramAccessMemoryResponse, F as EngramAccessMemoryStoreRequest, G as EngramAccessMemorySummary, H as EngramAccessObserveMessage, I as EngramAccessObserveRequest, J as EngramAccessObserveResponse, K as EngramAccessOfflineSyncApplyFileContentRequest, L as EngramAccessOfflineSyncApplyFileContentResponse, M as EngramAccessOfflineSyncApplyRequest, N as EngramAccessOfflineSyncApplyResponse, O as EngramAccessOfflineSyncFileContentRequest, Q as EngramAccessOfflineSyncFileContentResponse, R as EngramAccessOfflineSyncFilesRequest, S as EngramAccessOfflineSyncFilesResponse, T as EngramAccessOfflineSyncSnapshotRequest, U as EngramAccessOfflineSyncSnapshotResponse, V as EngramAccessOfflineSyncSnapshotStreamResponse, W as EngramAccessQualityResponse, X as EngramAccessRecallExplainRequest, Y as EngramAccessRecallExplainResponse, Z as EngramAccessRecallRequest, a as EngramAccessRecallResponse, _ as EngramAccessReviewDispositionRequest, $ as EngramAccessReviewDispositionResponse, a0 as EngramAccessReviewQueueResponse, E as EngramAccessService, a1 as EngramAccessSetCodingContextRequest, a2 as EngramAccessSuggestionSubmitRequest, a3 as EngramAccessTimelineResponse, a4 as EngramAccessTrustZoneBrowseRequest, a5 as EngramAccessTrustZoneBrowseResponse, a6 as EngramAccessTrustZoneDemoSeedRequest, a7 as EngramAccessTrustZoneDemoSeedResponse, a8 as EngramAccessTrustZonePromoteRequest, a9 as EngramAccessTrustZonePromoteResponse, aa as EngramAccessTrustZoneRecordSummary, ab as EngramAccessTrustZoneStatusResponse, ac as EngramAccessWriteEnvelope, ad as EngramAccessWriteResponse, ae as shapeMemorySummary } from './access-service-DGG_2xPK.js';
3
+ export { C as CodingScopedWriteInput, h as ENGRAM_ACCESS_WRITE_SCHEMA_VERSION, i as EngramAccessActionConfidenceRequest, j as EngramAccessActionConfidenceResponse, k as EngramAccessBriefingRequest, l as EngramAccessBriefingResponse, m as EngramAccessCapsuleListResponse, n as EngramAccessDaySummaryRequest, o as EngramAccessEntityListResponse, p as EngramAccessEntityResponse, q as EngramAccessEntitySummary, r as EngramAccessHealthResponse, b as EngramAccessInputError, s as EngramAccessLcmCompactionFlushRequest, t as EngramAccessLcmCompactionFlushResponse, u as EngramAccessLcmCompactionRecordRequest, v as EngramAccessLcmCompactionRecordResponse, w as EngramAccessLcmSearchRequest, x as EngramAccessLcmSearchResponse, y as EngramAccessLcmStatusResponse, z as EngramAccessMaintenanceResponse, A as EngramAccessMemoryBrowseRequest, B as EngramAccessMemoryBrowseResponse, D as EngramAccessMemoryRecord, F as EngramAccessMemoryResponse, G as EngramAccessMemoryStoreRequest, H as EngramAccessMemorySummary, I as EngramAccessObserveMessage, J as EngramAccessObserveRequest, K as EngramAccessObserveResponse, L as EngramAccessOfflineSyncApplyFileContentRequest, M as EngramAccessOfflineSyncApplyFileContentResponse, N as EngramAccessOfflineSyncApplyRequest, O as EngramAccessOfflineSyncApplyResponse, Q as EngramAccessOfflineSyncFileContentRequest, R as EngramAccessOfflineSyncFileContentResponse, S as EngramAccessOfflineSyncFilesRequest, T as EngramAccessOfflineSyncFilesResponse, U as EngramAccessOfflineSyncSnapshotRequest, V as EngramAccessOfflineSyncSnapshotResponse, W as EngramAccessOfflineSyncSnapshotStreamResponse, X as EngramAccessQualityResponse, Y as EngramAccessRecallExplainRequest, Z as EngramAccessRecallExplainResponse, _ as EngramAccessRecallRequest, a as EngramAccessRecallResponse, $ as EngramAccessReviewDispositionRequest, a0 as EngramAccessReviewDispositionResponse, a1 as EngramAccessReviewQueueResponse, E as EngramAccessService, a2 as EngramAccessSetCodingContextRequest, a3 as EngramAccessSuggestionSubmitRequest, a4 as EngramAccessTimelineResponse, a5 as EngramAccessTrustZoneBrowseRequest, a6 as EngramAccessTrustZoneBrowseResponse, a7 as EngramAccessTrustZoneDemoSeedRequest, a8 as EngramAccessTrustZoneDemoSeedResponse, a9 as EngramAccessTrustZonePromoteRequest, aa as EngramAccessTrustZonePromoteResponse, ab as EngramAccessTrustZoneRecordSummary, ac as EngramAccessTrustZoneStatusResponse, ad as EngramAccessWriteEnvelope, ae as EngramAccessWriteResponse, af as shapeMemorySummary } from './access-service-CBNEKjzN.js';
4
4
  import './recall-explain-renderer.js';
5
5
  import './types.js';
6
6
  import './recall-audit-anomaly.js';
@@ -3,7 +3,7 @@ import {
3
3
  EngramAccessInputError,
4
4
  EngramAccessService,
5
5
  shapeMemorySummary
6
- } from "./chunk-ADNZVFXG.js";
6
+ } from "./chunk-ZK32E74R.js";
7
7
  import "./chunk-GDASG7NC.js";
8
8
  import "./chunk-GDB4J2H3.js";
9
9
  import "./chunk-DGNQRNLL.js";
@@ -24,7 +24,7 @@ import "./chunk-EI6V5UXY.js";
24
24
  import "./chunk-QY7YA7OL.js";
25
25
  import "./chunk-NNVTUXEB.js";
26
26
  import "./chunk-QDW3E4RD.js";
27
- import "./chunk-EUML3N6B.js";
27
+ import "./chunk-IMA6GU4Y.js";
28
28
  import "./chunk-ODPLEWB6.js";
29
29
  import "./chunk-XL7FK7PJ.js";
30
30
  import "./chunk-2LSZVONP.js";