@mneme-ai/core 2.19.7 → 2.19.9

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.
Files changed (32) hide show
  1. package/dist/cosmic/aurelian_v198.test.d.ts +2 -0
  2. package/dist/cosmic/aurelian_v198.test.d.ts.map +1 -0
  3. package/dist/cosmic/aurelian_v198.test.js +57 -0
  4. package/dist/cosmic/aurelian_v198.test.js.map +1 -0
  5. package/dist/cosmic/aurelian_v199.test.d.ts +2 -0
  6. package/dist/cosmic/aurelian_v199.test.d.ts.map +1 -0
  7. package/dist/cosmic/aurelian_v199.test.js +33 -0
  8. package/dist/cosmic/aurelian_v199.test.js.map +1 -0
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +11 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/whats_new.d.ts.map +1 -1
  14. package/dist/whats_new.js +16 -0
  15. package/dist/whats_new.js.map +1 -1
  16. package/dist/wrapper_genesis/index.d.ts +110 -0
  17. package/dist/wrapper_genesis/index.d.ts.map +1 -0
  18. package/dist/wrapper_genesis/index.js +367 -0
  19. package/dist/wrapper_genesis/index.js.map +1 -0
  20. package/dist/wrapper_genesis/wrapper_genesis.test.d.ts +2 -0
  21. package/dist/wrapper_genesis/wrapper_genesis.test.d.ts.map +1 -0
  22. package/dist/wrapper_genesis/wrapper_genesis.test.js +152 -0
  23. package/dist/wrapper_genesis/wrapper_genesis.test.js.map +1 -0
  24. package/dist/wrapper_genesplicing/index.d.ts +133 -0
  25. package/dist/wrapper_genesplicing/index.d.ts.map +1 -0
  26. package/dist/wrapper_genesplicing/index.js +301 -0
  27. package/dist/wrapper_genesplicing/index.js.map +1 -0
  28. package/dist/wrapper_genesplicing/wrapper_genesplicing.test.d.ts +2 -0
  29. package/dist/wrapper_genesplicing/wrapper_genesplicing.test.d.ts.map +1 -0
  30. package/dist/wrapper_genesplicing/wrapper_genesplicing.test.js +228 -0
  31. package/dist/wrapper_genesplicing/wrapper_genesplicing.test.js.map +1 -0
  32. package/package.json +1 -1
