@yemi33/minions 0.1.2022 → 0.1.2023
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/dashboard/js/refresh.js
CHANGED
|
@@ -152,8 +152,19 @@ function _processStatusUpdate(data) {
|
|
|
152
152
|
var _workItemsChanged = _changed('workItems', data.workItems);
|
|
153
153
|
if (_prsChanged) renderPrs(data.pullRequests || []);
|
|
154
154
|
if (_changed('archivedPrds', data.archivedPrds)) renderArchiveButtons(data.archivedPrds || []);
|
|
155
|
+
// renderEngineStatus is NOT gated by _changed('engine'): heartbeat
|
|
156
|
+
// staleness is wall-clock-relative (Date.now() - engine.heartbeat), so
|
|
157
|
+
// even when the snapshot bytes are byte-for-byte identical between polls
|
|
158
|
+
// (e.g. control.json mtime is intentionally excluded from the fast-state
|
|
159
|
+
// mtime tracker — see engine/queries.js#getStatusFastStateMtimePaths)
|
|
160
|
+
// the staleness verdict can flip both directions purely from time
|
|
161
|
+
// passing. Gating the call made the STALE banner stick after a CLI
|
|
162
|
+
// restart until some unrelated slice changed. The render is cheap and
|
|
163
|
+
// renderEngineAlert is idempotent (hides itself when state !== 'stale').
|
|
164
|
+
// The quick-stats block IS still gated to avoid pointless DOM writes
|
|
165
|
+
// when the underlying numbers haven't moved.
|
|
166
|
+
if (data.engine) renderEngineStatus(data.engine);
|
|
155
167
|
if (_changed('engine', data.engine)) {
|
|
156
|
-
renderEngineStatus(data.engine);
|
|
157
168
|
var qs = document.getElementById('engine-quick-stats');
|
|
158
169
|
if (qs && data.engine) {
|
|
159
170
|
var wt = data.engine.worktreeCount != null ? data.engine.worktreeCount : '-';
|
package/docs/auto-discovery.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Auto-Discovery & Execution Pipeline
|
|
2
2
|
|
|
3
|
-
> Last verified: 2026-05-
|
|
3
|
+
> Last verified: 2026-05-22 against `engine.js` `tickInner()` (lines 6068-6425).
|
|
4
4
|
|
|
5
5
|
How the minions engine finds work and dispatches agents automatically.
|
|
6
6
|
|
|
@@ -39,7 +39,7 @@ The engine does not cap review→fix cycles or build-fix attempts. Each trigger
|
|
|
39
39
|
### A. Human comments (`humanFeedback.pendingFix`)
|
|
40
40
|
|
|
41
41
|
- Gate: `pendingFix || coalescedFeedback` + not already dispatched/on cooldown
|
|
42
|
-
- Agent comments filtered out via
|
|
42
|
+
- Agent comments filtered out via `_isNonActionableComment()` (`engine/github.js`, `engine/ado.js`) — composes preview/bot body checks and the structural Minions-author check from `engine/comment-classifier.js`. The structural check matches the `<!-- minions:agent=<id> kind=<kind> -->` HTML marker on the body's first line (`hasMinionsMarker`); on GitHub it must combine with `viewerDidAuthor === true` (anti-spoof), on ADO with a `config.engine.minionsAdoIdentities` author match. Marker presence alone never classifies a comment as agent-authored on either platform.
|
|
43
43
|
- Coalesces multiple comments arriving during cooldown into single fix
|
|
44
44
|
- Routes to author
|
|
45
45
|
- Fix agents must treat human comments as claims to verify, not commands. They inspect or reproduce each claimed issue, make the smallest correct fix only when the claim is valid, and otherwise reply with evidence-backed rationale.
|
|
@@ -108,6 +108,7 @@ The engine does not cap review→fix cycles or build-fix attempts. Each trigger
|
|
|
108
108
|
| `engine/lifecycle.js` | `syncPrsFromOutput()`, `updatePrAfterReview()`, `updatePrAfterFix()` |
|
|
109
109
|
| `engine/github.js` | `pollPrStatus()`, `pollPrHumanComments()`, `fetchGhBuildErrorLog()` |
|
|
110
110
|
| `engine/ado.js` | `pollPrStatus()`, `pollPrHumanComments()`, `fetchAdoBuildErrorLog()` |
|
|
111
|
+
| `engine/comment-classifier.js` | Host-agnostic body-only predicates (`isPreviewStatusBody`, `hasMinionsMarker`, `hasVerdictPrefix`) shared by GH + ADO pollers (extracted in F2+F3+F4) |
|
|
111
112
|
| `engine/dispatch.js` | `addToDispatch()` — dedup by work item ID and dispatchKey |
|
|
112
113
|
| `engine/cooldown.js` | `isBranchActive()`, cooldown management |
|
|
113
114
|
| `playbooks/review.md` | Reviewer playbook |
|
package/docs/self-improvement.md
CHANGED
|
@@ -174,10 +174,10 @@ Human comments on PR with "@minions fix the error handling here"
|
|
|
174
174
|
|
|
175
175
|
### How it works
|
|
176
176
|
|
|
177
|
-
- **Trigger:**
|
|
178
|
-
- **Agent detection:** Comments
|
|
177
|
+
- **Trigger:** Any human comment newer than the per-PR cutoff that survives `_isNonActionableComment()` (preview/CI/Minions-author filter) flips `pr.humanFeedback.pendingFix = true` and queues a fix. There is no "@minions keyword required" gate — `@minions` mentions are merely stripped from `feedbackContent` before it is handed to the fix agent.
|
|
178
|
+
- **Agent detection:** Comments are filtered via `_isNonActionableComment()` in `engine/github.js` / `engine/ado.js`, which composes the body-only predicates from `engine/comment-classifier.js` (`isPreviewStatusBody`, `hasMinionsMarker`) with an identity gate (`viewerDidAuthor === true` on GitHub, `config.engine.minionsAdoIdentities` author match on ADO). Marker presence alone never classifies a comment as agent-authored on either platform.
|
|
179
179
|
- **Dedup:** Only comments newer than `pr.humanFeedback.lastProcessedCommentDate` are processed
|
|
180
|
-
- **Multiple comments:** All new
|
|
180
|
+
- **Multiple comments:** All new actionable comments since the cutoff are concatenated chronologically into a single fix task (each body individually fenced in `<UNTRUSTED-INPUT>` per F5 / W-mpeklod3000we69c)
|
|
181
181
|
- **After fix:** `pendingFix` is cleared; PR re-enters normal review cycle
|
|
182
182
|
|
|
183
183
|
## 5. Quality Metrics
|
package/docs/watches.md
CHANGED
|
@@ -49,7 +49,7 @@ When `stopAfter === 0`, these are **fire-once** — the engine flips the watch t
|
|
|
49
49
|
> **Per-target override (W-mp7hg58e000b5212):** the global `WATCH_ABSOLUTE_CONDITIONS` set is the legacy fallback. Each target type now declares its own `absoluteConditions: [...]` array in its spec; `registerTargetType` normalizes that into a `Set` that takes precedence at evaluation time. The plugin contract (see below) uses this to keep absolute-vs-change semantics local to each target type. Plugins that omit `absoluteConditions` get an empty set (all change-based).
|
|
50
50
|
|
|
51
51
|
### Change-based conditions
|
|
52
|
-
`status-change`, `any`, `new-comments`, `vote-change`, `stage-complete`, `ran`, `enabled`, `disabled`, `activity-change`, plus the predicate conditions added under P-w4e2f6a1 / P-w5b8d2c9 for the `pr`, `work-item`, `plan`, and `pipeline` target types (`head-commit-change`, `mergeable-flipped`, `behind-master`, `draft-flipped`, `stalled`, `dependency-met`, `stage-advanced`, `stuck-in-stage`). See `engine/shared.js:
|
|
52
|
+
`status-change`, `any`, `new-comments`, `vote-change`, `stage-complete`, `ran`, `enabled`, `disabled`, `activity-change`, plus the predicate conditions added under P-w4e2f6a1 / P-w5b8d2c9 for the `pr`, `work-item`, `plan`, and `pipeline` target types (`head-commit-change`, `mergeable-flipped`, `behind-master`, `draft-flipped`, `stalled`, `dependency-met`, `stage-advanced`, `stuck-in-stage`). See `engine/shared.js:2422-2460` for the canonical enum.
|
|
53
53
|
|
|
54
54
|
These compare the live entity against the watch's `_lastState` snapshot and run forever when `stopAfter === 0`. Baseline `_lastState` is captured on the first check so the very next change triggers the watch *(source: `engine/watches.js:434, 520`)*.
|
|
55
55
|
|
|
@@ -89,7 +89,7 @@ Canonical example: `watches.d/http.js` (W-mp7i22mu00191b07) — a generic HTTP p
|
|
|
89
89
|
|
|
90
90
|
### Built-in target types
|
|
91
91
|
|
|
92
|
-
The eight built-ins are registered at module load *(source: `engine/watches.js:672-
|
|
92
|
+
The eight built-ins are registered at module load *(source: `engine/watches.js:672-1313`)*. Constants live at `engine/shared.js:2412-2421` (`WATCH_TARGET_TYPE`).
|
|
93
93
|
|
|
94
94
|
| `targetType` | Target value | Conditions | Notes |
|
|
95
95
|
|---------------|--------------------------------------|----------------------------------------------------------------------------|-------|
|
|
@@ -174,7 +174,7 @@ I/O happens **outside the lock**: notifications via `writeToInbox`, follow-up ac
|
|
|
174
174
|
| `archive-plan` | Set PRD `status="archived"` + `archivedAt` |
|
|
175
175
|
| `resume-plan` | Set PRD `status=PLAN_STATUS.ACTIVE` and clear `planStale` |
|
|
176
176
|
|
|
177
|
-
Constants live in `WATCH_ACTION_TYPE` (`engine/shared.js:
|
|
177
|
+
Constants live in `WATCH_ACTION_TYPE` (`engine/shared.js:2491`); handlers in `engine/watch-actions.js`.
|
|
178
178
|
|
|
179
179
|
### Templating
|
|
180
180
|
|
|
@@ -245,7 +245,7 @@ Absolute conditions firing under `stopAfter === 0` flip `status` to `expired`; `
|
|
|
245
245
|
|
|
246
246
|
## See Also
|
|
247
247
|
|
|
248
|
-
- `engine/shared.js:
|
|
248
|
+
- `engine/shared.js:2406-2500` — `WATCH_STATUS`, `WATCH_TARGET_TYPE`, `WATCH_CONDITION`, `WATCH_ABSOLUTE_CONDITIONS`, `WATCH_ACTION_TYPE` constants
|
|
249
249
|
- `engine/watches.js` — registry, lifecycle, tick integration, `watches.d/` plugin loader
|
|
250
250
|
- `engine/watch-actions.js` — action registry and built-in handlers (including `minions-api`)
|
|
251
251
|
- `watches.d/http.js` — canonical user-extensible target type plugin
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2023",
|
|
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"
|