@yemi33/minions 0.1.2424 → 0.1.2426
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/install-internal-minions.js +1209 -0
- package/bin/minions.js +75 -9
- package/dashboard/docs/typography.md +27 -12
- package/dashboard/js/command-center.js +13 -11
- package/dashboard/js/live-stream.js +1 -1
- package/dashboard/js/memory-search.js +388 -43
- package/dashboard/js/modal-qa.js +5 -5
- package/dashboard/js/qa.js +39 -26
- package/dashboard/js/refresh.js +37 -18
- package/dashboard/js/render-agents.js +14 -18
- package/dashboard/js/render-dispatch.js +14 -74
- package/dashboard/js/render-inbox.js +3 -3
- package/dashboard/js/render-meetings.js +8 -8
- package/dashboard/js/render-other.js +45 -20
- package/dashboard/js/render-pipelines.js +6 -6
- package/dashboard/js/render-plans.js +14 -14
- package/dashboard/js/render-prd.js +46 -46
- package/dashboard/js/render-prs.js +9 -65
- package/dashboard/js/render-schedules.js +5 -5
- package/dashboard/js/render-skills.js +6 -6
- package/dashboard/js/render-utils.js +4 -4
- package/dashboard/js/render-watches.js +4 -16
- package/dashboard/js/render-work-items.js +95 -107
- package/dashboard/js/settings.js +175 -74
- package/dashboard/layout.html +3 -2
- package/dashboard/pages/inbox.html +1 -1
- package/dashboard/pages/work.html +1 -1
- package/dashboard/shared/model-display.js +9 -0
- package/dashboard/shared/watches-source.js +43 -0
- package/dashboard/shared/welcome-popup.js +259 -0
- package/dashboard/slim/body.html +6 -6
- package/dashboard/slim/js/chat.js +4 -2
- package/dashboard/slim/js/history.js +10 -3
- package/dashboard/slim/js/modals-tiles.js +85 -16
- package/dashboard/slim/js/status.js +12 -16
- package/dashboard/slim/styles.css +24 -4
- package/dashboard/styles.css +62 -27
- package/dashboard-build.js +8 -2
- package/dashboard.js +3854 -2514
- package/docs/README.md +7 -5
- package/docs/api-errors.md +144 -0
- package/docs/auto-discovery.md +83 -61
- package/docs/capture-demos.js +173 -30
- package/docs/command-center.md +5 -1
- package/docs/completion-reports.md +127 -11
- package/docs/constants.md +15 -3
- package/docs/constellation-style-telemetry.md +2 -2
- package/docs/copilot-cli-schema.md +32 -22
- package/docs/cross-repo-plans.md +30 -30
- package/docs/demo/memory-system.html +1 -1
- package/docs/deprecated.json +132 -18
- package/docs/diagnostics-memory.md +8 -4
- package/docs/human-vs-automated.md +2 -2
- package/docs/index.html +9 -2
- package/docs/internal-install.md +212 -0
- package/docs/kb-pr3223-cascade-archiving.md +16 -0
- package/docs/kb-pr696-merge-conflict-docs.md +23 -0
- package/docs/kb-sweep.md +2 -2
- package/docs/keep-processes.md +8 -1
- package/docs/live-checkout-mode.md +1 -1
- package/docs/managed-spawn.md +21 -3
- package/docs/named-agents.md +3 -2
- package/docs/onboarding.md +26 -0
- package/docs/plan-lifecycle.md +32 -32
- package/docs/pr-screenshots/pr-899/worker-pool-worktrees-AFTER.png +0 -0
- package/docs/pr-screenshots/pr-899/worker-pool-worktrees-BEFORE.png +0 -0
- package/docs/pr-screenshots/pr-979/auto-fix-pane-AFTER.png +0 -0
- package/docs/pr-screenshots/pr-979/auto-fix-pane-BEFORE.png +0 -0
- package/docs/pr-screenshots/pr-985/pr-column-em-dash-AFTER.png +0 -0
- package/docs/pr-screenshots/pr-985/pr-column-em-dash-BEFORE.png +0 -0
- package/docs/qa-runbook-lifecycle.md +67 -51
- package/docs/qa-runbooks.md +2 -2
- package/docs/runtime-adapters.md +101 -50
- package/docs/security.md +28 -0
- package/docs/self-improvement.md +47 -13
- package/docs/skills.md +29 -0
- package/docs/slim-ux/concepts.md +2 -2
- package/docs/specs/agent-configurability.md +43 -41
- package/docs/specs/agent-rename.md +13 -13
- package/docs/team-memory.md +283 -14
- package/docs/tutorials/01-install-and-connect.md +23 -0
- package/docs/tutorials/03-plan-driven-feature.md +3 -3
- package/docs/tutorials/04-runtimes-and-harness.md +18 -21
- package/docs/tutorials/08-operations-and-recovery.md +3 -2
- package/docs/tutorials/README.md +4 -3
- package/docs/visual-evidence-ci.md +103 -0
- package/docs/watches.md +35 -30
- package/docs/worktree-lifecycle.md +151 -13
- package/engine/acp-transport.js +1 -0
- package/engine/ado.js +80 -33
- package/engine/agent-api-validation.js +571 -0
- package/engine/agent-worker-pool.js +7 -6
- package/engine/api-contracts/agent-content.js +761 -0
- package/engine/api-contracts/cc-ops.js +219 -0
- package/engine/api-contracts/config-runtime.js +419 -0
- package/engine/api-contracts/core.js +138 -0
- package/engine/api-contracts/index.js +506 -0
- package/engine/api-contracts/orchestration.js +602 -0
- package/engine/api-contracts/pull-requests.js +323 -0
- package/engine/api-contracts/qa-process.js +764 -0
- package/engine/api-contracts/work-plan-prd.js +494 -0
- package/engine/api-validation.js +543 -0
- package/engine/cc-api-validation.js +586 -0
- package/engine/cc-worker-pool.js +9 -1
- package/engine/cleanup.js +393 -271
- package/engine/cli.js +65 -7
- package/engine/comment-classifier.js +70 -5
- package/engine/consolidation.js +123 -5
- package/engine/content-api-validation.js +606 -0
- package/engine/create-pr-worktree.js +22 -1
- package/engine/db/migrations/027-review-learning-lifecycle.js +162 -0
- package/engine/dispatch.js +33 -0
- package/engine/distribution.js +189 -0
- package/engine/execution-model.js +59 -0
- package/engine/features.js +12 -0
- package/engine/github.js +67 -25
- package/engine/harness-context.js +313 -0
- package/engine/inbox-store.js +1 -1
- package/engine/kb-sweep.js +161 -38
- package/engine/keep-process-sweep.js +43 -3
- package/engine/lifecycle.js +1066 -165
- package/engine/llm.js +4 -0
- package/engine/managed-spawn.js +463 -48
- package/engine/meeting.js +197 -34
- package/engine/memory-retrieval.js +280 -0
- package/engine/memory-store.js +821 -38
- package/engine/model-discovery.js +17 -3
- package/engine/pipeline.js +802 -14
- package/engine/plan-prd-validation.js +745 -0
- package/engine/playbook.js +206 -17
- package/engine/pooled-agent-process.js +6 -1
- package/engine/pr-action.js +1 -1
- package/engine/pr-issue-validation.js +653 -0
- package/engine/pr-resolve.js +75 -13
- package/engine/prd-store.js +39 -6
- package/engine/preflight.js +7 -2
- package/engine/process-utils.js +79 -31
- package/engine/projects.js +198 -12
- package/engine/promotion.js +371 -0
- package/engine/qa-from-prd.js +3 -0
- package/engine/qa-process-validation.js +572 -0
- package/engine/qa-runbooks.js +41 -37
- package/engine/qa-runners/maestro.js +11 -7
- package/engine/qa-runners/playwright.js +37 -14
- package/engine/qa-runners.js +9 -10
- package/engine/qa-runs.js +124 -11
- package/engine/qa-sessions.js +139 -40
- package/engine/quarantine-refs.js +81 -11
- package/engine/queries.js +163 -9
- package/engine/review-learning-backfill.js +482 -0
- package/engine/review-learning.js +1236 -0
- package/engine/runtimes/claude.js +60 -2
- package/engine/runtimes/codex.js +57 -16
- package/engine/runtimes/contract.js +21 -0
- package/engine/runtimes/copilot.js +51 -3
- package/engine/runtimes/index.js +1 -0
- package/engine/scheduler.js +201 -32
- package/engine/settings-validation.js +909 -0
- package/engine/shared.js +705 -208
- package/engine/spawn-agent.js +48 -21
- package/engine/steering-constraints.js +31 -0
- package/engine/steering-store.js +10 -2
- package/engine/steering.js +14 -2
- package/engine/timeout.js +404 -111
- package/engine/untrusted-fence.js +24 -10
- package/engine/watch-actions.js +7 -2
- package/engine/watches.js +353 -51
- package/engine/work-item-validation.js +561 -0
- package/engine/work-items-store.js +61 -1
- package/engine/worktree-gc.js +656 -37
- package/engine/worktree-preflight.js +154 -0
- package/engine.js +2068 -342
- package/package.json +1 -1
- package/playbooks/_pr-description-audit.md +88 -41
- package/playbooks/build-fix-complex.md +3 -3
- package/playbooks/docs.md +2 -2
- package/playbooks/fix.md +18 -18
- package/playbooks/implement.md +18 -18
- package/playbooks/qa-session-draft.md +10 -12
- package/playbooks/qa-session-execute.md +16 -12
- package/playbooks/qa-validate.md +8 -7
- package/playbooks/shared-rules.md +45 -0
- package/playbooks/test.md +4 -0
- package/prompts/cc-system.md +1 -1
- package/skills/check-self-authored-review-comment/SKILL.md +2 -2
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
function formatBytes(bytes) {
|
|
5
|
+
const value = Number(bytes);
|
|
6
|
+
if (!Number.isFinite(value) || value < 0) return 'unknown';
|
|
7
|
+
const units = ['B', 'KiB', 'MiB', 'GiB', 'TiB'];
|
|
8
|
+
let amount = value;
|
|
9
|
+
let unit = 0;
|
|
10
|
+
while (amount >= 1024 && unit < units.length - 1) {
|
|
11
|
+
amount /= 1024;
|
|
12
|
+
unit++;
|
|
13
|
+
}
|
|
14
|
+
const digits = unit >= 3 ? 2 : unit === 0 ? 0 : 1;
|
|
15
|
+
return `${amount.toFixed(digits)} ${units[unit]}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function nearestExistingAncestor(target, existsSync = fs.existsSync) {
|
|
19
|
+
let current;
|
|
20
|
+
try { current = path.resolve(String(target || '')); }
|
|
21
|
+
catch { return null; }
|
|
22
|
+
while (true) {
|
|
23
|
+
try {
|
|
24
|
+
if (existsSync(current)) return current;
|
|
25
|
+
} catch {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
const parent = path.dirname(current);
|
|
29
|
+
if (parent === current) return null;
|
|
30
|
+
current = parent;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function findConfiguredCheckoutHoldingBranch({
|
|
35
|
+
branch,
|
|
36
|
+
projects = [],
|
|
37
|
+
worktrees = [],
|
|
38
|
+
realPathForComparison = value => path.resolve(String(value)),
|
|
39
|
+
pathsOverlap = (first, second) => first === second,
|
|
40
|
+
} = {}) {
|
|
41
|
+
const targetBranch = typeof branch === 'string' ? branch.trim() : '';
|
|
42
|
+
if (!targetBranch) return null;
|
|
43
|
+
|
|
44
|
+
const configuredPaths = [];
|
|
45
|
+
for (const project of Array.isArray(projects) ? projects : []) {
|
|
46
|
+
if (!project?.localPath) continue;
|
|
47
|
+
try {
|
|
48
|
+
configuredPaths.push({
|
|
49
|
+
project,
|
|
50
|
+
path: realPathForComparison(project.localPath),
|
|
51
|
+
});
|
|
52
|
+
} catch {
|
|
53
|
+
// An unreadable configured path cannot be proven to own this worktree.
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
for (const worktree of Array.isArray(worktrees) ? worktrees : []) {
|
|
58
|
+
if (!worktree?.path || worktree.branch !== targetBranch) continue;
|
|
59
|
+
let holderPath;
|
|
60
|
+
try {
|
|
61
|
+
holderPath = realPathForComparison(worktree.path);
|
|
62
|
+
} catch {
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
const configured = configuredPaths.find(entry => pathsOverlap(entry.path, holderPath));
|
|
66
|
+
if (!configured) continue;
|
|
67
|
+
return {
|
|
68
|
+
branch: targetBranch,
|
|
69
|
+
holderPath: worktree.path,
|
|
70
|
+
holderProject: configured.project.name || null,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function checkWorktreeDiskSpace(opts = {}) {
|
|
77
|
+
const worktreeRoot = opts.worktreeRoot ? path.resolve(String(opts.worktreeRoot)) : '';
|
|
78
|
+
const requiredBytes = Math.max(0, Number(opts.minFreeBytes) || 0);
|
|
79
|
+
if (requiredBytes === 0) {
|
|
80
|
+
return {
|
|
81
|
+
ok: true,
|
|
82
|
+
reason: 'disabled',
|
|
83
|
+
worktreeRoot,
|
|
84
|
+
probePath: null,
|
|
85
|
+
requiredBytes,
|
|
86
|
+
availableBytes: null,
|
|
87
|
+
message: 'Worktree free-space preflight is disabled.',
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const probePath = nearestExistingAncestor(worktreeRoot, opts.existsSync || fs.existsSync);
|
|
92
|
+
if (!probePath) {
|
|
93
|
+
return {
|
|
94
|
+
ok: false,
|
|
95
|
+
reason: 'probe-failed',
|
|
96
|
+
worktreeRoot,
|
|
97
|
+
probePath: null,
|
|
98
|
+
requiredBytes,
|
|
99
|
+
availableBytes: null,
|
|
100
|
+
message: `Cannot find an existing filesystem ancestor for worktree root "${worktreeRoot}".`,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const statfsSync = opts.statfsSync || fs.statfsSync;
|
|
105
|
+
let stats;
|
|
106
|
+
try {
|
|
107
|
+
stats = statfsSync(probePath);
|
|
108
|
+
} catch (err) {
|
|
109
|
+
return {
|
|
110
|
+
ok: false,
|
|
111
|
+
reason: 'probe-failed',
|
|
112
|
+
worktreeRoot,
|
|
113
|
+
probePath,
|
|
114
|
+
requiredBytes,
|
|
115
|
+
availableBytes: null,
|
|
116
|
+
message: `Free-space probe failed for "${probePath}": ${err.message}`,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const blocks = Number(stats && (stats.bavail ?? stats.bfree));
|
|
121
|
+
const blockSize = Number(stats && (stats.bsize ?? stats.frsize));
|
|
122
|
+
const availableBytes = blocks * blockSize;
|
|
123
|
+
if (!Number.isFinite(availableBytes) || availableBytes < 0) {
|
|
124
|
+
return {
|
|
125
|
+
ok: false,
|
|
126
|
+
reason: 'probe-failed',
|
|
127
|
+
worktreeRoot,
|
|
128
|
+
probePath,
|
|
129
|
+
requiredBytes,
|
|
130
|
+
availableBytes: null,
|
|
131
|
+
message: `Free-space probe returned invalid capacity for "${probePath}".`,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const ok = availableBytes >= requiredBytes;
|
|
136
|
+
return {
|
|
137
|
+
ok,
|
|
138
|
+
reason: ok ? 'ok' : 'low-space',
|
|
139
|
+
worktreeRoot,
|
|
140
|
+
probePath,
|
|
141
|
+
requiredBytes,
|
|
142
|
+
availableBytes,
|
|
143
|
+
message: ok
|
|
144
|
+
? `Worktree filesystem has ${formatBytes(availableBytes)} available (minimum ${formatBytes(requiredBytes)}).`
|
|
145
|
+
: `Worktree checkout requires at least ${formatBytes(requiredBytes)} free, but only ${formatBytes(availableBytes)} is available at "${probePath}".`,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
module.exports = {
|
|
150
|
+
checkWorktreeDiskSpace,
|
|
151
|
+
findConfiguredCheckoutHoldingBranch,
|
|
152
|
+
formatBytes,
|
|
153
|
+
nearestExistingAncestor,
|
|
154
|
+
};
|