@zhixuan92/multi-model-agent 3.12.7 → 4.0.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/README.md +10 -4
- package/dist/cli/install-skill.d.ts +7 -7
- package/dist/cli/install-skill.d.ts.map +1 -1
- package/dist/cli/install-skill.js +56 -11
- package/dist/cli/install-skill.js.map +1 -1
- package/dist/cli/serve.d.ts.map +1 -1
- package/dist/cli/serve.js +17 -3
- package/dist/cli/serve.js.map +1 -1
- package/dist/cli/update-skills.js +3 -3
- package/dist/cli/update-skills.js.map +1 -1
- package/dist/http/async-dispatch.d.ts +1 -1
- package/dist/http/async-dispatch.d.ts.map +1 -1
- package/dist/http/async-dispatch.js +3 -38
- package/dist/http/async-dispatch.js.map +1 -1
- package/dist/http/cwd-validator.d.ts.map +1 -1
- package/dist/http/cwd-validator.js +3 -0
- package/dist/http/cwd-validator.js.map +1 -1
- package/dist/http/execution-context.d.ts +8 -6
- package/dist/http/execution-context.d.ts.map +1 -1
- package/dist/http/execution-context.js +33 -15
- package/dist/http/execution-context.js.map +1 -1
- package/dist/http/handler-deps.d.ts +11 -3
- package/dist/http/handler-deps.d.ts.map +1 -1
- package/dist/http/handlers/control/batch-slice.d.ts +1 -1
- package/dist/http/handlers/control/batch-slice.d.ts.map +1 -1
- package/dist/http/handlers/control/batch.d.ts +1 -2
- package/dist/http/handlers/control/batch.d.ts.map +1 -1
- package/dist/http/handlers/control/batch.js +0 -15
- package/dist/http/handlers/control/batch.js.map +1 -1
- package/dist/http/handlers/control/context-blocks.d.ts +7 -5
- package/dist/http/handlers/control/context-blocks.d.ts.map +1 -1
- package/dist/http/handlers/control/context-blocks.js +34 -13
- package/dist/http/handlers/control/context-blocks.js.map +1 -1
- package/dist/http/handlers/control/retry.d.ts +1 -1
- package/dist/http/handlers/control/retry.d.ts.map +1 -1
- package/dist/http/handlers/control/retry.js +32 -20
- package/dist/http/handlers/control/retry.js.map +1 -1
- package/dist/http/handlers/introspection/health.d.ts +16 -10
- package/dist/http/handlers/introspection/health.d.ts.map +1 -1
- package/dist/http/handlers/introspection/health.js +9 -12
- package/dist/http/handlers/introspection/health.js.map +1 -1
- package/dist/http/handlers/introspection/status.d.ts +1 -1
- package/dist/http/handlers/introspection/status.d.ts.map +1 -1
- package/dist/http/handlers/introspection/status.js +1 -1
- package/dist/http/handlers/introspection/status.js.map +1 -1
- package/dist/http/handlers/introspection/tools-list.d.ts +1 -1
- package/dist/http/handlers/introspection/tools-list.d.ts.map +1 -1
- package/dist/http/handlers/introspection/tools-list.js +1 -1
- package/dist/http/handlers/introspection/tools-list.js.map +1 -1
- package/dist/http/handlers/tools/audit.d.ts +1 -1
- package/dist/http/handlers/tools/audit.d.ts.map +1 -1
- package/dist/http/handlers/tools/audit.js +14 -8
- package/dist/http/handlers/tools/audit.js.map +1 -1
- package/dist/http/handlers/tools/debug.d.ts +1 -1
- package/dist/http/handlers/tools/debug.d.ts.map +1 -1
- package/dist/http/handlers/tools/debug.js +14 -8
- package/dist/http/handlers/tools/debug.js.map +1 -1
- package/dist/http/handlers/tools/delegate.d.ts +1 -1
- package/dist/http/handlers/tools/delegate.d.ts.map +1 -1
- package/dist/http/handlers/tools/delegate.js +14 -21
- package/dist/http/handlers/tools/delegate.js.map +1 -1
- package/dist/http/handlers/tools/execute-plan.d.ts +1 -1
- package/dist/http/handlers/tools/execute-plan.d.ts.map +1 -1
- package/dist/http/handlers/tools/execute-plan.js +18 -25
- package/dist/http/handlers/tools/execute-plan.js.map +1 -1
- package/dist/http/handlers/tools/explore.d.ts +1 -1
- package/dist/http/handlers/tools/explore.d.ts.map +1 -1
- package/dist/http/handlers/tools/explore.js +20 -13
- package/dist/http/handlers/tools/explore.js.map +1 -1
- package/dist/http/handlers/tools/investigate.d.ts +1 -1
- package/dist/http/handlers/tools/investigate.d.ts.map +1 -1
- package/dist/http/handlers/tools/investigate.js +28 -22
- package/dist/http/handlers/tools/investigate.js.map +1 -1
- package/dist/http/handlers/tools/retry.d.ts +1 -1
- package/dist/http/handlers/tools/retry.d.ts.map +1 -1
- package/dist/http/handlers/tools/retry.js +65 -17
- package/dist/http/handlers/tools/retry.js.map +1 -1
- package/dist/http/handlers/tools/review.d.ts +1 -1
- package/dist/http/handlers/tools/review.d.ts.map +1 -1
- package/dist/http/handlers/tools/review.js +14 -8
- package/dist/http/handlers/tools/review.js.map +1 -1
- package/dist/http/handlers/tools/verify.d.ts +1 -1
- package/dist/http/handlers/tools/verify.d.ts.map +1 -1
- package/dist/http/handlers/tools/verify.js +14 -8
- package/dist/http/handlers/tools/verify.js.map +1 -1
- package/dist/http/middleware/caller-identity.js +1 -1
- package/dist/http/middleware/caller-identity.js.map +1 -1
- package/dist/http/project-registry.d.ts.map +1 -1
- package/dist/http/project-registry.js +0 -2
- package/dist/http/project-registry.js.map +1 -1
- package/dist/http/request-observability.js +2 -2
- package/dist/http/request-observability.js.map +1 -1
- package/dist/http/request-pipeline.d.ts +3 -2
- package/dist/http/request-pipeline.d.ts.map +1 -1
- package/dist/http/request-pipeline.js +1 -1
- package/dist/http/request-pipeline.js.map +1 -1
- package/dist/http/server.d.ts +1 -1
- package/dist/http/server.d.ts.map +1 -1
- package/dist/http/server.js +127 -55
- package/dist/http/server.js.map +1 -1
- package/dist/http/types.d.ts +8 -1
- package/dist/http/types.d.ts.map +1 -1
- package/dist/http/wire/delegate-wire.d.ts +4 -0
- package/dist/http/wire/delegate-wire.d.ts.map +1 -0
- package/dist/http/wire/delegate-wire.js +16 -0
- package/dist/http/wire/delegate-wire.js.map +1 -0
- package/dist/http/wire/execute-plan-wire.d.ts +18 -0
- package/dist/http/wire/execute-plan-wire.d.ts.map +1 -0
- package/dist/http/wire/execute-plan-wire.js +26 -0
- package/dist/http/wire/execute-plan-wire.js.map +1 -0
- package/dist/http/wire/register-all-handlers.d.ts +3 -0
- package/dist/http/wire/register-all-handlers.d.ts.map +1 -0
- package/dist/http/wire/register-all-handlers.js +25 -0
- package/dist/http/wire/register-all-handlers.js.map +1 -0
- package/dist/http/wire/registry.d.ts +3 -0
- package/dist/http/wire/registry.d.ts.map +1 -0
- package/dist/http/wire/registry.js +20 -0
- package/dist/http/wire/registry.js.map +1 -0
- package/dist/install/discover.d.ts +9 -1
- package/dist/install/discover.d.ts.map +1 -1
- package/dist/install/discover.js +14 -1
- package/dist/install/discover.js.map +1 -1
- package/dist/install/headers.d.ts +1 -1
- package/dist/install/headers.d.ts.map +1 -1
- package/dist/install/manifest-resolve.d.ts +7 -1
- package/dist/install/manifest-resolve.d.ts.map +1 -1
- package/dist/install/manifest-resolve.js +23 -4
- package/dist/install/manifest-resolve.js.map +1 -1
- package/dist/install/manifest.d.ts.map +1 -1
- package/dist/install/manifest.js +2 -26
- package/dist/install/manifest.js.map +1 -1
- package/dist/install/missing-skills.d.ts +8 -1
- package/dist/install/missing-skills.d.ts.map +1 -1
- package/dist/install/missing-skills.js +9 -0
- package/dist/install/missing-skills.js.map +1 -1
- package/dist/install/orchestrate.d.ts +13 -1
- package/dist/install/orchestrate.d.ts.map +1 -1
- package/dist/install/orchestrate.js +48 -3
- package/dist/install/orchestrate.js.map +1 -1
- package/dist/install/skill-manifest-sync.d.ts +11 -0
- package/dist/install/skill-manifest-sync.d.ts.map +1 -0
- package/dist/install/skill-manifest-sync.js +65 -0
- package/dist/install/skill-manifest-sync.js.map +1 -0
- package/dist/openapi.d.ts.map +1 -1
- package/dist/openapi.js +88 -35
- package/dist/openapi.js.map +1 -1
- package/dist/skills/_shared/error-handling.md +1 -1
- package/dist/skills/_shared/polling.md +3 -4
- package/dist/skills/_shared/response-shape.md +5 -7
- package/dist/skills/_shared/verify-and-review.md +2 -2
- package/dist/skills/mma-audit/SKILL.md +17 -7
- package/dist/skills/mma-context-blocks/SKILL.md +5 -5
- package/dist/skills/mma-debug/SKILL.md +17 -7
- package/dist/skills/mma-delegate/SKILL.md +13 -2
- package/dist/skills/mma-execute-plan/SKILL.md +13 -4
- package/dist/skills/mma-explore/SKILL.md +10 -4
- package/dist/skills/mma-investigate/SKILL.md +18 -8
- package/dist/skills/mma-retry/SKILL.md +7 -1
- package/dist/skills/mma-review/SKILL.md +17 -7
- package/dist/skills/mma-verify/SKILL.md +17 -7
- package/dist/skills/multi-model-agent/SKILL.md +14 -15
- package/dist/telemetry/consent.d.ts +1 -1
- package/dist/telemetry/consent.d.ts.map +1 -1
- package/dist/telemetry/consent.js +1 -1
- package/dist/telemetry/consent.js.map +1 -1
- package/dist/telemetry/flusher.js +1 -1
- package/dist/telemetry/flusher.js.map +1 -1
- package/dist/telemetry/notice.d.ts +1 -1
- package/dist/telemetry/notice.d.ts.map +1 -1
- package/dist/telemetry/recorder.d.ts +2 -2
- package/dist/telemetry/recorder.d.ts.map +1 -1
- package/dist/telemetry/recorder.js +12 -11
- package/dist/telemetry/recorder.js.map +1 -1
- package/package.json +2 -2
- package/dist/http/cross-tier-guard.d.ts +0 -15
- package/dist/http/cross-tier-guard.d.ts.map +0 -1
- package/dist/http/cross-tier-guard.js +0 -30
- package/dist/http/cross-tier-guard.js.map +0 -1
- package/dist/http/handlers/control/clarifications.d.ts +0 -19
- package/dist/http/handlers/control/clarifications.d.ts.map +0 -1
- package/dist/http/handlers/control/clarifications.js +0 -58
- package/dist/http/handlers/control/clarifications.js.map +0 -1
- package/dist/http/test-provider-override.d.ts +0 -4
- package/dist/http/test-provider-override.d.ts.map +0 -1
- package/dist/http/test-provider-override.js +0 -17
- package/dist/http/test-provider-override.js.map +0 -1
- package/dist/skills/mma-clarifications/SKILL.md +0 -129
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
// Install/uninstall orchestration. Pure logic — no CLI/argv handling.
|
|
2
2
|
// Extracted from cli/install-skill.ts as part of Ch 7 Task 39.
|
|
3
|
+
import fs from 'node:fs';
|
|
3
4
|
import path from 'node:path';
|
|
4
|
-
import { SkillNotFoundError, getSkillsRoot, readSkillContent } from '
|
|
5
|
-
import { writeSkillToClient, removeSkillFromClient } from './manifest-resolve.js';
|
|
5
|
+
import { SkillNotFoundError, getSkillsRoot, readSkillContent, SUPPORTED_SKILLS } from '@zhixuan92/multi-model-agent-core/tool-surface/discover';
|
|
6
|
+
import { writeSkillToClient, removeSkillFromClient, resolveClientInstallDir, } from './manifest-resolve.js';
|
|
7
|
+
/**
|
|
8
|
+
* Scan an install directory for `mma-*` subdirectories and remove any that
|
|
9
|
+
* are not in `canonicalSkills`. Returns the list of removed skill names.
|
|
10
|
+
*
|
|
11
|
+
* Only applies to clients that use per-skill directories (claude-code, codex).
|
|
12
|
+
* Gemini and Cursor use single-file models and are handled separately.
|
|
13
|
+
*/
|
|
14
|
+
export function activeCleanup(installDir, canonicalSkills) {
|
|
15
|
+
let entries;
|
|
16
|
+
try {
|
|
17
|
+
entries = fs.readdirSync(installDir);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
const present = entries.filter((name) => name.startsWith('mma-'));
|
|
23
|
+
const orphaned = present.filter((name) => !canonicalSkills.includes(name));
|
|
24
|
+
for (const orphan of orphaned) {
|
|
25
|
+
const dirPath = path.join(installDir, orphan);
|
|
26
|
+
fs.rmSync(dirPath, { recursive: true, force: true });
|
|
27
|
+
}
|
|
28
|
+
return orphaned;
|
|
29
|
+
}
|
|
6
30
|
/**
|
|
7
31
|
* Install a skill to the specified client targets.
|
|
8
32
|
* - dryRun=true: checks skill existence; does NOT write files or update manifest.
|
|
@@ -28,7 +52,28 @@ export function doInstall(skillName, targets, opts) {
|
|
|
28
52
|
installed.push(target);
|
|
29
53
|
}
|
|
30
54
|
}
|
|
31
|
-
|
|
55
|
+
// Active cleanup: runs after writes complete. Opt-in so single-skill
|
|
56
|
+
// invocations don't accidentally wipe other canonical skills.
|
|
57
|
+
let orphanedSkills;
|
|
58
|
+
if (opts.cleanupOrphans && !opts.dryRun) {
|
|
59
|
+
orphanedSkills = {};
|
|
60
|
+
for (const target of targets) {
|
|
61
|
+
const installDir = resolveClientInstallDir(target, opts.homeDir);
|
|
62
|
+
if (installDir !== null) {
|
|
63
|
+
const removed = activeCleanup(installDir, SUPPORTED_SKILLS);
|
|
64
|
+
if (removed.length > 0)
|
|
65
|
+
orphanedSkills[target] = removed;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
skill: skillName,
|
|
71
|
+
action: 'installed',
|
|
72
|
+
targets: installed,
|
|
73
|
+
skipped,
|
|
74
|
+
dryRun: opts.dryRun,
|
|
75
|
+
...(orphanedSkills ? { orphanedSkills } : {}),
|
|
76
|
+
};
|
|
32
77
|
}
|
|
33
78
|
/**
|
|
34
79
|
* Uninstall a skill from the specified client targets.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrate.js","sourceRoot":"","sources":["../../src/install/orchestrate.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,+DAA+D;AAC/D,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"orchestrate.js","sourceRoot":"","sources":["../../src/install/orchestrate.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,+DAA+D;AAC/D,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,yDAAyD,CAAC;AAChJ,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAe/B;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,UAAkB,EAAE,eAAkC;IAClF,IAAI,OAAiB,CAAC;IACtB,IAAI,CAAC;QACH,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CA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AM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACtC,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;aAAM,CAAC;YACN,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;YAC5D,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;AACvG,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Client } from './manifest.js';
|
|
2
|
+
export interface DriftEntry {
|
|
3
|
+
skill: string;
|
|
4
|
+
client: Client;
|
|
5
|
+
issue: 'missing' | 'outdated' | 'orphan';
|
|
6
|
+
}
|
|
7
|
+
export interface SkillManifestSync {
|
|
8
|
+
driftReport(): DriftEntry[];
|
|
9
|
+
}
|
|
10
|
+
export declare function makeSkillManifestSync(perClientInstallDirs: Partial<Record<Client, string>>): SkillManifestSync;
|
|
11
|
+
//# sourceMappingURL=skill-manifest-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-manifest-sync.d.ts","sourceRoot":"","sources":["../../src/install/skill-manifest-sync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAG5C,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;CAC1C;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,IAAI,UAAU,EAAE,CAAC;CAC7B;AAcD,wBAAgB,qBAAqB,CAAC,oBAAoB,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,iBAAiB,CAuC9G"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { readdirSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { SUPPORTED_SKILLS, readSkillContent } from './discover.js';
|
|
4
|
+
import matter from 'gray-matter';
|
|
5
|
+
function canonicalVersion(skillName) {
|
|
6
|
+
const content = readSkillContent(skillName);
|
|
7
|
+
if (content === null)
|
|
8
|
+
return null;
|
|
9
|
+
try {
|
|
10
|
+
const parsed = matter(content);
|
|
11
|
+
const v = parsed.data['version'];
|
|
12
|
+
return typeof v === 'string' ? v : null;
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export function makeSkillManifestSync(perClientInstallDirs) {
|
|
19
|
+
return {
|
|
20
|
+
driftReport() {
|
|
21
|
+
const drift = [];
|
|
22
|
+
const supported = new Set(SUPPORTED_SKILLS);
|
|
23
|
+
for (const [client, dir] of Object.entries(perClientInstallDirs)) {
|
|
24
|
+
let entries;
|
|
25
|
+
try {
|
|
26
|
+
entries = readdirSync(dir);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const present = new Set(entries.filter(n => n.startsWith('mma-') || n === 'multi-model-agent'));
|
|
32
|
+
for (const exp of supported) {
|
|
33
|
+
if (!present.has(exp))
|
|
34
|
+
drift.push({ skill: exp, client: client, issue: 'missing' });
|
|
35
|
+
}
|
|
36
|
+
for (const got of present) {
|
|
37
|
+
if (!supported.has(got)) {
|
|
38
|
+
drift.push({ skill: got, client: client, issue: 'orphan' });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
for (const skill of present) {
|
|
42
|
+
if (!supported.has(skill))
|
|
43
|
+
continue;
|
|
44
|
+
const canonVer = canonicalVersion(skill);
|
|
45
|
+
if (canonVer === null)
|
|
46
|
+
continue;
|
|
47
|
+
const installedPath = join(dir, skill, 'SKILL.md');
|
|
48
|
+
try {
|
|
49
|
+
const installedContent = readFileSync(installedPath, 'utf-8');
|
|
50
|
+
const parsed = matter(installedContent);
|
|
51
|
+
const installedVer = parsed.data['version'];
|
|
52
|
+
if (typeof installedVer === 'string' && installedVer !== canonVer) {
|
|
53
|
+
drift.push({ skill, client: client, issue: 'outdated' });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// skip outdated check if installed SKILL.md is unreadable
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return drift;
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=skill-manifest-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-manifest-sync.js","sourceRoot":"","sources":["../../src/install/skill-manifest-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,MAAM,MAAM,aAAa,CAAC;AAYjC,SAAS,gBAAgB,CAAC,SAAiB;IACzC,MAAM,OAAO,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC5C,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAClC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CA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KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;oBACxE,CAAC;gBACH,CAAC;gBACD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;oBAC5B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;wBAAE,SAAS;oBACpC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;oBACzC,IAAI,QAAQ,KAAK,IAAI;wBAAE,SAAS;oBAChC,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;oBACnD,IAAI,CAAC;wBACH,MAAM,gBAAgB,GAAG,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;wBAC9D,MAAM,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;wBACxC,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;wBAC5C,IAAI,OAAO,YAAY,KAAK,QAAQ,IAAI,YAAY,KAAK,QAAQ,EAAE,CAAC;4BAClE,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAgB,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;wBACrE,CAAC;oBACH,CAAC;oBAAC,MAAM,CAAC;wBACP,0DAA0D;oBAC5D,CAAC;gBACH,CAAC;YACH,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/openapi.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../src/openapi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../src/openapi.ts"],"names":[],"mappings":"AAmFA,qEAAqE;AACrE,QAAA,MAAM,aAAa;;;;;;;;CAMlB,CAAC;AAyDF,wBAAgB,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAiKzD;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAExE;AAGD,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/openapi.js
CHANGED
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
// directly into OpenAPI request body schemas.
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { extendZodWithOpenApi, OpenAPIRegistry, OpenApiGeneratorV3, } from '@asteasolutions/zod-to-openapi';
|
|
10
|
-
import * as delegate from '@zhixuan92/multi-model-agent-core/
|
|
11
|
-
import * as audit from '@zhixuan92/multi-model-agent-core/
|
|
12
|
-
import * as review from '@zhixuan92/multi-model-agent-core/
|
|
13
|
-
import * as verify from '@zhixuan92/multi-model-agent-core/
|
|
14
|
-
import * as debug from '@zhixuan92/multi-model-agent-core/
|
|
15
|
-
import * as executePlan from '@zhixuan92/multi-model-agent-core/
|
|
16
|
-
import * as retry from '@zhixuan92/multi-model-agent-core/
|
|
17
|
-
import * as investigate from '@zhixuan92/multi-model-agent-core/
|
|
18
|
-
import * as explore from '@zhixuan92/multi-model-agent-core/
|
|
10
|
+
import * as delegate from '@zhixuan92/multi-model-agent-core/tools/delegate/schema';
|
|
11
|
+
import * as audit from '@zhixuan92/multi-model-agent-core/tools/audit/schema';
|
|
12
|
+
import * as review from '@zhixuan92/multi-model-agent-core/tools/review/schema';
|
|
13
|
+
import * as verify from '@zhixuan92/multi-model-agent-core/tools/verify/schema';
|
|
14
|
+
import * as debug from '@zhixuan92/multi-model-agent-core/tools/debug/schema';
|
|
15
|
+
import * as executePlan from '@zhixuan92/multi-model-agent-core/tools/execute-plan/schema';
|
|
16
|
+
import * as retry from '@zhixuan92/multi-model-agent-core/tools/retry/schema';
|
|
17
|
+
import * as investigate from '@zhixuan92/multi-model-agent-core/tools/investigate/schema';
|
|
18
|
+
import * as explore from '@zhixuan92/multi-model-agent-core/tools/explore/schema';
|
|
19
19
|
// Extend Zod once with openapi support.
|
|
20
20
|
extendZodWithOpenApi(z);
|
|
21
21
|
/** Sort an object's keys recursively for deterministic JSON serialization. */
|
|
@@ -30,6 +30,36 @@ function sortKeys(obj) {
|
|
|
30
30
|
}
|
|
31
31
|
return sorted;
|
|
32
32
|
}
|
|
33
|
+
// ── v4.0 component schemas ───────────────────────────────────────────────────
|
|
34
|
+
/** 4-field token usage shape (v4.0). */
|
|
35
|
+
const tokenUsageSchema = z.object({
|
|
36
|
+
inputTokens: z.number().int().min(0).describe('Prompt/input tokens consumed'),
|
|
37
|
+
outputTokens: z.number().int().min(0).describe('Completion/output tokens produced'),
|
|
38
|
+
cachedReadTokens: z.number().int().min(0).describe('Input tokens served from cache read'),
|
|
39
|
+
cachedNonReadTokens: z.number().int().min(0).describe('Input tokens written to cache but not read'),
|
|
40
|
+
});
|
|
41
|
+
/** v4.0 output envelope (terminal response shape). */
|
|
42
|
+
const outputEnvelopeSchema = z.object({
|
|
43
|
+
headline: z.string().min(1).describe('One-line summary of the outcome'),
|
|
44
|
+
results: z.array(z.unknown()).describe('Per-task result items'),
|
|
45
|
+
batchTimings: z.object({}).passthrough().describe('Wall-clock and per-phase timings'),
|
|
46
|
+
costSummary: z.object({
|
|
47
|
+
totalCostUSD: z.number().min(0).describe('Total estimated cost in USD'),
|
|
48
|
+
tokenUsage: tokenUsageSchema.describe('Aggregated token consumption'),
|
|
49
|
+
}).passthrough().describe('Cost and token metering summary'),
|
|
50
|
+
structuredReport: z.object({}).passthrough().describe('Structured report object (tool-specific schema)'),
|
|
51
|
+
error: z.object({
|
|
52
|
+
code: z.string().min(1),
|
|
53
|
+
message: z.string().min(1),
|
|
54
|
+
details: z.unknown().optional(),
|
|
55
|
+
}).optional().describe('Terminal error if the batch failed'),
|
|
56
|
+
annotatorConfidence: z.number().min(0).max(1).optional()
|
|
57
|
+
.describe('Annotator confidence score (0-1) when the review policy produced annotations'),
|
|
58
|
+
specReviewVerdict: z.enum(['approved', 'concerns', 'changes_required', 'annotated', 'error', 'skipped', 'not_applicable']).optional(),
|
|
59
|
+
qualityReviewVerdict: z.enum(['approved', 'concerns', 'changes_required', 'annotated', 'error', 'skipped', 'not_applicable']).optional(),
|
|
60
|
+
roundsUsed: z.number().int().min(0).optional().describe('Number of agent rounds consumed'),
|
|
61
|
+
blockId: z.string().optional().describe('Terminal context block id registered automatically for this task'),
|
|
62
|
+
}).passthrough();
|
|
33
63
|
/** Shared 202 response for async tool endpoints. */
|
|
34
64
|
const asyncResponse202 = {
|
|
35
65
|
description: 'Accepted — batch created',
|
|
@@ -99,6 +129,9 @@ function registerToolEndpoint(registry, row) {
|
|
|
99
129
|
}
|
|
100
130
|
export function buildOpenApiDoc() {
|
|
101
131
|
const registry = new OpenAPIRegistry();
|
|
132
|
+
// ── Component schemas ───────────────────────────────────────────────────────
|
|
133
|
+
registry.register('TokenUsage', tokenUsageSchema);
|
|
134
|
+
registry.register('OutputEnvelope', outputEnvelopeSchema);
|
|
102
135
|
// ── Tool endpoints (POST, require cwd + auth) ───────────────────────────────
|
|
103
136
|
for (const row of TOOL_ENDPOINTS)
|
|
104
137
|
registerToolEndpoint(registry, row);
|
|
@@ -115,7 +148,17 @@ export function buildOpenApiDoc() {
|
|
|
115
148
|
}),
|
|
116
149
|
},
|
|
117
150
|
responses: {
|
|
118
|
-
200: {
|
|
151
|
+
200: {
|
|
152
|
+
description: 'Batch state — pending returns { status: "pending" }; complete returns the OutputEnvelope; failed returns OutputEnvelope with error; expired returns { status: "expired" }',
|
|
153
|
+
content: {
|
|
154
|
+
'application/json': {
|
|
155
|
+
schema: z.union([
|
|
156
|
+
z.object({ status: z.enum(['pending', 'expired']) }),
|
|
157
|
+
outputEnvelopeSchema,
|
|
158
|
+
]),
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
119
162
|
401: response401,
|
|
120
163
|
404: response404,
|
|
121
164
|
},
|
|
@@ -145,57 +188,67 @@ export function buildOpenApiDoc() {
|
|
|
145
188
|
401: response401,
|
|
146
189
|
},
|
|
147
190
|
});
|
|
148
|
-
registry.registerPath({
|
|
149
|
-
method: 'delete',
|
|
150
|
-
path: '/context-blocks/{blockId}',
|
|
151
|
-
summary: 'Delete a context block',
|
|
152
|
-
tags: ['Control'],
|
|
153
|
-
request: {
|
|
154
|
-
params: z.object({ blockId: z.string().describe('Context block identifier') }),
|
|
155
|
-
query: z.object({ cwd: z.string().describe('Project working directory') }),
|
|
156
|
-
},
|
|
157
|
-
responses: {
|
|
158
|
-
200: { description: 'Block deleted (or was already absent)' },
|
|
159
|
-
401: response401,
|
|
160
|
-
},
|
|
161
|
-
});
|
|
162
191
|
registry.registerPath({
|
|
163
192
|
method: 'post',
|
|
164
|
-
path: '/
|
|
165
|
-
summary: '
|
|
193
|
+
path: '/register-context-block',
|
|
194
|
+
summary: 'Register a context block (alias)',
|
|
166
195
|
tags: ['Control'],
|
|
167
196
|
request: {
|
|
197
|
+
query: z.object({ cwd: z.string().describe('Project working directory') }),
|
|
168
198
|
body: {
|
|
169
199
|
required: true,
|
|
170
200
|
content: {
|
|
171
201
|
'application/json': {
|
|
172
202
|
schema: z.object({
|
|
173
|
-
|
|
174
|
-
|
|
203
|
+
content: z.string().describe('Block content (plain text or markdown)'),
|
|
204
|
+
label: z.string().optional().describe('Human-readable label'),
|
|
175
205
|
}),
|
|
176
206
|
},
|
|
177
207
|
},
|
|
178
208
|
},
|
|
179
209
|
},
|
|
180
210
|
responses: {
|
|
181
|
-
|
|
182
|
-
400: { description: '
|
|
211
|
+
201: { description: 'Block created' },
|
|
212
|
+
400: { description: 'Validation error or content too large' },
|
|
213
|
+
401: response401,
|
|
214
|
+
},
|
|
215
|
+
});
|
|
216
|
+
registry.registerPath({
|
|
217
|
+
method: 'delete',
|
|
218
|
+
path: '/context-blocks/{blockId}',
|
|
219
|
+
summary: 'Delete a context block',
|
|
220
|
+
tags: ['Control'],
|
|
221
|
+
request: {
|
|
222
|
+
params: z.object({ blockId: z.string().describe('Context block identifier') }),
|
|
223
|
+
query: z.object({ cwd: z.string().describe('Project working directory') }),
|
|
224
|
+
},
|
|
225
|
+
responses: {
|
|
226
|
+
200: { description: 'Block deleted (or was already absent)' },
|
|
183
227
|
401: response401,
|
|
184
|
-
404: response404,
|
|
185
228
|
},
|
|
186
229
|
});
|
|
187
230
|
// ── Introspection endpoints ─────────────────────────────────────────────────
|
|
188
231
|
registry.registerPath({
|
|
189
232
|
method: 'get',
|
|
190
233
|
path: '/health',
|
|
191
|
-
summary: 'Liveness
|
|
234
|
+
summary: 'Liveness + skill manifest drift check — no auth required',
|
|
192
235
|
tags: ['Introspection'],
|
|
193
236
|
responses: {
|
|
194
237
|
200: {
|
|
195
|
-
description: 'Server is alive',
|
|
238
|
+
description: 'Server is alive; status=ok when all installed skills match the manifest, status=drift when one or more skills are missing, outdated, or orphaned',
|
|
196
239
|
content: {
|
|
197
240
|
'application/json': {
|
|
198
|
-
schema: z.
|
|
241
|
+
schema: z.union([
|
|
242
|
+
z.object({ status: z.literal('ok') }),
|
|
243
|
+
z.object({
|
|
244
|
+
status: z.literal('drift'),
|
|
245
|
+
drift: z.array(z.object({
|
|
246
|
+
skill: z.string(),
|
|
247
|
+
client: z.string(),
|
|
248
|
+
issue: z.enum(['missing', 'outdated', 'orphan']),
|
|
249
|
+
})),
|
|
250
|
+
}),
|
|
251
|
+
]),
|
|
199
252
|
},
|
|
200
253
|
},
|
|
201
254
|
},
|
|
@@ -218,7 +271,7 @@ export function buildOpenApiDoc() {
|
|
|
218
271
|
openapi: '3.0.3',
|
|
219
272
|
info: {
|
|
220
273
|
title: 'multi-model-agent',
|
|
221
|
-
version: '
|
|
274
|
+
version: '4.0.0',
|
|
222
275
|
},
|
|
223
276
|
});
|
|
224
277
|
// Return a key-sorted version for deterministic golden comparisons
|
package/dist/openapi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-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+EAA+E;IAE/E,MAAM,SAAS,GAAG,IAAI,kBAAkB,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC/D,MAAM,GAAG,GAAG,SAAS,CAAC,gBAAgB,CAAC;QACrC,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE;YACJ,KAAK,EAAE,mBAAmB;YAC1B,OAAO,EAAE,OAAO;SACjB;KACF,CAAC,CAAC;IAEH,mEAAmE;IACnE,OAAO,QAAQ,CAAC,GAAG,CAA4B,CAAC;AAClD,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,mBAAmB,CAAC,GAA4B;IAC9D,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACtC,CAAC;AAED,mDAAmD;AACnD,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
Retry up to 3 times with exponential backoff (1 s → 2 s → 4 s).
|
|
20
20
|
If the server is unreachable, check that `mmagent serve` is running:
|
|
21
21
|
```bash
|
|
22
|
-
curl -s http://localhost:$PORT/health # expects {
|
|
22
|
+
curl -s http://localhost:$PORT/health # expects { "status": "ok" } (v4.0 — see spec C13)
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
### Auth errors (401)
|
|
@@ -8,19 +8,18 @@ reaches a terminal state.
|
|
|
8
8
|
| Status | Content-Type | Meaning |
|
|
9
9
|
|---|---|---|
|
|
10
10
|
| `202` | `text/plain` | Still working — body is the running headline (e.g. `1/1 running, 47s elapsed`) |
|
|
11
|
-
| `200` | `application/json` | Terminal — body is the uniform
|
|
11
|
+
| `200` | `application/json` | Terminal — body is the uniform 6-field envelope (see `response-shape.md`) |
|
|
12
12
|
| `404` / `401` / other | — | Error — stop polling |
|
|
13
13
|
|
|
14
14
|
### Terminal envelope states
|
|
15
15
|
|
|
16
|
-
Every terminal envelope has the same
|
|
16
|
+
Every terminal envelope has the same six fields; inspect `error` to tell
|
|
17
17
|
which terminal state you're in:
|
|
18
18
|
|
|
19
19
|
| Shape | Meaning |
|
|
20
20
|
|---|---|
|
|
21
21
|
| `error` is a real object | Batch failed — read `error.code` + `error.message` |
|
|
22
|
-
| `
|
|
23
|
-
| Both are `{kind: "not_applicable", ...}` | Batch succeeded — read `results` |
|
|
22
|
+
| `error` is `{kind: "not_applicable", ...}` | Batch succeeded — read `results` |
|
|
24
23
|
|
|
25
24
|
### Poll loop (POSIX sh)
|
|
26
25
|
|
|
@@ -18,7 +18,7 @@ The HTTP status is the state discriminator:
|
|
|
18
18
|
| `200 application/json` | Terminal — body is the uniform 7-field envelope below |
|
|
19
19
|
| `404` / `401` / `5xx` | Error — see Error response below; stop polling |
|
|
20
20
|
|
|
21
|
-
The terminal JSON envelope always has these
|
|
21
|
+
The terminal JSON envelope always has these 6 fields. Each may be a real value or a `not_applicable` sentinel:
|
|
22
22
|
|
|
23
23
|
```json
|
|
24
24
|
{
|
|
@@ -27,22 +27,20 @@ The terminal JSON envelope always has these 7 fields. Each may be a real value o
|
|
|
27
27
|
"batchTimings": { /* timings */ },
|
|
28
28
|
"costSummary": { /* cost roll-up */ },
|
|
29
29
|
"structuredReport": { /* parsed sections */ },
|
|
30
|
-
"error": { "kind": "not_applicable", "reason": "batch succeeded" }
|
|
31
|
-
"proposedInterpretation": { "kind": "not_applicable", "reason": "batch not awaiting clarification" }
|
|
30
|
+
"error": { "kind": "not_applicable", "reason": "batch succeeded" }
|
|
32
31
|
}
|
|
33
32
|
```
|
|
34
33
|
|
|
35
|
-
Read the envelope by the shape of `error
|
|
34
|
+
Read the envelope by the shape of `error`:
|
|
36
35
|
|
|
37
36
|
| Shape | Meaning |
|
|
38
37
|
|---|---|
|
|
39
38
|
| `error` is a real object (with `code` / `message`) | Batch failed — read `error.code` + `error.message` |
|
|
40
|
-
| `
|
|
41
|
-
| Both are `{kind: "not_applicable", ...}` sentinels | Batch succeeded — read `results` |
|
|
39
|
+
| `error` is `{kind: "not_applicable", ...}` | Batch succeeded — read `results` |
|
|
42
40
|
|
|
43
41
|
### GET /batch/:id?taskIndex=N — single task slice
|
|
44
42
|
|
|
45
|
-
Same
|
|
43
|
+
Same 6-field envelope. `results` contains exactly the task at index `N`. Returns `404 unknown_task_index` if `N` is out of range.
|
|
46
44
|
|
|
47
45
|
### Error response (4xx / 5xx)
|
|
48
46
|
|
|
@@ -7,6 +7,6 @@ Set when the worker can run a deterministic local check after editing — `npm t
|
|
|
7
7
|
| Value | Behavior | Use when |
|
|
8
8
|
|---|---|---|
|
|
9
9
|
| `"full"` | Spec review + quality review (default) | Default for new code or risky edits |
|
|
10
|
-
| `"
|
|
10
|
+
| `"quality_only"` | Quality review only | Read-only audit/review/debug/investigate routes |
|
|
11
11
|
| `"diff_only"` | Single-pass review of the produced diff | Cheap mechanical refactors (file moves, renames, import-path updates) |
|
|
12
|
-
| `"
|
|
12
|
+
| `"none"` | Skip review entirely | Trusted low-risk tasks where `verifyCommand` is enough |
|
|
@@ -8,7 +8,7 @@ when_to_use: >-
|
|
|
8
8
|
User asks for a doc/spec/config audit OR a methodology skill
|
|
9
9
|
(superpowers:dispatching-parallel-agents, /security-review) points at one AND
|
|
10
10
|
mmagent is running. Audit on PROSE/SPEC docs — use mma-review for source code.
|
|
11
|
-
version:
|
|
11
|
+
version: 4.0.0
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
# mma-audit
|
|
@@ -87,27 +87,26 @@ Every finding has the same shape:
|
|
|
87
87
|
| `claim` | string | One-sentence summary. |
|
|
88
88
|
| `evidence` | string ≥20 chars | Quoted from worker output when grounded. |
|
|
89
89
|
| `suggestion?` | string | Optional fix recommendation. |
|
|
90
|
-
| `
|
|
90
|
+
| `annotatorConfidence` | `number \| null` | 0–100 from the reviewer; `null` when emitted via deterministic fallback. |
|
|
91
91
|
| `evidenceGrounded` | boolean | True when `evidence` is a verbatim substring of worker output. |
|
|
92
92
|
|
|
93
93
|
### Verdict states (`qualityReviewVerdict`)
|
|
94
94
|
|
|
95
95
|
- `'annotated'` — every finding is structured. May be reviewer-emitted (with
|
|
96
|
-
numeric `
|
|
97
|
-
`
|
|
96
|
+
numeric `annotatorConfidence`) or deterministic-fallback (with
|
|
97
|
+
`annotatorConfidence: null`). The route ALWAYS reaches `'annotated'` unless
|
|
98
98
|
the reviewer call itself fails transport.
|
|
99
|
-
- `'skipped'` — kill switch (`MMAGENT_READ_ONLY_REVIEW=disabled`).
|
|
100
99
|
- `'error'` — only when the reviewer call fails transport (network / 5xx).
|
|
101
100
|
|
|
102
101
|
### Recommended rendering by the main agent
|
|
103
102
|
|
|
104
103
|
1. Show ALL findings — never silently drop. Confidence and grounding are
|
|
105
104
|
soft signals, not gates.
|
|
106
|
-
2. Default sort: severity (critical → low) then `
|
|
105
|
+
2. Default sort: severity (critical → low) then `annotatorConfidence` desc
|
|
107
106
|
(nulls last).
|
|
108
107
|
3. `severity` is the reviewer's authoritative final value — use it directly.
|
|
109
108
|
4. Mark findings with `evidenceGrounded: false` or
|
|
110
|
-
`
|
|
109
|
+
`annotatorConfidence < 70` as "lower-trust" (collapsed section, lighter
|
|
111
110
|
color, or `(low confidence)` annotation). User decides what to do.
|
|
112
111
|
5. Severity-tier counts feed the dashboard via V3 `findingsBySeverity`.
|
|
113
112
|
|
|
@@ -135,4 +134,15 @@ Inline docs lose the file boundary, so the per-file parallel split degenerates t
|
|
|
135
134
|
❌ **Re-auditing the same files round after round without delta context**
|
|
136
135
|
Round 2 worker has no idea what round 1 found. **Fix:** register the round 1 findings as a context block (`mma-context-blocks`) and pass `contextBlockIds` to round 2.
|
|
137
136
|
|
|
137
|
+
## Terminal context block
|
|
138
|
+
|
|
139
|
+
Every completed task automatically registers a terminal markdown context block containing the full task report (headline, annotated findings, and per-file audit notes). The `blockId` is returned in each task result as `terminalBlockId`. This block is immutable, lives for the session duration, and counts against the project's `maxEntries` quota (default 500).
|
|
140
|
+
|
|
141
|
+
**Use cases:**
|
|
142
|
+
- Pass round-N audit findings to round N+1 via `contextBlockIds`
|
|
143
|
+
- Feed audit results into a downstream `mma-delegate` fix step
|
|
144
|
+
- Accumulate findings across iterative audit rounds
|
|
145
|
+
|
|
146
|
+
The block is registered server-side at task completion; no caller action is needed to create it. Delete it explicitly via `DELETE /context-blocks/:id` when no longer needed, or let it expire on session teardown.
|
|
147
|
+
|
|
138
148
|
@include _shared/error-handling.md
|
|
@@ -12,7 +12,7 @@ when_to_use: >-
|
|
|
12
12
|
Register once here, then pass the ID via `contextBlockIds` on mma-delegate /
|
|
13
13
|
mma-execute-plan / mma-audit / mma-review / mma-verify / mma-debug /
|
|
14
14
|
mma-investigate. Cheaper and faster than inlining the same content N times.
|
|
15
|
-
version:
|
|
15
|
+
version: 4.0.0
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
# mma-context-blocks
|
|
@@ -55,8 +55,8 @@ Store large documents once; reference them by ID in subsequent `mma-*` calls via
|
|
|
55
55
|
|
|
56
56
|
| Field | Type | Required | Notes |
|
|
57
57
|
|---|---|---|---|
|
|
58
|
-
| `content` | string | yes | Document content (min 1 char) |
|
|
59
|
-
| `ttlMs` | number | no | Time-to-live in ms; omit for
|
|
58
|
+
| `content` | string | yes | Document content (min 1 char, max 50 MiB) |
|
|
59
|
+
| `ttlMs` | number | no | Time-to-live in ms; omit for idle-expiry (default 24 h idle). A block that is not referenced by any active batch for 24 h is eligible for eviction. |
|
|
60
60
|
|
|
61
61
|
#### Response (201)
|
|
62
62
|
|
|
@@ -111,8 +111,8 @@ Anti-pattern alert: **`re-inlined-shared-content`** (AP3). Pasting the same spec
|
|
|
111
111
|
|
|
112
112
|
N×50KB transmissions; main context burns through tokens. **Fix:** register the spec once, pass `contextBlockIds: ["cb_xxx"]` to each task.
|
|
113
113
|
|
|
114
|
-
❌ **Forgetting to delete
|
|
115
|
-
Blocks count against the project's context-block quota. **Fix:** explicitly `DELETE` after the dependent batches finish — or
|
|
114
|
+
❌ **Forgetting to delete unused blocks**
|
|
115
|
+
Blocks count against the project's context-block quota (`maxEntries` 500). **Fix:** explicitly `DELETE` after the dependent batches finish — or let idle expiry (24 h) evict them.
|
|
116
116
|
|
|
117
117
|
❌ **Trying to update a block's content**
|
|
118
118
|
Blocks are immutable. **Fix:** register a new block with the new content; switch the `contextBlockIds` to the new ID.
|