@fgv/ts-agent-memory 5.1.0-50 → 5.1.0-51
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/packlets/retrieve/fragmentSemanticRetriever.js +94 -5
- package/dist/packlets/retrieve/fragmentSemanticRetriever.js.map +1 -1
- package/dist/packlets/store/fileTreeMemoryStore.js +13 -24
- package/dist/packlets/store/fileTreeMemoryStore.js.map +1 -1
- package/dist/packlets/store/memoryStore.js.map +1 -1
- package/dist/packlets/store/storeIdentity.js +62 -0
- package/dist/packlets/store/storeIdentity.js.map +1 -0
- package/dist/packlets/types/identityResolver.js +6 -0
- package/dist/packlets/types/identityResolver.js.map +1 -0
- package/dist/packlets/types/index.js +1 -0
- package/dist/packlets/types/index.js.map +1 -1
- package/dist/packlets/vector/inMemoryFragmentCosineIndex.js +42 -2
- package/dist/packlets/vector/inMemoryFragmentCosineIndex.js.map +1 -1
- package/dist/packlets/vector/vectorIndex.js.map +1 -1
- package/dist/ts-agent-memory.d.ts +192 -9
- package/lib/packlets/retrieve/fragmentSemanticRetriever.d.ts +79 -1
- package/lib/packlets/retrieve/fragmentSemanticRetriever.d.ts.map +1 -1
- package/lib/packlets/retrieve/fragmentSemanticRetriever.js +94 -5
- package/lib/packlets/retrieve/fragmentSemanticRetriever.js.map +1 -1
- package/lib/packlets/store/fileTreeMemoryStore.d.ts +4 -2
- package/lib/packlets/store/fileTreeMemoryStore.d.ts.map +1 -1
- package/lib/packlets/store/fileTreeMemoryStore.js +13 -24
- package/lib/packlets/store/fileTreeMemoryStore.js.map +1 -1
- package/lib/packlets/store/memoryStore.d.ts +2 -2
- package/lib/packlets/store/memoryStore.d.ts.map +1 -1
- package/lib/packlets/store/memoryStore.js.map +1 -1
- package/lib/packlets/store/storeIdentity.d.ts +38 -0
- package/lib/packlets/store/storeIdentity.d.ts.map +1 -0
- package/lib/packlets/store/storeIdentity.js +67 -0
- package/lib/packlets/store/storeIdentity.js.map +1 -0
- package/lib/packlets/types/identityResolver.d.ts +42 -0
- package/lib/packlets/types/identityResolver.d.ts.map +1 -0
- package/lib/packlets/types/identityResolver.js +7 -0
- package/lib/packlets/types/identityResolver.js.map +1 -0
- package/lib/packlets/types/index.d.ts +1 -0
- package/lib/packlets/types/index.d.ts.map +1 -1
- package/lib/packlets/types/index.js +1 -0
- package/lib/packlets/types/index.js.map +1 -1
- package/lib/packlets/vector/inMemoryFragmentCosineIndex.d.ts +13 -2
- package/lib/packlets/vector/inMemoryFragmentCosineIndex.d.ts.map +1 -1
- package/lib/packlets/vector/inMemoryFragmentCosineIndex.js +42 -2
- package/lib/packlets/vector/inMemoryFragmentCosineIndex.js.map +1 -1
- package/lib/packlets/vector/vectorIndex.d.ts +57 -6
- package/lib/packlets/vector/vectorIndex.d.ts.map +1 -1
- package/lib/packlets/vector/vectorIndex.js.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileTreeMemoryStore.d.ts","sourceRoot":"","sources":["../../../src/packlets/store/fileTreeMemoryStore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,OAAO,EAAE,MAAM,EAAyC,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAGL,UAAU,EACV,QAAQ,
|
|
1
|
+
{"version":3,"file":"fileTreeMemoryStore.d.ts","sourceRoot":"","sources":["../../../src/packlets/store/fileTreeMemoryStore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,OAAO,EAAE,MAAM,EAAyC,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAGL,UAAU,EACV,QAAQ,EACR,oBAAoB,EAEpB,cAAc,EAEd,aAAa,EAGb,YAAY,EACZ,IAAI,EAEJ,QAAQ,EACR,cAAc,EACd,aAAa,EAMd,MAAM,UAAU,CAAC;AAClB,OAAO,EACL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;;;OA6BG;YACW,gBAAgB;IAyB9B,uEAAuE;YACzD,oBAAoB;IAwBlC;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAuDxB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,UAAU;IAqBlB,OAAO,CAAC,UAAU;IAIlB,+CAA+C;IACxC,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU;IAI5C,4CAA4C;IACrC,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAMtC;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAqBnB;;;;;;;;OAQG;IACH,OAAO,CAAC,aAAa;IAQrB;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAwBxB,sEAAsE;IACtE,OAAO,CAAC,eAAe;IAyBvB,oEAAoE;IACpE,OAAO,CAAC,UAAU;IAmBlB;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IAwBnB;;;;;;;OAOG;IACH,OAAO,CAAC,aAAa;IAarB,kFAAkF;IAClF,OAAO,CAAC,eAAe;IAiCvB;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;CA8BxB"}
|
|
@@ -11,6 +11,7 @@ const types_1 = require("../types");
|
|
|
11
11
|
const converters_1 = require("../converters");
|
|
12
12
|
const vectorMaintenance_1 = require("./vectorMaintenance");
|
|
13
13
|
const storeCoverage_1 = require("./storeCoverage");
|
|
14
|
+
const storeIdentity_1 = require("./storeIdentity");
|
|
14
15
|
const storeReconcile_1 = require("./storeReconcile");
|
|
15
16
|
const index_1 = require("../index");
|
|
16
17
|
const scopeEncoding_1 = require("./scopeEncoding");
|
|
@@ -122,7 +123,7 @@ class FileTreeMemoryStore {
|
|
|
122
123
|
/** {@inheritDoc IMemoryStore.get} */
|
|
123
124
|
async get(kind, entityId) {
|
|
124
125
|
var _a;
|
|
125
|
-
const result = this.
|
|
126
|
+
const result = (0, storeIdentity_1.codecFor)(this._codecs, this._defaultCodec, kind).onSuccess((codec) => codec.encode(entityId).onSuccess((addr) => {
|
|
126
127
|
if (addr.isVersioned) {
|
|
127
128
|
if (!(0, types_1.isTemporalIdentityCodec)(codec)) {
|
|
128
129
|
return (0, ts_utils_1.fail)(`memory get '${entityId}': codec for versioned kind '${kind}' does not implement the temporal codec interface`);
|
|
@@ -228,6 +229,13 @@ class FileTreeMemoryStore {
|
|
|
228
229
|
resolveRecord(scope, id) {
|
|
229
230
|
return this._readRecord(scope, id);
|
|
230
231
|
}
|
|
232
|
+
_codec(kind) {
|
|
233
|
+
return (0, storeIdentity_1.codecFor)(this._codecs, this._defaultCodec, kind);
|
|
234
|
+
}
|
|
235
|
+
/** {@inheritDoc IIdentityResolver.resolveIdentity} */
|
|
236
|
+
resolveIdentity(kind, entityId) {
|
|
237
|
+
return (0, storeIdentity_1.resolveIdentity)(this._codecs, this._defaultCodec, kind, entityId);
|
|
238
|
+
}
|
|
231
239
|
/**
|
|
232
240
|
* Materialize a selected set of entries into records, dropping any that have
|
|
233
241
|
* vanished since selection.
|
|
@@ -417,7 +425,7 @@ class FileTreeMemoryStore {
|
|
|
417
425
|
}
|
|
418
426
|
/** Resolve a scope for an observation, best-effort (undefined when unresolvable). */
|
|
419
427
|
_scopeBestEffort(kind, entityId) {
|
|
420
|
-
return this.
|
|
428
|
+
return this._codec(kind)
|
|
421
429
|
.onSuccess((codec) => codec.encode(entityId))
|
|
422
430
|
.onSuccess((addr) => (0, ts_utils_1.succeed)(addr.scope))
|
|
423
431
|
.orDefault();
|
|
@@ -435,7 +443,7 @@ class FileTreeMemoryStore {
|
|
|
435
443
|
return this._registry
|
|
436
444
|
.convert(envelope.kind, body)
|
|
437
445
|
.withErrorFormat((msg) => `memory put '${envelope.id}': invalid body: ${msg}`)
|
|
438
|
-
.onSuccess(() => this.
|
|
446
|
+
.onSuccess(() => this._codec(envelope.kind))
|
|
439
447
|
.thenOnSuccess((codec) => codec.encode(envelope.entityId).thenOnSuccess((addr) => {
|
|
440
448
|
if (addr.isVersioned) {
|
|
441
449
|
if (!(0, types_1.isTemporalIdentityCodec)(codec)) {
|
|
@@ -616,7 +624,7 @@ class FileTreeMemoryStore {
|
|
|
616
624
|
.onSuccess(() => (0, ts_utils_1.succeed)(record));
|
|
617
625
|
}
|
|
618
626
|
async _deleteLocked(kind, entityId) {
|
|
619
|
-
return this.
|
|
627
|
+
return this._codec(kind).thenOnSuccess((codec) => codec.encode(entityId).thenOnSuccess((addr) => {
|
|
620
628
|
if (addr.isVersioned) {
|
|
621
629
|
if (!(0, types_1.isTemporalIdentityCodec)(codec)) {
|
|
622
630
|
return Promise.resolve((0, ts_utils_1.fail)(`memory delete '${entityId}': codec for versioned kind '${kind}' does not implement the temporal codec interface`));
|
|
@@ -1077,14 +1085,6 @@ class FileTreeMemoryStore {
|
|
|
1077
1085
|
return { envelope: Object.assign(Object.assign({}, record.envelope), { rank: undefined }), body: record.body };
|
|
1078
1086
|
}
|
|
1079
1087
|
}
|
|
1080
|
-
_codecFor(kind) {
|
|
1081
|
-
var _a;
|
|
1082
|
-
const codec = (_a = this._codecs.get(kind)) !== null && _a !== void 0 ? _a : this._defaultCodec;
|
|
1083
|
-
if (codec === undefined) {
|
|
1084
|
-
return (0, ts_utils_1.fail)(`no identity codec registered for kind '${kind}'`);
|
|
1085
|
-
}
|
|
1086
|
-
return (0, ts_utils_1.succeed)(codec);
|
|
1087
|
-
}
|
|
1088
1088
|
_policyFor(kind) {
|
|
1089
1089
|
var _a;
|
|
1090
1090
|
return (_a = this._writePolicies.get(kind)) !== null && _a !== void 0 ? _a : this._defaultPolicy;
|
|
@@ -1133,18 +1133,7 @@ class FileTreeMemoryStore {
|
|
|
1133
1133
|
* verbatim downstream (e.g. merge-into re-addressing). Cross-check it here.
|
|
1134
1134
|
*/
|
|
1135
1135
|
_verifyLoaded(scope, file, record) {
|
|
1136
|
-
|
|
1137
|
-
return (0, ts_utils_1.fail)(`memory file '${file.absolutePath}': envelope id '${record.envelope.id}' does not match filename stem '${file.baseName}'`);
|
|
1138
|
-
}
|
|
1139
|
-
return this._codecFor(record.envelope.kind)
|
|
1140
|
-
.onSuccess((codec) => codec.verifyRoundTrip(scope, file.baseName).onSuccess(() => codec.decode(scope, file.baseName)))
|
|
1141
|
-
.withErrorFormat((msg) => `memory file '${file.absolutePath}': ${msg}`)
|
|
1142
|
-
.onSuccess((decodedEntityId) => {
|
|
1143
|
-
if (decodedEntityId !== record.envelope.entityId) {
|
|
1144
|
-
return (0, ts_utils_1.fail)(`memory file '${file.absolutePath}': envelope entityId '${record.envelope.entityId}' does not match scope-derived entityId '${decodedEntityId}'`);
|
|
1145
|
-
}
|
|
1146
|
-
return (0, ts_utils_1.succeed)(record);
|
|
1147
|
-
});
|
|
1136
|
+
return (0, storeIdentity_1.verifyLoadedIdentity)(this._codec(record.envelope.kind), scope, file, record);
|
|
1148
1137
|
}
|
|
1149
1138
|
/**
|
|
1150
1139
|
* Resolve the directory for a scope, returning `undefined` when it does not
|