@rryando/arcs 3.3.2 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -14
- package/dist/cli/arcs-orchestrate.d.ts +1 -1
- package/dist/cli/arcs-orchestrate.d.ts.map +1 -1
- package/dist/cli/arcs-orchestrate.js +5 -3
- package/dist/cli/arcs-orchestrate.js.map +1 -1
- package/dist/cli/bundle-installer.d.ts.map +1 -1
- package/dist/cli/bundle-installer.js +32 -0
- package/dist/cli/bundle-installer.js.map +1 -1
- package/dist/cli/commands/maintenance.js +26 -24
- package/dist/cli/commands/maintenance.js.map +1 -1
- package/dist/cli/commands/project.js +49 -26
- package/dist/cli/commands/project.js.map +1 -1
- package/dist/cli/commands/proposal.js +12 -11
- package/dist/cli/commands/proposal.js.map +1 -1
- package/dist/cli/config.d.ts +19 -0
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +23 -0
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/instructions.d.ts.map +1 -1
- package/dist/cli/instructions.js +14 -0
- package/dist/cli/instructions.js.map +1 -1
- package/dist/cli/setup.d.ts +6 -3
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +125 -70
- package/dist/cli/setup.js.map +1 -1
- package/dist/utils/codegraph-install.d.ts +16 -0
- package/dist/utils/codegraph-install.d.ts.map +1 -0
- package/dist/utils/codegraph-install.js +81 -0
- package/dist/utils/codegraph-install.js.map +1 -0
- package/dist/utils/codegraph-knowledge.d.ts +22 -0
- package/dist/utils/codegraph-knowledge.d.ts.map +1 -0
- package/dist/utils/codegraph-knowledge.js +47 -0
- package/dist/utils/codegraph-knowledge.js.map +1 -0
- package/dist/utils/codegraph.d.ts +101 -0
- package/dist/utils/codegraph.d.ts.map +1 -0
- package/dist/utils/codegraph.js +383 -0
- package/dist/utils/codegraph.js.map +1 -0
- package/dist/utils/json-schemas.d.ts +84 -84
- package/dist/utils/json-schemas.d.ts.map +1 -1
- package/dist/utils/json-schemas.js +11 -9
- package/dist/utils/json-schemas.js.map +1 -1
- package/dist/utils/proposal-store.d.ts +2 -2
- package/dist/utils/proposal-store.d.ts.map +1 -1
- package/dist/utils/proposal-store.js +34 -7
- package/dist/utils/proposal-store.js.map +1 -1
- package/opencode/arcs/bundle-runtime.json +2 -2
- package/opencode/arcs/manifest.json +1 -1
- package/opencode/arcs/prompts/arcs-orchestrate-caveman.txt +5 -3
- package/opencode/arcs/prompts/arcs-orchestrate.txt +5 -3
- package/opencode/arcs/prompts/code-reviewer.txt +2 -0
- package/opencode/arcs/prompts/docs-researcher.txt +1 -1
- package/opencode/arcs/prompts/graph-explorer.txt +36 -202
- package/opencode/arcs/prompts/oncall-ops.txt +2 -0
- package/opencode/arcs/prompts/system-architect.txt +2 -0
- package/opencode/arcs/prompts/tech-architect.txt +2 -0
- package/opencode/arcs/skills/deep-pr-review/SKILL.md +5 -5
- package/opencode/arcs/skills/deep-pr-review/{graphify-diff.md → codegraph-diff.md} +27 -31
- package/opencode/arcs/skills/deep-pr-review/review-template.md +2 -2
- package/opencode/arcs/skills/{enriching-graphify-proposals → enriching-codegraph-proposals}/SKILL.md +8 -8
- package/opencode/arcs/skills/init-project/SKILL.md +38 -38
- package/package.json +2 -2
- package/scripts/build-opencode-bundle.mjs +4 -3
- package/scripts/deploy-claudecode-bundle.mjs +8 -1
- package/scripts/deploy-opencode-bundle.mjs +8 -1
- package/scripts/lib/bundle-helpers.mjs +17 -0
- package/scripts/lint-bundle.mjs +5 -2
- package/skills/init-project.md +25 -25
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegraph.d.ts","sourceRoot":"","sources":["../../src/utils/codegraph.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,eAAe,IA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AK,EAAE,MAAM,GAAG,eAAe,CA8MlF"}
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { execSync, spawnSync } from "node:child_process";
|
|
2
|
+
import { appendFileSync, existsSync, readFileSync } from "node:fs";
|
|
3
|
+
import { basename, extname, join, resolve } from "node:path";
|
|
4
|
+
export function detectCodegraph() {
|
|
5
|
+
try {
|
|
6
|
+
const version = execSync("codegraph --version", {
|
|
7
|
+
encoding: "utf-8",
|
|
8
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
9
|
+
timeout: 5000,
|
|
10
|
+
}).trim();
|
|
11
|
+
const resolvedPath = execSync("which codegraph", {
|
|
12
|
+
encoding: "utf-8",
|
|
13
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
14
|
+
timeout: 5000,
|
|
15
|
+
}).trim();
|
|
16
|
+
// Extract semver from output (e.g. "codegraph 0.9.9" or just "0.9.9")
|
|
17
|
+
const match = version.match(/(\d+\.\d+\.\d+)/);
|
|
18
|
+
return {
|
|
19
|
+
available: true,
|
|
20
|
+
version: match ? match[1] : version,
|
|
21
|
+
path: resolvedPath || undefined,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return { available: false };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// --- Shared predicates / helpers ---
|
|
29
|
+
/**
|
|
30
|
+
* Test files import/define many symbols but aren't architectural hubs.
|
|
31
|
+
*/
|
|
32
|
+
const isTestFile = (file) => /\.(test|spec)\.[jt]sx?$/.test(file) ||
|
|
33
|
+
file.startsWith("test/") ||
|
|
34
|
+
file.startsWith("tests/") ||
|
|
35
|
+
file.includes("/__tests__/");
|
|
36
|
+
/** First N path segments (default 2), e.g. "src/utils/foo.ts" → "src/utils". */
|
|
37
|
+
function dirPrefix(file, segments = 2) {
|
|
38
|
+
return file.split("/").slice(0, segments).join("/");
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Run a codegraph CLI subcommand and parse its stdout as JSON.
|
|
42
|
+
*
|
|
43
|
+
* CRITICAL: codegraph prints plain-text "Symbol X not found" notices (with
|
|
44
|
+
* ANSI codes) to stdout/stderr even with --json, and exits 0. There is no JSON
|
|
45
|
+
* payload in that case. Every parse must therefore be guarded — empty or
|
|
46
|
+
* non-JSON stdout → null (no-data), NEVER throw.
|
|
47
|
+
*/
|
|
48
|
+
function runCgJson(args, timeout = 15_000) {
|
|
49
|
+
try {
|
|
50
|
+
const result = spawnSync("codegraph", args, {
|
|
51
|
+
encoding: "utf-8",
|
|
52
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
53
|
+
timeout,
|
|
54
|
+
});
|
|
55
|
+
if (result.error)
|
|
56
|
+
return null;
|
|
57
|
+
const out = (result.stdout || "").trim();
|
|
58
|
+
if (!out)
|
|
59
|
+
return null;
|
|
60
|
+
// Guarded parse — plain-text "not found" notices are not valid JSON.
|
|
61
|
+
try {
|
|
62
|
+
return JSON.parse(out);
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function cgStatus() {
|
|
73
|
+
const status = runCgJson(["status", "--json"], 15_000);
|
|
74
|
+
if (!status || typeof status.initialized !== "boolean")
|
|
75
|
+
return null;
|
|
76
|
+
return status;
|
|
77
|
+
}
|
|
78
|
+
function cgFiles() {
|
|
79
|
+
const files = runCgJson(["files", "--json"], 15_000);
|
|
80
|
+
return Array.isArray(files) ? files : [];
|
|
81
|
+
}
|
|
82
|
+
function cgQueryFunctions(term, limit) {
|
|
83
|
+
const hits = runCgJson(["query", term, "--kind", "function", "--limit", String(limit), "--json"], 15_000);
|
|
84
|
+
if (!Array.isArray(hits))
|
|
85
|
+
return [];
|
|
86
|
+
return hits.map((h) => h?.node).filter((n) => !!n && typeof n.id === "string");
|
|
87
|
+
}
|
|
88
|
+
function cgCallers(name, limit) {
|
|
89
|
+
const res = runCgJson(["callers", name, "--limit", String(limit), "--json"], 15_000);
|
|
90
|
+
return res && Array.isArray(res.callers) ? res.callers : [];
|
|
91
|
+
}
|
|
92
|
+
function cgCallees(name, limit) {
|
|
93
|
+
const res = runCgJson(["callees", name, "--limit", String(limit), "--json"], 15_000);
|
|
94
|
+
return res && Array.isArray(res.callees) ? res.callees : [];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Approximate file "type" buckets from language/extension
|
|
98
|
+
* (code vs document vs other).
|
|
99
|
+
*/
|
|
100
|
+
function fileTypeOf(file) {
|
|
101
|
+
const ext = extname(file.path).toLowerCase();
|
|
102
|
+
if (ext === ".ts" || ext === ".tsx" || ext === ".js" || ext === ".jsx" || ext === ".mjs") {
|
|
103
|
+
return "code";
|
|
104
|
+
}
|
|
105
|
+
if (ext === ".md" || ext === ".mdx")
|
|
106
|
+
return "document";
|
|
107
|
+
const lang = (file.language || "").toLowerCase();
|
|
108
|
+
if (lang === "typescript" || lang === "javascript")
|
|
109
|
+
return "code";
|
|
110
|
+
if (lang === "markdown")
|
|
111
|
+
return "document";
|
|
112
|
+
return lang || "unknown";
|
|
113
|
+
}
|
|
114
|
+
// --- runIndex ---
|
|
115
|
+
export function runIndex(workspacePath) {
|
|
116
|
+
const info = detectCodegraph();
|
|
117
|
+
if (!info.available) {
|
|
118
|
+
return {
|
|
119
|
+
success: false,
|
|
120
|
+
error: "codegraph binary not found",
|
|
121
|
+
code: "ENOENT",
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
const absolutePath = resolve(workspacePath);
|
|
125
|
+
// `index <path> --force --quiet` is side-effecting and non-interactive.
|
|
126
|
+
// (`init -i` is deprecated.) No --json on this command.
|
|
127
|
+
const result = spawnSync("codegraph", ["index", absolutePath, "--force", "--quiet"], {
|
|
128
|
+
encoding: "utf-8",
|
|
129
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
130
|
+
timeout: 120_000,
|
|
131
|
+
cwd: absolutePath,
|
|
132
|
+
});
|
|
133
|
+
if (result.error) {
|
|
134
|
+
const errCode = result.error.code;
|
|
135
|
+
return {
|
|
136
|
+
success: false,
|
|
137
|
+
error: result.error.message,
|
|
138
|
+
code: errCode === "ETIMEDOUT" ? "ETIMEDOUT" : errCode,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
if (result.status !== 0) {
|
|
142
|
+
const stderr = result.stderr?.trim() || "Process exited with non-zero status";
|
|
143
|
+
return {
|
|
144
|
+
success: false,
|
|
145
|
+
error: stderr,
|
|
146
|
+
code: `EXIT_${result.status}`,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
// Ensure .codegraph/ is in .gitignore so the index db doesn't pollute the repo.
|
|
150
|
+
ensureGitignoreEntry(absolutePath, ".codegraph/");
|
|
151
|
+
const status = cgStatus();
|
|
152
|
+
if (!status) {
|
|
153
|
+
return {
|
|
154
|
+
success: false,
|
|
155
|
+
error: "Index completed but codegraph status returned no valid JSON",
|
|
156
|
+
code: "ENODATA",
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
if (!status.initialized) {
|
|
160
|
+
return {
|
|
161
|
+
success: false,
|
|
162
|
+
error: "Index completed but codegraph reports not initialized",
|
|
163
|
+
code: "ENOINIT",
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
success: true,
|
|
168
|
+
status,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
// --- ingestGraph (CLI-only) ---
|
|
172
|
+
export function ingestGraph(_workspacePath, _slug) {
|
|
173
|
+
const empty = {
|
|
174
|
+
proposals: [],
|
|
175
|
+
stats: { godNodes: 0, communities: 0, crossModuleCouplings: 0, totalProposals: 0 },
|
|
176
|
+
};
|
|
177
|
+
const info = detectCodegraph();
|
|
178
|
+
if (!info.available)
|
|
179
|
+
return empty;
|
|
180
|
+
// (a) status
|
|
181
|
+
const status = cgStatus();
|
|
182
|
+
if (!status?.initialized || status.nodeCount <= 0)
|
|
183
|
+
return empty;
|
|
184
|
+
// (b) files (minus test files)
|
|
185
|
+
const allFiles = cgFiles();
|
|
186
|
+
const files = allFiles.filter((f) => f?.path && !isTestFile(f.path));
|
|
187
|
+
if (files.length === 0)
|
|
188
|
+
return empty;
|
|
189
|
+
const proposals = [];
|
|
190
|
+
const communityMap = new Map();
|
|
191
|
+
for (const f of files) {
|
|
192
|
+
const prefix = dirPrefix(f.path);
|
|
193
|
+
if (!prefix)
|
|
194
|
+
continue;
|
|
195
|
+
const list = communityMap.get(prefix) || [];
|
|
196
|
+
list.push(f);
|
|
197
|
+
communityMap.set(prefix, list);
|
|
198
|
+
}
|
|
199
|
+
const communities = [];
|
|
200
|
+
for (const [prefix, groupFiles] of communityMap) {
|
|
201
|
+
if (groupFiles.length < 3)
|
|
202
|
+
continue;
|
|
203
|
+
const memberCount = groupFiles.reduce((sum, f) => sum + (f.nodeCount || 0), 0);
|
|
204
|
+
communities.push({ prefix, files: groupFiles, memberCount });
|
|
205
|
+
}
|
|
206
|
+
// Cap surviving communities at 8 (largest first, by member/node count).
|
|
207
|
+
communities.sort((a, b) => b.memberCount - a.memberCount);
|
|
208
|
+
const survivingCommunities = communities.slice(0, 8);
|
|
209
|
+
for (const community of survivingCommunities) {
|
|
210
|
+
const fileTypeBreakdown = {};
|
|
211
|
+
for (const f of community.files) {
|
|
212
|
+
const t = fileTypeOf(f);
|
|
213
|
+
fileTypeBreakdown[t] = (fileTypeBreakdown[t] || 0) + 1;
|
|
214
|
+
}
|
|
215
|
+
const topFilesByEntityCount = [...community.files]
|
|
216
|
+
.sort((a, b) => (b.nodeCount || 0) - (a.nodeCount || 0))
|
|
217
|
+
.slice(0, 3)
|
|
218
|
+
.map((f) => ({ file: f.path, count: f.nodeCount || 0 }));
|
|
219
|
+
// Heuristic: large top-level communities → "architecture", others → "module".
|
|
220
|
+
// "src" / 2-segment prefixes that are big are architectural surfaces.
|
|
221
|
+
const isArchitectural = community.files.length >= 8 || community.memberCount >= 100 || community.prefix === "src";
|
|
222
|
+
proposals.push({
|
|
223
|
+
id: makeProposalId("codegraph-cluster", community.prefix),
|
|
224
|
+
kind: isArchitectural ? "architecture" : "module",
|
|
225
|
+
label: community.prefix,
|
|
226
|
+
structuralFacts: {
|
|
227
|
+
memberCount: community.memberCount,
|
|
228
|
+
fileCount: community.files.length,
|
|
229
|
+
fileTypeBreakdown,
|
|
230
|
+
topFilesByEntityCount,
|
|
231
|
+
},
|
|
232
|
+
sourceFiles: community.files.map((f) => ({ path: f.path })),
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
// ----- (d) GOD-NODES -----
|
|
236
|
+
// Pre-filter: densest ~30 files by nodeCount.
|
|
237
|
+
const densestFiles = [...files]
|
|
238
|
+
.filter((f) => (f.nodeCount || 0) > 0)
|
|
239
|
+
.sort((a, b) => (b.nodeCount || 0) - (a.nodeCount || 0))
|
|
240
|
+
.slice(0, 30);
|
|
241
|
+
// Collect candidate function nodes via per-file basename query.
|
|
242
|
+
const candidatesById = new Map();
|
|
243
|
+
for (const f of densestFiles) {
|
|
244
|
+
if (candidatesById.size >= 40)
|
|
245
|
+
break;
|
|
246
|
+
const term = basename(f.path, extname(f.path));
|
|
247
|
+
if (!term)
|
|
248
|
+
continue;
|
|
249
|
+
const hits = cgQueryFunctions(term, 5);
|
|
250
|
+
for (const node of hits) {
|
|
251
|
+
if (candidatesById.size >= 40)
|
|
252
|
+
break;
|
|
253
|
+
if (!candidatesById.has(node.id))
|
|
254
|
+
candidatesById.set(node.id, node);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
const scored = [];
|
|
258
|
+
for (const node of candidatesById.values()) {
|
|
259
|
+
const name = node.name;
|
|
260
|
+
if (!name)
|
|
261
|
+
continue;
|
|
262
|
+
const callers = cgCallers(name, 100);
|
|
263
|
+
const callees = cgCallees(name, 100);
|
|
264
|
+
scored.push({ node, callers, callees, score: callers.length + callees.length });
|
|
265
|
+
}
|
|
266
|
+
const godNodes = scored
|
|
267
|
+
.filter((s) => !!s.node.filePath && !isTestFile(s.node.filePath))
|
|
268
|
+
.sort((a, b) => b.score - a.score)
|
|
269
|
+
.slice(0, 8);
|
|
270
|
+
for (const g of godNodes) {
|
|
271
|
+
const nodeFile = g.node.filePath;
|
|
272
|
+
const topCallers = g.callers
|
|
273
|
+
.slice(0, 5)
|
|
274
|
+
.map((c) => ({ label: c.name || "", file: c.filePath || "" }));
|
|
275
|
+
const topCallees = g.callees
|
|
276
|
+
.slice(0, 5)
|
|
277
|
+
.map((c) => ({ label: c.name || "", file: c.filePath || "" }));
|
|
278
|
+
proposals.push({
|
|
279
|
+
id: makeProposalId("codegraph-god", `${g.node.name}-${nodeFile}`),
|
|
280
|
+
kind: "module",
|
|
281
|
+
label: g.node.name || nodeFile,
|
|
282
|
+
structuralFacts: {
|
|
283
|
+
nodeFile,
|
|
284
|
+
nodeIn: g.callers.length,
|
|
285
|
+
nodeOut: g.callees.length,
|
|
286
|
+
topCallers,
|
|
287
|
+
topCallees,
|
|
288
|
+
},
|
|
289
|
+
sourceFiles: [{ path: nodeFile }],
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
const couplingByPair = new Map();
|
|
293
|
+
for (const g of godNodes) {
|
|
294
|
+
const nodeFile = g.node.filePath;
|
|
295
|
+
const nodePrefix = dirPrefix(nodeFile);
|
|
296
|
+
const edges = [...g.callers, ...g.callees];
|
|
297
|
+
for (const edge of edges) {
|
|
298
|
+
const edgeFile = edge.filePath;
|
|
299
|
+
if (!edgeFile || isTestFile(edgeFile))
|
|
300
|
+
continue;
|
|
301
|
+
const edgePrefix = dirPrefix(edgeFile);
|
|
302
|
+
if (!nodePrefix || !edgePrefix || nodePrefix === edgePrefix)
|
|
303
|
+
continue;
|
|
304
|
+
// Canonicalize the pair so (A,B) and (B,A) aggregate together.
|
|
305
|
+
const [pA, pB, fA, fB] = nodePrefix < edgePrefix
|
|
306
|
+
? [nodePrefix, edgePrefix, nodeFile, edgeFile]
|
|
307
|
+
: [edgePrefix, nodePrefix, edgeFile, nodeFile];
|
|
308
|
+
const key = `${pA}|${pB}`;
|
|
309
|
+
const existing = couplingByPair.get(key);
|
|
310
|
+
if (existing) {
|
|
311
|
+
existing.count++;
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
couplingByPair.set(key, { prefixA: pA, prefixB: pB, count: 1, fileA: fA, fileB: fB });
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
const topCouplings = [...couplingByPair.values()].sort((a, b) => b.count - a.count).slice(0, 5);
|
|
319
|
+
for (const c of topCouplings) {
|
|
320
|
+
proposals.push({
|
|
321
|
+
id: makeProposalId("codegraph-coupling", `${c.prefixA}-${c.prefixB}`),
|
|
322
|
+
kind: "gotcha",
|
|
323
|
+
label: `${c.prefixA} ↔ ${c.prefixB}`,
|
|
324
|
+
structuralFacts: {
|
|
325
|
+
couplingA: { label: c.prefixA, file: c.fileA, degree: c.count },
|
|
326
|
+
couplingB: { label: c.prefixB, file: c.fileB, degree: c.count },
|
|
327
|
+
// codegraph exposes no edge-type labels — hard-coded per spike.
|
|
328
|
+
relations: ["calls"],
|
|
329
|
+
},
|
|
330
|
+
sourceFiles: [{ path: c.fileA }, { path: c.fileB }],
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
// ----- (f) Cap total at 20 -----
|
|
334
|
+
const capped = proposals.slice(0, 20);
|
|
335
|
+
return {
|
|
336
|
+
proposals: capped,
|
|
337
|
+
stats: {
|
|
338
|
+
godNodes: capped.filter((p) => p.id.startsWith("codegraph-god-")).length,
|
|
339
|
+
communities: capped.filter((p) => p.id.startsWith("codegraph-cluster-")).length,
|
|
340
|
+
crossModuleCouplings: capped.filter((p) => p.id.startsWith("codegraph-coupling-")).length,
|
|
341
|
+
totalProposals: capped.length,
|
|
342
|
+
},
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Slugify a label suffix and prefix it. Stable, lowercase, dash-separated.
|
|
347
|
+
* E.g. makeProposalId("codegraph-cluster", "src/utils") → "codegraph-cluster-src-utils".
|
|
348
|
+
*/
|
|
349
|
+
function makeProposalId(prefix, suffix) {
|
|
350
|
+
const slug = suffix
|
|
351
|
+
.toLowerCase()
|
|
352
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
353
|
+
.replace(/^-+|-+$/g, "")
|
|
354
|
+
.slice(0, 80);
|
|
355
|
+
return slug ? `${prefix}-${slug}` : prefix;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Append an entry to .gitignore if it's not already present.
|
|
359
|
+
* Creates the file if it doesn't exist.
|
|
360
|
+
*/
|
|
361
|
+
function ensureGitignoreEntry(workspacePath, entry) {
|
|
362
|
+
const gitignorePath = join(workspacePath, ".gitignore");
|
|
363
|
+
try {
|
|
364
|
+
if (existsSync(gitignorePath)) {
|
|
365
|
+
const content = readFileSync(gitignorePath, "utf-8");
|
|
366
|
+
// Check if entry already present (exact line match)
|
|
367
|
+
const lines = content.split("\n").map((l) => l.trim());
|
|
368
|
+
if (lines.includes(entry))
|
|
369
|
+
return;
|
|
370
|
+
// Append with newline separator if file doesn't end with one
|
|
371
|
+
const separator = content.endsWith("\n") ? "" : "\n";
|
|
372
|
+
appendFileSync(gitignorePath, `${separator}${entry}\n`, "utf-8");
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
// Create .gitignore with the entry
|
|
376
|
+
appendFileSync(gitignorePath, `${entry}\n`, "utf-8");
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
catch {
|
|
380
|
+
// Non-fatal — don't fail over .gitignore issues
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
//# sourceMappingURL=codegraph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegraph.js","sourceRoot":"","sources":["../../src/utils/codegraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC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E,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YACvD,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAAE,OAAO;YAClC,6DAA6D;YAC7D,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YACrD,cAAc,CAAC,aAAa,EAAE,GAAG,SAAS,GAAG,KAAK,IAAI,EAAE,OAAO,CAAC,CAAC;QACnE,CAAC;aAAM,CAAC;YACN,mCAAmC;YACnC,cAAc,CAAC,aAAa,EAAE,GAAG,KAAK,IAAI,EAAE,OAAO,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,gDAAgD;IAClD,CAAC;AACH,CAAC"}
|
|
@@ -78,27 +78,27 @@ export declare const rootMetaSchema: z.ZodObject<{
|
|
|
78
78
|
}>;
|
|
79
79
|
export type RootMetaJson = z.infer<typeof rootMetaSchema>;
|
|
80
80
|
export declare const syncStatsSchema: z.ZodObject<{
|
|
81
|
-
docsUpdated: z.ZodNumber
|
|
82
|
-
knowledgeEntriesCreated: z.ZodNumber
|
|
83
|
-
knowledgeEntriesUpdated: z.ZodNumber
|
|
84
|
-
tasksTransitioned: z.ZodNumber
|
|
85
|
-
plansUpdated: z.ZodNumber
|
|
86
|
-
diagramsDrifted: z.ZodNumber
|
|
87
|
-
}, "
|
|
88
|
-
docsUpdated:
|
|
89
|
-
knowledgeEntriesCreated:
|
|
90
|
-
knowledgeEntriesUpdated:
|
|
91
|
-
tasksTransitioned:
|
|
92
|
-
plansUpdated:
|
|
93
|
-
diagramsDrifted:
|
|
94
|
-
}, {
|
|
95
|
-
docsUpdated:
|
|
96
|
-
knowledgeEntriesCreated:
|
|
97
|
-
knowledgeEntriesUpdated:
|
|
98
|
-
tasksTransitioned:
|
|
99
|
-
plansUpdated:
|
|
100
|
-
diagramsDrifted:
|
|
101
|
-
}
|
|
81
|
+
docsUpdated: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
knowledgeEntriesCreated: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
knowledgeEntriesUpdated: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
tasksTransitioned: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
plansUpdated: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
diagramsDrifted: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
88
|
+
docsUpdated: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
knowledgeEntriesCreated: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
knowledgeEntriesUpdated: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
tasksTransitioned: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
plansUpdated: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
diagramsDrifted: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
95
|
+
docsUpdated: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
knowledgeEntriesCreated: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
knowledgeEntriesUpdated: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
tasksTransitioned: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
plansUpdated: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
diagramsDrifted: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
102
102
|
export type SyncStats = z.infer<typeof syncStatsSchema>;
|
|
103
103
|
export declare const projectMetaSchema: z.ZodObject<{
|
|
104
104
|
id: z.ZodString;
|
|
@@ -111,27 +111,27 @@ export declare const projectMetaSchema: z.ZodObject<{
|
|
|
111
111
|
lastSyncedAt: z.ZodOptional<z.ZodString>;
|
|
112
112
|
lastSyncGitCommit: z.ZodOptional<z.ZodString>;
|
|
113
113
|
lastSyncStats: z.ZodOptional<z.ZodObject<{
|
|
114
|
-
docsUpdated: z.ZodNumber
|
|
115
|
-
knowledgeEntriesCreated: z.ZodNumber
|
|
116
|
-
knowledgeEntriesUpdated: z.ZodNumber
|
|
117
|
-
tasksTransitioned: z.ZodNumber
|
|
118
|
-
plansUpdated: z.ZodNumber
|
|
119
|
-
diagramsDrifted: z.ZodNumber
|
|
120
|
-
}, "
|
|
121
|
-
docsUpdated:
|
|
122
|
-
knowledgeEntriesCreated:
|
|
123
|
-
knowledgeEntriesUpdated:
|
|
124
|
-
tasksTransitioned:
|
|
125
|
-
plansUpdated:
|
|
126
|
-
diagramsDrifted:
|
|
127
|
-
}, {
|
|
128
|
-
docsUpdated:
|
|
129
|
-
knowledgeEntriesCreated:
|
|
130
|
-
knowledgeEntriesUpdated:
|
|
131
|
-
tasksTransitioned:
|
|
132
|
-
plansUpdated:
|
|
133
|
-
diagramsDrifted:
|
|
134
|
-
}
|
|
114
|
+
docsUpdated: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
knowledgeEntriesCreated: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
knowledgeEntriesUpdated: z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
tasksTransitioned: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
plansUpdated: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
diagramsDrifted: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
121
|
+
docsUpdated: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
knowledgeEntriesCreated: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
knowledgeEntriesUpdated: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
tasksTransitioned: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
plansUpdated: z.ZodOptional<z.ZodNumber>;
|
|
126
|
+
diagramsDrifted: z.ZodOptional<z.ZodNumber>;
|
|
127
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
128
|
+
docsUpdated: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
knowledgeEntriesCreated: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
knowledgeEntriesUpdated: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
tasksTransitioned: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
plansUpdated: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
diagramsDrifted: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
135
135
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
136
136
|
id: z.ZodString;
|
|
137
137
|
name: z.ZodString;
|
|
@@ -143,27 +143,27 @@ export declare const projectMetaSchema: z.ZodObject<{
|
|
|
143
143
|
lastSyncedAt: z.ZodOptional<z.ZodString>;
|
|
144
144
|
lastSyncGitCommit: z.ZodOptional<z.ZodString>;
|
|
145
145
|
lastSyncStats: z.ZodOptional<z.ZodObject<{
|
|
146
|
-
docsUpdated: z.ZodNumber
|
|
147
|
-
knowledgeEntriesCreated: z.ZodNumber
|
|
148
|
-
knowledgeEntriesUpdated: z.ZodNumber
|
|
149
|
-
tasksTransitioned: z.ZodNumber
|
|
150
|
-
plansUpdated: z.ZodNumber
|
|
151
|
-
diagramsDrifted: z.ZodNumber
|
|
152
|
-
}, "
|
|
153
|
-
docsUpdated:
|
|
154
|
-
knowledgeEntriesCreated:
|
|
155
|
-
knowledgeEntriesUpdated:
|
|
156
|
-
tasksTransitioned:
|
|
157
|
-
plansUpdated:
|
|
158
|
-
diagramsDrifted:
|
|
159
|
-
}, {
|
|
160
|
-
docsUpdated:
|
|
161
|
-
knowledgeEntriesCreated:
|
|
162
|
-
knowledgeEntriesUpdated:
|
|
163
|
-
tasksTransitioned:
|
|
164
|
-
plansUpdated:
|
|
165
|
-
diagramsDrifted:
|
|
166
|
-
}
|
|
146
|
+
docsUpdated: z.ZodOptional<z.ZodNumber>;
|
|
147
|
+
knowledgeEntriesCreated: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
knowledgeEntriesUpdated: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
tasksTransitioned: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
plansUpdated: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
diagramsDrifted: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
153
|
+
docsUpdated: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
knowledgeEntriesCreated: z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
knowledgeEntriesUpdated: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
tasksTransitioned: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
plansUpdated: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
diagramsDrifted: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
160
|
+
docsUpdated: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
knowledgeEntriesCreated: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
knowledgeEntriesUpdated: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
tasksTransitioned: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
plansUpdated: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
diagramsDrifted: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
167
167
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
168
168
|
id: z.ZodString;
|
|
169
169
|
name: z.ZodString;
|
|
@@ -175,27 +175,27 @@ export declare const projectMetaSchema: z.ZodObject<{
|
|
|
175
175
|
lastSyncedAt: z.ZodOptional<z.ZodString>;
|
|
176
176
|
lastSyncGitCommit: z.ZodOptional<z.ZodString>;
|
|
177
177
|
lastSyncStats: z.ZodOptional<z.ZodObject<{
|
|
178
|
-
docsUpdated: z.ZodNumber
|
|
179
|
-
knowledgeEntriesCreated: z.ZodNumber
|
|
180
|
-
knowledgeEntriesUpdated: z.ZodNumber
|
|
181
|
-
tasksTransitioned: z.ZodNumber
|
|
182
|
-
plansUpdated: z.ZodNumber
|
|
183
|
-
diagramsDrifted: z.ZodNumber
|
|
184
|
-
}, "
|
|
185
|
-
docsUpdated:
|
|
186
|
-
knowledgeEntriesCreated:
|
|
187
|
-
knowledgeEntriesUpdated:
|
|
188
|
-
tasksTransitioned:
|
|
189
|
-
plansUpdated:
|
|
190
|
-
diagramsDrifted:
|
|
191
|
-
}, {
|
|
192
|
-
docsUpdated:
|
|
193
|
-
knowledgeEntriesCreated:
|
|
194
|
-
knowledgeEntriesUpdated:
|
|
195
|
-
tasksTransitioned:
|
|
196
|
-
plansUpdated:
|
|
197
|
-
diagramsDrifted:
|
|
198
|
-
}
|
|
178
|
+
docsUpdated: z.ZodOptional<z.ZodNumber>;
|
|
179
|
+
knowledgeEntriesCreated: z.ZodOptional<z.ZodNumber>;
|
|
180
|
+
knowledgeEntriesUpdated: z.ZodOptional<z.ZodNumber>;
|
|
181
|
+
tasksTransitioned: z.ZodOptional<z.ZodNumber>;
|
|
182
|
+
plansUpdated: z.ZodOptional<z.ZodNumber>;
|
|
183
|
+
diagramsDrifted: z.ZodOptional<z.ZodNumber>;
|
|
184
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
185
|
+
docsUpdated: z.ZodOptional<z.ZodNumber>;
|
|
186
|
+
knowledgeEntriesCreated: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
knowledgeEntriesUpdated: z.ZodOptional<z.ZodNumber>;
|
|
188
|
+
tasksTransitioned: z.ZodOptional<z.ZodNumber>;
|
|
189
|
+
plansUpdated: z.ZodOptional<z.ZodNumber>;
|
|
190
|
+
diagramsDrifted: z.ZodOptional<z.ZodNumber>;
|
|
191
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
192
|
+
docsUpdated: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
knowledgeEntriesCreated: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
knowledgeEntriesUpdated: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
tasksTransitioned: z.ZodOptional<z.ZodNumber>;
|
|
196
|
+
plansUpdated: z.ZodOptional<z.ZodNumber>;
|
|
197
|
+
diagramsDrifted: z.ZodOptional<z.ZodNumber>;
|
|
198
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
199
199
|
}, z.ZodTypeAny, "passthrough">>;
|
|
200
200
|
export type ProjectMetaJson = z.infer<typeof projectMetaSchema>;
|
|
201
201
|
export declare const planMetaSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schemas.d.ts","sourceRoot":"","sources":["../../src/utils/json-schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAM5D,eAAO,MAAM,eAAe;;;;;;;;;EAG1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAMxD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;EAKxB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGzB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAM1D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"json-schemas.d.ts","sourceRoot":"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;;;;;;;;;;;;;;;;;;;;;;;;;;EAY9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE/B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASzB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE1B,CAAC;AAMH,eAAO,MAAM,kBAAkB,4DAA0D,CAAC;AAE1F,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAazB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK9B,CAAC;AAYH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBvC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;EAO1C,CAAC"}
|
|
@@ -33,14 +33,16 @@ export const rootMetaSchema = z.object({
|
|
|
33
33
|
// ---------------------------------------------------------------------------
|
|
34
34
|
// Per-project meta.json
|
|
35
35
|
// ---------------------------------------------------------------------------
|
|
36
|
-
export const syncStatsSchema = z
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
export const syncStatsSchema = z
|
|
37
|
+
.object({
|
|
38
|
+
docsUpdated: z.number().int().min(0).optional(),
|
|
39
|
+
knowledgeEntriesCreated: z.number().int().min(0).optional(),
|
|
40
|
+
knowledgeEntriesUpdated: z.number().int().min(0).optional(),
|
|
41
|
+
tasksTransitioned: z.number().int().min(0).optional(),
|
|
42
|
+
plansUpdated: z.number().int().min(0).optional(),
|
|
43
|
+
diagramsDrifted: z.number().int().min(0).optional(),
|
|
44
|
+
})
|
|
45
|
+
.passthrough();
|
|
44
46
|
export const projectMetaSchema = z
|
|
45
47
|
.object({
|
|
46
48
|
id: z.string(),
|
|
@@ -107,7 +109,7 @@ export const taskIndexSchema = z.object({
|
|
|
107
109
|
tasks: z.array(taskMetaSchema),
|
|
108
110
|
});
|
|
109
111
|
// ---------------------------------------------------------------------------
|
|
110
|
-
// proposals/
|
|
112
|
+
// proposals/codegraph.json — codegraph ingestion proposals (gated, not direct-write)
|
|
111
113
|
// ---------------------------------------------------------------------------
|
|
112
114
|
export const proposalKindSchema = z.enum(["architecture", "module", "gotcha", "pattern"]);
|
|
113
115
|
export const proposalSchema = z.object({
|