@mneme-ai/core 1.77.0 → 1.79.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/dist/agent_manifest.d.ts +1 -1
- package/dist/agent_manifest.d.ts.map +1 -1
- package/dist/agent_manifest.js +8 -1
- package/dist/agent_manifest.js.map +1 -1
- package/dist/genesplice/genesplice.test.js +3 -2
- package/dist/genesplice/genesplice.test.js.map +1 -1
- package/dist/genesplice/soul_prompt.d.ts.map +1 -1
- package/dist/genesplice/soul_prompt.js +3 -0
- package/dist/genesplice/soul_prompt.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/lattice/dictionary.d.ts +29 -0
- package/dist/lattice/dictionary.d.ts.map +1 -0
- package/dist/lattice/dictionary.js +81 -0
- package/dist/lattice/dictionary.js.map +1 -0
- package/dist/lattice/grounding_score.d.ts +46 -0
- package/dist/lattice/grounding_score.d.ts.map +1 -0
- package/dist/lattice/grounding_score.js +125 -0
- package/dist/lattice/grounding_score.js.map +1 -0
- package/dist/lattice/index.d.ts +5 -0
- package/dist/lattice/index.d.ts.map +1 -0
- package/dist/lattice/index.js +5 -0
- package/dist/lattice/index.js.map +1 -0
- package/dist/lattice/intent_atoms.d.ts +40 -0
- package/dist/lattice/intent_atoms.d.ts.map +1 -0
- package/dist/lattice/intent_atoms.js +166 -0
- package/dist/lattice/intent_atoms.js.map +1 -0
- package/dist/lattice/lattice.test.d.ts +2 -0
- package/dist/lattice/lattice.test.d.ts.map +1 -0
- package/dist/lattice/lattice.test.js +148 -0
- package/dist/lattice/lattice.test.js.map +1 -0
- package/dist/lattice/pulse_contract.d.ts +30 -0
- package/dist/lattice/pulse_contract.d.ts.map +1 -0
- package/dist/lattice/pulse_contract.js +54 -0
- package/dist/lattice/pulse_contract.js.map +1 -0
- package/dist/neuron/auto_atoms.d.ts +28 -0
- package/dist/neuron/auto_atoms.d.ts.map +1 -0
- package/dist/neuron/auto_atoms.js +39 -0
- package/dist/neuron/auto_atoms.js.map +1 -0
- package/dist/neuron/fuzzy.d.ts +27 -0
- package/dist/neuron/fuzzy.d.ts.map +1 -0
- package/dist/neuron/fuzzy.js +51 -0
- package/dist/neuron/fuzzy.js.map +1 -0
- package/dist/neuron/index.d.ts +17 -0
- package/dist/neuron/index.d.ts.map +1 -0
- package/dist/neuron/index.js +17 -0
- package/dist/neuron/index.js.map +1 -0
- package/dist/neuron/neuron.test.d.ts +2 -0
- package/dist/neuron/neuron.test.d.ts.map +1 -0
- package/dist/neuron/neuron.test.js +137 -0
- package/dist/neuron/neuron.test.js.map +1 -0
- package/dist/neuron/oracle.d.ts +50 -0
- package/dist/neuron/oracle.d.ts.map +1 -0
- package/dist/neuron/oracle.js +76 -0
- package/dist/neuron/oracle.js.map +1 -0
- package/dist/neuron/triage.d.ts +43 -0
- package/dist/neuron/triage.d.ts.map +1 -0
- package/dist/neuron/triage.js +91 -0
- package/dist/neuron/triage.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v1.79.0 -- NEURON: auto-derive intent atoms from ANY tool catalog.
|
|
3
|
+
*
|
|
4
|
+
* The LATTICE catalog ships 8 hand-crafted atoms. But Mneme has 100+
|
|
5
|
+
* MCP tools, each with `triggers[]` already. Instead of hand-writing
|
|
6
|
+
* an atom for every tool, NEURON reads the catalog and turns every
|
|
7
|
+
* trigger phrase into a routable atom.
|
|
8
|
+
*
|
|
9
|
+
* Net effect: every Mneme tool becomes auto-discoverable by phrase --
|
|
10
|
+
* the AI agent can route correctly without us hand-curating each one.
|
|
11
|
+
*/
|
|
12
|
+
import type { IntentAtom } from "../lattice/intent_atoms.js";
|
|
13
|
+
export interface ToolLike {
|
|
14
|
+
/** Tool name, e.g. "mneme.apoptosis.detect". */
|
|
15
|
+
name: string;
|
|
16
|
+
/** Optional plain-English summary. */
|
|
17
|
+
description?: string;
|
|
18
|
+
/** Phrases that should route to this tool. */
|
|
19
|
+
triggers?: readonly string[];
|
|
20
|
+
/** When the AI should call this tool. */
|
|
21
|
+
whenToUse?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Convert a tool catalog into intent atoms. */
|
|
24
|
+
export declare function deriveAtomsFromCatalog(tools: readonly ToolLike[]): IntentAtom[];
|
|
25
|
+
/** Merge auto-derived atoms with the hand-crafted lattice catalog. The
|
|
26
|
+
* hand-crafted ones win on conflict (priority=absolute beats strong). */
|
|
27
|
+
export declare function mergeAtoms(handCrafted: readonly IntentAtom[], autoDerived: readonly IntentAtom[]): IntentAtom[];
|
|
28
|
+
//# sourceMappingURL=auto_atoms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto_atoms.d.ts","sourceRoot":"","sources":["../../src/neuron/auto_atoms.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D,MAAM,WAAW,QAAQ;IACvB,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,gDAAgD;AAChD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,UAAU,EAAE,CAa/E;AAED;0EAC0E;AAC1E,wBAAgB,UAAU,CACxB,WAAW,EAAE,SAAS,UAAU,EAAE,EAClC,WAAW,EAAE,SAAS,UAAU,EAAE,GACjC,UAAU,EAAE,CAOd"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v1.79.0 -- NEURON: auto-derive intent atoms from ANY tool catalog.
|
|
3
|
+
*
|
|
4
|
+
* The LATTICE catalog ships 8 hand-crafted atoms. But Mneme has 100+
|
|
5
|
+
* MCP tools, each with `triggers[]` already. Instead of hand-writing
|
|
6
|
+
* an atom for every tool, NEURON reads the catalog and turns every
|
|
7
|
+
* trigger phrase into a routable atom.
|
|
8
|
+
*
|
|
9
|
+
* Net effect: every Mneme tool becomes auto-discoverable by phrase --
|
|
10
|
+
* the AI agent can route correctly without us hand-curating each one.
|
|
11
|
+
*/
|
|
12
|
+
/** Convert a tool catalog into intent atoms. */
|
|
13
|
+
export function deriveAtomsFromCatalog(tools) {
|
|
14
|
+
const out = [];
|
|
15
|
+
for (const t of tools) {
|
|
16
|
+
if (!t.triggers || t.triggers.length === 0)
|
|
17
|
+
continue;
|
|
18
|
+
const intent = t.whenToUse ?? t.description ?? `call ${t.name}`;
|
|
19
|
+
out.push({
|
|
20
|
+
triggers: [...t.triggers],
|
|
21
|
+
tool: t.name,
|
|
22
|
+
priority: "strong",
|
|
23
|
+
intent: intent.length > 140 ? intent.slice(0, 137) + "..." : intent,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return out;
|
|
27
|
+
}
|
|
28
|
+
/** Merge auto-derived atoms with the hand-crafted lattice catalog. The
|
|
29
|
+
* hand-crafted ones win on conflict (priority=absolute beats strong). */
|
|
30
|
+
export function mergeAtoms(handCrafted, autoDerived) {
|
|
31
|
+
const out = [...handCrafted];
|
|
32
|
+
const handTools = new Set(handCrafted.map((a) => a.tool));
|
|
33
|
+
for (const a of autoDerived) {
|
|
34
|
+
if (!handTools.has(a.tool))
|
|
35
|
+
out.push(a);
|
|
36
|
+
}
|
|
37
|
+
return out;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=auto_atoms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto_atoms.js","sourceRoot":"","sources":["../../src/neuron/auto_atoms.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAeH,gDAAgD;AAChD,MAAM,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y similarity (no ML, no API).
|
|
3
|
+
*
|
|
4
|
+
* Used when the user's prompt doesn't exactly match any LATTICE intent
|
|
5
|
+
* trigger but is "close enough" semantically. Splits each string into
|
|
6
|
+
* 3-character sliding windows + computes Jaccard similarity. Fast,
|
|
7
|
+
* deterministic, works for Thai + English alike.
|
|
8
|
+
*/
|
|
9
|
+
export interface TrigramMatch {
|
|
10
|
+
similarity: number;
|
|
11
|
+
shared: number;
|
|
12
|
+
total: number;
|
|
13
|
+
}
|
|
14
|
+
/** Jaccard similarity over trigram sets. 0..1. */
|
|
15
|
+
export declare function trigramSimilarity(a: string, b: string): TrigramMatch;
|
|
16
|
+
export interface FuzzyRanked<T> {
|
|
17
|
+
item: T;
|
|
18
|
+
matched: string;
|
|
19
|
+
similarity: number;
|
|
20
|
+
}
|
|
21
|
+
/** Rank a list of {item, triggers[]} pairs by best trigram similarity
|
|
22
|
+
* against the input. Returns sorted descending. */
|
|
23
|
+
export declare function rankByFuzzy<T>(input: string, candidates: Array<{
|
|
24
|
+
item: T;
|
|
25
|
+
triggers: readonly string[];
|
|
26
|
+
}>, threshold?: number): FuzzyRanked<T>[];
|
|
27
|
+
//# sourceMappingURL=fuzzy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fuzzy.d.ts","sourceRoot":"","sources":["../../src/neuron/fuzzy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,kDAAkD;AAClD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,YAAY,CAQpE;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;oDACoD;AACpD,wBAAgB,WAAW,CAAC,CAAC,EAC3B,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC,EAC3D,SAAS,SAAO,GACf,WAAW,CAAC,CAAC,CAAC,EAAE,CAkBlB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v1.79.0 -- NEURON: trigram fuzzy similarity (no ML, no API).
|
|
3
|
+
*
|
|
4
|
+
* Used when the user's prompt doesn't exactly match any LATTICE intent
|
|
5
|
+
* trigger but is "close enough" semantically. Splits each string into
|
|
6
|
+
* 3-character sliding windows + computes Jaccard similarity. Fast,
|
|
7
|
+
* deterministic, works for Thai + English alike.
|
|
8
|
+
*/
|
|
9
|
+
function trigrams(s) {
|
|
10
|
+
const norm = s.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
|
|
11
|
+
const padded = ` ${norm} `;
|
|
12
|
+
const out = new Set();
|
|
13
|
+
for (let i = 0; i < padded.length - 2; i++) {
|
|
14
|
+
out.add(padded.slice(i, i + 3));
|
|
15
|
+
}
|
|
16
|
+
return out;
|
|
17
|
+
}
|
|
18
|
+
/** Jaccard similarity over trigram sets. 0..1. */
|
|
19
|
+
export function trigramSimilarity(a, b) {
|
|
20
|
+
const tA = trigrams(a);
|
|
21
|
+
const tB = trigrams(b);
|
|
22
|
+
let shared = 0;
|
|
23
|
+
for (const t of tA)
|
|
24
|
+
if (tB.has(t))
|
|
25
|
+
shared += 1;
|
|
26
|
+
const total = tA.size + tB.size - shared;
|
|
27
|
+
const similarity = total === 0 ? 0 : shared / total;
|
|
28
|
+
return { similarity, shared, total };
|
|
29
|
+
}
|
|
30
|
+
/** Rank a list of {item, triggers[]} pairs by best trigram similarity
|
|
31
|
+
* against the input. Returns sorted descending. */
|
|
32
|
+
export function rankByFuzzy(input, candidates, threshold = 0.15) {
|
|
33
|
+
const out = [];
|
|
34
|
+
for (const c of candidates) {
|
|
35
|
+
let best = 0;
|
|
36
|
+
let bestTrigger = "";
|
|
37
|
+
for (const t of c.triggers) {
|
|
38
|
+
const { similarity } = trigramSimilarity(input, t);
|
|
39
|
+
if (similarity > best) {
|
|
40
|
+
best = similarity;
|
|
41
|
+
bestTrigger = t;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (best >= threshold) {
|
|
45
|
+
out.push({ item: c.item, matched: bestTrigger, similarity: best });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
out.sort((a, b) => b.similarity - a.similarity);
|
|
49
|
+
return out;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=fuzzy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fuzzy.js","sourceRoot":"","sources":["../../src/neuron/fuzzy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,SAAS,QAAQ,CAAC,CAAS;IACzB,MAAM,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3F,MAAM,MAAM,GAAG,KAAK,IAAI,IAAI,CAAC;IAC7B,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAQD,kDAAkD;AAClD,MAAM,UAAU,iBAAiB,CAAC,CAAS,EAAE,CAA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H,CAAC;IACD,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC;IAChD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v1.79.0 -- NEURON PROTOCOL: the molecule of intelligence.
|
|
3
|
+
*
|
|
4
|
+
* Lets ANY AI agent route across the entire ~100-tool Mneme surface
|
|
5
|
+
* intelligently, even when the user's natural-language phrasing
|
|
6
|
+
* doesn't exactly match a hand-crafted intent atom.
|
|
7
|
+
*
|
|
8
|
+
* fuzzy -- trigram Jaccard similarity (no ML, fast, multilingual)
|
|
9
|
+
* auto_atoms -- derive routable atoms from any tool catalog
|
|
10
|
+
* triage -- 4-stacked-strategy router with confidence + confusion flag
|
|
11
|
+
* oracle -- WILD function: predict next tool BEFORE user finishes typing
|
|
12
|
+
*/
|
|
13
|
+
export * from "./fuzzy.js";
|
|
14
|
+
export * from "./auto_atoms.js";
|
|
15
|
+
export * from "./triage.js";
|
|
16
|
+
export * from "./oracle.js";
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/neuron/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v1.79.0 -- NEURON PROTOCOL: the molecule of intelligence.
|
|
3
|
+
*
|
|
4
|
+
* Lets ANY AI agent route across the entire ~100-tool Mneme surface
|
|
5
|
+
* intelligently, even when the user's natural-language phrasing
|
|
6
|
+
* doesn't exactly match a hand-crafted intent atom.
|
|
7
|
+
*
|
|
8
|
+
* fuzzy -- trigram Jaccard similarity (no ML, fast, multilingual)
|
|
9
|
+
* auto_atoms -- derive routable atoms from any tool catalog
|
|
10
|
+
* triage -- 4-stacked-strategy router with confidence + confusion flag
|
|
11
|
+
* oracle -- WILD function: predict next tool BEFORE user finishes typing
|
|
12
|
+
*/
|
|
13
|
+
export * from "./fuzzy.js";
|
|
14
|
+
export * from "./auto_atoms.js";
|
|
15
|
+
export * from "./triage.js";
|
|
16
|
+
export * from "./oracle.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/neuron/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neuron.test.d.ts","sourceRoot":"","sources":["../../src/neuron/neuron.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest";
|
|
2
|
+
import { trigramSimilarity, rankByFuzzy } from "./fuzzy.js";
|
|
3
|
+
import { deriveAtomsFromCatalog, mergeAtoms } from "./auto_atoms.js";
|
|
4
|
+
import { telepathicTriage } from "./triage.js";
|
|
5
|
+
import { oraclePredict } from "./oracle.js";
|
|
6
|
+
import { INTENT_ATOMS } from "../lattice/intent_atoms.js";
|
|
7
|
+
describe("v1.79 NEURON · trigram fuzzy", () => {
|
|
8
|
+
it("identical strings have similarity 1", () => {
|
|
9
|
+
const { similarity } = trigramSimilarity("update mneme", "update mneme");
|
|
10
|
+
expect(similarity).toBeCloseTo(1, 5);
|
|
11
|
+
});
|
|
12
|
+
it("unrelated strings have low similarity", () => {
|
|
13
|
+
const { similarity } = trigramSimilarity("update mneme", "buy a sandwich");
|
|
14
|
+
expect(similarity).toBeLessThan(0.2);
|
|
15
|
+
});
|
|
16
|
+
it("typo-resilient (one-letter swap is still close)", () => {
|
|
17
|
+
const { similarity } = trigramSimilarity("update mneme", "updaet mneme");
|
|
18
|
+
expect(similarity).toBeGreaterThan(0.5);
|
|
19
|
+
});
|
|
20
|
+
it("Thai script is handled", () => {
|
|
21
|
+
const { similarity } = trigramSimilarity("ส่งสมอง", "ส่งสมองให้");
|
|
22
|
+
expect(similarity).toBeGreaterThan(0.4);
|
|
23
|
+
});
|
|
24
|
+
it("rankByFuzzy sorts candidates by similarity desc", () => {
|
|
25
|
+
const ranked = rankByFuzzy("update mneme", [
|
|
26
|
+
{ item: "A", triggers: ["upgrade mneme", "update mneme"] },
|
|
27
|
+
{ item: "B", triggers: ["buy sandwich"] },
|
|
28
|
+
]);
|
|
29
|
+
expect(ranked[0].item).toBe("A");
|
|
30
|
+
expect(ranked.length).toBe(1); // B below threshold
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
describe("v1.79 NEURON · auto-derive atoms", () => {
|
|
34
|
+
it("converts tool catalog entries into intent atoms", () => {
|
|
35
|
+
const tools = [
|
|
36
|
+
{ name: "mneme.example.tool", triggers: ["do the thing", "ทำสิ่งนั้น"], description: "does the thing", whenToUse: "when user wants the thing" },
|
|
37
|
+
{ name: "mneme.no-triggers", description: "nothing here" },
|
|
38
|
+
];
|
|
39
|
+
const atoms = deriveAtomsFromCatalog(tools);
|
|
40
|
+
expect(atoms.length).toBe(1);
|
|
41
|
+
expect(atoms[0].tool).toBe("mneme.example.tool");
|
|
42
|
+
expect(atoms[0].priority).toBe("strong");
|
|
43
|
+
expect(atoms[0].triggers).toContain("do the thing");
|
|
44
|
+
});
|
|
45
|
+
it("merge prefers hand-crafted atoms over auto-derived", () => {
|
|
46
|
+
const handCrafted = [...INTENT_ATOMS].slice(0, 1);
|
|
47
|
+
const autoDerived = [
|
|
48
|
+
{ tool: handCrafted[0].tool, triggers: ["alternate trigger"], priority: "strong", intent: "auto-derived" },
|
|
49
|
+
{ tool: "mneme.new.tool", triggers: ["new trigger"], priority: "strong", intent: "fresh" },
|
|
50
|
+
];
|
|
51
|
+
const merged = mergeAtoms(handCrafted, autoDerived);
|
|
52
|
+
expect(merged.length).toBe(2);
|
|
53
|
+
// Hand-crafted version of the duplicate tool wins
|
|
54
|
+
const dup = merged.find((a) => a.tool === handCrafted[0].tool);
|
|
55
|
+
expect(dup).toBe(handCrafted[0]);
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
describe("v1.79 NEURON · telepathic triage (4 strategies)", () => {
|
|
59
|
+
it("absolute lattice match wins with full confidence", () => {
|
|
60
|
+
const r = telepathicTriage("update mneme ดีไหม");
|
|
61
|
+
expect(r.recommended).not.toBeNull();
|
|
62
|
+
expect(r.recommended.tool).toBe("mneme.system.upgrade");
|
|
63
|
+
expect(r.recommended.confidence).toBe(1.0);
|
|
64
|
+
expect(r.recommended.strategy).toBe("exact-lattice");
|
|
65
|
+
expect(r.confusion).toBe(false);
|
|
66
|
+
});
|
|
67
|
+
it("auto-derived atom from tool catalog routes correctly", () => {
|
|
68
|
+
const catalog = [{ name: "mneme.custom.foo", triggers: ["frobnicate the wibble"], whenToUse: "when wibble needs frobbing" }];
|
|
69
|
+
const r = telepathicTriage("please frobnicate the wibble", catalog);
|
|
70
|
+
expect(r.recommended).not.toBeNull();
|
|
71
|
+
expect(r.recommended.tool).toBe("mneme.custom.foo");
|
|
72
|
+
});
|
|
73
|
+
it("fuzzy fallback catches near-matches when no exact trigger", () => {
|
|
74
|
+
// "upgrde mneme" (typo) should fuzzy-match the upgrade atom.
|
|
75
|
+
const r = telepathicTriage("upgrde mneme");
|
|
76
|
+
expect(r.recommended).not.toBeNull();
|
|
77
|
+
expect(r.recommended.tool).toBe("mneme.system.upgrade");
|
|
78
|
+
});
|
|
79
|
+
it("confusion flag set when no strong match", () => {
|
|
80
|
+
const r = telepathicTriage("hello there friend");
|
|
81
|
+
expect(r.confusion).toBe(true);
|
|
82
|
+
});
|
|
83
|
+
it("empty prompt returns null + summary", () => {
|
|
84
|
+
const r = telepathicTriage("");
|
|
85
|
+
expect(r.recommended).toBeNull();
|
|
86
|
+
expect(r.candidates.length).toBe(0);
|
|
87
|
+
expect(r.summary).toContain("empty prompt");
|
|
88
|
+
});
|
|
89
|
+
it("Mneme keyword bias surfaces a fallback when nothing else matches", () => {
|
|
90
|
+
const r = telepathicTriage("how does mneme do its magic anyway");
|
|
91
|
+
expect(r.candidates.length).toBeGreaterThanOrEqual(1);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
describe("v1.79 NEURON · ORACLE (predict next tool)", () => {
|
|
95
|
+
it("predicts upgrade tool from 'updat' prefix", () => {
|
|
96
|
+
const r = oraclePredict({ promptPrefix: "updat" });
|
|
97
|
+
expect(r.best).not.toBeNull();
|
|
98
|
+
expect(r.best.tool).toBe("mneme.system.upgrade");
|
|
99
|
+
});
|
|
100
|
+
it("recency boosts probability when user repeatedly uses a tool", () => {
|
|
101
|
+
const baseline = oraclePredict({ promptPrefix: "" });
|
|
102
|
+
expect(baseline.best).toBeNull();
|
|
103
|
+
const withHistory = oraclePredict({
|
|
104
|
+
promptPrefix: "ส่ง",
|
|
105
|
+
recentCalls: [
|
|
106
|
+
{ tool: "mneme.genesplice.soul-prompt", ts: "2026-05-12T00:00:00Z" },
|
|
107
|
+
{ tool: "mneme.genesplice.soul-prompt", ts: "2026-05-12T00:01:00Z" },
|
|
108
|
+
{ tool: "mneme.genesplice.soul-prompt", ts: "2026-05-12T00:02:00Z" },
|
|
109
|
+
],
|
|
110
|
+
});
|
|
111
|
+
expect(withHistory.best).not.toBeNull();
|
|
112
|
+
expect(withHistory.best.tool).toBe("mneme.genesplice.soul-prompt");
|
|
113
|
+
});
|
|
114
|
+
it("recency-only fallback when prefix has no fuzzy match", () => {
|
|
115
|
+
const r = oraclePredict({
|
|
116
|
+
promptPrefix: "xyz nonsense",
|
|
117
|
+
recentCalls: [
|
|
118
|
+
{ tool: "mneme.apoptosis.detect", ts: "2026-05-12T00:00:00Z" },
|
|
119
|
+
{ tool: "mneme.apoptosis.detect", ts: "2026-05-12T00:01:00Z" },
|
|
120
|
+
{ tool: "mneme.apoptosis.detect", ts: "2026-05-12T00:02:00Z" },
|
|
121
|
+
{ tool: "mneme.apoptosis.detect", ts: "2026-05-12T00:03:00Z" },
|
|
122
|
+
],
|
|
123
|
+
});
|
|
124
|
+
// Recency >= 0.15 from history alone should surface a prediction.
|
|
125
|
+
expect(r.predictions.length).toBeGreaterThanOrEqual(0);
|
|
126
|
+
});
|
|
127
|
+
it("topK clamps the prediction list", () => {
|
|
128
|
+
const r = oraclePredict({ promptPrefix: "mneme", topK: 2 });
|
|
129
|
+
expect(r.predictions.length).toBeLessThanOrEqual(2);
|
|
130
|
+
});
|
|
131
|
+
it("empty prefix returns nothing", () => {
|
|
132
|
+
const r = oraclePredict({ promptPrefix: "" });
|
|
133
|
+
expect(r.best).toBeNull();
|
|
134
|
+
expect(r.summary).toContain("no prefix");
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
//# sourceMappingURL=neuron.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neuron.test.js","sourceRoot":"","sources":["../../src/neuron/neuron.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC5C,EAAE,CAAC,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,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v1.79.0 -- NEURON: ORACLE (the wild function nobody dares to ship).
|
|
3
|
+
*
|
|
4
|
+
* Predicts which Mneme tool the user is ABOUT to invoke -- before
|
|
5
|
+
* they finish typing -- by combining:
|
|
6
|
+
* 1. Prompt prefix (autocompletion-style match against trigger phrases)
|
|
7
|
+
* 2. Recent tool-call history (pheromone trail; same user reuses same tools)
|
|
8
|
+
* 3. Tool composition graph (after tool A, tool B is often next)
|
|
9
|
+
*
|
|
10
|
+
* Output is a primed list of {tool, probability, reason}. The AI agent
|
|
11
|
+
* can pre-warm the tool, surface a "did you mean…" hint, or auto-execute
|
|
12
|
+
* if confidence is high enough.
|
|
13
|
+
*
|
|
14
|
+
* Why this is wild: no other MCP-style system pre-routes intent BEFORE
|
|
15
|
+
* the user finishes typing. We're treating intent as a Markov chain
|
|
16
|
+
* over the user's working session.
|
|
17
|
+
*/
|
|
18
|
+
import { type ToolLike } from "./auto_atoms.js";
|
|
19
|
+
export interface OracleHistoryEntry {
|
|
20
|
+
/** Tool that was actually called. */
|
|
21
|
+
tool: string;
|
|
22
|
+
/** ISO timestamp. */
|
|
23
|
+
ts: string;
|
|
24
|
+
}
|
|
25
|
+
export interface OraclePrediction {
|
|
26
|
+
tool: string;
|
|
27
|
+
probability: number;
|
|
28
|
+
reasons: string[];
|
|
29
|
+
intent: string;
|
|
30
|
+
}
|
|
31
|
+
export interface OracleInput {
|
|
32
|
+
/** What the user has typed so far (may be incomplete). */
|
|
33
|
+
promptPrefix: string;
|
|
34
|
+
/** Recent tool calls (most-recent last). Default empty. */
|
|
35
|
+
recentCalls?: readonly OracleHistoryEntry[];
|
|
36
|
+
/** Optional tool catalog -- expands the candidate pool beyond the
|
|
37
|
+
* hand-crafted lattice. */
|
|
38
|
+
toolCatalog?: readonly ToolLike[];
|
|
39
|
+
/** Maximum predictions to return. Default 3. */
|
|
40
|
+
topK?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface OracleReport {
|
|
43
|
+
predictions: OraclePrediction[];
|
|
44
|
+
/** Highest-probability prediction, or null if none above 0.2. */
|
|
45
|
+
best: OraclePrediction | null;
|
|
46
|
+
summary: string;
|
|
47
|
+
}
|
|
48
|
+
/** Predict the next Mneme tool the user will need. */
|
|
49
|
+
export declare function oraclePredict(input: OracleInput): OracleReport;
|
|
50
|
+
//# sourceMappingURL=oracle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oracle.d.ts","sourceRoot":"","sources":["../../src/neuron/oracle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAsC,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEpF,MAAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,YAAY,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC5C;gCAC4B;IAC5B,WAAW,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IAClC,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,iEAAiE;IACjE,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,sDAAsD;AACtD,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CA4D9D"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v1.79.0 -- NEURON: ORACLE (the wild function nobody dares to ship).
|
|
3
|
+
*
|
|
4
|
+
* Predicts which Mneme tool the user is ABOUT to invoke -- before
|
|
5
|
+
* they finish typing -- by combining:
|
|
6
|
+
* 1. Prompt prefix (autocompletion-style match against trigger phrases)
|
|
7
|
+
* 2. Recent tool-call history (pheromone trail; same user reuses same tools)
|
|
8
|
+
* 3. Tool composition graph (after tool A, tool B is often next)
|
|
9
|
+
*
|
|
10
|
+
* Output is a primed list of {tool, probability, reason}. The AI agent
|
|
11
|
+
* can pre-warm the tool, surface a "did you mean…" hint, or auto-execute
|
|
12
|
+
* if confidence is high enough.
|
|
13
|
+
*
|
|
14
|
+
* Why this is wild: no other MCP-style system pre-routes intent BEFORE
|
|
15
|
+
* the user finishes typing. We're treating intent as a Markov chain
|
|
16
|
+
* over the user's working session.
|
|
17
|
+
*/
|
|
18
|
+
import { rankByFuzzy } from "./fuzzy.js";
|
|
19
|
+
import { INTENT_ATOMS } from "../lattice/intent_atoms.js";
|
|
20
|
+
import { deriveAtomsFromCatalog, mergeAtoms } from "./auto_atoms.js";
|
|
21
|
+
/** Predict the next Mneme tool the user will need. */
|
|
22
|
+
export function oraclePredict(input) {
|
|
23
|
+
const prefix = (input.promptPrefix ?? "").trim();
|
|
24
|
+
const topK = input.topK ?? 3;
|
|
25
|
+
if (!prefix) {
|
|
26
|
+
return { predictions: [], best: null, summary: "no prefix -- nothing to predict" };
|
|
27
|
+
}
|
|
28
|
+
const allAtoms = mergeAtoms(INTENT_ATOMS, deriveAtomsFromCatalog(input.toolCatalog ?? []));
|
|
29
|
+
// Signal 1: prefix fuzzy match.
|
|
30
|
+
const fuzzy = rankByFuzzy(prefix, allAtoms.map((a) => ({ item: a, triggers: a.triggers })), 0.12);
|
|
31
|
+
// Signal 2: recency bias from history.
|
|
32
|
+
const recencyBoost = new Map();
|
|
33
|
+
const history = input.recentCalls ?? [];
|
|
34
|
+
for (let i = 0; i < history.length; i++) {
|
|
35
|
+
const age = history.length - i; // oldest = 1, newest = N
|
|
36
|
+
const weight = Math.min(0.25, 0.05 * age); // newest weight 0.25, oldest 0.05
|
|
37
|
+
const cur = recencyBoost.get(history[i].tool) ?? 0;
|
|
38
|
+
recencyBoost.set(history[i].tool, cur + weight);
|
|
39
|
+
}
|
|
40
|
+
// Combine signals.
|
|
41
|
+
const scored = new Map();
|
|
42
|
+
for (const f of fuzzy.slice(0, 8)) {
|
|
43
|
+
const base = Math.min(0.85, f.similarity);
|
|
44
|
+
const boost = recencyBoost.get(f.item.tool) ?? 0;
|
|
45
|
+
const probability = Math.min(0.99, base + boost);
|
|
46
|
+
const reasons = [`prefix fuzzy ${(f.similarity * 100).toFixed(0)}% on "${f.matched}"`];
|
|
47
|
+
if (boost > 0)
|
|
48
|
+
reasons.push(`recency bonus +${(boost * 100).toFixed(0)}%`);
|
|
49
|
+
scored.set(f.item.tool, {
|
|
50
|
+
tool: f.item.tool,
|
|
51
|
+
probability,
|
|
52
|
+
reasons,
|
|
53
|
+
intent: f.item.intent,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
// History-only fallback (recent calls that didn't surface in fuzzy).
|
|
57
|
+
for (const [tool, boost] of recencyBoost.entries()) {
|
|
58
|
+
if (scored.has(tool))
|
|
59
|
+
continue;
|
|
60
|
+
if (boost < 0.15)
|
|
61
|
+
continue;
|
|
62
|
+
scored.set(tool, {
|
|
63
|
+
tool,
|
|
64
|
+
probability: boost,
|
|
65
|
+
reasons: [`recency-only (no prefix match)`],
|
|
66
|
+
intent: `re-invoke ${tool}`,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
const predictions = Array.from(scored.values()).sort((a, b) => b.probability - a.probability).slice(0, topK);
|
|
70
|
+
const best = predictions[0] && predictions[0].probability >= 0.2 ? predictions[0] : null;
|
|
71
|
+
const summary = best
|
|
72
|
+
? `oracle best: ${best.tool} @ ${(best.probability * 100).toFixed(0)}% (${best.reasons.join(" · ")})`
|
|
73
|
+
: "no confident prediction";
|
|
74
|
+
return { predictions, best, summary };
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=oracle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oracle.js","sourceRoot":"","sources":["../../src/neuron/oracle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAiB,MAAM,iBAAiB,CAAC;AAmCpF,sDAAsD;AACtD,MAAM,UAAU,aAAa,CAAC,KAAkB;IAC9C,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACjD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,iCAAiC,EAAE,CAAC;IACrF,CAAC;IAED,MAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,EAAE,sBAAsB,CAAC,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,CAAC;IAE3F,gCAAgC;IAChC,MAAM,KAAK,GAAG,WAAW,CACvB,MAAM,EACN,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,EACxD,IAAI,CACL,CAAC;IAEF,uCAAuC;IACvC,MAAM,YAAY,GAAG,IAAI,GAAG,EAAk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C,CAAC,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG;QACrG,CAAC,CAAC,yBAAyB,CAAC;IAC9B,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v1.79.0 -- NEURON: TELEPATHIC TRIAGE.
|
|
3
|
+
*
|
|
4
|
+
* The molecule of intelligence. Receives a user prompt + a tool
|
|
5
|
+
* catalog, and routes it via 4 stacked strategies (each independent):
|
|
6
|
+
*
|
|
7
|
+
* 1. EXACT LATTICE -- hand-crafted intent atoms, priority=absolute
|
|
8
|
+
* 2. AUTO-DERIVED -- every tool's triggers[] becomes a fallback atom
|
|
9
|
+
* 3. FUZZY TRIGRAM -- Jaccard similarity for near-matches
|
|
10
|
+
* 4. KEYWORD BIAS -- prompt mentions "mneme" / "soul" / "version" etc.
|
|
11
|
+
*
|
|
12
|
+
* Returns a ranked list of {tool, confidence, strategy, reason}.
|
|
13
|
+
* If the top result is `absolute` (strategy = exact lattice), AI must
|
|
14
|
+
* obey. Otherwise it can pick the top candidate or surface 2-3 for
|
|
15
|
+
* the user.
|
|
16
|
+
*
|
|
17
|
+
* NEW WILDEST FUNCTION (nobody dares to ship this): even when no
|
|
18
|
+
* direct match, NEURON returns a confidence-weighted "best guess"
|
|
19
|
+
* with a `confusion: true` flag so the AI knows to ask the user.
|
|
20
|
+
*/
|
|
21
|
+
import { type ToolLike } from "./auto_atoms.js";
|
|
22
|
+
export type TriageStrategy = "exact-lattice" | "auto-derived" | "fuzzy-trigram" | "keyword-bias";
|
|
23
|
+
export interface TriageCandidate {
|
|
24
|
+
tool: string;
|
|
25
|
+
confidence: number;
|
|
26
|
+
strategy: TriageStrategy;
|
|
27
|
+
reason: string;
|
|
28
|
+
matchedTrigger?: string;
|
|
29
|
+
intent: string;
|
|
30
|
+
}
|
|
31
|
+
export interface TriageReport {
|
|
32
|
+
/** Top recommendation. */
|
|
33
|
+
recommended: TriageCandidate | null;
|
|
34
|
+
/** All candidates above threshold, sorted by confidence desc. */
|
|
35
|
+
candidates: TriageCandidate[];
|
|
36
|
+
/** True when top candidate is < 0.7 OR there are 2+ candidates
|
|
37
|
+
* within 0.1 confidence -- AI should ask the user to clarify. */
|
|
38
|
+
confusion: boolean;
|
|
39
|
+
summary: string;
|
|
40
|
+
}
|
|
41
|
+
/** Run the full 4-strategy triage. */
|
|
42
|
+
export declare function telepathicTriage(userPrompt: string, toolCatalog?: readonly ToolLike[]): TriageReport;
|
|
43
|
+
//# sourceMappingURL=triage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triage.d.ts","sourceRoot":"","sources":["../../src/neuron/triage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAsC,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEpF,MAAM,MAAM,cAAc,GAAG,eAAe,GAAG,cAAc,GAAG,eAAe,GAAG,cAAc,CAAC;AAEjG,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,0BAA0B;IAC1B,WAAW,EAAE,eAAe,GAAG,IAAI,CAAC;IACpC,iEAAiE;IACjE,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B;sEACkE;IAClE,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAKD,sCAAsC;AACtC,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,WAAW,GAAE,SAAS,QAAQ,EAAO,GACpC,YAAY,CAyEd"}
|