@mneme-ai/core 2.8.1 → 2.9.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.
- package/dist/beacon/beacon.test.d.ts +2 -0
- package/dist/beacon/beacon.test.d.ts.map +1 -0
- package/dist/beacon/beacon.test.js +98 -0
- package/dist/beacon/beacon.test.js.map +1 -0
- package/dist/beacon/index.d.ts +106 -0
- package/dist/beacon/index.d.ts.map +1 -0
- package/dist/beacon/index.js +249 -0
- package/dist/beacon/index.js.map +1 -0
- package/dist/dynamic/pack-schema.d.ts +52 -52
- package/dist/handoff/index.d.ts +1 -0
- package/dist/handoff/index.d.ts.map +1 -1
- package/dist/handoff/index.js +4 -0
- package/dist/handoff/index.js.map +1 -1
- package/dist/handoff/live_state.d.ts +70 -0
- package/dist/handoff/live_state.d.ts.map +1 -0
- package/dist/handoff/live_state.js +161 -0
- package/dist/handoff/live_state.js.map +1 -0
- package/dist/handoff/live_state.test.d.ts +2 -0
- package/dist/handoff/live_state.test.d.ts.map +1 -0
- package/dist/handoff/live_state.test.js +83 -0
- package/dist/handoff/live_state.test.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -70,12 +70,12 @@ declare const GitHistoryQuerySchema: z.ZodObject<{
|
|
|
70
70
|
/** Maximum commits to return per path. */
|
|
71
71
|
maxCommits: z.ZodDefault<z.ZodNumber>;
|
|
72
72
|
}, "strip", z.ZodTypeAny, {
|
|
73
|
-
kind: "git-history";
|
|
74
73
|
paths: string[];
|
|
74
|
+
kind: "git-history";
|
|
75
75
|
maxCommits: number;
|
|
76
76
|
}, {
|
|
77
|
-
kind: "git-history";
|
|
78
77
|
paths: string[];
|
|
78
|
+
kind: "git-history";
|
|
79
79
|
maxCommits?: number | undefined;
|
|
80
80
|
}>;
|
|
81
81
|
declare const EntityGraphQuerySchema: z.ZodObject<{
|
|
@@ -126,12 +126,12 @@ declare const QuerySchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
|
126
126
|
/** Maximum commits to return per path. */
|
|
127
127
|
maxCommits: z.ZodDefault<z.ZodNumber>;
|
|
128
128
|
}, "strip", z.ZodTypeAny, {
|
|
129
|
-
kind: "git-history";
|
|
130
129
|
paths: string[];
|
|
130
|
+
kind: "git-history";
|
|
131
131
|
maxCommits: number;
|
|
132
132
|
}, {
|
|
133
|
-
kind: "git-history";
|
|
134
133
|
paths: string[];
|
|
134
|
+
kind: "git-history";
|
|
135
135
|
maxCommits?: number | undefined;
|
|
136
136
|
}>, z.ZodObject<{
|
|
137
137
|
kind: z.ZodLiteral<"entity-graph">;
|
|
@@ -214,12 +214,12 @@ declare const ToolDefinitionSchema: z.ZodObject<{
|
|
|
214
214
|
/** Maximum commits to return per path. */
|
|
215
215
|
maxCommits: z.ZodDefault<z.ZodNumber>;
|
|
216
216
|
}, "strip", z.ZodTypeAny, {
|
|
217
|
-
kind: "git-history";
|
|
218
217
|
paths: string[];
|
|
218
|
+
kind: "git-history";
|
|
219
219
|
maxCommits: number;
|
|
220
220
|
}, {
|
|
221
|
-
kind: "git-history";
|
|
222
221
|
paths: string[];
|
|
222
|
+
kind: "git-history";
|
|
223
223
|
maxCommits?: number | undefined;
|
|
224
224
|
}>, z.ZodObject<{
|
|
225
225
|
kind: z.ZodLiteral<"entity-graph">;
|
|
@@ -269,8 +269,6 @@ declare const ToolDefinitionSchema: z.ZodObject<{
|
|
|
269
269
|
}>>;
|
|
270
270
|
}, "strip", z.ZodTypeAny, {
|
|
271
271
|
id: string;
|
|
272
|
-
description: string;
|
|
273
|
-
inputSchema: Record<string, any>;
|
|
274
272
|
query: {
|
|
275
273
|
kind: "code-search";
|
|
276
274
|
patterns: string[];
|
|
@@ -278,8 +276,8 @@ declare const ToolDefinitionSchema: z.ZodObject<{
|
|
|
278
276
|
maxResults: number;
|
|
279
277
|
ranking: "centrality-desc" | "recency-desc" | "alphabetical";
|
|
280
278
|
} | {
|
|
281
|
-
kind: "git-history";
|
|
282
279
|
paths: string[];
|
|
280
|
+
kind: "git-history";
|
|
283
281
|
maxCommits: number;
|
|
284
282
|
} | {
|
|
285
283
|
kind: "entity-graph";
|
|
@@ -287,6 +285,8 @@ declare const ToolDefinitionSchema: z.ZodObject<{
|
|
|
287
285
|
relationKinds: string[];
|
|
288
286
|
maxDepth: number;
|
|
289
287
|
};
|
|
288
|
+
description: string;
|
|
289
|
+
inputSchema: Record<string, any>;
|
|
290
290
|
enrichWith: ("git-blame" | "first-commit-introduced" | "centrality-rank" | "incident-cross-reference" | "atrophy-author" | "constitution-rules")[];
|
|
291
291
|
augmentation: {
|
|
292
292
|
includeCanonicalPath: boolean;
|
|
@@ -297,7 +297,6 @@ declare const ToolDefinitionSchema: z.ZodObject<{
|
|
|
297
297
|
};
|
|
298
298
|
}, {
|
|
299
299
|
id: string;
|
|
300
|
-
description: string;
|
|
301
300
|
query: {
|
|
302
301
|
kind: "code-search";
|
|
303
302
|
patterns: string[];
|
|
@@ -305,8 +304,8 @@ declare const ToolDefinitionSchema: z.ZodObject<{
|
|
|
305
304
|
maxResults?: number | undefined;
|
|
306
305
|
ranking?: "centrality-desc" | "recency-desc" | "alphabetical" | undefined;
|
|
307
306
|
} | {
|
|
308
|
-
kind: "git-history";
|
|
309
307
|
paths: string[];
|
|
308
|
+
kind: "git-history";
|
|
310
309
|
maxCommits?: number | undefined;
|
|
311
310
|
} | {
|
|
312
311
|
kind: "entity-graph";
|
|
@@ -314,6 +313,7 @@ declare const ToolDefinitionSchema: z.ZodObject<{
|
|
|
314
313
|
relationKinds?: string[] | undefined;
|
|
315
314
|
maxDepth?: number | undefined;
|
|
316
315
|
};
|
|
316
|
+
description: string;
|
|
317
317
|
inputSchema?: Record<string, any> | undefined;
|
|
318
318
|
enrichWith?: ("git-blame" | "first-commit-introduced" | "centrality-rank" | "incident-cross-reference" | "atrophy-author" | "constitution-rules")[] | undefined;
|
|
319
319
|
augmentation?: {
|
|
@@ -344,12 +344,12 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
344
344
|
url: z.ZodOptional<z.ZodString>;
|
|
345
345
|
}, "strip", z.ZodTypeAny, {
|
|
346
346
|
name: string;
|
|
347
|
-
email?: string | undefined;
|
|
348
347
|
url?: string | undefined;
|
|
348
|
+
email?: string | undefined;
|
|
349
349
|
}, {
|
|
350
350
|
name: string;
|
|
351
|
-
email?: string | undefined;
|
|
352
351
|
url?: string | undefined;
|
|
352
|
+
email?: string | undefined;
|
|
353
353
|
}>;
|
|
354
354
|
/** SPDX license id. */
|
|
355
355
|
license: z.ZodDefault<z.ZodString>;
|
|
@@ -416,12 +416,12 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
416
416
|
/** Maximum commits to return per path. */
|
|
417
417
|
maxCommits: z.ZodDefault<z.ZodNumber>;
|
|
418
418
|
}, "strip", z.ZodTypeAny, {
|
|
419
|
-
kind: "git-history";
|
|
420
419
|
paths: string[];
|
|
420
|
+
kind: "git-history";
|
|
421
421
|
maxCommits: number;
|
|
422
422
|
}, {
|
|
423
|
-
kind: "git-history";
|
|
424
423
|
paths: string[];
|
|
424
|
+
kind: "git-history";
|
|
425
425
|
maxCommits?: number | undefined;
|
|
426
426
|
}>, z.ZodObject<{
|
|
427
427
|
kind: z.ZodLiteral<"entity-graph">;
|
|
@@ -471,8 +471,6 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
471
471
|
}>>;
|
|
472
472
|
}, "strip", z.ZodTypeAny, {
|
|
473
473
|
id: string;
|
|
474
|
-
description: string;
|
|
475
|
-
inputSchema: Record<string, any>;
|
|
476
474
|
query: {
|
|
477
475
|
kind: "code-search";
|
|
478
476
|
patterns: string[];
|
|
@@ -480,8 +478,8 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
480
478
|
maxResults: number;
|
|
481
479
|
ranking: "centrality-desc" | "recency-desc" | "alphabetical";
|
|
482
480
|
} | {
|
|
483
|
-
kind: "git-history";
|
|
484
481
|
paths: string[];
|
|
482
|
+
kind: "git-history";
|
|
485
483
|
maxCommits: number;
|
|
486
484
|
} | {
|
|
487
485
|
kind: "entity-graph";
|
|
@@ -489,6 +487,8 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
489
487
|
relationKinds: string[];
|
|
490
488
|
maxDepth: number;
|
|
491
489
|
};
|
|
490
|
+
description: string;
|
|
491
|
+
inputSchema: Record<string, any>;
|
|
492
492
|
enrichWith: ("git-blame" | "first-commit-introduced" | "centrality-rank" | "incident-cross-reference" | "atrophy-author" | "constitution-rules")[];
|
|
493
493
|
augmentation: {
|
|
494
494
|
includeCanonicalPath: boolean;
|
|
@@ -499,7 +499,6 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
499
499
|
};
|
|
500
500
|
}, {
|
|
501
501
|
id: string;
|
|
502
|
-
description: string;
|
|
503
502
|
query: {
|
|
504
503
|
kind: "code-search";
|
|
505
504
|
patterns: string[];
|
|
@@ -507,8 +506,8 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
507
506
|
maxResults?: number | undefined;
|
|
508
507
|
ranking?: "centrality-desc" | "recency-desc" | "alphabetical" | undefined;
|
|
509
508
|
} | {
|
|
510
|
-
kind: "git-history";
|
|
511
509
|
paths: string[];
|
|
510
|
+
kind: "git-history";
|
|
512
511
|
maxCommits?: number | undefined;
|
|
513
512
|
} | {
|
|
514
513
|
kind: "entity-graph";
|
|
@@ -516,6 +515,7 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
516
515
|
relationKinds?: string[] | undefined;
|
|
517
516
|
maxDepth?: number | undefined;
|
|
518
517
|
};
|
|
518
|
+
description: string;
|
|
519
519
|
inputSchema?: Record<string, any> | undefined;
|
|
520
520
|
enrichWith?: ("git-blame" | "first-commit-introduced" | "centrality-rank" | "incident-cross-reference" | "atrophy-author" | "constitution-rules")[] | undefined;
|
|
521
521
|
augmentation?: {
|
|
@@ -527,29 +527,10 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
527
527
|
} | undefined;
|
|
528
528
|
}>, "many">;
|
|
529
529
|
}, "strict", z.ZodTypeAny, {
|
|
530
|
-
schemaVersion: 1;
|
|
531
530
|
id: string;
|
|
532
|
-
displayName: string;
|
|
533
|
-
description: string;
|
|
534
531
|
version: string;
|
|
535
|
-
mnemeMinVersion: string;
|
|
536
|
-
maintainer: {
|
|
537
|
-
name: string;
|
|
538
|
-
email?: string | undefined;
|
|
539
|
-
url?: string | undefined;
|
|
540
|
-
};
|
|
541
|
-
license: string;
|
|
542
|
-
detection: {
|
|
543
|
-
packageDeps: string[];
|
|
544
|
-
pythonDeps: string[];
|
|
545
|
-
importPatterns: string[];
|
|
546
|
-
filePatterns: string[];
|
|
547
|
-
minConfidence: number;
|
|
548
|
-
};
|
|
549
532
|
tools: {
|
|
550
533
|
id: string;
|
|
551
|
-
description: string;
|
|
552
|
-
inputSchema: Record<string, any>;
|
|
553
534
|
query: {
|
|
554
535
|
kind: "code-search";
|
|
555
536
|
patterns: string[];
|
|
@@ -557,8 +538,8 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
557
538
|
maxResults: number;
|
|
558
539
|
ranking: "centrality-desc" | "recency-desc" | "alphabetical";
|
|
559
540
|
} | {
|
|
560
|
-
kind: "git-history";
|
|
561
541
|
paths: string[];
|
|
542
|
+
kind: "git-history";
|
|
562
543
|
maxCommits: number;
|
|
563
544
|
} | {
|
|
564
545
|
kind: "entity-graph";
|
|
@@ -566,6 +547,8 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
566
547
|
relationKinds: string[];
|
|
567
548
|
maxDepth: number;
|
|
568
549
|
};
|
|
550
|
+
description: string;
|
|
551
|
+
inputSchema: Record<string, any>;
|
|
569
552
|
enrichWith: ("git-blame" | "first-commit-introduced" | "centrality-rank" | "incident-cross-reference" | "atrophy-author" | "constitution-rules")[];
|
|
570
553
|
augmentation: {
|
|
571
554
|
includeCanonicalPath: boolean;
|
|
@@ -575,28 +558,28 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
575
558
|
includeApplicableRules: boolean;
|
|
576
559
|
};
|
|
577
560
|
}[];
|
|
578
|
-
|
|
561
|
+
description: string;
|
|
579
562
|
schemaVersion: 1;
|
|
580
|
-
id: string;
|
|
581
563
|
displayName: string;
|
|
582
|
-
description: string;
|
|
583
|
-
version: string;
|
|
584
564
|
mnemeMinVersion: string;
|
|
585
565
|
maintainer: {
|
|
586
566
|
name: string;
|
|
587
|
-
email?: string | undefined;
|
|
588
567
|
url?: string | undefined;
|
|
568
|
+
email?: string | undefined;
|
|
589
569
|
};
|
|
570
|
+
license: string;
|
|
590
571
|
detection: {
|
|
591
|
-
packageDeps
|
|
592
|
-
pythonDeps
|
|
593
|
-
importPatterns
|
|
594
|
-
filePatterns
|
|
595
|
-
minConfidence
|
|
572
|
+
packageDeps: string[];
|
|
573
|
+
pythonDeps: string[];
|
|
574
|
+
importPatterns: string[];
|
|
575
|
+
filePatterns: string[];
|
|
576
|
+
minConfidence: number;
|
|
596
577
|
};
|
|
578
|
+
}, {
|
|
579
|
+
id: string;
|
|
580
|
+
version: string;
|
|
597
581
|
tools: {
|
|
598
582
|
id: string;
|
|
599
|
-
description: string;
|
|
600
583
|
query: {
|
|
601
584
|
kind: "code-search";
|
|
602
585
|
patterns: string[];
|
|
@@ -604,8 +587,8 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
604
587
|
maxResults?: number | undefined;
|
|
605
588
|
ranking?: "centrality-desc" | "recency-desc" | "alphabetical" | undefined;
|
|
606
589
|
} | {
|
|
607
|
-
kind: "git-history";
|
|
608
590
|
paths: string[];
|
|
591
|
+
kind: "git-history";
|
|
609
592
|
maxCommits?: number | undefined;
|
|
610
593
|
} | {
|
|
611
594
|
kind: "entity-graph";
|
|
@@ -613,6 +596,7 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
613
596
|
relationKinds?: string[] | undefined;
|
|
614
597
|
maxDepth?: number | undefined;
|
|
615
598
|
};
|
|
599
|
+
description: string;
|
|
616
600
|
inputSchema?: Record<string, any> | undefined;
|
|
617
601
|
enrichWith?: ("git-blame" | "first-commit-introduced" | "centrality-rank" | "incident-cross-reference" | "atrophy-author" | "constitution-rules")[] | undefined;
|
|
618
602
|
augmentation?: {
|
|
@@ -623,6 +607,22 @@ export declare const PackSchema: z.ZodObject<{
|
|
|
623
607
|
includeApplicableRules?: boolean | undefined;
|
|
624
608
|
} | undefined;
|
|
625
609
|
}[];
|
|
610
|
+
description: string;
|
|
611
|
+
schemaVersion: 1;
|
|
612
|
+
displayName: string;
|
|
613
|
+
mnemeMinVersion: string;
|
|
614
|
+
maintainer: {
|
|
615
|
+
name: string;
|
|
616
|
+
url?: string | undefined;
|
|
617
|
+
email?: string | undefined;
|
|
618
|
+
};
|
|
619
|
+
detection: {
|
|
620
|
+
packageDeps?: string[] | undefined;
|
|
621
|
+
pythonDeps?: string[] | undefined;
|
|
622
|
+
importPatterns?: string[] | undefined;
|
|
623
|
+
filePatterns?: string[] | undefined;
|
|
624
|
+
minConfidence?: number | undefined;
|
|
625
|
+
};
|
|
626
626
|
license?: string | undefined;
|
|
627
627
|
}>;
|
|
628
628
|
export type Pack = z.infer<typeof PackSchema>;
|
package/dist/handoff/index.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ export declare function buildAuraDropDataUri(input: HandoffInput): {
|
|
|
80
80
|
bytes: number;
|
|
81
81
|
} | null;
|
|
82
82
|
/** Compose the full handoff bundle. */
|
|
83
|
+
export * from "./live_state.js";
|
|
83
84
|
export declare function handoffUniversal(input: HandoffInput): HandoffBundle;
|
|
84
85
|
/** Format a one-liner pulse summary. */
|
|
85
86
|
export declare function formatHandoffPulseLine(b: HandoffBundle): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handoff/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAIH,MAAM,WAAW,YAAY;IAC3B,4DAA4D;IAC5D,OAAO,EA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103
|
return code;
|
|
104
104
|
}
|
|
105
105
|
/** Compose the full handoff bundle. */
|
|
106
|
+
// v2.9.1 -- LIVE STATE injector (auto-prepends current Mneme version /
|
|
107
|
+
// recent commits / HMAC-signed signature to every soul prompt going
|
|
108
|
+
// through clone.to so stale capsules don't mislead the receiving AI).
|
|
109
|
+
export * from "./live_state.js";
|
|
106
110
|
export function handoffUniversal(input) {
|
|
107
111
|
const paths = [];
|
|
108
112
|
const nexusCode = input.nexusCode ?? genNexusCode(input.payload);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/handoff/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA8CrD,+DAA+D;AAC/D,+DAA+D;AAC/D,kEAAkE;AAClE,kEAAkE;AAClE,oEAAoE;AACpE,8BAA8B;AAC9B,+DAA+D;AAE/D,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,OAAe,EAAE,MAAc,EAAE,UAAkB,EAAU,EAAE,CAAC;;;;SAI7F,UAAU,CAAC,KAAK,CAAC;;;;;;;;;;MAUpB,UAAU,CAAC,KAAK,CAAC;;;8KAGuJ,UAAU,CAAC,MAAM,CAAC;;6BAEnK,UAAU,CAAC,MAAM,CAAC,kCAAkC,UAAU,CAAC,UAAU,CAAC;cACzF,UAAU,CAAC,OAAO,CAAC;eAClB,CAAC;AAEhB,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACtG,CAAC;AAED,SAAS,eAAe,CAAC,MAAc;IACrC,MAAM,CAAC,G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AI,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClE,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACxE,MAAM,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC7C,MAAM,YAAY,GAAG,uIAAuI,SAAS,GAAG,CAAC;IACzK,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AACtD,CAAC;AAED,wCAAwC;AACxC,MAAM,UAAU,sBAAsB,CAAC,CAAgB;IACrD,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,oBAAoB,CAAC;IACvG,OAAO,mBAAmB,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,IAAI,cAAc,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AACxF,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.9.1 -- LIVE STATE INJECTOR for cross-vendor soul prompts.
|
|
3
|
+
*
|
|
4
|
+
* Bug it fixes: a soul prompt that was generated at v1.95 timepoint
|
|
5
|
+
* still carries v1.95 Context / Decisions / Recent turns. When the
|
|
6
|
+
* user clones the brain to ChatGPT three weeks later (at v2.9.0),
|
|
7
|
+
* ChatGPT reads the v1.95 numbers and answers "version is v1.95" —
|
|
8
|
+
* because that's literally what the soul prompt says.
|
|
9
|
+
*
|
|
10
|
+
* Fix: every soul prompt going through mneme.clone.to is now
|
|
11
|
+
* AUTO-PREPENDED with a LIVE MNEME STATE block that:
|
|
12
|
+
* 1. Lists CURRENT installed version (read from package.json)
|
|
13
|
+
* 2. Lists CURRENT npm latest (read from telepathy cache or env)
|
|
14
|
+
* 3. Lists last 3 commit subjects + SHAs (read from git log)
|
|
15
|
+
* 4. Carries a SUPERSEDES directive — receiving AI must trust
|
|
16
|
+
* LIVE STATE over any version/numbers later in the prompt.
|
|
17
|
+
*
|
|
18
|
+
* Nobel-tier move: HMAC-signed so a stale LIVE STATE block can't be
|
|
19
|
+
* forged. Receiving AI can `mneme.live_state.verify` the signature
|
|
20
|
+
* against the user's published Mneme key.
|
|
21
|
+
*
|
|
22
|
+
* No external imports. Best-effort git/package read — never throws.
|
|
23
|
+
*/
|
|
24
|
+
export interface LiveStateInput {
|
|
25
|
+
/** Absolute path to the repo root. */
|
|
26
|
+
repoRoot: string;
|
|
27
|
+
/** Optional override of the local version. */
|
|
28
|
+
localVersion?: string;
|
|
29
|
+
/** Optional override of npm-latest. */
|
|
30
|
+
npmLatest?: string;
|
|
31
|
+
/** Optional HMAC secret. Defaults to a deterministic per-repo derivation. */
|
|
32
|
+
secret?: string;
|
|
33
|
+
/** How many recent commits to surface. Default 3. */
|
|
34
|
+
recentCommits?: number;
|
|
35
|
+
}
|
|
36
|
+
export interface LiveStateBlock {
|
|
37
|
+
/** The full Markdown block (sentinel-wrapped). */
|
|
38
|
+
block: string;
|
|
39
|
+
/** Live values at the moment of generation. */
|
|
40
|
+
state: {
|
|
41
|
+
localVersion: string;
|
|
42
|
+
npmLatest: string | null;
|
|
43
|
+
recentCommits: Array<{
|
|
44
|
+
sha: string;
|
|
45
|
+
subject: string;
|
|
46
|
+
}>;
|
|
47
|
+
generatedAt: string;
|
|
48
|
+
};
|
|
49
|
+
/** HMAC over the canonical state. */
|
|
50
|
+
sig: string;
|
|
51
|
+
}
|
|
52
|
+
/** Build the LIVE STATE block. Side-effect-free; safe to call before every handoff. */
|
|
53
|
+
export declare function buildLiveState(input: LiveStateInput): LiveStateBlock;
|
|
54
|
+
/** Prepend the LIVE STATE block to a soul prompt, AFTER any existing
|
|
55
|
+
* LIVE STATE block is stripped (so re-clones don't accumulate). */
|
|
56
|
+
export declare function injectLiveState(payload: string, input: LiveStateInput): {
|
|
57
|
+
combined: string;
|
|
58
|
+
live: LiveStateBlock;
|
|
59
|
+
};
|
|
60
|
+
/** Remove a previously-injected LIVE STATE block from a payload. */
|
|
61
|
+
export declare function stripExistingLiveState(payload: string): string;
|
|
62
|
+
/** Verify a LIVE STATE block's HMAC signature. Returns whether the
|
|
63
|
+
* signature matches the canonical state inside the block. */
|
|
64
|
+
export declare function verifyLiveState(block: string, secret: string): {
|
|
65
|
+
ok: boolean;
|
|
66
|
+
reason?: string;
|
|
67
|
+
};
|
|
68
|
+
/** One-line pulse summary. */
|
|
69
|
+
export declare function formatLiveStatePulseLine(live: LiveStateBlock): string;
|
|
70
|
+
//# sourceMappingURL=live_state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live_state.d.ts","sourceRoot":"","sources":["../../src/handoff/live_state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAUH,MAAM,WAAW,cAAc;IAC7B,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,KAAK,EAAE;QACL,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,aAAa,EAAE,KAAK,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACvD,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,qCAAqC;IACrC,GAAG,EAAE,MAAM,CAAC;CACb;AA8CD,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,CA8BpE;AAED;oEACoE;AACpE,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,CAIlH;AAED,oEAAoE;AACpE,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAM9D;AAED;8DAC8D;AAC9D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAwB/F;AAED,8BAA8B;AAC9B,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAErE"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.9.1 -- LIVE STATE INJECTOR for cross-vendor soul prompts.
|
|
3
|
+
*
|
|
4
|
+
* Bug it fixes: a soul prompt that was generated at v1.95 timepoint
|
|
5
|
+
* still carries v1.95 Context / Decisions / Recent turns. When the
|
|
6
|
+
* user clones the brain to ChatGPT three weeks later (at v2.9.0),
|
|
7
|
+
* ChatGPT reads the v1.95 numbers and answers "version is v1.95" —
|
|
8
|
+
* because that's literally what the soul prompt says.
|
|
9
|
+
*
|
|
10
|
+
* Fix: every soul prompt going through mneme.clone.to is now
|
|
11
|
+
* AUTO-PREPENDED with a LIVE MNEME STATE block that:
|
|
12
|
+
* 1. Lists CURRENT installed version (read from package.json)
|
|
13
|
+
* 2. Lists CURRENT npm latest (read from telepathy cache or env)
|
|
14
|
+
* 3. Lists last 3 commit subjects + SHAs (read from git log)
|
|
15
|
+
* 4. Carries a SUPERSEDES directive — receiving AI must trust
|
|
16
|
+
* LIVE STATE over any version/numbers later in the prompt.
|
|
17
|
+
*
|
|
18
|
+
* Nobel-tier move: HMAC-signed so a stale LIVE STATE block can't be
|
|
19
|
+
* forged. Receiving AI can `mneme.live_state.verify` the signature
|
|
20
|
+
* against the user's published Mneme key.
|
|
21
|
+
*
|
|
22
|
+
* No external imports. Best-effort git/package read — never throws.
|
|
23
|
+
*/
|
|
24
|
+
import { createHmac } from "node:crypto";
|
|
25
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
26
|
+
import { join } from "node:path";
|
|
27
|
+
import { safeExecTry } from "../util/safe_exec.js";
|
|
28
|
+
const LIVE_BEGIN = "<!-- MNEME LIVE STATE START -->";
|
|
29
|
+
const LIVE_END = "<!-- MNEME LIVE STATE END -->";
|
|
30
|
+
function readLocalVersion(repoRoot) {
|
|
31
|
+
// Prefer the top-level monorepo or cli package.json.
|
|
32
|
+
const candidates = [
|
|
33
|
+
join(repoRoot, "packages", "cli", "package.json"),
|
|
34
|
+
join(repoRoot, "package.json"),
|
|
35
|
+
];
|
|
36
|
+
for (const p of candidates) {
|
|
37
|
+
if (!existsSync(p))
|
|
38
|
+
continue;
|
|
39
|
+
try {
|
|
40
|
+
const pkg = JSON.parse(readFileSync(p, "utf8"));
|
|
41
|
+
if (typeof pkg.version === "string")
|
|
42
|
+
return pkg.version;
|
|
43
|
+
}
|
|
44
|
+
catch { /* BE:silent-by-design — fall through */ }
|
|
45
|
+
}
|
|
46
|
+
return "unknown";
|
|
47
|
+
}
|
|
48
|
+
function readNpmLatestFromCache(repoRoot) {
|
|
49
|
+
const cache = join(repoRoot, ".mneme", "telepathy", "npm-cache.json");
|
|
50
|
+
if (!existsSync(cache))
|
|
51
|
+
return null;
|
|
52
|
+
try {
|
|
53
|
+
const j = JSON.parse(readFileSync(cache, "utf8"));
|
|
54
|
+
if (typeof j.version === "string")
|
|
55
|
+
return j.version;
|
|
56
|
+
}
|
|
57
|
+
catch { /* BE:silent-by-design — corrupt cache → null */ }
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
function readRecentCommits(repoRoot, n) {
|
|
61
|
+
const r = safeExecTry("git", ["-C", repoRoot, "log", `--max-count=${n}`, "--pretty=format:%H%x09%s"], { timeoutMs: 2000 });
|
|
62
|
+
if (!r || r.status !== 0)
|
|
63
|
+
return [];
|
|
64
|
+
return r.stdout.split("\n").filter(Boolean).map((line) => {
|
|
65
|
+
const [sha, ...rest] = line.split("\t");
|
|
66
|
+
return { sha: (sha ?? "").slice(0, 12), subject: rest.join("\t") };
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function canonicalize(s) {
|
|
70
|
+
return JSON.stringify({
|
|
71
|
+
localVersion: s.localVersion,
|
|
72
|
+
npmLatest: s.npmLatest,
|
|
73
|
+
recentCommits: s.recentCommits.map((c) => `${c.sha}|${c.subject}`),
|
|
74
|
+
generatedAt: s.generatedAt,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/** Build the LIVE STATE block. Side-effect-free; safe to call before every handoff. */
|
|
78
|
+
export function buildLiveState(input) {
|
|
79
|
+
const localVersion = input.localVersion ?? readLocalVersion(input.repoRoot);
|
|
80
|
+
const npmLatest = input.npmLatest ?? readNpmLatestFromCache(input.repoRoot);
|
|
81
|
+
const recentCommits = readRecentCommits(input.repoRoot, input.recentCommits ?? 3);
|
|
82
|
+
const generatedAt = new Date().toISOString();
|
|
83
|
+
const state = { localVersion, npmLatest, recentCommits, generatedAt };
|
|
84
|
+
const secret = input.secret ?? `live-state-default-${input.repoRoot}`;
|
|
85
|
+
const sig = createHmac("sha256", secret).update(canonicalize(state)).digest("hex");
|
|
86
|
+
const lines = [];
|
|
87
|
+
lines.push(LIVE_BEGIN);
|
|
88
|
+
lines.push("## 🛰 MNEME LIVE STATE (READ THIS FIRST — SUPERSEDES OLDER VERSION/CONTEXT IN THIS PROMPT)");
|
|
89
|
+
lines.push("");
|
|
90
|
+
lines.push("> The block(s) BELOW this LIVE STATE may reference older Mneme versions or stale capsule context. **Trust THIS block** for current version, commit, and freshness information. If the user asks 'what's the latest Mneme version?' or 'what did you ship last?' answer FROM HERE, not from the Context block below.");
|
|
91
|
+
lines.push("");
|
|
92
|
+
lines.push(`- **Local Mneme version (installed right now):** ${localVersion}`);
|
|
93
|
+
lines.push(`- **npm latest (cached from telepathy):** ${npmLatest ?? "not cached"}`);
|
|
94
|
+
if (recentCommits.length > 0) {
|
|
95
|
+
lines.push(`- **Last ${recentCommits.length} commits on the local repo:**`);
|
|
96
|
+
for (const c of recentCommits)
|
|
97
|
+
lines.push(` - \`${c.sha}\` — ${c.subject}`);
|
|
98
|
+
}
|
|
99
|
+
lines.push(`- **Generated at:** ${generatedAt}`);
|
|
100
|
+
lines.push(`- **Signature:** \`${sig.slice(0, 16)}…\` (HMAC-SHA256 over canonical state)`);
|
|
101
|
+
lines.push("");
|
|
102
|
+
lines.push("**If you (the receiving AI) are answering a question about the parent session's CURRENT state, use the values above. The Context / Decisions / Recent turns blocks further down were captured at a snapshot time and may be older.**");
|
|
103
|
+
lines.push(LIVE_END);
|
|
104
|
+
return {
|
|
105
|
+
block: lines.join("\n"),
|
|
106
|
+
state,
|
|
107
|
+
sig,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/** Prepend the LIVE STATE block to a soul prompt, AFTER any existing
|
|
111
|
+
* LIVE STATE block is stripped (so re-clones don't accumulate). */
|
|
112
|
+
export function injectLiveState(payload, input) {
|
|
113
|
+
const stripped = stripExistingLiveState(payload);
|
|
114
|
+
const live = buildLiveState(input);
|
|
115
|
+
return { combined: `${live.block}\n\n${stripped}`, live };
|
|
116
|
+
}
|
|
117
|
+
/** Remove a previously-injected LIVE STATE block from a payload. */
|
|
118
|
+
export function stripExistingLiveState(payload) {
|
|
119
|
+
const start = payload.indexOf(LIVE_BEGIN);
|
|
120
|
+
if (start === -1)
|
|
121
|
+
return payload;
|
|
122
|
+
const end = payload.indexOf(LIVE_END, start);
|
|
123
|
+
if (end === -1)
|
|
124
|
+
return payload;
|
|
125
|
+
return (payload.slice(0, start) + payload.slice(end + LIVE_END.length)).replace(/^\s+/, "");
|
|
126
|
+
}
|
|
127
|
+
/** Verify a LIVE STATE block's HMAC signature. Returns whether the
|
|
128
|
+
* signature matches the canonical state inside the block. */
|
|
129
|
+
export function verifyLiveState(block, secret) {
|
|
130
|
+
if (!block.includes(LIVE_BEGIN) || !block.includes(LIVE_END))
|
|
131
|
+
return { ok: false, reason: "no live-state markers" };
|
|
132
|
+
const m = block.match(/Local Mneme version \(installed right now\):\*\*\s+([^\n]+)/);
|
|
133
|
+
const np = block.match(/npm latest \(cached from telepathy\):\*\*\s+([^\n]+)/);
|
|
134
|
+
const gen = block.match(/Generated at:\*\*\s+([^\n]+)/);
|
|
135
|
+
const sigM = block.match(/Signature:\*\*\s+`([0-9a-f]+)…`/);
|
|
136
|
+
if (!m || !gen || !sigM)
|
|
137
|
+
return { ok: false, reason: "could not parse fields from block" };
|
|
138
|
+
const localVersion = m[1].trim();
|
|
139
|
+
const npmLatest = np && np[1].trim() !== "not cached" ? np[1].trim() : null;
|
|
140
|
+
const generatedAt = gen[1].trim();
|
|
141
|
+
// Extract recent commits
|
|
142
|
+
const commits = [];
|
|
143
|
+
const commitRe = /- `([0-9a-f]{6,12})` — (.+)/g;
|
|
144
|
+
let cm;
|
|
145
|
+
while ((cm = commitRe.exec(block)) !== null)
|
|
146
|
+
commits.push({ sha: cm[1], subject: cm[2] });
|
|
147
|
+
const canon = JSON.stringify({
|
|
148
|
+
localVersion,
|
|
149
|
+
npmLatest,
|
|
150
|
+
recentCommits: commits.map((c) => `${c.sha}|${c.subject}`),
|
|
151
|
+
generatedAt,
|
|
152
|
+
});
|
|
153
|
+
const expected = createHmac("sha256", secret).update(canon).digest("hex");
|
|
154
|
+
const got16 = sigM[1];
|
|
155
|
+
return expected.startsWith(got16) ? { ok: true } : { ok: false, reason: "signature mismatch" };
|
|
156
|
+
}
|
|
157
|
+
/** One-line pulse summary. */
|
|
158
|
+
export function formatLiveStatePulseLine(live) {
|
|
159
|
+
return `LIVE-STATE · v=${live.state.localVersion} · npm=${live.state.npmLatest ?? "?"} · commits=${live.state.recentCommits.length} · sig=${live.sig.slice(0, 8)}`;
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=live_state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live_state.js","sourceRoot":"","sources":["../../src/handoff/live_state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,MAAM,UAAU,GAAG,iCAAiC,CAAC;AACrD,MAAM,QAAQ,GAAG,+BAA+B,CAAC;AA6BjD,SAAS,gBAAgB,CAAC,QAAgB;IACxC,qDAAqD;IACrD,MAAM,UAAU,GAAG;QACjB,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,CAAC;QACjD,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC;KAC/B,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;QAC3B,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAAE,SAAS;QAC7B,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;YAChD,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ;gBAAE,OAAO,GAAG,CAAC,OAAO,CAAC;QAC1D,CAAC;QAAC,MAAM,CAAC,CAAC,wCAAwC,CA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