@zhixuan92/multi-model-agent 4.7.9 → 4.7.11
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 +1 -2
- package/dist/cli/serve.d.ts.map +1 -1
- package/dist/cli/serve.js +5 -31
- package/dist/cli/serve.js.map +1 -1
- package/dist/cli/sync-skills.d.ts +1 -1
- package/dist/cli/sync-skills.d.ts.map +1 -1
- package/dist/cli/sync-skills.js +3 -3
- package/dist/cli/sync-skills.js.map +1 -1
- package/dist/http/handlers/control/batch.js +1 -1
- package/dist/http/handlers/control/batch.js.map +1 -1
- package/dist/http/handlers/control/retry.d.ts.map +1 -1
- package/dist/http/handlers/control/retry.js +9 -18
- package/dist/http/handlers/control/retry.js.map +1 -1
- package/dist/http/handlers/introspection/health.d.ts +2 -2
- package/dist/http/handlers/introspection/health.d.ts.map +1 -1
- package/dist/http/handlers/tools/retry.d.ts.map +1 -1
- package/dist/http/handlers/tools/retry.js +9 -27
- package/dist/http/handlers/tools/retry.js.map +1 -1
- package/dist/http/project-registry.d.ts +0 -9
- package/dist/http/project-registry.d.ts.map +1 -1
- package/dist/http/project-registry.js +2 -6
- package/dist/http/project-registry.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 +2 -15
- package/dist/http/server.js.map +1 -1
- package/dist/skill-install/discover.d.ts +29 -0
- package/dist/skill-install/discover.d.ts.map +1 -0
- package/dist/skill-install/discover.js +102 -0
- package/dist/skill-install/discover.js.map +1 -0
- package/dist/skill-install/include-utils.d.ts +27 -0
- package/dist/skill-install/include-utils.d.ts.map +1 -0
- package/dist/skill-install/include-utils.js +90 -0
- package/dist/skill-install/include-utils.js.map +1 -0
- package/dist/skill-install/manifest.d.ts +90 -0
- package/dist/skill-install/manifest.d.ts.map +1 -0
- package/dist/skill-install/manifest.js +228 -0
- package/dist/skill-install/manifest.js.map +1 -0
- package/dist/skill-install/skill-installer-common.d.ts +48 -0
- package/dist/skill-install/skill-installer-common.d.ts.map +1 -0
- package/dist/skill-install/skill-installer-common.js +195 -0
- package/dist/skill-install/skill-installer-common.js.map +1 -0
- package/dist/skill-install/skill-installers/claude-code.d.ts +43 -0
- package/dist/skill-install/skill-installers/claude-code.d.ts.map +1 -0
- package/dist/skill-install/skill-installers/claude-code.js +65 -0
- package/dist/skill-install/skill-installers/claude-code.js.map +1 -0
- package/dist/skill-install/skill-installers/codex-cli.d.ts +27 -0
- package/dist/skill-install/skill-installers/codex-cli.d.ts.map +1 -0
- package/dist/skill-install/skill-installers/codex-cli.js +84 -0
- package/dist/skill-install/skill-installers/codex-cli.js.map +1 -0
- package/dist/skill-install/skill-installers/cursor.d.ts +72 -0
- package/dist/skill-install/skill-installers/cursor.d.ts.map +1 -0
- package/dist/skill-install/skill-installers/cursor.js +81 -0
- package/dist/skill-install/skill-installers/cursor.js.map +1 -0
- package/dist/skill-install/skill-installers/gemini-cli.d.ts +50 -0
- package/dist/skill-install/skill-installers/gemini-cli.d.ts.map +1 -0
- package/dist/skill-install/skill-installers/gemini-cli.js +72 -0
- package/dist/skill-install/skill-installers/gemini-cli.js.map +1 -0
- package/dist/skill-install/skill-manifest-sync.d.ts +11 -0
- package/dist/skill-install/skill-manifest-sync.d.ts.map +1 -0
- package/dist/skill-install/skill-manifest-sync.js +65 -0
- package/dist/skill-install/skill-manifest-sync.js.map +1 -0
- 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-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/handlers/introspection/tools-list.d.ts +0 -9
- package/dist/http/handlers/introspection/tools-list.d.ts.map +0 -1
- package/dist/http/handlers/introspection/tools-list.js +0 -28
- package/dist/http/handlers/introspection/tools-list.js.map +0 -1
- package/dist/migration/storage-migration.d.ts +0 -5
- package/dist/migration/storage-migration.d.ts.map +0 -1
- package/dist/migration/storage-migration.js +0 -76
- package/dist/migration/storage-migration.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tools-list.js","sourceRoot":"","sources":["../../../../src/http/handlers/introspection/tools-list.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAExH,8EAA8E;AAC9E,4DAA4D;AAC5D,IAAI,SAA6B,CAAC;AAElC,SAAS,YAAY;IACnB,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,GAAG,GAAG,eAAe,EAAE,CAAC;QAC9B,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,CAAC,IAAqB,EAAE,GAAmB,EAAE,EAAE;QACpD,MAAM,GAAG,GAAG,YAAY,EAAE,CAAC;QAC3B,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE;YACjB,cAAc,EAAE,kBAAkB;YAClC,gBAAgB,EAAE,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC;SACzC,CAAC,CAAC;QACH,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACf,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage-migration.d.ts","sourceRoot":"","sources":["../../src/migration/storage-migration.ts"],"names":[],"mappings":"AAmBA,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CA0D1G"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* One-time migration from ~/.multi-model-agent/context-blocks/ to
|
|
3
|
-
* ~/.multi-model/context-blocks/. Runs on `mmagent serve` startup
|
|
4
|
-
* before the HTTP listener binds.
|
|
5
|
-
*
|
|
6
|
-
* Behavior:
|
|
7
|
-
* - If the old path doesn't exist → no-op.
|
|
8
|
-
* - If the new path already exists (machine has run a 4.2.0+ daemon
|
|
9
|
-
* before) → no-op. We never co-mingle pre-migrated dirs into a
|
|
10
|
-
* post-migration tree.
|
|
11
|
-
* - Otherwise: walk old project dirs, sort by max(mtime of any file in
|
|
12
|
-
* dir; fall back to dir mtime for empty dirs), keep `maxProjects`
|
|
13
|
-
* most recent, move them to the new path, delete the dropped ones,
|
|
14
|
-
* then remove the old root entirely.
|
|
15
|
-
*/
|
|
16
|
-
import * as fs from 'node:fs';
|
|
17
|
-
import * as path from 'node:path';
|
|
18
|
-
import { computeProjectRecencyMs } from '@zhixuan92/multi-model-agent-core/stores/context-block-project-cap';
|
|
19
|
-
export function migrateStorage(homeDir, maxProjects) {
|
|
20
|
-
const oldRoot = path.join(homeDir, '.multi-model-agent', 'context-blocks');
|
|
21
|
-
const newRoot = path.join(homeDir, '.multi-model', 'context-blocks');
|
|
22
|
-
if (!fs.existsSync(oldRoot))
|
|
23
|
-
return { migrated: 0, dropped: 0 };
|
|
24
|
-
if (fs.existsSync(newRoot))
|
|
25
|
-
return { migrated: 0, dropped: 0 };
|
|
26
|
-
const entries = fs.readdirSync(oldRoot, { withFileTypes: true });
|
|
27
|
-
// Use the SHARED recency helper from A1.6 — keeps "what counts as recent"
|
|
28
|
-
// consistent across sweep and migration. Do NOT inline a copy.
|
|
29
|
-
const projects = entries
|
|
30
|
-
.filter(e => e.isDirectory())
|
|
31
|
-
.map(e => ({ name: e.name, mtimeMs: computeProjectRecencyMs(path.join(oldRoot, e.name)) }));
|
|
32
|
-
projects.sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
33
|
-
const keep = projects.slice(0, maxProjects);
|
|
34
|
-
const drop = projects.slice(maxProjects);
|
|
35
|
-
fs.mkdirSync(newRoot, { recursive: true });
|
|
36
|
-
// Track rename failures separately so the recursive-delete at the end of
|
|
37
|
-
// this function does NOT silently destroy any project that failed to move.
|
|
38
|
-
// (Earlier draft of this file had a critical bug: it caught rename errors,
|
|
39
|
-
// continued, then unconditionally `rmSync`-ed the entire old root — wiping
|
|
40
|
-
// any kept project whose rename had failed, contradicting the "operator can
|
|
41
|
-
// re-migrate manually" comment. The fix below preserves the old tree intact
|
|
42
|
-
// when ANY rename fails, so manual recovery is actually possible.)
|
|
43
|
-
const renameFailures = [];
|
|
44
|
-
for (const p of keep) {
|
|
45
|
-
try {
|
|
46
|
-
fs.renameSync(path.join(oldRoot, p.name), path.join(newRoot, p.name));
|
|
47
|
-
}
|
|
48
|
-
catch (err) {
|
|
49
|
-
renameFailures.push({ name: p.name, reason: err.message });
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
// Drop the over-cap projects only — they're not staying anyway, removing
|
|
53
|
-
// them is consistent with the cap policy regardless of partial-failure state.
|
|
54
|
-
for (const p of drop) {
|
|
55
|
-
try {
|
|
56
|
-
fs.rmSync(path.join(oldRoot, p.name), { recursive: true, force: true });
|
|
57
|
-
}
|
|
58
|
-
catch { /* skip */ }
|
|
59
|
-
}
|
|
60
|
-
if (renameFailures.length > 0) {
|
|
61
|
-
// Partial migration: keep the old tree intact (do NOT delete the old root).
|
|
62
|
-
// Operator sees the warning and can either retry the daemon or copy the
|
|
63
|
-
// remaining dirs manually with `mv ~/.multi-model-agent/context-blocks/<hash> ~/.multi-model/context-blocks/`.
|
|
64
|
-
console.warn(`[mmagent] storage migration: ${renameFailures.length} project(s) failed to move; ` +
|
|
65
|
-
`~/.multi-model-agent/ left in place for manual recovery. Failures:\n` +
|
|
66
|
-
renameFailures.map(f => ` - ${f.name}: ${f.reason}`).join('\n'));
|
|
67
|
-
return { migrated: keep.length - renameFailures.length, dropped: drop.length };
|
|
68
|
-
}
|
|
69
|
-
// Full migration succeeded → safe to remove the old root.
|
|
70
|
-
try {
|
|
71
|
-
fs.rmSync(path.join(homeDir, '.multi-model-agent'), { recursive: true, force: true });
|
|
72
|
-
}
|
|
73
|
-
catch { /* skip */ }
|
|
74
|
-
return { migrated: keep.length, dropped: drop.length };
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=storage-migration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage-migration.js","sourceRoot":"","sources":["../../src/migration/storage-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAE7G,MAAM,UAAU,cAAc,CAAC,OAAe,EAAE,WAAmB;IACjE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;IAC3E,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,gBAAgB,CAAC,CAAC;IAErE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAChE,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAE/D,MAAM,OAAO,GAAG,EAAE,CAAC,WAAW,C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