@a-company/paradigm 3.44.0 → 5.3.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/dist/{accept-orchestration-ZUWQUHSK.js → accept-orchestration-GX2YRWM4.js} +5 -5
- package/dist/{add-VSPZ6FM4.js → add-FZRKEGH4.js} +1 -1
- package/dist/agent-HYKC2LAK.js +387 -0
- package/dist/agent-loader-SJPJJS33.js +36 -0
- package/dist/{agents-suggest-65SER5IS.js → agents-suggest-DNSYJ6IA.js} +1 -1
- package/dist/{aggregate-SV3VGEIL.js → aggregate-H57K7PNV.js} +1 -1
- package/dist/{assess-UHBDYIK7.js → assess-4WVXZLZQ.js} +2 -2
- package/dist/{auto-24ICVUH4.js → auto-QFS5NHQU.js} +1 -1
- package/dist/{beacon-3SJV4DAP.js → beacon-KXZXYQHX.js} +1 -1
- package/dist/{calibration-WWHK73WU.js → calibration-V46G7JTY.js} +2 -2
- package/dist/{check-OLI6AUS6.js → check-OWAIWV23.js} +1 -1
- package/dist/{chunk-RP6TZYGE.js → chunk-2IO7JAG2.js} +1 -1
- package/dist/chunk-2T6BTYBN.js +712 -0
- package/dist/{chunk-CDMAMDSG.js → chunk-5VKJBNJL.js} +13 -5
- package/dist/{chunk-KB4XJWE3.js → chunk-6N3JTACN.js} +98 -437
- package/dist/chunk-7N7GSU6K.js +34 -0
- package/dist/chunk-A2L4TSLZ.js +526 -0
- package/dist/{chunk-P7XSBJE3.js → chunk-ABVQGRF7.js} +1 -1
- package/dist/{chunk-HIKKOCXY.js → chunk-EI32ZBE6.js} +1 -1
- package/dist/{chunk-QIOCFXDQ.js → chunk-EKGMAM62.js} +1 -1
- package/dist/chunk-EZ3GOCYC.js +132 -0
- package/dist/chunk-GGMI6C2L.js +1075 -0
- package/dist/{chunk-DS5QY37M.js → chunk-GTR2TBIJ.js} +247 -15
- package/dist/{chunk-QDXI2DHR.js → chunk-J2JEQRT3.js} +1 -1
- package/dist/{chunk-AKIMFN6I.js → chunk-JASGXLK3.js} +2 -2
- package/dist/chunk-KVDYJLTC.js +121 -0
- package/dist/{chunk-J4E6K5MG.js → chunk-LSRABQIY.js} +25 -1
- package/dist/chunk-MCMOGQMU.js +145 -0
- package/dist/{chunk-ZXMDA7VB.js → chunk-PDX44BCA.js} +1 -6
- package/dist/{chunk-SOBTKFSP.js → chunk-S2HO5MLR.js} +5 -0
- package/dist/{chunk-2SKXFXIT.js → chunk-S3ORKP3V.js} +10 -15
- package/dist/{chunk-ZMQA6SCO.js → chunk-S6MZ2IEX.js} +628 -228
- package/dist/chunk-TAIJOFOE.js +124 -0
- package/dist/{chunk-FS3WTUHY.js → chunk-TXESEO7Y.js} +6 -6
- package/dist/{chunk-7COU5S2Z.js → chunk-VL67H5IC.js} +1 -1
- package/dist/{chunk-QWA26UNO.js → chunk-WQITYKHM.js} +7 -7
- package/dist/{chunk-MW5DMGBB.js → chunk-YMDLDELF.js} +114 -55
- package/dist/{claude-63ISJAZK.js → claude-FRRWJSTJ.js} +1 -1
- package/dist/{claude-cli-ABML5RHX.js → claude-cli-XJLK2X4L.js} +1 -1
- package/dist/{claude-code-JRLMRPTO.js → claude-code-HTBA4XRB.js} +1 -1
- package/dist/{claude-code-teams-CAJBEFIZ.js → claude-code-teams-T4SP24MD.js} +1 -1
- package/dist/{conductor-HLWYWUVH.js → conductor-PGPDVIVE.js} +1 -1
- package/dist/{config-schema-3YNIFJCJ.js → config-schema-EA4XALGG.js} +4 -2
- package/dist/{constellation-FAGT45TU.js → constellation-A26CCGQS.js} +1 -1
- package/dist/{context-audit-557EO6PK.js → context-audit-RLO3ETRP.js} +8 -5
- package/dist/{cost-XEBADYFT.js → cost-BGM32XJU.js} +1 -1
- package/dist/{cost-UD3WPEKZ.js → cost-VI46A4XL.js} +1 -1
- package/dist/{cursor-cli-QUOOF2N4.js → cursor-cli-JVEZGHWQ.js} +1 -1
- package/dist/{cursorrules-3TKZ4E4R.js → cursorrules-HLIKJJZT.js} +1 -1
- package/dist/decision-loader-WWCLIQPJ.js +20 -0
- package/dist/{delete-RRK4RL6Y.js → delete-KBRPQLPC.js} +2 -2
- package/dist/{diff-IP5CIARP.js → diff-RQLLNAFI.js} +5 -5
- package/dist/{discipline-5F5OVTXB.js → discipline-FA4OZXIS.js} +1 -1
- package/dist/{dist-UXWV4OKX.js → dist-34NA5RS5.js} +1 -1
- package/dist/{dist-5QE2BB2B-X6DYVSUL.js → dist-5QE2BB2B-5S3T6Y3T.js} +1 -1
- package/dist/{dist-CM3MVWWW.js → dist-77JDTVAY.js} +1 -0
- package/dist/{dist-POMVY6WP.js → dist-QK4SQAK7.js} +1 -1
- package/dist/{dist-3RVKEJRT.js → dist-TA6LSC2Q.js} +1 -1
- package/dist/docs-LVLRPBAW.js +155 -0
- package/dist/docs-PBZB7LYP.js +89 -0
- package/dist/{doctor-GKZJU7QG.js → doctor-ULBOHEIC.js} +3 -3
- package/dist/{drift-YGT4LJ7Q.js → drift-R5NRKFHI.js} +1 -1
- package/dist/{echo-A6HD5UP7.js → echo-O2LY7CC2.js} +1 -1
- package/dist/{edit-4CLNN5JG.js → edit-R2HNLMOG.js} +2 -2
- package/dist/event-25OJKDCE.js +31 -0
- package/dist/{export-T7CMMJIB.js → export-IWVL7XLF.js} +1 -1
- package/dist/{flow-UFMPVOEM.js → flow-CRRVV3O3.js} +2 -2
- package/dist/{global-HHUJSBG5.js → global-3NG5JXUB.js} +1 -1
- package/dist/graduate-USAWGBJM.js +160 -0
- package/dist/{graph-YYUXI3F7.js → graph-VHUMAAS6.js} +2 -2
- package/dist/{graph-server-ZPXRSGCW.js → graph-server-YL22VBBN.js} +1 -1
- package/dist/{habits-RG5SVKXP.js → habits-OL5NGPXO.js} +3 -3
- package/dist/{history-CETCSUCP.js → history-WOWC573W.js} +1 -1
- package/dist/{hooks-TCUHQMPF.js → hooks-HFWSCGPV.js} +2 -2
- package/dist/index.js +307 -184
- package/dist/{integrity-MK2OP5TA.js → integrity-IHO4FZTS.js} +1 -1
- package/dist/{integrity-checker-J7YXRTBT.js → integrity-checker-PSKJA5SB.js} +1 -0
- package/dist/journal-loader-5EYSBFFY.js +18 -0
- package/dist/{lint-HYWGS3JJ.js → lint-K6CJGGPH.js} +1 -1
- package/dist/{list-IUCYPGMK.js → list-4YK7QKFF.js} +1 -1
- package/dist/{list-BTLFHSRC.js → list-ENR7Q4CR.js} +2 -2
- package/dist/{lore-loader-VTEEZDX3.js → lore-loader-7NO6N6FT.js} +4 -1
- package/dist/{lore-server-NOOAHKJX.js → lore-server-UNJY5KC3.js} +1 -1
- package/dist/{manual-AFJ2J2V3.js → manual-G6FISID5.js} +1 -1
- package/dist/mcp.js +3954 -479
- package/dist/{migrate-FQVGQNXZ.js → migrate-LS45DNEV.js} +2 -2
- package/dist/{migrate-assessments-JP6Q5KME.js → migrate-assessments-RGH4O6IX.js} +2 -2
- package/dist/nomination-engine-Q4XSXFKT.js +40 -0
- package/dist/notebook-YWIYGEHV.js +155 -0
- package/dist/{orchestrate-A226N6FC.js → orchestrate-XZA33TJC.js} +5 -5
- package/dist/peers-DEOUIZM6.js +82 -0
- package/dist/persona-UHAHIVST.js +390 -0
- package/dist/{pipeline-3G2FRAKM.js → pipeline-L4HCSBGN.js} +1 -1
- package/dist/{platform-server-KHL6ZPPN.js → platform-server-PMD57BEG.js} +264 -18
- package/dist/{plugin-update-checker-HMRPGY5Z.js → plugin-update-checker-ELOEEQYS.js} +1 -0
- package/dist/{portal-check-FF5EKZE5.js → portal-check-NPYGII2D.js} +2 -2
- package/dist/{portal-compliance-VU4NIFEN.js → portal-compliance-J7DGAPFX.js} +2 -2
- package/dist/{probe-7JK7IDNI.js → probe-MHL5HQZ2.js} +3 -3
- package/dist/{promote-XO63XMAN.js → promote-F6ZYZZAL.js} +2 -2
- package/dist/{providers-YNFSL6HK.js → providers-GK7PB2OL.js} +2 -2
- package/dist/{quiz-I75NU2QQ.js → quiz-M66SC7F7.js} +1 -1
- package/dist/{record-46CLR4OG.js → record-RA4WR2BO.js} +2 -2
- package/dist/{reindex-WIJMCJ4A.js → reindex-HRA2AUS6.js} +3 -2
- package/dist/{remember-4EUZKIIB.js → remember-HBWJ655S.js} +1 -1
- package/dist/{retag-KC4JVRLE.js → retag-3OLCVDEQ.js} +2 -2
- package/dist/{review-Q7M4CRB5.js → review-27ATYTD2.js} +2 -2
- package/dist/review-57QMURZV.js +334 -0
- package/dist/{ripple-RI3LOT6R.js → ripple-JPBXP5I3.js} +1 -1
- package/dist/{sentinel-UOIGJWHH.js → sentinel-4XIG4STA.js} +2 -2
- package/dist/{sentinel-bridge-APDXYAZS.js → sentinel-bridge-MDUXTQRL.js} +2 -2
- package/dist/{serve-JVXSRSUB.js → serve-FLTFTM3P.js} +2 -2
- package/dist/{serve-22A4XOIG.js → serve-INL7SNBK.js} +2 -2
- package/dist/{serve-2YJ6D2Y6.js → serve-KBSE36PL.js} +4 -4
- package/dist/{server-JV6UFGWZ.js → server-54SKYFFY.js} +2 -2
- package/dist/{server-RDLQ3DK7.js → server-XUOIO7E6.js} +1 -1
- package/dist/{setup-YNZJQLW7.js → setup-EDS27WUR.js} +1 -1
- package/dist/{setup-M2ZKLKNN.js → setup-KO5AFC4K.js} +2 -2
- package/dist/{shift-LNMKFYLR.js → shift-VFG23DLA.js} +16 -16
- package/dist/{show-P7GYO43X.js → show-5PV5KFJE.js} +2 -2
- package/dist/{show-PKZMYKRN.js → show-NQKYX6WQ.js} +1 -1
- package/dist/{snapshot-Y3COXK4T.js → snapshot-BK4RBPCG.js} +1 -1
- package/dist/{spawn-SSXZX45U.js → spawn-AW6GDECS.js} +3 -3
- package/dist/{status-KLHALGW4.js → status-WGIAQODY.js} +1 -1
- package/dist/{summary-5NQNOD3F.js → summary-NIRABMF5.js} +2 -2
- package/dist/{sweep-EZU3GU6S.js → sweep-QMHNSIY5.js} +2 -2
- package/dist/{switch-WYUMVNA5.js → switch-6EJPZDIA.js} +1 -1
- package/dist/{symphony-EYRGGVNE.js → symphony-4OCY36AI.js} +350 -29
- package/dist/{symphony-QWOEKZMC.js → symphony-B75X2MME.js} +20 -2
- package/dist/symphony-peers-2ZQYLRNI.js +34 -0
- package/dist/symphony-peers-OL7F6M5S.js +121 -0
- package/dist/symphony-relay-UJYUXN65.js +710 -0
- package/dist/{sync-ZM4Q3R4U.js → sync-VEHUH4OA.js} +3 -3
- package/dist/{sync-llms-JIPP3XX4.js → sync-llms-YHCFIE6X.js} +2 -2
- package/dist/{task-loader-7M2FCBX6.js → task-loader-LDYWQSLM.js} +1 -0
- package/dist/{team-HGLJXWQG.js → team-7HG7XK5C.js} +6 -6
- package/dist/{test-WTR5Q33E.js → test-566CP5KC.js} +1 -1
- package/dist/{thread-3WM7KKID.js → thread-N754I4D5.js} +1 -1
- package/dist/{timeline-ANC7LVDL.js → timeline-M3CICQFE.js} +2 -2
- package/dist/{triage-IZ4MDYNB.js → triage-HHYGT3HY.js} +1 -1
- package/dist/{tutorial-GC6QL4US.js → tutorial-KD22SUNO.js} +1 -1
- package/dist/university-content/courses/.purpose +66 -0
- package/dist/university-content/courses/para-401.json +146 -0
- package/dist/university-content/courses/para-501.json +151 -0
- package/dist/university-content/courses/para-601.json +608 -0
- package/dist/university-content/plsat/.purpose +6 -0
- package/dist/university-content/plsat/v2.0.json +2 -2
- package/dist/university-content/plsat/v3.0.json +563 -3
- package/dist/university-content/reference.json +91 -0
- package/dist/{upgrade-ANX3LVSA.js → upgrade-H5PF32BW.js} +2 -2
- package/dist/{validate-GD5XWILV.js → validate-CNKEKO6A.js} +1 -1
- package/dist/{validate-ITC5D6QG.js → validate-MB5ULIHS.js} +1 -1
- package/dist/{validate-ZVPNN4FL.js → validate-QH3LADM6.js} +1 -1
- package/dist/{watch-X64UK7K4.js → watch-2TKP5PVL.js} +3 -3
- package/dist/{watch-ERBEJUJW.js → watch-ZF4ML6CD.js} +2 -2
- package/dist/{wisdom-L2WC7J62.js → wisdom-AATMGNFA.js} +1 -1
- package/dist/work-log-loader-5L45XNYZ.js +14 -0
- package/dist/{workspace-UIUTHZTD.js → workspace-6E6OSRNU.js} +4 -4
- package/package.json +1 -1
- package/platform-ui/dist/assets/DocsSection-ByAgPzWV.js +1 -0
- package/platform-ui/dist/assets/DocsSection-CjdO6R-u.css +1 -0
- package/platform-ui/dist/assets/{GitSection-BD3Ze06e.js → GitSection-BLovj9yT.js} +1 -1
- package/platform-ui/dist/assets/{GraphSection-SglITfSs.js → GraphSection-C5PCPUFl.js} +1 -1
- package/platform-ui/dist/assets/{LoreSection-bR5Km4Fd.js → LoreSection-BftejTla.js} +1 -1
- package/platform-ui/dist/assets/{SentinelSection-QSpAZArG.js → SentinelSection-CnYcasN7.js} +1 -1
- package/platform-ui/dist/assets/{SymphonySection-CobYJgvg.js → SymphonySection-BpmqCHeK.js} +1 -1
- package/platform-ui/dist/assets/{index-DbxeSMkV.js → index-G9JnWEs_.js} +10 -10
- package/platform-ui/dist/index.html +1 -1
- package/dist/dist-PSF5CP4I.js +0 -7294
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
findDecisionsForSymbol,
|
|
4
|
+
getDecisionSummary,
|
|
5
|
+
loadDecision,
|
|
6
|
+
loadDecisions,
|
|
7
|
+
recordDecision,
|
|
8
|
+
supersedeDecision,
|
|
9
|
+
updateDecision
|
|
10
|
+
} from "./chunk-EZ3GOCYC.js";
|
|
11
|
+
import "./chunk-7N7GSU6K.js";
|
|
12
|
+
export {
|
|
13
|
+
findDecisionsForSymbol,
|
|
14
|
+
getDecisionSummary,
|
|
15
|
+
loadDecision,
|
|
16
|
+
loadDecisions,
|
|
17
|
+
recordDecision,
|
|
18
|
+
supersedeDecision,
|
|
19
|
+
updateDecision
|
|
20
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
BackgroundOrchestrator
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-WQITYKHM.js";
|
|
5
|
+
import "./chunk-LSRABQIY.js";
|
|
6
6
|
import "./chunk-PBHIFAL4.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-TXESEO7Y.js";
|
|
8
8
|
import "./chunk-6QC3YGB6.js";
|
|
9
9
|
import "./chunk-PMXRGPRQ.js";
|
|
10
|
-
import "./chunk-MW5DMGBB.js";
|
|
11
10
|
import "./chunk-5JGJACDU.js";
|
|
12
11
|
import "./chunk-ZGUAAVMA.js";
|
|
13
12
|
import "./chunk-EDOAWN7J.js";
|
|
14
13
|
import "./chunk-IRKUEJVW.js";
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-YMDLDELF.js";
|
|
15
|
+
import "./chunk-PDX44BCA.js";
|
|
16
16
|
|
|
17
17
|
// src/commands/team/diff.ts
|
|
18
18
|
import * as fs from "fs";
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
buildDocsManifest,
|
|
4
|
+
buildFlowPage,
|
|
5
|
+
buildPortalPage,
|
|
6
|
+
buildSymbolPage,
|
|
7
|
+
loadCustomPages,
|
|
8
|
+
loadDocsConfig
|
|
9
|
+
} from "./chunk-2T6BTYBN.js";
|
|
10
|
+
import "./chunk-PDX44BCA.js";
|
|
11
|
+
|
|
12
|
+
// src/commands/docs/serve.ts
|
|
13
|
+
import chalk from "chalk";
|
|
14
|
+
async function docsServeCommand(options) {
|
|
15
|
+
const projectDir = process.cwd();
|
|
16
|
+
const port = parseInt(options.port || "3850", 10);
|
|
17
|
+
const shouldOpen = options.open !== false;
|
|
18
|
+
console.log(chalk.cyan("\n Starting Paradigm Docs...\n"));
|
|
19
|
+
try {
|
|
20
|
+
const { startPlatformServer } = await import("./platform-server-PMD57BEG.js");
|
|
21
|
+
await startPlatformServer({
|
|
22
|
+
projectDir,
|
|
23
|
+
port,
|
|
24
|
+
open: shouldOpen,
|
|
25
|
+
sections: ["overview", "docs"]
|
|
26
|
+
});
|
|
27
|
+
console.log(chalk.green(` Docs running at ${chalk.bold(`http://localhost:${port}`)}`));
|
|
28
|
+
console.log(chalk.gray(" Press Ctrl+C to stop\n"));
|
|
29
|
+
await new Promise(() => {
|
|
30
|
+
});
|
|
31
|
+
} catch (error) {
|
|
32
|
+
if (error.code === "EADDRINUSE") {
|
|
33
|
+
console.error(chalk.red(`
|
|
34
|
+
Error: Port ${port} is already in use.`));
|
|
35
|
+
console.log(chalk.gray(` Try: paradigm docs serve --port ${port + 1}
|
|
36
|
+
`));
|
|
37
|
+
} else {
|
|
38
|
+
console.error(chalk.red("\n Failed to start Paradigm Docs:"), error);
|
|
39
|
+
}
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// src/commands/docs/build.ts
|
|
45
|
+
import * as fs from "fs";
|
|
46
|
+
import * as path from "path";
|
|
47
|
+
import { fileURLToPath } from "url";
|
|
48
|
+
import chalk2 from "chalk";
|
|
49
|
+
var __filename = fileURLToPath(import.meta.url);
|
|
50
|
+
var __dirname = path.dirname(__filename);
|
|
51
|
+
async function docsBuildCommand(options) {
|
|
52
|
+
let rootDir = process.cwd();
|
|
53
|
+
while (rootDir !== "/") {
|
|
54
|
+
if (fs.existsSync(path.join(rootDir, ".paradigm"))) break;
|
|
55
|
+
rootDir = path.dirname(rootDir);
|
|
56
|
+
}
|
|
57
|
+
if (rootDir === "/") {
|
|
58
|
+
console.error(chalk2.red(" Not in a Paradigm project (no .paradigm/ directory found)"));
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
const config = loadDocsConfig(rootDir);
|
|
62
|
+
const outputDir = options.output || config.output || ".paradigm/docs-site";
|
|
63
|
+
const outputPath = path.resolve(rootDir, outputDir);
|
|
64
|
+
const dataDir = path.join(outputPath, "_data");
|
|
65
|
+
console.log(chalk2.cyan(`
|
|
66
|
+
Building docs to ${chalk2.white(outputPath)}...
|
|
67
|
+
`));
|
|
68
|
+
fs.mkdirSync(path.join(dataDir, "symbols"), { recursive: true });
|
|
69
|
+
fs.mkdirSync(path.join(dataDir, "flows"), { recursive: true });
|
|
70
|
+
fs.mkdirSync(path.join(dataDir, "pages"), { recursive: true });
|
|
71
|
+
const manifest = buildDocsManifest(rootDir, config);
|
|
72
|
+
fs.writeFileSync(
|
|
73
|
+
path.join(dataDir, "manifest.json"),
|
|
74
|
+
JSON.stringify(manifest, null, 2),
|
|
75
|
+
"utf8"
|
|
76
|
+
);
|
|
77
|
+
console.log(chalk2.gray(` manifest.json (${manifest.totalSymbols} symbols)`));
|
|
78
|
+
let symbolCount = 0;
|
|
79
|
+
for (const group of manifest.groups) {
|
|
80
|
+
const items = [...group.items];
|
|
81
|
+
if (group.subgroups) {
|
|
82
|
+
for (const sg of group.subgroups) {
|
|
83
|
+
items.push(...sg.items);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
for (const item of items) {
|
|
87
|
+
if (["component", "signal", "aspect", "gate"].includes(item.kind)) {
|
|
88
|
+
const page = buildSymbolPage(rootDir, item.id);
|
|
89
|
+
if (page) {
|
|
90
|
+
fs.writeFileSync(
|
|
91
|
+
path.join(dataDir, "symbols", `${item.id}.json`),
|
|
92
|
+
JSON.stringify(page, null, 2),
|
|
93
|
+
"utf8"
|
|
94
|
+
);
|
|
95
|
+
symbolCount++;
|
|
96
|
+
}
|
|
97
|
+
} else if (item.kind === "flow") {
|
|
98
|
+
const page = buildFlowPage(rootDir, item.id);
|
|
99
|
+
if (page) {
|
|
100
|
+
fs.writeFileSync(
|
|
101
|
+
path.join(dataDir, "flows", `${item.id}.json`),
|
|
102
|
+
JSON.stringify(page, null, 2),
|
|
103
|
+
"utf8"
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const portal = buildPortalPage(rootDir);
|
|
110
|
+
fs.writeFileSync(
|
|
111
|
+
path.join(dataDir, "portal.json"),
|
|
112
|
+
JSON.stringify(portal, null, 2),
|
|
113
|
+
"utf8"
|
|
114
|
+
);
|
|
115
|
+
const customPages = loadCustomPages(rootDir, config.customContent);
|
|
116
|
+
for (const page of customPages) {
|
|
117
|
+
fs.writeFileSync(
|
|
118
|
+
path.join(dataDir, "pages", `${page.slug}.json`),
|
|
119
|
+
JSON.stringify(page, null, 2),
|
|
120
|
+
"utf8"
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
let uiDistPath = path.join(__dirname, "..", "..", "platform-ui", "dist");
|
|
124
|
+
if (!fs.existsSync(uiDistPath)) {
|
|
125
|
+
uiDistPath = path.join(__dirname, "..", "..", "..", "platform-ui", "dist");
|
|
126
|
+
}
|
|
127
|
+
if (fs.existsSync(uiDistPath)) {
|
|
128
|
+
copyDir(uiDistPath, outputPath);
|
|
129
|
+
console.log(chalk2.gray(" Copied SPA shell"));
|
|
130
|
+
}
|
|
131
|
+
console.log(chalk2.gray(` ${symbolCount} symbol pages`));
|
|
132
|
+
console.log(chalk2.gray(` ${customPages.length} custom pages`));
|
|
133
|
+
console.log(chalk2.gray(" portal.json"));
|
|
134
|
+
console.log(chalk2.green(`
|
|
135
|
+
Docs built to ${outputPath}
|
|
136
|
+
`));
|
|
137
|
+
}
|
|
138
|
+
function copyDir(src, dest) {
|
|
139
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
140
|
+
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
141
|
+
const srcPath = path.join(src, entry.name);
|
|
142
|
+
const destPath = path.join(dest, entry.name);
|
|
143
|
+
if (entry.isDirectory()) {
|
|
144
|
+
if (entry.name !== "_data") {
|
|
145
|
+
copyDir(srcPath, destPath);
|
|
146
|
+
}
|
|
147
|
+
} else {
|
|
148
|
+
fs.copyFileSync(srcPath, destPath);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
export {
|
|
153
|
+
docsBuildCommand,
|
|
154
|
+
docsServeCommand
|
|
155
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
buildDocsManifest,
|
|
4
|
+
buildFlowPage,
|
|
5
|
+
buildPortalPage,
|
|
6
|
+
buildSymbolPage,
|
|
7
|
+
loadCustomPage,
|
|
8
|
+
loadDocsConfig,
|
|
9
|
+
searchDocs
|
|
10
|
+
} from "./chunk-2T6BTYBN.js";
|
|
11
|
+
import "./chunk-PDX44BCA.js";
|
|
12
|
+
|
|
13
|
+
// src/platform-server/routes/docs.ts
|
|
14
|
+
import { Router } from "express";
|
|
15
|
+
function createDocsRouter(projectDir) {
|
|
16
|
+
const router = Router();
|
|
17
|
+
router.get("/manifest", (_req, res) => {
|
|
18
|
+
try {
|
|
19
|
+
const config = loadDocsConfig(projectDir);
|
|
20
|
+
const manifest = buildDocsManifest(projectDir, config);
|
|
21
|
+
res.json(manifest);
|
|
22
|
+
} catch (err) {
|
|
23
|
+
res.status(500).json({ error: "Failed to build docs manifest", detail: String(err) });
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
router.get("/symbol/:id", (req, res) => {
|
|
27
|
+
try {
|
|
28
|
+
const page = buildSymbolPage(projectDir, req.params.id);
|
|
29
|
+
if (!page) {
|
|
30
|
+
res.status(404).json({ error: `Symbol "${req.params.id}" not found` });
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
res.json(page);
|
|
34
|
+
} catch (err) {
|
|
35
|
+
res.status(500).json({ error: "Failed to build symbol page", detail: String(err) });
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
router.get("/flow/:id", (req, res) => {
|
|
39
|
+
try {
|
|
40
|
+
const page = buildFlowPage(projectDir, req.params.id);
|
|
41
|
+
if (!page) {
|
|
42
|
+
res.status(404).json({ error: `Flow "${req.params.id}" not found` });
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
res.json(page);
|
|
46
|
+
} catch (err) {
|
|
47
|
+
res.status(500).json({ error: "Failed to build flow page", detail: String(err) });
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
router.get("/portal", (_req, res) => {
|
|
51
|
+
try {
|
|
52
|
+
const page = buildPortalPage(projectDir);
|
|
53
|
+
res.json(page);
|
|
54
|
+
} catch (err) {
|
|
55
|
+
res.status(500).json({ error: "Failed to build portal page", detail: String(err) });
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
router.get("/page/:slug", (req, res) => {
|
|
59
|
+
try {
|
|
60
|
+
const config = loadDocsConfig(projectDir);
|
|
61
|
+
const page = loadCustomPage(projectDir, req.params.slug, config);
|
|
62
|
+
if (!page) {
|
|
63
|
+
res.status(404).json({ error: `Page "${req.params.slug}" not found` });
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
res.json(page);
|
|
67
|
+
} catch (err) {
|
|
68
|
+
res.status(500).json({ error: "Failed to load custom page", detail: String(err) });
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
router.get("/search", (req, res) => {
|
|
72
|
+
try {
|
|
73
|
+
const q = req.query.q || "";
|
|
74
|
+
if (!q) {
|
|
75
|
+
res.json({ count: 0, results: [] });
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const limit = req.query.limit ? parseInt(req.query.limit, 10) : 20;
|
|
79
|
+
const results = searchDocs(projectDir, q, limit);
|
|
80
|
+
res.json({ count: results.length, results });
|
|
81
|
+
} catch (err) {
|
|
82
|
+
res.status(500).json({ error: "Failed to search docs", detail: String(err) });
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
return router;
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
createDocsRouter
|
|
89
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
doctorCommand
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-S3ORKP3V.js";
|
|
5
|
+
import "./chunk-6N3JTACN.js";
|
|
6
6
|
import "./chunk-YO6DVTL7.js";
|
|
7
7
|
import "./chunk-4NCFWYGG.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-PDX44BCA.js";
|
|
9
9
|
export {
|
|
10
10
|
doctorCommand
|
|
11
11
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import "./chunk-PDX44BCA.js";
|
|
3
|
+
|
|
4
|
+
// src/commands/event.ts
|
|
5
|
+
import * as fs from "fs";
|
|
6
|
+
import * as path from "path";
|
|
7
|
+
async function eventEmitCommand(options) {
|
|
8
|
+
const cwd = process.cwd();
|
|
9
|
+
const eventsDir = path.join(cwd, ".paradigm", "events");
|
|
10
|
+
const streamFile = path.join(eventsDir, "stream.jsonl");
|
|
11
|
+
const now = Date.now();
|
|
12
|
+
const rand = Math.floor(Math.random() * 9999).toString().padStart(4, "0");
|
|
13
|
+
const event = {
|
|
14
|
+
id: `ev-${now}-${rand}`,
|
|
15
|
+
type: options.type,
|
|
16
|
+
source: options.source,
|
|
17
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
18
|
+
...options.path ? { path: options.path } : {},
|
|
19
|
+
...options.symbols?.length ? { symbols: options.symbols } : {},
|
|
20
|
+
...options.context ? { context: options.context } : {},
|
|
21
|
+
...options.severity ? { severity: options.severity } : {}
|
|
22
|
+
};
|
|
23
|
+
try {
|
|
24
|
+
fs.mkdirSync(eventsDir, { recursive: true });
|
|
25
|
+
fs.appendFileSync(streamFile, JSON.stringify(event) + "\n", "utf8");
|
|
26
|
+
} catch {
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
eventEmitCommand
|
|
31
|
+
};
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import "./chunk-PDX44BCA.js";
|
|
3
|
+
|
|
4
|
+
// src/commands/graduate/index.ts
|
|
5
|
+
import * as fs from "fs";
|
|
6
|
+
import * as path from "path";
|
|
7
|
+
import chalk from "chalk";
|
|
8
|
+
import * as yaml from "js-yaml";
|
|
9
|
+
function loadGraduationYaml(rootDir) {
|
|
10
|
+
const filePath = path.join(rootDir, ".paradigm", "graduation.yaml");
|
|
11
|
+
if (!fs.existsSync(filePath)) return { states: {} };
|
|
12
|
+
try {
|
|
13
|
+
const content = fs.readFileSync(filePath, "utf8");
|
|
14
|
+
return yaml.load(content) || { states: {} };
|
|
15
|
+
} catch {
|
|
16
|
+
return { states: {} };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
var SEED_HABIT_NAMES = {
|
|
20
|
+
"explore-before-implement": "Explore Before Implementing",
|
|
21
|
+
"ripple-before-modify": "Ripple Before Modifying",
|
|
22
|
+
"check-fragility": "Check Fragility",
|
|
23
|
+
"wisdom-before-implement": "Check Team Wisdom",
|
|
24
|
+
"verify-before-done": "Verify Before Done",
|
|
25
|
+
"postflight-compliance": "Postflight Compliance",
|
|
26
|
+
"test-new-components": "Test New Components",
|
|
27
|
+
"purpose-coverage": "Purpose File Coverage",
|
|
28
|
+
"record-lore-for-significant": "Record Lore for Significant Changes",
|
|
29
|
+
"confidence-on-decisions": "Confidence on Decisions",
|
|
30
|
+
"gates-for-routes": "Gates for Routes",
|
|
31
|
+
"university-content-valid": "University Content Valid",
|
|
32
|
+
"university-onboarded": "University Onboarding"
|
|
33
|
+
};
|
|
34
|
+
var TIER_COLORS = {
|
|
35
|
+
hook: chalk.green,
|
|
36
|
+
habit: chalk.yellow,
|
|
37
|
+
mcp: chalk.red
|
|
38
|
+
};
|
|
39
|
+
async function graduateStatusCommand(options) {
|
|
40
|
+
const cwd = process.cwd();
|
|
41
|
+
const data = loadGraduationYaml(cwd);
|
|
42
|
+
const states = data.states || {};
|
|
43
|
+
if (options.json) {
|
|
44
|
+
console.log(JSON.stringify({ states }, null, 2));
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
console.log(chalk.blue("\n\u26A1 Automation Tier Status\n"));
|
|
48
|
+
console.log(chalk.gray("\u2500".repeat(60)));
|
|
49
|
+
const byTier = {
|
|
50
|
+
hook: [],
|
|
51
|
+
habit: [],
|
|
52
|
+
mcp: []
|
|
53
|
+
};
|
|
54
|
+
const allIds = /* @__PURE__ */ new Set([...Object.keys(SEED_HABIT_NAMES), ...Object.keys(states)]);
|
|
55
|
+
for (const id of allIds) {
|
|
56
|
+
const state = states[id] || {};
|
|
57
|
+
const tier = state.tier || "habit";
|
|
58
|
+
if (!byTier[tier]) byTier[tier] = [];
|
|
59
|
+
byTier[tier].push({ id, state });
|
|
60
|
+
}
|
|
61
|
+
const hookCount = byTier.hook.length;
|
|
62
|
+
const habitCount = byTier.habit.length;
|
|
63
|
+
const mcpCount = byTier.mcp.length;
|
|
64
|
+
const total = hookCount + habitCount + mcpCount;
|
|
65
|
+
console.log(` ${chalk.green(`${hookCount} hook`)} ${chalk.yellow(`${habitCount} habit`)} ${chalk.red(`${mcpCount} mcp`)} (${total} total)
|
|
66
|
+
`);
|
|
67
|
+
if (byTier.hook.length > 0) {
|
|
68
|
+
console.log(chalk.green.bold(" \u26A1 Hooks (zero context cost)"));
|
|
69
|
+
for (const { id, state } of byTier.hook) {
|
|
70
|
+
const name = SEED_HABIT_NAMES[id] || id;
|
|
71
|
+
const date = state.graduatedAt ? ` \u2014 graduated ${state.graduatedAt.split("T")[0]}` : "";
|
|
72
|
+
console.log(` ${chalk.green("\u25CF")} ${name} ${chalk.gray(`(${id})${date}`)}`);
|
|
73
|
+
}
|
|
74
|
+
console.log();
|
|
75
|
+
}
|
|
76
|
+
if (byTier.habit.length > 0) {
|
|
77
|
+
console.log(chalk.yellow.bold(" \u{1F4AD} Habits (agent-reminded)"));
|
|
78
|
+
for (const { id, state } of byTier.habit) {
|
|
79
|
+
const name = SEED_HABIT_NAMES[id] || id;
|
|
80
|
+
const lock = state.neverGraduate ? chalk.gray(" \u{1F512} never-graduate") : "";
|
|
81
|
+
const cooldown = state.cooldownUntil && new Date(state.cooldownUntil) > /* @__PURE__ */ new Date() ? chalk.gray(` \u23F3 cooldown until ${state.cooldownUntil.split("T")[0]}`) : "";
|
|
82
|
+
console.log(` ${chalk.yellow("\u25CF")} ${name} ${chalk.gray(`(${id})`)}${lock}${cooldown}`);
|
|
83
|
+
}
|
|
84
|
+
console.log();
|
|
85
|
+
}
|
|
86
|
+
if (byTier.mcp.length > 0) {
|
|
87
|
+
console.log(chalk.red.bold(" \u{1F527} MCP Tools (manual, high token cost)"));
|
|
88
|
+
for (const { id, state } of byTier.mcp) {
|
|
89
|
+
const name = SEED_HABIT_NAMES[id] || id;
|
|
90
|
+
console.log(` ${chalk.red("\u25CF")} ${name} ${chalk.gray(`(${id})`)}`);
|
|
91
|
+
}
|
|
92
|
+
console.log();
|
|
93
|
+
}
|
|
94
|
+
if (hookCount > 0) {
|
|
95
|
+
const estimatedSavings = hookCount * 150;
|
|
96
|
+
console.log(chalk.gray(` Estimated savings: ~${estimatedSavings} tokens/session from ${hookCount} graduated habit(s)`));
|
|
97
|
+
}
|
|
98
|
+
console.log();
|
|
99
|
+
}
|
|
100
|
+
function saveGraduationYaml(rootDir, data) {
|
|
101
|
+
const filePath = path.join(rootDir, ".paradigm", "graduation.yaml");
|
|
102
|
+
const dir = path.dirname(filePath);
|
|
103
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
104
|
+
const content = yaml.dump(data, { lineWidth: 120, noRefs: true, sortKeys: true });
|
|
105
|
+
fs.writeFileSync(filePath, content, "utf8");
|
|
106
|
+
}
|
|
107
|
+
async function graduatePromoteCommand(habitId) {
|
|
108
|
+
const cwd = process.cwd();
|
|
109
|
+
const data = loadGraduationYaml(cwd);
|
|
110
|
+
if (!data.states) data.states = {};
|
|
111
|
+
const state = data.states[habitId] || {};
|
|
112
|
+
if (state.tier === "hook") {
|
|
113
|
+
console.log(chalk.yellow(`${habitId} is already graduated to hook tier.`));
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (state.neverGraduate) {
|
|
117
|
+
console.log(chalk.red(`${habitId} is marked as never-graduate (requires agent cognition).`));
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
data.states[habitId] = {
|
|
121
|
+
...state,
|
|
122
|
+
tier: "hook",
|
|
123
|
+
graduatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
124
|
+
complianceAtGraduation: 100,
|
|
125
|
+
failureCount: 0
|
|
126
|
+
};
|
|
127
|
+
saveGraduationYaml(cwd, data);
|
|
128
|
+
const name = SEED_HABIT_NAMES[habitId] || habitId;
|
|
129
|
+
console.log(chalk.green(`${chalk.bold("\u26A1")} Graduated "${name}" to hook tier.`));
|
|
130
|
+
console.log(chalk.gray(" MCP evaluation will skip this habit. Stop hook enforces compliance."));
|
|
131
|
+
}
|
|
132
|
+
async function graduateDemoteCommand(habitId, options) {
|
|
133
|
+
const cwd = process.cwd();
|
|
134
|
+
const data = loadGraduationYaml(cwd);
|
|
135
|
+
if (!data.states) data.states = {};
|
|
136
|
+
const state = data.states[habitId] || {};
|
|
137
|
+
if (state.tier !== "hook") {
|
|
138
|
+
console.log(chalk.yellow(`${habitId} is not at hook tier (currently: ${state.tier || "habit"}).`));
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
const cooldownDays = options.cooldown ? parseInt(options.cooldown) : 14;
|
|
142
|
+
const cooldownUntil = /* @__PURE__ */ new Date();
|
|
143
|
+
cooldownUntil.setDate(cooldownUntil.getDate() + cooldownDays);
|
|
144
|
+
data.states[habitId] = {
|
|
145
|
+
...state,
|
|
146
|
+
tier: "habit",
|
|
147
|
+
demotedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
148
|
+
cooldownUntil: cooldownUntil.toISOString()
|
|
149
|
+
};
|
|
150
|
+
saveGraduationYaml(cwd, data);
|
|
151
|
+
const name = SEED_HABIT_NAMES[habitId] || habitId;
|
|
152
|
+
console.log(chalk.yellow(`${chalk.bold("\u{1F4AD}")} Demoted "${name}" back to habit tier.`));
|
|
153
|
+
console.log(chalk.gray(` Cooldown: ${cooldownDays} days (until ${cooldownUntil.toISOString().split("T")[0]}).`));
|
|
154
|
+
console.log(chalk.gray(" MCP evaluation will resume checking this habit."));
|
|
155
|
+
}
|
|
156
|
+
export {
|
|
157
|
+
graduateDemoteCommand,
|
|
158
|
+
graduatePromoteCommand,
|
|
159
|
+
graduateStatusCommand
|
|
160
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-PDX44BCA.js";
|
|
3
3
|
|
|
4
4
|
// src/commands/habits/index.ts
|
|
5
5
|
import * as fs2 from "fs";
|
|
@@ -934,7 +934,7 @@ async function habitsStatusCommand(options) {
|
|
|
934
934
|
const enabled = getEnabledHabits(habits);
|
|
935
935
|
let practiceData = null;
|
|
936
936
|
try {
|
|
937
|
-
const { SentinelStorage } = await import("./dist-
|
|
937
|
+
const { SentinelStorage } = await import("./dist-QK4SQAK7.js");
|
|
938
938
|
const sentinelDir = path3.join(rootDir, ".paradigm", "sentinel");
|
|
939
939
|
if (fs2.existsSync(sentinelDir)) {
|
|
940
940
|
const storage = new SentinelStorage(sentinelDir);
|
|
@@ -1302,7 +1302,7 @@ async function habitsCheckCommand(options) {
|
|
|
1302
1302
|
try {
|
|
1303
1303
|
const sentinelDir = path3.join(rootDir, ".paradigm", "sentinel");
|
|
1304
1304
|
if (fs2.existsSync(sentinelDir)) {
|
|
1305
|
-
const { SentinelStorage } = await import("./dist-
|
|
1305
|
+
const { SentinelStorage } = await import("./dist-QK4SQAK7.js");
|
|
1306
1306
|
const storage = new SentinelStorage(sentinelDir);
|
|
1307
1307
|
for (const e of evaluation.evaluations) {
|
|
1308
1308
|
storage.recordPracticeEvent({
|