@zhixuan92/multi-model-agent 3.1.5 → 3.1.6
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/dist/http/execution-context.d.ts.map +1 -1
- package/dist/http/execution-context.js +16 -9
- package/dist/http/execution-context.js.map +1 -1
- package/dist/skills/_shared/polling.md +22 -0
- package/dist/skills/mma-audit/SKILL.md +1 -1
- package/dist/skills/mma-clarifications/SKILL.md +1 -1
- package/dist/skills/mma-context-blocks/SKILL.md +1 -1
- package/dist/skills/mma-debug/SKILL.md +1 -1
- package/dist/skills/mma-delegate/SKILL.md +2 -4
- package/dist/skills/mma-execute-plan/SKILL.md +4 -2
- package/dist/skills/mma-retry/SKILL.md +1 -1
- package/dist/skills/mma-review/SKILL.md +1 -1
- package/dist/skills/mma-verify/SKILL.md +1 -1
- package/dist/skills/multi-model-agent/SKILL.md +11 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-context.d.ts","sourceRoot":"","sources":["../../src/http/execution-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,mCAAmC,CAAC;AAC3F,OAAO,KAAK,EAAE,gBAAgB,EAAyB,MAAM,mDAAmD,CAAC;AACjH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,EACjB,EAAE,EAAE,cAAc,EAClB,OAAO,EAAE,MAAM,GACd,gBAAgB,
|
|
1
|
+
{"version":3,"file":"execution-context.d.ts","sourceRoot":"","sources":["../../src/http/execution-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,mCAAmC,CAAC;AAC3F,OAAO,KAAK,EAAE,gBAAgB,EAAyB,MAAM,mDAAmD,CAAC;AACjH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,EACjB,EAAE,EAAE,cAAc,EAClB,OAAO,EAAE,MAAM,GACd,gBAAgB,CAiElB"}
|
|
@@ -21,15 +21,22 @@ export function buildExecutionContext(deps, pc, batchId) {
|
|
|
21
21
|
// "running, 47s elapsed, worker: MiniMax-M2.7 (turn 2)" instead of
|
|
22
22
|
// just "1/1 running". stageIndex is a reasonable turn proxy.
|
|
23
23
|
entry.running = [{ worker: tick.provider, turn: Math.max(1, tick.stageIndex) }];
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
// Single-task batches get the rich per-stage headline composed by
|
|
25
|
+
// HeartbeatTimer (stage name, cost/ROI, file counts, tool calls).
|
|
26
|
+
// Multi-task batches fall back to the batch-level summary since no
|
|
27
|
+
// single worker's headline applies across tasks.
|
|
28
|
+
const tasksTotal = entry.tasksTotal ?? 1;
|
|
29
|
+
const headline = tasksTotal <= 1
|
|
30
|
+
? tick.headline
|
|
31
|
+
: composeRunningHeadline({
|
|
32
|
+
tasksTotal,
|
|
33
|
+
tasksStarted: entry.tasksStarted ?? 0,
|
|
34
|
+
tasksCompleted: entry.tasksCompleted ?? 0,
|
|
35
|
+
startedAt: entry.startedAt,
|
|
36
|
+
nowMs: Date.now(),
|
|
37
|
+
lastHeartbeatAt: entry.lastHeartbeatAt,
|
|
38
|
+
running: entry.running,
|
|
39
|
+
});
|
|
33
40
|
deps.batchRegistry.updateRunningHeadline(effectiveBatchId, headline);
|
|
34
41
|
deps.logger.taskHeartbeat({
|
|
35
42
|
batchId: effectiveBatchId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-context.js","sourceRoot":"","sources":["../../src/http/execution-context.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,OAAO,EAAE,cA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C;IAEF,OAAO;QACL,cAAc,EAAE,EAAE;QAClB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,iBAAiB,EAAE,EAAE,CAAC,aAAa;QACnC,eAAe,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,cAAc,CAAC,OAAiC,EAAE,IAAI,CAAC,MAAM,CAAC;QACpG,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;QAC7C,UAAU,EAAE,SAAS;QACrB,OAAO;QACP,eAAe;QACf,kBAAkB,EAAE,KAAK,EAAE,QAA+B,EAAE,EAAE;YAC5D,OAAO,IAAI,OAAO,CAA6B,CAAC,OAAO,EAAE,EAAE;gBACzD,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBAC9C,IAAI,KAAK,EAAE,CAAC;oBACV,0EAA0E;oBAC1E,6CAA6C;oBAC7C,KAAK,CAAC,oBAAoB,GAAG,CAAC,cAAsB,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;gBACvF,CAAC;gBACD,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;YAC5E,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -64,4 +64,26 @@ Start at 1 s, double each iteration, cap at 30 s. The 1800-second client-side
|
|
|
64
64
|
timeout is a safety cap; most batches complete in under 60 s. Discover `$PORT`
|
|
65
65
|
at runtime with `mmagent info --json | jq -r .port` (default: 7337).
|
|
66
66
|
|
|
67
|
+
### Caller-side tool-timeout note
|
|
68
|
+
|
|
69
|
+
The poll helper's internal `TIMEOUT_S` default is 1800s (30 minutes). If your
|
|
70
|
+
agent's shell tool (e.g. Claude Code's Bash) caps command wall-clock at
|
|
71
|
+
10 minutes by default, the helper will be killed at 10m regardless of
|
|
72
|
+
`TIMEOUT_S` — long-running delegations then appear to "fail" before terminal.
|
|
73
|
+
|
|
74
|
+
When invoking this poll loop, pick one:
|
|
75
|
+
|
|
76
|
+
- **Preferred — pass a 30-minute tool timeout explicitly** (e.g. Claude Code
|
|
77
|
+
Bash accepts `timeout: 1800000`, up to 600000ms/10 min by default; pass the
|
|
78
|
+
max the tool allows, or bump the tool's allowed ceiling via harness
|
|
79
|
+
settings).
|
|
80
|
+
- **Alternative — cap the helper to match the tool's limit** by exporting
|
|
81
|
+
`MMAGENT_POLL_TIMEOUT_S=600` before running the loop. The helper will then
|
|
82
|
+
exit 124 cleanly at 10 minutes and the caller can decide whether to
|
|
83
|
+
re-poll or surface the timeout.
|
|
84
|
+
|
|
85
|
+
Never let the helper run longer than the caller's tool cap — the process
|
|
86
|
+
gets killed mid-poll, the caller sees a generic failure, and diagnostics
|
|
87
|
+
from the `TIMEOUT_S` exit path are lost.
|
|
88
|
+
|
|
67
89
|
Windows/PowerShell equivalent is planned for a later release.
|
|
@@ -10,7 +10,7 @@ when_to_use: >-
|
|
|
10
10
|
(superpowers:dispatching-parallel-agents, /security-review) points at an audit
|
|
11
11
|
task. Delegate via mmagent so the audit runs on independent workers — your
|
|
12
12
|
main context stays free to synthesize findings.
|
|
13
|
-
version: 3.1.
|
|
13
|
+
version: 3.1.6
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
## mma-audit
|
|
@@ -9,7 +9,7 @@ when_to_use: >-
|
|
|
9
9
|
terminal envelope has `proposedInterpretation` as a string (not a
|
|
10
10
|
NotApplicable sentinel). Read the proposal and call this skill to accept or
|
|
11
11
|
correct it. The batch resumes after the POST returns.
|
|
12
|
-
version: 3.1.
|
|
12
|
+
version: 3.1.6
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
## mma-clarifications
|
|
@@ -10,7 +10,7 @@ when_to_use: >-
|
|
|
10
10
|
field on mma-delegate / mma-execute-plan / mma-audit / mma-review / mma-verify
|
|
11
11
|
/ mma-debug. Cheaper and faster than inlining the same content in every
|
|
12
12
|
request body.
|
|
13
|
-
version: 3.1.
|
|
13
|
+
version: 3.1.6
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
## mma-context-blocks
|
|
@@ -10,7 +10,7 @@ when_to_use: >-
|
|
|
10
10
|
(superpowers:systematic-debugging) points at the investigation step. Delegate
|
|
11
11
|
the read/reproduce/trace work to a mmagent worker so your main context stays
|
|
12
12
|
focused on the hypothesis and the fix.
|
|
13
|
-
version: 3.1.
|
|
13
|
+
version: 3.1.6
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
## mma-debug
|
|
@@ -11,7 +11,7 @@ when_to_use: >-
|
|
|
11
11
|
parallel-safe, and keep main context free. If a plan file exists, use
|
|
12
12
|
mma-execute-plan; if the task is an audit/review/verify/debug, prefer the
|
|
13
13
|
matching mma-* skill instead.
|
|
14
|
-
version: 3.1.
|
|
14
|
+
version: 3.1.6
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
## mma-delegate
|
|
@@ -46,13 +46,11 @@ context block references.
|
|
|
46
46
|
|---|---|---|---|
|
|
47
47
|
| `tasks` | array | yes | At least one task |
|
|
48
48
|
| `tasks[].prompt` | string | yes | The task instruction |
|
|
49
|
-
| `tasks[].agentType` |
|
|
49
|
+
| `tasks[].agentType` | `"standard"` / `"complex"` | no | Worker tier. Default `"standard"` (cheap). Pick `"complex"` when the task is ambiguous, touches many files, is security-sensitive, or a prior standard run came back with `filesWritten: 0` / ran out of turns. Complex workers cost more but finish bigger jobs. |
|
|
50
50
|
| `tasks[].filePaths` | string[] | no | Files the sub-agent focuses on |
|
|
51
51
|
| `tasks[].done` | string | no | Acceptance criteria |
|
|
52
52
|
| `tasks[].contextBlockIds` | string[] | no | IDs from `mma-context-blocks` |
|
|
53
53
|
|
|
54
|
-
Use `agentType: "complex"` for ambiguous scope or security-sensitive tasks.
|
|
55
|
-
|
|
56
54
|
### Full example
|
|
57
55
|
|
|
58
56
|
```bash
|
|
@@ -11,7 +11,7 @@ when_to_use: >-
|
|
|
11
11
|
or superpowers:subagent-driven-development / superpowers:executing-plans when
|
|
12
12
|
mmagent is running — delegated workers are cheaper and don't pollute main
|
|
13
13
|
context. Task descriptors must match the plan headings verbatim.
|
|
14
|
-
version: 3.1.
|
|
14
|
+
version: 3.1.6
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
## mma-execute-plan
|
|
@@ -39,7 +39,8 @@ parallel and duplicate descriptors are rejected.
|
|
|
39
39
|
"/project/docs/plan.md",
|
|
40
40
|
"/project/src/auth/login.ts"
|
|
41
41
|
],
|
|
42
|
-
"contextBlockIds": []
|
|
42
|
+
"contextBlockIds": [],
|
|
43
|
+
"agentType": "standard"
|
|
43
44
|
}
|
|
44
45
|
```
|
|
45
46
|
|
|
@@ -49,6 +50,7 @@ parallel and duplicate descriptors are rejected.
|
|
|
49
50
|
| `context` | string | no | Short additional context not in the plan |
|
|
50
51
|
| `filePaths` | string[] | no | Plan file + relevant source files |
|
|
51
52
|
| `contextBlockIds` | string[] | no | IDs from `mma-context-blocks` |
|
|
53
|
+
| `agentType` | `"standard"` / `"complex"` | no | Worker tier. Default `"standard"` (cheap). Switch to `"complex"` for tasks too large for a standard-tier model to finish in the turn budget (reads many files, produces many edits, or the last run came back with `filesWritten: 0`). |
|
|
52
54
|
|
|
53
55
|
If the batch reaches `awaiting_clarification`, use `mma-clarifications`
|
|
54
56
|
to confirm or correct the proposed interpretation.
|
|
@@ -9,7 +9,7 @@ when_to_use: >-
|
|
|
9
9
|
you want to re-try the failed indices only. Prefer this over redispatching the
|
|
10
10
|
whole batch or inline-retrying — it's idempotent and keeps the original
|
|
11
11
|
batch's diagnostics intact.
|
|
12
|
-
version: 3.1.
|
|
12
|
+
version: 3.1.6
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
## mma-retry
|
|
@@ -9,7 +9,7 @@ when_to_use: >-
|
|
|
9
9
|
more files OR a methodology skill (superpowers:requesting-code-review,
|
|
10
10
|
/review, /security-review) points at a review task. Delegate the reviewer pass
|
|
11
11
|
to mmagent workers — your main context stays free to decide what to merge.
|
|
12
|
-
version: 3.1.
|
|
12
|
+
version: 3.1.6
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
## mma-review
|
|
@@ -8,7 +8,7 @@ when_to_use: >-
|
|
|
8
8
|
superpowers:verification-before-completion) wants acceptance-criteria checked
|
|
9
9
|
against implemented work. Delegate the evidence-gathering to mmagent workers —
|
|
10
10
|
each checklist item is verified independently and in parallel.
|
|
11
|
-
version: 3.1.
|
|
11
|
+
version: 3.1.6
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
## mma-verify
|
|
@@ -11,7 +11,7 @@ when_to_use: >-
|
|
|
11
11
|
mmagent is running. Read this once, pick the matching mma-* skill, and
|
|
12
12
|
delegate there. Applies equally whether the user invoked a superpowers
|
|
13
13
|
methodology skill or just asked directly.
|
|
14
|
-
version: 3.1.
|
|
14
|
+
version: 3.1.6
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
## multi-model-agent overview
|
|
@@ -61,6 +61,16 @@ Every request requires `Authorization: Bearer <token>`.
|
|
|
61
61
|
| `mma-context-blocks` | Register large reused documents to reference by ID |
|
|
62
62
|
| `mma-clarifications` | Confirm or correct the service's proposed interpretation |
|
|
63
63
|
|
|
64
|
+
### Worker tier: `agentType`
|
|
65
|
+
|
|
66
|
+
`mma-delegate` and `mma-execute-plan` accept `agentType: "standard" | "complex"`. Default is `"standard"` (cheaper, faster). Pick `"complex"` when:
|
|
67
|
+
|
|
68
|
+
- The task touches many files or requires multi-step reasoning a smaller model cannot hold in context.
|
|
69
|
+
- A prior standard run came back with `filesWritten: 0` or exhausted its turn budget (visible in the verbose stream or the final envelope's `batchTimings` / `results`).
|
|
70
|
+
- The task is security-sensitive or ambiguous enough that being wrong is costly.
|
|
71
|
+
|
|
72
|
+
`mma-audit`, `mma-review`, `mma-debug` already default to complex; `mma-verify` already defaults to standard — these are not configurable from the caller and do not need an `agentType` field.
|
|
73
|
+
|
|
64
74
|
### General flow
|
|
65
75
|
|
|
66
76
|
1. Call the appropriate `mma-*` skill → receive `{ batchId }`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhixuan92/multi-model-agent",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.6",
|
|
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.1.
|
|
55
|
+
"@zhixuan92/multi-model-agent-core": "^3.1.6",
|
|
56
56
|
"gray-matter": "^4.0.3",
|
|
57
57
|
"minimist": "^1.2.8",
|
|
58
58
|
"zod": "^4.0.0"
|