@yemi33/minions 0.1.1685 → 0.1.1686
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/engine/copilot-models.json +1 -1
- package/engine/spawn-agent.js +24 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/engine/spawn-agent.js
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
const fs = require('fs');
|
|
36
36
|
const os = require('os');
|
|
37
37
|
const path = require('path');
|
|
38
|
+
const { execSync } = require('child_process');
|
|
38
39
|
const { runFile, cleanChildEnv, killGracefully, killImmediate, ts } = require('./shared');
|
|
39
40
|
const { resolveRuntime } = require('./runtimes');
|
|
40
41
|
|
|
@@ -128,6 +129,27 @@ function normalizeRuntimeExit(code, signal) {
|
|
|
128
129
|
return 1;
|
|
129
130
|
}
|
|
130
131
|
|
|
132
|
+
function injectAdoTokenEnv(env, { execSync: _execSync = execSync, warn = (msg) => process.stderr.write(msg + '\n') } = {}) {
|
|
133
|
+
let token;
|
|
134
|
+
try {
|
|
135
|
+
token = String(_execSync('azureauth ado token --mode iwa --mode broker --output token --timeout 1', {
|
|
136
|
+
encoding: 'utf8',
|
|
137
|
+
timeout: 30000,
|
|
138
|
+
windowsHide: true,
|
|
139
|
+
}) || '').trim();
|
|
140
|
+
} catch (err) {
|
|
141
|
+
warn(`spawn-agent.js: ADO token fetch failed: ${err.message}`);
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
if (!token || !token.startsWith('eyJ')) {
|
|
145
|
+
warn('spawn-agent.js: invalid ADO token from azureauth; continuing without Azure DevOps PAT env');
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
env.AZURE_DEVOPS_EXT_PAT = token;
|
|
149
|
+
env.AZURE_DEVOPS_EXT_AZURE_RM_PAT = token;
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
|
|
131
153
|
const PROCESS_EXIT_SENTINEL_FLUSH_TIMEOUT_MS = 2000;
|
|
132
154
|
|
|
133
155
|
function formatProcessExitSentinel(exitCode, signal) {
|
|
@@ -200,6 +222,7 @@ function main() {
|
|
|
200
222
|
const { promptFile, sysPromptFile, runtimeName, opts, passthrough } = parsed;
|
|
201
223
|
|
|
202
224
|
const env = cleanChildEnv();
|
|
225
|
+
injectAdoTokenEnv(env);
|
|
203
226
|
|
|
204
227
|
let runtime;
|
|
205
228
|
try { runtime = resolveRuntime(runtimeName); }
|
|
@@ -355,6 +378,6 @@ function main() {
|
|
|
355
378
|
});
|
|
356
379
|
}
|
|
357
380
|
|
|
358
|
-
module.exports = { parseSpawnArgs, buildSpawnInvocation, normalizeRuntimeExit, writeProcessExitSentinel };
|
|
381
|
+
module.exports = { parseSpawnArgs, buildSpawnInvocation, normalizeRuntimeExit, injectAdoTokenEnv, writeProcessExitSentinel };
|
|
359
382
|
|
|
360
383
|
if (require.main === module) main();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1686",
|
|
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"
|