@yemi33/minions 0.1.1628 → 0.1.1629
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 -3
- package/engine/cli.js +46 -16
- package/engine/copilot-models.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.1.
|
|
3
|
+
## 0.1.1629 (2026-04-29)
|
|
4
4
|
|
|
5
|
-
###
|
|
6
|
-
-
|
|
5
|
+
### Other
|
|
6
|
+
- test(cli): add unit tests for runtime-flag helpers
|
|
7
|
+
|
|
8
|
+
## 0.1.1627 (2026-04-29)
|
|
7
9
|
|
|
8
10
|
### Fixes
|
|
9
11
|
- ADO PR helpers prefer az CLI with MCP fallback (#1833)
|
package/engine/cli.js
CHANGED
|
@@ -23,9 +23,9 @@ function dispatchModule() { if (!_dispatchModule) _dispatchModule = require('./d
|
|
|
23
23
|
|
|
24
24
|
function handleCommand(cmd, args) {
|
|
25
25
|
if (!cmd) {
|
|
26
|
-
commands.start();
|
|
26
|
+
return commands.start();
|
|
27
27
|
} else if (commands[cmd]) {
|
|
28
|
-
commands[cmd](...args);
|
|
28
|
+
return commands[cmd](...args);
|
|
29
29
|
} else {
|
|
30
30
|
console.log(`Unknown command: ${cmd}`);
|
|
31
31
|
console.log('Commands:');
|
|
@@ -50,7 +50,7 @@ function handleCommand(cmd, args) {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
// ─── Runtime fleet flags (--cli / --model)
|
|
53
|
+
// ─── Runtime fleet flags (--cli / --model / --effort) ────────────────────────
|
|
54
54
|
//
|
|
55
55
|
// Shared by `start`, `restart`, and `config set-cli`. Single source of truth
|
|
56
56
|
// for: flag parsing, runtime validation, incompatibility heuristics, and the
|
|
@@ -58,27 +58,52 @@ function handleCommand(cmd, args) {
|
|
|
58
58
|
// config.json" — the helper below is the only caller that mutates fleet keys.
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
* Strip `--cli <name>` / `--model <value>` from `args`
|
|
62
|
-
*
|
|
61
|
+
* Strip `--cli <name>` / `--model <value>` / `--effort <level>` from `args`
|
|
62
|
+
* (in-place), including `--flag=value` forms. Returns
|
|
63
|
+
* `{ cli, model, effort, modelExplicit, errors }`. `modelExplicit` distinguishes
|
|
63
64
|
* "user passed --model with empty string" (clear) from "no flag" (no-op).
|
|
64
65
|
*
|
|
65
66
|
* Errors (e.g. `--cli` with no follow-up token) are collected for the caller
|
|
66
67
|
* to print + exit-non-zero, instead of throwing — matches existing CLI flow.
|
|
67
68
|
*/
|
|
68
69
|
function _parseRuntimeFlags(args) {
|
|
69
|
-
const out = { cli: undefined, model: undefined, modelExplicit: false, errors: [] };
|
|
70
|
+
const out = { cli: undefined, model: undefined, effort: undefined, modelExplicit: false, errors: [] };
|
|
70
71
|
let i = 0;
|
|
71
72
|
while (i < args.length) {
|
|
72
73
|
const a = args[i];
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
const eq = typeof a === 'string' ? a.indexOf('=') : -1;
|
|
75
|
+
const flag = eq > 0 ? a.slice(0, eq) : a;
|
|
76
|
+
const inlineValue = eq > 0 ? a.slice(eq + 1) : undefined;
|
|
77
|
+
const readValue = (name, { allowEmpty = false, hint = '' } = {}) => {
|
|
78
|
+
if (inlineValue !== undefined) {
|
|
79
|
+
if (!allowEmpty && inlineValue === '') {
|
|
80
|
+
out.errors.push(`${name} requires a value${hint}`);
|
|
81
|
+
args.splice(i, 1);
|
|
82
|
+
return { ok: false };
|
|
83
|
+
}
|
|
84
|
+
args.splice(i, 1);
|
|
85
|
+
return { ok: true, value: inlineValue };
|
|
86
|
+
}
|
|
87
|
+
if (i + 1 >= args.length || String(args[i + 1]).startsWith('--')) {
|
|
88
|
+
out.errors.push(`${name} requires a value${hint}`);
|
|
89
|
+
args.splice(i, 1);
|
|
90
|
+
return { ok: false };
|
|
91
|
+
}
|
|
92
|
+
const value = String(args[i + 1]);
|
|
76
93
|
args.splice(i, 2);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
94
|
+
return { ok: true, value };
|
|
95
|
+
};
|
|
96
|
+
if (flag === '--cli') {
|
|
97
|
+
const parsed = readValue('--cli');
|
|
98
|
+
if (parsed.ok) out.cli = parsed.value;
|
|
99
|
+
} else if (flag === '--model') {
|
|
100
|
+
const parsed = readValue('--model', { allowEmpty: true, hint: ' (use --model "" to clear)' });
|
|
101
|
+
if (!parsed.ok) continue;
|
|
102
|
+
out.model = parsed.value;
|
|
80
103
|
out.modelExplicit = true;
|
|
81
|
-
|
|
104
|
+
} else if (flag === '--effort') {
|
|
105
|
+
const parsed = readValue('--effort');
|
|
106
|
+
if (parsed.ok) out.effort = parsed.value;
|
|
82
107
|
} else {
|
|
83
108
|
i++;
|
|
84
109
|
}
|
|
@@ -1222,7 +1247,7 @@ const commands = {
|
|
|
1222
1247
|
|
|
1223
1248
|
doctor() {
|
|
1224
1249
|
const { doctor } = require('./preflight');
|
|
1225
|
-
doctor(MINIONS_DIR).then(ok => {
|
|
1250
|
+
return doctor(MINIONS_DIR).then(ok => {
|
|
1226
1251
|
if (!ok) process.exit(1);
|
|
1227
1252
|
});
|
|
1228
1253
|
},
|
|
@@ -1298,5 +1323,10 @@ const commands = {
|
|
|
1298
1323
|
}
|
|
1299
1324
|
};
|
|
1300
1325
|
|
|
1301
|
-
module.exports = {
|
|
1302
|
-
|
|
1326
|
+
module.exports = {
|
|
1327
|
+
handleCommand,
|
|
1328
|
+
// exported for testing
|
|
1329
|
+
_parseRuntimeFlags,
|
|
1330
|
+
_modelLooksIncompatible,
|
|
1331
|
+
_applyRuntimeFlags,
|
|
1332
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1629",
|
|
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"
|