amicus 2.0.0 → 2.2.0
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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +108 -0
- package/README.md +16 -4
- package/bin/amicus.js +11 -93
- package/commands/council.md +14 -6
- package/package.json +1 -1
- package/skills/second-opinion/COUNCIL-DESIGN.md +68 -4
- package/skills/second-opinion/MODEL-NOTES.md +35 -2
- package/skills/second-opinion/SEAT-BRIEFS.md +190 -0
- package/skills/second-opinion/SKILL.md +78 -16
- package/skills/sidecar/SKILL.md +17 -14
- package/src/cli-handlers-abort.js +244 -0
- package/src/cli-handlers-doctor.js +13 -53
- package/src/cli-handlers-resume-continue.js +103 -0
- package/src/cli-handlers-run.js +5 -4
- package/src/cli-handlers.js +5 -120
- package/src/cli.js +20 -0
- package/src/mcp-server.js +8 -5
- package/src/mcp-tools.js +31 -21
- package/src/sidecar/continue.js +23 -8
- package/src/sidecar/resume.js +23 -8
- package/src/utils/abort-result.js +36 -0
- package/src/utils/cli-preflight.js +43 -0
- package/src/utils/doctor-mcp-checks.js +84 -0
- package/src/utils/input-validators.js +52 -1
- package/src/utils/mcp-discovery.js +51 -14
- package/src/utils/result-schema-version.js +14 -0
- package/src/utils/result-schema.js +10 -10
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
// src/utils/result-schema.js
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* @module result-schema
|
|
6
5
|
* Versioned, machine-parseable result documents for `--json` output (F4).
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Stability contract: fields are only ADDED within a SCHEMA_VERSION; any
|
|
7
|
+
* rename/removal bumps SCHEMA_VERSION (defined in ./result-schema-version.js,
|
|
8
|
+
* split out so ./abort-result.js can depend on it without a circular require).
|
|
10
9
|
*/
|
|
11
|
-
|
|
12
|
-
const SCHEMA_VERSION = 2;
|
|
10
|
+
const { SCHEMA_VERSION } = require('./result-schema-version');
|
|
13
11
|
|
|
14
12
|
/** Leg/run statuses that count as terminal for wave aggregation. */
|
|
15
13
|
const TERMINAL_STATUSES = ['complete', 'error', 'timeout', 'aborted', 'crashed', 'idle-timeout'];
|
|
@@ -159,8 +157,7 @@ function buildWaveResult({ waveId, legs = [], promptMeta = null, createdAt = nul
|
|
|
159
157
|
* @param {string} project - Project dir
|
|
160
158
|
* @param {string} taskId
|
|
161
159
|
* @returns {object} run document
|
|
162
|
-
* @throws {Error} if the session does not exist
|
|
163
|
-
* @throws {Error} if metadata.json is missing or corrupt
|
|
160
|
+
* @throws {Error} if the session does not exist or metadata.json is missing/corrupt
|
|
164
161
|
*/
|
|
165
162
|
function buildRunResultFromSession(project, taskId) {
|
|
166
163
|
const fs = require('fs');
|
|
@@ -189,8 +186,7 @@ function buildRunResultFromSession(project, taskId) {
|
|
|
189
186
|
* @param {string} project
|
|
190
187
|
* @param {string} waveId
|
|
191
188
|
* @returns {object} wave document
|
|
192
|
-
* @throws {Error} if the wave session does not exist
|
|
193
|
-
* @throws {Error} if metadata.json is missing or corrupt
|
|
189
|
+
* @throws {Error} if the wave session does not exist or metadata.json is missing/corrupt
|
|
194
190
|
*/
|
|
195
191
|
function buildWaveResultFromSession(project, waveId) {
|
|
196
192
|
const fs = require('fs');
|
|
@@ -283,6 +279,9 @@ function buildDoctorDoc({ version, timestamp, checks }) {
|
|
|
283
279
|
};
|
|
284
280
|
}
|
|
285
281
|
|
|
282
|
+
// buildAbortResult lives in ./abort-result.js (size-gate split); re-exported below.
|
|
283
|
+
const { buildAbortResult } = require('./abort-result');
|
|
284
|
+
|
|
286
285
|
module.exports = {
|
|
287
286
|
SCHEMA_VERSION,
|
|
288
287
|
TERMINAL_STATUSES,
|
|
@@ -297,4 +296,5 @@ module.exports = {
|
|
|
297
296
|
buildCatalogDoc,
|
|
298
297
|
buildAuditDoc,
|
|
299
298
|
buildDoctorDoc,
|
|
299
|
+
buildAbortResult,
|
|
300
300
|
};
|