@yemi33/minions 0.1.1590 → 0.1.1591
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/CHANGELOG.md +5 -0
- package/dashboard/js/render-agents.js +21 -2
- package/engine/queries.js +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
// dashboard/js/render-agents.js — Agent grid rendering extracted from dashboard.html
|
|
2
2
|
|
|
3
|
+
// Per-runtime display labels and accent colors. Add a new entry here when a
|
|
4
|
+
// new runtime is registered in engine/runtimes/index.js.
|
|
5
|
+
const RUNTIME_TAGS = {
|
|
6
|
+
claude: { label: 'Claude', color: 'var(--blue)' },
|
|
7
|
+
copilot: { label: 'Copilot', color: 'var(--purple)' },
|
|
8
|
+
};
|
|
9
|
+
function _runtimeTagHtml(runtime) {
|
|
10
|
+
const meta = RUNTIME_TAGS[runtime] || { label: runtime || 'unknown', color: 'var(--muted)' };
|
|
11
|
+
return '<span class="agent-runtime-tag" title="Runtime: ' + escapeHtml(runtime || 'unknown') + '" style="font-size:9px;font-weight:600;letter-spacing:0.4px;text-transform:uppercase;padding:1px 5px;margin-left:6px;border:1px solid ' + meta.color + ';border-radius:3px;color:' + meta.color + ';background:transparent">' + escapeHtml(meta.label) + '</span>';
|
|
12
|
+
}
|
|
13
|
+
|
|
3
14
|
function renderAgents(agents) {
|
|
4
15
|
agentData = agents;
|
|
5
16
|
const grid = document.getElementById('agents-grid');
|
|
6
17
|
grid.innerHTML = agents.map(a => `
|
|
7
18
|
<div class="agent-card ${statusColor(a.status)}" onclick="if(shouldIgnoreSelectionClick(event))return;openAgentDetail('${escapeHtml(a.id)}')">
|
|
8
19
|
<div class="agent-card-header">
|
|
9
|
-
<span class="agent-name"><span class="agent-emoji">${escapeHtml(a.emoji)}</span>${escapeHtml(a.name)}</span>
|
|
20
|
+
<span class="agent-name"><span class="agent-emoji">${escapeHtml(a.emoji)}</span>${escapeHtml(a.name)}${_runtimeTagHtml(a.runtime)}</span>
|
|
10
21
|
<span class="status-badge ${escapeHtml(a.status)}">${escapeHtml(a.status)}</span>
|
|
11
22
|
</div>
|
|
12
23
|
<div class="agent-role">${escapeHtml(a.role)}</div>
|
|
@@ -38,9 +49,17 @@ async function openAgentDetail(id) {
|
|
|
38
49
|
const emojiSpan = document.createElement('span');
|
|
39
50
|
emojiSpan.style.fontSize = '22px';
|
|
40
51
|
emojiSpan.textContent = agent.emoji || '';
|
|
52
|
+
// Runtime tag rendered as a separate span so the textContent path keeps its
|
|
53
|
+
// SEC-03-Phase-A safety for the user-controlled name/role fields.
|
|
54
|
+
const runtimeMeta = RUNTIME_TAGS[agent.runtime] || { label: agent.runtime || 'unknown', color: 'var(--muted)' };
|
|
55
|
+
const runtimeSpan = document.createElement('span');
|
|
56
|
+
runtimeSpan.style.cssText = 'font-size:10px;font-weight:600;letter-spacing:0.4px;text-transform:uppercase;padding:2px 6px;margin-left:10px;border:1px solid ' + runtimeMeta.color + ';border-radius:3px;color:' + runtimeMeta.color;
|
|
57
|
+
runtimeSpan.title = 'Runtime: ' + (agent.runtime || 'unknown');
|
|
58
|
+
runtimeSpan.textContent = runtimeMeta.label;
|
|
41
59
|
nameEl.replaceChildren(
|
|
42
60
|
emojiSpan,
|
|
43
|
-
document.createTextNode(' ' + (agent.name || '') + ' \u2014 ' + (agent.role || ''))
|
|
61
|
+
document.createTextNode(' ' + (agent.name || '') + ' \u2014 ' + (agent.role || '')),
|
|
62
|
+
runtimeSpan,
|
|
44
63
|
);
|
|
45
64
|
|
|
46
65
|
const badgeClass = agent.status;
|
package/engine/queries.js
CHANGED
|
@@ -399,6 +399,10 @@ function getAgents(config) {
|
|
|
399
399
|
const allInboxFiles = safeReadDir(INBOX_DIR);
|
|
400
400
|
|
|
401
401
|
return roster.map(a => {
|
|
402
|
+
// Resolve which CLI runtime this agent dispatches to: per-agent override
|
|
403
|
+
// → engine.defaultCli → 'claude'. Surfaced so the dashboard can show a
|
|
404
|
+
// runtime tag next to the agent name.
|
|
405
|
+
const runtime = shared.resolveAgentCli(a, config.engine || {});
|
|
402
406
|
const inboxFiles = allInboxFiles.filter(f => f.includes(a.id));
|
|
403
407
|
const s = getAgentStatus(a.id); // derives from dispatch.json
|
|
404
408
|
|
|
@@ -414,7 +418,7 @@ function getAgents(config) {
|
|
|
414
418
|
const chartered = fs.existsSync(path.join(AGENTS_DIR, a.id, 'charter.md'));
|
|
415
419
|
if (lastAction.length > 120) lastAction = lastAction.slice(0, 120) + '...';
|
|
416
420
|
return {
|
|
417
|
-
...a, status: s.status, lastAction,
|
|
421
|
+
...a, runtime, status: s.status, lastAction,
|
|
418
422
|
currentTask: (s.task || '').slice(0, 200),
|
|
419
423
|
resultSummary: (s.resultSummary || '').slice(0, 500),
|
|
420
424
|
started_at: s.started_at || null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1591",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|