@a-company/paradigm 3.1.5 → 3.5.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.
Files changed (80) hide show
  1. package/dist/{accept-orchestration-CWZNCGZX.js → accept-orchestration-DIGPJVUR.js} +6 -5
  2. package/dist/{aggregate-W7Q6VIM2.js → aggregate-V4KPR3RW.js} +2 -2
  3. package/dist/{beacon-B47XSTL7.js → beacon-XRXL5KZB.js} +2 -2
  4. package/dist/{chunk-4LGLU2LO.js → chunk-2E2RTBSM.js} +533 -182
  5. package/dist/{chunk-YCLN7WXV.js → chunk-2QNZ6PVD.js} +219 -35
  6. package/dist/{chunk-UM54F7G5.js → chunk-4N6AYEEA.js} +1 -1
  7. package/dist/{chunk-MVXJVRFI.js → chunk-5TUAVVIG.js} +65 -1
  8. package/dist/{chunk-5C4SGQKH.js → chunk-6P4IFIK2.js} +4 -2
  9. package/dist/{chunk-WS5KM7OL.js → chunk-6RNYVBSG.js} +1 -1
  10. package/dist/{chunk-N6PJAPDE.js → chunk-AK5M6KJB.js} +18 -0
  11. package/dist/{chunk-VZ7CXFRZ.js → chunk-CRICL4FQ.js} +1004 -17
  12. package/dist/{chunk-MC7XC7XQ.js → chunk-GZDFVP2N.js} +20 -13
  13. package/dist/chunk-HPC3JAUP.js +42 -0
  14. package/dist/chunk-IRVA7NKV.js +657 -0
  15. package/dist/{chunk-ZPN7MXRA.js → chunk-KFHK6EBI.js} +184 -1
  16. package/dist/{chunk-UUZ2DMG5.js → chunk-KWDTBXP2.js} +1 -1
  17. package/dist/{chunk-DRUDZKIT.js → chunk-M2XMTJHQ.js} +693 -70
  18. package/dist/{chunk-PW2EXJQT.js → chunk-MRENOFTR.js} +24 -1
  19. package/dist/{chunk-QS36NGWV.js → chunk-QHJGB5TV.js} +1 -1
  20. package/dist/chunk-UI3XXVJ6.js +449 -0
  21. package/dist/{chunk-AD2LSCHB.js → chunk-Y4XZWCHK.js} +40 -74
  22. package/dist/{constellation-K3CIQCHI.js → constellation-GNK5DIMH.js} +2 -2
  23. package/dist/{cost-AEK6R7HK.js → cost-AGO5N7DD.js} +1 -1
  24. package/dist/{cursorrules-KI5QWHIX.js → cursorrules-LQFA7M62.js} +2 -2
  25. package/dist/{delete-W67IVTLJ.js → delete-3YXAJ5AA.js} +12 -1
  26. package/dist/{diff-AJJ5H6HV.js → diff-J6C5IHPV.js} +6 -5
  27. package/dist/{dist-2F7NO4H4-KSL6SJIO.js → dist-AG5JNIZU-XSEZ2LLK.js} +28 -3
  28. package/dist/dist-JOHRYQUA.js +7294 -0
  29. package/dist/{dist-NHJQVVUW.js → dist-Q6SAZI7X.js} +2 -2
  30. package/dist/{dist-GPQ4LAY3.js → dist-YP2CO4TG.js} +24 -6
  31. package/dist/{doctor-JBIV5PMN.js → doctor-TQYRF7KK.js} +2 -2
  32. package/dist/{edit-Y7XPYSMK.js → edit-EOMPXOG5.js} +1 -1
  33. package/dist/flow-7JUH6D4H.js +185 -0
  34. package/dist/global-AXILUM5X.js +136 -0
  35. package/dist/{habits-FA65W77Y.js → habits-CHP4EW5H.js} +234 -5
  36. package/dist/{hooks-JKWO44WH.js → hooks-DLZEYHI3.js} +1 -1
  37. package/dist/index.js +125 -100
  38. package/dist/{lint-HXKTWRNO.js → lint-N4LMMEXH.js} +141 -1
  39. package/dist/{list-R3QWW4SC.js → list-JKBJ7ESH.js} +1 -1
  40. package/dist/mcp.js +9273 -6515
  41. package/dist/{orchestrate-4ZH5GUQH.js → orchestrate-FAV64G2R.js} +6 -5
  42. package/dist/{probe-OYCP4JYG.js → probe-X3J2JX62.js} +18 -3
  43. package/dist/{promote-E6NBZ3BK.js → promote-HZH5E5CO.js} +1 -1
  44. package/dist/{providers-4PGPZEWP.js → providers-NQ67LO2Z.js} +1 -1
  45. package/dist/{record-OHQNWOUP.js → record-EECZ3E4I.js} +1 -1
  46. package/dist/{remember-6VZ74B7E.js → remember-3KJZGDUG.js} +1 -1
  47. package/dist/{review-RUHX25A5.js → review-BF26ILZB.js} +1 -1
  48. package/dist/{ripple-SBQOSTZD.js → ripple-JIUAMBLA.js} +2 -2
  49. package/dist/sentinel-ZTL224IG.js +63 -0
  50. package/dist/{server-MV4HNFVF.js → server-MZBYDXJY.js} +4193 -9
  51. package/dist/{setup-DF4F3ICN.js → setup-363IB6MO.js} +1 -1
  52. package/dist/{setup-JHBPZAG7.js → setup-UKJ3VGHI.js} +4 -4
  53. package/dist/{shift-2LQFQP4P.js → shift-KDVYB6CR.js} +16 -13
  54. package/dist/{show-WTOJXUTN.js → show-SAMTXEHG.js} +1 -1
  55. package/dist/{snapshot-GTVPRYZG.js → snapshot-KCMONZAO.js} +2 -2
  56. package/dist/{spawn-BJRQA2NR.js → spawn-EO7B2UM3.js} +2 -2
  57. package/dist/{summary-5SBFO7QK.js → summary-E2PU4UN2.js} +3 -3
  58. package/dist/{switch-6EANJ7O6.js → switch-CC2KACXO.js} +1 -1
  59. package/dist/{sync-5KSTPJ4B.js → sync-5VJPZQNX.js} +2 -2
  60. package/dist/sync-llms-7QDA3ZWC.js +166 -0
  61. package/dist/{team-NWP2KJAB.js → team-6CCNANKE.js} +7 -6
  62. package/dist/{test-MA5TWJQV.js → test-DK2RWLTK.js} +91 -8
  63. package/dist/{thread-JCJVRUQR.js → thread-RNSLADXN.js} +18 -2
  64. package/dist/{timeline-P7BARFLI.js → timeline-TJDVVVA3.js} +1 -1
  65. package/dist/{triage-TBIWJA6R.js → triage-PXMU3RWV.js} +2 -2
  66. package/dist/university-content/courses/para-101.json +2 -1
  67. package/dist/university-content/courses/para-201.json +102 -3
  68. package/dist/university-content/courses/para-301.json +14 -11
  69. package/dist/university-content/courses/para-401.json +57 -3
  70. package/dist/university-content/courses/para-501.json +204 -6
  71. package/dist/university-content/plsat/v3.0.json +808 -3
  72. package/dist/university-content/reference.json +270 -0
  73. package/dist/{upgrade-TIYFQYPO.js → upgrade-RBSE4M6I.js} +1 -1
  74. package/dist/{validate-QEEY6KFS.js → validate-2LTHHORX.js} +1 -1
  75. package/dist/{watch-4LT4O6K7.js → watch-NBPOMOEX.js} +76 -0
  76. package/dist/{watch-2XEYUH43.js → watch-PAEH6MOG.js} +1 -1
  77. package/package.json +1 -1
  78. package/dist/chunk-GWM2WRXL.js +0 -1095
  79. package/dist/sentinel-WB7GIK4V.js +0 -43
  80. /package/dist/{chunk-TAP5N3HH.js → chunk-CCG6KYBT.js} +0 -0
