@zhixuan92/multi-model-agent 3.4.0 → 3.5.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 CHANGED
@@ -88,6 +88,20 @@ The auth token is generated on first `mmagent serve`. Retrieve it with `mmagent
88
88
 
89
89
  All tool endpoints require bearer auth: `Authorization: Bearer <token>`.
90
90
 
91
+ ## What's new in 3.5.0
92
+
93
+ **Breaking changes (operators read this first):**
94
+ - `task.maxReviewRounds` is gone — review caps now derive from policy tables (`maxReworksFor('spec') = 2`, `maxReworksFor('quality') = 2`). Remove the field from any callers.
95
+ - `agentType` is gone from `/execute-plan` (top-level + per-task). The compiler hardcodes `agentType: 'standard'`. `/delegate` is unchanged and still accepts the field.
96
+ - Status-level escalation inside `delegateWithEscalation` is removed. Transport failures now flow through the new `runWithFallback` wrapper in `reviewed-lifecycle.ts`.
97
+
98
+ **New behavior:**
99
+ - **Tier-escalating rework.** For standard-tier tasks, the implementation tier escalates to complex on the final rework attempt; reviewers swap to keep impl ≠ reviewer.
100
+ - **Runtime tier fallback.** Transport failures (`api_error` / `network_error` / `timeout`) or missing configuration trigger automatic substitution of the other tier. Fallback is sticky per loop.
101
+ - **Single-slot operators** receive reviews on the same tier (`violatesSeparation: true`); set `reviewPolicy: 'off'` to opt out.
102
+ - **Four new diagnostic events** — `escalation`, `escalation_unavailable`, `fallback`, `fallback_unavailable` — emitted via the verbose stderr stream and JSONL log.
103
+ - **New `agents.*History` and `agents.fallbackOverrides`** envelope fields surface tier movement; the headline composer adds `(escalated to complex; fallback fired)` style suffixes.
104
+
91
105
  ## Operator commands
92
106
 
93
107
  ```bash
