@remnic/core 9.35.4 → 9.35.5

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 (34) hide show
  1. package/dist/access-cli.js +6 -6
  2. package/dist/access-http.js +4 -4
  3. package/dist/access-mcp-output-schemas.js +1 -1
  4. package/dist/access-mcp.js +3 -3
  5. package/dist/access-operations-batch.js +1 -1
  6. package/dist/access-operations.d.ts +3 -3
  7. package/dist/access-operations.js +1 -1
  8. package/dist/access-schema.d.ts +84 -84
  9. package/dist/{chunk-IE2CS5BM.js → chunk-ACKB2THH.js} +2 -2
  10. package/dist/{chunk-OJRLTZQM.js → chunk-CKBKHZKZ.js} +15 -6
  11. package/dist/chunk-CKBKHZKZ.js.map +1 -0
  12. package/dist/{chunk-VEUVON5I.js → chunk-NN2MCG5N.js} +5 -4
  13. package/dist/chunk-NN2MCG5N.js.map +1 -0
  14. package/dist/{chunk-ZJMVZLPK.js → chunk-SYBHD2IU.js} +3 -3
  15. package/dist/{chunk-Y2UUEB4I.js → chunk-WAJPTY5Y.js} +3 -3
  16. package/dist/{chunk-WWUVONGW.js → chunk-XNJIND4I.js} +11 -10
  17. package/dist/chunk-XNJIND4I.js.map +1 -0
  18. package/dist/cli.js +5 -5
  19. package/dist/index.d.ts +386 -386
  20. package/dist/index.js +6 -6
  21. package/dist/orchestrator.js +6 -6
  22. package/dist/schemas.d.ts +54 -54
  23. package/dist/shared-context/manager.d.ts +8 -8
  24. package/dist/transfer/types.d.ts +66 -66
  25. package/package.json +2 -2
  26. package/src/access-mcp-output-schemas.ts +10 -9
  27. package/src/access-mcp.ts +3 -2
  28. package/src/access-operations-batch.ts +5 -5
  29. package/dist/chunk-OJRLTZQM.js.map +0 -1
  30. package/dist/chunk-VEUVON5I.js.map +0 -1
  31. package/dist/chunk-WWUVONGW.js.map +0 -1
  32. /package/dist/{chunk-IE2CS5BM.js.map → chunk-ACKB2THH.js.map} +0 -0
  33. /package/dist/{chunk-ZJMVZLPK.js.map → chunk-SYBHD2IU.js.map} +0 -0
  34. /package/dist/{chunk-Y2UUEB4I.js.map → chunk-WAJPTY5Y.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
- schemaVersion: 1;
23
+ format: "openclaw-engram-export";
24
24
  createdAt: string;
25
+ pluginVersion: string;
25
26
  files: {
26
27
  path: string;
27
28
  sha256: string;
28
29
  bytes: number;
29
30
  }[];
30
- format: "openclaw-engram-export";
31
- pluginVersion: string;
31
+ schemaVersion: 1;
32
32
  includesTranscripts: boolean;
33
33
  }, {
34
- schemaVersion: 1;
34
+ format: "openclaw-engram-export";
35
35
  createdAt: string;
36
+ pluginVersion: string;
36
37
  files: {
37
38
  path: string;
38
39
  sha256: string;
39
40
  bytes: number;
40
41
  }[];
41
- format: "openclaw-engram-export";
42
- pluginVersion: string;
42
+ schemaVersion: 1;
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
- schemaVersion: 1;
78
+ format: "openclaw-engram-export";
79
79
  createdAt: string;
80
+ pluginVersion: string;
80
81
  files: {
81
82
  path: string;
82
83
  sha256: string;
83
84
  bytes: number;
84
85
  }[];
85
- format: "openclaw-engram-export";
86
- pluginVersion: string;
86
+ schemaVersion: 1;
87
87
  includesTranscripts: boolean;
88
88
  }, {
89
- schemaVersion: 1;
89
+ format: "openclaw-engram-export";
90
90
  createdAt: string;
91
+ pluginVersion: string;
91
92
  files: {
92
93
  path: string;
93
94
  sha256: string;
94
95
  bytes: number;
95
96
  }[];
96
- format: "openclaw-engram-export";
97
- pluginVersion: string;
97
+ schemaVersion: 1;
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
- schemaVersion: 1;
112
+ format: "openclaw-engram-export";
113
113
  createdAt: string;
114
+ pluginVersion: string;
114
115
  files: {
115
116
  path: string;
116
117
  sha256: string;
117
118
  bytes: number;
118
119
  }[];
119
- format: "openclaw-engram-export";
120
- pluginVersion: string;
120
+ schemaVersion: 1;
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
- schemaVersion: 1;
129
+ format: "openclaw-engram-export";
130
130
  createdAt: string;
131
+ pluginVersion: string;
131
132
  files: {
132
133
  path: string;
133
134
  sha256: string;
134
135
  bytes: number;
135
136
  }[];
136
- format: "openclaw-engram-export";
137
- pluginVersion: string;
137
+ schemaVersion: 1;
138
138
  includesTranscripts: boolean;
139
139
  };
