agent-enderun 1.11.2 → 1.11.4

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 (126) hide show
  1. package/README.md +5 -5
  2. package/bin/validate-agent-army.js +0 -1
  3. package/dist/framework-mcp/src/index.js +11 -1
  4. package/dist/framework-mcp/src/index.js.map +1 -1
  5. package/dist/framework-mcp/src/tools/definitions.js +0 -10
  6. package/dist/framework-mcp/src/tools/definitions.js.map +1 -1
  7. package/dist/framework-mcp/src/tools/index.js +0 -2
  8. package/dist/framework-mcp/src/tools/index.js.map +1 -1
  9. package/dist/framework-mcp/src/utils/compliance.d.ts +1 -1
  10. package/dist/framework-mcp/src/utils/compliance.js +68 -19
  11. package/dist/framework-mcp/src/utils/compliance.js.map +1 -1
  12. package/dist/src/cli/adapters/scaffold.d.ts +1 -1
  13. package/dist/src/cli/adapters/scaffold.js +8 -8
  14. package/dist/src/cli/adapters/scaffold.js.map +1 -1
  15. package/dist/src/cli/commands/check.js +25 -40
  16. package/dist/src/cli/commands/check.js.map +1 -1
  17. package/dist/src/cli/commands/contract.d.ts +3 -1
  18. package/dist/src/cli/commands/contract.js +8 -2
  19. package/dist/src/cli/commands/contract.js.map +1 -1
  20. package/dist/src/cli/commands/init/scaffold-ops.js +0 -2
  21. package/dist/src/cli/commands/init/scaffold-ops.js.map +1 -1
  22. package/dist/src/cli/commands/init.js +4 -3
  23. package/dist/src/cli/commands/init.js.map +1 -1
  24. package/dist/src/cli/commands/orchestrate.js +10 -3
  25. package/dist/src/cli/commands/orchestrate.js.map +1 -1
  26. package/dist/src/cli/commands/status.js.map +1 -1
  27. package/dist/src/cli/index.js +14 -19
  28. package/dist/src/cli/index.js.map +1 -1
  29. package/dist/src/cli/utils/compliance.d.ts +5 -1
  30. package/dist/src/cli/utils/compliance.js +90 -42
  31. package/dist/src/cli/utils/compliance.js.map +1 -1
  32. package/dist/src/cli/utils/ui.js +11 -11
  33. package/dist/src/cli/utils/ui.js.map +1 -1
  34. package/dist/src/modules/adapters/definitions.js +114 -113
  35. package/dist/src/modules/adapters/definitions.js.map +1 -1
  36. package/dist/src/modules/adapters/registry.d.ts +12 -0
  37. package/dist/src/modules/adapters/registry.js +19 -0
  38. package/dist/src/modules/adapters/registry.js.map +1 -0
  39. package/dist/src/modules/adapters/shared.js +5 -4
  40. package/dist/src/modules/adapters/shared.js.map +1 -1
  41. package/dist/src/modules/agents/definitions.d.ts +6 -6
  42. package/dist/src/modules/agents/definitions.js +49 -25
  43. package/dist/src/modules/agents/definitions.js.map +1 -1
  44. package/dist/src/modules/agents/registry/analyst.js +1 -1
  45. package/dist/src/modules/agents/registry/analyst.js.map +1 -1
  46. package/dist/src/modules/agents/registry/architect.js +1 -1
  47. package/dist/src/modules/agents/registry/architect.js.map +1 -1
  48. package/dist/src/modules/agents/registry/backend.js +1 -1
  49. package/dist/src/modules/agents/registry/backend.js.map +1 -1
  50. package/dist/src/modules/agents/registry/database.js +1 -1
  51. package/dist/src/modules/agents/registry/database.js.map +1 -1
  52. package/dist/src/modules/agents/registry/devops.js +1 -1
  53. package/dist/src/modules/agents/registry/devops.js.map +1 -1
  54. package/dist/src/modules/agents/registry/explorer.js +1 -1
  55. package/dist/src/modules/agents/registry/explorer.js.map +1 -1
  56. package/dist/src/modules/agents/registry/frontend.js +1 -1
  57. package/dist/src/modules/agents/registry/frontend.js.map +1 -1
  58. package/dist/src/modules/agents/registry/git.js +1 -1
  59. package/dist/src/modules/agents/registry/git.js.map +1 -1
  60. package/dist/src/modules/agents/registry/manager.js +1 -2
  61. package/dist/src/modules/agents/registry/manager.js.map +1 -1
  62. package/dist/src/modules/agents/registry/mobile.js +1 -1
  63. package/dist/src/modules/agents/registry/mobile.js.map +1 -1
  64. package/dist/src/modules/agents/registry/quality.js +1 -1
  65. package/dist/src/modules/agents/registry/quality.js.map +1 -1
  66. package/dist/src/modules/agents/registry/security.js +1 -1
  67. package/dist/src/modules/agents/registry/security.js.map +1 -1
  68. package/dist/src/shared/fs.js +4 -3
  69. package/dist/src/shared/fs.js.map +1 -1
  70. package/dist/tests/agents-definitions.test.js +2 -1
  71. package/dist/tests/agents-definitions.test.js.map +1 -1
  72. package/dist/tests/integration/hermes_locking.test.d.ts +1 -0
  73. package/dist/tests/integration/hermes_locking.test.js +62 -0
  74. package/dist/tests/integration/hermes_locking.test.js.map +1 -0
  75. package/dist/tests/orchestrate.test.js +9 -6
  76. package/dist/tests/orchestrate.test.js.map +1 -1
  77. package/framework-mcp/dist/index.js +11 -1
  78. package/framework-mcp/dist/tools/definitions.js +0 -10
  79. package/framework-mcp/dist/tools/index.js +0 -2
  80. package/framework-mcp/dist/utils/compliance.js +68 -19
  81. package/framework-mcp/node_modules/.package-lock.json +1179 -0
  82. package/framework-mcp/package-lock.json +1191 -0
  83. package/framework-mcp/package.json +2 -2
  84. package/framework-mcp/src/index.ts +13 -1
  85. package/framework-mcp/src/tools/definitions.ts +0 -10
  86. package/framework-mcp/src/tools/index.ts +0 -2
  87. package/framework-mcp/src/utils/compliance.ts +82 -24
  88. package/package.json +3 -4
  89. package/src/cli/adapters/scaffold.ts +9 -8
  90. package/src/cli/commands/check.ts +26 -48
  91. package/src/cli/commands/contract.ts +5 -2
  92. package/src/cli/commands/init/scaffold-ops.ts +0 -3
  93. package/src/cli/commands/init.ts +5 -3
  94. package/src/cli/commands/orchestrate.ts +12 -3
  95. package/src/cli/commands/status.ts +3 -2
  96. package/src/cli/index.ts +14 -20
  97. package/src/cli/utils/compliance.ts +101 -47
  98. package/src/cli/utils/ui.ts +11 -11
  99. package/src/modules/adapters/definitions.ts +82 -57
  100. package/src/modules/adapters/registry.ts +27 -0
  101. package/src/modules/adapters/shared.ts +5 -4
  102. package/src/modules/agents/definitions.ts +53 -24
  103. package/src/modules/agents/registry/analyst.ts +1 -1
  104. package/src/modules/agents/registry/architect.ts +1 -1
  105. package/src/modules/agents/registry/backend.ts +1 -1
  106. package/src/modules/agents/registry/database.ts +1 -1
  107. package/src/modules/agents/registry/devops.ts +1 -1
  108. package/src/modules/agents/registry/explorer.ts +1 -1
  109. package/src/modules/agents/registry/frontend.ts +1 -1
  110. package/src/modules/agents/registry/git.ts +1 -1
  111. package/src/modules/agents/registry/manager.ts +1 -2
  112. package/src/modules/agents/registry/mobile.ts +1 -1
  113. package/src/modules/agents/registry/quality.ts +1 -1
  114. package/src/modules/agents/registry/security.ts +1 -1
  115. package/src/shared/fs.ts +4 -3
  116. package/templates/standards/frontend-standards.md +7 -2
  117. package/templates/standards/governance-standards.md +27 -1
  118. package/templates/standards/logging-and-secrets.md +1 -1
  119. package/templates/standards/observability-standards.md +1 -1
  120. package/templates/standards/quality-standards.md +2 -1
  121. package/bin/enderun-dashboard.js +0 -25
  122. package/framework-mcp/src/tools/dashboard/start_dashboard.ts +0 -33
  123. package/src/cli/commands/dashboard/data-service.ts +0 -167
  124. package/src/cli/commands/dashboard/html-template.ts +0 -696
  125. package/src/cli/commands/dashboard/server.ts +0 -43
  126. package/src/cli/commands/dashboard.ts +0 -11
