@zerowall/dsh-claude-coderun 0.1.0-preview.2 → 0.1.0-preview.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/README.i18n.yaml +4 -4
- package/README.md +3 -1
- package/README.zh.md +3 -1
- package/lib/client.js +85 -58
- package/lib/index.js +308 -110
- package/lib/typert.host.js +65 -57
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +64 -56
- package/lib/types/client/locales.d.ts +10 -0
- package/lib/types/host/index.d.ts +43 -2
- package/lib/types/host/installer.d.ts +3 -0
- package/lib/types/host/runtime.d.ts +15 -5
- package/lib/types/shared/types.d.ts +2 -1
- package/package.json +7 -5
- package/zerowall.plugin.json +1 -1
|
@@ -26,6 +26,11 @@ export declare const zh: {
|
|
|
26
26
|
readonly desktopOnly: "仅 ZeroWall Desktop 支持";
|
|
27
27
|
readonly installed: "已安装";
|
|
28
28
|
readonly notInstalled: "尚未安装";
|
|
29
|
+
readonly checking: "正在检测";
|
|
30
|
+
readonly installing: "正在安装";
|
|
31
|
+
readonly verifying: "正在校验";
|
|
32
|
+
readonly failed: "准备失败";
|
|
33
|
+
readonly repair: "修复/重试";
|
|
29
34
|
readonly running: "运行中";
|
|
30
35
|
readonly ready: "已就绪";
|
|
31
36
|
readonly path: "应用安装路径";
|
|
@@ -144,6 +149,11 @@ export declare const en: {
|
|
|
144
149
|
readonly desktopOnly: "Supported only in ZeroWall Desktop";
|
|
145
150
|
readonly installed: "Installed";
|
|
146
151
|
readonly notInstalled: "Not installed";
|
|
152
|
+
readonly checking: "Checking";
|
|
153
|
+
readonly installing: "Installing";
|
|
154
|
+
readonly verifying: "Verifying";
|
|
155
|
+
readonly failed: "Preparation failed";
|
|
156
|
+
readonly repair: "Repair or retry";
|
|
147
157
|
readonly running: "Running";
|
|
148
158
|
readonly ready: "Ready";
|
|
149
159
|
readonly path: "Application install path";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import schema from '@deepseek-ai/schemastery';
|
|
1
2
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
3
|
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
3
4
|
import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
|
|
@@ -12,6 +13,7 @@ declare module '@deepseek-ai/cordis' {
|
|
|
12
13
|
}
|
|
13
14
|
/** One installed runtime, with credentials resolved afresh for every prompt. */
|
|
14
15
|
export declare class ClaudeCodeService extends TypertRemoteService {
|
|
16
|
+
private readonly config;
|
|
15
17
|
private manager?;
|
|
16
18
|
private readonly secrets;
|
|
17
19
|
private readonly sessions;
|
|
@@ -20,8 +22,17 @@ export declare class ClaudeCodeService extends TypertRemoteService {
|
|
|
20
22
|
private mutation;
|
|
21
23
|
private readonly chatAgents;
|
|
22
24
|
private processReservations;
|
|
23
|
-
|
|
25
|
+
private readonly runtimeInitialization;
|
|
26
|
+
private preparation?;
|
|
27
|
+
private readonly installAbort;
|
|
28
|
+
private readiness;
|
|
29
|
+
private runtimeDiagnostic?;
|
|
30
|
+
private autoSuppressed;
|
|
31
|
+
private disposed;
|
|
32
|
+
private preparationRevision;
|
|
33
|
+
constructor(ctx: Context, config?: ClaudeRuntimeConfig);
|
|
24
34
|
private desktop;
|
|
35
|
+
private runtimeRoot;
|
|
25
36
|
private anyRunning;
|
|
26
37
|
private sessionOccupied;
|
|
27
38
|
private runtime;
|
|
@@ -48,6 +59,8 @@ export declare class ClaudeCodeService extends TypertRemoteService {
|
|
|
48
59
|
settingsInstall(): Promise<ClaudeCodeStatus>;
|
|
49
60
|
settingsRollback(): Promise<ClaudeCodeStatus>;
|
|
50
61
|
settingsUninstall(): Promise<ClaudeCodeStatus>;
|
|
62
|
+
private initializeRuntime;
|
|
63
|
+
private ensurePrepared;
|
|
51
64
|
private changeRuntime;
|
|
52
65
|
private route;
|
|
53
66
|
permissionView(agent: Agent): Promise<ClaudePermissionView>;
|
|
@@ -69,10 +82,38 @@ export declare class ClaudeCodeService extends TypertRemoteService {
|
|
|
69
82
|
stop(agent: Agent): Promise<void>;
|
|
70
83
|
clear(agent: Agent): void;
|
|
71
84
|
}
|
|
72
|
-
export
|
|
85
|
+
export interface ClaudeRuntimeConfig {
|
|
86
|
+
runtimeRoot?: string;
|
|
87
|
+
version?: string;
|
|
88
|
+
registry?: string;
|
|
89
|
+
autoInstall?: boolean;
|
|
90
|
+
}
|
|
91
|
+
export declare const Config: schema<Schemastery.ObjectS<NoInfer<{
|
|
92
|
+
runtimeRoot: schema<string, string, "plain">;
|
|
93
|
+
version: schema<string, string, "defined">;
|
|
94
|
+
registry: schema<string, string, "defined">;
|
|
95
|
+
autoInstall: schema<boolean, boolean, "defined">;
|
|
96
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
97
|
+
runtimeRoot: schema<string, string, "plain">;
|
|
98
|
+
version: schema<string, string, "defined">;
|
|
99
|
+
registry: schema<string, string, "defined">;
|
|
100
|
+
autoInstall: schema<boolean, boolean, "defined">;
|
|
101
|
+
}>>, "plain">;
|
|
102
|
+
export declare function apply(ctx: Context, config?: ClaudeRuntimeConfig): void;
|
|
73
103
|
declare const _default: {
|
|
74
104
|
name: string;
|
|
75
105
|
inject: string[];
|
|
106
|
+
Config: schema<Schemastery.ObjectS<NoInfer<{
|
|
107
|
+
runtimeRoot: schema<string, string, "plain">;
|
|
108
|
+
version: schema<string, string, "defined">;
|
|
109
|
+
registry: schema<string, string, "defined">;
|
|
110
|
+
autoInstall: schema<boolean, boolean, "defined">;
|
|
111
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
112
|
+
runtimeRoot: schema<string, string, "plain">;
|
|
113
|
+
version: schema<string, string, "defined">;
|
|
114
|
+
registry: schema<string, string, "defined">;
|
|
115
|
+
autoInstall: schema<boolean, boolean, "defined">;
|
|
116
|
+
}>>, "plain">;
|
|
76
117
|
apply: typeof apply;
|
|
77
118
|
};
|
|
78
119
|
export default _default;
|
|
@@ -2,11 +2,16 @@ import * as nodeFs from 'node:fs/promises';
|
|
|
2
2
|
export declare const CLAUDE_CODE_PACKAGE = "@anthropic-ai/claude-code";
|
|
3
3
|
export declare const CLAUDE_CODE_VERSION = "2.1.309";
|
|
4
4
|
export declare const CLAUDE_CODE_REGISTRY = "https://registry.npmmirror.com";
|
|
5
|
+
/** A failed isolated pnpm attempt may be repeated without changing the active CLI. */
|
|
6
|
+
export declare class ClaudeInstallError extends Error {
|
|
7
|
+
}
|
|
5
8
|
type FsPromises = Pick<typeof nodeFs, 'mkdir' | 'writeFile' | 'readFile' | 'rename' | 'rm' | 'lstat' | 'open' | 'chmod' | 'realpath' | 'link' | 'readdir'>;
|
|
6
9
|
export type ProcessRunOptions = {
|
|
7
10
|
cwd: string;
|
|
8
11
|
env: NodeJS.ProcessEnv;
|
|
9
12
|
windowsHide: true;
|
|
13
|
+
signal?: AbortSignal;
|
|
14
|
+
timeoutMs?: number;
|
|
10
15
|
};
|
|
11
16
|
export type ProcessRunResult = {
|
|
12
17
|
code: number;
|
|
@@ -15,11 +20,8 @@ export type ProcessRunResult = {
|
|
|
15
20
|
};
|
|
16
21
|
export type ProcessRunner = (command: string, args: string[], options: ProcessRunOptions) => Promise<ProcessRunResult>;
|
|
17
22
|
export type BundledPnpmRuntimeOptions = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/** Repository root used to probe development copies of the bundled pnpm. */
|
|
21
|
-
projectRoot?: string;
|
|
22
|
-
electron?: boolean;
|
|
23
|
+
runtimeRoot?: string;
|
|
24
|
+
pnpmEntry?: string;
|
|
23
25
|
executable?: string;
|
|
24
26
|
existsSync?: (path: string) => boolean;
|
|
25
27
|
};
|
|
@@ -38,6 +40,10 @@ export type ClaudeRuntimeStatus = {
|
|
|
38
40
|
export type ClaudeRuntimeManagerOptions = {
|
|
39
41
|
/** Dedicated plugin-owned data directory, never the user's Claude home directory. */
|
|
40
42
|
dataDir: string;
|
|
43
|
+
version?: string;
|
|
44
|
+
registry?: string;
|
|
45
|
+
signal?: AbortSignal;
|
|
46
|
+
onPhase?: (phase: 'installing' | 'verifying') => void;
|
|
41
47
|
platform?: NodeJS.Platform;
|
|
42
48
|
pnpm?: BundledPnpmRuntime;
|
|
43
49
|
fs?: FsPromises;
|
|
@@ -63,6 +69,10 @@ export declare class ClaudeRuntimeManager {
|
|
|
63
69
|
/** Return the active CLI's absolute path without consulting PATH or a user install. */
|
|
64
70
|
getExecutablePath(): Promise<string | undefined>;
|
|
65
71
|
status(): Promise<ClaudeRuntimeStatus>;
|
|
72
|
+
/** Verify the active executable without downloading or changing activation state. */
|
|
73
|
+
inspect(): Promise<ClaudeRuntimeStatus>;
|
|
74
|
+
/** Explicitly repair an activation pointer using a retained, verified generation. */
|
|
75
|
+
recover(): Promise<ClaudeRuntimeStatus>;
|
|
66
76
|
/** Install the pinned CLI into a private candidate and atomically activate it. */
|
|
67
77
|
installOrUpdate(): Promise<ClaudeRuntimeStatus>;
|
|
68
78
|
/** Atomically reactivate the previous successfully installed generation. */
|
|
@@ -6,7 +6,8 @@ export interface ClaudeCodeStatus {
|
|
|
6
6
|
executablePath?: string;
|
|
7
7
|
rollbackAvailable: boolean;
|
|
8
8
|
running: boolean;
|
|
9
|
-
readiness?: '
|
|
9
|
+
readiness?: 'unsupported' | 'checking' | 'missing' | 'installing' | 'verifying' | 'ready' | 'failed';
|
|
10
|
+
errorCategory?: 'runtime' | 'installation';
|
|
10
11
|
diagnostic?: string;
|
|
11
12
|
}
|
|
12
13
|
export type ClaudePermissionMode = 'default' | 'dontAsk' | 'acceptEdits' | 'auto' | 'plan' | 'bypassPermissions';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerowall/dsh-claude-coderun",
|
|
3
|
-
"version": "0.1.0-preview.
|
|
3
|
+
"version": "0.1.0-preview.3",
|
|
4
4
|
"description": "Run an isolated Claude Code CLI from ZeroWall conversations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -126,8 +126,8 @@
|
|
|
126
126
|
"plugin-detail.zh.md"
|
|
127
127
|
],
|
|
128
128
|
"dependencies": {
|
|
129
|
-
"@zerowall/dsh-plugin-mcp": "0.1.0-preview.
|
|
130
|
-
"@zerowall/dsh-plugin-environment": "0.1.0-preview.
|
|
129
|
+
"@zerowall/dsh-plugin-mcp": "0.1.0-preview.4",
|
|
130
|
+
"@zerowall/dsh-plugin-environment": "0.1.0-preview.4",
|
|
131
131
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
132
132
|
"react-dom": "^18.2.0",
|
|
133
133
|
"zod": "4.4.3",
|
|
@@ -184,7 +184,8 @@
|
|
|
184
184
|
"@deepseek-ai/dsh-user-approval": "0.2.2-rc.1",
|
|
185
185
|
"react": "^18.2.0",
|
|
186
186
|
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.1",
|
|
187
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.1"
|
|
187
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.1",
|
|
188
|
+
"@deepseek-ai/dsh-home-paths": "0.2.2-rc.1"
|
|
188
189
|
},
|
|
189
190
|
"devDependencies": {
|
|
190
191
|
"@anthropic-ai/claude-agent-sdk": "0.3.263",
|
|
@@ -240,7 +241,8 @@
|
|
|
240
241
|
"@deepseek-ai/dsh-typert-generator": "0.2.2-rc.1",
|
|
241
242
|
"react": "^18.2.0",
|
|
242
243
|
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.1",
|
|
243
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.1"
|
|
244
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.1",
|
|
245
|
+
"@deepseek-ai/dsh-home-paths": "0.2.2-rc.1"
|
|
244
246
|
},
|
|
245
247
|
"engines": {
|
|
246
248
|
"node": ">=24.9.0",
|