@zhixuan92/multi-model-agent-core 4.7.10 → 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.
Files changed (55) hide show
  1. package/dist/bounded-execution/stall-watchdog.d.ts.map +1 -1
  2. package/dist/bounded-execution/stall-watchdog.js +28 -4
  3. package/dist/bounded-execution/stall-watchdog.js.map +1 -1
  4. package/dist/providers/codex-cli-session.d.ts.map +1 -1
  5. package/dist/providers/codex-cli-session.js +39 -22
  6. package/dist/providers/codex-cli-session.js.map +1 -1
  7. package/package.json +2 -45
  8. package/dist/tool-surface/discover.d.ts +0 -29
  9. package/dist/tool-surface/discover.d.ts.map +0 -1
  10. package/dist/tool-surface/discover.js +0 -102
  11. package/dist/tool-surface/discover.js.map +0 -1
  12. package/dist/tool-surface/include-utils.d.ts +0 -27
  13. package/dist/tool-surface/include-utils.d.ts.map +0 -1
  14. package/dist/tool-surface/include-utils.js +0 -90
  15. package/dist/tool-surface/include-utils.js.map +0 -1
  16. package/dist/tool-surface/index.d.ts +0 -6
  17. package/dist/tool-surface/index.d.ts.map +0 -1
  18. package/dist/tool-surface/index.js +0 -7
  19. package/dist/tool-surface/index.js.map +0 -1
  20. package/dist/tool-surface/manifest.d.ts +0 -94
  21. package/dist/tool-surface/manifest.d.ts.map +0 -1
  22. package/dist/tool-surface/manifest.js +0 -234
  23. package/dist/tool-surface/manifest.js.map +0 -1
  24. package/dist/tool-surface/openapi-generator.d.ts +0 -15
  25. package/dist/tool-surface/openapi-generator.d.ts.map +0 -1
  26. package/dist/tool-surface/openapi-generator.js +0 -259
  27. package/dist/tool-surface/openapi-generator.js.map +0 -1
  28. package/dist/tool-surface/skill-installer-common.d.ts +0 -48
  29. package/dist/tool-surface/skill-installer-common.d.ts.map +0 -1
  30. package/dist/tool-surface/skill-installer-common.js +0 -195
  31. package/dist/tool-surface/skill-installer-common.js.map +0 -1
  32. package/dist/tool-surface/skill-installer.d.ts +0 -10
  33. package/dist/tool-surface/skill-installer.d.ts.map +0 -1
  34. package/dist/tool-surface/skill-installer.js +0 -20
  35. package/dist/tool-surface/skill-installer.js.map +0 -1
  36. package/dist/tool-surface/skill-installers/claude-code.d.ts +0 -43
  37. package/dist/tool-surface/skill-installers/claude-code.d.ts.map +0 -1
  38. package/dist/tool-surface/skill-installers/claude-code.js +0 -65
  39. package/dist/tool-surface/skill-installers/claude-code.js.map +0 -1
  40. package/dist/tool-surface/skill-installers/codex-cli.d.ts +0 -27
  41. package/dist/tool-surface/skill-installers/codex-cli.d.ts.map +0 -1
  42. package/dist/tool-surface/skill-installers/codex-cli.js +0 -84
  43. package/dist/tool-surface/skill-installers/codex-cli.js.map +0 -1
  44. package/dist/tool-surface/skill-installers/cursor.d.ts +0 -72
  45. package/dist/tool-surface/skill-installers/cursor.d.ts.map +0 -1
  46. package/dist/tool-surface/skill-installers/cursor.js +0 -81
  47. package/dist/tool-surface/skill-installers/cursor.js.map +0 -1
  48. package/dist/tool-surface/skill-installers/gemini-cli.d.ts +0 -66
  49. package/dist/tool-surface/skill-installers/gemini-cli.d.ts.map +0 -1
  50. package/dist/tool-surface/skill-installers/gemini-cli.js +0 -111
  51. package/dist/tool-surface/skill-installers/gemini-cli.js.map +0 -1
  52. package/dist/tool-surface/skill-manifest-sync.d.ts +0 -11
  53. package/dist/tool-surface/skill-manifest-sync.d.ts.map +0 -1
  54. package/dist/tool-surface/skill-manifest-sync.js +0 -65
  55. package/dist/tool-surface/skill-manifest-sync.js.map +0 -1
