@yemi33/minions 0.1.2423 → 0.1.2425
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 +6 -4
- 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/internal-install.md +190 -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 +12 -7
- package/docs/managed-spawn.md +21 -3
- package/docs/named-agents.md +3 -2
- package/docs/plan-lifecycle.md +32 -32
- package/docs/pr-auto-fix-dispatch.md +3 -3
- package/docs/pr-review-fix-loop.md +6 -6
- 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/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,219 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
CC_API_LIMITS,
|
|
5
|
+
CC_IMAGE_MIME_TYPES,
|
|
6
|
+
TRANSCRIPT_ROLES,
|
|
7
|
+
TRIAGE_EFFORTS,
|
|
8
|
+
} = require('../cc-api-validation');
|
|
9
|
+
|
|
10
|
+
const transcriptField = () => ({
|
|
11
|
+
name: 'transcript',
|
|
12
|
+
type: 'array',
|
|
13
|
+
required: false,
|
|
14
|
+
maxItems: CC_API_LIMITS.transcriptMaxEntries,
|
|
15
|
+
itemType: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
fields: [
|
|
18
|
+
{ name: 'role', type: 'string', required: true, allowedValues: TRANSCRIPT_ROLES },
|
|
19
|
+
{ name: 'text', type: 'string', required: true, maxLength: CC_API_LIMITS.transcriptTextMaxChars },
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const commandCenterFields = (messageRequired = false) => [
|
|
25
|
+
{ name: 'message', type: 'string', required: messageRequired, maxLength: CC_API_LIMITS.messageMaxChars },
|
|
26
|
+
{ name: 'tabId', type: 'string', required: false, maxLength: CC_API_LIMITS.tabIdMaxChars },
|
|
27
|
+
{ name: 'sessionId', type: 'string', required: false, maxLength: CC_API_LIMITS.sessionIdMaxChars },
|
|
28
|
+
transcriptField(),
|
|
29
|
+
{
|
|
30
|
+
name: 'images',
|
|
31
|
+
type: 'array',
|
|
32
|
+
required: false,
|
|
33
|
+
maxItems: CC_API_LIMITS.imageMaxCount,
|
|
34
|
+
itemType: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
fields: [
|
|
37
|
+
{ name: 'mimeType', type: 'string', required: true, allowedValues: CC_IMAGE_MIME_TYPES },
|
|
38
|
+
{ name: 'dataBase64', type: 'string', required: true },
|
|
39
|
+
{ name: 'filename', type: 'string', required: false, maxLength: CC_API_LIMITS.imageFilenameMaxChars },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{ name: 'reconnect', type: 'boolean', required: false },
|
|
44
|
+
{
|
|
45
|
+
name: 'currentProject',
|
|
46
|
+
type: 'string',
|
|
47
|
+
required: false,
|
|
48
|
+
maxLength: CC_API_LIMITS.projectNameMaxChars,
|
|
49
|
+
allowedValuesSource: 'config.projects[].name',
|
|
50
|
+
},
|
|
51
|
+
{ name: 'noProjectSelected', type: 'boolean', required: false },
|
|
52
|
+
{ name: 'intentMetadata', type: 'object', required: false, maxBytes: CC_API_LIMITS.metadataMaxBytes },
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
const docChatFields = () => [
|
|
56
|
+
{ name: 'message', type: 'string', required: true, maxLength: CC_API_LIMITS.messageMaxChars },
|
|
57
|
+
{ name: 'document', type: 'string', required: true, maxLength: CC_API_LIMITS.documentMaxChars },
|
|
58
|
+
{ name: 'title', type: 'string', required: false, maxLength: CC_API_LIMITS.titleMaxChars },
|
|
59
|
+
{ name: 'filePath', type: 'path', required: false, maxLength: CC_API_LIMITS.filePathMaxChars },
|
|
60
|
+
{ name: 'selection', type: 'string', required: false, maxLength: CC_API_LIMITS.selectionMaxChars },
|
|
61
|
+
{ name: 'contentHash', type: 'string', required: false, maxLength: CC_API_LIMITS.contentHashMaxChars },
|
|
62
|
+
transcriptField(),
|
|
63
|
+
{ name: 'model', type: 'string', required: false, maxLength: CC_API_LIMITS.modelMaxChars },
|
|
64
|
+
{ name: 'freshSession', type: 'boolean', required: false },
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
const ccHeaders = {
|
|
68
|
+
policy: 'optional',
|
|
69
|
+
fields: [
|
|
70
|
+
{ name: 'X-CC-Turn-Id', type: 'string', required: false, maxLength: 80 },
|
|
71
|
+
],
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const commonNegativeTests = [
|
|
75
|
+
{ strategy: 'omit-required-field', expectedStatus: 400 },
|
|
76
|
+
{ strategy: 'use-wrong-field-type', expectedStatus: 400 },
|
|
77
|
+
{ strategy: 'exceed-field-or-array-limit', expectedStatus: 400 },
|
|
78
|
+
{ strategy: 'violate-cross-field-constraint', expectedStatus: 400 },
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
const docConstraints = [
|
|
82
|
+
{ kind: 'sandboxed-path', field: 'filePath', root: 'MINIONS_DIR', rejectProtectedLivePaths: true },
|
|
83
|
+
{ kind: 'fingerprint-of', field: 'contentHash', sourceField: 'document' },
|
|
84
|
+
{ kind: 'unsupported-field', field: 'images' },
|
|
85
|
+
];
|
|
86
|
+
|
|
87
|
+
module.exports = {
|
|
88
|
+
owner: 'cc-ops',
|
|
89
|
+
routes: [
|
|
90
|
+
'POST /api/doc-chat',
|
|
91
|
+
'POST /api/doc-chat/stream',
|
|
92
|
+
'POST /api/doc-chat/warm',
|
|
93
|
+
'POST /api/command-center/new-session',
|
|
94
|
+
'POST /api/command-center/abort',
|
|
95
|
+
'POST /api/command-center',
|
|
96
|
+
'POST /api/command-center/triage',
|
|
97
|
+
'POST /api/command-center/stream',
|
|
98
|
+
'GET /api/cc-sessions',
|
|
99
|
+
'POST /api/cc-sessions/warm',
|
|
100
|
+
'DELETE /api/cc-sessions/<id>',
|
|
101
|
+
],
|
|
102
|
+
bodyless: [
|
|
103
|
+
'POST /api/command-center/new-session',
|
|
104
|
+
'DELETE /api/cc-sessions/<id>',
|
|
105
|
+
],
|
|
106
|
+
overrides: {
|
|
107
|
+
'GET /api/cc-sessions': { noInput: true },
|
|
108
|
+
'POST /api/doc-chat': {
|
|
109
|
+
audit: 'audited',
|
|
110
|
+
body: { policy: 'required', fields: docChatFields() },
|
|
111
|
+
headers: ccHeaders,
|
|
112
|
+
constraints: docConstraints,
|
|
113
|
+
negativeTests: commonNegativeTests,
|
|
114
|
+
},
|
|
115
|
+
'POST /api/doc-chat/stream': {
|
|
116
|
+
audit: 'audited',
|
|
117
|
+
body: { policy: 'required', fields: docChatFields() },
|
|
118
|
+
headers: ccHeaders,
|
|
119
|
+
constraints: docConstraints,
|
|
120
|
+
negativeTests: commonNegativeTests,
|
|
121
|
+
},
|
|
122
|
+
'POST /api/doc-chat/warm': {
|
|
123
|
+
audit: 'audited',
|
|
124
|
+
body: {
|
|
125
|
+
policy: 'required',
|
|
126
|
+
fields: [
|
|
127
|
+
{ name: 'filePath', type: 'path', required: false, maxLength: CC_API_LIMITS.filePathMaxChars },
|
|
128
|
+
{ name: 'title', type: 'string', required: false, maxLength: CC_API_LIMITS.titleMaxChars },
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
constraints: [
|
|
132
|
+
{ kind: 'at-least-one', fields: ['filePath', 'title'] },
|
|
133
|
+
docConstraints[0],
|
|
134
|
+
],
|
|
135
|
+
negativeTests: commonNegativeTests,
|
|
136
|
+
},
|
|
137
|
+
'POST /api/command-center/abort': {
|
|
138
|
+
audit: 'audited',
|
|
139
|
+
body: {
|
|
140
|
+
policy: 'required',
|
|
141
|
+
fields: [
|
|
142
|
+
{ name: 'tabId', type: 'string', required: false, maxLength: CC_API_LIMITS.tabIdMaxChars },
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
negativeTests: [
|
|
146
|
+
{ strategy: 'use-invalid-tab-id', expectedStatus: 400 },
|
|
147
|
+
],
|
|
148
|
+
},
|
|
149
|
+
'POST /api/command-center/new-session': {
|
|
150
|
+
audit: 'audited',
|
|
151
|
+
negativeTests: [
|
|
152
|
+
{ strategy: 'send-unexpected-body', expectedStatus: 400 },
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
'POST /api/command-center': {
|
|
156
|
+
audit: 'audited',
|
|
157
|
+
body: { policy: 'required', fields: commandCenterFields(true).filter(field => field.name !== 'reconnect') },
|
|
158
|
+
headers: ccHeaders,
|
|
159
|
+
constraints: [
|
|
160
|
+
{ kind: 'requires', field: 'sessionId', requiredField: 'tabId' },
|
|
161
|
+
{ kind: 'mutually-exclusive', fields: ['currentProject', 'noProjectSelected:true'] },
|
|
162
|
+
],
|
|
163
|
+
negativeTests: commonNegativeTests,
|
|
164
|
+
},
|
|
165
|
+
'POST /api/command-center/triage': {
|
|
166
|
+
audit: 'audited',
|
|
167
|
+
body: {
|
|
168
|
+
policy: 'required',
|
|
169
|
+
fields: [
|
|
170
|
+
{ name: 'message', type: 'string', required: true, maxLength: CC_API_LIMITS.messageMaxChars },
|
|
171
|
+
{ name: 'watchId', type: 'string', required: false, maxLength: CC_API_LIMITS.watchIdMaxChars },
|
|
172
|
+
{ name: 'effort', type: 'string', required: false, allowedValues: TRIAGE_EFFORTS },
|
|
173
|
+
],
|
|
174
|
+
},
|
|
175
|
+
negativeTests: commonNegativeTests,
|
|
176
|
+
},
|
|
177
|
+
'POST /api/command-center/stream': {
|
|
178
|
+
audit: 'audited',
|
|
179
|
+
body: { policy: 'required', fields: commandCenterFields() },
|
|
180
|
+
headers: ccHeaders,
|
|
181
|
+
constraints: [
|
|
182
|
+
{ kind: 'message-unless', unless: 'reconnect:true' },
|
|
183
|
+
{ kind: 'requires', field: 'sessionId', requiredField: 'tabId' },
|
|
184
|
+
{ kind: 'requires', field: 'reconnect:true', requiredField: 'tabId' },
|
|
185
|
+
{
|
|
186
|
+
kind: 'mutually-exclusive',
|
|
187
|
+
fields: ['reconnect:true', 'message|transcript|images|intentMetadata|currentProject|noProjectSelected'],
|
|
188
|
+
},
|
|
189
|
+
{ kind: 'mutually-exclusive', fields: ['currentProject', 'noProjectSelected:true'] },
|
|
190
|
+
],
|
|
191
|
+
negativeTests: commonNegativeTests,
|
|
192
|
+
},
|
|
193
|
+
'POST /api/cc-sessions/warm': {
|
|
194
|
+
audit: 'audited',
|
|
195
|
+
body: {
|
|
196
|
+
policy: 'required',
|
|
197
|
+
fields: [
|
|
198
|
+
{ name: 'tabId', type: 'string', required: true, maxLength: CC_API_LIMITS.tabIdMaxChars },
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
negativeTests: [
|
|
202
|
+
{ strategy: 'omit-or-malform-tab-id', expectedStatus: 400 },
|
|
203
|
+
],
|
|
204
|
+
},
|
|
205
|
+
'DELETE /api/cc-sessions/<id>': {
|
|
206
|
+
audit: 'audited',
|
|
207
|
+
path: {
|
|
208
|
+
policy: 'required',
|
|
209
|
+
fields: [
|
|
210
|
+
{ name: 'id', type: 'string', required: true, maxLength: CC_API_LIMITS.tabIdMaxChars },
|
|
211
|
+
],
|
|
212
|
+
},
|
|
213
|
+
negativeTests: [
|
|
214
|
+
{ strategy: 'use-oversized-path-id', expectedStatus: 400 },
|
|
215
|
+
{ strategy: 'send-unexpected-body', expectedStatus: 400 },
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
};
|
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
owner: 'config-runtime',
|
|
5
|
+
routes: [
|
|
6
|
+
'GET /api/resolve-area',
|
|
7
|
+
'POST /api/projects/browse',
|
|
8
|
+
'POST /api/projects/scan',
|
|
9
|
+
'POST /api/projects/confirm-token',
|
|
10
|
+
'POST /api/projects/add',
|
|
11
|
+
'POST /api/projects/remove',
|
|
12
|
+
'GET /api/runtimes',
|
|
13
|
+
'POST /api/runtimes/<runtime>/models/refresh',
|
|
14
|
+
'GET /api/runtimes/<runtime>/models',
|
|
15
|
+
'GET /api/settings',
|
|
16
|
+
'POST /api/settings',
|
|
17
|
+
'POST /api/settings/routing',
|
|
18
|
+
'POST /api/settings/reset',
|
|
19
|
+
'GET /api/features',
|
|
20
|
+
'POST /api/features/toggle',
|
|
21
|
+
'GET /api/welcome',
|
|
22
|
+
'POST /api/welcome/ack',
|
|
23
|
+
'POST /api/diagnostics/refresh',
|
|
24
|
+
'GET /api/diagnostics/ado-throttle',
|
|
25
|
+
'GET /api/diagnostics/ado-token',
|
|
26
|
+
'GET /api/diagnostics/memory',
|
|
27
|
+
'GET /api/diagnostics/memory/history',
|
|
28
|
+
'POST /api/diagnostics/heap-snapshot',
|
|
29
|
+
],
|
|
30
|
+
bodyless: [
|
|
31
|
+
'POST /api/projects/confirm-token',
|
|
32
|
+
'POST /api/runtimes/<runtime>/models/refresh',
|
|
33
|
+
'POST /api/settings/reset',
|
|
34
|
+
'POST /api/diagnostics/heap-snapshot',
|
|
35
|
+
'POST /api/welcome/ack',
|
|
36
|
+
],
|
|
37
|
+
overrides: {
|
|
38
|
+
'POST /api/projects/browse': {
|
|
39
|
+
audit: 'audited',
|
|
40
|
+
body: {
|
|
41
|
+
policy: 'optional',
|
|
42
|
+
fields: [
|
|
43
|
+
{ name: 'modernPicker', type: 'boolean', required: false, default: false },
|
|
44
|
+
{ name: 'initialPath', type: 'path', required: false, maxLength: 4096 },
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
constraints: [
|
|
48
|
+
{
|
|
49
|
+
kind: 'conditional-use',
|
|
50
|
+
field: 'initialPath',
|
|
51
|
+
when: { field: 'modernPicker', equals: true },
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
negativeTests: [
|
|
55
|
+
{ strategy: 'invalid-picker-flag-before-os-dialog', expectedStatus: 400 },
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
'POST /api/projects/scan': {
|
|
59
|
+
audit: 'audited',
|
|
60
|
+
body: {
|
|
61
|
+
policy: 'required',
|
|
62
|
+
fields: [
|
|
63
|
+
{ name: 'path', type: 'path', required: false, maxLength: 4096, defaultSource: 'os.homedir()' },
|
|
64
|
+
{ name: 'depth', type: 'integer', required: false, default: 3, min: 1, max: 6 },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
constraints: [
|
|
68
|
+
{ kind: 'existing-directory', field: 'path', location: 'body' },
|
|
69
|
+
{ kind: 'validate-before-discovery', fields: ['path', 'depth'] },
|
|
70
|
+
],
|
|
71
|
+
negativeTests: [
|
|
72
|
+
{ strategy: 'out-of-range-depth-before-scan', expectedStatus: 400 },
|
|
73
|
+
{ strategy: 'non-directory-path', expectedStatus: 400 },
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
'POST /api/projects/confirm-token': {
|
|
77
|
+
audit: 'audited',
|
|
78
|
+
noInputReason: 'Mints a short-lived single-use token and accepts no caller input.',
|
|
79
|
+
constraints: [
|
|
80
|
+
{ kind: 'single-use-token', ttlMs: 300000, consumer: 'POST /api/projects/add' },
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
'POST /api/projects/add': {
|
|
84
|
+
audit: 'audited',
|
|
85
|
+
body: {
|
|
86
|
+
policy: 'required',
|
|
87
|
+
fields: [
|
|
88
|
+
{ name: 'path', type: 'path', required: true, maxLength: 4096 },
|
|
89
|
+
{ name: 'name', type: 'string', required: false, maxLength: 64, pattern: '^[A-Za-z0-9_-]+$' },
|
|
90
|
+
{ name: 'allowNonRepo', type: 'boolean', required: false, default: false },
|
|
91
|
+
{ name: 'confirmToken', type: 'identifier', required: false, maxLength: 36 },
|
|
92
|
+
{ name: 'checkoutMode', type: 'string', required: false, allowedValuesSource: 'shared.CHECKOUT_MODES' },
|
|
93
|
+
{ name: 'worktreeMode', type: 'string', required: false, allowedValuesSource: 'shared.validateCheckoutMode legacy aliases' },
|
|
94
|
+
{ name: 'observeAuthors', type: 'array<string>', required: false, maxLength: 100 },
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
aliases: [
|
|
98
|
+
{ name: 'worktreeMode', canonical: 'checkoutMode' },
|
|
99
|
+
],
|
|
100
|
+
constraints: [
|
|
101
|
+
{ kind: 'existing-directory', field: 'path', location: 'body' },
|
|
102
|
+
{ kind: 'conditional-requires', field: 'allowNonRepo', equals: true, requires: 'confirmToken' },
|
|
103
|
+
{ kind: 'single-use-token', field: 'confirmToken', location: 'body' },
|
|
104
|
+
{ kind: 'validate-before-discovery', fields: ['name', 'allowNonRepo', 'confirmToken', 'checkoutMode', 'worktreeMode', 'observeAuthors'] },
|
|
105
|
+
],
|
|
106
|
+
negativeTests: [
|
|
107
|
+
{ strategy: 'invalid-name-before-discovery', expectedStatus: 400 },
|
|
108
|
+
{ strategy: 'invalid-boolean-before-discovery', expectedStatus: 400 },
|
|
109
|
+
{ strategy: 'invalid-checkout-mode-before-discovery', expectedStatus: 400 },
|
|
110
|
+
{ strategy: 'reused-confirmation-token', expectedStatus: 400 },
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
'POST /api/projects/remove': {
|
|
114
|
+
audit: 'audited',
|
|
115
|
+
body: {
|
|
116
|
+
policy: 'required',
|
|
117
|
+
fields: [
|
|
118
|
+
{ name: 'name', type: 'string', required: false, maxLength: 64, allowedValuesSource: 'config.projects[].name' },
|
|
119
|
+
{ name: 'path', type: 'path', required: false, maxLength: 4096, allowedValuesSource: 'config.projects[].localPath' },
|
|
120
|
+
{ name: 'keepData', type: 'boolean', required: false, default: false },
|
|
121
|
+
{ name: 'purge', type: 'boolean', required: false, default: false },
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
constraints: [
|
|
125
|
+
{ kind: 'exactly-one-of', fields: ['name', 'path'] },
|
|
126
|
+
{ kind: 'mutually-exclusive', fields: ['keepData', 'purge'], whenTruthy: true },
|
|
127
|
+
{ kind: 'validate-before-project-removal', fields: ['name', 'path', 'keepData', 'purge'] },
|
|
128
|
+
],
|
|
129
|
+
negativeTests: [
|
|
130
|
+
{ strategy: 'conflicting-project-selector', expectedStatus: 400 },
|
|
131
|
+
{ strategy: 'conflicting-removal-flags', expectedStatus: 400 },
|
|
132
|
+
{ strategy: 'unknown-project', expectedStatus: 404 },
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
'GET /api/runtimes': {
|
|
136
|
+
audit: 'audited',
|
|
137
|
+
noInputReason: 'Lists the canonical runtime registry and accepts no caller input.',
|
|
138
|
+
},
|
|
139
|
+
'POST /api/runtimes/<runtime>/models/refresh': {
|
|
140
|
+
audit: 'audited',
|
|
141
|
+
path: {
|
|
142
|
+
policy: 'required',
|
|
143
|
+
fields: [
|
|
144
|
+
{
|
|
145
|
+
name: 'runtime',
|
|
146
|
+
type: 'identifier',
|
|
147
|
+
required: true,
|
|
148
|
+
maxLength: 128,
|
|
149
|
+
allowedValuesSource: 'runtimes.listRuntimes()',
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
constraints: [
|
|
154
|
+
{ kind: 'decoded-before-cache-mutation', field: 'runtime', location: 'path' },
|
|
155
|
+
],
|
|
156
|
+
negativeTests: [
|
|
157
|
+
{ strategy: 'unknown-runtime-before-cache-invalidation', expectedStatus: 404 },
|
|
158
|
+
{ strategy: 'encoded-path-separator', expectedStatus: 400 },
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
'GET /api/runtimes/<runtime>/models': {
|
|
162
|
+
audit: 'audited',
|
|
163
|
+
path: {
|
|
164
|
+
policy: 'required',
|
|
165
|
+
fields: [
|
|
166
|
+
{
|
|
167
|
+
name: 'runtime',
|
|
168
|
+
type: 'identifier',
|
|
169
|
+
required: true,
|
|
170
|
+
maxLength: 128,
|
|
171
|
+
allowedValuesSource: 'runtimes.listRuntimes()',
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
},
|
|
175
|
+
constraints: [
|
|
176
|
+
{ kind: 'decoded-before-model-read', field: 'runtime', location: 'path' },
|
|
177
|
+
],
|
|
178
|
+
negativeTests: [
|
|
179
|
+
{ strategy: 'unknown-runtime', expectedStatus: 404 },
|
|
180
|
+
{ strategy: 'encoded-path-separator', expectedStatus: 400 },
|
|
181
|
+
],
|
|
182
|
+
},
|
|
183
|
+
'GET /api/features': {
|
|
184
|
+
audit: 'audited',
|
|
185
|
+
noInputReason: 'Lists the canonical feature registry and accepts no caller input.',
|
|
186
|
+
},
|
|
187
|
+
'GET /api/welcome': {
|
|
188
|
+
audit: 'audited',
|
|
189
|
+
noInputReason: 'Reads the internal-distribution welcome state from the installed package manifest and SQL small-state; accepts no caller-supplied body, path, query, or header input.',
|
|
190
|
+
},
|
|
191
|
+
'POST /api/welcome/ack': {
|
|
192
|
+
audit: 'audited',
|
|
193
|
+
noInputReason: 'Acknowledges the internal welcome popup for the current runtime installation; the installation id is server-resolved, so the request carries no caller input.',
|
|
194
|
+
},
|
|
195
|
+
'GET /api/settings': {
|
|
196
|
+
audit: 'audited',
|
|
197
|
+
},
|
|
198
|
+
'POST /api/settings': {
|
|
199
|
+
audit: 'audited',
|
|
200
|
+
body: {
|
|
201
|
+
policy: 'optional',
|
|
202
|
+
fields: [
|
|
203
|
+
{
|
|
204
|
+
name: 'engine',
|
|
205
|
+
type: 'object',
|
|
206
|
+
required: false,
|
|
207
|
+
shapeSource: 'ENGINE_DEFAULTS and settings validation rules',
|
|
208
|
+
allowedValuesSource: 'runtime registry names and capabilities',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: 'claude',
|
|
212
|
+
type: 'object',
|
|
213
|
+
required: false,
|
|
214
|
+
shapeSource: 'DEFAULT_CLAUDE compatibility fields',
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: 'agents',
|
|
218
|
+
type: 'object',
|
|
219
|
+
required: false,
|
|
220
|
+
allowedValuesSource: 'config.agents keys',
|
|
221
|
+
shapeSource: 'agent settings and workspace manifest validators',
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: 'projects',
|
|
225
|
+
type: 'array',
|
|
226
|
+
required: false,
|
|
227
|
+
allowedValuesSource: 'config.projects[].name',
|
|
228
|
+
shapeSource: 'project settings validators',
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
name: 'features',
|
|
232
|
+
type: 'object',
|
|
233
|
+
required: false,
|
|
234
|
+
allowedValuesSource: 'features registry',
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
},
|
|
238
|
+
aliases: [
|
|
239
|
+
{ name: 'agents.*.skills', canonical: 'agents.*.expertise', deprecated: true },
|
|
240
|
+
{ name: 'projects[].worktreeMode', canonical: 'projects[].checkoutMode', deprecated: true },
|
|
241
|
+
],
|
|
242
|
+
constraints: [
|
|
243
|
+
{
|
|
244
|
+
kind: 'atomic-candidate',
|
|
245
|
+
description: 'The complete candidate is validated before config or in-memory state changes.',
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
kind: 'clear-sentinel',
|
|
249
|
+
values: ['', null],
|
|
250
|
+
description: 'Optional runtime, model, agent, and project overrides accept established clear sentinels.',
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
kind: 'dynamic-registry',
|
|
254
|
+
sources: ['runtime registry', 'features registry', 'configured agents', 'configured projects'],
|
|
255
|
+
},
|
|
256
|
+
],
|
|
257
|
+
negativeTests: [
|
|
258
|
+
{ strategy: 'mixed-valid-invalid-atomic-rejection', expectedStatus: 422 },
|
|
259
|
+
{ strategy: 'runtime-model-discovery-unavailable', expectedStatus: 503 },
|
|
260
|
+
],
|
|
261
|
+
},
|
|
262
|
+
'POST /api/settings/routing': {
|
|
263
|
+
audit: 'audited',
|
|
264
|
+
body: {
|
|
265
|
+
policy: 'required',
|
|
266
|
+
fields: [
|
|
267
|
+
{ name: 'content', type: 'string', required: true },
|
|
268
|
+
],
|
|
269
|
+
},
|
|
270
|
+
constraints: [
|
|
271
|
+
{ kind: 'atomic-text-replacement', field: 'content' },
|
|
272
|
+
],
|
|
273
|
+
negativeTests: [
|
|
274
|
+
{ strategy: 'reject-non-string-routing-content', expectedStatus: 422 },
|
|
275
|
+
],
|
|
276
|
+
},
|
|
277
|
+
'POST /api/settings/reset': {
|
|
278
|
+
audit: 'audited',
|
|
279
|
+
noInputReason: 'Reset derives a complete candidate from ENGINE_DEFAULTS and DEFAULT_AGENTS and accepts no caller input.',
|
|
280
|
+
},
|
|
281
|
+
'GET /api/resolve-area': {
|
|
282
|
+
audit: 'audited',
|
|
283
|
+
query: {
|
|
284
|
+
policy: 'required',
|
|
285
|
+
fields: [
|
|
286
|
+
{
|
|
287
|
+
name: 'project',
|
|
288
|
+
type: 'string',
|
|
289
|
+
required: true,
|
|
290
|
+
allowedValuesSource: 'config.projects[].name',
|
|
291
|
+
},
|
|
292
|
+
{ name: 'token', type: 'string', required: true },
|
|
293
|
+
],
|
|
294
|
+
},
|
|
295
|
+
negativeTests: [
|
|
296
|
+
{ strategy: 'omit-required-query-field', expectedStatus: 400 },
|
|
297
|
+
{ strategy: 'use-unknown-project', expectedStatus: 404 },
|
|
298
|
+
],
|
|
299
|
+
},
|
|
300
|
+
'GET /api/diagnostics/ado-throttle': {
|
|
301
|
+
audit: 'audited',
|
|
302
|
+
noInputReason: 'Snapshots the in-memory per-org ADO throttle tracker; accepts no caller-supplied body, path, query, or header input.',
|
|
303
|
+
},
|
|
304
|
+
'GET /api/diagnostics/ado-token': {
|
|
305
|
+
audit: 'audited',
|
|
306
|
+
noInputReason: 'Reads the ADO token-acquisition health snapshot; accepts no caller-supplied body, path, query, or header input.',
|
|
307
|
+
},
|
|
308
|
+
'GET /api/diagnostics/memory': {
|
|
309
|
+
audit: 'audited',
|
|
310
|
+
noInputReason: 'Reads the latest dashboard and engine memory samples; accepts no caller-supplied body, path, query, or header input.',
|
|
311
|
+
},
|
|
312
|
+
'POST /api/features/toggle': {
|
|
313
|
+
audit: 'audited',
|
|
314
|
+
body: {
|
|
315
|
+
policy: 'required',
|
|
316
|
+
fields: [
|
|
317
|
+
{ name: 'id', type: 'identifier', required: true, maxLength: 128, allowedValuesSource: 'features.FEATURES keys' },
|
|
318
|
+
{ name: 'enabled', type: 'boolean', required: true },
|
|
319
|
+
],
|
|
320
|
+
},
|
|
321
|
+
constraints: [
|
|
322
|
+
{ kind: 'validate-before-config-mutation', fields: ['id', 'enabled'] },
|
|
323
|
+
],
|
|
324
|
+
negativeTests: [
|
|
325
|
+
{ strategy: 'unknown-feature', expectedStatus: 404 },
|
|
326
|
+
{ strategy: 'non-boolean-enabled', expectedStatus: 400 },
|
|
327
|
+
],
|
|
328
|
+
},
|
|
329
|
+
'POST /api/diagnostics/refresh': {
|
|
330
|
+
audit: 'audited',
|
|
331
|
+
body: {
|
|
332
|
+
policy: 'required',
|
|
333
|
+
fields: [
|
|
334
|
+
{
|
|
335
|
+
name: 'entries',
|
|
336
|
+
type: 'array',
|
|
337
|
+
required: true,
|
|
338
|
+
maxLength: 500,
|
|
339
|
+
items: {
|
|
340
|
+
type: 'object',
|
|
341
|
+
fields: [
|
|
342
|
+
{ name: 'ts', type: 'integer', required: false, min: 0 },
|
|
343
|
+
{
|
|
344
|
+
name: 'kind',
|
|
345
|
+
type: 'identifier',
|
|
346
|
+
required: false,
|
|
347
|
+
allowedValues: ['refresh', 'visibility'],
|
|
348
|
+
},
|
|
349
|
+
],
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
],
|
|
353
|
+
},
|
|
354
|
+
headers: {
|
|
355
|
+
policy: 'optional',
|
|
356
|
+
fields: [
|
|
357
|
+
{
|
|
358
|
+
name: 'X-Minions-Dashboard-Tab',
|
|
359
|
+
type: 'identifier',
|
|
360
|
+
required: false,
|
|
361
|
+
maxLength: 80,
|
|
362
|
+
},
|
|
363
|
+
{ name: 'X-Minions-Dashboard-Url', type: 'string', required: false, maxLength: 200 },
|
|
364
|
+
{ name: 'User-Agent', type: 'string', required: false, maxLength: 200 },
|
|
365
|
+
],
|
|
366
|
+
},
|
|
367
|
+
negativeTests: [
|
|
368
|
+
{ strategy: 'omit-entries', expectedStatus: 400 },
|
|
369
|
+
{ strategy: 'send-non-array-entries', expectedStatus: 400 },
|
|
370
|
+
{ strategy: 'exceed-entry-count-cap', expectedStatus: 400 },
|
|
371
|
+
{ strategy: 'send-non-object-entry', expectedStatus: 400 },
|
|
372
|
+
{ strategy: 'send-invalid-diagnostic-identifier', expectedStatus: 400 },
|
|
373
|
+
],
|
|
374
|
+
},
|
|
375
|
+
'GET /api/diagnostics/memory/history': {
|
|
376
|
+
audit: 'audited',
|
|
377
|
+
query: {
|
|
378
|
+
policy: 'required',
|
|
379
|
+
fields: [
|
|
380
|
+
{ name: 'process', type: 'string', required: true, allowedValues: ['engine', 'dashboard'] },
|
|
381
|
+
{ name: 'limit', type: 'integer', required: false, min: 1, max: 1440 },
|
|
382
|
+
],
|
|
383
|
+
},
|
|
384
|
+
negativeTests: [
|
|
385
|
+
{ strategy: 'omit-process', expectedStatus: 400 },
|
|
386
|
+
{ strategy: 'use-unknown-process', expectedStatus: 400 },
|
|
387
|
+
{ strategy: 'use-non-integer-limit', expectedStatus: 400 },
|
|
388
|
+
{ strategy: 'use-out-of-range-limit', expectedStatus: 400 },
|
|
389
|
+
],
|
|
390
|
+
},
|
|
391
|
+
'POST /api/diagnostics/heap-snapshot': {
|
|
392
|
+
audit: 'audited',
|
|
393
|
+
query: {
|
|
394
|
+
policy: 'required',
|
|
395
|
+
fields: [
|
|
396
|
+
{
|
|
397
|
+
name: 'confirm',
|
|
398
|
+
type: 'string',
|
|
399
|
+
required: true,
|
|
400
|
+
allowedValues: ['YES_I_UNDERSTAND_THIS_STALLS_THE_ENGINE'],
|
|
401
|
+
},
|
|
402
|
+
],
|
|
403
|
+
},
|
|
404
|
+
constraints: [
|
|
405
|
+
{
|
|
406
|
+
kind: 'literal-confirmation',
|
|
407
|
+
field: 'confirm',
|
|
408
|
+
location: 'query',
|
|
409
|
+
},
|
|
410
|
+
],
|
|
411
|
+
negativeTests: [
|
|
412
|
+
{ strategy: 'omit-confirmation', expectedStatus: 400 },
|
|
413
|
+
{ strategy: 'use-wrong-confirmation', expectedStatus: 400 },
|
|
414
|
+
{ strategy: 'send-confirmation-in-body', expectedStatus: 400 },
|
|
415
|
+
{ strategy: 'send-empty-object-body', expectedStatus: 400 },
|
|
416
|
+
],
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
};
|