@yemi33/minions 0.1.2378 → 0.1.2380
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/bin/minions.js +19 -9
- package/dashboard/js/refresh.js +2 -3
- package/dashboard/js/render-prd.js +1 -1
- package/dashboard/js/render-work-items.js +13 -6
- package/dashboard.js +393 -721
- package/docs/README.md +1 -0
- package/docs/architecture-review-2026-07-09.md +2 -4
- package/docs/auto-discovery.md +36 -49
- package/docs/blog-first-successful-dispatch.md +1 -1
- package/docs/branch-derivation.md +2 -2
- package/docs/command-center.md +1 -1
- package/docs/completion-reports.md +14 -4
- package/docs/constellation-bridge.md +59 -10
- package/docs/constellation-style-telemetry.md +6 -6
- package/docs/cooldown-merge-semantics.md +4 -0
- package/docs/copilot-cli-schema.md +3 -3
- package/docs/cross-repo-plans.md +17 -17
- package/docs/deprecated.json +2 -2
- package/docs/design-inbox-entries-schema.md +31 -39
- package/docs/design-state-storage.md +1 -1
- package/docs/documentation-audit-2026-07-09.md +2 -2
- package/docs/engine-restart.md +20 -8
- package/docs/harness-mode.md +1 -1
- package/docs/managed-spawn.md +4 -4
- package/docs/onboarding.md +1 -2
- package/docs/pr-comment-followup.md +3 -3
- package/docs/pr-review-fix-loop.md +1 -1
- package/docs/proposals/repo-pool-for-live-checkout.md +1 -2
- package/docs/qa-runbook-lifecycle.md +4 -4
- package/docs/qa-runbooks.md +2 -2
- package/docs/rfc-completion-json.md +4 -1
- package/docs/runtime-adapters.md +1 -1
- package/docs/self-improvement.md +4 -5
- package/docs/shared-lifecycle-module-map.md +3 -1
- package/docs/slim-ux/architecture-suggestions.md +5 -6
- package/docs/slim-ux/concepts.md +23 -25
- package/docs/watches.md +7 -7
- package/docs/workspace-manifests.md +1 -1
- package/docs/worktree-lifecycle.md +1 -1
- package/engine/abandoned-pr-reconciliation.js +4 -5
- package/engine/acp-transport.js +49 -8
- package/engine/ado-status.js +5 -5
- package/engine/ado.js +20 -25
- package/engine/agent-worker-pool.js +124 -15
- package/engine/bridge.js +260 -5
- package/engine/cleanup.js +48 -131
- package/engine/cli.js +125 -83
- package/engine/cooldown.js +9 -16
- package/engine/db/index.js +22 -9
- package/engine/db/migrations/009-qa.js +1 -1
- package/engine/db/migrations/020-qa-session-scopes.js +23 -0
- package/engine/db/migrations/021-archived-work-items.js +72 -0
- package/engine/db/migrations/022-global-cc-session.js +31 -0
- package/engine/db/migrations/023-engine-state.js +30 -0
- package/engine/db/migrations/024-prd-ghost-collisions.js +53 -0
- package/engine/db/migrations/025-malformed-work-item-phantoms.js +33 -0
- package/engine/dispatch-store.js +2 -7
- package/engine/dispatch.js +34 -41
- package/engine/github.js +20 -27
- package/engine/lifecycle.js +221 -283
- package/engine/llm.js +1 -1
- package/engine/logs-store.js +2 -2
- package/engine/managed-spawn.js +2 -23
- package/engine/meeting.js +6 -6
- package/engine/metrics-store.js +2 -2
- package/engine/note-link-backfill.js +6 -11
- package/engine/pipeline.js +18 -36
- package/engine/playbook.js +1 -1
- package/engine/pooled-agent-process.js +46 -26
- package/engine/prd-store.js +73 -54
- package/engine/preflight.js +2 -5
- package/engine/projects.js +15 -62
- package/engine/pull-requests-store.js +0 -17
- package/engine/qa-runbooks.js +2 -2
- package/engine/qa-runs.js +1 -8
- package/engine/qa-sessions.js +41 -64
- package/engine/queries.js +120 -219
- package/engine/routing.js +3 -5
- package/engine/scheduler.js +0 -4
- package/engine/shared-branch-pr-reconcile.js +2 -3
- package/engine/shared.js +132 -637
- package/engine/small-state-store.js +89 -10
- package/engine/state-operations.js +16 -4
- package/engine/stdio-timestamps.js +1 -1
- package/engine/timeout.js +5 -12
- package/engine/watch-actions.js +20 -22
- package/engine/watches-store.js +1 -1
- package/engine/watches.js +6 -10
- package/engine/work-item-validation.js +52 -0
- package/engine/work-items-store.js +127 -29
- package/engine/worktree-gc.js +2 -2
- package/engine/worktree-pool.js +8 -18
- package/engine.js +167 -349
- package/minions.js +2 -2
- package/package.json +1 -1
- package/playbooks/plan-to-prd.md +2 -2
- package/playbooks/shared-rules.md +3 -3
- package/playbooks/templates/followup-dispatch.md +1 -1
- package/playbooks/verify.md +1 -1
- package/prompts/cc-system.md +2 -2
package/engine/routing.js
CHANGED
|
@@ -8,8 +8,7 @@ const path = require('path');
|
|
|
8
8
|
const shared = require('./shared');
|
|
9
9
|
const queries = require('./queries');
|
|
10
10
|
|
|
11
|
-
const { safeJson,
|
|
12
|
-
const { ENGINE_DIR, DISPATCH_PATH } = queries;
|
|
11
|
+
const { safeJson, safeRead, log, ts, WORK_TYPE } = shared;
|
|
13
12
|
|
|
14
13
|
const MINIONS_DIR = shared.MINIONS_DIR;
|
|
15
14
|
const ROUTING_PATH = path.join(MINIONS_DIR, 'routing.md');
|
|
@@ -83,8 +82,7 @@ function getMonthlySpend(agentId) {
|
|
|
83
82
|
}
|
|
84
83
|
|
|
85
84
|
function getAgentErrorRate(agentId) {
|
|
86
|
-
const
|
|
87
|
-
const metrics = safeJsonObj(metricsPath);
|
|
85
|
+
const metrics = queries.getMetrics() || {};
|
|
88
86
|
const m = metrics[agentId];
|
|
89
87
|
if (!m) return 0;
|
|
90
88
|
const total = m.tasksCompleted + m.tasksErrored;
|
|
@@ -93,7 +91,7 @@ function getAgentErrorRate(agentId) {
|
|
|
93
91
|
|
|
94
92
|
function isAgentIdle(agentId) {
|
|
95
93
|
// Dispatch queue is the single source of truth for agent availability
|
|
96
|
-
const dispatch =
|
|
94
|
+
const dispatch = queries.getDispatch();
|
|
97
95
|
return !(dispatch.active || []).some(d => d.agent === agentId);
|
|
98
96
|
}
|
|
99
97
|
|
package/engine/scheduler.js
CHANGED
|
@@ -22,14 +22,11 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
const fs = require('fs');
|
|
25
|
-
const path = require('path');
|
|
26
25
|
const shared = require('./shared');
|
|
27
26
|
const routing = require('./routing');
|
|
28
27
|
const harness = require('./harness');
|
|
29
28
|
const { safeJson, safeWrite, mutateJsonFileLocked, mutateScheduleRuns, ts, dateStamp, log, WI_STATUS, WORK_TYPE } = shared;
|
|
30
29
|
|
|
31
|
-
const SCHEDULE_RUNS_PATH = path.join(shared.MINIONS_DIR, 'engine', 'schedule-runs.json');
|
|
32
|
-
|
|
33
30
|
/**
|
|
34
31
|
* Compute the ISO 8601 week of the year for `date` as `YYYY-Www` (e.g.
|
|
35
32
|
* 2026-W23). Uses the standard ISO algorithm: Thursday of the target week
|
|
@@ -467,5 +464,4 @@ module.exports = {
|
|
|
467
464
|
resolveScheduleTemplateVars,
|
|
468
465
|
applyScheduleTemplateVarsRecursive,
|
|
469
466
|
buildScheduleTemplateVars,
|
|
470
|
-
SCHEDULE_RUNS_PATH,
|
|
471
467
|
};
|
|
@@ -116,13 +116,12 @@ async function _reconcilePrdForProject(plan, file, project, planIds) {
|
|
|
116
116
|
const remote = await _queryRemoteOpenPr(project, branch, mainRef);
|
|
117
117
|
if (!remote) return; // no remote PR -> nothing to heal
|
|
118
118
|
|
|
119
|
-
const
|
|
120
|
-
const { needsHeal } = _evaluateHeal(shared.safeJsonArr(prPath), project, remote, planIds);
|
|
119
|
+
const { needsHeal } = _evaluateHeal(shared.readPullRequests(project), project, remote, planIds);
|
|
121
120
|
if (!needsHeal) return; // fully-linked -> idempotent no-op
|
|
122
121
|
|
|
123
122
|
// upsertPullRequestRecord MERGES prdItems + calls addPrLink per item, yielding
|
|
124
123
|
// the aggregate shape (countDistinctPrdItems > 1) the dashboard renders.
|
|
125
|
-
const result = shared.upsertPullRequestRecord(
|
|
124
|
+
const result = shared.upsertPullRequestRecord(project, {
|
|
126
125
|
url: remote.url,
|
|
127
126
|
prNumber: remote.prNumber,
|
|
128
127
|
branch,
|