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