@@ -1 +1 @@
1
- {"version":3,"file":"execute-plan.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/tools/execute-plan.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,CAuCrE"}
1
+ {"version":3,"file":"execute-plan.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/tools/execute-plan.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,CAsDrE"}
@@ -7,9 +7,27 @@ export function buildExecutePlanHandler(deps) {
7
7
  return async (_req, res, _params, ctx) => {
8
8
  const parsed = executePlan.inputSchema.safeParse(ctx.body);
9
9
  if (!parsed.success) {
10
- sendError(res, 400, 'invalid_request', 'Request body validation failed', {
11
- fieldErrors: parsed.error.flatten(),
12
- });
10
+ const fieldErrors = {};
11
+ for (const issue of parsed.error.issues) {
12
+ let path = issue.path.join('.');
13
+ if (path === '' && issue.message.includes('"agentType"')) {
14
+ path = 'agentType';
15
+ }
16
+ else if (path.startsWith('tasks.') && issue.message === 'Invalid input') {
17
+ const task = issue.path.reduce((value, segment) => {
18
+ if (value && typeof value === 'object')
19
+ return value[segment];
20
+ return undefined;
21
+ }, ctx.body);
22
+ if (task && typeof task === 'object' && 'agentType' in task) {
23
+ path = `${path}.agentType`;
24
+ }
25
+ }
26
+ if (!fieldErrors[path])
27
+ fieldErrors[path] = [];
28
+ fieldErrors[path].push(issue.message);
29
+ }
30
+ sendError(res, 400, 'invalid_request', 'Request body validation failed', { fieldErrors });
13
31
  return;
14
32
  }
15
33
  const input = parsed.data;
@@ -1 +1 @@
1
- {"version":3,"file":"execute-plan.js","sourceRoot":"","sources":["../../../../src/http/handlers/tools/execute-plan.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,WAAW,MAAM,6DAA6D,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D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IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QAC/D,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC;YACtB,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;YAChE,OAAO;QACT,CAAC;QACD,MAAM,EAAE,GAAG,aAAa,CAAC,cAAc,CAAC;QACxC,EAAE,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC/B,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAE5C,MAAM,QAAQ,GAAG,KAAK,CAAC,eAAe,IAAI,EAAE,CAAC;QAC7C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,aAAa,CAAC;YAC3C,IAAI,EAAE,cAAc;YACpB,UAAU,EAAE,GAAG;YACf,QAAQ;YACR,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,cAAc,EAAE,EAAE;YAClB,IAAI;YACJ,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE;gBAC/B,OAAO,kBAAkB,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;YACjD,CAAC;SACF,CAAC,CAAC;QAEH,MAAM,mBAAmB,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAElG,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC;AACJ,CAAC"}
@@ -10,7 +10,7 @@ when_to_use: >-
10
10
  mmagent is running. Delegate so each file audits on its own worker; the main
11
11
  agent only synthesizes findings. Audit on PROSE/SPEC docs — use mma-review for
12
12
  source code.
13
- version: 3.4.0
13
+ version: 3.5.0
14
14
  ---
15
15
 
16
16
  # mma-audit
@@ -9,7 +9,7 @@ when_to_use: >-
9
9
  mma-debug / mma-investigate terminal envelope has `proposedInterpretation` as
10
10
  a string. Read the proposal, decide whether to accept or correct it, then call
11
11
  this skill. The batch resumes immediately after the POST returns.
12
- version: 3.4.0
12
+ version: 3.5.0
13
13
  ---
14
14
 
15
15
  # mma-clarifications
@@ -10,7 +10,7 @@ when_to_use: >-
10
10
  Register once here, then pass the ID via `contextBlockIds` on mma-delegate /
11
11
  mma-execute-plan / mma-audit / mma-review / mma-verify / mma-debug /
12
12
  mma-investigate. Cheaper and faster than inlining the same content N times.
13
- version: 3.4.0
13
+ version: 3.5.0
14
14
  ---
15
15
 
16
16
  # mma-context-blocks
@@ -10,7 +10,7 @@ when_to_use: >-
10
10
  read files, reproduce, trace — OR a methodology skill
11
11
  (superpowers:systematic-debugging) points at the investigation step. Delegate
12
12
  the read/reproduce/trace; the main agent stays on the hypothesis and the fix.
13
- version: 3.4.0
13
+ version: 3.5.0
14
14
  ---
15
15
 
16
16
  # mma-debug
@@ -11,7 +11,7 @@ when_to_use: >-
11
11
  and keep main context free. If a plan file exists → use mma-execute-plan. If
12
12
  the task is audit / review / verify / debug / investigate → use the matching
13
13
  specialized skill.
14
- version: 3.4.0
14
+ version: 3.5.0
15
15
  ---
16
16
 
17
17
  # mma-delegate
@@ -10,7 +10,7 @@ when_to_use: >-
10
10
  superpowers:subagent-driven-development / superpowers:executing-plans —
11
11
  workers are cheaper and don't pollute main context. Task descriptors must
12
12
  match plan headings verbatim.
13
- version: 3.4.0
13
+ version: 3.5.0
14
14
  ---
15
15
 
16
16
  # mma-execute-plan
@@ -10,7 +10,7 @@ when_to_use: >-
10
10
  running. Delegate the read/grep/synthesis to a worker so the main context
11
11
  stays on judgment. Codebase only — does not perform web research or
12
12
  git-history queries.
13
- version: 3.4.0
13
+ version: 3.5.0
14
14
  ---
15
15
 
16
16
  # mma-investigate
@@ -10,7 +10,7 @@ when_to_use: >-
10
10
  you want to re-try the failed indices only. Prefer this over re-dispatching
11
11
  the whole batch or inline-retrying — it's idempotent and preserves the
12
12
  original batch's diagnostics.
13
- version: 3.4.0
13
+ version: 3.5.0
14
14
  ---
15
15
 
16
16
  # mma-retry
@@ -10,7 +10,7 @@ when_to_use: >-
10
10
  AND mmagent is running. Delegate so each file reviews on its own worker; the
11
11
  main agent only decides what to merge. Review on SOURCE CODE — use mma-audit
12
12
  for prose specs / configs.
13
- version: 3.4.0
13
+ version: 3.5.0
14
14
  ---
15
15
 
16
16
  # mma-review
@@ -10,7 +10,7 @@ when_to_use: >-
10
10
  against implemented work BEFORE claiming success. Delegate so each checklist
11
11
  item gets independent evidence-gathering on a worker. Use this BEFORE saying
12
12
  "done" — never after.
13
- version: 3.4.0
13
+ version: 3.5.0
14
14
  ---
15
15
 
16
16
  # mma-verify
@@ -11,7 +11,7 @@ when_to_use: >-
11
11
  tasks — AND mmagent is running. Read this once, pick the matching mma-* skill,
12
12
  and delegate there. Applies equally whether the user invoked a superpowers
13
13
  methodology skill or asked directly.
14
- version: 3.4.0
14
+ version: 3.5.0
15
15
  ---
16
16
 
17
17
  # multi-model-agent (router)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhixuan92/multi-model-agent",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Standalone HTTP server for multi-model-agent. Routes tool-invocation work to Claude, Codex, or OpenAI-compatible sub-agents with async-polling REST dispatch and installable skills for Claude Code, Gemini CLI, Codex CLI, and Cursor.",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@asteasolutions/zod-to-openapi": "^8.5.0",
55
- "@zhixuan92/multi-model-agent-core": "^3.4.0",
55
+ "@zhixuan92/multi-model-agent-core": "^3.5.0",
56
56
  "gray-matter": "^4.0.3",
57
57
  "minimist": "^1.2.8",
58
58
  "zod": "^4.0.0"