140
140
  records: {
@@ -319,10 +319,10 @@ declare const CapsuleBlockSchema: z.ZodObject<{
319
319
  identityAnchors: boolean;
320
320
  peerProfiles: boolean;
321
321
  };
322
- schemaVersion: string;
322
+ description: string;
323
323
  id: string;
324
+ schemaVersion: string;
324
325
  version: string;
325
- description: string;
326
326
  parentCapsule: string | null;
327
327
  parent: {
328
328
  version: string;
@@ -340,10 +340,10 @@ declare const CapsuleBlockSchema: z.ZodObject<{
340
340
  identityAnchors: boolean;
341
341
  peerProfiles: boolean;
342
342
  };
343
- schemaVersion: string;
343
+ description: string;
344
344
  id: string;
345
+ schemaVersion: string;
345
346
  version: string;
346
- description: string;
347
347
  parentCapsule: string | null;
348
348
  retrievalPolicy: {
349
349
  tierWeights: Record<string, number>;
@@ -470,10 +470,10 @@ declare const ExportManifestV2Schema: z.ZodObject<{
470
470
  identityAnchors: boolean;
471
471
  peerProfiles: boolean;
472
472
  };
473
- schemaVersion: string;
473
+ description: string;
474
474
  id: string;
475
+ schemaVersion: string;
475
476
  version: string;
476
- description: string;
477
477
  parentCapsule: string | null;
478
478
  parent: {
479
479
  version: string;
@@ -491,10 +491,10 @@ declare const ExportManifestV2Schema: z.ZodObject<{
491
491
  identityAnchors: boolean;
492
492
  peerProfiles: boolean;
493
493
  };
494
- schemaVersion: string;
494
+ description: string;
495
495
  id: string;
496
+ schemaVersion: string;
496
497
  version: string;
497
- description: string;
498
498
  parentCapsule: string | null;
499
499
  retrievalPolicy: {
500
500
  tierWeights: Record<string, number>;
@@ -507,16 +507,14 @@ declare const ExportManifestV2Schema: z.ZodObject<{
507
507
  } | null | undefined;
508
508
  }>;
509
509
  }, "strip", z.ZodTypeAny, {
510
- schemaVersion: 2;
510
+ format: "openclaw-engram-export";
511
511
  createdAt: string;
512
+ pluginVersion: string;
512
513
  files: {
513
514
  path: string;
514
515
  sha256: string;
515
516
  bytes: number;
516
517
  }[];
517
- format: "openclaw-engram-export";
518
- pluginVersion: string;
519
- includesTranscripts: boolean;
520
518
  capsule: {
521
519
  includes: {
522
520
  procedural: boolean;
@@ -524,10 +522,10 @@ declare const ExportManifestV2Schema: z.ZodObject<{
524
522
  identityAnchors: boolean;
525
523
  peerProfiles: boolean;
526
524
  };
527
- schemaVersion: string;
525
+ description: string;
528
526
  id: string;
527
+ schemaVersion: string;
529
528
  version: string;
530
- description: string;
531
529
  parentCapsule: string | null;
532
530
  parent: {
533
531
  version: string;
@@ -539,17 +537,17 @@ declare const ExportManifestV2Schema: z.ZodObject<{
539
537
  directAnswerEnabled: boolean;
540
538
  };
541
539
  };
542
- }, {
543
540
  schemaVersion: 2;
541
+ includesTranscripts: boolean;
542
+ }, {
543
+ format: "openclaw-engram-export";
544
544
  createdAt: string;
545
+ pluginVersion: string;
545
546
  files: {
546
547
  path: string;
547
548
  sha256: string;
548
549
  bytes: number;
549
550
  }[];
550
- format: "openclaw-engram-export";
551
- pluginVersion: string;
552
- includesTranscripts: boolean;
553
551
  capsule: {
554
552
  includes: {
555
553
  procedural: boolean;
@@ -557,10 +555,10 @@ declare const ExportManifestV2Schema: z.ZodObject<{
557
555
  identityAnchors: boolean;
558
556
  peerProfiles: boolean;
559
557
  };
560
- schemaVersion: string;
558
+ description: string;
561
559
  id: string;
560
+ schemaVersion: string;
562
561
  version: string;
563
- description: string;
564
562
  parentCapsule: string | null;
565
563
  retrievalPolicy: {
566
564
  tierWeights: Record<string, number>;
@@ -572,6 +570,8 @@ declare const ExportManifestV2Schema: z.ZodObject<{
572
570
  forkRoot: string;
573
571
  } | null | undefined;
574
572
  };
573
+ schemaVersion: 2;
574
+ includesTranscripts: boolean;
575
575
  }>;
576
576
  type ExportManifestV2 = z.infer<typeof ExportManifestV2Schema>;
577
577
  declare const ExportBundleV2Schema: z.ZodObject<{
@@ -689,10 +689,10 @@ declare const ExportBundleV2Schema: z.ZodObject<{
689
689
  identityAnchors: boolean;
690
690
  peerProfiles: boolean;
691
691
  };
692
- schemaVersion: string;
692
+ description: string;
693
693
  id: string;
694
+ schemaVersion: string;
694
695
  version: string;
695
- description: string;
696
696
  parentCapsule: string | null;
697
697
  parent: {
698
698
  version: string;
@@ -710,10 +710,10 @@ declare const ExportBundleV2Schema: z.ZodObject<{
710
710
  identityAnchors: boolean;
711
711
  peerProfiles: boolean;
712
712
  };
713
- schemaVersion: string;
713
+ description: string;
714
714
  id: string;
715
+ schemaVersion: string;
715
716
  version: string;
716
- description: string;
717
717
  parentCapsule: string | null;
718
718
  retrievalPolicy: {
719
719
  tierWeights: Record<string, number>;
@@ -726,16 +726,14 @@ declare const ExportBundleV2Schema: z.ZodObject<{
726
726
  } | null | undefined;
727
727
  }>;
728
728
  }, "strip", z.ZodTypeAny, {
729
- schemaVersion: 2;
729
+ format: "openclaw-engram-export";
730
730
  createdAt: string;
731
+ pluginVersion: string;
731
732
  files: {
732
733
  path: string;
733
734
  sha256: string;
734
735
  bytes: number;
735
736
  }[];
736
- format: "openclaw-engram-export";
737
- pluginVersion: string;
738
- includesTranscripts: boolean;
739
737
  capsule: {
740
738
  includes: {
741
739
  procedural: boolean;
@@ -743,10 +741,10 @@ declare const ExportBundleV2Schema: z.ZodObject<{
743
741
  identityAnchors: boolean;
744
742
  peerProfiles: boolean;
745
743
  };
746
- schemaVersion: string;
744
+ description: string;
747
745
  id: string;
746
+ schemaVersion: string;
748
747
  version: string;
749
- description: string;
750
748
  parentCapsule: string | null;
751
749
  parent: {
752
750
  version: string;
@@ -758,17 +756,17 @@ declare const ExportBundleV2Schema: z.ZodObject<{
758
756
  directAnswerEnabled: boolean;
759
757
  };
760
758
  };
761
- }, {
762
759
  schemaVersion: 2;
760
+ includesTranscripts: boolean;
761
+ }, {
762
+ format: "openclaw-engram-export";
763
763
  createdAt: string;
764
+ pluginVersion: string;
764
765
  files: {
765
766
  path: string;
766
767
  sha256: string;
767
768
  bytes: number;
768
769
  }[];
769
- format: "openclaw-engram-export";
770
- pluginVersion: string;
771
- includesTranscripts: boolean;
772
770
  capsule: {
773
771
  includes: {
774
772
  procedural: boolean;
@@ -776,10 +774,10 @@ declare const ExportBundleV2Schema: z.ZodObject<{
776
774
  identityAnchors: boolean;
777
775
  peerProfiles: boolean;
778
776
  };
779
- schemaVersion: string;
777
+ description: string;
780
778
  id: string;
779
+ schemaVersion: string;
781
780
  version: string;
782
- description: string;
783
781
  parentCapsule: string | null;
784
782
  retrievalPolicy: {
785
783
  tierWeights: Record<string, number>;
@@ -791,6 +789,8 @@ declare const ExportBundleV2Schema: z.ZodObject<{
791
789
  forkRoot: string;
792
790
  } | null | undefined;
793
791
  };
792
+ schemaVersion: 2;
793
+ includesTranscripts: boolean;
794
794
  }>;
795
795
  records: z.ZodArray<z.ZodObject<{
796
796
  path: z.ZodString;
@@ -804,16 +804,14 @@ declare const ExportBundleV2Schema: z.ZodObject<{
804
804
  }>, "many">;
805
805
  }, "strip", z.ZodTypeAny, {
806
806
  manifest: {
807
- schemaVersion: 2;
807
+ format: "openclaw-engram-export";
808
808
  createdAt: string;
809
+ pluginVersion: string;
809
810
  files: {
810
811
  path: string;
811
812
  sha256: string;
812
813
  bytes: number;
813
814
  }[];
814
- format: "openclaw-engram-export";
815
- pluginVersion: string;
816
- includesTranscripts: boolean;
817
815
  capsule: {
818
816
  includes: {
819
817
  procedural: boolean;
@@ -821,10 +819,10 @@ declare const ExportBundleV2Schema: z.ZodObject<{
821
819
  identityAnchors: boolean;
822
820
  peerProfiles: boolean;
823
821
  };
824
- schemaVersion: string;
822
+ description: string;
825
823
  id: string;
824
+ schemaVersion: string;
826
825
  version: string;
827
- description: string;
828
826
  parentCapsule: string | null;
829
827
  parent: {
830
828
  version: string;
@@ -836,6 +834,8 @@ declare const ExportBundleV2Schema: z.ZodObject<{
836
834
  directAnswerEnabled: boolean;
837
835
  };
838
836
  };
837
+ schemaVersion: 2;
838
+ includesTranscripts: boolean;
839
839
  };
840
840
  records: {
841
841
  content: string;
@@ -843,16 +843,14 @@ declare const ExportBundleV2Schema: z.ZodObject<{
843
843
  }[];
844
844
  }, {
845
845
  manifest: {
846
- schemaVersion: 2;
846
+ format: "openclaw-engram-export";
847
847
  createdAt: string;
848
+ pluginVersion: string;
848
849
  files: {
849
850
  path: string;
850
851
  sha256: string;
851
852
  bytes: number;
852
853
  }[];
853
- format: "openclaw-engram-export";
854
- pluginVersion: string;
855
- includesTranscripts: boolean;
856
854
  capsule: {
857
855
  includes: {
858
856
  procedural: boolean;
@@ -860,10 +858,10 @@ declare const ExportBundleV2Schema: z.ZodObject<{
860
858
  identityAnchors: boolean;
861
859
  peerProfiles: boolean;
862
860
  };
863
- schemaVersion: string;
861
+ description: string;
864
862
  id: string;
863
+ schemaVersion: string;
865
864
  version: string;
866
- description: string;
867
865
  parentCapsule: string | null;
868
866
  retrievalPolicy: {
869
867
  tierWeights: Record<string, number>;
@@ -875,6 +873,8 @@ declare const ExportBundleV2Schema: z.ZodObject<{
875
873
  forkRoot: string;
876
874
  } | null | undefined;
877
875
  };
876
+ schemaVersion: 2;
877
+ includesTranscripts: boolean;
878
878
  };
879
879
  records: {
880
880
  content: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "9.35.4",
3
+ "version": "9.35.5",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3086,7 +3086,7 @@
3086
3086
  "core"
3087
3087
  ],
3088
3088
  "peerDependencies": {
3089
- "@remnic/coding-graph": "^9.35.4"
3089
+ "@remnic/coding-graph": "^9.35.5"
3090
3090
  },
3091
3091
  "peerDependenciesMeta": {
3092
3092
  "@remnic/coding-graph": {
@@ -53,10 +53,10 @@ const TOOL_OUTPUT_SCHEMAS: Readonly<Record<string, Record<string, unknown>>> = {
53
53
  sources: T_ARRAY,
54
54
  connectorsInstalled: T_ARRAY,
55
55
  }),
56
- wearables_sync: T_ARRAY,
57
- transcript_day: T_ARRAY,
58
- transcript_search: T_ARRAY,
59
- transcript_memories: T_ARRAY,
56
+ wearables_sync: objectSchema({ summaries: T_ARRAY }),
57
+ transcript_day: objectSchema({ transcripts: T_ARRAY }),
58
+ transcript_search: objectSchema({ results: T_ARRAY }),
59
+ transcript_memories: objectSchema({ memories: T_ARRAY }),
60
60
  meetings_list: objectSchema({ enabled: T_BOOLEAN, days: T_ARRAY }),
61
61
  meetings_get: objectSchema({ enabled: T_BOOLEAN, found: T_BOOLEAN, id: T_STRING, record: T_NULLABLE_STRING }),
62
62
  meetings_build: objectSchema({
@@ -83,11 +83,12 @@ const TOOL_OUTPUT_SCHEMAS: Readonly<Record<string, Record<string, unknown>>> = {
83
83
  scopeMismatchCount: T_NUMBER,
84
84
  safeToAct: T_BOOLEAN,
85
85
  }),
86
- day_summary: {
87
- type: ["object", "null"],
88
- properties: { summary: T_STRING, bullets: T_ARRAY, next_actions: T_ARRAY, risks_or_open_loops: T_ARRAY },
89
- additionalProperties: true,
90
- },
86
+ day_summary: objectSchema({
87
+ summary: T_STRING,
88
+ bullets: T_ARRAY,
89
+ next_actions: T_ARRAY,
90
+ risks_or_open_loops: T_ARRAY,
91
+ }),
91
92
  capsule_export: objectSchema({
92
93
  archivePath: T_STRING,
93
94
  manifestPath: T_STRING,
package/src/access-mcp.ts CHANGED
@@ -2445,12 +2445,13 @@ export class EngramMcpServer {
2445
2445
  if (isReadOnlyToolName(name)) {
2446
2446
  throwMcpAbort(options?.abortSignal, "MCP request aborted before response");
2447
2447
  }
2448
+ const structuredContent = result ?? {};
2448
2449
  return {
2449
2450
  jsonrpc: "2.0",
2450
2451
  id,
2451
2452
  result: {
2452
- content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
2453
- structuredContent: result,
2453
+ content: [{ type: "text", text: JSON.stringify(structuredContent, null, 2) }],
2454
+ structuredContent,
2454
2455
  isError: false,
2455
2456
  },
2456
2457
  };
@@ -141,10 +141,10 @@ defineOperation({ name: "namespace_writable", description: "Read-only preflight:
141
141
 
142
142
  // === WEARABLES ===
143
143
  defineOperation({ name: "wearables_status", description: "Wearables status.", schema: strictSchema({ namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.wearablesStatus({ authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }) }) });
144
- defineOperation({ name: "wearables_sync", description: "Sync wearables.", schema: strictSchema({ source: S.str, date: S.str, days: S.flexNum, forceMemories: S.bool, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.wearablesSync({ source: optStr(input.source), date: optStr(input.date), days: typeof input.days === "number" ? input.days : typeof input.days === "string" && Number.isFinite(Number(input.days)) ? Number(input.days) : undefined, forceMemories: optBool(input.forceMemories), authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }) }) });
145
- defineOperation({ name: "transcript_day", description: "Transcript for a day.", schema: strictSchema({ date: S.str, source: S.str, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => { const d = defStr(input.date, ""); if (d.trim().length === 0) throw new EngramAccessInputError("transcript_day: date is required (YYYY-MM-DD)"); return { result: await ctx.service.wearablesTranscriptDay({ date: d, source: optStr(input.source), authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }) }; } });
146
- defineOperation({ name: "transcript_search", description: "Search transcripts.", schema: strictSchema({ query: S.str, source: S.str, from: S.str, to: S.str, limit: S.flexNum, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => { const q = defStr(input.query, ""); if (q.trim().length === 0) throw new EngramAccessInputError("transcript_search: query is required"); return { result: await ctx.service.wearablesTranscriptSearch({ query: q, source: optStr(input.source), from: optStr(input.from), to: optStr(input.to), limit: typeof input.limit === "number" ? input.limit : typeof input.limit === "string" && Number.isFinite(Number(input.limit)) ? Number(input.limit) : undefined, authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }) }; } });
147
- defineOperation({ name: "transcript_memories", description: "Transcript memories.", schema: strictSchema({ source: S.str, date: S.str, limit: S.flexNum, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.wearablesTranscriptMemories({ source: optStr(input.source), date: optStr(input.date), limit: typeof input.limit === "number" ? input.limit : typeof input.limit === "string" && Number.isFinite(Number(input.limit)) ? Number(input.limit) : undefined, authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }) }) });
144
+ defineOperation({ name: "wearables_sync", description: "Sync wearables.", schema: strictSchema({ source: S.str, date: S.str, days: S.flexNum, forceMemories: S.bool, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => { const summaries = await ctx.service.wearablesSync({ source: optStr(input.source), date: optStr(input.date), days: typeof input.days === "number" ? input.days : typeof input.days === "string" && Number.isFinite(Number(input.days)) ? Number(input.days) : undefined, forceMemories: optBool(input.forceMemories), authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }); return { result: { summaries } }; } });
145
+ defineOperation({ name: "transcript_day", description: "Transcript for a day.", schema: strictSchema({ date: S.str, source: S.str, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => { const d = defStr(input.date, ""); if (d.trim().length === 0) throw new EngramAccessInputError("transcript_day: date is required (YYYY-MM-DD)"); const transcripts = await ctx.service.wearablesTranscriptDay({ date: d, source: optStr(input.source), authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }); return { result: { transcripts } }; } });
146
+ defineOperation({ name: "transcript_search", description: "Search transcripts.", schema: strictSchema({ query: S.str, source: S.str, from: S.str, to: S.str, limit: S.flexNum, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => { const q = defStr(input.query, ""); if (q.trim().length === 0) throw new EngramAccessInputError("transcript_search: query is required"); const results = await ctx.service.wearablesTranscriptSearch({ query: q, source: optStr(input.source), from: optStr(input.from), to: optStr(input.to), limit: typeof input.limit === "number" ? input.limit : typeof input.limit === "string" && Number.isFinite(Number(input.limit)) ? Number(input.limit) : undefined, authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }); return { result: { results } }; } });
147
+ defineOperation({ name: "transcript_memories", description: "Transcript memories.", schema: strictSchema({ source: S.str, date: S.str, limit: S.flexNum, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => { const memories = await ctx.service.wearablesTranscriptMemories({ source: optStr(input.source), date: optStr(input.date), limit: typeof input.limit === "number" ? input.limit : typeof input.limit === "string" && Number.isFinite(Number(input.limit)) ? Number(input.limit) : undefined, authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }); return { result: { memories } }; } });
148
148
 
149
149
  // === MEETINGS (issue #1900) ===
150
150
  defineOperation({ name: "meetings_list", description: "List stored meeting records (all days, or one day).", schema: strictSchema({ date: S.str, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => { const d = optStr(input.date); return { result: await ctx.service.meetingsList(d && d.length > 0 ? d : undefined, { authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }) }; } });
@@ -170,7 +170,7 @@ defineOperation({ name: "chatgpt_memory_inspector", description: "Memory inspect
170
170
  return { result: buildChatGptMemoryInspectorResult(ii, r, x, ac) };
171
171
  },
172
172
  });
173
- defineOperation({ name: "day_summary", description: "Day summary.", schema: strictSchema({ memories: S.str, sessionKey: S.str, namespace: S.str, timeZone: S.str, cwd: S.str, projectTag: S.str }), handler: async (input, ctx) => { const req: Record<string, unknown> = {}; if (input.memories !== undefined) req.memories = optStr(input.memories); if (input.sessionKey !== undefined) req.sessionKey = optStr(input.sessionKey); if (input.namespace !== undefined) req.namespace = optStr(input.namespace); if (input.timeZone !== undefined) req.timeZone = optStr(input.timeZone); return { result: await ctx.service.daySummary(req) }; } });
173
+ defineOperation({ name: "day_summary", description: "Day summary.", schema: strictSchema({ memories: S.str, sessionKey: S.str, namespace: S.str, timeZone: S.str, cwd: S.str, projectTag: S.str }), handler: async (input, ctx) => { const req: Record<string, unknown> = {}; if (input.memories !== undefined) req.memories = optStr(input.memories); if (input.sessionKey !== undefined) req.sessionKey = optStr(input.sessionKey); if (input.namespace !== undefined) req.namespace = optStr(input.namespace); if (input.timeZone !== undefined) req.timeZone = optStr(input.timeZone); const summary = await ctx.service.daySummary(req); return { result: summary ?? {} }; } });
174
174
  defineOperation({ name: "capsule_export", description: "Export capsule.", schema: strictSchema({ name: S.str, namespace: S.str, since: S.str, includeKinds: S.strArr, peerIds: S.strArr, includeTranscripts: S.bool, encrypt: S.bool, cwd: S.str, projectTag: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.capsuleExport({ name: optStr(input.name) ?? "", namespace: optStr(input.namespace), since: optStr(input.since), includeKinds: optStrArr(input.includeKinds), peerIds: optStrArr(input.peerIds), includeTranscripts: optBool(input.includeTranscripts as unknown), encrypt: optBool(input.encrypt as unknown), principal: ctx.authenticatedPrincipal } as unknown as Parameters<EngramAccessService["capsuleExport"]>[0]) }) });
175
175
  defineOperation({ name: "capsule_import", description: "Import capsule.", schema: strictSchema({ archivePath: S.str, namespace: S.str, mode: S.str, passphrase: S.str, cwd: S.str, projectTag: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.capsuleImport({ archivePath: expandTildePath(optStr(input.archivePath) ?? ""), namespace: optStr(input.namespace), mode: optStr(input.mode) as "skip" | "overwrite" | "fork" | undefined, passphrase: optStr(input.passphrase), principal: ctx.authenticatedPrincipal }) }) });
176
176
  defineOperation({ name: "capsule_list", description: "List capsules.", schema: strictSchema({ namespace: S.str, sessionKey: S.str, cwd: S.str, projectTag: S.str }), handler: async (input, ctx) => {