@framers/agentos 0.4.0 → 0.4.1

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.
@@ -0,0 +1,112 @@
1
+ /**
2
+ * @file TypedNetworkRetriever.ts
3
+ * @description Retrieval adapter that turns the typed-network into a
4
+ * source of {@link ScoredMemoryTrace}s — drop-in compatible with the
5
+ * existing canonical-hybrid retrieval pipeline.
6
+ *
7
+ * **Pipeline (per query):**
8
+ *
9
+ * 1. Extract candidate entities from the query text via regex
10
+ * (proper nouns ≥ 3 chars, quoted strings).
11
+ * 2. Find seed facts in the {@link TypedNetworkStore} whose
12
+ * `entities` set intersects the query entities.
13
+ * 3. Run {@link TypedSpreadingActivation} from the seed set with
14
+ * Hindsight Eq. 12 max-aggregation.
15
+ * 4. Take top-K activated facts (sorted by activation level
16
+ * descending).
17
+ * 5. Convert each typed fact to a `ScoredMemoryTrace`-shaped object
18
+ * so the bench's reader pipeline picks it up alongside canonical
19
+ * chunks.
20
+ *
21
+ * The retriever is stateless aside from the store + spreading-
22
+ * activation engine it wraps. Safe to share across concurrent
23
+ * retrieves on the same store.
24
+ *
25
+ * @module @framers/agentos/memory/retrieval/typed-network/TypedNetworkRetriever
26
+ */
27
+ import type { ScoredMemoryTrace, MemoryScope } from '../../core/types.js';
28
+ import type { TypedFact } from './types.js';
29
+ import type { TypedNetworkStore } from './TypedNetworkStore.js';
30
+ import type { TypedSpreadingActivation } from './TypedSpreadingActivation.js';
31
+ /**
32
+ * Extract candidate entity strings from a query. Matches the
33
+ * Mem0-v3-style regex extractor used at ingest time so query and
34
+ * fact entities use the same canonicalization.
35
+ *
36
+ * Captures:
37
+ * - Capitalized words ≥ 3 characters (proper nouns: "Berlin",
38
+ * "Docker", "TypeScript")
39
+ * - Double-quoted strings ("hello world")
40
+ * - Single-quoted strings ('like this')
41
+ *
42
+ * Returns deduplicated entity strings preserving original casing
43
+ * (case-sensitive comparison happens upstream).
44
+ */
45
+ export declare function extractQueryEntities(text: string): string[];
46
+ /**
47
+ * Construction options.
48
+ */
49
+ export interface TypedNetworkRetrieverOptions {
50
+ /** The typed-network store populated at ingest time. */
51
+ store: TypedNetworkStore;
52
+ /** Pre-constructed spreading-activation engine. */
53
+ spreading: TypedSpreadingActivation;
54
+ /** Maximum hops for spreading activation. Default 3. */
55
+ maxDepth?: number;
56
+ /** Activation cutoff for spreading. Default 0.05. */
57
+ activationThreshold?: number;
58
+ }
59
+ /**
60
+ * Per-query retrieval options.
61
+ */
62
+ export interface TypedNetworkRetrieveOptions {
63
+ /** Top-K facts to return after activation ranking. */
64
+ topK: number;
65
+ /** Memory scope (matches the canonical retrieval scope). */
66
+ scope: {
67
+ scope: MemoryScope;
68
+ scopeId: string;
69
+ };
70
+ /**
71
+ * Pre-extracted query entities. Pass when the consumer has done
72
+ * its own entity extraction (e.g. via a stronger NER model);
73
+ * skipping passes the query through {@link extractQueryEntities}.
74
+ */
75
+ queryEntities?: string[];
76
+ }
77
+ /**
78
+ * Adapter that produces canonical-shaped retrieval results from the
79
+ * typed-network store. Plugs into the bench's existing reader
80
+ * pipeline without requiring changes to downstream code.
81
+ */
82
+ export declare class TypedNetworkRetriever {
83
+ private readonly store;
84
+ private readonly spreading;
85
+ private readonly maxDepth;
86
+ private readonly activationThreshold;
87
+ constructor(opts: TypedNetworkRetrieverOptions);
88
+ /**
89
+ * Retrieve top-K typed facts for the query, formatted as
90
+ * {@link ScoredMemoryTrace}s. Returns an empty array when no
91
+ * query entities match seed facts in the store (e.g. queries with
92
+ * no proper nouns or quoted strings, or queries whose entities
93
+ * the typed network has not yet observed).
94
+ */
95
+ retrieve(query: string, options: TypedNetworkRetrieveOptions): Promise<ScoredMemoryTrace[]>;
96
+ }
97
+ /**
98
+ * Convert a {@link TypedFact} into a {@link ScoredMemoryTrace} for
99
+ * the bench's downstream reader pipeline. Renders the bank label
100
+ * inline in the content so the reader can distinguish typed facts
101
+ * from raw chunks at prompt time.
102
+ *
103
+ * Defaults follow the {@link HybridRetriever.factToScoredTrace}
104
+ * pattern: encoding strength 1, retrieval score = activation level,
105
+ * neutral emotional context, lifecycle timestamps drawn from the
106
+ * fact's mention timestamp.
107
+ */
108
+ export declare function typedFactToScoredTrace(fact: TypedFact, activation: number, scope: {
109
+ scope: MemoryScope;
110
+ scopeId: string;
111
+ }): ScoredMemoryTrace;
112
+ //# sourceMappingURL=TypedNetworkRetriever.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypedNetworkRetriever.d.ts","sourceRoot":"","sources":["../../../../src/memory/retrieval/typed-network/TypedNetworkRetriever.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAK3D;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,wDAAwD;IACxD,KAAK,EAAE,iBAAiB,CAAC;IACzB,mDAAmD;IACnD,SAAS,EAAE,wBAAwB,CAAC;IACpC,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,KAAK,EAAE;QAAE,KAAK,EAAE,WAAW,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;;;GAIG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAoB;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA2B;IACrD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAS;gBAEjC,IAAI,EAAE,4BAA4B;IAO9C;;;;;;OAMG;IACG,QAAQ,CACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAmChC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,SAAS,EACf,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC7C,iBAAiB,CA8CnB"}
@@ -0,0 +1,159 @@
1
+ /**
2
+ * @file TypedNetworkRetriever.ts
3
+ * @description Retrieval adapter that turns the typed-network into a
4
+ * source of {@link ScoredMemoryTrace}s — drop-in compatible with the
5
+ * existing canonical-hybrid retrieval pipeline.
6
+ *
7
+ * **Pipeline (per query):**
8
+ *
9
+ * 1. Extract candidate entities from the query text via regex
10
+ * (proper nouns ≥ 3 chars, quoted strings).
11
+ * 2. Find seed facts in the {@link TypedNetworkStore} whose
12
+ * `entities` set intersects the query entities.
13
+ * 3. Run {@link TypedSpreadingActivation} from the seed set with
14
+ * Hindsight Eq. 12 max-aggregation.
15
+ * 4. Take top-K activated facts (sorted by activation level
16
+ * descending).
17
+ * 5. Convert each typed fact to a `ScoredMemoryTrace`-shaped object
18
+ * so the bench's reader pipeline picks it up alongside canonical
19
+ * chunks.
20
+ *
21
+ * The retriever is stateless aside from the store + spreading-
22
+ * activation engine it wraps. Safe to share across concurrent
23
+ * retrieves on the same store.
24
+ *
25
+ * @module @framers/agentos/memory/retrieval/typed-network/TypedNetworkRetriever
26
+ */
27
+ /**
28
+ * Extract candidate entity strings from a query. Matches the
29
+ * Mem0-v3-style regex extractor used at ingest time so query and
30
+ * fact entities use the same canonicalization.
31
+ *
32
+ * Captures:
33
+ * - Capitalized words ≥ 3 characters (proper nouns: "Berlin",
34
+ * "Docker", "TypeScript")
35
+ * - Double-quoted strings ("hello world")
36
+ * - Single-quoted strings ('like this')
37
+ *
38
+ * Returns deduplicated entity strings preserving original casing
39
+ * (case-sensitive comparison happens upstream).
40
+ */
41
+ export function extractQueryEntities(text) {
42
+ const properNouns = text.match(/\b[A-Z][a-zA-Z]{2,}\b/g) ?? [];
43
+ const dq = text.match(/"([^"]+)"/g)?.map((s) => s.slice(1, -1)) ?? [];
44
+ const sq = text.match(/'([^']+)'/g)?.map((s) => s.slice(1, -1)) ?? [];
45
+ return [...new Set([...properNouns, ...dq, ...sq])];
46
+ }
47
+ /**
48
+ * Adapter that produces canonical-shaped retrieval results from the
49
+ * typed-network store. Plugs into the bench's existing reader
50
+ * pipeline without requiring changes to downstream code.
51
+ */
52
+ export class TypedNetworkRetriever {
53
+ constructor(opts) {
54
+ this.store = opts.store;
55
+ this.spreading = opts.spreading;
56
+ this.maxDepth = opts.maxDepth ?? 3;
57
+ this.activationThreshold = opts.activationThreshold ?? 0.05;
58
+ }
59
+ /**
60
+ * Retrieve top-K typed facts for the query, formatted as
61
+ * {@link ScoredMemoryTrace}s. Returns an empty array when no
62
+ * query entities match seed facts in the store (e.g. queries with
63
+ * no proper nouns or quoted strings, or queries whose entities
64
+ * the typed network has not yet observed).
65
+ */
66
+ async retrieve(query, options) {
67
+ const entities = options.queryEntities ?? extractQueryEntities(query);
68
+ if (entities.length === 0)
69
+ return [];
70
+ // Seed selection: any fact whose entity set intersects the query
71
+ // entities. Case-insensitive intersection because LLM-extracted
72
+ // fact entities sometimes drop capitalization.
73
+ const lowerEntities = new Set(entities.map((e) => e.toLowerCase()));
74
+ const seedIds = [];
75
+ for (const fact of this.store.iterateFacts()) {
76
+ if (fact.entities.some((e) => lowerEntities.has(e.toLowerCase()))) {
77
+ seedIds.push(fact.id);
78
+ }
79
+ }
80
+ if (seedIds.length === 0)
81
+ return [];
82
+ // Spreading activation with Eq. 12 max-aggregate.
83
+ const activations = this.spreading.spread(this.store, seedIds, {
84
+ maxDepth: this.maxDepth,
85
+ activationThreshold: this.activationThreshold,
86
+ });
87
+ // Rank by activation, take top-K.
88
+ const ranked = [...activations.entries()]
89
+ .sort((a, b) => b[1] - a[1])
90
+ .slice(0, options.topK);
91
+ const traces = [];
92
+ for (const [factId, activation] of ranked) {
93
+ const fact = this.store.getFact(factId);
94
+ if (!fact)
95
+ continue;
96
+ traces.push(typedFactToScoredTrace(fact, activation, options.scope));
97
+ }
98
+ return traces;
99
+ }
100
+ }
101
+ /**
102
+ * Convert a {@link TypedFact} into a {@link ScoredMemoryTrace} for
103
+ * the bench's downstream reader pipeline. Renders the bank label
104
+ * inline in the content so the reader can distinguish typed facts
105
+ * from raw chunks at prompt time.
106
+ *
107
+ * Defaults follow the {@link HybridRetriever.factToScoredTrace}
108
+ * pattern: encoding strength 1, retrieval score = activation level,
109
+ * neutral emotional context, lifecycle timestamps drawn from the
110
+ * fact's mention timestamp.
111
+ */
112
+ export function typedFactToScoredTrace(fact, activation, scope) {
113
+ const mentionMs = Date.parse(fact.temporal.mention);
114
+ const ts = Number.isNaN(mentionMs) ? Date.now() : mentionMs;
115
+ // Bank-prefixed content gives the reader a hint about fact kind.
116
+ const content = `[${fact.bank}] ${fact.text}`;
117
+ return {
118
+ id: `typed-network:${fact.id}`,
119
+ type: 'semantic',
120
+ scope: scope.scope,
121
+ scopeId: scope.scopeId,
122
+ content,
123
+ entities: fact.entities,
124
+ tags: ['typed-network', `bank:${fact.bank}`],
125
+ provenance: {
126
+ sourceType: 'typed_network',
127
+ sourceTimestamp: ts,
128
+ confidence: fact.confidence,
129
+ verificationCount: 0,
130
+ },
131
+ emotionalContext: {
132
+ valence: 0,
133
+ arousal: 0,
134
+ dominance: 0,
135
+ intensity: 0,
136
+ gmiMood: '',
137
+ },
138
+ encodingStrength: 1,
139
+ stability: 1,
140
+ retrievalCount: 0,
141
+ lastAccessedAt: ts,
142
+ accessCount: 0,
143
+ reinforcementInterval: 0,
144
+ associatedTraceIds: [],
145
+ createdAt: ts,
146
+ updatedAt: ts,
147
+ isActive: true,
148
+ retrievalScore: activation,
149
+ scoreBreakdown: {
150
+ strengthScore: 1,
151
+ similarityScore: 0,
152
+ recencyScore: 0,
153
+ emotionalCongruenceScore: 0,
154
+ graphActivationScore: activation,
155
+ importanceScore: fact.confidence,
156
+ },
157
+ };
158
+ }
159
+ //# sourceMappingURL=TypedNetworkRetriever.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypedNetworkRetriever.js","sourceRoot":"","sources":["../../../../src/memory/retrieval/typed-network/TypedNetworkRetriever.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAOH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,IAAI,EAAE,CAAC;IAC/D,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACtE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACtE,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,WAAW,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,CAAC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EAAE,iBAAiB,IAAI,CAAC,EAAE,EAAE;QAC9B,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,OAAO;QACP,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,IAAI,EAAE,CAAC,eAAe,EAAE,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5C,UAAU,EAAE;YACV,UAAU,EAAE,eAAe;YAC3B,eAAe,EAAE,EAAE;YACnB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,iBAAiB,EAAE,CAAC;SACrB;QACD,gBAAgB,EAAE;YAChB,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,CAAC;YACV,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,CAAC;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,gBAAgB,EAAE,CAAC;QACnB,SAAS,EAAE,CAAC;QACZ,cAAc,EAAE,CAAC;QACjB,cAAc,EAAE,EAAE;QAClB,WAAW,EAAE,CAAC;QACd,qBAAqB,EAAE,CAAC;QACxB,kBAAkB,EAAE,EAAE;QACtB,SAAS,EAAE,EAAE;QACb,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE,UAAU;QAC1B,cAAc,EAAE;YACd,aAAa,EAAE,CAAC;YAChB,eAAe,EAAE,CAAC;YAClB,YAAY,EAAE,CAAC;YACf,wBAAwB,EAAE,CAAC;YAC3B,oBAAoB,EAAE,UAAU;YAChC,eAAe,EAAE,IAAI,CAAC,UAAU;SACjC;KACF,CAAC;AACJ,CAAC"}
@@ -15,4 +15,5 @@ export { TYPED_EXTRACTION_SYSTEM_PROMPT, buildExtractionUserPrompt, } from './pr
15
15
  export { TypedExtractionSchema, TypedExtractionFactSchema, type TypedExtractionOutput, type TypedExtractionFact, } from './prompts/extraction-schema.js';
