@a-company/paradigm 5.8.1 → 5.9.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/{agent-loader-DBF4OARL.js → agent-loader-X7TDYLFL.js} +9 -1
- package/dist/{chunk-T3YGSZCI.js → chunk-3UCH56D5.js} +1 -1
- package/dist/{chunk-ITPJJIHG.js → chunk-MA7G4CTI.js} +36 -1
- package/dist/chunk-NQKQG45G.js +688 -0
- package/dist/{chunk-B2RC3HEB.js → chunk-V7BZBBI6.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp.js +204 -667
- package/dist/{nomination-engine-LPLCCDW2.js → nomination-engine-LLREC5BZ.js} +2 -2
- package/dist/{reindex-KFUPB3ES.js → reindex-U2HEB6GW.js} +1 -1
- package/dist/{shift-2NYRFVEZ.js → shift-VJUGMADR.js} +260 -64
- package/dist/symphony-loader-UZGON56V.js +90 -0
- package/package.json +1 -1
|
@@ -6,16 +6,20 @@ import {
|
|
|
6
6
|
computeIntegrityHash,
|
|
7
7
|
createAgentProfile,
|
|
8
8
|
init_agent_loader,
|
|
9
|
+
isAgentActive,
|
|
10
|
+
listAllGlobalAgentIds,
|
|
9
11
|
loadAgentProfile,
|
|
10
12
|
loadAllAgentProfiles,
|
|
13
|
+
loadProjectRoster,
|
|
11
14
|
mergeAgentProfileWithManifest,
|
|
12
15
|
queryExpertise,
|
|
13
16
|
saveAgentProfile,
|
|
17
|
+
saveProjectRoster,
|
|
14
18
|
syncExpertiseFromLore,
|
|
15
19
|
updateExpertiseFromAssessment,
|
|
16
20
|
updateExpertiseFromLore,
|
|
17
21
|
verifyIntegrity
|
|
18
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MA7G4CTI.js";
|
|
19
23
|
import "./chunk-7N7GSU6K.js";
|
|
20
24
|
init_agent_loader();
|
|
21
25
|
export {
|
|
@@ -24,11 +28,15 @@ export {
|
|
|
24
28
|
checkToolPermission,
|
|
25
29
|
computeIntegrityHash,
|
|
26
30
|
createAgentProfile,
|
|
31
|
+
isAgentActive,
|
|
32
|
+
listAllGlobalAgentIds,
|
|
27
33
|
loadAgentProfile,
|
|
28
34
|
loadAllAgentProfiles,
|
|
35
|
+
loadProjectRoster,
|
|
29
36
|
mergeAgentProfileWithManifest,
|
|
30
37
|
queryExpertise,
|
|
31
38
|
saveAgentProfile,
|
|
39
|
+
saveProjectRoster,
|
|
32
40
|
syncExpertiseFromLore,
|
|
33
41
|
updateExpertiseFromAssessment,
|
|
34
42
|
updateExpertiseFromLore,
|
|
@@ -3244,7 +3244,7 @@ async function buildRecoveryPreamble(rootDir) {
|
|
|
3244
3244
|
} catch {
|
|
3245
3245
|
}
|
|
3246
3246
|
try {
|
|
3247
|
-
const { loadNominations } = await import("./nomination-engine-
|
|
3247
|
+
const { loadNominations } = await import("./nomination-engine-LLREC5BZ.js");
|
|
3248
3248
|
const urgent = loadNominations(rootDir, { pending_only: true }).filter((n) => n.urgency === "critical" || n.urgency === "high");
|
|
3249
3249
|
if (urgent.length > 0) {
|
|
3250
3250
|
lines.push("");
|
|
@@ -41,6 +41,36 @@ import * as path from "path";
|
|
|
41
41
|
import * as os from "os";
|
|
42
42
|
import * as crypto from "crypto";
|
|
43
43
|
import * as yaml from "js-yaml";
|
|
44
|
+
function loadProjectRoster(rootDir) {
|
|
45
|
+
const rosterPath = path.join(rootDir, ROSTER_FILE);
|
|
46
|
+
if (!fs.existsSync(rosterPath)) return null;
|
|
47
|
+
try {
|
|
48
|
+
const data = yaml.load(fs.readFileSync(rosterPath, "utf8"));
|
|
49
|
+
return data?.active ?? null;
|
|
50
|
+
} catch {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function isAgentActive(agentId, rootDir) {
|
|
55
|
+
const roster = loadProjectRoster(rootDir);
|
|
56
|
+
if (!roster) return true;
|
|
57
|
+
return roster.includes(agentId);
|
|
58
|
+
}
|
|
59
|
+
function saveProjectRoster(rootDir, active) {
|
|
60
|
+
const rosterPath = path.join(rootDir, ROSTER_FILE);
|
|
61
|
+
const dir = path.dirname(rosterPath);
|
|
62
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
63
|
+
const data = { version: "1.0", active: active.sort() };
|
|
64
|
+
fs.writeFileSync(rosterPath, yaml.dump(data, { lineWidth: -1, noRefs: true }), "utf8");
|
|
65
|
+
}
|
|
66
|
+
function listAllGlobalAgentIds() {
|
|
67
|
+
if (!fs.existsSync(GLOBAL_AGENTS_DIR)) return [];
|
|
68
|
+
try {
|
|
69
|
+
return fs.readdirSync(GLOBAL_AGENTS_DIR).filter((f) => f.endsWith(AGENT_EXT)).map((f) => f.replace(AGENT_EXT, ""));
|
|
70
|
+
} catch {
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
44
74
|
function loadAgentProfile(rootDir, agentId) {
|
|
45
75
|
const projectPath = path.join(rootDir, PROJECT_AGENTS_DIR, `${agentId}${AGENT_EXT}`);
|
|
46
76
|
if (fs.existsSync(projectPath)) {
|
|
@@ -499,18 +529,23 @@ function detectProjectName(rootDir) {
|
|
|
499
529
|
}
|
|
500
530
|
return path.basename(rootDir);
|
|
501
531
|
}
|
|
502
|
-
var GLOBAL_AGENTS_DIR, PROJECT_AGENTS_DIR, AGENT_EXT, EMA_ALPHA;
|
|
532
|
+
var GLOBAL_AGENTS_DIR, PROJECT_AGENTS_DIR, AGENT_EXT, ROSTER_FILE, EMA_ALPHA;
|
|
503
533
|
var init_agent_loader = __esm({
|
|
504
534
|
"../paradigm-mcp/src/utils/agent-loader.ts"() {
|
|
505
535
|
init_agents();
|
|
506
536
|
GLOBAL_AGENTS_DIR = path.join(os.homedir(), ".paradigm", "agents");
|
|
507
537
|
PROJECT_AGENTS_DIR = ".paradigm/agents";
|
|
508
538
|
AGENT_EXT = ".agent";
|
|
539
|
+
ROSTER_FILE = ".paradigm/roster.yaml";
|
|
509
540
|
EMA_ALPHA = 0.3;
|
|
510
541
|
}
|
|
511
542
|
});
|
|
512
543
|
|
|
513
544
|
export {
|
|
545
|
+
loadProjectRoster,
|
|
546
|
+
isAgentActive,
|
|
547
|
+
saveProjectRoster,
|
|
548
|
+
listAllGlobalAgentIds,
|
|
514
549
|
loadAgentProfile,
|
|
515
550
|
loadAllAgentProfiles,
|
|
516
551
|
saveAgentProfile,
|