@a-company/paradigm 5.3.3 → 5.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.
@@ -318,6 +318,139 @@ async function agentSyncCommand(id, options = {}) {
318
318
  }
319
319
  tracker.success(`Synced ${symbolsUpdated.size} symbols from ${entriesProcessed} entries`);
320
320
  }
321
+ async function agentRosterCommand(options = {}) {
322
+ const cwd = process.cwd();
323
+ const tracker = log.command("agent-roster").start("Agent roster", { cwd });
324
+ const profiles = [];
325
+ if (fs.existsSync(GLOBAL_AGENTS_DIR)) {
326
+ for (const file of fs.readdirSync(GLOBAL_AGENTS_DIR).filter((f) => f.endsWith(AGENT_EXT))) {
327
+ try {
328
+ const p = yaml.load(fs.readFileSync(path.join(GLOBAL_AGENTS_DIR, file), "utf-8"));
329
+ if (p?.id) profiles.push(p);
330
+ } catch {
331
+ }
332
+ }
333
+ }
334
+ const projectDir = path.join(cwd, PROJECT_AGENTS_DIR);
335
+ if (fs.existsSync(projectDir)) {
336
+ for (const file of fs.readdirSync(projectDir).filter((f) => f.endsWith(AGENT_EXT))) {
337
+ try {
338
+ const p = yaml.load(fs.readFileSync(path.join(projectDir, file), "utf-8"));
339
+ if (p?.id) {
340
+ const idx = profiles.findIndex((e) => e.id === p.id);
341
+ if (idx >= 0) profiles[idx] = p;
342
+ else profiles.push(p);
343
+ }
344
+ } catch {
345
+ }
346
+ }
347
+ }
348
+ const active = profiles.filter((p) => !p.benched);
349
+ const benched = profiles.filter((p) => p.benched);
350
+ if (options.json) {
351
+ console.log(JSON.stringify({
352
+ active: active.map(rosterSummarize),
353
+ benched: benched.map(rosterSummarize)
354
+ }, null, 2));
355
+ tracker.success(`${active.length} active, ${benched.length} benched`);
356
+ return;
357
+ }
358
+ console.log(chalk.blue("\n\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"));
359
+ console.log(chalk.blue("\u2502") + chalk.white.bold(" Agent Roster ") + chalk.blue("\u2502"));
360
+ console.log(chalk.blue("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"));
361
+ if (active.length > 0) {
362
+ console.log(chalk.green.bold(" Active"));
363
+ for (const p of active) {
364
+ printRosterRow(p);
365
+ }
366
+ }
367
+ if (benched.length > 0) {
368
+ console.log(chalk.gray.bold("\n Benched"));
369
+ for (const p of benched) {
370
+ printRosterRow(p, true);
371
+ }
372
+ }
373
+ if (profiles.length === 0) {
374
+ console.log(chalk.yellow(" No agents found.\n"));
375
+ } else {
376
+ console.log("");
377
+ }
378
+ tracker.success(`${active.length} active, ${benched.length} benched`);
379
+ }
380
+ function printRosterRow(p, dimmed = false) {
381
+ const expertise = (p.expertise || []).sort((a, b) => b.confidence - a.confidence);
382
+ const topSymbol = expertise[0] ? `${expertise[0].symbol} (${(expertise[0].confidence * 100).toFixed(0)}%)` : chalk.gray("\u2014");
383
+ const color = dimmed ? chalk.gray : chalk.white;
384
+ const nickname = p.nickname ? ` (${p.nickname})` : "";
385
+ const threshold = p.attention?.threshold;
386
+ const thresholdStr = threshold != null ? ` | thr: ${threshold.toFixed(2)}` : "";
387
+ console.log(` ${color.bold(p.id)}${chalk.gray(nickname)} \u2014 ${chalk.gray(p.role)}`);
388
+ console.log(` Top: ${topSymbol} | ${expertise.length} symbols${thresholdStr}`);
389
+ }
390
+ function rosterSummarize(p) {
391
+ const expertise = (p.expertise || []).sort((a, b) => b.confidence - a.confidence);
392
+ return {
393
+ id: p.id,
394
+ role: p.role,
395
+ nickname: p.nickname,
396
+ benched: p.benched || false,
397
+ expertiseCount: expertise.length,
398
+ topExpertise: expertise.slice(0, 3).map((e) => ({
399
+ symbol: e.symbol,
400
+ confidence: parseFloat(e.confidence.toFixed(2))
401
+ })),
402
+ threshold: p.attention?.threshold
403
+ };
404
+ }
405
+ async function agentBenchCommand(id) {
406
+ const cwd = process.cwd();
407
+ const tracker = log.command("agent-bench").start(`Benching agent ${id}`, { cwd });
408
+ const profile = loadProfile(cwd, id);
409
+ if (!profile) {
410
+ console.log(chalk.red(`
411
+ Agent "${id}" not found.
412
+ `));
413
+ tracker.error("Not found");
414
+ return;
415
+ }
416
+ profile.benched = true;
417
+ profile.updated = (/* @__PURE__ */ new Date()).toISOString();
418
+ saveProfile(cwd, id, profile);
419
+ console.log(chalk.yellow(`
420
+ \u23F8 Agent "${id}" is now benched.`));
421
+ console.log(chalk.gray(" Maestro will skip this agent during orchestration.\n"));
422
+ tracker.success(`Benched ${id}`);
423
+ }
424
+ async function agentActivateCommand(id) {
425
+ const cwd = process.cwd();
426
+ const tracker = log.command("agent-activate").start(`Activating agent ${id}`, { cwd });
427
+ const profile = loadProfile(cwd, id);
428
+ if (!profile) {
429
+ console.log(chalk.red(`
430
+ Agent "${id}" not found.
431
+ `));
432
+ tracker.error("Not found");
433
+ return;
434
+ }
435
+ profile.benched = false;
436
+ profile.updated = (/* @__PURE__ */ new Date()).toISOString();
437
+ saveProfile(cwd, id, profile);
438
+ console.log(chalk.green(`
439
+ \u25B6 Agent "${id}" is now active.`));
440
+ console.log(chalk.gray(" Maestro will include this agent in orchestration.\n"));
441
+ tracker.success(`Activated ${id}`);
442
+ }
443
+ function saveProfile(rootDir, id, profile) {
444
+ const projectPath = path.join(rootDir, PROJECT_AGENTS_DIR, `${id}${AGENT_EXT}`);
445
+ if (fs.existsSync(projectPath)) {
446
+ fs.writeFileSync(projectPath, yaml.dump(profile, { lineWidth: 120, noRefs: true, sortKeys: false }), "utf-8");
447
+ return;
448
+ }
449
+ const globalPath = path.join(GLOBAL_AGENTS_DIR, `${id}${AGENT_EXT}`);
450
+ const dir = GLOBAL_AGENTS_DIR;
451
+ if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
452
+ fs.writeFileSync(globalPath, yaml.dump(profile, { lineWidth: 120, noRefs: true, sortKeys: false }), "utf-8");
453
+ }
321
454
  function loadProfile(rootDir, id) {
322
455
  const projectPath = path.join(rootDir, PROJECT_AGENTS_DIR, `${id}${AGENT_EXT}`);
323
456
  if (fs.existsSync(projectPath)) {
@@ -380,8 +513,11 @@ function scanLoreDir(lorePath) {
380
513
  return entries;
381
514
  }
382
515
  export {
516
+ agentActivateCommand,
517
+ agentBenchCommand,
383
518
  agentCreateCommand,
384
519
  agentListCommand,
520
+ agentRosterCommand,
385
521
  agentShowCommand,
386
522
  agentSyncCommand
387
523
  };
@@ -15,7 +15,7 @@ import {
15
15
  updateExpertiseFromAssessment,
16
16
  updateExpertiseFromLore,
17
17
  verifyIntegrity
18
- } from "./chunk-A2L4TSLZ.js";
18
+ } from "./chunk-ITPJJIHG.js";
19
19
  import "./chunk-7N7GSU6K.js";
20
20
  init_agent_loader();
21
21
  export {
@@ -4,7 +4,7 @@ import {
4
4
  loadAgentProfile,
5
5
  loadAllAgentProfiles,
6
6
  saveAgentProfile
7
- } from "./chunk-A2L4TSLZ.js";
7
+ } from "./chunk-ITPJJIHG.js";
8
8
  import {
9
9
  init_journal_loader,
10
10
  journal_loader_exports
@@ -493,6 +493,7 @@ function processEvent(rootDir, event) {
493
493
  const scores = [];
494
494
  for (const profile of profiles) {
495
495
  if (!profile.attention) continue;
496
+ if (profile.benched) continue;
496
497
  if (event.path && !canObservePath(policy, event.path, profile.id)) {
497
498
  continue;
498
499
  }
@@ -685,7 +686,7 @@ function loadDebates(rootDir) {
685
686
  return [];
686
687
  }
687
688
  }
688
- function engageNomination(rootDir, nominationId, response) {
689
+ function engageNomination(rootDir, nominationId, response, reason) {
689
690
  const filePath = getNominationsPath(rootDir);
690
691
  if (!fs4.existsSync(filePath)) return false;
691
692
  try {
@@ -698,6 +699,7 @@ function engageNomination(rootDir, nominationId, response) {
698
699
  if (nom.id === nominationId) {
699
700
  nom.engaged = true;
700
701
  nom.response = response;
702
+ if (reason) nom.reason = reason;
701
703
  found = true;
702
704
  return JSON.stringify(nom);
703
705
  }
@@ -846,8 +848,12 @@ function adjustAttentionFromFeedback(rootDir, agentId) {
846
848
  return { adjusted: false, oldThreshold: 0.6, newThreshold: 0.6, reason: "No attention config" };
847
849
  }
848
850
  const oldThreshold = profile.attention.threshold ?? 0.6;
849
- const nominations = loadNominations(rootDir, { agent: agentId });
850
- const engaged = nominations.filter((n) => n.engaged);
851
+ const STALE_THRESHOLD_MS = 7 * 24 * 60 * 60 * 1e3;
852
+ const allNominations = loadNominations(rootDir, { agent: agentId });
853
+ const active = allNominations.filter(
854
+ (n) => n.engaged || Date.now() - new Date(n.timestamp).getTime() < STALE_THRESHOLD_MS
855
+ );
856
+ const engaged = active.filter((n) => n.engaged);
851
857
  if (engaged.length < 5) {
852
858
  return { adjusted: false, oldThreshold, newThreshold: oldThreshold, reason: `Insufficient data (${engaged.length}/5 engaged nominations)` };
853
859
  }
@@ -881,7 +887,11 @@ function adjustAttentionFromFeedback(rootDir, agentId) {
881
887
  return { adjusted: true, oldThreshold, newThreshold, reason };
882
888
  }
883
889
  function getNominationStats(rootDir, agentId) {
884
- const nominations = loadNominations(rootDir, { agent: agentId });
890
+ const STALE_THRESHOLD_MS = 7 * 24 * 60 * 60 * 1e3;
891
+ const allNominations = loadNominations(rootDir, { agent: agentId });
892
+ const nominations = allNominations.filter(
893
+ (n) => n.engaged || Date.now() - new Date(n.timestamp).getTime() < STALE_THRESHOLD_MS
894
+ );
885
895
  const accepted = nominations.filter((n) => n.response === "accepted").length;
886
896
  const dismissed = nominations.filter((n) => n.response === "dismissed").length;
887
897
  const deferred = nominations.filter((n) => n.response === "deferred").length;
@@ -896,6 +906,57 @@ function getNominationStats(rootDir, agentId) {
896
906
  acceptRate: engaged > 0 ? accepted / engaged : 0
897
907
  };
898
908
  }
909
+ function getNeverlandMetrics(rootDir) {
910
+ const profiles = loadAllAgentProfiles(rootDir);
911
+ const agentMetrics = profiles.filter((p) => !p.benched).map((p) => {
912
+ const stats = getNominationStats(rootDir, p.id);
913
+ let notebookCount = 0;
914
+ try {
915
+ const nbDir = path4.join(os2.homedir(), ".paradigm", "notebooks", p.id);
916
+ if (fs4.existsSync(nbDir)) {
917
+ notebookCount = fs4.readdirSync(nbDir).filter((f) => f.endsWith(".yaml")).length;
918
+ }
919
+ } catch {
920
+ }
921
+ return {
922
+ id: p.id,
923
+ acceptRate: stats.acceptRate,
924
+ threshold: p.attention?.threshold ?? 0.5,
925
+ expertiseCount: (p.expertise || []).length,
926
+ notebookCount,
927
+ transferableCount: (p.transferable || []).length,
928
+ totalNominations: stats.total
929
+ };
930
+ });
931
+ const count = agentMetrics.length || 1;
932
+ const avgAcceptRate = agentMetrics.reduce((s, a) => s + a.acceptRate, 0) / count;
933
+ const avgThreshold = agentMetrics.reduce((s, a) => s + a.threshold, 0) / count;
934
+ const totalExpertise = agentMetrics.reduce((s, a) => s + a.expertiseCount, 0);
935
+ const totalNotebooks = agentMetrics.reduce((s, a) => s + a.notebookCount, 0);
936
+ const totalTransferable = agentMetrics.reduce((s, a) => s + a.transferableCount, 0);
937
+ const totalNominations = agentMetrics.reduce((s, a) => s + a.totalNominations, 0);
938
+ let healthStatus;
939
+ if (totalNominations < 10) {
940
+ healthStatus = "cold-start";
941
+ } else if (avgAcceptRate < 0.5) {
942
+ healthStatus = "accumulating";
943
+ } else if (avgAcceptRate < 0.7) {
944
+ healthStatus = "calibrating";
945
+ } else {
946
+ healthStatus = "mature";
947
+ }
948
+ return {
949
+ agents: agentMetrics,
950
+ aggregate: {
951
+ avgAcceptRate,
952
+ avgThreshold,
953
+ totalExpertise,
954
+ totalNotebooks,
955
+ totalTransferable
956
+ },
957
+ healthStatus
958
+ };
959
+ }
899
960
  function forwardNominationsToRelay(rootDir, nominations) {
900
961
  if (nominations.length === 0) return;
901
962
  const outboxDir = path4.join(os2.homedir(), ".paradigm", "score", "outbox");
@@ -935,10 +996,9 @@ function autoPromoteJournalEntries(rootDir, agentId) {
935
996
  } catch {
936
997
  return { promoted: 0, entries: [] };
937
998
  }
938
- const journal = loadJournalEntries(agentId, {
939
- trigger: "pattern_discovered",
940
- limit: 100
941
- });
999
+ const patternEntries = loadJournalEntries(agentId, { trigger: "pattern_discovered", limit: 100 });
1000
+ const feedbackEntries = loadJournalEntries(agentId, { trigger: "human_feedback", limit: 100 });
1001
+ const journal = [...patternEntries, ...feedbackEntries];
942
1002
  const promoted = [];
943
1003
  for (const entry of journal) {
944
1004
  if (entry.promoted_to_notebook) continue;
@@ -1067,6 +1127,7 @@ export {
1067
1127
  emitAndProcess,
1068
1128
  adjustAttentionFromFeedback,
1069
1129
  getNominationStats,
1130
+ getNeverlandMetrics,
1070
1131
  forwardNominationsToRelay,
1071
1132
  autoPromoteJournalEntries,
1072
1133
  loadSurfacingConfig,
@@ -13,21 +13,24 @@ var init_agents = __esm({
13
13
  builder: { style: "rapid", risk: "balanced", verbosity: "concise" },
14
14
  tester: { style: "methodical", risk: "conservative", verbosity: "concise" },
15
15
  reviewer: { style: "deliberate", risk: "conservative", verbosity: "detailed" },
16
- security: { style: "methodical", risk: "conservative", verbosity: "detailed" }
16
+ security: { style: "methodical", risk: "conservative", verbosity: "detailed" },
17
+ documentor: { style: "methodical", risk: "conservative", verbosity: "concise" }
17
18
  };
18
19
  DEFAULT_ATTENTION = {
19
20
  architect: { symbols: ["$*", "#*"], concepts: ["architecture", "design", "pattern", "refactor"], signals: [{ type: "flow-modified" }, { type: "compliance-violation" }], threshold: 0.5 },
20
21
  builder: { paths: ["src/**", "lib/**", "packages/**"], signals: [{ type: "file-modified" }, { type: "error-encountered" }], threshold: 0.7 },
21
22
  reviewer: { concepts: ["code quality", "bug", "smell", "convention"], signals: [{ type: "compliance-violation" }], threshold: 0.6 },
22
23
  tester: { paths: ["**/*.test.*", "**/*.spec.*"], concepts: ["test", "coverage", "assertion"], signals: [{ type: "error-encountered" }, { type: "test-result" }], threshold: 0.5 },
23
- security: { symbols: ["^*", "#*-auth", "#*-middleware"], paths: ["auth/**", "middleware/**", "guards/**"], concepts: ["permission", "JWT", "session", "RBAC", "XSS", "injection"], signals: [{ type: "gate-added" }, { type: "route-created" }, { type: "gate-checked" }, { type: "compliance-violation" }], threshold: 0.4 }
24
+ security: { symbols: ["^*", "#*-auth", "#*-middleware"], paths: ["auth/**", "middleware/**", "guards/**"], concepts: ["permission", "JWT", "session", "RBAC", "XSS", "injection"], signals: [{ type: "gate-added" }, { type: "route-created" }, { type: "gate-checked" }, { type: "compliance-violation" }], threshold: 0.4 },
25
+ documentor: { paths: ["**/.purpose", "**/portal.yaml", ".paradigm/**"], concepts: ["purpose", "portal", "symbol", "documentation", "component", "gate", "flow"], signals: [{ type: "file-modified" }, { type: "compliance-violation" }, { type: "work-completed" }], threshold: 0.3 }
24
26
  };
25
27
  DEFAULT_COLLABORATION = {
26
28
  architect: { stance: "lead", debate: { will_challenge: true, evidence_required: true, escalate_to_human: true } },
27
29
  builder: { stance: "supportive", with: { architect: { stance: "supportive", can_contradict: false } } },
28
30
  reviewer: { stance: "advisory", debate: { will_challenge: true, evidence_required: true, escalate_to_human: true } },
29
31
  tester: { stance: "supportive", debate: { will_challenge: false, evidence_required: true, escalate_to_human: false } },
30
- security: { stance: "advisory", with: { architect: { stance: "peer", can_contradict: true }, builder: { stance: "advisory", review_output: true } }, debate: { will_challenge: true, evidence_required: true, escalate_to_human: true } }
32
+ security: { stance: "advisory", with: { architect: { stance: "peer", can_contradict: true }, builder: { stance: "advisory", review_output: true } }, debate: { will_challenge: true, evidence_required: true, escalate_to_human: true } },
33
+ documentor: { stance: "supportive", with: { architect: { stance: "supportive" }, builder: { stance: "supportive" }, reviewer: { stance: "supportive" }, security: { stance: "supportive" } }, debate: { will_challenge: false, evidence_required: false, escalate_to_human: false } }
31
34
  };
32
35
  }
33
36
  });
@@ -0,0 +1,106 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ __esm,
4
+ __export
5
+ } from "./chunk-7N7GSU6K.js";
6
+
7
+ // ../paradigm-mcp/src/utils/session-work-log.ts
8
+ var session_work_log_exports = {};
9
+ __export(session_work_log_exports, {
10
+ appendSessionWorkEntry: () => appendSessionWorkEntry,
11
+ clearSessionWorkLog: () => clearSessionWorkLog,
12
+ getAgentEntries: () => getAgentEntries,
13
+ getAgentVerdicts: () => getAgentVerdicts,
14
+ getContributingAgents: () => getContributingAgents,
15
+ readSessionWorkLog: () => readSessionWorkLog
16
+ });
17
+ import * as fs from "fs";
18
+ import * as path from "path";
19
+ function appendSessionWorkEntry(rootDir, entry) {
20
+ try {
21
+ const filePath = path.join(rootDir, SESSION_LOG_FILE);
22
+ const dir = path.dirname(filePath);
23
+ if (!fs.existsSync(dir)) {
24
+ fs.mkdirSync(dir, { recursive: true });
25
+ }
26
+ if (fs.existsSync(filePath)) {
27
+ const content = fs.readFileSync(filePath, "utf8");
28
+ const lineCount = content.trim().split("\n").filter((l) => l.trim()).length;
29
+ if (lineCount >= MAX_ENTRIES) return;
30
+ }
31
+ const line = JSON.stringify(entry) + "\n";
32
+ fs.appendFileSync(filePath, line, "utf8");
33
+ } catch {
34
+ }
35
+ }
36
+ function readSessionWorkLog(rootDir) {
37
+ try {
38
+ const filePath = path.join(rootDir, SESSION_LOG_FILE);
39
+ if (!fs.existsSync(filePath)) return [];
40
+ return fs.readFileSync(filePath, "utf8").trim().split("\n").filter((line) => line.trim()).map((line) => {
41
+ try {
42
+ return JSON.parse(line);
43
+ } catch {
44
+ return null;
45
+ }
46
+ }).filter((e) => e !== null);
47
+ } catch {
48
+ return [];
49
+ }
50
+ }
51
+ function clearSessionWorkLog(rootDir) {
52
+ try {
53
+ const filePath = path.join(rootDir, SESSION_LOG_FILE);
54
+ if (fs.existsSync(filePath)) {
55
+ fs.writeFileSync(filePath, "", "utf8");
56
+ }
57
+ } catch {
58
+ }
59
+ }
60
+ function getContributingAgents(rootDir) {
61
+ const entries = readSessionWorkLog(rootDir);
62
+ const agents = /* @__PURE__ */ new Set();
63
+ for (const entry of entries) {
64
+ if (entry.agent) agents.add(entry.agent);
65
+ }
66
+ return Array.from(agents);
67
+ }
68
+ function getAgentEntries(rootDir, agentId) {
69
+ return readSessionWorkLog(rootDir).filter((e) => e.agent === agentId);
70
+ }
71
+ function getAgentVerdicts(rootDir, agentId) {
72
+ const entries = getAgentEntries(rootDir, agentId);
73
+ const contributions = entries.filter((e) => e.type === "agent-contribution");
74
+ const verdicts = entries.filter((e) => e.type === "user-verdict");
75
+ const pairs = [];
76
+ for (const contrib of contributions) {
77
+ pairs.push({ contribution: contrib });
78
+ }
79
+ for (const verdict of verdicts) {
80
+ const unpaired = pairs.find((p) => !p.verdict && p.contribution);
81
+ if (unpaired) {
82
+ unpaired.verdict = verdict;
83
+ } else {
84
+ pairs.push({ verdict });
85
+ }
86
+ }
87
+ return pairs;
88
+ }
89
+ var SESSION_LOG_FILE, MAX_ENTRIES;
90
+ var init_session_work_log = __esm({
91
+ "../paradigm-mcp/src/utils/session-work-log.ts"() {
92
+ SESSION_LOG_FILE = ".paradigm/events/session-log.jsonl";
93
+ MAX_ENTRIES = 200;
94
+ }
95
+ });
96
+
97
+ export {
98
+ appendSessionWorkEntry,
99
+ readSessionWorkLog,
100
+ clearSessionWorkLog,
101
+ getContributingAgents,
102
+ getAgentEntries,
103
+ getAgentVerdicts,
104
+ session_work_log_exports,
105
+ init_session_work_log
106
+ };
@@ -1,14 +1,18 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- init_lore_loader,
4
- loadLoreEntries,
5
- loadLoreEntry
6
- } from "./chunk-5VKJBNJL.js";
7
2
  import {
8
3
  checkComponentAnchors,
9
4
  checkIntegrity,
10
5
  checkPurposeHealth
11
6
  } from "./chunk-L27I3CPZ.js";
7
+ import {
8
+ init_session_work_log,
9
+ session_work_log_exports
10
+ } from "./chunk-SDDCVUCV.js";
11
+ import {
12
+ init_lore_loader,
13
+ loadLoreEntries,
14
+ loadLoreEntry
15
+ } from "./chunk-5VKJBNJL.js";
12
16
  import {
13
17
  __esm,
14
18
  __export,
@@ -2113,6 +2117,11 @@ var SessionTracker = class {
2113
2117
  */
2114
2118
  setRootDir(rootDir) {
2115
2119
  this.rootDir = rootDir;
2120
+ try {
2121
+ const { clearSessionWorkLog } = (init_session_work_log(), __toCommonJS(session_work_log_exports));
2122
+ clearSessionWorkLog(rootDir);
2123
+ } catch {
2124
+ }
2116
2125
  }
2117
2126
  createNewSession() {
2118
2127
  return {
@@ -3223,7 +3232,7 @@ async function buildRecoveryPreamble(rootDir) {
3223
3232
  } catch {
3224
3233
  }
3225
3234
  try {
3226
- const { loadNominations } = await import("./nomination-engine-Q4XSXFKT.js");
3235
+ const { loadNominations } = await import("./nomination-engine-LPLCCDW2.js");
3227
3236
  const urgent = loadNominations(rootDir, { pending_only: true }).filter((n) => n.urgency === "critical" || n.urgency === "high");
3228
3237
  if (urgent.length > 0) {
3229
3238
  lines.push("");
@@ -17,7 +17,7 @@ async function docsServeCommand(options) {
17
17
  const shouldOpen = options.open !== false;
18
18
  console.log(chalk.cyan("\n Starting Paradigm Docs...\n"));
19
19
  try {
20
- const { startPlatformServer } = await import("./platform-server-PMD57BEG.js");
20
+ const { startPlatformServer } = await import("./platform-server-2D6S6YTK.js");
21
21
  await startPlatformServer({
22
22
  projectDir,
23
23
  port,
package/dist/index.js CHANGED
@@ -719,7 +719,7 @@ loreCmd.option("-p, --port <port>", "Port to run on", "3840").option("--no-open"
719
719
  await loreServeCommand(void 0, options);
720
720
  });
721
721
  program.command("serve").description("Launch Paradigm Platform \u2014 unified development management UI").option("-p, --port <port>", "Port to run on", "3850").option("--no-open", "Don't open browser automatically").option("--sections <list>", "Comma-separated sections to enable (e.g., lore,graph,git)").action(async (options) => {
722
- const { serveCommand } = await import("./serve-FLTFTM3P.js");
722
+ const { serveCommand } = await import("./serve-EFVRS4GA.js");
723
723
  await serveCommand(options);
724
724
  });
725
725
  var graphCmd = program.command("graph").description("Interactive symbol relationship graph").argument("[path]", "Project directory", void 0).option("-p, --port <port>", "Port to run on", "3841").option("--no-open", "Don't open browser automatically").action(async (path2, options) => {
@@ -857,15 +857,15 @@ universityCmd.option("-p, --port <port>", "Port to run on", "3839").option("--no
857
857
  });
858
858
  var docsCmd = program.command("docs").description("Auto-generated documentation from the symbol graph");
859
859
  docsCmd.command("serve").description("Launch interactive docs viewer in browser").option("-p, --port <port>", "Port number (default: 3850)").option("--no-open", "Do not open browser automatically").action(async (options) => {
860
- const { docsServeCommand } = await import("./docs-LVLRPBAW.js");
860
+ const { docsServeCommand } = await import("./docs-J2BTKRVU.js");
861
861
  await docsServeCommand(options);
862
862
  });
863
863
  docsCmd.command("build").description("Build static documentation site").option("-o, --output <dir>", "Output directory (default: from config or .paradigm/docs-site)").action(async (options) => {
864
- const { docsBuildCommand } = await import("./docs-LVLRPBAW.js");
864
+ const { docsBuildCommand } = await import("./docs-J2BTKRVU.js");
865
865
  await docsBuildCommand(options);
866
866
  });
867
867
  docsCmd.action(async () => {
868
- const { docsServeCommand } = await import("./docs-LVLRPBAW.js");
868
+ const { docsServeCommand } = await import("./docs-J2BTKRVU.js");
869
869
  await docsServeCommand({});
870
870
  });
871
871
  var pipelineCmd = program.command("pipeline").description("Spec pipeline \u2014 structured feature workflow with configurable gates");
@@ -1006,23 +1006,35 @@ notebookCmd.action(async () => {
1006
1006
  });
1007
1007
  var agentCmd = program.command("agent").description("Agent identity management \u2014 persistent profiles with expertise tracking");
1008
1008
  agentCmd.command("list").alias("ls").description("List all agent identity profiles").option("--json", "Output as JSON").option("--global", "Show only global profiles").option("--project", "Show only project-level profiles").action(async (options) => {
1009
- const { agentListCommand } = await import("./agent-HYKC2LAK.js");
1009
+ const { agentListCommand } = await import("./agent-WERIO2XV.js");
1010
1010
  await agentListCommand(options);
1011
1011
  });
1012
1012
  agentCmd.command("show <id>").description("Show full agent profile with expertise table").option("--json", "Output as JSON").action(async (id, options) => {
1013
- const { agentShowCommand } = await import("./agent-HYKC2LAK.js");
1013
+ const { agentShowCommand } = await import("./agent-WERIO2XV.js");
1014
1014
  await agentShowCommand(id, options);
1015
1015
  });
1016
1016
  agentCmd.command("create <id>").description("Create a new .agent identity file").option("-r, --role <role>", "Agent role description").option("-d, --description <desc>", "Extended description").option("-g, --global", "Create in global ~/.paradigm/agents/ (default)").option("--deny-paths <patterns>", 'Comma-separated glob patterns to deny (e.g., ".env*,*.key")').action(async (id, options) => {
1017
- const { agentCreateCommand } = await import("./agent-HYKC2LAK.js");
1017
+ const { agentCreateCommand } = await import("./agent-WERIO2XV.js");
1018
1018
  await agentCreateCommand(id, { ...options, global: options.global !== false });
1019
1019
  });
1020
1020
  agentCmd.command("sync <id>").description("Bootstrap expertise from existing project lore").option("-n, --dry-run", "Show what would change without writing").option("--json", "Output as JSON").action(async (id, options) => {
1021
- const { agentSyncCommand } = await import("./agent-HYKC2LAK.js");
1021
+ const { agentSyncCommand } = await import("./agent-WERIO2XV.js");
1022
1022
  await agentSyncCommand(id, options);
1023
1023
  });
1024
+ agentCmd.command("roster").description("Show agent roster with active/benched status").option("--json", "Output as JSON").action(async (options) => {
1025
+ const { agentRosterCommand } = await import("./agent-WERIO2XV.js");
1026
+ await agentRosterCommand(options);
1027
+ });
1028
+ agentCmd.command("bench <id>").description("Bench an agent \u2014 Maestro will skip it during orchestration").action(async (id) => {
1029
+ const { agentBenchCommand } = await import("./agent-WERIO2XV.js");
1030
+ await agentBenchCommand(id);
1031
+ });
1032
+ agentCmd.command("activate <id>").description("Activate a benched agent \u2014 restore to Maestro orchestration").action(async (id) => {
1033
+ const { agentActivateCommand } = await import("./agent-WERIO2XV.js");
1034
+ await agentActivateCommand(id);
1035
+ });
1024
1036
  agentCmd.action(async () => {
1025
- const { agentListCommand } = await import("./agent-HYKC2LAK.js");
1037
+ const { agentListCommand } = await import("./agent-WERIO2XV.js");
1026
1038
  await agentListCommand({});
1027
1039
  });
1028
1040
  program.parse();