@yemi33/minions 0.1.1828 → 0.1.1830
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 +10 -0
- package/bin/minions.js +8 -5
- package/dashboard/js/command-center.js +5 -32
- package/dashboard.js +2 -40
- package/engine/copilot-models.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.1830 (2026-05-09)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
- revert CC action-result Context: suffix (#2283)
|
|
7
|
+
|
|
8
|
+
## 0.1.1829 (2026-05-09)
|
|
9
|
+
|
|
10
|
+
### Fixes
|
|
11
|
+
- swallow safeWrite throws in best-effort beacon clear
|
|
12
|
+
|
|
3
13
|
## 0.1.1828 (2026-05-09)
|
|
4
14
|
|
|
5
15
|
### Other
|
package/bin/minions.js
CHANGED
|
@@ -79,11 +79,14 @@ const isPortListening = (port) => getListeningPids(port).length > 0;
|
|
|
79
79
|
// the auto-open. We wipe the file during restart so the post-restart probe
|
|
80
80
|
// only counts beacons that arrive AFTER the new dashboard is up.
|
|
81
81
|
function _clearDashboardBrowserState(minionsHome) {
|
|
82
|
-
//
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
// Best-effort: a transient EPERM/ENOENT here just means the next probe sees
|
|
83
|
+
// a stale beacon for one cycle, not a restart failure.
|
|
84
|
+
try {
|
|
85
|
+
shared.safeWrite(
|
|
86
|
+
path.join(minionsHome, 'engine', 'dashboard-browser.json'),
|
|
87
|
+
{ tabs: {}, updatedAt: new Date().toISOString() },
|
|
88
|
+
);
|
|
89
|
+
} catch {}
|
|
87
90
|
}
|
|
88
91
|
|
|
89
92
|
async function _waitForBrowserReconnect(minionsHome, { afterMs, timeoutMs = 5000, pollMs = 500 } = {}) {
|
|
@@ -1039,16 +1039,15 @@ function _ccActionResultLine(action, result) {
|
|
|
1039
1039
|
var type = _ccActionResultType(action, result);
|
|
1040
1040
|
var subject = _ccActionResultSubject(action, result);
|
|
1041
1041
|
var label = escHtml(type) + (subject ? ' <strong>' + escHtml(subject) + '</strong>' : '');
|
|
1042
|
-
var contextSuffix = result && result.actionContext ? _ccActionContextSuffix(result.actionContext) : '';
|
|
1043
1042
|
if (result && result.error) {
|
|
1044
|
-
return '<li class="cc-action-feedback-row cc-action-feedback-error">✗ ' + label + ': ' + escHtml(result.error) +
|
|
1043
|
+
return '<li class="cc-action-feedback-row cc-action-feedback-error">✗ ' + label + ': ' + escHtml(result.error) + '</li>';
|
|
1045
1044
|
}
|
|
1046
1045
|
if (result && result.warning) {
|
|
1047
|
-
return '<li class="cc-action-feedback-row cc-action-feedback-warning">⚠ ' + label + ': ' + escHtml(result.warning) +
|
|
1046
|
+
return '<li class="cc-action-feedback-row cc-action-feedback-warning">⚠ ' + label + ': ' + escHtml(result.warning) + '</li>';
|
|
1048
1047
|
}
|
|
1049
1048
|
if (result && result.ok) {
|
|
1050
1049
|
var duplicate = result.duplicate ? ' <span style="color:var(--orange)">already exists</span>' : '';
|
|
1051
|
-
return '<li class="cc-action-feedback-row cc-action-feedback-ok">✓ ' + label + duplicate +
|
|
1050
|
+
return '<li class="cc-action-feedback-row cc-action-feedback-ok">✓ ' + label + duplicate + '</li>';
|
|
1052
1051
|
}
|
|
1053
1052
|
return '';
|
|
1054
1053
|
}
|
|
@@ -1098,28 +1097,6 @@ function _ccRunServerActionSideEffects(action) {
|
|
|
1098
1097
|
refresh();
|
|
1099
1098
|
}
|
|
1100
1099
|
|
|
1101
|
-
var CC_ACTION_CONTEXT_STALE_MS = 2 * 60 * 1000;
|
|
1102
|
-
function _ccActionContextIsStale(ctx, nowMs) {
|
|
1103
|
-
if (!ctx || !ctx.requestedAt) return false;
|
|
1104
|
-
var ts = Date.parse(ctx.requestedAt);
|
|
1105
|
-
if (!Number.isFinite(ts)) return false;
|
|
1106
|
-
var now = Number.isFinite(nowMs) ? nowMs : Date.now();
|
|
1107
|
-
return now - ts > CC_ACTION_CONTEXT_STALE_MS;
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
function _ccActionContextSuffix(ctx, nowMs) {
|
|
1111
|
-
if (!ctx || typeof ctx !== 'object') return '';
|
|
1112
|
-
var parts = [];
|
|
1113
|
-
if (ctx.title) parts.push('action "' + escHtml(ctx.title) + '"');
|
|
1114
|
-
if (ctx.request) parts.push('request "' + escHtml(ctx.request) + '"');
|
|
1115
|
-
if (ctx.requestedAt) parts.push('started ' + escHtml(ctx.requestedAt));
|
|
1116
|
-
if (parts.length === 0) return '';
|
|
1117
|
-
var stale = _ccActionContextIsStale(ctx, nowMs)
|
|
1118
|
-
? ' <strong style="color:var(--orange)">possibly stale</strong>'
|
|
1119
|
-
: '';
|
|
1120
|
-
return '<div style="font-size:10px;color:var(--muted);margin-top:2px">Context: ' + parts.join(' | ') + stale + '</div>';
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
1100
|
// Tag actions that the server already executed so ccExecuteAction skips the API call
|
|
1124
1101
|
function _tagServerExecuted(actions, actionResults) {
|
|
1125
1102
|
if (!actionResults || !Array.isArray(actionResults)) return;
|
|
@@ -1130,12 +1107,10 @@ function _tagServerExecuted(actions, actionResults) {
|
|
|
1130
1107
|
if (r.id) actions[i]._serverId = r.id;
|
|
1131
1108
|
if (r.warning) actions[i]._serverWarning = r.warning;
|
|
1132
1109
|
if (r.duplicate) actions[i]._serverDuplicate = true;
|
|
1133
|
-
if (r.actionContext) actions[i]._serverContext = r.actionContext;
|
|
1134
1110
|
if (r.reusedFromAction !== undefined) actions[i]._serverHidden = true;
|
|
1135
1111
|
} else if (r && r.error) {
|
|
1136
1112
|
actions[i]._serverExecuted = true;
|
|
1137
1113
|
actions[i]._serverError = r.error;
|
|
1138
|
-
if (r.actionContext) actions[i]._serverContext = r.actionContext;
|
|
1139
1114
|
}
|
|
1140
1115
|
// clientExecuted: false means server didn't handle it — frontend must execute
|
|
1141
1116
|
}
|
|
@@ -1150,8 +1125,7 @@ async function ccExecuteAction(action, targetTabId, opts) {
|
|
|
1150
1125
|
if (action._serverExecuted) {
|
|
1151
1126
|
if (action._serverHidden) return;
|
|
1152
1127
|
if (action._serverError) {
|
|
1153
|
-
status.innerHTML = '✗ ' + escHtml(action.type) + ' failed: ' + escHtml(action._serverError)
|
|
1154
|
-
_ccActionContextSuffix(action._serverContext);
|
|
1128
|
+
status.innerHTML = '✗ ' + escHtml(action.type) + ' failed: ' + escHtml(action._serverError);
|
|
1155
1129
|
status.style.color = 'var(--red)';
|
|
1156
1130
|
} else {
|
|
1157
1131
|
var label = action._serverId ? escHtml(action._serverId) : escHtml(action.title || action.type);
|
|
@@ -1159,8 +1133,7 @@ async function ccExecuteAction(action, targetTabId, opts) {
|
|
|
1159
1133
|
var successLabel = serverActionType === 'dispatch' ? 'Dispatched' : serverActionType;
|
|
1160
1134
|
status.innerHTML = '✓ ' + escHtml(successLabel) + ': <strong>' + label + '</strong>' +
|
|
1161
1135
|
(action._serverDuplicate ? '<div style="font-size:10px;color:var(--orange);margin-top:2px">Already existed from a previous request; no duplicate work item was created.</div>' : '') +
|
|
1162
|
-
(action._serverWarning ? '<div style="font-size:10px;color:var(--muted);margin-top:2px">' + escHtml(action._serverWarning) + '</div>' : '')
|
|
1163
|
-
_ccActionContextSuffix(action._serverContext);
|
|
1136
|
+
(action._serverWarning ? '<div style="font-size:10px;color:var(--muted);margin-top:2px">' + escHtml(action._serverWarning) + '</div>' : '');
|
|
1164
1137
|
status.style.color = 'var(--green)';
|
|
1165
1138
|
}
|
|
1166
1139
|
if (opts && opts.originMessageId && _ccAppendHtmlToMessage(targetTabId || _ccActiveTabId, opts.originMessageId, status.outerHTML)) {
|
package/dashboard.js
CHANGED
|
@@ -2281,34 +2281,6 @@ function _actionsWithIntentFallback(actions, opts = {}) {
|
|
|
2281
2281
|
return [action];
|
|
2282
2282
|
}
|
|
2283
2283
|
|
|
2284
|
-
function _ccActionContextValue(action) {
|
|
2285
|
-
if (!action || typeof action !== 'object') return '';
|
|
2286
|
-
const candidates = [action.title, action.id, action.file, action.target, action.pr, action.endpoint];
|
|
2287
|
-
for (const value of candidates) {
|
|
2288
|
-
const cleaned = _ccCleanIntentString(value, 160);
|
|
2289
|
-
if (cleaned) return cleaned;
|
|
2290
|
-
}
|
|
2291
|
-
return '';
|
|
2292
|
-
}
|
|
2293
|
-
|
|
2294
|
-
function _annotateCCActionResults(actions, actionResults, opts = {}) {
|
|
2295
|
-
if (!Array.isArray(actionResults)) return actionResults;
|
|
2296
|
-
const requestedAt = _ccCleanIntentString(opts.requestedAt || new Date().toISOString(), 80);
|
|
2297
|
-
const request = _ccCleanIntentString(opts.message, 180);
|
|
2298
|
-
return actionResults.map((result, idx) => {
|
|
2299
|
-
if (!result || typeof result !== 'object') return result;
|
|
2300
|
-
const action = Array.isArray(actions) ? normalizeCCAction(actions[idx]) : null;
|
|
2301
|
-
const context = {
|
|
2302
|
-
type: _ccCleanIntentString(result.type || action?.type || 'action', 80) || 'action',
|
|
2303
|
-
};
|
|
2304
|
-
const title = _ccActionContextValue(action);
|
|
2305
|
-
if (title) context.title = title;
|
|
2306
|
-
if (request) context.request = request;
|
|
2307
|
-
if (requestedAt) context.requestedAt = requestedAt;
|
|
2308
|
-
return { ...result, actionContext: context };
|
|
2309
|
-
});
|
|
2310
|
-
}
|
|
2311
|
-
|
|
2312
2284
|
function parseCCActions(text) {
|
|
2313
2285
|
let actions = [];
|
|
2314
2286
|
let displayText = stripCCActionsForDisplay(text);
|
|
@@ -7312,7 +7284,6 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
7312
7284
|
try {
|
|
7313
7285
|
const body = await readBody(req);
|
|
7314
7286
|
if (!body.message) return jsonReply(res, 400, { error: 'message required' });
|
|
7315
|
-
const actionRequestedAt = new Date().toISOString();
|
|
7316
7287
|
|
|
7317
7288
|
// Per-tab concurrency guard
|
|
7318
7289
|
tabId = body.tabId || 'default';
|
|
@@ -7368,11 +7339,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
7368
7339
|
{ message: body.message, intentMetadata: body.intentMetadata, source: 'command-center', answerText: parsed.text, toolUses }
|
|
7369
7340
|
);
|
|
7370
7341
|
if (parsed.actions.length > 0) {
|
|
7371
|
-
parsed.actionResults =
|
|
7372
|
-
parsed.actions,
|
|
7373
|
-
await executeCCActions(parsed.actions),
|
|
7374
|
-
{ message: body.message, requestedAt: actionRequestedAt }
|
|
7375
|
-
);
|
|
7342
|
+
parsed.actionResults = await executeCCActions(parsed.actions);
|
|
7376
7343
|
parsed.actionResultsAt = new Date().toISOString();
|
|
7377
7344
|
}
|
|
7378
7345
|
// Mirror only user-facing text to Teams; never send the internal action block.
|
|
@@ -7477,7 +7444,6 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
7477
7444
|
const body = await readBody(req);
|
|
7478
7445
|
if (!body.message && !body.reconnect) { res.statusCode = 400; res.end('message required'); return; }
|
|
7479
7446
|
tabId = body.tabId || 'default';
|
|
7480
|
-
const actionRequestedAt = new Date().toISOString();
|
|
7481
7447
|
if (body.reconnect) {
|
|
7482
7448
|
const live = _getCcLiveStream(tabId);
|
|
7483
7449
|
if (!live) { res.statusCode = 409; res.end('No live command-center response to reconnect'); return; }
|
|
@@ -7707,11 +7673,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
7707
7673
|
let actionResults;
|
|
7708
7674
|
let actionResultsAt;
|
|
7709
7675
|
if (actions.length > 0) {
|
|
7710
|
-
actionResults =
|
|
7711
|
-
actions,
|
|
7712
|
-
await executeCCActions(actions),
|
|
7713
|
-
{ message: body.message, requestedAt: actionRequestedAt }
|
|
7714
|
-
);
|
|
7676
|
+
actionResults = await executeCCActions(actions);
|
|
7715
7677
|
actionResultsAt = new Date().toISOString();
|
|
7716
7678
|
}
|
|
7717
7679
|
const donePayload = { type: 'done', text: displayText, actions, actionResults, actionResultsAt, sessionId: responseSessionId, newSession: !wasResume };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1830",
|
|
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"
|