@remnic/core 9.3.679 → 9.3.681
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-boundary.d.ts +178 -0
- package/dist/access-boundary.js +121 -0
- package/dist/access-boundary.js.map +1 -0
- package/dist/access-cli.js +114 -100
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +1 -1
- package/dist/access-http.js +47 -45
- package/dist/access-mcp.d.ts +1 -1
- package/dist/access-mcp.js +43 -41
- package/dist/access-operations.d.ts +127 -0
- package/dist/access-operations.js +115 -0
- package/dist/access-operations.js.map +1 -0
- package/dist/access-schema.d.ts +34 -34
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-S9oGKPZc.d.ts → access-service-DvA6jyHL.d.ts} +1 -1
- package/dist/access-service.d.ts +1 -1
- package/dist/access-service.js +39 -39
- package/dist/access-surface-catalog.d.ts +125 -0
- package/dist/access-surface-catalog.js +162 -0
- package/dist/access-surface-catalog.js.map +1 -0
- package/dist/adapters/index.js +7 -7
- package/dist/adapters/registry.js +3 -3
- package/dist/auto-sync-5CJBJMPZ.js +1 -1
- package/dist/briefing.js +8 -8
- package/dist/causal-behavior.js +5 -5
- package/dist/causal-chain.js +3 -3
- package/dist/causal-consolidation.js +16 -16
- package/dist/causal-retrieval.js +3 -3
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-JBPKEARU.js → chunk-2QSZNTDO.js} +7 -7
- package/dist/{chunk-3OKWZT7F.js → chunk-3IND7N4X.js} +2 -2
- package/dist/{chunk-GYSYLGNE.js → chunk-7MOTEVAA.js} +2 -2
- package/dist/{chunk-6T4LTI2F.js → chunk-7XH7VJN4.js} +4 -4
- package/dist/{chunk-AGNBY3VG.js → chunk-APJQ6UEA.js} +4 -4
- package/dist/{chunk-LZSMQHXC.js → chunk-ARLRTZZZ.js} +5 -5
- package/dist/{chunk-Q2H5U37U.js → chunk-B2B2IHUH.js} +2 -2
- package/dist/{chunk-SECQS4G4.js → chunk-BTVX7ZXZ.js} +5 -5
- package/dist/{chunk-DGEZKYVI.js → chunk-DOCTITOP.js} +4 -4
- package/dist/{chunk-EQYP3HA6.js → chunk-EG4TCVMU.js} +2 -2
- package/dist/{chunk-SLTKP5WJ.js → chunk-EW5KFXHL.js} +4 -4
- package/dist/{chunk-K2JYO6QV.js → chunk-FDSOMA6M.js} +28 -41
- package/dist/chunk-FDSOMA6M.js.map +1 -0
- package/dist/{chunk-CTCPB57O.js → chunk-G7Z3C2X6.js} +2 -2
- package/dist/{chunk-4PPMUNV5.js → chunk-H4BDNIKQ.js} +52 -52
- package/dist/{chunk-MTJ2LFAJ.js → chunk-H6PMGMNP.js} +2 -2
- package/dist/{chunk-7AAKSHDG.js → chunk-I3HSKQT7.js} +136 -136
- package/dist/{chunk-NXBXM7Q6.js → chunk-I75DF4FZ.js} +2 -2
- package/dist/{chunk-RC3AFF6Z.js → chunk-JD4SCARD.js} +1 -1
- package/dist/{chunk-LVTTO3VC.js → chunk-KACIOX42.js} +2 -2
- package/dist/{chunk-ATRB6Q25.js → chunk-KV6CX4ON.js} +2 -2
- package/dist/{chunk-VL5JJOOY.js → chunk-L5MUA6Q7.js} +5 -5
- package/dist/{chunk-PCGCQTU6.js → chunk-M4I3TREG.js} +75 -75
- package/dist/chunk-NHFXF4ZO.js +107 -0
- package/dist/chunk-NHFXF4ZO.js.map +1 -0
- package/dist/{chunk-MNUPGYIV.js → chunk-NQMBSSWW.js} +2 -2
- package/dist/{chunk-V4ZHKCGA.js → chunk-O2WELT5C.js} +5 -5
- package/dist/{chunk-Z6SEG36L.js → chunk-OUWAQVDJ.js} +4 -4
- package/dist/{chunk-57ME5VSI.js → chunk-Q5ZU3RNY.js} +4 -4
- package/dist/{chunk-ACYX37IM.js → chunk-QUA2JPH2.js} +6 -6
- package/dist/{chunk-UNZLU2MX.js → chunk-QVWM4C24.js} +37 -32
- package/dist/chunk-QVWM4C24.js.map +1 -0
- package/dist/{chunk-2AP4QJX5.js → chunk-TOQEZ63C.js} +8 -8
- package/dist/{chunk-EUM7CZFM.js → chunk-TY5NT3T3.js} +17 -17
- package/dist/{chunk-ZCVPFDHB.js → chunk-UAODC6GJ.js} +14 -14
- package/dist/{chunk-YJ4J2JJ2.js → chunk-UJDV2NLT.js} +9 -9
- package/dist/chunk-V254FAT5.js +85 -0
- package/dist/chunk-V254FAT5.js.map +1 -0
- package/dist/{chunk-3IE22DJ2.js → chunk-WEPMT6SC.js} +10 -10
- package/dist/{chunk-EZ25VE3G.js → chunk-YNDLCWXS.js} +4 -4
- package/dist/{cli-B2Ve7R22.d.ts → cli-feUe-x3I.d.ts} +1 -1
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +74 -72
- package/dist/compounding/engine.js +9 -9
- package/dist/connectors/codex-materialize-runner.js +9 -9
- package/dist/connectors/index.js +9 -9
- package/dist/consolidation-provenance-check.js +2 -2
- package/dist/contradiction/index.js +4 -4
- package/dist/dashboard-runtime.js +2 -2
- package/dist/entity-retrieval.js +7 -7
- package/dist/extraction.js +2 -2
- package/dist/{first-start-migration-PG5HBC3K.js → first-start-migration-FF7YFGRP.js} +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +209 -207
- package/dist/index.js.map +1 -1
- package/dist/lcm/engine.js +4 -4
- package/dist/lcm/index.js +12 -12
- package/dist/maintenance/memory-governance.js +8 -8
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +7 -7
- package/dist/maintenance/rebuild-memory-projection.js +9 -9
- package/dist/mcp-memory-inspector-app.d.ts +1 -1
- package/dist/namespaces/migrate.js +17 -17
- package/dist/namespaces/search.js +8 -8
- package/dist/namespaces/storage.js +8 -8
- package/dist/operator-toolkit.js +22 -22
- package/dist/orchestrator.js +70 -70
- package/dist/resume-bundles.js +1 -1
- package/dist/schemas.d.ts +50 -50
- package/dist/search/factory.js +7 -7
- package/dist/search/index.js +11 -11
- package/dist/search/lancedb-backend.js +3 -3
- package/dist/search/meilisearch-backend.js +3 -3
- package/dist/search/orama-backend.js +3 -3
- package/dist/semantic-consolidation.js +11 -11
- package/dist/semantic-rule-promotion.js +7 -7
- package/dist/semantic-rule-verifier.js +8 -8
- package/dist/storage.js +6 -6
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +1 -1
- package/dist/transfer/import-sqlite.js +2 -2
- package/dist/transfer/types.d.ts +38 -38
- package/dist/utils/serialize-mutations.d.ts +122 -0
- package/dist/utils/serialize-mutations.js +287 -0
- package/dist/utils/serialize-mutations.js.map +1 -0
- package/dist/verified-recall.js +8 -8
- package/package.json +12 -2
- package/src/access-boundary.test.ts +212 -0
- package/src/access-boundary.ts +235 -0
- package/src/access-cli.ts +32 -15
- package/src/access-http.ts +38 -28
- package/src/access-mcp.ts +41 -35
- package/src/access-operations.ts +157 -0
- package/src/access-surface-catalog.test.ts +772 -0
- package/src/access-surface-catalog.ts +218 -0
- package/src/utils/serialize-mutations.test.ts +1047 -0
- package/src/utils/serialize-mutations.ts +679 -0
- package/dist/chunk-K2JYO6QV.js.map +0 -1
- package/dist/chunk-UNZLU2MX.js.map +0 -1
- /package/dist/{chunk-JBPKEARU.js.map → chunk-2QSZNTDO.js.map} +0 -0
- /package/dist/{chunk-3OKWZT7F.js.map → chunk-3IND7N4X.js.map} +0 -0
- /package/dist/{chunk-GYSYLGNE.js.map → chunk-7MOTEVAA.js.map} +0 -0
- /package/dist/{chunk-6T4LTI2F.js.map → chunk-7XH7VJN4.js.map} +0 -0
- /package/dist/{chunk-AGNBY3VG.js.map → chunk-APJQ6UEA.js.map} +0 -0
- /package/dist/{chunk-LZSMQHXC.js.map → chunk-ARLRTZZZ.js.map} +0 -0
- /package/dist/{chunk-Q2H5U37U.js.map → chunk-B2B2IHUH.js.map} +0 -0
- /package/dist/{chunk-SECQS4G4.js.map → chunk-BTVX7ZXZ.js.map} +0 -0
- /package/dist/{chunk-DGEZKYVI.js.map → chunk-DOCTITOP.js.map} +0 -0
- /package/dist/{chunk-EQYP3HA6.js.map → chunk-EG4TCVMU.js.map} +0 -0
- /package/dist/{chunk-SLTKP5WJ.js.map → chunk-EW5KFXHL.js.map} +0 -0
- /package/dist/{chunk-CTCPB57O.js.map → chunk-G7Z3C2X6.js.map} +0 -0
- /package/dist/{chunk-4PPMUNV5.js.map → chunk-H4BDNIKQ.js.map} +0 -0
- /package/dist/{chunk-MTJ2LFAJ.js.map → chunk-H6PMGMNP.js.map} +0 -0
- /package/dist/{chunk-7AAKSHDG.js.map → chunk-I3HSKQT7.js.map} +0 -0
- /package/dist/{chunk-NXBXM7Q6.js.map → chunk-I75DF4FZ.js.map} +0 -0
- /package/dist/{chunk-RC3AFF6Z.js.map → chunk-JD4SCARD.js.map} +0 -0
- /package/dist/{chunk-LVTTO3VC.js.map → chunk-KACIOX42.js.map} +0 -0
- /package/dist/{chunk-ATRB6Q25.js.map → chunk-KV6CX4ON.js.map} +0 -0
- /package/dist/{chunk-VL5JJOOY.js.map → chunk-L5MUA6Q7.js.map} +0 -0
- /package/dist/{chunk-PCGCQTU6.js.map → chunk-M4I3TREG.js.map} +0 -0
- /package/dist/{chunk-MNUPGYIV.js.map → chunk-NQMBSSWW.js.map} +0 -0
- /package/dist/{chunk-V4ZHKCGA.js.map → chunk-O2WELT5C.js.map} +0 -0
- /package/dist/{chunk-Z6SEG36L.js.map → chunk-OUWAQVDJ.js.map} +0 -0
- /package/dist/{chunk-57ME5VSI.js.map → chunk-Q5ZU3RNY.js.map} +0 -0
- /package/dist/{chunk-ACYX37IM.js.map → chunk-QUA2JPH2.js.map} +0 -0
- /package/dist/{chunk-2AP4QJX5.js.map → chunk-TOQEZ63C.js.map} +0 -0
- /package/dist/{chunk-EUM7CZFM.js.map → chunk-TY5NT3T3.js.map} +0 -0
- /package/dist/{chunk-ZCVPFDHB.js.map → chunk-UAODC6GJ.js.map} +0 -0
- /package/dist/{chunk-YJ4J2JJ2.js.map → chunk-UJDV2NLT.js.map} +0 -0
- /package/dist/{chunk-3IE22DJ2.js.map → chunk-WEPMT6SC.js.map} +0 -0
- /package/dist/{chunk-EZ25VE3G.js.map → chunk-YNDLCWXS.js.map} +0 -0
- /package/dist/{first-start-migration-PG5HBC3K.js.map → first-start-migration-FF7YFGRP.js.map} +0 -0
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compareVerifiedSemanticRuleResults,
|
|
3
3
|
searchVerifiedSemanticRules
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-KACIOX42.js";
|
|
5
|
+
import "./chunk-TY5NT3T3.js";
|
|
6
6
|
import "./chunk-M7XQSUBB.js";
|
|
7
7
|
import "./chunk-5UZXUTVO.js";
|
|
8
8
|
import "./chunk-5GPPACXK.js";
|
|
9
9
|
import "./chunk-J6A3CX5N.js";
|
|
10
10
|
import "./chunk-FMSDA2D3.js";
|
|
11
|
+
import "./chunk-MB5RSUW6.js";
|
|
12
|
+
import "./chunk-6KYMPV2O.js";
|
|
11
13
|
import "./chunk-AWJ2FHCF.js";
|
|
12
14
|
import "./chunk-42JKGUFJ.js";
|
|
13
15
|
import "./chunk-RULE4VG5.js";
|
|
14
16
|
import "./chunk-SCU65EZI.js";
|
|
15
|
-
import "./chunk-MB5RSUW6.js";
|
|
16
|
-
import "./chunk-6KYMPV2O.js";
|
|
17
17
|
import "./chunk-DM2T26WE.js";
|
|
18
18
|
import "./chunk-LDXUBPMO.js";
|
|
19
19
|
import "./chunk-FVQJYWH7.js";
|
|
20
|
-
import "./chunk-VF4XKTX3.js";
|
|
21
20
|
import "./chunk-G7D6GZ5J.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-ZBJMUXZH.js";
|
|
24
|
-
import "./chunk-2ODBA7MQ.js";
|
|
21
|
+
import "./chunk-VF4XKTX3.js";
|
|
25
22
|
import "./chunk-J2HSAU72.js";
|
|
26
23
|
import "./chunk-A6XUJE5D.js";
|
|
27
24
|
import "./chunk-P7FMDTKL.js";
|
|
28
25
|
import "./chunk-VS2IYZRU.js";
|
|
26
|
+
import "./chunk-4DJQYKMN.js";
|
|
27
|
+
import "./chunk-2ODBA7MQ.js";
|
|
28
|
+
import "./chunk-ZBJMUXZH.js";
|
|
29
29
|
import "./chunk-PZ5AY32C.js";
|
|
30
30
|
export {
|
|
31
31
|
compareVerifiedSemanticRuleResults,
|
package/dist/storage.js
CHANGED
|
@@ -9,29 +9,29 @@ import {
|
|
|
9
9
|
parseEntityFile,
|
|
10
10
|
serializeEntityFile,
|
|
11
11
|
stripAttributesSuffix
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TY5NT3T3.js";
|
|
13
13
|
import "./chunk-M7XQSUBB.js";
|
|
14
14
|
import "./chunk-5UZXUTVO.js";
|
|
15
15
|
import "./chunk-5GPPACXK.js";
|
|
16
16
|
import "./chunk-J6A3CX5N.js";
|
|
17
17
|
import "./chunk-FMSDA2D3.js";
|
|
18
|
+
import "./chunk-MB5RSUW6.js";
|
|
19
|
+
import "./chunk-6KYMPV2O.js";
|
|
18
20
|
import "./chunk-AWJ2FHCF.js";
|
|
19
21
|
import "./chunk-42JKGUFJ.js";
|
|
20
22
|
import "./chunk-RULE4VG5.js";
|
|
21
23
|
import "./chunk-SCU65EZI.js";
|
|
22
|
-
import "./chunk-MB5RSUW6.js";
|
|
23
|
-
import "./chunk-6KYMPV2O.js";
|
|
24
24
|
import "./chunk-DM2T26WE.js";
|
|
25
25
|
import "./chunk-LDXUBPMO.js";
|
|
26
26
|
import "./chunk-FVQJYWH7.js";
|
|
27
|
-
import "./chunk-VF4XKTX3.js";
|
|
28
27
|
import "./chunk-G7D6GZ5J.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-2ODBA7MQ.js";
|
|
28
|
+
import "./chunk-VF4XKTX3.js";
|
|
31
29
|
import "./chunk-J2HSAU72.js";
|
|
32
30
|
import "./chunk-A6XUJE5D.js";
|
|
33
31
|
import "./chunk-P7FMDTKL.js";
|
|
34
32
|
import "./chunk-VS2IYZRU.js";
|
|
33
|
+
import "./chunk-4DJQYKMN.js";
|
|
34
|
+
import "./chunk-2ODBA7MQ.js";
|
|
35
35
|
import "./chunk-PZ5AY32C.js";
|
|
36
36
|
export {
|
|
37
37
|
ContentHashIndex,
|
package/dist/transfer/backup.js
CHANGED
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
import "../chunk-765K3SAT.js";
|
|
5
5
|
import "../chunk-X7Y7WX73.js";
|
|
6
6
|
import "../chunk-J4EB7DNW.js";
|
|
7
|
-
import "../chunk-UI3NYK34.js";
|
|
8
|
-
import "../chunk-GCGJW34D.js";
|
|
9
7
|
import "../chunk-BJMBJZ2Y.js";
|
|
10
8
|
import "../chunk-UKJAGEXH.js";
|
|
11
9
|
import "../chunk-FP2373TW.js";
|
|
10
|
+
import "../chunk-UI3NYK34.js";
|
|
11
|
+
import "../chunk-GCGJW34D.js";
|
|
12
12
|
import "../chunk-A6XUJE5D.js";
|
|
13
13
|
import "../chunk-PZ5AY32C.js";
|
|
14
14
|
export {
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
import "../chunk-WEHSQBFR.js";
|
|
6
6
|
import "../chunk-X7Y7WX73.js";
|
|
7
7
|
import "../chunk-J4EB7DNW.js";
|
|
8
|
-
import "../chunk-UI3NYK34.js";
|
|
9
|
-
import "../chunk-GCGJW34D.js";
|
|
10
8
|
import "../chunk-BJMBJZ2Y.js";
|
|
11
9
|
import "../chunk-UKJAGEXH.js";
|
|
12
10
|
import "../chunk-FP2373TW.js";
|
|
11
|
+
import "../chunk-UI3NYK34.js";
|
|
12
|
+
import "../chunk-GCGJW34D.js";
|
|
13
13
|
import "../chunk-A6XUJE5D.js";
|
|
14
14
|
import "../chunk-PZ5AY32C.js";
|
|
15
15
|
export {
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
import "../chunk-VF4XKTX3.js";
|
|
5
5
|
import "../chunk-WEHSQBFR.js";
|
|
6
6
|
import "../chunk-X7Y7WX73.js";
|
|
7
|
-
import "../chunk-GCGJW34D.js";
|
|
8
7
|
import "../chunk-BJMBJZ2Y.js";
|
|
9
8
|
import "../chunk-UKJAGEXH.js";
|
|
10
9
|
import "../chunk-FP2373TW.js";
|
|
10
|
+
import "../chunk-GCGJW34D.js";
|
|
11
11
|
import "../chunk-A6XUJE5D.js";
|
|
12
12
|
import "../chunk-VS2IYZRU.js";
|
|
13
13
|
import "../chunk-PZ5AY32C.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
importSqlite
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-Z734BLO3.js";
|
|
3
|
+
} from "../chunk-APJQ6UEA.js";
|
|
5
4
|
import "../chunk-G4IAEX6D.js";
|
|
5
|
+
import "../chunk-Z734BLO3.js";
|
|
6
6
|
import "../chunk-6KYMPV2O.js";
|
|
7
7
|
import "../chunk-GCGJW34D.js";
|
|
8
8
|
import "../chunk-PZ5AY32C.js";
|
package/dist/transfer/types.d.ts
CHANGED
|
@@ -11,20 +11,20 @@ declare const ExportManifestV1Schema: z.ZodObject<{
|
|
|
11
11
|
sha256: z.ZodString;
|
|
12
12
|
bytes: z.ZodNumber;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
path: string;
|
|
15
14
|
sha256: string;
|
|
15
|
+
path: string;
|
|
16
16
|
bytes: number;
|
|
17
17
|
}, {
|
|
18
|
-
path: string;
|
|
19
18
|
sha256: string;
|
|
19
|
+
path: string;
|
|
20
20
|
bytes: number;
|
|
21
21
|
}>, "many">;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
schemaVersion: 1;
|
|
24
24
|
createdAt: string;
|
|
25
25
|
files: {
|
|
26
|
-
path: string;
|
|
27
26
|
sha256: string;
|
|
27
|
+
path: string;
|
|
28
28
|
bytes: number;
|
|
29
29
|
}[];
|
|
30
30
|
format: "openclaw-engram-export";
|
|
@@ -34,8 +34,8 @@ declare const ExportManifestV1Schema: z.ZodObject<{
|
|
|
34
34
|
schemaVersion: 1;
|
|
35
35
|
createdAt: string;
|
|
36
36
|
files: {
|
|
37
|
-
path: string;
|
|
38
37
|
sha256: string;
|
|
38
|
+
path: string;
|
|
39
39
|
bytes: number;
|
|
40
40
|
}[];
|
|
41
41
|
format: "openclaw-engram-export";
|
|
@@ -66,20 +66,20 @@ declare const ExportBundleV1Schema: z.ZodObject<{
|
|
|
66
66
|
sha256: z.ZodString;
|
|
67
67
|
bytes: z.ZodNumber;
|
|
68
68
|
}, "strip", z.ZodTypeAny, {
|
|
69
|
-
path: string;
|
|
70
69
|
sha256: string;
|
|
70
|
+
path: string;
|
|
71
71
|
bytes: number;
|
|
72
72
|
}, {
|
|
73
|
-
path: string;
|
|
74
73
|
sha256: string;
|
|
74
|
+
path: string;
|
|
75
75
|
bytes: number;
|
|
76
76
|
}>, "many">;
|
|
77
77
|
}, "strip", z.ZodTypeAny, {
|
|
78
78
|
schemaVersion: 1;
|
|
79
79
|
createdAt: string;
|
|
80
80
|
files: {
|
|
81
|
-
path: string;
|
|
82
81
|
sha256: string;
|
|
82
|
+
path: string;
|
|
83
83
|
bytes: number;
|
|
84
84
|
}[];
|
|
85
85
|
format: "openclaw-engram-export";
|
|
@@ -89,8 +89,8 @@ declare const ExportBundleV1Schema: z.ZodObject<{
|
|
|
89
89
|
schemaVersion: 1;
|
|
90
90
|
createdAt: string;
|
|
91
91
|
files: {
|
|
92
|
-
path: string;
|
|
93
92
|
sha256: string;
|
|
93
|
+
path: string;
|
|
94
94
|
bytes: number;
|
|
95
95
|
}[];
|
|
96
96
|
format: "openclaw-engram-export";
|
|
@@ -112,8 +112,8 @@ declare const ExportBundleV1Schema: z.ZodObject<{
|
|
|
112
112
|
schemaVersion: 1;
|
|
113
113
|
createdAt: string;
|
|
114
114
|
files: {
|
|
115
|
-
path: string;
|
|
116
115
|
sha256: string;
|
|
116
|
+
path: string;
|
|
117
117
|
bytes: number;
|
|
118
118
|
}[];
|
|
119
119
|
format: "openclaw-engram-export";
|
|
@@ -129,8 +129,8 @@ declare const ExportBundleV1Schema: z.ZodObject<{
|
|
|
129
129
|
schemaVersion: 1;
|
|
130
130
|
createdAt: string;
|
|
131
131
|
files: {
|
|
132
|
-
path: string;
|
|
133
132
|
sha256: string;
|
|
133
|
+
path: string;
|
|
134
134
|
bytes: number;
|
|
135
135
|
}[];
|
|
136
136
|
format: "openclaw-engram-export";
|
|
@@ -313,34 +313,34 @@ declare const CapsuleBlockSchema: z.ZodObject<{
|
|
|
313
313
|
peerProfiles: boolean;
|
|
314
314
|
}>;
|
|
315
315
|
}, "strip", z.ZodTypeAny, {
|
|
316
|
-
schemaVersion: string;
|
|
317
316
|
includes: {
|
|
318
317
|
procedural: boolean;
|
|
319
318
|
taxonomy: boolean;
|
|
320
319
|
identityAnchors: boolean;
|
|
321
320
|
peerProfiles: boolean;
|
|
322
321
|
};
|
|
322
|
+
schemaVersion: string;
|
|
323
323
|
id: string;
|
|
324
324
|
description: string;
|
|
325
325
|
version: string;
|
|
326
|
+
parentCapsule: string | null;
|
|
326
327
|
parent: {
|
|
327
328
|
version: string;
|
|
328
329
|
capsuleId: string;
|
|
329
330
|
forkRoot: string;
|
|
330
331
|
} | null;
|
|
331
|
-
parentCapsule: string | null;
|
|
332
332
|
retrievalPolicy: {
|
|
333
333
|
tierWeights: Record<string, number>;
|
|
334
334
|
directAnswerEnabled: boolean;
|
|
335
335
|
};
|
|
336
336
|
}, {
|
|
337
|
-
schemaVersion: string;
|
|
338
337
|
includes: {
|
|
339
338
|
procedural: boolean;
|
|
340
339
|
taxonomy: boolean;
|
|
341
340
|
identityAnchors: boolean;
|
|
342
341
|
peerProfiles: boolean;
|
|
343
342
|
};
|
|
343
|
+
schemaVersion: string;
|
|
344
344
|
id: string;
|
|
345
345
|
description: string;
|
|
346
346
|
version: string;
|
|
@@ -367,12 +367,12 @@ declare const ExportManifestV2Schema: z.ZodObject<{
|
|
|
367
367
|
sha256: z.ZodString;
|
|
368
368
|
bytes: z.ZodNumber;
|
|
369
369
|
}, "strip", z.ZodTypeAny, {
|
|
370
|
-
path: string;
|
|
371
370
|
sha256: string;
|
|
371
|
+
path: string;
|
|
372
372
|
bytes: number;
|
|
373
373
|
}, {
|
|
374
|
-
path: string;
|
|
375
374
|
sha256: string;
|
|
375
|
+
path: string;
|
|
376
376
|
bytes: number;
|
|
377
377
|
}>, "many">;
|
|
378
378
|
capsule: z.ZodObject<{
|
|
@@ -464,34 +464,34 @@ declare const ExportManifestV2Schema: z.ZodObject<{
|
|
|
464
464
|
peerProfiles: boolean;
|
|
465
465
|
}>;
|
|
466
466
|
}, "strip", z.ZodTypeAny, {
|
|
467
|
-
schemaVersion: string;
|
|
468
467
|
includes: {
|
|
469
468
|
procedural: boolean;
|
|
470
469
|
taxonomy: boolean;
|
|
471
470
|
identityAnchors: boolean;
|
|
472
471
|
peerProfiles: boolean;
|
|
473
472
|
};
|
|
473
|
+
schemaVersion: string;
|
|
474
474
|
id: string;
|
|
475
475
|
description: string;
|
|
476
476
|
version: string;
|
|
477
|
+
parentCapsule: string | null;
|
|
477
478
|
parent: {
|
|
478
479
|
version: string;
|
|
479
480
|
capsuleId: string;
|
|
480
481
|
forkRoot: string;
|
|
481
482
|
} | null;
|
|
482
|
-
parentCapsule: string | null;
|
|
483
483
|
retrievalPolicy: {
|
|
484
484
|
tierWeights: Record<string, number>;
|
|
485
485
|
directAnswerEnabled: boolean;
|
|
486
486
|
};
|
|
487
487
|
}, {
|
|
488
|
-
schemaVersion: string;
|
|
489
488
|
includes: {
|
|
490
489
|
procedural: boolean;
|
|
491
490
|
taxonomy: boolean;
|
|
492
491
|
identityAnchors: boolean;
|
|
493
492
|
peerProfiles: boolean;
|
|
494
493
|
};
|
|
494
|
+
schemaVersion: string;
|
|
495
495
|
id: string;
|
|
496
496
|
description: string;
|
|
497
497
|
version: string;
|
|
@@ -510,30 +510,30 @@ declare const ExportManifestV2Schema: z.ZodObject<{
|
|
|
510
510
|
schemaVersion: 2;
|
|
511
511
|
createdAt: string;
|
|
512
512
|
files: {
|
|
513
|
-
path: string;
|
|
514
513
|
sha256: string;
|
|
514
|
+
path: string;
|
|
515
515
|
bytes: number;
|
|
516
516
|
}[];
|
|
517
517
|
format: "openclaw-engram-export";
|
|
518
518
|
pluginVersion: string;
|
|
519
519
|
includesTranscripts: boolean;
|
|
520
520
|
capsule: {
|
|
521
|
-
schemaVersion: string;
|
|
522
521
|
includes: {
|
|
523
522
|
procedural: boolean;
|
|
524
523
|
taxonomy: boolean;
|
|
525
524
|
identityAnchors: boolean;
|
|
526
525
|
peerProfiles: boolean;
|
|
527
526
|
};
|
|
527
|
+
schemaVersion: string;
|
|
528
528
|
id: string;
|
|
529
529
|
description: string;
|
|
530
530
|
version: string;
|
|
531
|
+
parentCapsule: string | null;
|
|
531
532
|
parent: {
|
|
532
533
|
version: string;
|
|
533
534
|
capsuleId: string;
|
|
534
535
|
forkRoot: string;
|
|
535
536
|
} | null;
|
|
536
|
-
parentCapsule: string | null;
|
|
537
537
|
retrievalPolicy: {
|
|
538
538
|
tierWeights: Record<string, number>;
|
|
539
539
|
directAnswerEnabled: boolean;
|
|
@@ -543,21 +543,21 @@ declare const ExportManifestV2Schema: z.ZodObject<{
|
|
|
543
543
|
schemaVersion: 2;
|
|
544
544
|
createdAt: string;
|
|
545
545
|
files: {
|
|
546
|
-
path: string;
|
|
547
546
|
sha256: string;
|
|
547
|
+
path: string;
|
|
548
548
|
bytes: number;
|
|
549
549
|
}[];
|
|
550
550
|
format: "openclaw-engram-export";
|
|
551
551
|
pluginVersion: string;
|
|
552
552
|
includesTranscripts: boolean;
|
|
553
553
|
capsule: {
|
|
554
|
-
schemaVersion: string;
|
|
555
554
|
includes: {
|
|
556
555
|
procedural: boolean;
|
|
557
556
|
taxonomy: boolean;
|
|
558
557
|
identityAnchors: boolean;
|
|
559
558
|
peerProfiles: boolean;
|
|
560
559
|
};
|
|
560
|
+
schemaVersion: string;
|
|
561
561
|
id: string;
|
|
562
562
|
description: string;
|
|
563
563
|
version: string;
|
|
@@ -586,12 +586,12 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
586
586
|
sha256: z.ZodString;
|
|
587
587
|
bytes: z.ZodNumber;
|
|
588
588
|
}, "strip", z.ZodTypeAny, {
|
|
589
|
-
path: string;
|
|
590
589
|
sha256: string;
|
|
590
|
+
path: string;
|
|
591
591
|
bytes: number;
|
|
592
592
|
}, {
|
|
593
|
-
path: string;
|
|
594
593
|
sha256: string;
|
|
594
|
+
path: string;
|
|
595
595
|
bytes: number;
|
|
596
596
|
}>, "many">;
|
|
597
597
|
capsule: z.ZodObject<{
|
|
@@ -683,34 +683,34 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
683
683
|
peerProfiles: boolean;
|
|
684
684
|
}>;
|
|
685
685
|
}, "strip", z.ZodTypeAny, {
|
|
686
|
-
schemaVersion: string;
|
|
687
686
|
includes: {
|
|
688
687
|
procedural: boolean;
|
|
689
688
|
taxonomy: boolean;
|
|
690
689
|
identityAnchors: boolean;
|
|
691
690
|
peerProfiles: boolean;
|
|
692
691
|
};
|
|
692
|
+
schemaVersion: string;
|
|
693
693
|
id: string;
|
|
694
694
|
description: string;
|
|
695
695
|
version: string;
|
|
696
|
+
parentCapsule: string | null;
|
|
696
697
|
parent: {
|
|
697
698
|
version: string;
|
|
698
699
|
capsuleId: string;
|
|
699
700
|
forkRoot: string;
|
|
700
701
|
} | null;
|
|
701
|
-
parentCapsule: string | null;
|
|
702
702
|
retrievalPolicy: {
|
|
703
703
|
tierWeights: Record<string, number>;
|
|
704
704
|
directAnswerEnabled: boolean;
|
|
705
705
|
};
|
|
706
706
|
}, {
|
|
707
|
-
schemaVersion: string;
|
|
708
707
|
includes: {
|
|
709
708
|
procedural: boolean;
|
|
710
709
|
taxonomy: boolean;
|
|
711
710
|
identityAnchors: boolean;
|
|
712
711
|
peerProfiles: boolean;
|
|
713
712
|
};
|
|
713
|
+
schemaVersion: string;
|
|
714
714
|
id: string;
|
|
715
715
|
description: string;
|
|
716
716
|
version: string;
|
|
@@ -729,30 +729,30 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
729
729
|
schemaVersion: 2;
|
|
730
730
|
createdAt: string;
|
|
731
731
|
files: {
|
|
732
|
-
path: string;
|
|
733
732
|
sha256: string;
|
|
733
|
+
path: string;
|
|
734
734
|
bytes: number;
|
|
735
735
|
}[];
|
|
736
736
|
format: "openclaw-engram-export";
|
|
737
737
|
pluginVersion: string;
|
|
738
738
|
includesTranscripts: boolean;
|
|
739
739
|
capsule: {
|
|
740
|
-
schemaVersion: string;
|
|
741
740
|
includes: {
|
|
742
741
|
procedural: boolean;
|
|
743
742
|
taxonomy: boolean;
|
|
744
743
|
identityAnchors: boolean;
|
|
745
744
|
peerProfiles: boolean;
|
|
746
745
|
};
|
|
746
|
+
schemaVersion: string;
|
|
747
747
|
id: string;
|
|
748
748
|
description: string;
|
|
749
749
|
version: string;
|
|
750
|
+
parentCapsule: string | null;
|
|
750
751
|
parent: {
|
|
751
752
|
version: string;
|
|
752
753
|
capsuleId: string;
|
|
753
754
|
forkRoot: string;
|
|
754
755
|
} | null;
|
|
755
|
-
parentCapsule: string | null;
|
|
756
756
|
retrievalPolicy: {
|
|
757
757
|
tierWeights: Record<string, number>;
|
|
758
758
|
directAnswerEnabled: boolean;
|
|
@@ -762,21 +762,21 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
762
762
|
schemaVersion: 2;
|
|
763
763
|
createdAt: string;
|
|
764
764
|
files: {
|
|
765
|
-
path: string;
|
|
766
765
|
sha256: string;
|
|
766
|
+
path: string;
|
|
767
767
|
bytes: number;
|
|
768
768
|
}[];
|
|
769
769
|
format: "openclaw-engram-export";
|
|
770
770
|
pluginVersion: string;
|
|
771
771
|
includesTranscripts: boolean;
|
|
772
772
|
capsule: {
|
|
773
|
-
schemaVersion: string;
|
|
774
773
|
includes: {
|
|
775
774
|
procedural: boolean;
|
|
776
775
|
taxonomy: boolean;
|
|
777
776
|
identityAnchors: boolean;
|
|
778
777
|
peerProfiles: boolean;
|
|
779
778
|
};
|
|
779
|
+
schemaVersion: string;
|
|
780
780
|
id: string;
|
|
781
781
|
description: string;
|
|
782
782
|
version: string;
|
|
@@ -807,30 +807,30 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
807
807
|
schemaVersion: 2;
|
|
808
808
|
createdAt: string;
|
|
809
809
|
files: {
|
|
810
|
-
path: string;
|
|
811
810
|
sha256: string;
|
|
811
|
+
path: string;
|
|
812
812
|
bytes: number;
|
|
813
813
|
}[];
|
|
814
814
|
format: "openclaw-engram-export";
|
|
815
815
|
pluginVersion: string;
|
|
816
816
|
includesTranscripts: boolean;
|
|
817
817
|
capsule: {
|
|
818
|
-
schemaVersion: string;
|
|
819
818
|
includes: {
|
|
820
819
|
procedural: boolean;
|
|
821
820
|
taxonomy: boolean;
|
|
822
821
|
identityAnchors: boolean;
|
|
823
822
|
peerProfiles: boolean;
|
|
824
823
|
};
|
|
824
|
+
schemaVersion: string;
|
|
825
825
|
id: string;
|
|
826
826
|
description: string;
|
|
827
827
|
version: string;
|
|
828
|
+
parentCapsule: string | null;
|
|
828
829
|
parent: {
|
|
829
830
|
version: string;
|
|
830
831
|
capsuleId: string;
|
|
831
832
|
forkRoot: string;
|
|
832
833
|
} | null;
|
|
833
|
-
parentCapsule: string | null;
|
|
834
834
|
retrievalPolicy: {
|
|
835
835
|
tierWeights: Record<string, number>;
|
|
836
836
|
directAnswerEnabled: boolean;
|
|
@@ -846,21 +846,21 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
846
846
|
schemaVersion: 2;
|
|
847
847
|
createdAt: string;
|
|
848
848
|
files: {
|
|
849
|
-
path: string;
|
|
850
849
|
sha256: string;
|
|
850
|
+
path: string;
|
|
851
851
|
bytes: number;
|
|
852
852
|
}[];
|
|
853
853
|
format: "openclaw-engram-export";
|
|
854
854
|
pluginVersion: string;
|
|
855
855
|
includesTranscripts: boolean;
|
|
856
856
|
capsule: {
|
|
857
|
-
schemaVersion: string;
|
|
858
857
|
includes: {
|
|
859
858
|
procedural: boolean;
|
|
860
859
|
taxonomy: boolean;
|
|
861
860
|
identityAnchors: boolean;
|
|
862
861
|
peerProfiles: boolean;
|
|
863
862
|
};
|
|
863
|
+
schemaVersion: string;
|
|
864
864
|
id: string;
|
|
865
865
|
description: string;
|
|
866
866
|
version: string;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Instance-scoped keyed serializer. Holds the per-key chain map so that all
|
|
3
|
+
* tasks queued under the same key on the SAME serializer run strictly in order.
|
|
4
|
+
*
|
|
5
|
+
* The map is instance-scoped (not module-level) so tests can construct a fresh
|
|
6
|
+
* serializer per case and avoid cross-test contamination, and so adopters that
|
|
7
|
+
* want isolation (e.g. one serializer per storage root) can have it. The free
|
|
8
|
+
* {@link serializeMutations} export delegates to a single shared default
|
|
9
|
+
* instance for callers that want process-wide serialization.
|
|
10
|
+
*/
|
|
11
|
+
declare class MutationSerializer {
|
|
12
|
+
private readonly chains;
|
|
13
|
+
/**
|
|
14
|
+
* Run `task` strictly after every other task already queued under `key` on
|
|
15
|
+
* this serializer has settled.
|
|
16
|
+
*
|
|
17
|
+
* Rejection recovery (rule #40, mirroring the catalog's `queueCritical`):
|
|
18
|
+
* if a prior task rejects, later tasks STILL RUN, while the rejecting task's
|
|
19
|
+
* error is surfaced to ITS OWN caller. Concretely, the recovered tail is
|
|
20
|
+
* `run.then(noop, noop)` — never a bare `.then(fn)`, which would let one
|
|
21
|
+
* failure kill every queued task behind it.
|
|
22
|
+
*
|
|
23
|
+
* No unbounded growth: when a chain's last task settles and no newer task
|
|
24
|
+
* chained onto it, its entry is deleted (the storage router's
|
|
25
|
+
* `inFlightResolved` marker-then-clear discipline).
|
|
26
|
+
*/
|
|
27
|
+
serialize<T>(key: string, task: () => Promise<T>): Promise<T>;
|
|
28
|
+
/**
|
|
29
|
+
* Test-only: the number of keys with a not-yet-cleaned chain. Used to assert
|
|
30
|
+
* the no-unbounded-growth invariant. Not part of the public contract.
|
|
31
|
+
*/
|
|
32
|
+
pendingKeysForTest(): number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Free-function entry point (issue #1524 signature). Serializes `task` against
|
|
36
|
+
* every other task queued under `key` across the whole process, via a shared
|
|
37
|
+
* default {@link MutationSerializer}. For isolated/testable serialization,
|
|
38
|
+
* construct a `MutationSerializer` directly.
|
|
39
|
+
*/
|
|
40
|
+
declare function serializeMutations<T>(key: string, task: () => Promise<T>): Promise<T>;
|
|
41
|
+
/** Options for {@link withHeldFileLock}. */
|
|
42
|
+
interface HeldFileLockOptions {
|
|
43
|
+
/**
|
|
44
|
+
* A lock whose mtime is older than this (in ms) is treated as a crashed
|
|
45
|
+
* holder and broken. Required — there is no safe default, since the right
|
|
46
|
+
* value depends on how long the guarded critical section can legitimately
|
|
47
|
+
* run.
|
|
48
|
+
*/
|
|
49
|
+
readonly staleMs: number;
|
|
50
|
+
/**
|
|
51
|
+
* Bounded acquisition: give up trying to acquire a busy lock after this long
|
|
52
|
+
* (ms) and invoke `task(false)` best-effort WITHOUT holding the lock, rather
|
|
53
|
+
* than blocking forever or crashing the primary op. Default 5000ms (matches
|
|
54
|
+
* the namespace catalog's `REBUILD_LOCK_MAX_WAIT_MS`).
|
|
55
|
+
*/
|
|
56
|
+
readonly maxWaitMs?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Poll interval (ms) while waiting for a busy lock to clear. Default 50ms.
|
|
59
|
+
*/
|
|
60
|
+
readonly pollMs?: number;
|
|
61
|
+
/**
|
|
62
|
+
* While WE hold the lock, refresh its mtime on this cadence (ms) so a
|
|
63
|
+
* legitimately long task is not mistaken for a crashed holder and broken out
|
|
64
|
+
* from under. Default `floor(staleMs / 3)` (at least 100ms), mirroring the
|
|
65
|
+
* catalog heartbeat ratio. Must be comfortably below `staleMs`.
|
|
66
|
+
*/
|
|
67
|
+
readonly heartbeatMs?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Test seam (NG7Bg, #1506 round 28): fires AFTER a lock is judged stale and
|
|
70
|
+
* BEFORE the re-verify + unlink, simulating a replacement lock being created
|
|
71
|
+
* in the race window. No-op in production.
|
|
72
|
+
*/
|
|
73
|
+
readonly onBeforeBreakStaleUnlinkForTest?: () => Promise<void> | void;
|
|
74
|
+
/**
|
|
75
|
+
* Test seam (codex P2): fires AFTER the release rename moves the lock to a
|
|
76
|
+
* trash path and BEFORE the ownership re-verify/restore — simulating a third
|
|
77
|
+
* contender acquiring the (now-empty) lockPath in the race window. No-op in
|
|
78
|
+
* production. Used to prove the pre-check prevents the rename entirely.
|
|
79
|
+
*/
|
|
80
|
+
readonly onAfterReleaseRenameForTest?: () => Promise<void> | void;
|
|
81
|
+
/**
|
|
82
|
+
* Best-effort hook for non-fatal lock warnings (heartbeat refresh failure,
|
|
83
|
+
* release-time ownership check failure). Never throws into the caller. If
|
|
84
|
+
* omitted, warnings are swallowed (the lock is advisory; release/heartbeat
|
|
85
|
+
* failures must never crash the guarded op).
|
|
86
|
+
*/
|
|
87
|
+
readonly onLockWarning?: (message: string, err: unknown) => void;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Run `task` under an exclusive on-disk lock at `lockPath`.
|
|
91
|
+
*
|
|
92
|
+
* Cross-process mutex via `open(lockPath, "wx")` (atomic exclusive create).
|
|
93
|
+
* While held, a heartbeat timer refreshes the lock's mtime so a legitimately
|
|
94
|
+
* long task is not mistaken for a crashed holder and broken out from under. A
|
|
95
|
+
* lock older than `opts.staleMs` is treated as stale and broken — but
|
|
96
|
+
* REPLACEMENT-SAFE (NG7Bg): we capture the stale lock's identity (full content
|
|
97
|
+
* line: `<pid> <owner-uuid> <iso>`) when judging it stale, then RE-READ and
|
|
98
|
+
* RE-STAT immediately before `unlink`, deleting only if byte-identical AND
|
|
99
|
+
* still stale. A replacement lock created in the window has a different owner
|
|
100
|
+
* id / timestamp, so its content differs and is left untouched.
|
|
101
|
+
*
|
|
102
|
+
* `task` receives `acquired: boolean` — `true` when we hold the lock, `false`
|
|
103
|
+
* when acquisition timed out (best-effort). The signature takes
|
|
104
|
+
* `(acquired) => Promise<T>` rather than the issue's sketched `() => Promise<T>`
|
|
105
|
+
* so this can be the SINGLE lock home (issue: "do NOT leave two lock
|
|
106
|
+
* implementations; pick one home"): the catalog's touch path needs to DROP on
|
|
107
|
+
* timeout, which requires knowing whether the lock was acquired. A caller that
|
|
108
|
+
* ignores the flag is still assignable (`() => Promise<T>` ⊆
|
|
109
|
+
* `(acquired: boolean) => Promise<T>` in TypeScript).
|
|
110
|
+
*
|
|
111
|
+
* Release is ownership-checked: we only `unlink` a lock whose content still
|
|
112
|
+
* identifies THIS acquirer (same owner id), so a replacement created after we
|
|
113
|
+
* stopped heartbeating is never destroyed — mirroring the catalog's
|
|
114
|
+
* `rebuildLockHeldBySelf`.
|
|
115
|
+
*
|
|
116
|
+
* ADOPTION NOTE: lock only the brief final read-merge-write window, never a
|
|
117
|
+
* long scan — a scan-length lock makes concurrent writers time out and
|
|
118
|
+
* silently drop work (catalog round 5, codex/cursor P2).
|
|
119
|
+
*/
|
|
120
|
+
declare function withHeldFileLock<T>(lockPath: string, opts: HeldFileLockOptions, task: (acquired: boolean) => Promise<T>): Promise<T>;
|
|
121
|
+
|
|
122
|
+
export { type HeldFileLockOptions, MutationSerializer, serializeMutations, withHeldFileLock };
|