@moxxy/plugin-provider-claude-code 0.48.1 → 0.48.3
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 +14 -14
- package/src/agent-cli.test.ts +3 -3
- package/src/sdk-install.test.ts +19 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moxxy/plugin-provider-claude-code",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.3",
|
|
4
4
|
"description": "Claude Agent connection for moxxy: Claude Code itself does the work through the Claude Agent SDK, on the person's Claude subscription sign-in, while Moxxy shows it, asks for approvals and questions, and lends its own tools over MCP.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"moxxy",
|
|
@@ -59,23 +59,23 @@
|
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@moxxy/
|
|
63
|
-
"@moxxy/
|
|
64
|
-
"@moxxy/sdk": "0.48.
|
|
62
|
+
"@moxxy/plugin-browser": "0.48.3",
|
|
63
|
+
"@moxxy/agent-connection-kit": "0.1.7",
|
|
64
|
+
"@moxxy/sdk": "0.48.3"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
67
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
68
68
|
"@types/node": "^22.20.5",
|
|
69
69
|
"typescript": "^6.0.3",
|
|
70
|
-
"vitest": "^5.0.
|
|
71
|
-
"zod": "^4.6.
|
|
72
|
-
"@moxxy/
|
|
73
|
-
"@moxxy/
|
|
74
|
-
"@moxxy/mode-
|
|
75
|
-
"@moxxy/mode-
|
|
76
|
-
"@moxxy/
|
|
77
|
-
"@moxxy/
|
|
78
|
-
"@moxxy/
|
|
70
|
+
"vitest": "^5.0.5",
|
|
71
|
+
"zod": "^4.6.7",
|
|
72
|
+
"@moxxy/mode-default": "0.48.3",
|
|
73
|
+
"@moxxy/core": "0.48.3",
|
|
74
|
+
"@moxxy/mode-plan": "0.48.3",
|
|
75
|
+
"@moxxy/mode-goal": "0.48.3",
|
|
76
|
+
"@moxxy/tsconfig": "0.0.0",
|
|
77
|
+
"@moxxy/testing": "0.0.82",
|
|
78
|
+
"@moxxy/vitest-preset": "0.0.0"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"build": "tsc -p tsconfig.json",
|
package/src/agent-cli.test.ts
CHANGED
|
@@ -51,13 +51,13 @@ describe.skipIf(process.platform === 'win32')('the claude CLI', () => {
|
|
|
51
51
|
expect(await checkClaudeCliAuth('claude')).toMatchObject({ state: 'signed-in' });
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
-
it('is checked for updates against the version
|
|
54
|
+
it('is checked for updates against the version its release channel last gave', async () => {
|
|
55
55
|
installed('2.1.250 (Claude Code)');
|
|
56
56
|
const moxxyHome = path.join(home ?? '', 'moxxy');
|
|
57
57
|
mkdirSync(path.join(moxxyHome, 'cache'), { recursive: true });
|
|
58
58
|
writeFileSync(
|
|
59
59
|
path.join(moxxyHome, 'cache', 'agent-cli-latest.json'),
|
|
60
|
-
JSON.stringify({ '
|
|
60
|
+
JSON.stringify({ 'channel:claude': { version: '2.1.300', at: Date.now() } }),
|
|
61
61
|
);
|
|
62
62
|
process.env.MOXXY_HOME = moxxyHome;
|
|
63
63
|
const cli = claudeCodeProviderDef.agentCli;
|
|
@@ -73,7 +73,7 @@ describe.skipIf(process.platform === 'win32')('the claude CLI', () => {
|
|
|
73
73
|
installed('2.1.300 (Claude Code)', 'if [ "$1" = "auth" ]; then echo \'{"loggedIn":true,"email":"ada@example.com"}\'; exit 0; fi');
|
|
74
74
|
const moxxyHome = path.join(home ?? '', 'moxxy');
|
|
75
75
|
mkdirSync(path.join(moxxyHome, 'cache'), { recursive: true });
|
|
76
|
-
writeFileSync(path.join(moxxyHome, 'cache', 'agent-cli-latest.json'), JSON.stringify({ '
|
|
76
|
+
writeFileSync(path.join(moxxyHome, 'cache', 'agent-cli-latest.json'), JSON.stringify({ 'channel:claude': { version: '2.1.300', at: Date.now() } }));
|
|
77
77
|
process.env.MOXXY_HOME = moxxyHome;
|
|
78
78
|
const cli = claudeCodeProviderDef.agentCli;
|
|
79
79
|
assertDefined(cli, 'the provider checks its CLI');
|
package/src/sdk-install.test.ts
CHANGED
|
@@ -9,7 +9,14 @@ import { tmpdir } from 'node:os';
|
|
|
9
9
|
import path from 'node:path';
|
|
10
10
|
import { afterEach, describe, expect, it } from 'vitest';
|
|
11
11
|
import { removeDirSync } from '@moxxy/vitest-preset/fs';
|
|
12
|
-
import {
|
|
12
|
+
import { CLAUDE_CLI, compareVersions } from '@moxxy/agent-connection-kit';
|
|
13
|
+
import {
|
|
14
|
+
CLAUDE_AGENT_SDK_PACKAGE,
|
|
15
|
+
CLAUDE_AGENT_SDK_VERSION,
|
|
16
|
+
ensureClaudeAgentSdk,
|
|
17
|
+
installClaudeAgentSdk,
|
|
18
|
+
loadClaudeAgentSdk,
|
|
19
|
+
} from './sdk-install.js';
|
|
13
20
|
|
|
14
21
|
const roots: string[] = [];
|
|
15
22
|
afterEach(() => {
|
|
@@ -122,3 +129,14 @@ fs.writeFileSync(path.join(pkg, 'sdk.mjs'), 'export function query() { return "i
|
|
|
122
129
|
).rejects.toThrow(/npm/);
|
|
123
130
|
});
|
|
124
131
|
});
|
|
132
|
+
|
|
133
|
+
describe('the pinned SDK and the oldest Claude Code Moxxy accepts', () => {
|
|
134
|
+
// Anthropic: "The SDK version tracks the bundled Claude Code version. SDK v0.3.191 bundles Claude Code v2.1.191."
|
|
135
|
+
// An older Claude Code than the SDK was built with ignores some of its options, permission rules among them.
|
|
136
|
+
it('accepts no Claude Code older than the one the pinned SDK was built with', () => {
|
|
137
|
+
const sdk = /^0\.3\.(\d+)$/.exec(CLAUDE_AGENT_SDK_VERSION);
|
|
138
|
+
expect(sdk, `SDK ${CLAUDE_AGENT_SDK_VERSION} is past 0.3.x: check which Claude Code it bundles (npm view ${CLAUDE_AGENT_SDK_PACKAGE} claudeCodeVersion) and update this rule`).not.toBeNull();
|
|
139
|
+
const builtWith = `2.1.${sdk![1]}`;
|
|
140
|
+
expect(compareVersions(CLAUDE_CLI.minimumVersion, builtWith), `raise CLAUDE_CLI.minimumVersion to ${builtWith}`).toBeGreaterThanOrEqual(0);
|
|
141
|
+
});
|
|
142
|
+
});
|