@@ -1,167 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { getFrameworkDir } from "../../utils/memory.js";
4
-
5
- export function parseProjectMemory() {
6
- const frameworkDir = getFrameworkDir();
7
- if (!frameworkDir) return { error: "No framework directory found. Run init." };
8
-
9
- const memPath = path.join(frameworkDir, "memory/PROJECT_MEMORY.md");
10
- if (!fs.existsSync(memPath)) return { error: "PROJECT_MEMORY.md not found" };
11
-
12
- try {
13
- const content = fs.readFileSync(memPath, "utf8");
14
-
15
- // Parse Phase & Trace ID
16
- const phaseMatch = content.match(/Phase:\s*([^\n\r]+)/i);
17
- const traceMatch = content.match(/Trace ID:\s*([^\n\r]+)/i);
18
- const managerMatch = content.match(/@manager state:\s*([^\n\r]+)/i);
19
-
20
- // Parse Active Tasks Table
21
- const tasks = [];
22
- const lines = content.split("\n");
23
- let inTaskTable = false;
24
-
25
- for (const line of lines) {
26
- if (line.includes("| Trace ID | Task |")) {
27
- inTaskTable = true;
28
- continue;
29
- }
30
- if (inTaskTable && line.trim() === "") {
31
- inTaskTable = false;
32
- continue;
33
- }
34
- if (inTaskTable && line.startsWith("|") && !line.includes(":---")) {
35
- const cols = line.split("|").map(c => c.trim()).filter(Boolean);
36
- if (cols.length >= 5) {
37
- tasks.push({
38
- traceId: cols[0],
39
- task: cols[1],
40
- agent: cols[2],
41
- priority: cols[3],
42
- status: cols[4]
43
- });
44
- }
45
- }
46
- }
47
-
48
- // Parse History Section
49
- const history = [];
50
- const historyParts = content.split(/##\s+HISTORY/i);
51
- if (historyParts[1]) {
52
- const histLines = historyParts[1].split("\n");
53
- let currentItem: { title: string, body: string[] } | null = null;
54
- for (const line of histLines) {
55
- if (line.startsWith("###")) {
56
- if (currentItem) history.push(currentItem);
57
- currentItem = { title: line.replace("###", "").trim(), body: [] };
58
- } else if (currentItem && line.trim() !== "") {
59
- currentItem.body.push(line.trim());
60
- }
61
- }
62
- if (currentItem) history.push(currentItem);
63
- }
64
-
65
- return {
66
- phase: phaseMatch ? phaseMatch[1].trim() : "PHASE_0",
67
- traceId: traceMatch ? traceMatch[1].trim() : "N/A",
68
- managerState: managerMatch ? managerMatch[1].trim() : "ACTIVE",
69
- tasks,
70
- history: history.slice(0, 15) // Return last 15 entries
71
- };
72
- } catch (e: unknown) {
73
- return { error: e instanceof Error ? e.message : String(e) };
74
- }
75
- }
76
-
77
- interface ProjectStructureEntry {
78
- name: string;
79
- path: string;
80
- type: "directory" | "file";
81
- children?: ProjectStructureEntry[];
82
- }
83
-
84
- export function getProjectStructure(): ProjectStructureEntry[] {
85
- const projectRoot = process.cwd();
86
-
87
- function walk(dir: string, depth = 0): ProjectStructureEntry[] {
88
- if (depth > 3) return []; // Limit depth for performance
89
-
90
- const entries: ProjectStructureEntry[] = [];
91
- let files: fs.Dirent[];
92
-
93
- try {
94
- files = fs.readdirSync(dir, { withFileTypes: true });
95
- } catch (_e) {
96
- // Silently ignore directories that cannot be read
97
- return [];
98
- }
99
-
100
- for (const file of files) {
101
- if (file.name.startsWith(".") || file.name === "node_modules" || file.name === "dist") continue;
102
-
103
- const fullPath = path.join(dir, file.name);
104
- const entry: ProjectStructureEntry = {
105
- name: file.name,
106
- path: path.relative(projectRoot, fullPath),
107
- type: file.isDirectory() ? "directory" : "file"
108
- };
109
-
110
- if (file.isDirectory()) {
111
- entry.children = walk(fullPath, depth + 1);
112
- }
113
- entries.push(entry);
114
- }
115
- return entries;
116
- }
117
-
118
- try {
119
- return walk(projectRoot);
120
- } catch {
121
- return [];
122
- }
123
- }
124
-
125
- export function readManagerLogs() {
126
- const frameworkDir = getFrameworkDir();
127
- if (!frameworkDir) return [];
128
-
129
- const logsPath = path.join(frameworkDir, "logs/manager.json");
130
- if (!fs.existsSync(logsPath)) return [];
131
-
132
- try {
133
- const raw = fs.readFileSync(logsPath, "utf8");
134
- // Handle both json array format and jsonl format
135
- if (raw.trim().startsWith("[")) {
136
- return JSON.parse(raw);
137
- } else {
138
- return raw.split("\n").filter(Boolean).map(line => JSON.parse(line));
139
- }
140
- } catch {
141
- return [];
142
- }
143
- }
144
-
145
- export function listAgents() {
146
- const frameworkDir = getFrameworkDir();
147
- if (!frameworkDir) return [];
148
- const agentsPath = path.join(frameworkDir, "agents");
149
- if (!fs.existsSync(agentsPath)) return [];
150
-
151
- try {
152
- const files = fs.readdirSync(agentsPath).filter(f => f.endsWith(".json") && f !== "agent_army_schema.json");
153
- return files.map(file => {
154
- const content = JSON.parse(fs.readFileSync(path.join(agentsPath, file), "utf8"));
155
- return {
156
- name: content.name,
157
- displayName: content.displayName || content.name,
158
- description: content.description,
159
- role: content.role,
160
- capability: content.capability,
161
- tags: content.tags || []
162
- };
163
- });
164
- } catch {
165
- return [];
166
- }
167
- }