@@ -0,0 +1,133 @@
1
+ /**
2
+ * v2.19.9 — MNEME WRAPPER GENESPLICING (runtime chimera composition)
3
+ *
4
+ * "Every MCP server in the field treats its tool catalog as a static
5
+ * array baked in at boot. Mneme inverts the contract: an AI agent
6
+ * can request a NEW tool at runtime by passing a RECIPE of existing
7
+ * tool names; we compose them into a CHIMERA, sign the recipe with
8
+ * HMAC, set a TTL, and return the chimera as a callable. The chimera
9
+ * name is content-addressed (same recipe → same name → free dedup).
10
+ *
11
+ * Sequential composition (A→B→C) pipes outputs; fan-out runs all in
12
+ * parallel; first-success cascades through fallbacks. Popular chimeras
13
+ * (high call count after TTL) auto-flag for promotion to permanent
14
+ * catalog status. Re-callable in the next turn without rebuilding."
15
+ *
16
+ * Honest scope:
17
+ * - We do NOT inject the chimera into the live MCP server's catalog
18
+ * dynamically (the MCP transport doesn't support catalog mutation).
19
+ * We DO expose a stable `executeChimera(name, inputs)` entry point
20
+ * that the AI agent calls via a static MCP tool (`mneme.genome.execute_chimera`).
21
+ * - The execute step requires the CALLER to supply a tool-handler
22
+ * registry (Map<name, handler>) so we don't take a hard dependency
23
+ * on the MCP package. The MCP wrapper provides this registry from
24
+ * `buildAllTools()`.
25
+ * - Partial failures: sequential aborts at first error; fan-out
26
+ * returns all results (some may error); first-success continues until
27
+ * the first non-error.
28
+ * - TTL is wall-clock; expired chimeras GC on next gc() call or next
29
+ * splice (lazy cleanup).
30
+ *
31
+ * Pure orchestrator. Composes onto every existing MCP tool. ~300 LOC.
32
+ */
33
+ declare const PROTOCOL_VERSION: 1;
34
+ export type ComposerKind = "sequential" | "fan_out" | "first_success";
35
+ export interface ChimeraDef {
36
+ v: typeof PROTOCOL_VERSION;
37
+ chimeraName: string;
38
+ recipe: string[];
39
+ composer: ComposerKind;
40
+ /** Optional rename: maps step output keys to the next step's input keys.
41
+ * e.g., {"0.output": "1.input"} — for sequential mode. */
42
+ argMapping: Record<string, string>;
43
+ /** TTL in seconds. */
44
+ ttlSec: number;
45
+ /** Wall-clock expiry timestamp. */
46
+ expiresAt: string;
47
+ /** Number of times this chimera has been executed. */
48
+ callCount: number;
49
+ /** Last-call timestamp. */
50
+ lastCalledAt: string | null;
51
+ /** True iff caller registered this as permanent. */
52
+ promoted: boolean;
53
+ createdAt: string;
54
+ /** HMAC over the canonical body (excluding callCount + lastCalledAt + promoted, since those mutate). */
55
+ sig: string;
56
+ }
57
+ export interface SpliceInput {
58
+ recipe: string[];
59
+ composer?: ComposerKind;
60
+ argMapping?: Record<string, string>;
61
+ ttlSec?: number;
62
+ nowMs?: number;
63
+ secret?: string;
64
+ }
65
+ export interface ExecutionStep {
66
+ step: number;
67
+ toolName: string;
68
+ ok: boolean;
69
+ output?: unknown;
70
+ error?: string;
71
+ durationMs: number;
72
+ }
73
+ export interface ExecutionResult {
74
+ v: typeof PROTOCOL_VERSION;
75
+ executionId: string;
76
+ chimeraName: string;
77
+ composer: ComposerKind;
78
+ steps: ExecutionStep[];
79
+ /** Final value (sequential: last step's output; fan_out: array; first_success: first ok). */
80
+ finalOutput: unknown;
81
+ /** Overall ok = sequential: all ok; fan_out: any ok; first_success: any ok */
82
+ ok: boolean;
83
+ totalDurationMs: number;
84
+ executedAt: string;
85
+ sig: string;
86
+ }
87
+ export type ToolHandler = (args: Record<string, unknown>) => Promise<unknown> | unknown;
88
+ export type ToolRegistry = Map<string, ToolHandler>;
89
+ export interface GenespliceOptions {
90
+ /** Minimum call count before promotion is suggested. */
91
+ promotionThreshold?: number;
92
+ }
93
+ export declare class WrapperGenesplicing {
94
+ private chimeras;
95
+ private secret;
96
+ private promotionThreshold;
97
+ constructor(opts?: GenespliceOptions & {
98
+ secret?: string;
99
+ });
100
+ splice(input: SpliceInput): ChimeraDef;
101
+ execute(input: {
102
+ chimeraName: string;
103
+ inputs: Record<string, unknown>;
104
+ registry: ToolRegistry;
105
+ nowMs?: number;
106
+ }): Promise<ExecutionResult>;
107
+ promotionCandidates(): ChimeraDef[];
108
+ promote(chimeraName: string): ChimeraDef | null;
109
+ gc(nowMs?: number): {
110
+ removed: number;
111
+ remaining: number;
112
+ };
113
+ private gcExpired;
114
+ list(): ChimeraDef[];
115
+ get(chimeraName: string): ChimeraDef | undefined;
116
+ stats(): {
117
+ total: number;
118
+ promoted: number;
119
+ expired: number;
120
+ avgCallCount: number;
121
+ mostUsed: {
122
+ name: string;
123
+ count: number;
124
+ } | null;
125
+ };
126
+ verifyChimera(c: ChimeraDef): boolean;
127
+ verifyExecution(r: ExecutionResult): boolean;
128
+ }
129
+ export declare function formatChimeraLine(c: ChimeraDef): string;
130
+ export declare function formatExecutionLine(r: ExecutionResult): string;
131
+ export declare function defaultGenesplicing(): WrapperGenesplicing;
132
+ export {};
133
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wrapper_genesplicing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAIH,QAAA,MAAM,gBAAgB,EAAG,CAAU,CAAC;AAEpC,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,SAAS,GAAG,eAAe,CAAC;AAEtE,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,OAAO,gBAAgB,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC;IACvB;+DAC2D;IAC3D,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,oDAAoD;IACpD,QAAQ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GAAG,MAAM,CAGvD;AACD,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,CAG9D;AAGD,wBAAgB,mBAAmB,IAAI,mBAAmB,CAGzD"}
@@ -0,0 +1,301 @@
1
+ /**
2
+ * v2.19.9 — MNEME WRAPPER GENESPLICING (runtime chimera composition)
3
+ *
4
+ * "Every MCP server in the field treats its tool catalog as a static
5
+ * array baked in at boot. Mneme inverts the contract: an AI agent
6
+ * can request a NEW tool at runtime by passing a RECIPE of existing
7
+ * tool names; we compose them into a CHIMERA, sign the recipe with
8
+ * HMAC, set a TTL, and return the chimera as a callable. The chimera
9
+ * name is content-addressed (same recipe → same name → free dedup).
10
+ *
11
+ * Sequential composition (A→B→C) pipes outputs; fan-out runs all in
12
+ * parallel; first-success cascades through fallbacks. Popular chimeras
13
+ * (high call count after TTL) auto-flag for promotion to permanent
14
+ * catalog status. Re-callable in the next turn without rebuilding."
15
+ *
16
+ * Honest scope:
17
+ * - We do NOT inject the chimera into the live MCP server's catalog
18
+ * dynamically (the MCP transport doesn't support catalog mutation).
19
+ * We DO expose a stable `executeChimera(name, inputs)` entry point
20
+ * that the AI agent calls via a static MCP tool (`mneme.genome.execute_chimera`).
21
+ * - The execute step requires the CALLER to supply a tool-handler
22
+ * registry (Map<name, handler>) so we don't take a hard dependency
23
+ * on the MCP package. The MCP wrapper provides this registry from
24
+ * `buildAllTools()`.
25
+ * - Partial failures: sequential aborts at first error; fan-out
26
+ * returns all results (some may error); first-success continues until
27
+ * the first non-error.
28
+ * - TTL is wall-clock; expired chimeras GC on next gc() call or next
29
+ * splice (lazy cleanup).
30
+ *
31
+ * Pure orchestrator. Composes onto every existing MCP tool. ~300 LOC.
32
+ */
33
+ import { createHmac, timingSafeEqual } from "node:crypto";
34
+ const PROTOCOL_VERSION = 1;
35
+ function canon(v) {
36
+ if (v === null || typeof v !== "object")
37
+ return JSON.stringify(v);
38
+ if (Array.isArray(v))
39
+ return "[" + v.map(canon).join(",") + "]";
40
+ const keys = Object.keys(v).sort();
41
+ return "{" + keys.map((k) => JSON.stringify(k) + ":" + canon(v[k])).join(",") + "}";
42
+ }
43
+ function defaultSecret() {
44
+ return process.env["MNEME_GENESPLICE_SECRET"] || `mneme-genesplicing-v${PROTOCOL_VERSION}`;
45
+ }
46
+ function hmac(body, secret) {
47
+ return createHmac("sha256", secret).update(canon(body)).digest("hex");
48
+ }
49
+ function safeEqHex(a, b) {
50
+ try {
51
+ return timingSafeEqual(Buffer.from(a, "hex"), Buffer.from(b, "hex"));
52
+ }
53
+ catch {
54
+ return false;
55
+ }
56
+ }
57
+ /**
58
+ * Content-addressed chimera name: same (recipe + composer + argMapping)
59
+ * → same name. Recipe-deduplication for free.
60
+ */
61
+ function chimeraIdFor(recipe, composer, argMapping) {
62
+ return createHmac("sha256", "mneme-chimera-id")
63
+ .update(canon({ recipe, composer, argMapping }))
64
+ .digest("hex").slice(0, 16);
65
+ }
66
+ export class WrapperGenesplicing {
67
+ chimeras = new Map();
68
+ secret;
69
+ promotionThreshold;
70
+ constructor(opts = {}) {
71
+ this.secret = opts.secret ?? defaultSecret();
72
+ this.promotionThreshold = opts.promotionThreshold ?? 10;
73
+ }
74
+ // ─── splice — create chimera (or return existing on dedup) ────────────
75
+ splice(input) {
76
+ if (!input.recipe || input.recipe.length < 1) {
77
+ throw new Error("GENESPLICE: recipe must contain at least 1 tool name");
78
+ }
79
+ if (input.recipe.length > 16) {
80
+ throw new Error("GENESPLICE: recipe length > 16 — split into smaller chimeras");
81
+ }
82
+ const composer = input.composer ?? "sequential";
83
+ const argMapping = input.argMapping ?? {};
84
+ const ttlSec = input.ttlSec ?? 600;
85
+ const now = input.nowMs ?? Date.now();
86
+ const id = chimeraIdFor(input.recipe, composer, argMapping);
87
+ const chimeraName = `mneme.chimera.${id}`;
88
+ // Lazy GC of expired chimeras
89
+ this.gcExpired(now);
90
+ // Dedup: same content + still alive → return existing
91
+ const existing = this.chimeras.get(chimeraName);
92
+ if (existing && Date.parse(existing.expiresAt) > now) {
93
+ return existing;
94
+ }
95
+ const createdAt = new Date(now).toISOString();
96
+ const expiresAt = new Date(now + ttlSec * 1000).toISOString();
97
+ const body = {
98
+ v: PROTOCOL_VERSION,
99
+ chimeraName,
100
+ recipe: input.recipe.slice(),
101
+ composer,
102
+ argMapping,
103
+ ttlSec,
104
+ expiresAt,
105
+ createdAt,
106
+ };
107
+ const sig = hmac(body, input.secret ?? this.secret);
108
+ const chimera = {
109
+ ...body,
110
+ callCount: 0,
111
+ lastCalledAt: null,
112
+ promoted: false,
113
+ sig,
114
+ };
115
+ this.chimeras.set(chimeraName, chimera);
116
+ return chimera;
117
+ }
118
+ // ─── execute — run a chimera with a tool registry ─────────────────────
119
+ async execute(input) {
120
+ const now = input.nowMs ?? Date.now();
121
+ const chimera = this.chimeras.get(input.chimeraName);
122
+ if (!chimera)
123
+ throw new Error(`GENESPLICE: chimera '${input.chimeraName}' not found (may have expired)`);
124
+ if (Date.parse(chimera.expiresAt) <= now) {
125
+ this.chimeras.delete(input.chimeraName);
126
+ throw new Error(`GENESPLICE: chimera '${input.chimeraName}' expired at ${chimera.expiresAt}`);
127
+ }
128
+ const startedAt = Date.now();
129
+ const steps = [];
130
+ let finalOutput = undefined;
131
+ let overallOk = true;
132
+ if (chimera.composer === "sequential") {
133
+ let prev = { ...input.inputs };
134
+ for (let i = 0; i < chimera.recipe.length; i++) {
135
+ const toolName = chimera.recipe[i];
136
+ const handler = input.registry.get(toolName);
137
+ const t0 = Date.now();
138
+ if (!handler) {
139
+ steps.push({ step: i, toolName, ok: false, error: `tool '${toolName}' not in registry`, durationMs: 0 });
140
+ overallOk = false;
141
+ break;
142
+ }
143
+ try {
144
+ const out = await handler(prev);
145
+ steps.push({ step: i, toolName, ok: true, output: out, durationMs: Date.now() - t0 });
146
+ // Pipe: if output is object, use as next input; else wrap in { prev }
147
+ prev = (typeof out === "object" && out !== null && !Array.isArray(out))
148
+ ? { ...prev, ...out }
149
+ : { ...prev, prev: out };
150
+ finalOutput = out;
151
+ }
152
+ catch (e) {
153
+ steps.push({ step: i, toolName, ok: false, error: e.message, durationMs: Date.now() - t0 });
154
+ overallOk = false;
155
+ break; // abort on first error
156
+ }
157
+ }
158
+ }
159
+ else if (chimera.composer === "fan_out") {
160
+ const promises = chimera.recipe.map(async (toolName, i) => {
161
+ const handler = input.registry.get(toolName);
162
+ const t0 = Date.now();
163
+ if (!handler) {
164
+ return { step: i, toolName, ok: false, error: `tool '${toolName}' not in registry`, durationMs: 0 };
165
+ }
166
+ try {
167
+ const out = await handler({ ...input.inputs });
168
+ return { step: i, toolName, ok: true, output: out, durationMs: Date.now() - t0 };
169
+ }
170
+ catch (e) {
171
+ return { step: i, toolName, ok: false, error: e.message, durationMs: Date.now() - t0 };
172
+ }
173
+ });
174
+ const all = await Promise.all(promises);
175
+ steps.push(...all);
176
+ finalOutput = all.map((s) => s.ok ? s.output : { error: s.error });
177
+ overallOk = all.some((s) => s.ok); // fan_out is ok if AT LEAST ONE succeeded
178
+ }
179
+ else if (chimera.composer === "first_success") {
180
+ let succeeded = false;
181
+ for (let i = 0; i < chimera.recipe.length; i++) {
182
+ const toolName = chimera.recipe[i];
183
+ const handler = input.registry.get(toolName);
184
+ const t0 = Date.now();
185
+ if (!handler) {
186
+ steps.push({ step: i, toolName, ok: false, error: `tool '${toolName}' not in registry`, durationMs: 0 });
187
+ continue;
188
+ }
189
+ try {
190
+ const out = await handler({ ...input.inputs });
191
+ steps.push({ step: i, toolName, ok: true, output: out, durationMs: Date.now() - t0 });
192
+ finalOutput = out;
193
+ succeeded = true;
194
+ break;
195
+ }
196
+ catch (e) {
197
+ steps.push({ step: i, toolName, ok: false, error: e.message, durationMs: Date.now() - t0 });
198
+ }
199
+ }
200
+ overallOk = succeeded;
201
+ }
202
+ // Update call count + last-called
203
+ chimera.callCount++;
204
+ chimera.lastCalledAt = new Date(now).toISOString();
205
+ const executionId = "exe-" + createHmac("sha256", "mneme-chimera-exec-id")
206
+ .update(`${input.chimeraName}|${chimera.callCount}|${now}`)
207
+ .digest("hex").slice(0, 14);
208
+ const totalDurationMs = Date.now() - startedAt;
209
+ const body = {
210
+ v: PROTOCOL_VERSION,
211
+ executionId,
212
+ chimeraName: input.chimeraName,
213
+ composer: chimera.composer,
214
+ steps,
215
+ finalOutput,
216
+ ok: overallOk,
217
+ totalDurationMs,
218
+ executedAt: new Date(now).toISOString(),
219
+ };
220
+ const sig = hmac(body, this.secret);
221
+ return { ...body, sig };
222
+ }
223
+ // ─── promotion — flag popular chimeras for permanent catalog status ───
224
+ promotionCandidates() {
225
+ return Array.from(this.chimeras.values()).filter((c) => c.callCount >= this.promotionThreshold && !c.promoted);
226
+ }
227
+ promote(chimeraName) {
228
+ const c = this.chimeras.get(chimeraName);
229
+ if (!c)
230
+ return null;
231
+ c.promoted = true;
232
+ // Extend TTL by 100x once promoted
233
+ const extended = new Date(Date.parse(c.expiresAt) + c.ttlSec * 100 * 1000).toISOString();
234
+ c.expiresAt = extended;
235
+ return c;
236
+ }
237
+ // ─── GC ─────────────────────────────────────────────────────────────────
238
+ gc(nowMs) {
239
+ const now = nowMs ?? Date.now();
240
+ return this.gcExpired(now);
241
+ }
242
+ gcExpired(now) {
243
+ let removed = 0;
244
+ for (const [name, c] of this.chimeras) {
245
+ // Don't GC promoted chimeras even if expiresAt past
246
+ if (c.promoted)
247
+ continue;
248
+ if (Date.parse(c.expiresAt) <= now) {
249
+ this.chimeras.delete(name);
250
+ removed++;
251
+ }
252
+ }
253
+ return { removed, remaining: this.chimeras.size };
254
+ }
255
+ // ─── Introspection ──────────────────────────────────────────────────────
256
+ list() {
257
+ return Array.from(this.chimeras.values());
258
+ }
259
+ get(chimeraName) {
260
+ return this.chimeras.get(chimeraName);
261
+ }
262
+ stats() {
263
+ const all = Array.from(this.chimeras.values());
264
+ const now = Date.now();
265
+ const expired = all.filter((c) => Date.parse(c.expiresAt) <= now).length;
266
+ const promoted = all.filter((c) => c.promoted).length;
267
+ const totalCalls = all.reduce((a, c) => a + c.callCount, 0);
268
+ const mostUsed = all.length === 0 ? null : all.reduce((best, c) => (best.callCount >= c.callCount ? best : c));
269
+ return {
270
+ total: all.length,
271
+ promoted,
272
+ expired,
273
+ avgCallCount: all.length === 0 ? 0 : Math.round((totalCalls / all.length) * 100) / 100,
274
+ mostUsed: mostUsed ? { name: mostUsed.chimeraName, count: mostUsed.callCount } : null,
275
+ };
276
+ }
277
+ // ─── Verify ───────────────────────────────────────────────────────────
278
+ verifyChimera(c) {
279
+ const { sig, callCount: _cc, lastCalledAt: _lca, promoted: _p, ...body } = c;
280
+ return safeEqHex(hmac(body, this.secret), sig);
281
+ }
282
+ verifyExecution(r) {
283
+ const { sig, ...body } = r;
284
+ return safeEqHex(hmac(body, this.secret), sig);
285
+ }
286
+ }
287
+ export function formatChimeraLine(c) {
288
+ const icon = c.promoted ? "🌟" : "🧬";
289
+ return `${icon} CHIMERA · ${c.chimeraName.slice(15)} · ${c.recipe.length}-step ${c.composer} · calls=${c.callCount} · expires ${c.expiresAt.slice(11, 19)}`;
290
+ }
291
+ export function formatExecutionLine(r) {
292
+ const okSteps = r.steps.filter((s) => s.ok).length;
293
+ return `🧬 EXEC · ${r.chimeraName.slice(15)} · ${r.composer} · ${okSteps}/${r.steps.length} ok · ${r.totalDurationMs}ms`;
294
+ }
295
+ let _instance = null;
296
+ export function defaultGenesplicing() {
297
+ if (!_instance)
298
+ _instance = new WrapperGenesplicing();
299
+ return _instance;
300
+ }
301
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wrapper_genesplicing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,gBAAgB,GAAG,CAAU,CAAC;AA+DpC,SAAS,KAAK,CAAC,CAAU;IACvB,IAAI,CAAC,KAAK,IAAI,IAAI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AAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,QAAQ,MAAM,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC,CAAC,eAAe,IAAI,CAAC;AAC3H,CAAC;AAED,IAAI,SAAS,GAA+B,IAAI,CAAC;AACjD,MAAM,UAAU,mBAAmB;IACjC,IAAI,CAAC,SAAS;QAAE,SAAS,GAAG,IAAI,mBAAmB,EAAE,CAAC;IACtD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=wrapper_genesplicing.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrapper_genesplicing.test.d.ts","sourceRoot":"","sources":["../../src/wrapper_genesplicing/wrapper_genesplicing.test.ts"],"names":[],"mappings":""}