@yemi33/minions 0.1.2185 → 0.1.2187
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/README.md +2 -4
- package/dashboard.js +29 -2
- package/docs/distribution.md +1 -1
- package/docs/onboarding.md +1 -1
- package/engine/playbook.js +9 -9
- package/package.json +1 -4
- package/playbooks/shared-rules.md +1 -1
- package/engine/ado-mcp-wrapper.js +0 -63
package/README.md
CHANGED
|
@@ -334,7 +334,7 @@ For GitHub repos, install and authenticate the [GitHub CLI](https://cli.github.c
|
|
|
334
334
|
|
|
335
335
|
### Azure DevOps Users
|
|
336
336
|
|
|
337
|
-
For the best experience with ADO repos, install the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) with the Azure DevOps extension. Agents should use the `az` CLI first for Azure DevOps operations such as PR creation, PR lookup, comments, reviewers, work items, and pipelines.
|
|
337
|
+
For the best experience with ADO repos, install the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) with the Azure DevOps extension. Agents should use the `az` CLI first for Azure DevOps operations such as PR creation, PR lookup, comments, reviewers, work items, and pipelines. If `az` is unavailable or insufficient for a specific action (e.g. PR comment threads on an older extension), agents fall back to the Azure DevOps REST API (`_apis/git/...`) directly, using a token from `az account get-access-token` — no MCP server required.
|
|
338
338
|
|
|
339
339
|
```bash
|
|
340
340
|
# Install Azure CLI
|
|
@@ -348,8 +348,6 @@ az login
|
|
|
348
348
|
az devops configure --defaults organization=https://dev.azure.com/YOUR_ORG project=YOUR_PROJECT
|
|
349
349
|
```
|
|
350
350
|
|
|
351
|
-
Optionally add the [Azure DevOps MCP server](https://github.com/microsoft/azure-devops-mcp) to your Claude Code settings (`~/.claude.json`) as a fallback. Agents inherit it on next spawn — no sync step needed.
|
|
352
|
-
|
|
353
351
|
## Work Items
|
|
354
352
|
|
|
355
353
|
All work items use the shared `playbooks/work-item.md` template, which provides consistent branch naming, worktree workflow, PR creation steps, and status tracking.
|
|
@@ -676,7 +674,7 @@ To move to a new machine: `npm install -g @yemi33/minions && minions init --forc
|
|
|
676
674
|
watches.js watch-actions.js
|
|
677
675
|
# Repo-host integrations
|
|
678
676
|
github.js issues.js
|
|
679
|
-
ado.js ado-token.js
|
|
677
|
+
ado.js ado-token.js
|
|
680
678
|
ado-status.js check-status.js
|
|
681
679
|
# Runtime state (generated, gitignored)
|
|
682
680
|
control.json <- running/paused/stopped
|
package/dashboard.js
CHANGED
|
@@ -3838,7 +3838,9 @@ function buildCCStateRefresh() {
|
|
|
3838
3838
|
if (_refreshCache && now - _refreshCacheTs < REFRESH_TTL) return _refreshCache;
|
|
3839
3839
|
|
|
3840
3840
|
const ts = new Date().toISOString().slice(0, 16);
|
|
3841
|
-
|
|
3841
|
+
// Agent roster carries the current task too — without it a resumed session
|
|
3842
|
+
// sees only that an agent is "busy", never *what* it is busy with.
|
|
3843
|
+
const agents = getAgents().map(a => `- ${a.name}: ${a.status}${a.currentTask ? ' — ' + a.currentTask.slice(0, 50) : ''}`).join('\n');
|
|
3842
3844
|
const projects = PROJECTS.map(p => `- ${p.name} (${p.repo || p.localPath})`).join('\n');
|
|
3843
3845
|
|
|
3844
3846
|
// MCP servers — just names + source for orientation
|
|
@@ -3852,6 +3854,31 @@ function buildCCStateRefresh() {
|
|
|
3852
3854
|
}
|
|
3853
3855
|
} catch { /* optional */ }
|
|
3854
3856
|
|
|
3857
|
+
// Live operational slice — the "what's going on right now" that resumed
|
|
3858
|
+
// sessions previously never saw (W-mpeap2ug only refreshed projects/MCP/
|
|
3859
|
+
// agent-status). Without this, a non-expiring CC/doc-chat session goes stale
|
|
3860
|
+
// on the active dispatch queue, pending depth, and PR/WI counts the moment
|
|
3861
|
+
// the opening preamble scrolls out of the model's recency window. Capped so
|
|
3862
|
+
// the refresh stays under the 2KB ceiling the unit tests enforce.
|
|
3863
|
+
let activitySection = '';
|
|
3864
|
+
try {
|
|
3865
|
+
const dq = getDispatchQueue();
|
|
3866
|
+
const activeArr = dq.active || [];
|
|
3867
|
+
const maxActive = 10;
|
|
3868
|
+
const activeLines = activeArr.slice(0, maxActive)
|
|
3869
|
+
.map(d => `- ${d.agentName || d.agent}: ${(d.task || '').slice(0, 50)}`).join('\n');
|
|
3870
|
+
const overflow = activeArr.length > maxActive ? `\n…and ${activeArr.length - maxActive} more` : '';
|
|
3871
|
+
const active = activeLines ? activeLines + overflow : '(none)';
|
|
3872
|
+
const pending = (dq.pending || []).length;
|
|
3873
|
+
const prCount = getPullRequests().length;
|
|
3874
|
+
const wiCount = getWorkItems().length;
|
|
3875
|
+
activitySection = `
|
|
3876
|
+
|
|
3877
|
+
**Active dispatch:**
|
|
3878
|
+
${active}
|
|
3879
|
+
Queue: ${pending} pending | PRs: ${prCount} | Work items: ${wiCount}`;
|
|
3880
|
+
} catch { /* optional — never let a refresh failure break the turn */ }
|
|
3881
|
+
|
|
3855
3882
|
const result = `### State Refresh (${ts})
|
|
3856
3883
|
|
|
3857
3884
|
**Projects:** ${PROJECTS.length}
|
|
@@ -3860,7 +3887,7 @@ ${projects || '(none)'}
|
|
|
3860
3887
|
**MCP Tools:** ${mcpLine}
|
|
3861
3888
|
|
|
3862
3889
|
**Agents:**
|
|
3863
|
-
${agents || '(none)'}`;
|
|
3890
|
+
${agents || '(none)'}${activitySection}`;
|
|
3864
3891
|
|
|
3865
3892
|
_refreshCache = result;
|
|
3866
3893
|
_refreshCacheTs = now;
|
package/docs/distribution.md
CHANGED
|
@@ -60,7 +60,7 @@ These files are excluded from published packages:
|
|
|
60
60
|
Controlled by the `files` field in `package.json`:
|
|
61
61
|
- `bin/minions.js` — CLI entry point
|
|
62
62
|
- `engine.js`, `dashboard.js`, `dashboard/` (fragments), `minions.js` — core scripts
|
|
63
|
-
- `engine/spawn-agent.js
|
|
63
|
+
- `engine/spawn-agent.js` — engine helper
|
|
64
64
|
- `agents/*/charter.md` — agent role definitions
|
|
65
65
|
- `playbooks/*.md` — task templates
|
|
66
66
|
- `config.template.json` — starter config
|
package/docs/onboarding.md
CHANGED
|
@@ -15,7 +15,7 @@ You only need to clone if you intend to modify Minions itself. End users normall
|
|
|
15
15
|
```bash
|
|
16
16
|
git clone https://github.com/yemi33/minions.git ~/minions-dev
|
|
17
17
|
cd ~/minions-dev
|
|
18
|
-
npm install # installs dev tooling (Playwright)
|
|
18
|
+
npm install # installs dev tooling (Playwright, ESLint) only; the engine itself has zero runtime deps (Node built-ins)
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
You should now have:
|
package/engine/playbook.js
CHANGED
|
@@ -40,7 +40,7 @@ function getPrCreateInstructions(project) {
|
|
|
40
40
|
`- Use --head to specify your feature branch name\n` +
|
|
41
41
|
`- Include a meaningful --title and body file describing the changes`;
|
|
42
42
|
}
|
|
43
|
-
// Default: Azure DevOps — prefer `az` CLI first, ADO
|
|
43
|
+
// Default: Azure DevOps — prefer `az` CLI first, ADO REST API as fallback
|
|
44
44
|
const adoOrg = project?.adoOrg || '';
|
|
45
45
|
const adoProject = project?.adoProject || '';
|
|
46
46
|
const repoName = project?.repoName || '';
|
|
@@ -50,7 +50,7 @@ function getPrCreateInstructions(project) {
|
|
|
50
50
|
`- Then: \`az repos pr create --repository "${repoName}" --source-branch <your-branch> --target-branch ${mainBranch} --title "PR title" --description @<body-file.md>\`\n` +
|
|
51
51
|
`- Use \`@<file>\` syntax for \`--description\` so Markdown, quotes, and newlines pass safely\n` +
|
|
52
52
|
`- Always set --target-branch to \`${mainBranch}\` (the main branch)\n\n` +
|
|
53
|
-
`If \`az\` is unavailable
|
|
53
|
+
`If \`az\` is unavailable, fall back to the ADO REST API: get a token with \`az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv\` and \`POST .../_apis/git/repositories/${repoId}/pullrequests?api-version=7.1\` (Bearer auth). Do not use \`gh\` for Azure DevOps repositories.`;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
function getPrCommentInstructions(project) {
|
|
@@ -72,12 +72,12 @@ function getPrCommentInstructions(project) {
|
|
|
72
72
|
"```\n" +
|
|
73
73
|
`Then run: \`gh pr comment <number> --body-file <body-file.md> --repo ${org}/${repo}\`. Without the marker, the engine cannot tell your post from a real human comment and will queue redundant fix-dispatches.`;
|
|
74
74
|
}
|
|
75
|
-
// Azure DevOps — prefer `az` CLI first, ADO
|
|
75
|
+
// Azure DevOps — prefer `az` CLI first, ADO REST API as fallback
|
|
76
76
|
const repoName = project?.repoName || '';
|
|
77
77
|
return `For Azure DevOps, use the \`az\` CLI first to post a comment on the PR:\n` +
|
|
78
78
|
`- Write the Markdown comment to a temporary file, then run: \`az repos pr comment create --pull-request-id <number> --content @<body-file.md>\` (substitute your project's repo \`${repoName}\` if not using \`az devops configure\` defaults)\n` +
|
|
79
79
|
`- Use \`@<file>\` syntax for \`--content\` so Markdown, quotes, and newlines pass safely\n\n` +
|
|
80
|
-
`If \`az repos pr comment\` is unavailable or insufficient (e.g. older az-devops extension, thread/status semantics needed), fall back to \`
|
|
80
|
+
`If \`az repos pr comment\` is unavailable or insufficient (e.g. older az-devops extension, thread/status semantics needed), fall back to the ADO REST API: get a token with \`az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv\` and \`POST .../_apis/git/repositories/${repoId}/pullrequests/<number>/threads?api-version=7.1\` with body \`{"comments":[{"content":"..."}],"status":"active"}\` (Bearer auth). Do not use \`gh\` for Azure DevOps repositories.`;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
function getPrFetchInstructions(project) {
|
|
@@ -95,13 +95,13 @@ function getPrFetchInstructions(project) {
|
|
|
95
95
|
`- Or use \`gh pr checkout <number> --repo ${org}/${repo}\` to fetch and checkout in one step\n` +
|
|
96
96
|
`- The base branch is \`${mainBranch}\``;
|
|
97
97
|
}
|
|
98
|
-
// Azure DevOps — prefer `az` CLI first, ADO
|
|
98
|
+
// Azure DevOps — prefer `az` CLI first, ADO REST API as fallback
|
|
99
99
|
const mainBranch = project?.localPath ? shared.resolveMainBranch(project.localPath, project.mainBranch) : (project?.mainBranch || 'main');
|
|
100
100
|
return `For Azure DevOps, use the \`az\` CLI first to fetch PR status:\n` +
|
|
101
101
|
`- \`az repos pr show --id <number>\` returns PR state, mergeStatus, source/target branches, vote summary, and policy/build evaluations\n` +
|
|
102
102
|
`- For the local branch: \`git fetch origin <branch-name>\` then inspect via \`git show\`/\`git diff\` (do NOT checkout in your main working tree)\n` +
|
|
103
103
|
`- The base branch is \`${mainBranch}\`\n\n` +
|
|
104
|
-
`If \`az\` is unavailable
|
|
104
|
+
`If \`az\` is unavailable, fall back to the ADO REST API: get a token with \`az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv\` and \`GET .../_apis/git/repositories/<repoId>/pullrequests/<number>?api-version=7.1\` (Bearer auth). Do not use \`gh\` for Azure DevOps repositories.`;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
function getPrVoteInstructions(project) {
|
|
@@ -123,11 +123,11 @@ function getPrVoteInstructions(project) {
|
|
|
123
123
|
"```\n" +
|
|
124
124
|
`Then run: \`gh pr review <number> --comment --body-file <verdict.md> --repo ${org}/${repo}\`. Do NOT use \`--approve\` or \`--request-changes\` flags — they will fail.`;
|
|
125
125
|
}
|
|
126
|
-
// Azure DevOps — prefer `az` CLI first, ADO
|
|
126
|
+
// Azure DevOps — prefer `az` CLI first, ADO REST API as fallback
|
|
127
127
|
return `For Azure DevOps, use the \`az\` CLI first to set your reviewer vote:\n` +
|
|
128
128
|
`- \`az repos pr set-vote --id <number> --vote {approve | approve-with-suggestions | reject | reset | wait-for-author}\`\n` +
|
|
129
129
|
`- Pair the vote with \`az repos pr comment create --pull-request-id <number> --content @<verdict.md>\` so the verdict body is recorded as a thread comment\n\n` +
|
|
130
|
-
`If \`az\` is unavailable
|
|
130
|
+
`If \`az\` is unavailable, fall back to the ADO REST API: get a token with \`az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv\` and \`PUT .../_apis/git/repositories/${repoId}/pullrequests/<number>/reviewers/<reviewerId>?api-version=7.1\` with body \`{"vote":10}\` (10=approve, 5=approve-with-suggestions, 0=no-vote, -5=wait-for-author, -10=reject; Bearer auth). Do not use \`gh\` for Azure DevOps repositories.`;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
function getRepoHostLabel(project) {
|
|
@@ -139,7 +139,7 @@ function getRepoHostLabel(project) {
|
|
|
139
139
|
function getRepoHostToolRule(project) {
|
|
140
140
|
const host = getRepoHost(project);
|
|
141
141
|
if (host === 'github') return 'Use GitHub MCP tools or `gh` CLI for PR operations';
|
|
142
|
-
return 'For Azure DevOps, use the `az` CLI
|
|
142
|
+
return 'For Azure DevOps, use the `az` CLI for PR operations (e.g. `az repos pr create`, `az repos pr show`, `az repos pr comment`, `az repos pr set-vote`); if `az` is unavailable or insufficient, fall back to the ADO REST API (`_apis/git/...`) with a token from `az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798`. Do not use `gh` for Azure DevOps repositories.';
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
// ─── Task Context Resolution ────────────────────────────────────────────────
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2187",
|
|
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"
|
|
@@ -67,9 +67,6 @@
|
|
|
67
67
|
"engines": {
|
|
68
68
|
"node": ">=22.5"
|
|
69
69
|
},
|
|
70
|
-
"dependencies": {
|
|
71
|
-
"@azure-devops/mcp": "2.7.0"
|
|
72
|
-
},
|
|
73
70
|
"devDependencies": {
|
|
74
71
|
"@playwright/test": "^1.58.2",
|
|
75
72
|
"eslint": "^9.39.4",
|
|
@@ -274,5 +274,5 @@ Output is JSON with the same fields. Exit 0 on success, 1 if not found.
|
|
|
274
274
|
|
|
275
275
|
For Azure DevOps repo operations, use the `az` CLI first. Prefer commands such as `az repos pr create`, `az repos pr show`, `az repos pr list`, `az repos pr comment`, `az repos pr reviewer`, `az boards work-item`, and `az pipelines` after setting defaults with `az devops configure`.
|
|
276
276
|
|
|
277
|
-
|
|
277
|
+
If `az` is unavailable or insufficient for a specific operation (e.g. PR comment threads on an older az-devops extension), fall back to the ADO REST API directly: acquire a token with `az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv` and call the `_apis/git/...` endpoints with Bearer auth. Do not use `gh` for Azure DevOps repositories.
|
|
278
278
|
{{/ado_shared_rules}}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Wrapper for @azure-devops/mcp that fetches an ADO token via the shared
|
|
4
|
-
* az-first provider chain and sets AZURE_DEVOPS_EXT_PAT before launching the
|
|
5
|
-
* MCP server.
|
|
6
|
-
*
|
|
7
|
-
* P-b3f8e1a5: @azure-devops/mcp is pinned in package.json and resolved from
|
|
8
|
-
* local node_modules. We spawn process.execPath against the resolved bin file
|
|
9
|
-
* instead of going through npx/npx.cmd. This (a) eliminates the per-cold-start
|
|
10
|
-
* network fetch that ran with AZURE_DEVOPS_EXT_PAT in env, and (b) avoids the
|
|
11
|
-
* Windows .cmd shim chain that crashes the runtime under spawn.
|
|
12
|
-
*/
|
|
13
|
-
const { spawn } = require('child_process');
|
|
14
|
-
const fs = require('fs');
|
|
15
|
-
const path = require('path');
|
|
16
|
-
const { acquireAdoTokenSync } = require('./ado-token');
|
|
17
|
-
|
|
18
|
-
const PKG_NAME = '@azure-devops/mcp';
|
|
19
|
-
const BIN_NAME = 'mcp-server-azuredevops';
|
|
20
|
-
|
|
21
|
-
function resolveMcpBin() {
|
|
22
|
-
const pkgJsonPath = require.resolve(`${PKG_NAME}/package.json`);
|
|
23
|
-
const pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8'));
|
|
24
|
-
const binField = pkgJson.bin;
|
|
25
|
-
const relBin = typeof binField === 'string' ? binField : binField && binField[BIN_NAME];
|
|
26
|
-
if (!relBin) {
|
|
27
|
-
throw new Error(`${PKG_NAME} package.json is missing bin entry "${BIN_NAME}"`);
|
|
28
|
-
}
|
|
29
|
-
return path.resolve(path.dirname(pkgJsonPath), relBin);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
let token;
|
|
33
|
-
try {
|
|
34
|
-
token = acquireAdoTokenSync().token;
|
|
35
|
-
} catch (e) {
|
|
36
|
-
process.stderr.write('ado-mcp-wrapper: ADO auth failed: ' + e.message + '\n');
|
|
37
|
-
process.stderr.write('ado-mcp-wrapper: Run "az login" or refresh azureauth manually, then retry\n');
|
|
38
|
-
process.exit(1);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
let binPath;
|
|
42
|
-
try {
|
|
43
|
-
binPath = resolveMcpBin();
|
|
44
|
-
} catch (e) {
|
|
45
|
-
process.stderr.write('ado-mcp-wrapper: failed to resolve ' + PKG_NAME + ': ' + e.message + '\n');
|
|
46
|
-
process.stderr.write('ado-mcp-wrapper: run "npm install" in the minions checkout to restore the pinned dependency\n');
|
|
47
|
-
process.exit(1);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const args = process.argv.slice(2);
|
|
51
|
-
const child = spawn(process.execPath, [binPath, ...args], {
|
|
52
|
-
stdio: 'inherit',
|
|
53
|
-
env: { ...process.env, AZURE_DEVOPS_EXT_PAT: token, AZURE_DEVOPS_EXT_AZURE_RM_PAT: token },
|
|
54
|
-
windowsHide: true,
|
|
55
|
-
shell: false,
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
child.on('exit', (code) => process.exit(code || 0));
|
|
59
|
-
child.on('error', (err) => {
|
|
60
|
-
process.stderr.write('ado-mcp-wrapper: ' + err.message + '\n');
|
|
61
|
-
process.exit(1);
|
|
62
|
-
});
|
|
63
|
-
|