@@ -1,81 +0,0 @@
1
- /**
2
- * Cursor skill writer.
3
- *
4
- * Writes the skill content to `<cwd>/.cursor/rules/multi-model-agent.mdc`.
5
- *
6
- * Before writing, inlines any `@include _shared/<file>.md` directives found in
7
- * the content. The directive line is replaced with the full content of
8
- * the corresponding shared file sourced from `<skillsRoot>/_shared/<path>`.
9
- * The `@include` directive is NOT preserved in the written file.
10
- *
11
- * If a referenced shared file is missing (ENOENT):
12
- * - A warning is logged to stderr.
13
- * - The include line is removed from the output (not preserved).
14
- * - Processing continues for remaining directives.
15
- *
16
- * Security constraints on `@include` directives:
17
- * - Only paths beginning with `_shared/` are accepted.
18
- * - The resolved path must stay within `<skillsRoot>/_shared/`.
19
- * Path traversal attempts (e.g. `_shared/../secrets.txt`) are rejected
20
- * with a warning and the directive line is dropped.
21
- * - Non-`_shared/` paths are rejected with a warning and the directive
22
- * line is dropped.
23
- *
24
- * @module
25
- */
26
- import fs from 'node:fs';
27
- import path from 'node:path';
28
- import { inlineIncludes } from '../include-utils.js';
29
- /**
30
- * Install the multi-model-agent skill for Cursor.
31
- *
32
- * - Target path is `<cwd>/.cursor/rules/multi-model-agent.mdc` (CWD-relative).
33
- * - Creates `<cwd>/.cursor/rules/` if it does not exist.
34
- * - Inlines `@include` directives before writing (see `inlineIncludes`).
35
- * - If the file already exists and `force` is not set, skips writing and
36
- * returns `written: false`.
37
- *
38
- * @param opts Installation options (see `CursorInstallOpts`).
39
- */
40
- export function installCursor(opts) {
41
- const { content, cwd, skillsRoot, force } = opts;
42
- const targetPath = path.join(cwd, '.cursor', 'rules', 'multi-model-agent.mdc');
43
- if (!force && fs.existsSync(targetPath)) {
44
- process.stderr.write(`Warning: Cursor skill writer: file already exists: ${targetPath} — skipping (use force: true to overwrite)\n`);
45
- return { written: false, targetPath };
46
- }
47
- const rulesDir = path.join(cwd, '.cursor', 'rules');
48
- fs.mkdirSync(rulesDir, { recursive: true, mode: 0o700 });
49
- const finalContent = inlineIncludes('Cursor skill writer', content, skillsRoot);
50
- fs.writeFileSync(targetPath, finalContent, 'utf-8');
51
- return { written: true, targetPath };
52
- }
53
- /**
54
- * Uninstall the multi-model-agent Cursor skill.
55
- *
56
- * Removes `<cwd>/.cursor/rules/multi-model-agent.mdc`.
57
- * This is a no-op when the file does not exist (no error is thrown).
58
- *
59
- * @param cwd Working directory (replaces `process.cwd()`).
60
- */
61
- export function uninstallCursor(cwd) {
62
- const targetPath = path.join(cwd, '.cursor', 'rules', 'multi-model-agent.mdc');
63
- // Only remove the file if it exists and is a file (not a directory).
64
- // This is a no-op when the path does not exist.
65
- try {
66
- const stat = fs.statSync(targetPath);
67
- if (stat.isFile()) {
68
- fs.unlinkSync(targetPath);
69
- }
70
- // If it's a directory or symlink to directory, do nothing — the brief
71
- // specifies removing a file, not a directory tree.
72
- }
73
- catch (err) {
74
- const nodeErr = err;
75
- // ENOENT means the file doesn't exist — that's fine, we were asked to remove it
76
- if (nodeErr.code !== 'ENOENT') {
77
- throw err;
78
- }
79
- }
80
- }
81
- //# sourceMappingURL=cursor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../../src/tool-surface/skill-installers/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAsDrD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAAC,IAAuB;IACnD,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAEjD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,uBAAuB,CAAC,CAAC;IAE/E,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACxC,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,sDAAsD,UAAU,8CAA8C,CAC/G,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;IACxC,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACpD,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAEzD,MAAM,YAAY,GAAG,cAAc,CAAC,qBAAqB,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IAChF,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IAEpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AACvC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,GAAW;IACzC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,uBAAuB,CAAC,CAAC;IAE/E,qEAAqE;IACrE,gDAAgD;IAChD,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACrC,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;YAClB,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAC5B,CAAC;QACD,sEAAsE;QACtE,mDAAmD;IACrD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAA4B,CAAC;QAC7C,gFAAgF;QAChF,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC9B,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1,66 +0,0 @@
1
- /**
2
- * Options for installing a skill via the Gemini CLI writer.
3
- */
4
- export interface GeminiCliInstallOpts {
5
- /** Skill name (currently informational; writes always go to multi-model-agent extension). */
6
- skillName: string;
7
- /**
8
- * Raw SKILL.md content. May contain `@include _shared/<file>.md` directives
9
- * which are inlined before writing.
10
- */
11
- content: string;
12
- /**
13
- * Version string for the extension manifest's `version` field.
14
- */
15
- skillVersion: string;
16
- /**
17
- * The "home directory" that replaces `os.homedir()`.
18
- * Must NOT default to `os.homedir()` — always required explicitly.
19
- */
20
- homeDir: string;
21
- /**
22
- * Where shared files live. The writer reads `<skillsRoot>/_shared/<file>.md`
23
- * when inlining `@include` directives.
24
- */
25
- skillsRoot: string;
26
- }
27
- /**
28
- * Inline `@include _shared/<file>.md` directives in `content`.
29
- *
30
- * Each line matching `@include <path>` (space after `@include`) is replaced with
31
- * the full content of `<skillsRoot>/_shared/<path>`.
32
- *
33
- * If a shared file is missing:
34
- * - A warning is written to stderr.
35
- * - The include line is removed from the output (not preserved).
36
- * - Processing continues for remaining directives.
37
- *
38
- * @param content Raw SKILL.md content (may contain @include directives).
39
- * @param skillsRoot Root directory containing `_shared/` sub-directory.
40
- * @returns The content with directives inlined.
41
- */
42
- export declare function inlineIncludes(content: string, skillsRoot: string): string;
43
- /**
44
- * Install a skill to the Gemini CLI extensions directory.
45
- *
46
- * Writes two files into `<homeDir>/.gemini/extensions/multi-model-agent/`:
47
- * 1. `gemini-extension.json` — the extension manifest
48
- * 2. `SKILL.md` — the skill content with @include directives inlined
49
- *
50
- * The directory (and any parent directories) are created with mode `0o700`.
51
- * Calling this function multiple times overwrites the previous installation
52
- * (idempotent).
53
- *
54
- * @param opts Installation options (see `GeminiCliInstallOpts`).
55
- */
56
- export declare function installGeminiCli(opts: GeminiCliInstallOpts): void;
57
- /**
58
- * Uninstall the multi-model-agent Gemini CLI extension.
59
- *
60
- * Recursively removes `<homeDir>/.gemini/extensions/multi-model-agent/`.
61
- * This is a no-op when the directory does not exist (no error is thrown).
62
- *
63
- * @param homeDir The "home directory" that replaces `os.homedir()`.
64
- */
65
- export declare function uninstallGeminiCli(homeDir: string): void;
66
- //# sourceMappingURL=gemini-cli.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gemini-cli.d.ts","sourceRoot":"","sources":["../../../src/tool-surface/skill-installers/gemini-cli.ts"],"names":[],"mappings":"AAwBA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,6FAA6F;IAC7F,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CA6B1E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAuBjE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAKxD"}
@@ -1,111 +0,0 @@
1
- /**
2
- * Gemini CLI skill writer.
3
- *
4
- * Writes to `<homeDir>/.gemini/extensions/multi-model-agent/`:
5
- * - `gemini-extension.json` — extension manifest
6
- * - `SKILL.md` — skill content (with @include directives inlined)
7
- *
8
- * The extension is always named `multi-model-agent` regardless of `skillName`
9
- * (the extension loads whichever skill files are provided). This is a
10
- * judgment call because the Gemini CLI extension format is not fully
11
- * standardized; a minimal JSON schema is used.
12
- *
13
- * Before writing SKILL.md, any `@include _shared/<file>.md` directive lines
14
- * are replaced with the file content from `<skillsRoot>/_shared/<file>.md`.
15
- * Missing shared files → warning to stderr, line is dropped.
16
- *
17
- * @module
18
- */
19
- import fs from 'node:fs';
20
- import path from 'node:path';
21
- /** Regex matching a line that starts with `@include ` followed by a relative path. */
22
- const INCLUDE_RE = /^@include\s+(.+)$/;
23
- /**
24
- * Inline `@include _shared/<file>.md` directives in `content`.
25
- *
26
- * Each line matching `@include <path>` (space after `@include`) is replaced with
27
- * the full content of `<skillsRoot>/_shared/<path>`.
28
- *
29
- * If a shared file is missing:
30
- * - A warning is written to stderr.
31
- * - The include line is removed from the output (not preserved).
32
- * - Processing continues for remaining directives.
33
- *
34
- * @param content Raw SKILL.md content (may contain @include directives).
35
- * @param skillsRoot Root directory containing `_shared/` sub-directory.
36
- * @returns The content with directives inlined.
37
- */
38
- export function inlineIncludes(content, skillsRoot) {
39
- const lines = content.split('\n');
40
- const result = [];
41
- for (const line of lines) {
42
- const match = INCLUDE_RE.exec(line);
43
- if (!match) {
44
- result.push(line);
45
- continue;
46
- }
47
- const relativePath = match[1];
48
- const sharedFilePath = path.join(skillsRoot, relativePath);
49
- try {
50
- const sharedContent = fs.readFileSync(sharedFilePath, 'utf-8');
51
- result.push(sharedContent);
52
- }
53
- catch (err) {
54
- // Log warning to stderr and drop the include line.
55
- const detail = err instanceof Error ? err.message : String(err);
56
- process.stderr.write(`Warning: Gemini CLI skill writer: shared file not found: ` +
57
- `${sharedFilePath} (referenced by @include ${relativePath}) — ${detail}\n`);
58
- // Line is dropped — do not push anything.
59
- }
60
- }
61
- return result.join('\n');
62
- }
63
- /**
64
- * Install a skill to the Gemini CLI extensions directory.
65
- *
66
- * Writes two files into `<homeDir>/.gemini/extensions/multi-model-agent/`:
67
- * 1. `gemini-extension.json` — the extension manifest
68
- * 2. `SKILL.md` — the skill content with @include directives inlined
69
- *
70
- * The directory (and any parent directories) are created with mode `0o700`.
71
- * Calling this function multiple times overwrites the previous installation
72
- * (idempotent).
73
- *
74
- * @param opts Installation options (see `GeminiCliInstallOpts`).
75
- */
76
- export function installGeminiCli(opts) {
77
- const { skillName: _skillName, content, skillVersion, homeDir, skillsRoot } = opts;
78
- const extDir = path.join(homeDir, '.gemini', 'extensions', 'multi-model-agent');
79
- fs.mkdirSync(extDir, { recursive: true, mode: 0o700 });
80
- // Write the extension manifest.
81
- // Shape is a minimal reasonable schema; Gemini CLI extension format is not
82
- // fully standardized, so we document this judgment call.
83
- const manifest = {
84
- name: 'multi-model-agent',
85
- version: skillVersion,
86
- description: 'multi-model-agent skills for Gemini CLI',
87
- schemaVersion: '1.0',
88
- contextFiles: ['SKILL.md'],
89
- };
90
- const manifestPath = path.join(extDir, 'gemini-extension.json');
91
- fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + '\n', 'utf-8');
92
- // Write the skill content with @include directives inlined.
93
- const finalContent = inlineIncludes(content, skillsRoot);
94
- const skillPath = path.join(extDir, 'SKILL.md');
95
- fs.writeFileSync(skillPath, finalContent, 'utf-8');
96
- }
97
- /**
98
- * Uninstall the multi-model-agent Gemini CLI extension.
99
- *
100
- * Recursively removes `<homeDir>/.gemini/extensions/multi-model-agent/`.
101
- * This is a no-op when the directory does not exist (no error is thrown).
102
- *
103
- * @param homeDir The "home directory" that replaces `os.homedir()`.
104
- */
105
- export function uninstallGeminiCli(homeDir) {
106
- const extDir = path.join(homeDir, '.gemini', 'extensions', 'multi-model-agent');
107
- if (fs.existsSync(extDir)) {
108
- fs.rmSync(extDir, { recursive: true, force: true });
109
- }
110
- }
111
- //# sourceMappingURL=gemini-cli.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gemini-cli.js","sourceRoot":"","sources":["../../../src/tool-surface/skill-installers/gemini-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,sFAAsF;AACtF,MAAM,UAAU,GAAG,mBAAmB,CAAC;AA6BvC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe,EAAE,UAAkB;IAChE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAClB,SAAS;QACX,CAAC;QAED,MAAM,YAAY,GAAG,KA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AC,UAAU,CAAC;KAC3B,CAAC;IACF,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;IAChE,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC;IAElF,4DAA4D;IAC5D,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACzD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAChD,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;AACrD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,mBAAmB,CAAC,CAAC;IAChF,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;AACH,CAAC"}
@@ -1,11 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"skill-manifest-sync.d.ts","sourceRoot":"","sources":["../../src/tool-surface/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"}
@@ -1,65 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"skill-manifest-sync.js","sourceRoot":"","sources":["../../src/tool-surface/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,CAAC,CAAC;QAC/B,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACjC,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,oBAAqD;IACzF,OAAO;QACL,WAAW;YACT,MAAM,KAAK,GAAiB,EAAE,CAAC;YAC/B,MAAM,SAAS,GAAG,IAAI,GAAG,CAAS,gBAAgB,CAAC,CAAC;YACpD,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAA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