@mneme-ai/core 2.14.1 → 2.15.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/agent_manifest.d.ts +1 -1
- package/dist/agent_manifest.d.ts.map +1 -1
- package/dist/agent_manifest.js +18 -1
- package/dist/agent_manifest.js.map +1 -1
- package/dist/arbitrage/arbitrage.test.d.ts +2 -0
- package/dist/arbitrage/arbitrage.test.d.ts.map +1 -0
- package/dist/arbitrage/arbitrage.test.js +131 -0
- package/dist/arbitrage/arbitrage.test.js.map +1 -0
- package/dist/arbitrage/index.d.ts +140 -0
- package/dist/arbitrage/index.d.ts.map +1 -0
- package/dist/arbitrage/index.js +242 -0
- package/dist/arbitrage/index.js.map +1 -0
- package/dist/bug_prophet/bug_prophet.test.d.ts +2 -0
- package/dist/bug_prophet/bug_prophet.test.d.ts.map +1 -0
- package/dist/bug_prophet/bug_prophet.test.js +110 -0
- package/dist/bug_prophet/bug_prophet.test.js.map +1 -0
- package/dist/bug_prophet/index.d.ts +85 -0
- package/dist/bug_prophet/index.d.ts.map +1 -0
- package/dist/bug_prophet/index.js +219 -0
- package/dist/bug_prophet/index.js.map +1 -0
- package/dist/cosmic/aurelian_bug_prophet.test.d.ts +5 -0
- package/dist/cosmic/aurelian_bug_prophet.test.d.ts.map +1 -0
- package/dist/cosmic/aurelian_bug_prophet.test.js +31 -0
- package/dist/cosmic/aurelian_bug_prophet.test.js.map +1 -0
- package/dist/cosmic/aurelian_v215.test.d.ts +9 -0
- package/dist/cosmic/aurelian_v215.test.d.ts.map +1 -0
- package/dist/cosmic/aurelian_v215.test.js +75 -0
- package/dist/cosmic/aurelian_v215.test.js.map +1 -0
- package/dist/genesis/genesis.test.d.ts +2 -0
- package/dist/genesis/genesis.test.d.ts.map +1 -0
- package/dist/genesis/genesis.test.js +159 -0
- package/dist/genesis/genesis.test.js.map +1 -0
- package/dist/genesis/index.d.ts +94 -0
- package/dist/genesis/index.d.ts.map +1 -0
- package/dist/genesis/index.js +452 -0
- package/dist/genesis/index.js.map +1 -0
- package/dist/hive/hive.test.d.ts +2 -0
- package/dist/hive/hive.test.d.ts.map +1 -0
- package/dist/hive/hive.test.js +162 -0
- package/dist/hive/hive.test.js.map +1 -0
- package/dist/hive/index.d.ts +151 -0
- package/dist/hive/index.d.ts.map +1 -0
- package/dist/hive/index.js +246 -0
- package/dist/hive/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/vibe/index.d.ts +89 -0
- package/dist/vibe/index.d.ts.map +1 -0
- package/dist/vibe/index.js +243 -0
- package/dist/vibe/index.js.map +1 -0
- package/dist/vibe/vibe.test.d.ts +2 -0
- package/dist/vibe/vibe.test.d.ts.map +1 -0
- package/dist/vibe/vibe.test.js +97 -0
- package/dist/vibe/vibe.test.js.map +1 -0
- package/dist/whats_new.d.ts.map +1 -1
- package/dist/whats_new.js +16 -0
- package/dist/whats_new.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.15.0 — MNEME GENESIS
|
|
3
|
+
*
|
|
4
|
+
* "Cold-start to value in 60 seconds. Mneme reads your repo, infers
|
|
5
|
+
* the stack, seeds project soul + bounty + replica + infra-brain
|
|
6
|
+
* + the right DLP rules, all signed and tamper-evident. Zero questions
|
|
7
|
+
* asked. Zero config files to write."
|
|
8
|
+
*
|
|
9
|
+
* The wild distribution wedge: the friction between `npm install` and
|
|
10
|
+
* "I see value" kills 90% of tools. GENESIS makes that gap < 60 seconds.
|
|
11
|
+
* Composes onto existing PROJECT SOUL / BOUNTY / REPLICA / INFRA modules.
|
|
12
|
+
*
|
|
13
|
+
* Detection signals:
|
|
14
|
+
* - package.json / pyproject.toml / Cargo.toml / go.mod / Gemfile
|
|
15
|
+
* - file extensions distribution (.ts, .py, .rs, .go, .rb, .java)
|
|
16
|
+
* - framework markers (next.config.* / vite.config.* / tailwind.config.*
|
|
17
|
+
* / django settings / rails Gemfile / etc)
|
|
18
|
+
* - CI presence (.github/workflows / .gitlab-ci.yml / .circleci/)
|
|
19
|
+
* - repo size + age (more rules for bigger / older repos)
|
|
20
|
+
*
|
|
21
|
+
* Outputs a `GenesisPlan` listing every action it would take. Caller
|
|
22
|
+
* confirms (or auto-applies). Plan is HMAC-signed for audit.
|
|
23
|
+
*/
|
|
24
|
+
declare const PROTOCOL_VERSION: 1;
|
|
25
|
+
export type Stack = "typescript" | "javascript" | "python" | "rust" | "go" | "ruby" | "java" | "kotlin" | "swift" | "php" | "csharp" | "elixir" | "polyglot" | "unknown";
|
|
26
|
+
export type Framework = "next" | "vite" | "react" | "vue" | "svelte" | "angular" | "django" | "flask" | "fastapi" | "rails" | "express" | "nestjs" | "tailwind" | "tauri" | "electron" | "expo" | "none";
|
|
27
|
+
export interface RepoFingerprint {
|
|
28
|
+
stack: Stack;
|
|
29
|
+
frameworks: Framework[];
|
|
30
|
+
hasCI: boolean;
|
|
31
|
+
hasTests: boolean;
|
|
32
|
+
fileCount: number;
|
|
33
|
+
ageMonths: number;
|
|
34
|
+
packageManagers: Array<"npm" | "pnpm" | "yarn" | "bun" | "pip" | "uv" | "cargo" | "go" | "bundler" | "maven" | "gradle">;
|
|
35
|
+
signals: Record<string, string | number | boolean>;
|
|
36
|
+
}
|
|
37
|
+
export interface GenesisAction {
|
|
38
|
+
module: "soul" | "bounty" | "replica" | "infra" | "dlp" | "compliance";
|
|
39
|
+
description: string;
|
|
40
|
+
/** Why we picked this — visible to the user as rationale. */
|
|
41
|
+
reason: string;
|
|
42
|
+
/** Estimated benefit on a 1-10 scale based on detected signals. */
|
|
43
|
+
benefit: number;
|
|
44
|
+
}
|
|
45
|
+
export interface GenesisPlan {
|
|
46
|
+
v: typeof PROTOCOL_VERSION;
|
|
47
|
+
generatedAt: string;
|
|
48
|
+
repoDir: string;
|
|
49
|
+
fingerprint: RepoFingerprint;
|
|
50
|
+
actions: GenesisAction[];
|
|
51
|
+
/** Plain-English summary the AI can read aloud to the user. */
|
|
52
|
+
summary: string;
|
|
53
|
+
/** Estimated total time to apply (seconds). */
|
|
54
|
+
etaSeconds: number;
|
|
55
|
+
sig: string;
|
|
56
|
+
}
|
|
57
|
+
/** The core fingerprinter. Pure I/O — no network. */
|
|
58
|
+
export declare function fingerprintRepo(opts?: {
|
|
59
|
+
repoDir?: string;
|
|
60
|
+
}): RepoFingerprint;
|
|
61
|
+
/**
|
|
62
|
+
* Build a GenesisPlan from a fingerprint. Returns a tamper-evident,
|
|
63
|
+
* HMAC-signed plan listing every action and why. Apply via applyPlan().
|
|
64
|
+
*/
|
|
65
|
+
export declare function buildPlan(fingerprint: RepoFingerprint, opts?: {
|
|
66
|
+
repoDir?: string;
|
|
67
|
+
secret?: string;
|
|
68
|
+
}): GenesisPlan;
|
|
69
|
+
/** Convenience: fingerprint + plan in one call. */
|
|
70
|
+
export declare function genesisPlan(opts?: {
|
|
71
|
+
repoDir?: string;
|
|
72
|
+
secret?: string;
|
|
73
|
+
}): GenesisPlan;
|
|
74
|
+
export interface ApplyResult {
|
|
75
|
+
applied: string[];
|
|
76
|
+
skipped: string[];
|
|
77
|
+
errors: Array<{
|
|
78
|
+
module: string;
|
|
79
|
+
error: string;
|
|
80
|
+
}>;
|
|
81
|
+
durationMs: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Apply the plan to disk by composing onto the existing v2.14 modules.
|
|
85
|
+
* Each module's init is idempotent — re-running is safe.
|
|
86
|
+
*
|
|
87
|
+
* Module imports are dynamic so this file stays decoupled and testable
|
|
88
|
+
* with stubbed inputs.
|
|
89
|
+
*/
|
|
90
|
+
export declare function applyPlan(plan: GenesisPlan): Promise<ApplyResult>;
|
|
91
|
+
/** One-line pulse summary. */
|
|
92
|
+
export declare function formatGenesisLine(plan: GenesisPlan): string;
|
|
93
|
+
export {};
|
|
94
|
+
//# sourceMappingURL=index.d.ts.map
|
|
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iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAE3D"}
|
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.15.0 — MNEME GENESIS
|
|
3
|
+
*
|
|
4
|
+
* "Cold-start to value in 60 seconds. Mneme reads your repo, infers
|
|
5
|
+
* the stack, seeds project soul + bounty + replica + infra-brain
|
|
6
|
+
* + the right DLP rules, all signed and tamper-evident. Zero questions
|
|
7
|
+
* asked. Zero config files to write."
|
|
8
|
+
*
|
|
9
|
+
* The wild distribution wedge: the friction between `npm install` and
|
|
10
|
+
* "I see value" kills 90% of tools. GENESIS makes that gap < 60 seconds.
|
|
11
|
+
* Composes onto existing PROJECT SOUL / BOUNTY / REPLICA / INFRA modules.
|
|
12
|
+
*
|
|
13
|
+
* Detection signals:
|
|
14
|
+
* - package.json / pyproject.toml / Cargo.toml / go.mod / Gemfile
|
|
15
|
+
* - file extensions distribution (.ts, .py, .rs, .go, .rb, .java)
|
|
16
|
+
* - framework markers (next.config.* / vite.config.* / tailwind.config.*
|
|
17
|
+
* / django settings / rails Gemfile / etc)
|
|
18
|
+
* - CI presence (.github/workflows / .gitlab-ci.yml / .circleci/)
|
|
19
|
+
* - repo size + age (more rules for bigger / older repos)
|
|
20
|
+
*
|
|
21
|
+
* Outputs a `GenesisPlan` listing every action it would take. Caller
|
|
22
|
+
* confirms (or auto-applies). Plan is HMAC-signed for audit.
|
|
23
|
+
*/
|
|
24
|
+
import { createHmac } from "node:crypto";
|
|
25
|
+
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
26
|
+
import { join, extname, resolve, isAbsolute, basename } from "node:path";
|
|
27
|
+
const PROTOCOL_VERSION = 1;
|
|
28
|
+
const MAX_FILES_SCAN = 5000;
|
|
29
|
+
function canon(v) {
|
|
30
|
+
if (v === null || typeof v !== "object")
|
|
31
|
+
return JSON.stringify(v);
|
|
32
|
+
if (Array.isArray(v))
|
|
33
|
+
return "[" + v.map(canon).join(",") + "]";
|
|
34
|
+
const keys = Object.keys(v).sort();
|
|
35
|
+
return "{" + keys.map((k) => JSON.stringify(k) + ":" + canon(v[k])).join(",") + "}";
|
|
36
|
+
}
|
|
37
|
+
function defaultSecret() {
|
|
38
|
+
return process.env["MNEME_GENESIS_SECRET"] || `mneme-genesis-v${PROTOCOL_VERSION}`;
|
|
39
|
+
}
|
|
40
|
+
function resolveRoot(p) {
|
|
41
|
+
if (!p)
|
|
42
|
+
return process.cwd();
|
|
43
|
+
return isAbsolute(p) ? p : resolve(p);
|
|
44
|
+
}
|
|
45
|
+
const SKIP_DIRS = new Set([
|
|
46
|
+
"node_modules", ".git", "dist", "build", "out", "target", ".next",
|
|
47
|
+
"__pycache__", ".venv", "venv", "vendor", ".idea", ".vscode", ".cache",
|
|
48
|
+
"coverage", ".turbo", ".parcel-cache", ".pytest_cache", ".mypy_cache",
|
|
49
|
+
]);
|
|
50
|
+
function scanRepo(root) {
|
|
51
|
+
const result = { fileCount: 0, byExt: {}, found: new Set(), hasTestDir: false };
|
|
52
|
+
function walk(dir, depth) {
|
|
53
|
+
if (result.fileCount >= MAX_FILES_SCAN || depth > 8)
|
|
54
|
+
return;
|
|
55
|
+
let entries;
|
|
56
|
+
try {
|
|
57
|
+
entries = readdirSync(dir);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
for (const name of entries) {
|
|
63
|
+
if (result.fileCount >= MAX_FILES_SCAN)
|
|
64
|
+
return;
|
|
65
|
+
if (SKIP_DIRS.has(name))
|
|
66
|
+
continue;
|
|
67
|
+
const full = join(dir, name);
|
|
68
|
+
let st;
|
|
69
|
+
try {
|
|
70
|
+
st = statSync(full);
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (st.isDirectory()) {
|
|
76
|
+
if (/^(tests?|__tests__|spec)$/i.test(name))
|
|
77
|
+
result.hasTestDir = true;
|
|
78
|
+
walk(full, depth + 1);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
result.fileCount++;
|
|
82
|
+
const ext = extname(name).toLowerCase();
|
|
83
|
+
if (ext)
|
|
84
|
+
result.byExt[ext] = (result.byExt[ext] ?? 0) + 1;
|
|
85
|
+
result.found.add(name);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
walk(root, 0);
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
92
|
+
function detectStack(scan) {
|
|
93
|
+
const counts = scan.byExt;
|
|
94
|
+
// Pure-language detection by majority extension.
|
|
95
|
+
const langScore = {
|
|
96
|
+
typescript: (counts[".ts"] ?? 0) + (counts[".tsx"] ?? 0),
|
|
97
|
+
javascript: (counts[".js"] ?? 0) + (counts[".jsx"] ?? 0) + (counts[".mjs"] ?? 0) + (counts[".cjs"] ?? 0),
|
|
98
|
+
python: (counts[".py"] ?? 0),
|
|
99
|
+
rust: (counts[".rs"] ?? 0),
|
|
100
|
+
go: (counts[".go"] ?? 0),
|
|
101
|
+
ruby: (counts[".rb"] ?? 0),
|
|
102
|
+
java: (counts[".java"] ?? 0),
|
|
103
|
+
kotlin: (counts[".kt"] ?? 0) + (counts[".kts"] ?? 0),
|
|
104
|
+
swift: (counts[".swift"] ?? 0),
|
|
105
|
+
php: (counts[".php"] ?? 0),
|
|
106
|
+
csharp: (counts[".cs"] ?? 0),
|
|
107
|
+
elixir: (counts[".ex"] ?? 0) + (counts[".exs"] ?? 0),
|
|
108
|
+
};
|
|
109
|
+
const ranked = Object.entries(langScore).sort((a, b) => (b[1] ?? 0) - (a[1] ?? 0));
|
|
110
|
+
const top = ranked[0];
|
|
111
|
+
const second = ranked[1];
|
|
112
|
+
if (!top || (top[1] ?? 0) === 0)
|
|
113
|
+
return "unknown";
|
|
114
|
+
if (second && (second[1] ?? 0) > 0 && (top[1] ?? 0) < (second[1] ?? 0) * 1.5)
|
|
115
|
+
return "polyglot";
|
|
116
|
+
return top[0];
|
|
117
|
+
}
|
|
118
|
+
function detectFrameworks(root, scan) {
|
|
119
|
+
const frameworks = [];
|
|
120
|
+
const has = (name) => scan.found.has(name);
|
|
121
|
+
const fileContains = (path, needle) => {
|
|
122
|
+
try {
|
|
123
|
+
return readFileSync(join(root, path), "utf8").includes(needle);
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
// Next.js
|
|
130
|
+
if (has("next.config.js") || has("next.config.mjs") || has("next.config.ts"))
|
|
131
|
+
frameworks.push("next");
|
|
132
|
+
// Vite
|
|
133
|
+
if (has("vite.config.js") || has("vite.config.ts") || has("vite.config.mjs"))
|
|
134
|
+
frameworks.push("vite");
|
|
135
|
+
// Tailwind
|
|
136
|
+
if (has("tailwind.config.js") || has("tailwind.config.ts") || has("tailwind.config.cjs"))
|
|
137
|
+
frameworks.push("tailwind");
|
|
138
|
+
// Tauri / Electron / Expo
|
|
139
|
+
if (has("tauri.conf.json") || existsSync(join(root, "src-tauri")))
|
|
140
|
+
frameworks.push("tauri");
|
|
141
|
+
if (has("electron.js") || has("electron-builder.yml"))
|
|
142
|
+
frameworks.push("electron");
|
|
143
|
+
if (has("app.json") && fileContains("app.json", "expo"))
|
|
144
|
+
frameworks.push("expo");
|
|
145
|
+
// Django / Flask / FastAPI / Rails / Express / NestJS via package contents
|
|
146
|
+
if (has("manage.py") || has("settings.py") || has("urls.py"))
|
|
147
|
+
frameworks.push("django");
|
|
148
|
+
if (has("Gemfile"))
|
|
149
|
+
frameworks.push("rails");
|
|
150
|
+
if (has("package.json")) {
|
|
151
|
+
try {
|
|
152
|
+
const pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
|
|
153
|
+
const deps = { ...(pkg.dependencies ?? {}), ...(pkg.devDependencies ?? {}) };
|
|
154
|
+
if ("react" in deps)
|
|
155
|
+
frameworks.push("react");
|
|
156
|
+
if ("vue" in deps)
|
|
157
|
+
frameworks.push("vue");
|
|
158
|
+
if ("svelte" in deps)
|
|
159
|
+
frameworks.push("svelte");
|
|
160
|
+
if ("@angular/core" in deps)
|
|
161
|
+
frameworks.push("angular");
|
|
162
|
+
if ("express" in deps)
|
|
163
|
+
frameworks.push("express");
|
|
164
|
+
if ("@nestjs/core" in deps)
|
|
165
|
+
frameworks.push("nestjs");
|
|
166
|
+
if ("fastapi" in deps)
|
|
167
|
+
frameworks.push("fastapi");
|
|
168
|
+
if ("flask" in deps)
|
|
169
|
+
frameworks.push("flask");
|
|
170
|
+
}
|
|
171
|
+
catch { /* ignore */ }
|
|
172
|
+
}
|
|
173
|
+
if (has("pyproject.toml")) {
|
|
174
|
+
try {
|
|
175
|
+
const t = readFileSync(join(root, "pyproject.toml"), "utf8");
|
|
176
|
+
if (/django/i.test(t))
|
|
177
|
+
frameworks.push("django");
|
|
178
|
+
if (/flask/i.test(t))
|
|
179
|
+
frameworks.push("flask");
|
|
180
|
+
if (/fastapi/i.test(t))
|
|
181
|
+
frameworks.push("fastapi");
|
|
182
|
+
}
|
|
183
|
+
catch { /* ignore */ }
|
|
184
|
+
}
|
|
185
|
+
return frameworks.length > 0 ? Array.from(new Set(frameworks)) : ["none"];
|
|
186
|
+
}
|
|
187
|
+
function detectPackageManagers(scan) {
|
|
188
|
+
const out = [];
|
|
189
|
+
if (scan.found.has("package-lock.json"))
|
|
190
|
+
out.push("npm");
|
|
191
|
+
if (scan.found.has("pnpm-lock.yaml"))
|
|
192
|
+
out.push("pnpm");
|
|
193
|
+
if (scan.found.has("yarn.lock"))
|
|
194
|
+
out.push("yarn");
|
|
195
|
+
if (scan.found.has("bun.lockb") || scan.found.has("bun.lock"))
|
|
196
|
+
out.push("bun");
|
|
197
|
+
if (scan.found.has("requirements.txt") || scan.found.has("Pipfile"))
|
|
198
|
+
out.push("pip");
|
|
199
|
+
if (scan.found.has("uv.lock"))
|
|
200
|
+
out.push("uv");
|
|
201
|
+
if (scan.found.has("Cargo.lock"))
|
|
202
|
+
out.push("cargo");
|
|
203
|
+
if (scan.found.has("go.sum"))
|
|
204
|
+
out.push("go");
|
|
205
|
+
if (scan.found.has("Gemfile.lock"))
|
|
206
|
+
out.push("bundler");
|
|
207
|
+
if (scan.found.has("pom.xml"))
|
|
208
|
+
out.push("maven");
|
|
209
|
+
if (scan.found.has("build.gradle") || scan.found.has("build.gradle.kts"))
|
|
210
|
+
out.push("gradle");
|
|
211
|
+
return out;
|
|
212
|
+
}
|
|
213
|
+
function detectCI(root, scan) {
|
|
214
|
+
return existsSync(join(root, ".github", "workflows"))
|
|
215
|
+
|| scan.found.has(".gitlab-ci.yml")
|
|
216
|
+
|| existsSync(join(root, ".circleci"))
|
|
217
|
+
|| scan.found.has("azure-pipelines.yml")
|
|
218
|
+
|| scan.found.has(".drone.yml");
|
|
219
|
+
}
|
|
220
|
+
function detectAgeMonths(root, scan) {
|
|
221
|
+
// Heuristic: look at the oldest tracked file's mtime as a proxy. If git
|
|
222
|
+
// is available, prefer the first commit ts (cheap via plumbing).
|
|
223
|
+
try {
|
|
224
|
+
const candidates = ["README.md", "package.json", "pyproject.toml", "Cargo.toml", "go.mod", "Gemfile", ".gitignore"];
|
|
225
|
+
let oldest = Date.now();
|
|
226
|
+
for (const c of candidates) {
|
|
227
|
+
const p = join(root, c);
|
|
228
|
+
if (existsSync(p)) {
|
|
229
|
+
const t = statSync(p).mtimeMs;
|
|
230
|
+
if (t < oldest)
|
|
231
|
+
oldest = t;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
void scan; // keep signature stable for future use
|
|
235
|
+
const ageMs = Math.max(0, Date.now() - oldest);
|
|
236
|
+
return Math.round(ageMs / (30 * 24 * 60 * 60 * 1000) * 10) / 10;
|
|
237
|
+
}
|
|
238
|
+
catch {
|
|
239
|
+
return 0;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
/** The core fingerprinter. Pure I/O — no network. */
|
|
243
|
+
export function fingerprintRepo(opts = {}) {
|
|
244
|
+
const root = resolveRoot(opts.repoDir);
|
|
245
|
+
const scan = scanRepo(root);
|
|
246
|
+
const stack = detectStack(scan);
|
|
247
|
+
const frameworks = detectFrameworks(root, scan);
|
|
248
|
+
const hasCI = detectCI(root, scan);
|
|
249
|
+
const ageMonths = detectAgeMonths(root, scan);
|
|
250
|
+
const packageManagers = detectPackageManagers(scan);
|
|
251
|
+
return {
|
|
252
|
+
stack, frameworks, hasCI,
|
|
253
|
+
hasTests: scan.hasTestDir || (scan.byExt[".test.ts"] ?? 0) + (scan.byExt[".test.js"] ?? 0) + (scan.byExt[".spec.ts"] ?? 0) > 0,
|
|
254
|
+
fileCount: scan.fileCount,
|
|
255
|
+
ageMonths,
|
|
256
|
+
packageManagers,
|
|
257
|
+
signals: {
|
|
258
|
+
majorityExt: Object.entries(scan.byExt).sort((a, b) => b[1] - a[1])[0]?.[0] ?? "none",
|
|
259
|
+
hasReadme: scan.found.has("README.md") || scan.found.has("readme.md"),
|
|
260
|
+
hasLicense: scan.found.has("LICENSE") || scan.found.has("LICENSE.md"),
|
|
261
|
+
hasContributing: scan.found.has("CONTRIBUTING.md"),
|
|
262
|
+
hasChangelog: scan.found.has("CHANGELOG.md"),
|
|
263
|
+
},
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
const STACK_ANTIPATTERNS = {
|
|
267
|
+
typescript: [
|
|
268
|
+
{ module: "soul", description: "Add antiPattern: avoid `any` — prefer `unknown` + narrowing.", reason: "TypeScript lint best practice; reduces type-erasure bugs.", benefit: 8 },
|
|
269
|
+
{ module: "soul", description: "Add antiPattern: never silently catch errors without re-throw or log.", reason: "Reduces bug-hide pattern common in TS codebases.", benefit: 7 },
|
|
270
|
+
],
|
|
271
|
+
javascript: [
|
|
272
|
+
{ module: "soul", description: "Add convention: enable strict equality (===) — never ==.", reason: "Coercion-bug class kills JS projects.", benefit: 7 },
|
|
273
|
+
],
|
|
274
|
+
python: [
|
|
275
|
+
{ module: "soul", description: "Add convention: type hints on all public functions.", reason: "Static analysis benefits compound; reduces runtime errors.", benefit: 8 },
|
|
276
|
+
{ module: "soul", description: "Add antiPattern: never use `except:` without exception type.", reason: "Bare except hides KeyboardInterrupt and SystemExit; debugging nightmare.", benefit: 9 },
|
|
277
|
+
],
|
|
278
|
+
rust: [
|
|
279
|
+
{ module: "soul", description: "Add convention: avoid `unwrap()` / `panic!()` in library code.", reason: "Library panics propagate badly; prefer Result-returning APIs.", benefit: 9 },
|
|
280
|
+
],
|
|
281
|
+
go: [
|
|
282
|
+
{ module: "soul", description: "Add convention: always check returned error.", reason: "Go's idiomatic error handling; ignored errors hide bugs.", benefit: 9 },
|
|
283
|
+
],
|
|
284
|
+
ruby: [
|
|
285
|
+
{ module: "soul", description: "Add convention: avoid monkey-patching core classes outside spec.", reason: "Action-at-a-distance bugs.", benefit: 8 },
|
|
286
|
+
],
|
|
287
|
+
};
|
|
288
|
+
const FRAMEWORK_ANTIPATTERNS = {
|
|
289
|
+
react: [
|
|
290
|
+
{ module: "soul", description: "Add antiPattern: never call setState inside useEffect without dep array.", reason: "Infinite re-render bug class — costs production teams hours.", benefit: 10 },
|
|
291
|
+
{ module: "soul", description: "Add antiPattern: don't access window / document at module top-level (SSR break).", reason: "Common Next.js / Remix breakage.", benefit: 8 },
|
|
292
|
+
],
|
|
293
|
+
next: [
|
|
294
|
+
{ module: "soul", description: "Add sacred: app/layout.tsx is sacred — explicit ack to modify.", reason: "Root layout breaks the entire app.", benefit: 9 },
|
|
295
|
+
],
|
|
296
|
+
django: [
|
|
297
|
+
{ module: "soul", description: "Add antiPattern: never expose SECRET_KEY in version control.", reason: "Single most common Django security incident.", benefit: 10 },
|
|
298
|
+
{ module: "compliance", description: "Add DLP rule: Django SECRET_KEY pattern.", reason: "Pre-commit DLP catches accidental commits.", benefit: 9 },
|
|
299
|
+
],
|
|
300
|
+
rails: [
|
|
301
|
+
{ module: "soul", description: "Add antiPattern: avoid mass assignment without strong params.", reason: "Top Rails security regression class.", benefit: 9 },
|
|
302
|
+
],
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* Build a GenesisPlan from a fingerprint. Returns a tamper-evident,
|
|
306
|
+
* HMAC-signed plan listing every action and why. Apply via applyPlan().
|
|
307
|
+
*/
|
|
308
|
+
export function buildPlan(fingerprint, opts = {}) {
|
|
309
|
+
const root = resolveRoot(opts.repoDir);
|
|
310
|
+
const actions = [];
|
|
311
|
+
// Always: protective starter SOUL rules from the v2.14 seed.
|
|
312
|
+
actions.push({ module: "soul", description: "Initialise project soul with 5 protective starter rules (no-fake-files / no-secret-leak / sacred .mneme / utc-timestamps / honest-claims).", reason: "Universal AI-vs-team safety net.", benefit: 10 });
|
|
313
|
+
// Stack-specific antipatterns
|
|
314
|
+
const stackActs = STACK_ANTIPATTERNS[fingerprint.stack];
|
|
315
|
+
if (stackActs)
|
|
316
|
+
actions.push(...stackActs);
|
|
317
|
+
// Framework-specific antipatterns
|
|
318
|
+
for (const f of fingerprint.frameworks) {
|
|
319
|
+
const fa = FRAMEWORK_ANTIPATTERNS[f];
|
|
320
|
+
if (fa)
|
|
321
|
+
actions.push(...fa);
|
|
322
|
+
}
|
|
323
|
+
// BOUNTY — initialise empty ledger so the first claim has somewhere to land.
|
|
324
|
+
actions.push({ module: "bounty", description: "Initialise empty BOUNTY ledger; first AI claim will be recorded automatically.", reason: "Vendor trust scorecard requires bootstrapped ledger.", benefit: 7 });
|
|
325
|
+
// REPLICA — only valuable if there's a history to seed from.
|
|
326
|
+
if (fingerprint.ageMonths >= 1) {
|
|
327
|
+
actions.push({ module: "replica", description: "Initialise REPLICA corpus; future decisions will populate the oracle.", reason: `Repo is ~${fingerprint.ageMonths} months old; replica gets useful within ~10 captured decisions.`, benefit: 7 });
|
|
328
|
+
}
|
|
329
|
+
// INFRA — only valuable if there's CI or deploy signal.
|
|
330
|
+
if (fingerprint.hasCI) {
|
|
331
|
+
actions.push({ module: "infra", description: "Initialise INFRA observation log; hook into CI pipeline for deploy / failure events.", reason: "Detected CI workflows; capture-once gives recurring-pattern detection.", benefit: 8 });
|
|
332
|
+
}
|
|
333
|
+
// KILL SWITCH compliance — propose for older / larger repos.
|
|
334
|
+
if (fingerprint.fileCount > 200 || fingerprint.ageMonths > 6) {
|
|
335
|
+
actions.push({ module: "compliance", description: "Initialise compliance audit log; AI interactions become court-admissible HMAC chain.", reason: `Repo size (${fingerprint.fileCount} files) or age (${fingerprint.ageMonths}mo) suggests stable enough for audit value.`, benefit: 7 });
|
|
336
|
+
}
|
|
337
|
+
// ETA: rough — soul init ~5s, others ~2s each.
|
|
338
|
+
const etaSeconds = 5 + actions.length * 2;
|
|
339
|
+
// Plain-English summary — the AI quotes this to the user.
|
|
340
|
+
const fwList = fingerprint.frameworks.filter((f) => f !== "none").join(", ");
|
|
341
|
+
const summary = [
|
|
342
|
+
`Detected: ${fingerprint.stack === "polyglot" ? "polyglot" : fingerprint.stack}${fwList ? ` + ${fwList}` : ""}, ${fingerprint.fileCount} files, ${fingerprint.ageMonths} months old${fingerprint.hasCI ? ", CI present" : ""}${fingerprint.hasTests ? ", tests present" : ""}.`,
|
|
343
|
+
`Plan: ${actions.length} actions across ${new Set(actions.map((a) => a.module)).size} module(s).`,
|
|
344
|
+
`Estimated time: ${etaSeconds}s.`,
|
|
345
|
+
"All actions are reversible (each module's storage lives in .mneme/ and can be deleted).",
|
|
346
|
+
].join(" ");
|
|
347
|
+
const generatedAt = new Date().toISOString();
|
|
348
|
+
const body = { v: PROTOCOL_VERSION, generatedAt, repoDir: root, fingerprint, actions, summary, etaSeconds };
|
|
349
|
+
const sig = createHmac("sha256", opts.secret ?? defaultSecret()).update(canon(body)).digest("hex");
|
|
350
|
+
return { ...body, sig };
|
|
351
|
+
}
|
|
352
|
+
/** Convenience: fingerprint + plan in one call. */
|
|
353
|
+
export function genesisPlan(opts = {}) {
|
|
354
|
+
return buildPlan(fingerprintRepo({ ...(opts.repoDir ? { repoDir: opts.repoDir } : {}) }), opts);
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Apply the plan to disk by composing onto the existing v2.14 modules.
|
|
358
|
+
* Each module's init is idempotent — re-running is safe.
|
|
359
|
+
*
|
|
360
|
+
* Module imports are dynamic so this file stays decoupled and testable
|
|
361
|
+
* with stubbed inputs.
|
|
362
|
+
*/
|
|
363
|
+
export async function applyPlan(plan) {
|
|
364
|
+
const t0 = Date.now();
|
|
365
|
+
const applied = [];
|
|
366
|
+
const skipped = [];
|
|
367
|
+
const errors = [];
|
|
368
|
+
const repoDir = plan.repoDir;
|
|
369
|
+
const modulesUsed = new Set(plan.actions.map((a) => a.module));
|
|
370
|
+
if (modulesUsed.has("soul")) {
|
|
371
|
+
try {
|
|
372
|
+
const soul = await import("../project_soul/index.js");
|
|
373
|
+
let s = soul.loadSoul({ repoDir });
|
|
374
|
+
if (!s) {
|
|
375
|
+
const projectName = basename(repoDir);
|
|
376
|
+
const stack = plan.fingerprint.stack;
|
|
377
|
+
const frameworks = plan.fingerprint.frameworks.filter((f) => f !== "none").join(", ");
|
|
378
|
+
s = soul.newSoul(projectName, `${stack}${frameworks ? ` + ${frameworks}` : ""} project bootstrapped by Mneme GENESIS`);
|
|
379
|
+
}
|
|
380
|
+
s = soul.seedDefaultRules(s);
|
|
381
|
+
// Apply stack-specific rules
|
|
382
|
+
for (const action of plan.actions.filter((a) => a.module === "soul")) {
|
|
383
|
+
// Try to extract a rule id from description heuristically.
|
|
384
|
+
const text = action.description.replace(/^Add (antiPattern|convention|sacred):\s*/i, "");
|
|
385
|
+
const id = text.toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 40).replace(/^-+|-+$/g, "");
|
|
386
|
+
if (s[/sacred:/i.test(action.description) ? "sacred" : /convention:/i.test(action.description) ? "conventions" : "antiPatterns"].some((r) => r.id === id))
|
|
387
|
+
continue;
|
|
388
|
+
try {
|
|
389
|
+
s = soul.addRule(s, {
|
|
390
|
+
category: /sacred:/i.test(action.description) ? "sacred"
|
|
391
|
+
: /convention:/i.test(action.description) ? "conventions"
|
|
392
|
+
: "antiPatterns",
|
|
393
|
+
id,
|
|
394
|
+
text,
|
|
395
|
+
severity: action.benefit >= 9 ? "block" : "warn",
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
catch { /* duplicate or invalid; skip */ }
|
|
399
|
+
}
|
|
400
|
+
soul.saveSoul(s, { repoDir });
|
|
401
|
+
applied.push(`soul (${s.ruleCount} rules)`);
|
|
402
|
+
}
|
|
403
|
+
catch (e) {
|
|
404
|
+
errors.push({ module: "soul", error: e.message.slice(0, 200) });
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
if (modulesUsed.has("bounty")) {
|
|
408
|
+
try {
|
|
409
|
+
// Just touch the file by reading + verifying the chain is empty/valid.
|
|
410
|
+
const bounty = await import("../bounty/index.js");
|
|
411
|
+
const v = bounty.verifyChain({ repoDir });
|
|
412
|
+
applied.push(`bounty (${v.total} entries)`);
|
|
413
|
+
}
|
|
414
|
+
catch (e) {
|
|
415
|
+
errors.push({ module: "bounty", error: e.message.slice(0, 200) });
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
if (modulesUsed.has("replica")) {
|
|
419
|
+
try {
|
|
420
|
+
// Touch; corpus starts empty.
|
|
421
|
+
await import("../replica/index.js");
|
|
422
|
+
applied.push("replica (corpus initialised)");
|
|
423
|
+
}
|
|
424
|
+
catch (e) {
|
|
425
|
+
errors.push({ module: "replica", error: e.message.slice(0, 200) });
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
if (modulesUsed.has("infra")) {
|
|
429
|
+
try {
|
|
430
|
+
await import("../infra_brain/index.js");
|
|
431
|
+
applied.push("infra (observation log initialised)");
|
|
432
|
+
}
|
|
433
|
+
catch (e) {
|
|
434
|
+
errors.push({ module: "infra", error: e.message.slice(0, 200) });
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
if (modulesUsed.has("compliance")) {
|
|
438
|
+
try {
|
|
439
|
+
await import("../kill_switch/index.js");
|
|
440
|
+
applied.push("compliance (audit log initialised)");
|
|
441
|
+
}
|
|
442
|
+
catch (e) {
|
|
443
|
+
errors.push({ module: "compliance", error: e.message.slice(0, 200) });
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
return { applied, skipped, errors, durationMs: Date.now() - t0 };
|
|
447
|
+
}
|
|
448
|
+
/** One-line pulse summary. */
|
|
449
|
+
export function formatGenesisLine(plan) {
|
|
450
|
+
return `GENESIS · ${plan.fingerprint.stack} · ${plan.actions.length} actions · ETA ${plan.etaSeconds}s · sig=${plan.sig.slice(0, 8)}`;
|
|
451
|
+
}
|
|
452
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/genesis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEzE,MAAM,gBAAgB,GAAG,CAAU,CAAC;AACpC,MAAM,cAAc,GAAG,IAAI,CAAC;AA6C5B,SAAS,KAAK,CAAC,CAAU;IACvB,IAAI,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAClE,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAAE,OAAO,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IAChE,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAA4B,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9D,OAAO,GAAG,GAAG,IAA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