kernl 0.6.2 → 0.7.0
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/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-check-types.log +1 -1
- package/CHANGELOG.md +44 -0
- package/dist/agent/__tests__/concurrency.test.js +1 -1
- package/dist/agent/__tests__/run.test.js +1 -1
- package/dist/agent/__tests__/systools.test.d.ts +2 -0
- package/dist/agent/__tests__/systools.test.d.ts.map +1 -0
- package/dist/agent/__tests__/systools.test.js +121 -0
- package/dist/{types/agent.d.ts → agent/types.d.ts} +19 -2
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent.d.ts +48 -6
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +100 -13
- package/dist/api/models/thread.d.ts +1 -1
- package/dist/api/resources/agents/agents.d.ts +38 -0
- package/dist/api/resources/agents/agents.d.ts.map +1 -0
- package/dist/api/resources/agents/agents.js +44 -0
- package/dist/api/resources/agents/index.d.ts +2 -0
- package/dist/api/resources/agents/index.d.ts.map +1 -0
- package/dist/api/resources/agents/index.js +1 -0
- package/dist/api/resources/threads/threads.d.ts +1 -1
- package/dist/api/resources/threads/threads.d.ts.map +1 -1
- package/dist/api/resources/threads/threads.js +1 -1
- package/dist/api/resources/threads/types.d.ts +2 -2
- package/dist/api/resources/threads/types.d.ts.map +1 -1
- package/dist/context.d.ts +10 -4
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +5 -0
- package/dist/guardrail.d.ts +2 -2
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +1 -1
- package/dist/kernl/index.d.ts +1 -1
- package/dist/kernl/index.d.ts.map +1 -1
- package/dist/kernl/index.js +0 -1
- package/dist/kernl/kernl.d.ts +11 -20
- package/dist/kernl/kernl.d.ts.map +1 -1
- package/dist/kernl/kernl.js +37 -34
- package/dist/kernl/types.d.ts +91 -0
- package/dist/kernl/types.d.ts.map +1 -0
- package/dist/lib/error.d.ts +2 -2
- package/dist/lifecycle.d.ts +2 -2
- package/dist/memory/codec.d.ts +32 -0
- package/dist/memory/codec.d.ts.map +1 -0
- package/dist/memory/codec.js +97 -0
- package/dist/memory/codecs/domain.d.ts +34 -0
- package/dist/memory/codecs/domain.d.ts.map +1 -0
- package/dist/memory/codecs/domain.js +99 -0
- package/dist/memory/codecs/identity.d.ts +12 -0
- package/dist/memory/codecs/identity.d.ts.map +1 -0
- package/dist/memory/codecs/identity.js +17 -0
- package/dist/memory/codecs/index.d.ts +31 -0
- package/dist/memory/codecs/index.d.ts.map +1 -0
- package/dist/memory/codecs/index.js +39 -0
- package/dist/memory/codecs/tpuf.d.ts +38 -0
- package/dist/memory/codecs/tpuf.d.ts.map +1 -0
- package/dist/memory/codecs/tpuf.js +90 -0
- package/dist/memory/encoder.d.ts +29 -0
- package/dist/memory/encoder.d.ts.map +1 -0
- package/dist/memory/encoder.js +45 -0
- package/dist/memory/handle.d.ts +89 -0
- package/dist/memory/handle.d.ts.map +1 -0
- package/dist/memory/handle.js +128 -0
- package/dist/memory/index.d.ts +12 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +7 -0
- package/dist/memory/indexes.d.ts +91 -0
- package/dist/memory/indexes.d.ts.map +1 -0
- package/dist/memory/indexes.js +7 -0
- package/dist/memory/memory.d.ts +55 -0
- package/dist/memory/memory.d.ts.map +1 -0
- package/dist/memory/memory.js +113 -0
- package/dist/memory/schema.d.ts +41 -0
- package/dist/memory/schema.d.ts.map +1 -0
- package/dist/memory/schema.js +112 -0
- package/dist/memory/store.d.ts +36 -0
- package/dist/memory/store.d.ts.map +1 -0
- package/dist/memory/store.js +4 -0
- package/dist/memory/types.d.ts +250 -0
- package/dist/memory/types.d.ts.map +1 -0
- package/dist/memory/types.js +4 -0
- package/dist/storage/base.d.ts +6 -1
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/in-memory.d.ts +24 -2
- package/dist/storage/in-memory.d.ts.map +1 -1
- package/dist/storage/in-memory.js +131 -0
- package/dist/storage/thread.d.ts +1 -1
- package/dist/thread/__tests__/integration.test.js +1 -1
- package/dist/thread/__tests__/mock.d.ts +1 -1
- package/dist/thread/__tests__/namespace.test.js +1 -1
- package/dist/thread/__tests__/thread.test.js +1 -1
- package/dist/thread/thread.d.ts +2 -2
- package/dist/thread/thread.d.ts.map +1 -1
- package/dist/thread/thread.js +3 -1
- package/dist/{types/thread.d.ts → thread/types.d.ts} +2 -2
- package/dist/thread/types.d.ts.map +1 -0
- package/dist/thread/utils.d.ts +2 -2
- package/dist/thread/utils.d.ts.map +1 -1
- package/dist/tool/index.d.ts +1 -0
- package/dist/tool/index.d.ts.map +1 -1
- package/dist/tool/index.js +2 -0
- package/dist/tool/sys/index.d.ts +7 -0
- package/dist/tool/sys/index.d.ts.map +1 -0
- package/dist/tool/sys/index.js +6 -0
- package/dist/tool/sys/memory.d.ts +14 -0
- package/dist/tool/sys/memory.d.ts.map +1 -0
- package/dist/tool/sys/memory.js +103 -0
- package/dist/tool/tool.d.ts +1 -1
- package/dist/tool/tool.d.ts.map +1 -1
- package/dist/tool/tool.js +2 -2
- package/package.json +4 -2
- package/src/agent/__tests__/systools.test.ts +146 -0
- package/src/{types/agent.ts → agent/types.ts} +22 -1
- package/src/agent.ts +144 -36
- package/src/api/__tests__/threads.test.ts +2 -2
- package/src/api/models/thread.ts +1 -1
- package/src/api/resources/agents/agents.ts +56 -0
- package/src/api/resources/agents/index.ts +1 -0
- package/src/api/resources/threads/events.ts +1 -1
- package/src/api/resources/threads/threads.ts +2 -2
- package/src/api/resources/threads/types.ts +2 -2
- package/src/context.ts +14 -136
- package/src/guardrail.ts +2 -2
- package/src/index.ts +35 -6
- package/src/internal.ts +2 -2
- package/src/kernl/index.ts +8 -0
- package/src/{kernl.ts → kernl/kernl.ts} +50 -10
- package/src/kernl/types.ts +106 -0
- package/src/lib/error.ts +2 -2
- package/src/lifecycle.ts +2 -2
- package/src/memory/codecs/domain.ts +115 -0
- package/src/memory/codecs/identity.ts +28 -0
- package/src/memory/codecs/index.ts +61 -0
- package/src/memory/codecs/tpuf.ts +115 -0
- package/src/memory/encoder.ts +56 -0
- package/src/memory/handle.ts +189 -0
- package/src/memory/index.ts +49 -0
- package/src/memory/indexes.ts +108 -0
- package/src/memory/memory.ts +151 -0
- package/src/memory/schema.ts +142 -0
- package/src/memory/store.ts +47 -0
- package/src/memory/types.ts +282 -0
- package/src/storage/__tests__/in-memory.test.ts +1 -1
- package/src/storage/base.ts +7 -1
- package/src/storage/in-memory.ts +170 -2
- package/src/storage/thread.ts +1 -1
- package/src/thread/__tests__/integration.test.ts +1 -1
- package/src/thread/__tests__/mock.ts +1 -1
- package/src/thread/__tests__/thread.test.ts +1 -1
- package/src/thread/thread.ts +5 -3
- package/src/{types/thread.ts → thread/types.ts} +1 -1
- package/src/thread/utils.ts +2 -2
- package/src/tool/index.ts +3 -0
- package/src/tool/sys/index.ts +7 -0
- package/src/tool/sys/memory.ts +120 -0
- package/src/tool/tool.ts +8 -4
- package/tsconfig.tsbuildinfo +1 -0
- package/dist/api/__tests__/cursor-page.test.d.ts +0 -2
- package/dist/api/__tests__/cursor-page.test.d.ts.map +0 -1
- package/dist/api/__tests__/cursor-page.test.js +0 -414
- package/dist/api/__tests__/offset-page.test.d.ts +0 -2
- package/dist/api/__tests__/offset-page.test.d.ts.map +0 -1
- package/dist/api/__tests__/offset-page.test.js +0 -510
- package/dist/api/pagination/base.d.ts +0 -48
- package/dist/api/pagination/base.d.ts.map +0 -1
- package/dist/api/pagination/base.js +0 -45
- package/dist/api/pagination/cursor.d.ts +0 -44
- package/dist/api/pagination/cursor.d.ts.map +0 -1
- package/dist/api/pagination/cursor.js +0 -52
- package/dist/api/pagination/offset.d.ts +0 -42
- package/dist/api/pagination/offset.d.ts.map +0 -1
- package/dist/api/pagination/offset.js +0 -55
- package/dist/kernl/threads.d.ts +0 -110
- package/dist/kernl/threads.d.ts.map +0 -1
- package/dist/kernl/threads.js +0 -126
- package/dist/kernl.d.ts +0 -51
- package/dist/kernl.d.ts.map +0 -1
- package/dist/kernl.js +0 -91
- package/dist/types/agent.d.ts.map +0 -1
- package/dist/types/kernl.d.ts +0 -42
- package/dist/types/kernl.d.ts.map +0 -1
- package/dist/types/thread.d.ts.map +0 -1
- package/src/api/__tests__/cursor-page.test.ts +0 -512
- package/src/api/__tests__/offset-page.test.ts +0 -624
- package/src/api/pagination/base.ts +0 -79
- package/src/api/pagination/cursor.ts +0 -86
- package/src/api/pagination/offset.ts +0 -89
- package/src/types/kernl.ts +0 -51
- /package/dist/{types/agent.js → agent/types.js} +0 -0
- /package/dist/{types/kernl.js → kernl/types.js} +0 -0
- /package/dist/{types/thread.js → thread/types.js} +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domain-level memory codecs.
|
|
3
|
+
*
|
|
4
|
+
* Codecs for transforming between memory domain types and search/index formats.
|
|
5
|
+
*/
|
|
6
|
+
import type { Codec, AsyncCodec } from "@kernl-sdk/shared/lib";
|
|
7
|
+
import type { Filter as SearchFilter } from "@kernl-sdk/retrieval";
|
|
8
|
+
import type { MemoryFilter, MemoryRecord, MemoryRecordUpdate, IndexMemoryRecord, IndexMemoryRecordPatch, MemoryByteCodec } from "../types.js";
|
|
9
|
+
/**
|
|
10
|
+
* Codec for converting MemoryFilter to retrieval Filter.
|
|
11
|
+
*
|
|
12
|
+
* - scope.namespace → namespace
|
|
13
|
+
* - scope.entityId → entityId
|
|
14
|
+
* - scope.agentId → agentId
|
|
15
|
+
* - collections → collection: { $in: [...] }
|
|
16
|
+
* - after/before → timestamp: { $gt/$lt }
|
|
17
|
+
*
|
|
18
|
+
* Content field filtering (text, metadata, kind) is not currently supported.
|
|
19
|
+
* Text relevance is handled via vector similarity in the query, not filters.
|
|
20
|
+
*/
|
|
21
|
+
export declare const MEMORY_FILTER: Codec<MemoryFilter, SearchFilter>;
|
|
22
|
+
/**
|
|
23
|
+
* Create a codec for MemoryRecord -> IndexMemoryRecord.
|
|
24
|
+
*/
|
|
25
|
+
export declare function recordCodec(bytecodec: MemoryByteCodec): AsyncCodec<MemoryRecord, IndexMemoryRecord>;
|
|
26
|
+
/**
|
|
27
|
+
* Codec for converting MemoryRecordUpdate to IndexMemoryRecordPatch.
|
|
28
|
+
*
|
|
29
|
+
* Maps patchable fields from domain update to index patch format.
|
|
30
|
+
* wmem/smem are store-only fields and are not included.
|
|
31
|
+
* content changes require full re-index, not a patch.
|
|
32
|
+
*/
|
|
33
|
+
export declare const PATCH_CODEC: Codec<MemoryRecordUpdate, IndexMemoryRecordPatch>;
|
|
34
|
+
//# sourceMappingURL=domain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../../src/memory/codecs/domain.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EAChB,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,YAAY,EAAE,YAAY,CA0B3D,CAAC;AAEF;;GAEG;AACH,wBAAgB,WAAW,CACzB,SAAS,EAAE,eAAe,GACzB,UAAU,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAqB7C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,kBAAkB,EAAE,sBAAsB,CAqBzE,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domain-level memory codecs.
|
|
3
|
+
*
|
|
4
|
+
* Codecs for transforming between memory domain types and search/index formats.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Codec for converting MemoryFilter to retrieval Filter.
|
|
8
|
+
*
|
|
9
|
+
* - scope.namespace → namespace
|
|
10
|
+
* - scope.entityId → entityId
|
|
11
|
+
* - scope.agentId → agentId
|
|
12
|
+
* - collections → collection: { $in: [...] }
|
|
13
|
+
* - after/before → timestamp: { $gt/$lt }
|
|
14
|
+
*
|
|
15
|
+
* Content field filtering (text, metadata, kind) is not currently supported.
|
|
16
|
+
* Text relevance is handled via vector similarity in the query, not filters.
|
|
17
|
+
*/
|
|
18
|
+
export const MEMORY_FILTER = {
|
|
19
|
+
encode(mf) {
|
|
20
|
+
const sf = {};
|
|
21
|
+
// scope
|
|
22
|
+
if (mf.scope?.namespace !== undefined)
|
|
23
|
+
sf.namespace = mf.scope.namespace;
|
|
24
|
+
if (mf.scope?.entityId !== undefined)
|
|
25
|
+
sf.entityId = mf.scope.entityId;
|
|
26
|
+
if (mf.scope?.agentId !== undefined)
|
|
27
|
+
sf.agentId = mf.scope.agentId;
|
|
28
|
+
if (mf.collections && mf.collections.length > 0) {
|
|
29
|
+
sf.collection = { $in: mf.collections };
|
|
30
|
+
}
|
|
31
|
+
if (mf.after !== undefined || mf.before !== undefined) {
|
|
32
|
+
const ts = {};
|
|
33
|
+
if (mf.after !== undefined)
|
|
34
|
+
ts.$gt = mf.after;
|
|
35
|
+
if (mf.before !== undefined)
|
|
36
|
+
ts.$lt = mf.before;
|
|
37
|
+
sf.timestamp = ts;
|
|
38
|
+
}
|
|
39
|
+
return sf;
|
|
40
|
+
},
|
|
41
|
+
decode(_filter) {
|
|
42
|
+
throw new Error("MEMORY_FILTER.decode not implemented");
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Create a codec for MemoryRecord -> IndexMemoryRecord.
|
|
47
|
+
*/
|
|
48
|
+
export function recordCodec(bytecodec) {
|
|
49
|
+
return {
|
|
50
|
+
async encode(record) {
|
|
51
|
+
const indexable = await bytecodec.encode(record.content);
|
|
52
|
+
return {
|
|
53
|
+
id: record.id,
|
|
54
|
+
namespace: record.scope.namespace ?? null,
|
|
55
|
+
entityId: record.scope.entityId ?? null,
|
|
56
|
+
agentId: record.scope.agentId ?? null,
|
|
57
|
+
kind: record.kind,
|
|
58
|
+
collection: record.collection,
|
|
59
|
+
timestamp: record.timestamp,
|
|
60
|
+
createdAt: record.createdAt,
|
|
61
|
+
updatedAt: record.updatedAt,
|
|
62
|
+
...indexable,
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
async decode() {
|
|
66
|
+
throw new Error("recordCodec.decode not implemented");
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Codec for converting MemoryRecordUpdate to IndexMemoryRecordPatch.
|
|
72
|
+
*
|
|
73
|
+
* Maps patchable fields from domain update to index patch format.
|
|
74
|
+
* wmem/smem are store-only fields and are not included.
|
|
75
|
+
* content changes require full re-index, not a patch.
|
|
76
|
+
*/
|
|
77
|
+
export const PATCH_CODEC = {
|
|
78
|
+
encode(update) {
|
|
79
|
+
const patch = { id: update.id };
|
|
80
|
+
if (update.scope?.namespace !== undefined)
|
|
81
|
+
patch.namespace = update.scope.namespace;
|
|
82
|
+
if (update.scope?.entityId !== undefined)
|
|
83
|
+
patch.entityId = update.scope.entityId;
|
|
84
|
+
if (update.scope?.agentId !== undefined)
|
|
85
|
+
patch.agentId = update.scope.agentId;
|
|
86
|
+
if (update.collection !== undefined)
|
|
87
|
+
patch.collection = update.collection;
|
|
88
|
+
if (update.timestamp !== undefined)
|
|
89
|
+
patch.timestamp = update.timestamp;
|
|
90
|
+
if (update.updatedAt !== undefined)
|
|
91
|
+
patch.updatedAt = update.updatedAt;
|
|
92
|
+
if (update.metadata !== undefined)
|
|
93
|
+
patch.metadata = update.metadata;
|
|
94
|
+
return patch;
|
|
95
|
+
},
|
|
96
|
+
decode(_patch) {
|
|
97
|
+
throw new Error("PATCH_CODEC.decode not implemented");
|
|
98
|
+
},
|
|
99
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identity codecs - pass through unchanged.
|
|
3
|
+
*
|
|
4
|
+
* Used for backends that support the full IndexMemoryRecord schema natively.
|
|
5
|
+
*/
|
|
6
|
+
import type { Codec } from "@kernl-sdk/shared/lib";
|
|
7
|
+
import type { FieldSchema, SearchQuery, UnknownDocument } from "@kernl-sdk/retrieval";
|
|
8
|
+
import type { IndexMemoryRecord } from "../types.js";
|
|
9
|
+
export declare const IDENTITY_DOC: Codec<IndexMemoryRecord, UnknownDocument>;
|
|
10
|
+
export declare const IDENTITY_SCHEMA: Codec<Record<string, FieldSchema>, Record<string, FieldSchema>>;
|
|
11
|
+
export declare const IDENTITY_QUERY: Codec<SearchQuery, SearchQuery>;
|
|
12
|
+
//# sourceMappingURL=identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/memory/codecs/identity.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEtF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,EAAE,eAAe,CAGlE,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CACjC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAC3B,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAI5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,WAAW,EAAE,WAAW,CAG1D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identity codecs - pass through unchanged.
|
|
3
|
+
*
|
|
4
|
+
* Used for backends that support the full IndexMemoryRecord schema natively.
|
|
5
|
+
*/
|
|
6
|
+
export const IDENTITY_DOC = {
|
|
7
|
+
encode: (doc) => doc,
|
|
8
|
+
decode: (row) => row,
|
|
9
|
+
};
|
|
10
|
+
export const IDENTITY_SCHEMA = {
|
|
11
|
+
encode: (schema) => schema,
|
|
12
|
+
decode: (schema) => schema,
|
|
13
|
+
};
|
|
14
|
+
export const IDENTITY_QUERY = {
|
|
15
|
+
encode: (q) => q,
|
|
16
|
+
decode: (q) => q,
|
|
17
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory codecs.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all memory codecs:
|
|
5
|
+
* - Domain codecs (MEMORY_FILTER, PATCH_CODEC, recordCodec)
|
|
6
|
+
* - Backend codecs (TPUF_*, IDENTITY_*)
|
|
7
|
+
* - Backend codec registry (getBackendCodecs)
|
|
8
|
+
*/
|
|
9
|
+
import type { Codec } from "@kernl-sdk/shared/lib";
|
|
10
|
+
import type { FieldSchema, SearchQuery, UnknownDocument } from "@kernl-sdk/retrieval";
|
|
11
|
+
import type { IndexMemoryRecord } from "../types.js";
|
|
12
|
+
export { MEMORY_FILTER, PATCH_CODEC, recordCodec } from "./domain.js";
|
|
13
|
+
export { IDENTITY_DOC, IDENTITY_SCHEMA, IDENTITY_QUERY } from "./identity.js";
|
|
14
|
+
export { TPUF_DOC, TPUF_SCHEMA, TPUF_QUERY } from "./tpuf.js";
|
|
15
|
+
/**
|
|
16
|
+
* Backend codec set.
|
|
17
|
+
*/
|
|
18
|
+
export interface AdapterCodecs {
|
|
19
|
+
doc: Codec<IndexMemoryRecord, UnknownDocument>;
|
|
20
|
+
schema: Codec<Record<string, FieldSchema>, Record<string, FieldSchema>>;
|
|
21
|
+
query: Codec<SearchQuery, SearchQuery>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Registry of backend codecs.
|
|
25
|
+
*/
|
|
26
|
+
export declare const ADAPTER_CODECS: Record<string, AdapterCodecs>;
|
|
27
|
+
/**
|
|
28
|
+
* Get codecs for a backend, falling back to identity.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getAdapterCodecs(adapterId: string): AdapterCodecs;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/memory/codecs/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAKlD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,KAAK,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;IAC/C,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IACxE,KAAK,EAAE,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAOxD,CAAC;AAWF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAEjE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory codecs.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all memory codecs:
|
|
5
|
+
* - Domain codecs (MEMORY_FILTER, PATCH_CODEC, recordCodec)
|
|
6
|
+
* - Backend codecs (TPUF_*, IDENTITY_*)
|
|
7
|
+
* - Backend codec registry (getBackendCodecs)
|
|
8
|
+
*/
|
|
9
|
+
import { IDENTITY_DOC, IDENTITY_SCHEMA, IDENTITY_QUERY } from "./identity.js";
|
|
10
|
+
import { TPUF_DOC, TPUF_SCHEMA, TPUF_QUERY } from "./tpuf.js";
|
|
11
|
+
// re-exports
|
|
12
|
+
export { MEMORY_FILTER, PATCH_CODEC, recordCodec } from "./domain.js";
|
|
13
|
+
export { IDENTITY_DOC, IDENTITY_SCHEMA, IDENTITY_QUERY } from "./identity.js";
|
|
14
|
+
export { TPUF_DOC, TPUF_SCHEMA, TPUF_QUERY } from "./tpuf.js";
|
|
15
|
+
/**
|
|
16
|
+
* Registry of backend codecs.
|
|
17
|
+
*/
|
|
18
|
+
export const ADAPTER_CODECS = {
|
|
19
|
+
turbopuffer: { doc: TPUF_DOC, schema: TPUF_SCHEMA, query: TPUF_QUERY },
|
|
20
|
+
pgvector: {
|
|
21
|
+
doc: IDENTITY_DOC,
|
|
22
|
+
schema: IDENTITY_SCHEMA,
|
|
23
|
+
query: IDENTITY_QUERY,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Default codecs (identity) for unknown backends.
|
|
28
|
+
*/
|
|
29
|
+
const DEFAULT_CODECS = {
|
|
30
|
+
doc: IDENTITY_DOC,
|
|
31
|
+
schema: IDENTITY_SCHEMA,
|
|
32
|
+
query: IDENTITY_QUERY,
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Get codecs for a backend, falling back to identity.
|
|
36
|
+
*/
|
|
37
|
+
export function getAdapterCodecs(adapterId) {
|
|
38
|
+
return ADAPTER_CODECS[adapterId] ?? DEFAULT_CODECS;
|
|
39
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turbopuffer backend codecs.
|
|
3
|
+
*
|
|
4
|
+
* Turbopuffer constraints:
|
|
5
|
+
* - Exactly one ANN vector field named "vector" per namespace.
|
|
6
|
+
*
|
|
7
|
+
* Memory model:
|
|
8
|
+
* - IndexMemoryRecord has modality-specific vectors: tvec, ivec, avec, vvec.
|
|
9
|
+
*
|
|
10
|
+
* Mapping:
|
|
11
|
+
* - tvec (text embedding) → vector
|
|
12
|
+
* - ivec/avec/vvec are dropped (not indexed in Turbopuffer)
|
|
13
|
+
*/
|
|
14
|
+
import type { Codec } from "@kernl-sdk/shared/lib";
|
|
15
|
+
import type { FieldSchema, SearchQuery, UnknownDocument } from "@kernl-sdk/retrieval";
|
|
16
|
+
import type { IndexMemoryRecord } from "../types.js";
|
|
17
|
+
/**
|
|
18
|
+
* Turbopuffer document codec.
|
|
19
|
+
*
|
|
20
|
+
* Maps tvec → vector, drops ivec/avec/vvec.
|
|
21
|
+
*/
|
|
22
|
+
export declare const TPUF_DOC: Codec<IndexMemoryRecord, UnknownDocument>;
|
|
23
|
+
/**
|
|
24
|
+
* Turbopuffer schema codec.
|
|
25
|
+
*
|
|
26
|
+
* Maps tvec → vector, drops ivec/avec/vvec fields.
|
|
27
|
+
*/
|
|
28
|
+
export declare const TPUF_SCHEMA: Codec<Record<string, FieldSchema>, Record<string, FieldSchema>>;
|
|
29
|
+
/**
|
|
30
|
+
* Turbopuffer query codec.
|
|
31
|
+
*
|
|
32
|
+
* Maps tvec → vector in query signals, drops ivec/avec/vvec.
|
|
33
|
+
* Operates on normalized SearchQuery (after planQuery).
|
|
34
|
+
*
|
|
35
|
+
* Defaults include to true so memory searches return all document attributes.
|
|
36
|
+
*/
|
|
37
|
+
export declare const TPUF_QUERY: Codec<SearchQuery, SearchQuery>;
|
|
38
|
+
//# sourceMappingURL=tpuf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tpuf.d.ts","sourceRoot":"","sources":["../../../src/memory/codecs/tpuf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EAEX,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,EAAE,eAAe,CAkB9D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAC7B,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAC3B,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAmB5B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,WAAW,EAAE,WAAW,CA6BtD,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turbopuffer backend codecs.
|
|
3
|
+
*
|
|
4
|
+
* Turbopuffer constraints:
|
|
5
|
+
* - Exactly one ANN vector field named "vector" per namespace.
|
|
6
|
+
*
|
|
7
|
+
* Memory model:
|
|
8
|
+
* - IndexMemoryRecord has modality-specific vectors: tvec, ivec, avec, vvec.
|
|
9
|
+
*
|
|
10
|
+
* Mapping:
|
|
11
|
+
* - tvec (text embedding) → vector
|
|
12
|
+
* - ivec/avec/vvec are dropped (not indexed in Turbopuffer)
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Turbopuffer document codec.
|
|
16
|
+
*
|
|
17
|
+
* Maps tvec → vector, drops ivec/avec/vvec.
|
|
18
|
+
*/
|
|
19
|
+
export const TPUF_DOC = {
|
|
20
|
+
encode(doc) {
|
|
21
|
+
const { tvec, ivec, avec, vvec, metadata, ...rest } = doc;
|
|
22
|
+
const row = {
|
|
23
|
+
...rest,
|
|
24
|
+
metadata: metadata, // metadata is JSONObject | null, cast to FieldValue for UnknownDocument
|
|
25
|
+
};
|
|
26
|
+
if (tvec)
|
|
27
|
+
row.vector = tvec;
|
|
28
|
+
return row;
|
|
29
|
+
},
|
|
30
|
+
decode(row) {
|
|
31
|
+
const { vector, ...rest } = row;
|
|
32
|
+
return {
|
|
33
|
+
...rest,
|
|
34
|
+
tvec: Array.isArray(vector) ? vector : undefined,
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Turbopuffer schema codec.
|
|
40
|
+
*
|
|
41
|
+
* Maps tvec → vector, drops ivec/avec/vvec fields.
|
|
42
|
+
*/
|
|
43
|
+
export const TPUF_SCHEMA = {
|
|
44
|
+
encode(schema) {
|
|
45
|
+
const result = {};
|
|
46
|
+
for (const [name, field] of Object.entries(schema)) {
|
|
47
|
+
if (name === "tvec") {
|
|
48
|
+
result.vector = field;
|
|
49
|
+
}
|
|
50
|
+
else if (name === "ivec" || name === "avec" || name === "vvec") {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
result[name] = field;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return result;
|
|
58
|
+
},
|
|
59
|
+
decode() {
|
|
60
|
+
throw new Error("TPUF_SCHEMA.decode not implemented");
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Turbopuffer query codec.
|
|
65
|
+
*
|
|
66
|
+
* Maps tvec → vector in query signals, drops ivec/avec/vvec.
|
|
67
|
+
* Operates on normalized SearchQuery (after planQuery).
|
|
68
|
+
*
|
|
69
|
+
* Defaults include to true so memory searches return all document attributes.
|
|
70
|
+
*/
|
|
71
|
+
export const TPUF_QUERY = {
|
|
72
|
+
encode(input) {
|
|
73
|
+
// default include to true for memory search (tpuf only returns id + score without it)
|
|
74
|
+
const include = input.include ?? true;
|
|
75
|
+
if (!input.query) {
|
|
76
|
+
return { ...input, include };
|
|
77
|
+
}
|
|
78
|
+
const signals = input.query.map((signal) => {
|
|
79
|
+
const { tvec, ivec, avec, vvec, ...rest } = signal;
|
|
80
|
+
if (tvec) {
|
|
81
|
+
return { ...rest, vector: tvec };
|
|
82
|
+
}
|
|
83
|
+
return rest;
|
|
84
|
+
});
|
|
85
|
+
return { ...input, query: signals, include };
|
|
86
|
+
},
|
|
87
|
+
decode() {
|
|
88
|
+
throw new Error("TPUF_QUERY.decode not implemented");
|
|
89
|
+
},
|
|
90
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MemoryByte encoder - converts MemoryByte to IndexableByte with embeddings.
|
|
3
|
+
*/
|
|
4
|
+
import type { EmbeddingModel } from "@kernl-sdk/protocol";
|
|
5
|
+
import type { MemoryByte, IndexableByte, MemoryByteCodec } from "./types.js";
|
|
6
|
+
/**
|
|
7
|
+
* Encoder that converts MemoryByte to IndexableByte.
|
|
8
|
+
*
|
|
9
|
+
* Extracts canonical text from content and computes embeddings.
|
|
10
|
+
*/
|
|
11
|
+
export declare class MemoryByteEncoder implements MemoryByteCodec {
|
|
12
|
+
private readonly embedder;
|
|
13
|
+
constructor(embedder: EmbeddingModel<string>);
|
|
14
|
+
/**
|
|
15
|
+
* Encode a MemoryByte to IndexableByte.
|
|
16
|
+
* Extracts text and computes embeddings for each modality.
|
|
17
|
+
*/
|
|
18
|
+
encode(byte: MemoryByte): Promise<IndexableByte>;
|
|
19
|
+
/**
|
|
20
|
+
* Decode is not implemented - IndexableByte cannot be converted back to MemoryByte.
|
|
21
|
+
*/
|
|
22
|
+
decode(_indexable: IndexableByte): Promise<MemoryByte>;
|
|
23
|
+
/**
|
|
24
|
+
* Embed a text string.
|
|
25
|
+
* Exposed for query embedding.
|
|
26
|
+
*/
|
|
27
|
+
embed(text: string): Promise<number[]>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=encoder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encoder.d.ts","sourceRoot":"","sources":["../../src/memory/encoder.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1E;;;;GAIG;AACH,qBAAa,iBAAkB,YAAW,eAAe;IACvD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyB;gBAEtC,QAAQ,EAAE,cAAc,CAAC,MAAM,CAAC;IAI5C;;;OAGG;IACG,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC;IAgBtD;;OAEG;IACG,MAAM,CAAC,UAAU,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC;IAI5D;;;OAGG;IACG,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAI7C"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MemoryByte encoder - converts MemoryByte to IndexableByte with embeddings.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Encoder that converts MemoryByte to IndexableByte.
|
|
6
|
+
*
|
|
7
|
+
* Extracts canonical text from content and computes embeddings.
|
|
8
|
+
*/
|
|
9
|
+
export class MemoryByteEncoder {
|
|
10
|
+
embedder;
|
|
11
|
+
constructor(embedder) {
|
|
12
|
+
this.embedder = embedder;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Encode a MemoryByte to IndexableByte.
|
|
16
|
+
* Extracts text and computes embeddings for each modality.
|
|
17
|
+
*/
|
|
18
|
+
async encode(byte) {
|
|
19
|
+
const text = byte.text;
|
|
20
|
+
const tvec = text ? await this.embed(text) : undefined;
|
|
21
|
+
// TODO: embed other modalities (image, audio, video)
|
|
22
|
+
// const ivec = byte.image ? await this.embedImage(byte.image) : undefined;
|
|
23
|
+
// const avec = byte.audio ? await this.embedAudio(byte.audio) : undefined;
|
|
24
|
+
// const vvec = byte.video ? await this.embedVideo(byte.video) : undefined;
|
|
25
|
+
return {
|
|
26
|
+
text,
|
|
27
|
+
tvec,
|
|
28
|
+
metadata: byte.object ?? null,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Decode is not implemented - IndexableByte cannot be converted back to MemoryByte.
|
|
33
|
+
*/
|
|
34
|
+
async decode(_indexable) {
|
|
35
|
+
throw new Error("MemoryByteEncoder.decode not implemented");
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Embed a text string.
|
|
39
|
+
* Exposed for query embedding.
|
|
40
|
+
*/
|
|
41
|
+
async embed(text) {
|
|
42
|
+
const result = await this.embedder.embed({ values: [text] });
|
|
43
|
+
return result.embeddings[0] ?? [];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory index handle with lazy initialization.
|
|
3
|
+
*/
|
|
4
|
+
import { type SearchIndex, type IndexHandle, type QueryInput, type SearchHit, type DocumentPatch, type UpsertResult, type PatchResult, type DeleteResult, type FieldSchema } from "@kernl-sdk/retrieval";
|
|
5
|
+
import type { IndexMemoryRecord } from "./types.js";
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for MemoryIndexHandle.
|
|
8
|
+
*/
|
|
9
|
+
export interface MemoryIndexHandleConfig {
|
|
10
|
+
/**
|
|
11
|
+
* The underlying search index backend.
|
|
12
|
+
*/
|
|
13
|
+
index: SearchIndex;
|
|
14
|
+
/**
|
|
15
|
+
* Index identifier (e.g., "kernl_memories_index").
|
|
16
|
+
*/
|
|
17
|
+
indexId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Field schema for the memory index.
|
|
20
|
+
*/
|
|
21
|
+
schema: Record<string, FieldSchema>;
|
|
22
|
+
/**
|
|
23
|
+
* Backend-specific options passed to SearchIndex.createIndex().
|
|
24
|
+
*/
|
|
25
|
+
providerOptions?: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Domain-aware index handle for memory records with lazy initialization.
|
|
29
|
+
*
|
|
30
|
+
* - Wraps a SearchIndex and ensures the memory index is created before any operation.
|
|
31
|
+
* - Normalizes the idiosyncrasies of search adapters (capabilities, weird rules, ... - e.g. tpuf requires vector fields named
|
|
32
|
+
* literally 'vector' - dumb shit like this..)
|
|
33
|
+
*/
|
|
34
|
+
export declare class MemoryIndexHandle implements IndexHandle<IndexMemoryRecord> {
|
|
35
|
+
readonly id: string;
|
|
36
|
+
private readonly index;
|
|
37
|
+
private readonly schema;
|
|
38
|
+
private readonly caps;
|
|
39
|
+
private readonly codecs;
|
|
40
|
+
private readonly providerOptions?;
|
|
41
|
+
private initPromise;
|
|
42
|
+
constructor(config: MemoryIndexHandleConfig);
|
|
43
|
+
/**
|
|
44
|
+
* Ensure memory index exists (lazy initialization).
|
|
45
|
+
*
|
|
46
|
+
* Safe to call multiple times - initialization only runs once.
|
|
47
|
+
*/
|
|
48
|
+
private ensureInit;
|
|
49
|
+
/**
|
|
50
|
+
* Create the memory index if it doesn't exist.
|
|
51
|
+
*/
|
|
52
|
+
private createIndex;
|
|
53
|
+
/**
|
|
54
|
+
* Search for memory records matching the query.
|
|
55
|
+
*
|
|
56
|
+
* Adapts the query to backend capabilities, degrading gracefully
|
|
57
|
+
* when hybrid or multi-signal queries aren't supported.
|
|
58
|
+
*/
|
|
59
|
+
query(input: QueryInput): Promise<SearchHit<IndexMemoryRecord>[]>;
|
|
60
|
+
/**
|
|
61
|
+
* Insert or update memory records in the index.
|
|
62
|
+
*/
|
|
63
|
+
upsert(docs: IndexMemoryRecord | IndexMemoryRecord[]): Promise<UpsertResult>;
|
|
64
|
+
/**
|
|
65
|
+
* Partially update memory records without re-indexing vectors.
|
|
66
|
+
*
|
|
67
|
+
* Note: Patches don't include vector fields so we cast directly.
|
|
68
|
+
* Metadata field type mismatch (JSONObject vs FieldValue) is handled at runtime.
|
|
69
|
+
*/
|
|
70
|
+
patch(patches: DocumentPatch<IndexMemoryRecord> | DocumentPatch<IndexMemoryRecord>[]): Promise<PatchResult>;
|
|
71
|
+
/**
|
|
72
|
+
* Remove memory records from the index.
|
|
73
|
+
*/
|
|
74
|
+
delete(ids: string | string[]): Promise<DeleteResult>;
|
|
75
|
+
/**
|
|
76
|
+
* Add a new field to the index schema.
|
|
77
|
+
*
|
|
78
|
+
* @throws Always throws - dynamic schema modification not supported
|
|
79
|
+
*/
|
|
80
|
+
addField(_field: string, _schema: FieldSchema): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Get an initialized underlying index handle.
|
|
83
|
+
*
|
|
84
|
+
* Returns a handle typed for UnknownDocument since we encode/decode
|
|
85
|
+
* through the adapter codecs for backend-specific field mapping.
|
|
86
|
+
*/
|
|
87
|
+
private handle;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=handle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handle.d.ts","sourceRoot":"","sources":["../../src/memory/handle.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,WAAW,EAGjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,KAAK,EAAE,WAAW,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAEpC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3C;AAED;;;;;;GAMG;AACH,qBAAa,iBAAkB,YAAW,WAAW,CAAC,iBAAiB,CAAC;IACtE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAc;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8B;IACrD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqB;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAA0B;IAE3D,OAAO,CAAC,WAAW,CAA8B;gBAErC,MAAM,EAAE,uBAAuB;IAS3C;;;;OAIG;YACW,UAAU;IAUxB;;OAEG;YACW,WAAW;IAqBzB;;;;;OAKG;IACG,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,CAAC;IAevE;;OAEG;IACG,MAAM,CACV,IAAI,EAAE,iBAAiB,GAAG,iBAAiB,EAAE,GAC5C,OAAO,CAAC,YAAY,CAAC;IAOxB;;;;;OAKG;IACG,KAAK,CACT,OAAO,EACH,aAAa,CAAC,iBAAiB,CAAC,GAChC,aAAa,CAAC,iBAAiB,CAAC,EAAE,GACrC,OAAO,CAAC,WAAW,CAAC;IAKvB;;OAEG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC;IAK3D;;;;OAIG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAInE;;;;;OAKG;YACW,MAAM;CAIrB"}
|