@zhixuan92/multi-model-agent 5.0.3 → 5.1.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 +6 -5
- package/dist/http/handlers/tools/journal-record.d.ts +6 -2
- package/dist/http/handlers/tools/journal-record.d.ts.map +1 -1
- package/dist/http/handlers/tools/journal-record.js +7 -4
- package/dist/http/handlers/tools/journal-record.js.map +1 -1
- package/dist/http/handlers/tools/retry.d.ts.map +1 -1
- package/dist/http/handlers/tools/retry.js +10 -34
- package/dist/http/handlers/tools/retry.js.map +1 -1
- package/dist/skills/mma-audit/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 +1 -1
- package/dist/skills/mma-execute-plan/SKILL.md +1 -1
- package/dist/skills/mma-explore/SKILL.md +1 -1
- package/dist/skills/mma-investigate/SKILL.md +1 -1
- package/dist/skills/mma-journal-recall/SKILL.md +1 -1
- package/dist/skills/mma-journal-record/SKILL.md +1 -1
- package/dist/skills/mma-research/SKILL.md +1 -1
- package/dist/skills/mma-retry/SKILL.md +1 -1
- package/dist/skills/mma-review/SKILL.md +1 -1
- package/dist/skills/multi-model-agent/SKILL.md +1 -1
- package/package.json +2 -2
- package/dist/http/journal-lock.d.ts +0 -4
- package/dist/http/journal-lock.d.ts.map +0 -1
- package/dist/http/journal-lock.js +0 -34
- package/dist/http/journal-lock.js.map +0 -1
package/README.md
CHANGED
|
@@ -112,7 +112,7 @@ Skills are the surface your AI client sees. `mmagent sync-skills` writes them to
|
|
|
112
112
|
|
|
113
113
|
| Skill | Target endpoint | Use when |
|
|
114
114
|
|---|---|---|
|
|
115
|
-
| `mma-delegate` | `POST /delegate` | Ad-hoc implementation or research tasks **without** a plan file — run them
|
|
115
|
+
| `mma-delegate` | `POST /delegate` | Ad-hoc implementation or research tasks **without** a plan file — run them on cheap workers as one goal-set (implement → review-fix). |
|
|
116
116
|
| `mma-execute-plan` | `POST /execute-plan` | A plan / spec markdown exists on disk with numbered task headings; implement one or more tasks from it. |
|
|
117
117
|
| `mma-investigate` | `POST /investigate` | Answer a question about *this* codebase ("how does X work", "where is Y called") without burning main-context tokens on grep + reads. |
|
|
118
118
|
| `mma-explore` | (orchestrator playbook — no dedicated route) | Fans out `mma-investigate` + `mma-research` + `mma-journal-recall` in parallel and synthesises 3–5 distinct directions. Run before `superpowers:brainstorming`. Not for "where is X" questions (use `mma-investigate`). |
|
|
@@ -139,10 +139,11 @@ The `multi-model-agent` skill (no `mma-` prefix) is a top-level overview your cl
|
|
|
139
139
|
```
|
|
140
140
|
You: "Execute tasks 3, 4, and 5 from docs/plans/auth-rewrite.md"
|
|
141
141
|
↓
|
|
142
|
-
Client picks mma-execute-plan (plan file on disk, multiple
|
|
142
|
+
Client picks mma-execute-plan (plan file on disk, multiple tasks)
|
|
143
143
|
↓
|
|
144
|
-
mmagent
|
|
145
|
-
each
|
|
144
|
+
mmagent runs the tasks as one sequential goal-set: the standard agent (e.g. MiniMax-M3)
|
|
145
|
+
implements each task in order and commits it (`[task N] …`), then the complex agent
|
|
146
|
+
reviews every task and fixes anything left — returning one structured report.
|
|
146
147
|
↓
|
|
147
148
|
You see one consolidated headline: "$0.04 actual / $1.20 saved vs claude-opus-4-8 (30× ROI)"
|
|
148
149
|
```
|
|
@@ -275,7 +276,7 @@ mmagent telemetry dump-queue # print the locally-queued even
|
|
|
275
276
|
|
|
276
277
|
## Architecture
|
|
277
278
|
|
|
278
|
-
`mmagent serve` runs a loopback HTTP server.
|
|
279
|
+
`mmagent serve` runs a loopback HTTP server. Write tools (`delegate`, `execute-plan`, `retry`, `journal-record`) run the whole plan as one sequential **goal-set**: the standard agent implements every task in order and commits each (`[task N] …`), then the complex agent reviews and fixes — returning one structured report of the final per-task state. Read tools fan out per file/criterion. Each has a wall-clock timeout.
|
|
279
280
|
|
|
280
281
|
Full design rationale: [DIRECTION.md](https://github.com/zhixuan312/multi-model-agent/blob/master/DIRECTION.md). Layer map and request lifecycle: [docs/ARCHITECTURE.md](https://github.com/zhixuan312/multi-model-agent/blob/master/docs/ARCHITECTURE.md).
|
|
281
282
|
|
|
@@ -2,7 +2,11 @@ import * as journal from '@zhixuan92/multi-model-agent-core/tools/journal/record
|
|
|
2
2
|
import type { ExecutionContext } from '@zhixuan92/multi-model-agent-core';
|
|
3
3
|
import type { HandlerDeps } from '../../handler-deps.js';
|
|
4
4
|
import type { RawHandler } from '../../types.js';
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Executor for one journal-record dispatch. Per-cwd serialization is handled by
|
|
7
|
+
* the goal-set's `withWriteGoalLock` (in task-executor), which subsumes the old
|
|
8
|
+
* per-project journal lock — no separate lock here.
|
|
9
|
+
*/
|
|
10
|
+
export declare function journalRecordExecutor(input: journal.Input, _cwd: string): (executionCtx: ExecutionContext) => Promise<import("@zhixuan92/multi-model-agent-core/lifecycle/executor-output-types").ExecutorOutput>;
|
|
7
11
|
export declare function buildJournalRecordHandler(deps: HandlerDeps): RawHandler;
|
|
8
12
|
//# sourceMappingURL=journal-record.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journal-record.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/tools/journal-record.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,+DAA+D,CAAC;AAGzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"journal-record.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/tools/journal-record.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,+DAA+D,CAAC;AAGzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAG1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,IAC9D,cAAc,gBAAgB,yGAEvC;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,CAyBvE"}
|
|
@@ -3,11 +3,14 @@ import { executeTask } from '@zhixuan92/multi-model-agent-core/lifecycle/task-ex
|
|
|
3
3
|
import { toolConfig } from '@zhixuan92/multi-model-agent-core/tools/journal/record/tool-config';
|
|
4
4
|
import { sendError, sendJson } from '../../errors.js';
|
|
5
5
|
import { asyncDispatch } from '../../async-dispatch.js';
|
|
6
|
-
import { withProjectJournalLock } from '../../journal-lock.js';
|
|
7
6
|
import { emitRequestReceived } from '../../request-observability.js';
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Executor for one journal-record dispatch. Per-cwd serialization is handled by
|
|
9
|
+
* the goal-set's `withWriteGoalLock` (in task-executor), which subsumes the old
|
|
10
|
+
* per-project journal lock — no separate lock here.
|
|
11
|
+
*/
|
|
12
|
+
export function journalRecordExecutor(input, _cwd) {
|
|
13
|
+
return (executionCtx) => executeTask(toolConfig, executionCtx, input);
|
|
11
14
|
}
|
|
12
15
|
export function buildJournalRecordHandler(deps) {
|
|
13
16
|
return async (_req, res, _params, ctx) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journal-record.js","sourceRoot":"","sources":["../../../../src/http/handlers/tools/journal-record.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,+DAA+D,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,oEAAoE,CAAC;AAEhG,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE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AAC,IAAI,EAAE,WAAW,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/tools/retry.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,CAgD/D"}
|
|
@@ -31,40 +31,16 @@ export function buildRetryHandler(deps) {
|
|
|
31
31
|
deps,
|
|
32
32
|
caller: { client: ctx.callerClient, mainModel: ctx.mainModel },
|
|
33
33
|
executor: async (executionCtx) => {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
const subset = input.taskIndices.map((i) => batch.tasks[i]);
|
|
47
|
-
if (!executionCtx.batchId)
|
|
48
|
-
throw new Error('retry requires batchId');
|
|
49
|
-
const retryBatchId = batchCache.remember(executionCtx.batchId, subset);
|
|
50
|
-
try {
|
|
51
|
-
const result = await executeTask(toolConfig, executionCtx, input);
|
|
52
|
-
const results = Array.isArray(result.results) ? result.results : [];
|
|
53
|
-
try {
|
|
54
|
-
batchCache.complete(retryBatchId, results);
|
|
55
|
-
}
|
|
56
|
-
catch { /* already terminal */ }
|
|
57
|
-
return result;
|
|
58
|
-
}
|
|
59
|
-
catch (err) {
|
|
60
|
-
try {
|
|
61
|
-
batchCache.abort(retryBatchId);
|
|
62
|
-
}
|
|
63
|
-
catch { /* already terminal */ }
|
|
64
|
-
throw err;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
return callExecutor();
|
|
34
|
+
const batchCache = executionCtx.projectContext.batchCache;
|
|
35
|
+
// Surface a clean error if the prior batch's goal is gone; buildTaskSpec
|
|
36
|
+
// also throws goal_not_found, but this gives the friendlier message.
|
|
37
|
+
if (!batchCache.get(input.batchId)) {
|
|
38
|
+
throw new Error(`batch "${input.batchId}" is unknown or expired — re-dispatch via delegate / execute-plan`);
|
|
39
|
+
}
|
|
40
|
+
batchCache.touch(input.batchId);
|
|
41
|
+
// Goal mode: executeTask pulls the stored goal (via the retry tool-config's
|
|
42
|
+
// buildTaskSpec) and re-fires the whole goal-set against the current HEAD.
|
|
43
|
+
return executeTask(toolConfig, executionCtx, input);
|
|
68
44
|
},
|
|
69
45
|
});
|
|
70
46
|
sendJson(res, 202, { batchId, statusUrl });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../../../src/http/handlers/tools/retry.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,MAAM,sDAAsD,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,2DAA2D,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAIxD,MAAM,UAAU,iBAAiB,CAAC,IAAiB;IACjD,OAAO,KAAK,EAAE,IAAqB,EAAE,GAAmB,EAAE,OAA+B,EAAE,GAAG,EAAE,EAAE;QAChG,MAAM,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,iBAAiB,EAAE,gCAAgC,EAAE;gBACvE,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE;aACpC,CAAC,CAAC;YACH,OAAO;QACT,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CA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Y,EAAE,EAAE;gBAC/B,MAAM,UAAU,GAAG,YAAY,CAAC,cAAe,CAAC,UAAU,CAAC;gBAC3D,yEAAyE;gBACzE,qEAAqE;gBACrE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;oBACnC,MAAM,IAAI,KAAK,CACb,UAAU,KAAK,CAAC,OAAO,mEAAmE,CAC3F,CAAC;gBACJ,CAAC;gBACD,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBAChC,4EAA4E;gBAC5E,2EAA2E;gBAC3E,OAAO,WAAW,CAAC,UAAU,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;YACtD,CAAC;SACF,CAAC,CAAC;QAEH,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -12,7 +12,7 @@ when_to_use: >-
|
|
|
12
12
|
(superpowers:dispatching-parallel-agents, /security-review) points at one AND
|
|
13
13
|
mmagent is running. Audit on PROSE/SPEC docs — use mma-review for source code.
|
|
14
14
|
Audit a CODE-EXECUTION PLAN against the codebase — use subtype=plan.
|
|
15
|
-
version: 5.0
|
|
15
|
+
version: 5.1.0
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
# mma-audit
|
|
@@ -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-debug / mma-investigate.
|
|
14
14
|
Cheaper and faster than inlining the same content N times.
|
|
15
|
-
version: 5.0
|
|
15
|
+
version: 5.1.0
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
# 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: 5.0
|
|
13
|
+
version: 5.1.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: 5.0
|
|
14
|
+
version: 5.1.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: 5.0
|
|
13
|
+
version: 5.1.0
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
# mma-execute-plan
|
|
@@ -14,7 +14,7 @@ when_to_use: >-
|
|
|
14
14
|
mma-journal-recall (prior learnings/decisions) in parallel and synthesise the
|
|
15
15
|
results yourself. DO NOT use for convergent single-answer questions — those
|
|
16
16
|
are mma-investigate.
|
|
17
|
-
version: 5.0
|
|
17
|
+
version: 5.1.0
|
|
18
18
|
---
|
|
19
19
|
|
|
20
20
|
# mma-explore
|
|
@@ -12,7 +12,7 @@ when_to_use: >-
|
|
|
12
12
|
git-history queries. OR you are about to read 3+ files / run any grep in main
|
|
13
13
|
context — that's the inline-labor-leakage anti-pattern (AP2); delegate to this
|
|
14
14
|
skill instead.
|
|
15
|
-
version: 5.0
|
|
15
|
+
version: 5.1.0
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
# mma-investigate
|
|
@@ -12,7 +12,7 @@ when_to_use: >-
|
|
|
12
12
|
A question about THIS project's learnings, before attempting or designing
|
|
13
13
|
something — ask a vague conceptual question; skip if recording a new learning,
|
|
14
14
|
asking the codebase, or researching external docs.
|
|
15
|
-
version: 5.0
|
|
15
|
+
version: 5.1.0
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
# mma-journal-recall
|
|
@@ -9,7 +9,7 @@ when_to_use: >-
|
|
|
9
9
|
hit a blocking constraint, or reached a conclusion worth remembering. NOT for
|
|
10
10
|
recall/investigate/delegate; those are read routes. Journal stores conclusions
|
|
11
11
|
for cross-session reference.
|
|
12
|
-
version: 5.0
|
|
12
|
+
version: 5.1.0
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
# mma-journal-record
|
|
@@ -10,7 +10,7 @@ when_to_use: >-
|
|
|
10
10
|
others do, what published methods exist) AND mmagent is running. Delegate the
|
|
11
11
|
multi-source web/adapter research to a worker so the main context stays on
|
|
12
12
|
judgment. NOT for codebase questions — those are mma-investigate.
|
|
13
|
-
version: 5.0
|
|
13
|
+
version: 5.1.0
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
# mma-research
|
|
@@ -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: 5.0
|
|
13
|
+
version: 5.1.0
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
# mma-review
|
|
@@ -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: 5.0
|
|
14
|
+
version: 5.1.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": "5.0
|
|
3
|
+
"version": "5.1.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.",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@asteasolutions/zod-to-openapi": "^8.5.0",
|
|
56
|
-
"@zhixuan92/multi-model-agent-core": "^5.0
|
|
56
|
+
"@zhixuan92/multi-model-agent-core": "^5.1.0",
|
|
57
57
|
"gray-matter": "^4.0.3",
|
|
58
58
|
"minimist": "^1.2.8",
|
|
59
59
|
"proper-lockfile": "^4.1.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journal-lock.d.ts","sourceRoot":"","sources":["../../src/http/journal-lock.ts"],"names":[],"mappings":"AAUA,wBAAsB,sBAAsB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAoB7F;AAED,uDAAuD;AACvD,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Per-project (per-cwd) async mutex for journal writes. Chained-promise
|
|
3
|
-
* implementation: each caller awaits the previous caller's tail before running.
|
|
4
|
-
* Distinct cwds never block each other. The map entry is removed once the last
|
|
5
|
-
* queued caller for a cwd completes, so lock state grows only with active
|
|
6
|
-
* contention. On a contended acquire, one stderr breadcrumb is emitted; an
|
|
7
|
-
* uncontended acquire emits nothing.
|
|
8
|
-
*/
|
|
9
|
-
const tails = new Map();
|
|
10
|
-
export async function withProjectJournalLock(cwd, fn) {
|
|
11
|
-
const prev = tails.get(cwd); // undefined => uncontended
|
|
12
|
-
let release;
|
|
13
|
-
const mine = new Promise((resolve) => { release = resolve; });
|
|
14
|
-
const tail = (prev ?? Promise.resolve()).then(() => mine);
|
|
15
|
-
tails.set(cwd, tail);
|
|
16
|
-
const start = Date.now();
|
|
17
|
-
if (prev) {
|
|
18
|
-
await prev; // queue behind the current holder
|
|
19
|
-
process.stderr.write(`[mmagent] event=journal_lock_wait cwd=${cwd} wait_ms=${Date.now() - start}\n`);
|
|
20
|
-
}
|
|
21
|
-
try {
|
|
22
|
-
return await fn();
|
|
23
|
-
}
|
|
24
|
-
finally {
|
|
25
|
-
release(); // let the next waiter proceed
|
|
26
|
-
if (tails.get(cwd) === tail)
|
|
27
|
-
tails.delete(cwd); // nobody queued behind us
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
/** Test-only: number of cwds with a live lock tail. */
|
|
31
|
-
export function __journalLockMapSize() {
|
|
32
|
-
return tails.size;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=journal-lock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journal-lock.js","sourceRoot":"","sources":["../../src/http/journal-lock.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,KAAK,GAAG,IAAI,GAAG,EAAyB,CAAC;AAE/C,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAI,GAAW,EAAE,EAAoB;IAC/E,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAe,2BAA2B;IACtE,IAAI,OAAoB,CAAC;IACzB,MAAM,IAAI,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,GAAG,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACpE,MAAM,IAAI,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAC1D,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,C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