mneme-ai 0.8.3
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/README.md +45 -0
- package/bin/mneme.js +2 -0
- package/dist/commands/adapt.d.ts +6 -0
- package/dist/commands/adapt.d.ts.map +1 -0
- package/dist/commands/adapt.js +219 -0
- package/dist/commands/adapt.js.map +1 -0
- package/dist/commands/ask.d.ts +8 -0
- package/dist/commands/ask.d.ts.map +1 -0
- package/dist/commands/ask.js +76 -0
- package/dist/commands/ask.js.map +1 -0
- package/dist/commands/blast.d.ts +8 -0
- package/dist/commands/blast.d.ts.map +1 -0
- package/dist/commands/blast.js +132 -0
- package/dist/commands/blast.js.map +1 -0
- package/dist/commands/clones.d.ts +19 -0
- package/dist/commands/clones.d.ts.map +1 -0
- package/dist/commands/clones.js +155 -0
- package/dist/commands/clones.js.map +1 -0
- package/dist/commands/conscience.d.ts +15 -0
- package/dist/commands/conscience.d.ts.map +1 -0
- package/dist/commands/conscience.js +202 -0
- package/dist/commands/conscience.js.map +1 -0
- package/dist/commands/correlate.d.ts +18 -0
- package/dist/commands/correlate.d.ts.map +1 -0
- package/dist/commands/correlate.js +173 -0
- package/dist/commands/correlate.js.map +1 -0
- package/dist/commands/echo.d.ts +16 -0
- package/dist/commands/echo.d.ts.map +1 -0
- package/dist/commands/echo.js +175 -0
- package/dist/commands/echo.js.map +1 -0
- package/dist/commands/genius.d.ts +13 -0
- package/dist/commands/genius.d.ts.map +1 -0
- package/dist/commands/genius.js +213 -0
- package/dist/commands/genius.js.map +1 -0
- package/dist/commands/heal.d.ts +22 -0
- package/dist/commands/heal.d.ts.map +1 -0
- package/dist/commands/heal.js +160 -0
- package/dist/commands/heal.js.map +1 -0
- package/dist/commands/index-cmd.d.ts +9 -0
- package/dist/commands/index-cmd.d.ts.map +1 -0
- package/dist/commands/index-cmd.js +74 -0
- package/dist/commands/index-cmd.js.map +1 -0
- package/dist/commands/init.d.ts +6 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +34 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/mcp.d.ts +4 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +10 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/palimpsest.d.ts +22 -0
- package/dist/commands/palimpsest.d.ts.map +1 -0
- package/dist/commands/palimpsest.js +164 -0
- package/dist/commands/palimpsest.js.map +1 -0
- package/dist/commands/status.d.ts +4 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +49 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/teach.d.ts +16 -0
- package/dist/commands/teach.d.ts.map +1 -0
- package/dist/commands/teach.js +237 -0
- package/dist/commands/teach.js.map +1 -0
- package/dist/commands/teach.test.d.ts +2 -0
- package/dist/commands/teach.test.d.ts.map +1 -0
- package/dist/commands/teach.test.js +44 -0
- package/dist/commands/teach.test.js.map +1 -0
- package/dist/commands/why.d.ts +12 -0
- package/dist/commands/why.d.ts.map +1 -0
- package/dist/commands/why.js +85 -0
- package/dist/commands/why.js.map +1 -0
- package/dist/commands/wild-features.d.ts +42 -0
- package/dist/commands/wild-features.d.ts.map +1 -0
- package/dist/commands/wild-features.js +483 -0
- package/dist/commands/wild-features.js.map +1 -0
- package/dist/commands/wild-stubs.d.ts +6 -0
- package/dist/commands/wild-stubs.d.ts.map +1 -0
- package/dist/commands/wild-stubs.js +112 -0
- package/dist/commands/wild-stubs.js.map +1 -0
- package/dist/commands/wisdom.d.ts +13 -0
- package/dist/commands/wisdom.d.ts.map +1 -0
- package/dist/commands/wisdom.js +94 -0
- package/dist/commands/wisdom.js.map +1 -0
- package/dist/config.d.ts +26 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +28 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +371 -0
- package/dist/index.js.map +1 -0
- package/dist/meditations.d.ts +24 -0
- package/dist/meditations.d.ts.map +1 -0
- package/dist/meditations.js +120 -0
- package/dist/meditations.js.map +1 -0
- package/dist/meditations.test.d.ts +2 -0
- package/dist/meditations.test.d.ts.map +1 -0
- package/dist/meditations.test.js +70 -0
- package/dist/meditations.test.js.map +1 -0
- package/dist/paths.d.ts +7 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +14 -0
- package/dist/paths.js.map +1 -0
- package/dist/ui.d.ts +12 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +30 -0
- package/dist/ui.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Meditations — short, quotable teachings about codebase memory.
|
|
3
|
+
*
|
|
4
|
+
* Each meditation has three parts:
|
|
5
|
+
* - title: one short phrase (the koan)
|
|
6
|
+
* - body: 2-4 sentences of context
|
|
7
|
+
* - aphorism: a single tweetable line (the takeaway)
|
|
8
|
+
*
|
|
9
|
+
* Meditations are addressed by index for `mneme wisdom --n <N>` and selected
|
|
10
|
+
* deterministically by date for `mneme wisdom` (one-per-day rhythm — different
|
|
11
|
+
* teaching each day, same teaching all day).
|
|
12
|
+
*/
|
|
13
|
+
export const MEDITATIONS = [
|
|
14
|
+
{
|
|
15
|
+
id: "memory-vs-intelligence",
|
|
16
|
+
title: "On Memory and Intelligence",
|
|
17
|
+
body: "An intelligence without memory is just guessing in a loop. The Greeks knew this — they made μνήμη the mother of the muses, not their student.\n" +
|
|
18
|
+
"Every AI assistant you use today is a Mnemosyne with amnesia.",
|
|
19
|
+
aphorism: "Intelligence is the spark; memory is the fuel.",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "what-vs-why",
|
|
23
|
+
title: "On What and Why",
|
|
24
|
+
body: "A passing test never told anyone why it had to exist. A green check on CI does not explain the bug it was born to prevent.\n" +
|
|
25
|
+
"Source code tells the present. Git tells the past. Most engineering questions are really asking about the past.",
|
|
26
|
+
aphorism: "Code answers what. Git answers why. Hold both.",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: "commits-as-gifts",
|
|
30
|
+
title: "On Commits as Gifts",
|
|
31
|
+
body: "Every commit message is a letter to the engineer who reads it six months from now. That engineer might be a colleague — and might be you.\n" +
|
|
32
|
+
"The cost of writing a good commit message is two minutes. The cost of decoding a bad one is two hours, multiplied by everyone who ever needs to.",
|
|
33
|
+
aphorism: "A commit message is the cheapest gift you can leave your future self.",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "hallucination",
|
|
37
|
+
title: "On Hallucination",
|
|
38
|
+
body: "When an AI assistant cannot see why a piece of code exists, it does not say so. It guesses. The guess sounds plausible because plausibility is what language models optimize.\n" +
|
|
39
|
+
"Hallucination is not a bug in the model. It is the absence of context, dressed up as confidence.",
|
|
40
|
+
aphorism: "An AI without memory is a confident liar by default.",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: "two-stage-retrieval",
|
|
44
|
+
title: "On Two-Stage Retrieval",
|
|
45
|
+
body: "First-stage search casts a wide net. The right answer is somewhere in the top fifty. Then a reranker takes those fifty and finds the top three.\n" +
|
|
46
|
+
"Recall is not the same as precision. Casting wide and then choosing well beats trying to do both in one shot.",
|
|
47
|
+
aphorism: "Recall first. Precision second. Never both at once.",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: "garbage-in",
|
|
51
|
+
title: "On Garbage In",
|
|
52
|
+
body: "If your commit history is `wip`, `update`, `fix`, `update again` — Mneme will tell you so, in the form of empty answers.\n" +
|
|
53
|
+
"We do not invent reasons. We surface what was recorded. Some teams discover, on first use, that their history says nothing. That itself is the lesson.",
|
|
54
|
+
aphorism: "A tool that refuses to lie is more useful than a tool that always answers.",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "bus-factor",
|
|
58
|
+
title: "On the Bus Factor",
|
|
59
|
+
body: "The bus factor is not really about people leaving. It is about knowledge that never made it into the repository in the first place.\n" +
|
|
60
|
+
"Mneme cannot save what was never written. But it can make legible everything that was — which is more than most teams realize.",
|
|
61
|
+
aphorism: "What is written can be read. What was never written is gone.",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "palimpsest",
|
|
65
|
+
title: "On the Palimpsest",
|
|
66
|
+
body: "A palimpsest is a manuscript scraped clean and written over, again and again. Every codebase is one. Each new decision is ink on top of an older decision, on top of an older one still.\n" +
|
|
67
|
+
"Your present file is the surface. Mneme reads every layer beneath.",
|
|
68
|
+
aphorism: "Every line of code stands on the bones of older lines.",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "speed",
|
|
72
|
+
title: "On Speed",
|
|
73
|
+
body: "Sub-second answers do not come from a smarter model. They come from giving the model less to read.\n" +
|
|
74
|
+
"When a question takes ten seconds to answer, nine of those seconds are usually noise the assistant was forced to scan.",
|
|
75
|
+
aphorism: "Speed is not a smarter model. It is less noise.",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "expensive-bug",
|
|
79
|
+
title: "On the Most Expensive Bug",
|
|
80
|
+
body: "The most expensive bug is the one you fix without remembering why it existed. The patch lands. The original constraint is forgotten. Six months later, someone undoes the fix because it looks like dead code, and the bug returns — now harder, because nobody remembers it ever was a bug.\n" +
|
|
81
|
+
"Mneme is not a debugger. It is a counterweight to that forgetting.",
|
|
82
|
+
aphorism: "A fix without context is a future bug with extra steps.",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: "honest-no",
|
|
86
|
+
title: "On the Honest No",
|
|
87
|
+
body: "Most retrieval systems are pressured into answering. Even when they shouldn't. Even when the right answer is silence.\n" +
|
|
88
|
+
"Mneme tries hard to say `no relevant context found` when that is the truth. A tool that admits its limits is one you can trust at its claims.",
|
|
89
|
+
aphorism: "An honest no is worth a thousand confident maybes.",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: "knowing-when-not",
|
|
93
|
+
title: "On Knowing When Not To Use This",
|
|
94
|
+
body: "Mneme is not a substitute for reading code. It is not a substitute for asking a colleague. It is not an oracle.\n" +
|
|
95
|
+
"It is a way to compress thirty minutes of git archaeology into thirty seconds — when the answer is in git. When it is not, the right move is to close the laptop and walk to a desk.",
|
|
96
|
+
aphorism: "The tool ends where the conversation begins.",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: "convex-combination",
|
|
100
|
+
title: "On the Convex Combination",
|
|
101
|
+
body: "A correlation engine that saturates at 1.0 cannot rank anything that scores 1.0. The math forces a choice — keep the constraint, lose the signal, or weight the inputs so the sum stays in bounds.\n" +
|
|
102
|
+
"Most retrieval failures are math failures wearing the costume of intelligence.",
|
|
103
|
+
aphorism: "Choose your convex combinations. The shape of your math becomes the shape of your answers.",
|
|
104
|
+
},
|
|
105
|
+
];
|
|
106
|
+
/** Pick a meditation deterministically — same teaching all day, new one tomorrow. */
|
|
107
|
+
export function meditationOfTheDay(now = new Date()) {
|
|
108
|
+
// Days since unix epoch (UTC) → stable index regardless of timezone.
|
|
109
|
+
const day = Math.floor(now.getTime() / (24 * 60 * 60 * 1000));
|
|
110
|
+
return MEDITATIONS[day % MEDITATIONS.length];
|
|
111
|
+
}
|
|
112
|
+
export function meditationByIndex(n) {
|
|
113
|
+
if (!Number.isFinite(n) || n < 1 || n > MEDITATIONS.length)
|
|
114
|
+
return undefined;
|
|
115
|
+
return MEDITATIONS[n - 1];
|
|
116
|
+
}
|
|
117
|
+
export function meditationById(id) {
|
|
118
|
+
return MEDITATIONS.find((m) => m.id === id);
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=meditations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meditations.js","sourceRoot":"","sources":["../src/meditations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,MAAM,CAAC,MAAM,WAAW,GAAiB;IACvC;QACE,EAAE,EAAE,wBAAwB;QAC5B,KAAK,EAAE,4BAA4B;QACnC,IAAI,EACF,i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,70 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest";
|
|
2
|
+
import { MEDITATIONS, meditationOfTheDay, meditationByIndex, meditationById, } from "./meditations.js";
|
|
3
|
+
describe("MEDITATIONS canon", () => {
|
|
4
|
+
it("has at least 10 meditations", () => {
|
|
5
|
+
expect(MEDITATIONS.length).toBeGreaterThanOrEqual(10);
|
|
6
|
+
});
|
|
7
|
+
it("every meditation has id, title, body, aphorism", () => {
|
|
8
|
+
for (const m of MEDITATIONS) {
|
|
9
|
+
expect(m.id).toBeTruthy();
|
|
10
|
+
expect(m.title).toBeTruthy();
|
|
11
|
+
expect(m.body.length).toBeGreaterThan(20);
|
|
12
|
+
expect(m.aphorism).toBeTruthy();
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
it("ids are unique", () => {
|
|
16
|
+
const ids = MEDITATIONS.map((m) => m.id);
|
|
17
|
+
expect(new Set(ids).size).toBe(ids.length);
|
|
18
|
+
});
|
|
19
|
+
it("aphorisms are all under 140 chars (tweetable)", () => {
|
|
20
|
+
for (const m of MEDITATIONS) {
|
|
21
|
+
expect(m.aphorism.length).toBeLessThanOrEqual(140);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
describe("meditationOfTheDay", () => {
|
|
26
|
+
it("returns a meditation", () => {
|
|
27
|
+
const m = meditationOfTheDay();
|
|
28
|
+
expect(m).toBeDefined();
|
|
29
|
+
expect(m.title).toBeTruthy();
|
|
30
|
+
});
|
|
31
|
+
it("is deterministic — same day → same meditation", () => {
|
|
32
|
+
const d = new Date("2026-05-04T10:00:00Z");
|
|
33
|
+
expect(meditationOfTheDay(d).id).toBe(meditationOfTheDay(d).id);
|
|
34
|
+
});
|
|
35
|
+
it("changes day-to-day", () => {
|
|
36
|
+
// Find at least two consecutive days that produce different meditations.
|
|
37
|
+
const day1 = new Date("2026-05-04T00:00:00Z");
|
|
38
|
+
const seen = new Set();
|
|
39
|
+
for (let i = 0; i < MEDITATIONS.length + 1; i++) {
|
|
40
|
+
const d = new Date(day1.getTime() + i * 24 * 60 * 60 * 1000);
|
|
41
|
+
seen.add(meditationOfTheDay(d).id);
|
|
42
|
+
}
|
|
43
|
+
expect(seen.size).toBe(MEDITATIONS.length);
|
|
44
|
+
});
|
|
45
|
+
it("is timezone-stable for the same UTC day", () => {
|
|
46
|
+
const morning = new Date("2026-05-04T01:00:00Z");
|
|
47
|
+
const evening = new Date("2026-05-04T23:00:00Z");
|
|
48
|
+
expect(meditationOfTheDay(morning).id).toBe(meditationOfTheDay(evening).id);
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
describe("meditationByIndex", () => {
|
|
52
|
+
it("returns 1-indexed entries", () => {
|
|
53
|
+
expect(meditationByIndex(1)?.id).toBe(MEDITATIONS[0].id);
|
|
54
|
+
expect(meditationByIndex(MEDITATIONS.length)?.id).toBe(MEDITATIONS[MEDITATIONS.length - 1].id);
|
|
55
|
+
});
|
|
56
|
+
it("returns undefined for out-of-range", () => {
|
|
57
|
+
expect(meditationByIndex(0)).toBeUndefined();
|
|
58
|
+
expect(meditationByIndex(MEDITATIONS.length + 1)).toBeUndefined();
|
|
59
|
+
expect(meditationByIndex(NaN)).toBeUndefined();
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
describe("meditationById", () => {
|
|
63
|
+
it("finds by id", () => {
|
|
64
|
+
expect(meditationById("memory-vs-intelligence")?.title).toContain("Memory");
|
|
65
|
+
});
|
|
66
|
+
it("returns undefined for unknown id", () => {
|
|
67
|
+
expect(meditationById("nope")).toBeUndefined();
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=meditations.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meditations.test.js","sourceRoot":"","sources":["../src/meditations.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,WA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9E,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/paths.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const MNEME_DIR = ".mneme";
|
|
2
|
+
export declare const DB_FILENAME = "mneme.db";
|
|
3
|
+
export declare const CONFIG_FILENAME = "config.json";
|
|
4
|
+
export declare function mnemeDir(repoRoot: string): string;
|
|
5
|
+
export declare function dbPath(repoRoot: string): string;
|
|
6
|
+
export declare function configPath(repoRoot: string): string;
|
|
7
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,WAAW,CAAC;AAClC,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAE7C,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEnD"}
|
package/dist/paths.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
export const MNEME_DIR = ".mneme";
|
|
3
|
+
export const DB_FILENAME = "mneme.db";
|
|
4
|
+
export const CONFIG_FILENAME = "config.json";
|
|
5
|
+
export function mnemeDir(repoRoot) {
|
|
6
|
+
return join(repoRoot, MNEME_DIR);
|
|
7
|
+
}
|
|
8
|
+
export function dbPath(repoRoot) {
|
|
9
|
+
return join(mnemeDir(repoRoot), DB_FILENAME);
|
|
10
|
+
}
|
|
11
|
+
export function configPath(repoRoot) {
|
|
12
|
+
return join(mnemeDir(repoRoot), CONFIG_FILENAME);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC;AAClC,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;AACtC,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;AAE7C,MAAM,UAAU,QAAQ,CAAC,QAAgB;IACvC,OAAO,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,QAAgB;IACrC,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC,CAAC;AACnD,CAAC"}
|
package/dist/ui.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const ui: {
|
|
2
|
+
banner: () => void;
|
|
3
|
+
info: (msg: string) => boolean;
|
|
4
|
+
success: (msg: string) => boolean;
|
|
5
|
+
warn: (msg: string) => boolean;
|
|
6
|
+
error: (msg: string) => boolean;
|
|
7
|
+
dim: (msg: string) => boolean;
|
|
8
|
+
step: (label: string, msg: string) => boolean;
|
|
9
|
+
raw: (msg: string) => boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function formatProgress(current: number, total: number, width?: number): string;
|
|
12
|
+
//# sourceMappingURL=ui.d.ts.map
|
package/dist/ui.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE;;gBAYD,MAAM;mBACH,MAAM;gBACT,MAAM;iBACL,MAAM;eACR,MAAM;kBACH,MAAM,OAAO,MAAM;eAEtB,MAAM;CAClB,CAAC;AAEF,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,MAAM,CAMjF"}
|
package/dist/ui.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import kleur from "kleur";
|
|
2
|
+
export const ui = {
|
|
3
|
+
banner: () => {
|
|
4
|
+
const lines = [
|
|
5
|
+
"",
|
|
6
|
+
kleur.magenta(" ╭──────────────────────────────────╮"),
|
|
7
|
+
kleur.magenta(" │") + kleur.bold().white(" μνήμη ") + kleur.gray("·") + kleur.italic().cyan(" Mneme ") + kleur.magenta(" │"),
|
|
8
|
+
kleur.magenta(" │") + kleur.gray(" the memory layer of your code ") + kleur.magenta("│"),
|
|
9
|
+
kleur.magenta(" ╰──────────────────────────────────╯"),
|
|
10
|
+
"",
|
|
11
|
+
];
|
|
12
|
+
process.stdout.write(lines.join("\n") + "\n");
|
|
13
|
+
},
|
|
14
|
+
info: (msg) => process.stdout.write(`${kleur.cyan("ℹ")} ${msg}\n`),
|
|
15
|
+
success: (msg) => process.stdout.write(`${kleur.green("✓")} ${msg}\n`),
|
|
16
|
+
warn: (msg) => process.stdout.write(`${kleur.yellow("!")} ${msg}\n`),
|
|
17
|
+
error: (msg) => process.stderr.write(`${kleur.red("✗")} ${msg}\n`),
|
|
18
|
+
dim: (msg) => process.stdout.write(kleur.gray(msg) + "\n"),
|
|
19
|
+
step: (label, msg) => process.stdout.write(`${kleur.gray("›")} ${kleur.bold(label)} ${msg}\n`),
|
|
20
|
+
raw: (msg) => process.stdout.write(msg),
|
|
21
|
+
};
|
|
22
|
+
export function formatProgress(current, total, width = 24) {
|
|
23
|
+
if (total <= 0)
|
|
24
|
+
return "";
|
|
25
|
+
const ratio = Math.min(1, current / total);
|
|
26
|
+
const filled = Math.round(ratio * width);
|
|
27
|
+
const bar = kleur.cyan("█".repeat(filled)) + kleur.gray("░".repeat(width - filled));
|
|
28
|
+
return `${bar} ${kleur.bold(`${Math.round(ratio * 100)}%`)} ${kleur.gray(`(${current}/${total})`)}`;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=ui.js.map
|
package/dist/ui.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,MAAM,EAAE,GAAG,EAAE;QACX,MAAM,KAAK,GAAG;YACZ,EAAE;YACF,KAAK,CAAC,OAAO,CAAC,wCAAwC,CAAC;YACvD,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC;YAC9I,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,oCAAoC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;YAC5F,KAAK,CAAC,OAAO,CAAC,wCAAwC,CAAC;YACvD,EAAE;SACH,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAChD,CAAC;IACD,IAAI,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KA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,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC;IACpF,OAAO,GAAG,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,OAAO,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;AACtG,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mneme-ai",
|
|
3
|
+
"version": "0.8.3",
|
|
4
|
+
"description": "Mneme — the memory layer for your codebase. Knows the WHY, the WHAT, the WHERE-IT-BREAKS.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"mneme": "./bin/mneme.js"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/patsa2561-art/mneme-ai.git",
|
|
14
|
+
"directory": "packages/cli"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://github.com/patsa2561-art/mneme-ai#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/patsa2561-art/mneme-ai/issues"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"files": ["dist", "bin", "README.md"],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc -b",
|
|
24
|
+
"clean": "tsc -b --clean"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@mneme-ai/core": "0.8.3",
|
|
28
|
+
"@mneme-ai/correlator": "0.8.3",
|
|
29
|
+
"@mneme-ai/embeddings": "0.8.3",
|
|
30
|
+
"@mneme-ai/mcp": "0.8.3",
|
|
31
|
+
"commander": "^12.1.0",
|
|
32
|
+
"kleur": "^4.1.5"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"git",
|
|
36
|
+
"ai",
|
|
37
|
+
"rag",
|
|
38
|
+
"code-archaeology",
|
|
39
|
+
"mcp",
|
|
40
|
+
"vector-search",
|
|
41
|
+
"incident-correlation"
|
|
42
|
+
],
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=20.0.0"
|
|
45
|
+
}
|
|
46
|
+
}
|