@@ -2,10 +2,14 @@
2
2
  import {
3
3
  suggestAgentsForTask
4
4
  } from "./chunk-6QC3YGB6.js";
5
+ import {
6
+ extractDeclaredGates,
7
+ loadPortalConfig
8
+ } from "./chunk-HPC3JAUP.js";
5
9
  import {
6
10
  AgentSpawner,
7
11
  extractSymbols
8
- } from "./chunk-WS5KM7OL.js";
12
+ } from "./chunk-6RNYVBSG.js";
9
13
  import {
10
14
  AuditLogger
11
15
  } from "./chunk-PBHIFAL4.js";
@@ -16,7 +20,7 @@ import {
16
20
  buildSymbolIndex,
17
21
  getReferencesTo,
18
22
  searchSymbols
19
- } from "./chunk-5C4SGQKH.js";
23
+ } from "./chunk-6P4IFIK2.js";
20
24
  import {
21
25
  calculateCost
22
26
  } from "./chunk-5JGJACDU.js";
@@ -268,46 +272,8 @@ function getRecommendedModel(agentName, classification) {
268
272
  }
269
273
 
270
274
  // src/core/pm-compliance.ts
271
- import * as fs2 from "fs";
272
- import * as path2 from "path";
273
-
274
- // src/core/portal-compliance.ts
275
275
  import * as fs from "fs";
