@moxxy/plugin-mcp 0.41.3 → 0.42.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moxxy/plugin-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "MCP (Model Context Protocol) client plugin for moxxy — connect to MCP servers and surface their tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"moxxy",
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
50
|
+
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
51
51
|
"zod": "^3.25.76",
|
|
52
|
-
"@moxxy/sdk": "0.
|
|
52
|
+
"@moxxy/sdk": "0.42.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@types/node": "^22.
|
|
55
|
+
"@types/node": "^22.20.5",
|
|
56
56
|
"typescript": "^6.0.3",
|
|
57
|
-
"vitest": "^
|
|
57
|
+
"vitest": "^5.0.3",
|
|
58
58
|
"@moxxy/vitest-preset": "0.0.0",
|
|
59
59
|
"@moxxy/tsconfig": "0.0.0"
|
|
60
60
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { promises as fs } from 'node:fs';
|
|
2
|
-
import { mkdtemp
|
|
2
|
+
import { mkdtemp } from 'node:fs/promises';
|
|
3
3
|
import { tmpdir } from 'node:os';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
writeMcpConfig,
|
|
13
13
|
} from './config-io.js';
|
|
14
14
|
import type { McpStoredConfig } from './types.js';
|
|
15
|
+
import { removeDir } from '@moxxy/vitest-preset/fs';
|
|
15
16
|
|
|
16
17
|
// config-io derives every path from moxxyPath(), which honors $MOXXY_HOME.
|
|
17
18
|
// Point it at a fresh tmp dir per test so we never touch the real ~/.moxxy.
|
|
@@ -27,7 +28,7 @@ describe('admin/config-io', () => {
|
|
|
27
28
|
afterEach(async () => {
|
|
28
29
|
if (original === undefined) delete process.env.MOXXY_HOME;
|
|
29
30
|
else process.env.MOXXY_HOME = original;
|
|
30
|
-
await
|
|
31
|
+
await removeDir(home);
|
|
31
32
|
});
|
|
32
33
|
|
|
33
34
|
it('writeMcpConfig -> readMcpConfig is a faithful atomic round-trip', async () => {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { mkdtemp
|
|
1
|
+
import { mkdtemp } from 'node:fs/promises';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
5
5
|
import { assertDefined } from '@moxxy/sdk';
|
|
6
6
|
import type { McpClientLike, McpServerConfig, McpToolDescriptor } from '../types.js';
|
|
7
7
|
import type { AdminToolRegistryLike, McpStoredServer } from './types.js';
|
|
8
|
+
import { removeDir } from '@moxxy/vitest-preset/fs';
|
|
8
9
|
|
|
9
10
|
// The runtime connects through `defaultClientFactory` (from ../client.js),
|
|
10
11
|
// which would spawn a real subprocess / open a real socket. Replace it with
|
|
@@ -88,7 +89,7 @@ describe('admin/runtime', () => {
|
|
|
88
89
|
afterEach(async () => {
|
|
89
90
|
if (original === undefined) delete process.env.MOXXY_HOME;
|
|
90
91
|
else process.env.MOXXY_HOME = original;
|
|
91
|
-
await
|
|
92
|
+
await removeDir(home);
|
|
92
93
|
});
|
|
93
94
|
|
|
94
95
|
describe('attachServer (eager)', () => {
|
package/src/admin/skill.test.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
|
-
import { mkdtemp
|
|
2
|
+
import { mkdtemp } from 'node:fs/promises';
|
|
3
3
|
import { tmpdir } from 'node:os';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { assertDefined } from '@moxxy/sdk';
|
|
@@ -8,6 +8,7 @@ import { afterEach, beforeEach, describe, expect, it } from 'vitest';
|
|
|
8
8
|
import type { McpServerConfig, McpToolDescriptor } from '../types.js';
|
|
9
9
|
import { createMcpUsageSkillWriter } from './skill.js';
|
|
10
10
|
import type { AdminSkillRegistryLike } from './types.js';
|
|
11
|
+
import { removeDir } from '@moxxy/vitest-preset/fs';
|
|
11
12
|
|
|
12
13
|
// Minimal block-scalar / sequence frontmatter parser — independent of the
|
|
13
14
|
// unit under test — so "well-formed YAML" is actually parsed and checked,
|
|
@@ -73,7 +74,7 @@ describe('admin/skill (createMcpUsageSkillWriter)', () => {
|
|
|
73
74
|
});
|
|
74
75
|
|
|
75
76
|
afterEach(async () => {
|
|
76
|
-
await
|
|
77
|
+
await removeDir(dir);
|
|
77
78
|
});
|
|
78
79
|
|
|
79
80
|
it('writes a well-formed-YAML frontmatter file with the expected fields + body', async () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mkdtemp
|
|
1
|
+
import { mkdtemp } from 'node:fs/promises';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
@@ -7,6 +7,7 @@ import { readMcpConfig, writeMcpConfig } from '../config-io.js';
|
|
|
7
7
|
import type { AddServerInput } from '../schema.js';
|
|
8
8
|
import type { AdminToolRegistryLike } from '../types.js';
|
|
9
9
|
import { buildAddServerTool, type AddServerToolDeps } from './add.js';
|
|
10
|
+
import { removeDir } from '@moxxy/vitest-preset/fs';
|
|
10
11
|
|
|
11
12
|
const PING: McpToolDescriptor = { name: 'ping', description: 'pong', inputSchema: { type: 'object' } };
|
|
12
13
|
|
|
@@ -41,7 +42,7 @@ describe('admin/tools/add (mcp_add_server)', () => {
|
|
|
41
42
|
afterEach(async () => {
|
|
42
43
|
if (original === undefined) delete process.env.MOXXY_HOME;
|
|
43
44
|
else process.env.MOXXY_HOME = original;
|
|
44
|
-
await
|
|
45
|
+
await removeDir(home);
|
|
45
46
|
});
|
|
46
47
|
|
|
47
48
|
const makeDeps = (over: Partial<AddServerToolDeps> = {}): {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { mkdtemp
|
|
1
|
+
import { mkdtemp } from 'node:fs/promises';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
5
5
|
import { readMcpConfig, writeMcpConfig } from '../config-io.js';
|
|
6
6
|
import { buildRemoveServerTool } from './remove.js';
|
|
7
|
+
import { removeDir } from '@moxxy/vitest-preset/fs';
|
|
7
8
|
|
|
8
9
|
const ctx = () => ({
|
|
9
10
|
sessionId: 's' as never,
|
|
@@ -27,7 +28,7 @@ describe('admin/tools/remove (mcp_remove_server)', () => {
|
|
|
27
28
|
afterEach(async () => {
|
|
28
29
|
if (original === undefined) delete process.env.MOXXY_HOME;
|
|
29
30
|
else process.env.MOXXY_HOME = original;
|
|
30
|
-
await
|
|
31
|
+
await removeDir(home);
|
|
31
32
|
});
|
|
32
33
|
|
|
33
34
|
it('removes from config AND detaches from the live session', async () => {
|