16
16
  export { TypedSpreadingActivation, DEFAULT_EDGE_MULTIPLIERS, type TypedSpreadingActivationOptions, type SpreadOptions, } from './TypedSpreadingActivation.js';
17
17
  export { fourWayRrf, type FourWayRrfInput, type FourWayRrfOptions, } from './FourWayRrf.js';
18
+ export { TypedNetworkRetriever, extractQueryEntities, typedFactToScoredTrace, type TypedNetworkRetrieverOptions, type TypedNetworkRetrieveOptions, } from './TypedNetworkRetriever.js';
18
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/memory/retrieval/typed-network/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EACL,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,GACjC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,+BAA+B,EACpC,KAAK,aAAa,GACnB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/memory/retrieval/typed-network/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EACL,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,GACjC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,+BAA+B,EACpC,KAAK,aAAa,GACnB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,GACjC,MAAM,4BAA4B,CAAC"}
@@ -15,4 +15,5 @@ export { TYPED_EXTRACTION_SYSTEM_PROMPT, buildExtractionUserPrompt, } from './pr
15
15
  export { TypedExtractionSchema, TypedExtractionFactSchema, } from './prompts/extraction-schema.js';
16
16
  export { TypedSpreadingActivation, DEFAULT_EDGE_MULTIPLIERS, } from './TypedSpreadingActivation.js';
17
17
  export { fourWayRrf, } from './FourWayRrf.js';
18
+ export { TypedNetworkRetriever, extractQueryEntities, typedFactToScoredTrace, } from './TypedNetworkRetriever.js';
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/memory/retrieval/typed-network/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,QAAQ,EACR,UAAU,EACV,QAAQ,GAOT,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EACL,oBAAoB,GAGrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,qBAAqB,EACrB,yBAAyB,GAG1B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GAGzB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,UAAU,GAGX,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/memory/retrieval/typed-network/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,QAAQ,EACR,UAAU,EACV,QAAQ,GAOT,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EACL,oBAAoB,GAGrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,qBAAqB,EACrB,yBAAyB,GAG1B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GAGzB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,UAAU,GAGX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,GAGvB,MAAM,4BAA4B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@framers/agentos",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Modular AgentOS orchestration library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",