276
276
  import * as path from "path";
277
- import * as yaml from "js-yaml";
278
- function loadPortalConfig(rootDir) {
279
- const portalPath = path.join(rootDir, "portal.yaml");
280
- if (!fs.existsSync(portalPath)) {
281
- return null;
282
- }
283
- try {
284
- const content = fs.readFileSync(portalPath, "utf-8");
285
- return yaml.load(content);
286
- } catch {
287
- return null;
288
- }
289
- }
290
- function extractDeclaredGates(config) {
291
- const gates = /* @__PURE__ */ new Set();
292
- if (config.gates) {
293
- for (const key of Object.keys(config.gates)) {
294
- const gateName = key.startsWith("^") ? key.slice(1) : key;
295
- gates.add(gateName);
296
- }
297
- }
298
- if (config.routes) {
299
- for (const routeConfig of Object.values(config.routes)) {
300
- const gateList = Array.isArray(routeConfig) ? routeConfig : routeConfig.gates || [];
301
- for (const gate of gateList) {
302
- const gateName = gate.startsWith("^") ? gate.slice(1) : gate;
303
- gates.add(gateName);
304
- }
305
- }
306
- }
307
- return Array.from(gates);
308
- }
309
-
310
- // src/core/pm-compliance.ts
311
277
  var SYMBOL_PATTERN2 = /[@#$%^!?&~][a-zA-Z][a-zA-Z0-9_-]*/g;
312
278
  var ROUTE_PATTERNS = [
313
279
  // Express/Fastify
@@ -412,11 +378,11 @@ function runPostflight(filesModified, symbolsTouched, rootDir, index) {
412
378
  const declaredGates = portalConfig ? extractDeclaredGates(portalConfig) : [];
413
379
  const declaredRoutes = portalConfig?.routes ? Object.keys(portalConfig.routes) : [];
414
380
  for (const file of filesModified) {
415
- const absPath = path2.isAbsolute(file) ? file : path2.join(rootDir, file);
416
- if (!fs2.existsSync(absPath)) continue;
381
+ const absPath = path.isAbsolute(file) ? file : path.join(rootDir, file);
382
+ if (!fs.existsSync(absPath)) continue;
417
383
  let content;
418
384
  try {
419
- content = fs2.readFileSync(absPath, "utf-8");
385
+ content = fs.readFileSync(absPath, "utf-8");
420
386
  } catch {
421
387
  continue;
422
388
  }
@@ -434,8 +400,8 @@ function runPostflight(filesModified, symbolsTouched, rootDir, index) {
434
400
  violations.push({
435
401
  type: "missing-portal-gate",
436
402
  severity: "warning",
437
- message: `Route "${routePath}" found in ${path2.relative(rootDir, absPath)} but not declared in portal.yaml`,
438
- file: path2.relative(rootDir, absPath),
403
+ message: `Route "${routePath}" found in ${path.relative(rootDir, absPath)} but not declared in portal.yaml`,
404
+ file: path.relative(rootDir, absPath),
439
405
  suggestion: `Add this route to portal.yaml with appropriate ^gates. Run paradigm_gates_for_route to get suggestions.`
440
406
  });
441
407
  } else if (!portalConfig && routePath.startsWith("/api/")) {
@@ -443,7 +409,7 @@ function runPostflight(filesModified, symbolsTouched, rootDir, index) {
443
409
  type: "missing-portal-gate",
444
410
  severity: "warning",
445
411
  message: `API route "${routePath}" found but no portal.yaml exists`,
446
- file: path2.relative(rootDir, absPath),
412
+ file: path.relative(rootDir, absPath),
447
413
  suggestion: `Create portal.yaml to declare gates for API routes. Run: paradigm portal init`
448
414
  });
449
415
  }
@@ -600,7 +566,7 @@ var Orchestrator = class {
600
566
  let preflightResult;
601
567
  if (options.pmGovernance?.enabled) {
602
568
  try {
603
- const { aggregateFromDirectory } = await import("./dist-NHJQVVUW.js");
569
+ const { aggregateFromDirectory } = await import("./dist-Q6SAZI7X.js");
604
570
  const aggregation = await aggregateFromDirectory(this.rootDir);
605
571
  const index = buildSymbolIndex(aggregation);
606
572
  preflightResult = runPreflight(task, this.rootDir, index);
@@ -627,7 +593,7 @@ var Orchestrator = class {
627
593
  }
628
594
  if (options.pmGovernance?.enabled && preflightResult) {
629
595
  try {
630
- const { aggregateFromDirectory } = await import("./dist-NHJQVVUW.js");
596
+ const { aggregateFromDirectory } = await import("./dist-Q6SAZI7X.js");
631
597
  const aggregation = await aggregateFromDirectory(this.rootDir);
632
598
  const index = buildSymbolIndex(aggregation);
633
599
  const filesModified = [];
@@ -1309,16 +1275,16 @@ ${additionalContext}` : step.subtask;
1309
1275
  };
1310
1276
 
1311
1277
  // src/core/background-orchestrator.ts
1312
- import * as fs3 from "fs";
1313
- import * as path3 from "path";
1314
- import * as yaml2 from "js-yaml";
1278
+ import * as fs2 from "fs";
1279
+ import * as path2 from "path";
1280
+ import * as yaml from "js-yaml";
1315
1281
  import { spawn } from "child_process";
1316
1282
  var BackgroundOrchestrator = class {
1317
1283
  rootDir;
1318
1284
  orchestrationsDir;
1319
1285
  constructor(rootDir) {
1320
1286
  this.rootDir = rootDir;
1321
- this.orchestrationsDir = path3.join(rootDir, ".paradigm", "orchestrations");
1287
+ this.orchestrationsDir = path2.join(rootDir, ".paradigm", "orchestrations");
1322
1288
  this.ensureOrchestrationDir();
1323
1289
  }
1324
1290
  /**
@@ -1326,8 +1292,8 @@ var BackgroundOrchestrator = class {
1326
1292
  */
1327
1293
  async startBackground(task, options = {}) {
1328
1294
  const id = this.generateId();
1329
- const outputFile = path3.join(this.orchestrationsDir, `${id}.output`);
1330
- const logFile = path3.join(this.orchestrationsDir, `${id}.log`);
1295
+ const outputFile = path2.join(this.orchestrationsDir, `${id}.output`);
1296
+ const logFile = path2.join(this.orchestrationsDir, `${id}.log`);
1331
1297
  const orchestration = {
1332
1298
  id,
1333
1299
  task,
@@ -1346,13 +1312,13 @@ var BackgroundOrchestrator = class {
1346
1312
  * Get orchestration by ID
1347
1313
  */
1348
1314
  getOrchestration(id) {
1349
- const metaFile = path3.join(this.orchestrationsDir, `${id}.yaml`);
1350
- if (!fs3.existsSync(metaFile)) {
1315
+ const metaFile = path2.join(this.orchestrationsDir, `${id}.yaml`);
1316
+ if (!fs2.existsSync(metaFile)) {
1351
1317
  return null;
1352
1318
  }
1353
1319
  try {
1354
- const content = fs3.readFileSync(metaFile, "utf-8");
1355
- return yaml2.load(content);
1320
+ const content = fs2.readFileSync(metaFile, "utf-8");
1321
+ return yaml.load(content);
1356
1322
  } catch {
1357
1323
  return null;
1358
1324
  }
@@ -1361,14 +1327,14 @@ var BackgroundOrchestrator = class {
1361
1327
  * List all orchestrations
1362
1328
  */
1363
1329
  listOrchestrations(options = {}) {
1364
- const files = fs3.readdirSync(this.orchestrationsDir).filter((f) => f.endsWith(".yaml") && !f.includes("output") && !f.includes("log")).sort().reverse();
1330
+ const files = fs2.readdirSync(this.orchestrationsDir).filter((f) => f.endsWith(".yaml") && !f.includes("output") && !f.includes("log")).sort().reverse();
1365
1331
  const orchestrations = [];
1366
1332
  for (const file of files) {
1367
1333
  if (options.limit && orchestrations.length >= options.limit) break;
1368
- const metaFile = path3.join(this.orchestrationsDir, file);
1334
+ const metaFile = path2.join(this.orchestrationsDir, file);
1369
1335
  try {
1370
- const content = fs3.readFileSync(metaFile, "utf-8");
1371
- const orch = yaml2.load(content);
1336
+ const content = fs2.readFileSync(metaFile, "utf-8");
1337
+ const orch = yaml.load(content);
1372
1338
  if (options.status) {
1373
1339
  const statuses = Array.isArray(options.status) ? options.status : [options.status];
1374
1340
  if (!statuses.includes(orch.status)) continue;
@@ -1391,10 +1357,10 @@ var BackgroundOrchestrator = class {
1391
1357
  getOutput(id, options = {}) {
1392
1358
  const orch = this.getOrchestration(id);
1393
1359
  if (!orch) return "";
1394
- if (!fs3.existsSync(orch.outputFile)) {
1360
+ if (!fs2.existsSync(orch.outputFile)) {
1395
1361
  return "";
1396
1362
  }
1397
- const content = fs3.readFileSync(orch.outputFile, "utf-8");
1363
+ const content = fs2.readFileSync(orch.outputFile, "utf-8");
1398
1364
  if (options.lines) {
1399
1365
  const lines = content.split("\n");
1400
1366
  return lines.slice(-options.lines).join("\n");
@@ -1429,9 +1395,9 @@ var BackgroundOrchestrator = class {
1429
1395
  if (options.cleanup && orch.artifacts.length > 0) {
1430
1396
  for (const artifact of orch.artifacts) {
1431
1397
  if (artifact.action === "created") {
1432
- const filePath = path3.join(this.rootDir, artifact.path);
1433
- if (fs3.existsSync(filePath)) {
1434
- fs3.unlinkSync(filePath);
1398
+ const filePath = path2.join(this.rootDir, artifact.path);
1399
+ if (fs2.existsSync(filePath)) {
1400
+ fs2.unlinkSync(filePath);
1435
1401
  }
1436
1402
  }
1437
1403
  }
@@ -1506,8 +1472,8 @@ var BackgroundOrchestrator = class {
1506
1472
  }
1507
1473
  break;
1508
1474
  case "file":
1509
- const statusFile = path3.join(this.orchestrationsDir, `${id}.status`);
1510
- fs3.writeFileSync(statusFile, JSON.stringify({
1475
+ const statusFile = path2.join(this.orchestrationsDir, `${id}.status`);
1476
+ fs2.writeFileSync(statusFile, JSON.stringify({
1511
1477
  id,
1512
1478
  status: orch.status,
1513
1479
  completed: orch.completed,
@@ -1523,8 +1489,8 @@ var BackgroundOrchestrator = class {
1523
1489
  // Private Methods
1524
1490
  // ==========================================================================
1525
1491
  ensureOrchestrationDir() {
1526
- if (!fs3.existsSync(this.orchestrationsDir)) {
1527
- fs3.mkdirSync(this.orchestrationsDir, { recursive: true });
1492
+ if (!fs2.existsSync(this.orchestrationsDir)) {
1493
+ fs2.mkdirSync(this.orchestrationsDir, { recursive: true });
1528
1494
  }
1529
1495
  }
1530
1496
  generateId() {
@@ -1534,8 +1500,8 @@ var BackgroundOrchestrator = class {
1534
1500
  return `orch-${date}-${time}-${random}`;
1535
1501
  }
1536
1502
  saveOrchestration(orch) {
1537
- const metaFile = path3.join(this.orchestrationsDir, `${orch.id}.yaml`);
1538
- fs3.writeFileSync(metaFile, yaml2.dump(orch));
1503
+ const metaFile = path2.join(this.orchestrationsDir, `${orch.id}.yaml`);
1504
+ fs2.writeFileSync(metaFile, yaml.dump(orch));
1539
1505
  }
1540
1506
  spawnOrchestration(id, task, options) {
1541
1507
  const orch = this.getOrchestration(id);
@@ -1548,7 +1514,7 @@ var BackgroundOrchestrator = class {
1548
1514
  try {
1549
1515
  const orchestrator = new Orchestrator(this.rootDir);
1550
1516
  await orchestrator.initialize();
1551
- const outputStream = fs3.createWriteStream(orch.outputFile, { flags: "a" });
1517
+ const outputStream = fs2.createWriteStream(orch.outputFile, { flags: "a" });
1552
1518
  const result = await orchestrator.orchestrate(task, {
1553
1519
  ...options,
1554
1520
  onMessage: (source, message) => {
@@ -5,8 +5,8 @@ import {
5
5
  getAllSymbols,
6
6
  getSymbolCounts,
7
7
  getSymbolsByType
8
- } from "./chunk-5C4SGQKH.js";
9
- import "./chunk-PW2EXJQT.js";
8
+ } from "./chunk-6P4IFIK2.js";
9
+ import "./chunk-MRENOFTR.js";
10
10
  import "./chunk-IRKUEJVW.js";
11
11
  import {
12
12
  log
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  findPurposeFiles
4
- } from "./chunk-PW2EXJQT.js";
4
+ } from "./chunk-MRENOFTR.js";
5
5
  import {
6
6
  findGateFiles
7
7
  } from "./chunk-IRKUEJVW.js";
@@ -4,8 +4,8 @@ import {
4
4
  generateCursorrules,
5
5
  paradigmConfigExists,
6
6
  writeCursorrules
7
- } from "./chunk-UUZ2DMG5.js";
8
- import "./chunk-N6PJAPDE.js";
7
+ } from "./chunk-KWDTBXP2.js";
8
+ import "./chunk-AK5M6KJB.js";
9
9
  import {
10
10
  getDefaultParadigmConfig,
11
11
  parseParadigmConfig,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  deleteLoreEntry,
4
4
  loadLoreEntry
5
- } from "./chunk-MVXJVRFI.js";
5
+ } from "./chunk-5TUAVVIG.js";
6
6
  import "./chunk-MO4EEYFW.js";
7
7
 
8
8
  // src/commands/lore/delete.ts
@@ -17,6 +17,17 @@ async function loreDeleteCommand(id, options) {
17
17
  process.exitCode = 1;
18
18
  return;
19
19
  }
20
+ if (options.dryRun) {
21
+ console.log(chalk.cyan(`
22
+ [dry-run] Would delete lore entry:`));
23
+ console.log(chalk.white(` ${entry.id} - ${entry.title}`));
24
+ console.log(chalk.gray(` Type: ${entry.type} | Author: ${entry.author.id} | ${entry.timestamp}`));
25
+ console.log(chalk.gray(` Symbols: ${entry.symbols_touched.join(", ")}`));
26
+ console.log(chalk.cyan(`
27
+ [dry-run] No changes made.
28
+ `));
29
+ return;
30
+ }
20
31
  if (!options.yes) {
21
32
  console.log(chalk.yellow(`
22
33
  Will delete lore entry:`));
@@ -1,14 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  BackgroundOrchestrator
4
- } from "./chunk-AD2LSCHB.js";
4
+ } from "./chunk-Y4XZWCHK.js";
5
5
  import "./chunk-6QC3YGB6.js";
6
- import "./chunk-WS5KM7OL.js";
6
+ import "./chunk-HPC3JAUP.js";
7
+ import "./chunk-6RNYVBSG.js";
7
8
  import "./chunk-PBHIFAL4.js";
8
- import "./chunk-TAP5N3HH.js";
9
+ import "./chunk-CCG6KYBT.js";
9
10
  import "./chunk-PMXRGPRQ.js";
10
- import "./chunk-5C4SGQKH.js";
11
- import "./chunk-PW2EXJQT.js";
11
+ import "./chunk-6P4IFIK2.js";
12
+ import "./chunk-MRENOFTR.js";
12
13
  import "./chunk-IRKUEJVW.js";
13
14
  import "./chunk-5JGJACDU.js";
14
15
  import "./chunk-MO4EEYFW.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import "./chunk-MO4EEYFW.js";
3
3
 
4
- // ../sentinel/dist/dist-2F7NO4H4.js
4
+ // ../sentinel/dist/dist-AG5JNIZU.js
5
5
  import * as fs4 from "fs";
6
6
  import { z as z2 } from "zod";
7
7
  import * as path3 from "path";
@@ -5706,9 +5706,10 @@ function parsePurposeFileDetailed(filePath) {
5706
5706
  detailedErrors.push({ message: error, type: "file" });
5707
5707
  return { data: null, errors, detailedErrors, rawContent: void 0, isYamlValid: false };
5708
5708
  }
5709
+ const processedContent = rawContent.replace(/^([#~!$^][\w-]+):/gm, '"$1":').replace(/^(\s*-\s+)([!#][\w-]+)$/gm, '$1"$2"');
5709
5710
  let data = null;
5710
5711
  try {
5711
- data = load(rawContent);
5712
+ data = load(processedContent);
5712
5713
  } catch (e) {
5713
5714
  const yamlError = e;
5714
5715
  const line = yamlError.mark?.line ? yamlError.mark.line + 1 : void 0;
@@ -5730,6 +5731,28 @@ function parsePurposeFileDetailed(filePath) {
5730
5731
  isYamlValid: true
5731
5732
  };
5732
5733
  }
5734
+ if (typeof data === "object" && data !== null) {
5735
+ const obj = data;
5736
+ const prefixMap = {
5737
+ "#": "components",
5738
+ "$": "flows",
5739
+ "^": "gates",
5740
+ "!": "signals",
5741
+ "~": "aspects"
5742
+ };
5743
+ for (const key of Object.keys(obj)) {
5744
+ const prefix = key[0];
5745
+ const target = prefixMap[prefix];
5746
+ if (!target || key.length < 2) continue;
5747
+ const id = key.slice(1);
5748
+ const value = obj[key];
5749
+ if (typeof value !== "object" || value === null) continue;
5750
+ const dict = obj[target] || {};
5751
+ if (!(target in obj)) obj[target] = dict;
5752
+ if (!(id in dict)) dict[id] = value;
5753
+ delete obj[key];
5754
+ }
5755
+ }
5733
5756
  const parseResult = PurposeFileSchema.safeParse(data);
5734
5757
  if (!parseResult.success) {
5735
5758
  for (const issue of parseResult.error.issues) {
@@ -6461,7 +6484,9 @@ async function aggregateFromPremise(premiseFile, rootDir) {
6461
6484
  data: item,
6462
6485
  description: item.description,
6463
6486
  anchors: item.anchors?.map((a) => parseAnchorString(a)),
6464
- appliesTo: item["applies-to"]
6487
+ appliesTo: item["applies-to"],
6488
+ tags: item.tags,
6489
+ enforcement: item.enforcement
6465
6490
  }));
6466
6491
  }
6467
6492
  const symbolRefs = extractSymbolReferences(parsed);