@a-company/paradigm 3.23.3 → 3.24.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/dist/{accept-orchestration-ORQRKKGR.js → accept-orchestration-AAYFKS74.js} +5 -5
- package/dist/chunk-4UC6AQOC.js +631 -0
- package/dist/{chunk-YOFP72IB.js → chunk-6EQRU7WC.js} +4 -4
- package/dist/{chunk-K34C7NAN.js → chunk-6UV47VRD.js} +1 -1
- package/dist/{chunk-Z42FOOVT.js → chunk-GC6X3YM7.js} +6 -6
- package/dist/{chunk-C3BK3E23.js → chunk-OXG5GVDJ.js} +1 -1
- package/dist/{chunk-XKAFTZOZ.js → chunk-VHSTF72C.js} +1 -1
- package/dist/{chunk-UI3XXVJ6.js → chunk-W4VFKZVF.js} +58 -1
- package/dist/{graph-5VSRBRKZ.js → chunk-Z7W7HNRG.js} +2 -1
- package/dist/context-audit-RI4R2WRH.js +549 -0
- package/dist/{diff-4XJZN4OB.js → diff-QC7PWIPF.js} +5 -5
- package/dist/{doctor-FINKMI66.js → doctor-RVODPMHJ.js} +1 -1
- package/dist/graph-ERNQQQ7C.js +12 -0
- package/dist/index.js +64 -30
- package/dist/mcp.js +841 -17
- package/dist/{orchestrate-6XGEA655.js → orchestrate-NNNWNELP.js} +8 -8
- package/dist/pipeline-3G2FRAKM.js +263 -0
- package/dist/{probe-T77FFIAG.js → probe-SN4BNXOC.js} +2 -1
- package/dist/{providers-VIBWDN5D.js → providers-NKGY36QF.js} +1 -1
- package/dist/{shift-SW3GSODO.js → shift-G42AEUHE.js} +15 -14
- package/dist/{spawn-JSV2HST3.js → spawn-52PASJJL.js} +3 -3
- package/dist/sweep-5POCF2E4.js +934 -0
- package/dist/{team-YIYA4ZLX.js → team-JZHIH7H5.js} +6 -6
- package/dist/university-content/courses/.purpose +307 -0
- package/dist/university-content/plsat/.purpose +131 -0
- package/dist/{workspace-S5Q5LVA6.js → workspace-L27RR5MF.js} +3 -2
- package/package.json +1 -1
- package/dist/chunk-ZMN3RAIT.js +0 -564
- package/dist/{chunk-XNUWLW73.js → chunk-7WTOOH23.js} +0 -0
- package/dist/{flow-UFMPVOEM.js → flow-KZKMMXJC.js} +1 -1
|
@@ -5,13 +5,16 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
AgentSpawner,
|
|
7
7
|
extractSymbols
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6EQRU7WC.js";
|
|
9
|
+
import {
|
|
10
|
+
AuditLogger
|
|
11
|
+
} from "./chunk-PBHIFAL4.js";
|
|
9
12
|
import {
|
|
10
13
|
loadAgentsManifest
|
|
11
14
|
} from "./chunk-PMXRGPRQ.js";
|
|
12
15
|
import {
|
|
13
|
-
|
|
14
|
-
} from "./chunk-
|
|
16
|
+
calculateCost
|
|
17
|
+
} from "./chunk-5JGJACDU.js";
|
|
15
18
|
import {
|
|
16
19
|
buildSymbolIndex,
|
|
17
20
|
getReferencesTo,
|
|
@@ -21,9 +24,6 @@ import {
|
|
|
21
24
|
extractDeclaredGates,
|
|
22
25
|
loadPortalConfig
|
|
23
26
|
} from "./chunk-MW5DMGBB.js";
|
|
24
|
-
import {
|
|
25
|
-
calculateCost
|
|
26
|
-
} from "./chunk-5JGJACDU.js";
|
|
27
27
|
|
|
28
28
|
// src/core/orchestrator.ts
|
|
29
29
|
import { minimatch } from "minimatch";
|
|
@@ -6,6 +6,9 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
aggregateFromDirectory
|
|
8
8
|
} from "./chunk-6P4IFIK2.js";
|
|
9
|
+
import {
|
|
10
|
+
cliBuildGraphState
|
|
11
|
+
} from "./chunk-Z7W7HNRG.js";
|
|
9
12
|
|
|
10
13
|
// src/commands/scan/navigator.ts
|
|
11
14
|
import * as fs from "fs";
|
|
@@ -264,6 +267,8 @@ async function indexCommand(targetPath, options) {
|
|
|
264
267
|
console.log(chalk2.blue("\n\u{1F52D} Generating Paradigm Scan Index\n"));
|
|
265
268
|
}
|
|
266
269
|
let scanConfig;
|
|
270
|
+
let graphConfig;
|
|
271
|
+
let tierConfig;
|
|
267
272
|
const configPaths = [
|
|
268
273
|
path2.join(rootDir, ".paradigm"),
|
|
269
274
|
path2.join(rootDir, ".paradigm", "config.yaml")
|
|
@@ -273,7 +278,11 @@ async function indexCommand(targetPath, options) {
|
|
|
273
278
|
try {
|
|
274
279
|
const content = fs2.readFileSync(configPath, "utf8");
|
|
275
280
|
const config = parseHorizonConfig(content);
|
|
276
|
-
|
|
281
|
+
const typedConfig = config;
|
|
282
|
+
scanConfig = typedConfig.scan;
|
|
283
|
+
graphConfig = typedConfig.graph;
|
|
284
|
+
const contextConfig = typedConfig.context;
|
|
285
|
+
tierConfig = contextConfig?.tiers;
|
|
277
286
|
break;
|
|
278
287
|
} catch {
|
|
279
288
|
}
|
|
@@ -318,6 +327,7 @@ async function indexCommand(targetPath, options) {
|
|
|
318
327
|
screenDefinitions: scanConfig?.screens
|
|
319
328
|
}
|
|
320
329
|
);
|
|
330
|
+
classifyTiers(index, { hot: tierConfig?.["hot-threshold"], warm: tierConfig?.["warm-threshold"] });
|
|
321
331
|
try {
|
|
322
332
|
fs2.writeFileSync(outputPath, serializeScanIndex(index), "utf8");
|
|
323
333
|
spinner.succeed(chalk2.green("Scan index generated"));
|
|
@@ -335,6 +345,23 @@ async function indexCommand(targetPath, options) {
|
|
|
335
345
|
spinner.succeed(chalk2.green(`Flow index generated (${Object.keys(flowIndex.flows).length} flows)`));
|
|
336
346
|
}
|
|
337
347
|
}
|
|
348
|
+
const autoGenerate = graphConfig?.["auto-generate"] !== false;
|
|
349
|
+
if (autoGenerate) {
|
|
350
|
+
try {
|
|
351
|
+
const graphState = cliBuildGraphState(rootDir);
|
|
352
|
+
const graphsDir = path2.join(rootDir, ".paradigm", "graphs");
|
|
353
|
+
if (!fs2.existsSync(graphsDir)) fs2.mkdirSync(graphsDir, { recursive: true });
|
|
354
|
+
const graphPath = path2.join(graphsDir, "auto.graph.json");
|
|
355
|
+
fs2.writeFileSync(graphPath, JSON.stringify(graphState, null, 2), "utf8");
|
|
356
|
+
if (!options.quiet) {
|
|
357
|
+
spinner.succeed(chalk2.green(`Symbol graph updated (${graphState.nodes.length} nodes)`));
|
|
358
|
+
}
|
|
359
|
+
} catch {
|
|
360
|
+
if (!options.quiet) {
|
|
361
|
+
spinner.warn(chalk2.yellow("Could not auto-generate symbol graph"));
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
338
365
|
if (!options.quiet) {
|
|
339
366
|
console.log(chalk2.gray(`
|
|
340
367
|
Output: ${outputPath}`));
|
|
@@ -350,6 +377,36 @@ async function indexCommand(targetPath, options) {
|
|
|
350
377
|
}
|
|
351
378
|
return index;
|
|
352
379
|
}
|
|
380
|
+
function classifyTiers(index, config) {
|
|
381
|
+
const hotThreshold = config?.hot ?? 15;
|
|
382
|
+
const warmThreshold = config?.warm ?? 5;
|
|
383
|
+
const refCounts = /* @__PURE__ */ new Map();
|
|
384
|
+
const allSections = ["components", "flows", "gates", "signals", "aspects", "features", "state"];
|
|
385
|
+
for (const section of allSections) {
|
|
386
|
+
const entries = index[section];
|
|
387
|
+
if (!entries) continue;
|
|
388
|
+
for (const [, entry] of Object.entries(entries)) {
|
|
389
|
+
const refs = entry.related;
|
|
390
|
+
if (refs) {
|
|
391
|
+
for (const ref of refs) {
|
|
392
|
+
const stripped = ref.replace(/^[#$^!~]/, "");
|
|
393
|
+
refCounts.set(stripped, (refCounts.get(stripped) || 0) + 1);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
for (const section of allSections) {
|
|
399
|
+
const entries = index[section];
|
|
400
|
+
if (!entries) continue;
|
|
401
|
+
for (const [id, entry] of Object.entries(entries)) {
|
|
402
|
+
const refs = refCounts.get(id) || 0;
|
|
403
|
+
const visualTags = entry.visualTags || [];
|
|
404
|
+
const centrality = visualTags.length;
|
|
405
|
+
const score = refs * 3 + centrality;
|
|
406
|
+
entry.tier = score > hotThreshold ? "hot" : score > warmThreshold ? "warm" : "cold";
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
353
410
|
async function generateFlowIndex(rootDir, purposeFiles, options) {
|
|
354
411
|
const flows = {};
|
|
355
412
|
const symbolToFlows = {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-ZXMDA7VB.js";
|
|
3
2
|
|
|
4
3
|
// src/commands/graph.ts
|
|
5
4
|
import chalk from "chalk";
|
|
@@ -157,7 +156,9 @@ View: paradigm graph`));
|
|
|
157
156
|
process.exit(1);
|
|
158
157
|
}
|
|
159
158
|
}
|
|
159
|
+
|
|
160
160
|
export {
|
|
161
161
|
graphCommand,
|
|
162
|
+
cliBuildGraphState,
|
|
162
163
|
graphGenerateCommand
|
|
163
164
|
};
|