@yemi33/minions 0.1.1598 → 0.1.1599
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 +2 -1
- package/engine/llm.js +20 -8
- package/engine/runtimes/copilot.js +16 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.1.
|
|
3
|
+
## 0.1.1599 (2026-04-28)
|
|
4
4
|
|
|
5
5
|
### Features
|
|
6
6
|
- match runtime tags to actual logos (pixel-crab Claude, mascot Copilot)
|
|
7
7
|
- replace runtime text tag with inline SVG logos
|
|
8
8
|
|
|
9
9
|
### Fixes
|
|
10
|
+
- keep cc stream final text complete
|
|
10
11
|
- switch Copilot icon to outline style for cleaner inline read
|
|
11
12
|
- un-invert Copilot — purple silhouette + white cutouts
|
|
12
13
|
- redraw Copilot icon to match actual mascot — vertical eye pills, not grill bars
|
package/engine/llm.js
CHANGED
|
@@ -270,11 +270,20 @@ function _createStreamAccumulator({
|
|
|
270
270
|
const toolUses = [];
|
|
271
271
|
|
|
272
272
|
// Copilot streams `assistant.message_delta` with `data.deltaContent` chunks
|
|
273
|
-
// before emitting
|
|
274
|
-
//
|
|
275
|
-
//
|
|
273
|
+
// before emitting `assistant.message`. Tool-request messages can include
|
|
274
|
+
// narration ("I'll inspect...") that is only progress text, so terminal text
|
|
275
|
+
// comes from non-tool assistant messages or trailing deltas.
|
|
276
276
|
let copilotMessageBuffer = '';
|
|
277
277
|
|
|
278
|
+
function _streamText(value) {
|
|
279
|
+
return maxTextLength ? value.slice(-maxTextLength) : value;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
function _copilotAssistantMessageHasTools(obj) {
|
|
283
|
+
const requests = obj?.data?.toolRequests;
|
|
284
|
+
return Array.isArray(requests) && requests.length > 0;
|
|
285
|
+
}
|
|
286
|
+
|
|
278
287
|
function captureEvent(obj) {
|
|
279
288
|
if (!obj || typeof obj !== 'object') return;
|
|
280
289
|
|
|
@@ -322,12 +331,12 @@ function _createStreamAccumulator({
|
|
|
322
331
|
}
|
|
323
332
|
}
|
|
324
333
|
if (obj.type === 'assistant.message' && typeof obj.data?.content === 'string') {
|
|
325
|
-
//
|
|
334
|
+
// Tool-request narration ("I'll look into this...") is progress text, not
|
|
335
|
+
// the final answer. Keep streaming it live, but don't let it become the
|
|
336
|
+
// terminal result if the process exits before a final answer message.
|
|
326
337
|
const content = obj.data.content;
|
|
327
|
-
if (content)
|
|
328
|
-
|
|
329
|
-
copilotMessageBuffer = '';
|
|
330
|
-
}
|
|
338
|
+
if (content && !_copilotAssistantMessageHasTools(obj)) text = _streamText(content);
|
|
339
|
+
copilotMessageBuffer = '';
|
|
331
340
|
if (Array.isArray(obj.data.toolRequests)) {
|
|
332
341
|
for (const tr of obj.data.toolRequests) {
|
|
333
342
|
if (tr && tr.name) {
|
|
@@ -372,6 +381,9 @@ function _createStreamAccumulator({
|
|
|
372
381
|
const ev = runtime.parseStreamChunk(trimmed);
|
|
373
382
|
if (ev) captureEvent(ev);
|
|
374
383
|
}
|
|
384
|
+
if (copilotMessageBuffer) {
|
|
385
|
+
text = _streamText(copilotMessageBuffer);
|
|
386
|
+
}
|
|
375
387
|
// Reconciliation: if any field is still missing, ask the runtime adapter
|
|
376
388
|
// to re-parse the whole stdout. parseOutput() may catch a result event
|
|
377
389
|
// that was malformed when streamed in chunks.
|
|
@@ -300,8 +300,10 @@ const KNOWN_EVENT_TYPES = new Set([
|
|
|
300
300
|
* Returns { text, usage, sessionId, model } — same shape as the Claude adapter
|
|
301
301
|
* so engine/lifecycle.js can consume both transparently.
|
|
302
302
|
*
|
|
303
|
-
* - text: concatenation of
|
|
304
|
-
*
|
|
303
|
+
* - text: concatenation of answer `assistant.message.data.content`
|
|
304
|
+
* values, plus trailing deltas if the CLI exits before a final
|
|
305
|
+
* `assistant.message`. Narration attached to tool requests is
|
|
306
|
+
* progress text and is excluded from the final answer.
|
|
305
307
|
* - usage: mapped from the terminal `result` event. Copilot doesn't
|
|
306
308
|
* report cost/tokens — those fields are NULL, not 0, so the
|
|
307
309
|
* dashboard can distinguish "Copilot didn't tell us" from
|
|
@@ -322,6 +324,7 @@ function parseOutput(raw, { maxTextLength = 0 } = {}) {
|
|
|
322
324
|
let model = null;
|
|
323
325
|
let outputTokensTotal = 0;
|
|
324
326
|
let turnEndCount = 0;
|
|
327
|
+
let pendingDeltaContent = '';
|
|
325
328
|
|
|
326
329
|
for (const rawLine of safeRaw.split('\n')) {
|
|
327
330
|
const line = rawLine.trim();
|
|
@@ -331,9 +334,17 @@ function parseOutput(raw, { maxTextLength = 0 } = {}) {
|
|
|
331
334
|
if (!obj || typeof obj !== 'object') continue;
|
|
332
335
|
|
|
333
336
|
const type = obj.type;
|
|
334
|
-
if (type === 'assistant.
|
|
337
|
+
if (type === 'assistant.message_delta') {
|
|
338
|
+
const delta = obj.data?.deltaContent;
|
|
339
|
+
if (typeof delta === 'string') pendingDeltaContent += delta;
|
|
340
|
+
} else if (type === 'assistant.message') {
|
|
335
341
|
const content = obj.data?.content;
|
|
336
|
-
|
|
342
|
+
const toolRequests = obj.data?.toolRequests;
|
|
343
|
+
const hasToolRequests = Array.isArray(toolRequests) && toolRequests.length > 0;
|
|
344
|
+
if (typeof content === 'string') {
|
|
345
|
+
if (content && !hasToolRequests) messageContents.push(content);
|
|
346
|
+
pendingDeltaContent = '';
|
|
347
|
+
}
|
|
337
348
|
const ot = obj.data?.outputTokens;
|
|
338
349
|
if (typeof ot === 'number') outputTokensTotal += ot;
|
|
339
350
|
} else if (type === 'assistant.turn_end') {
|
|
@@ -366,7 +377,7 @@ function parseOutput(raw, { maxTextLength = 0 } = {}) {
|
|
|
366
377
|
}
|
|
367
378
|
}
|
|
368
379
|
|
|
369
|
-
let text = messageContents.join('');
|
|
380
|
+
let text = messageContents.join('') + pendingDeltaContent;
|
|
370
381
|
if (maxTextLength && text.length > maxTextLength) {
|
|
371
382
|
text = text.slice(-maxTextLength);
|
|
372
383
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1599",
|
|
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"
|