@zerowall/dsh-claude-coderun 0.1.4 → 0.1.6

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 CHANGED
@@ -9,8 +9,8 @@
9
9
  en: 39818399cc99cf66
10
10
  zh: fb76d11416ef4c56
11
11
  /zerowall-dsh-claude-coderun/use:
12
- en: c987914f772073a7
13
- zh: 7921bc4f39d56c5a
12
+ en: 4b7a1e8776b2325d
13
+ zh: a25e526e669b0fe7
14
14
  /zerowall-dsh-claude-coderun/development:
15
15
  en: 664d8cc74cf12ccc
16
16
  zh: c419ad047ce512d7
package/README.md CHANGED
@@ -14,6 +14,8 @@ ZeroWall Desktop selects this package from its installation manifest. Open Plugi
14
14
 
15
15
  See the [retained migration reference](migration-reference.md) for detailed workflows and historical platform requirements. The package manifest owns current dependency versions.
16
16
 
17
+ In Claude Code mode, AI Cloud models use the selected group's Sub2API Messages endpoint (`POST /v1/messages`), including models that use OpenAI or Gemini protocols in standard mode. The gateway decides whether the group supports Messages for the selected model. For manually configured providers, select an Anthropic Messages route.
18
+
17
19
  Runtime preparation uses the Desktop carrier's standalone Node and pnpm paths, never a personal Claude installation. Installer scripts receive the bundled Node directory first in PATH; a flat private dependency layout keeps Windows lifecycle-script directories short. Defaults are CLI `2.1.309`, HTTPS registry `https://registry.npmmirror.com` and `autoInstall: true`; these are plugin Config fields. Storage defaults to `DSH_HOME/zerowall/claude-code/runtime`, with `runtimeRoot` or `ZEROWALL_CLAUDE_RUNTIME_ROOT` overrides. Status refresh runs a bounded version probe without installing or moving the activation pointer. Install, automatic startup and session startup share preparation. Failed candidates preserve the active generation. Exit cancels the installer tree and awaits termination; explicit uninstall persists automatic-install suppression, and manual installation restores it.
18
20
 
19
21
  ## Development
package/README.zh.md CHANGED
@@ -14,6 +14,8 @@ ZeroWall Desktop 根据安装清单选择此包。打开「插件 → Claude Cod
14
14
 
15
15
  详细工作流及历史平台要求见[保留的迁移参考](migration-reference.md)。当前依赖版本以包清单为准。
16
16
 
17
+ 在 Claude Code 模式下,AI 云模型使用所选分组的 Sub2API Messages 接口(`POST /v1/messages`),也适用于标准模式中使用 OpenAI 或 Gemini 协议的模型。分组是否支持所选模型通过 Messages 调用,由网关决定。使用手动配置的提供方时,请选择 Anthropic Messages 路由。
18
+
17
19
  运行准备使用 Desktop 提供的独立 Node 与 pnpm 路径,不使用个人 Claude 安装。安装脚本的 PATH 优先使用内置 Node 目录;隔离依赖采用扁平目录,缩短 Windows 安装脚本所在的路径。插件 Config 默认 `version: 2.1.309`、`registry: https://registry.npmmirror.com` 和 `autoInstall: true`。数据目录默认为 `DSH_HOME/zerowall/claude-code/runtime`,可通过 `runtimeRoot` 或 `ZEROWALL_CLAUDE_RUNTIME_ROOT` 覆盖。状态刷新只执行限时版本探测,不安装或移动激活指针。自动准备、手动安装和会话启动共享任务;候选失败保留有效版本。退出时取消并等待安装进程树结束;明确卸载会持久化禁止自动安装的状态,手动安装可恢复。
18
20
 
19
21
  ## 开发
package/lib/client.js CHANGED
@@ -22180,7 +22180,7 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
22180
22180
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_clear_result$schema,
22181
22181
  jsonSchemaError: "typert tool schema: unsupported void value"
22182
22182
  },
22183
- sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1464, "column": 3 }
22183
+ sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1457, "column": 3 }
22184
22184
  },
22185
22185
  "zerowallClaudeCode/cliSetModel": {
22186
22186
  service: "zerowallClaudeCode",
@@ -22231,7 +22231,7 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
22231
22231
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_cliSetModel_result$schema,
22232
22232
  jsonSchema: { "type": "object", "properties": { "active": { "type": "boolean" }, "queued": { "type": "boolean" }, "sessionId": { "type": "string" }, "model": { "type": "string" }, "commands": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "argumentHint": { "type": "string" } }, "required": ["name"], "additionalProperties": true } }, "output": { "type": "string" }, "contextUsage": { "type": "object", "properties": { "totalTokens": { "type": "number" }, "maxTokens": { "type": "number" }, "rawMaxTokens": { "type": "number" }, "percentage": { "type": "number" }, "autoCompactThreshold": { "type": "number" }, "isAutoCompactEnabled": { "type": "boolean", "enum": [false, true], "description": "Present only when the managed Claude runtime reports its real state." }, "detail": { "type": "string", "enum": ["summary", "full"] }, "apiUsage": { "type": "object", "properties": { "input_tokens": { "type": "number" }, "output_tokens": { "type": "number" }, "cache_creation_input_tokens": { "type": "number" }, "cache_read_input_tokens": { "type": "number" } }, "required": [], "additionalProperties": true } }, "required": ["totalTokens", "maxTokens", "percentage", "detail"], "additionalProperties": true }, "lastCompact": { "type": "object", "properties": { "trigger": { "type": "string", "enum": ["auto", "manual"] }, "preTokens": { "type": "number" }, "postTokens": { "type": "number" }, "durationMs": { "type": "number" } }, "required": ["trigger", "preTokens"], "additionalProperties": true }, "error": { "type": "string" }, "diagnostics": { "type": "object", "properties": { "model": { "type": "string" }, "routeCredential": { "type": "string", "enum": ["missing", "injected"] }, "routeBaseUrl": { "type": "string", "enum": ["missing", "injected"] }, "claudeOAuth": { "type": "string", "enum": ["not-used", "required"] }, "skills": { "type": "object", "properties": { "synced": { "type": "number" }, "skipped": { "type": "number" } }, "required": ["synced", "skipped"], "additionalProperties": true }, "mcp": { "type": "object", "properties": { "synced": { "type": "number" }, "skipped": { "type": "number" } }, "required": ["synced", "skipped"], "additionalProperties": true }, "environmentNames": { "type": "array", "items": { "type": "string" } }, "skipped": { "type": "array", "items": { "type": "string" } } }, "required": ["routeCredential", "routeBaseUrl", "claudeOAuth", "skills", "mcp", "environmentNames", "skipped"], "additionalProperties": true } }, "required": ["active", "queued", "commands", "output"], "additionalProperties": true }
22233
22233
  },
22234
- sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1420, "column": 9 }
22234
+ sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1413, "column": 9 }
22235
22235
  },
22236
22236
  "zerowallClaudeCode/cliSetPermissionMode": {
22237
22237
  service: "zerowallClaudeCode",
@@ -22282,7 +22282,7 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
22282
22282
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_cliSetPermissionMode_result$schema,
22283
22283
  jsonSchema: { "type": "object", "properties": { "active": { "type": "boolean" }, "queued": { "type": "boolean" }, "sessionId": { "type": "string" }, "model": { "type": "string" }, "commands": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "argumentHint": { "type": "string" } }, "required": ["name"], "additionalProperties": true } }, "output": { "type": "string" }, "contextUsage": { "type": "object", "properties": { "totalTokens": { "type": "number" }, "maxTokens": { "type": "number" }, "rawMaxTokens": { "type": "number" }, "percentage": { "type": "number" }, "autoCompactThreshold": { "type": "number" }, "isAutoCompactEnabled": { "type": "boolean", "enum": [false, true], "description": "Present only when the managed Claude runtime reports its real state." }, "detail": { "type": "string", "enum": ["summary", "full"] }, "apiUsage": { "type": "object", "properties": { "input_tokens": { "type": "number" }, "output_tokens": { "type": "number" }, "cache_creation_input_tokens": { "type": "number" }, "cache_read_input_tokens": { "type": "number" } }, "required": [], "additionalProperties": true } }, "required": ["totalTokens", "maxTokens", "percentage", "detail"], "additionalProperties": true }, "lastCompact": { "type": "object", "properties": { "trigger": { "type": "string", "enum": ["auto", "manual"] }, "preTokens": { "type": "number" }, "postTokens": { "type": "number" }, "durationMs": { "type": "number" } }, "required": ["trigger", "preTokens"], "additionalProperties": true }, "error": { "type": "string" }, "diagnostics": { "type": "object", "properties": { "model": { "type": "string" }, "routeCredential": { "type": "string", "enum": ["missing", "injected"] }, "routeBaseUrl": { "type": "string", "enum": ["missing", "injected"] }, "claudeOAuth": { "type": "string", "enum": ["not-used", "required"] }, "skills": { "type": "object", "properties": { "synced": { "type": "number" }, "skipped": { "type": "number" } }, "required": ["synced", "skipped"], "additionalProperties": true }, "mcp": { "type": "object", "properties": { "synced": { "type": "number" }, "skipped": { "type": "number" } }, "required": ["synced", "skipped"], "additionalProperties": true }, "environmentNames": { "type": "array", "items": { "type": "string" } }, "skipped": { "type": "array", "items": { "type": "string" } } }, "required": ["routeCredential", "routeBaseUrl", "claudeOAuth", "skills", "mcp", "environmentNames", "skipped"], "additionalProperties": true } }, "required": ["active", "queued", "commands", "output"], "additionalProperties": true }
22284
22284
  },
22285
- sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1429, "column": 9 }
22285
+ sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1422, "column": 9 }
22286
22286
  },
22287
22287
  "zerowallClaudeCode/contextUsage": {
22288
22288
  service: "zerowallClaudeCode",
@@ -22334,7 +22334,7 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
22334
22334
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_contextUsage_result$schema,
22335
22335
  jsonSchema: { "type": "object", "properties": { "active": { "type": "boolean" }, "queued": { "type": "boolean" }, "sessionId": { "type": "string" }, "model": { "type": "string" }, "commands": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "argumentHint": { "type": "string" } }, "required": ["name"], "additionalProperties": true } }, "output": { "type": "string" }, "contextUsage": { "type": "object", "properties": { "totalTokens": { "type": "number" }, "maxTokens": { "type": "number" }, "rawMaxTokens": { "type": "number" }, "percentage": { "type": "number" }, "autoCompactThreshold": { "type": "number" }, "isAutoCompactEnabled": { "type": "boolean", "enum": [false, true], "description": "Present only when the managed Claude runtime reports its real state." }, "detail": { "type": "string", "enum": ["summary", "full"] }, "apiUsage": { "type": "object", "properties": { "input_tokens": { "type": "number" }, "output_tokens": { "type": "number" }, "cache_creation_input_tokens": { "type": "number" }, "cache_read_input_tokens": { "type": "number" } }, "required": [], "additionalProperties": true } }, "required": ["totalTokens", "maxTokens", "percentage", "detail"], "additionalProperties": true }, "lastCompact": { "type": "object", "properties": { "trigger": { "type": "string", "enum": ["auto", "manual"] }, "preTokens": { "type": "number" }, "postTokens": { "type": "number" }, "durationMs": { "type": "number" } }, "required": ["trigger", "preTokens"], "additionalProperties": true }, "error": { "type": "string" }, "diagnostics": { "type": "object", "properties": { "model": { "type": "string" }, "routeCredential": { "type": "string", "enum": ["missing", "injected"] }, "routeBaseUrl": { "type": "string", "enum": ["missing", "injected"] }, "claudeOAuth": { "type": "string", "enum": ["not-used", "required"] }, "skills": { "type": "object", "properties": { "synced": { "type": "number" }, "skipped": { "type": "number" } }, "required": ["synced", "skipped"], "additionalProperties": true }, "mcp": { "type": "object", "properties": { "synced": { "type": "number" }, "skipped": { "type": "number" } }, "required": ["synced", "skipped"], "additionalProperties": true }, "environmentNames": { "type": "array", "items": { "type": "string" } }, "skipped": { "type": "array", "items": { "type": "string" } } }, "required": ["routeCredential", "routeBaseUrl", "claudeOAuth", "skills", "mcp", "environmentNames", "skipped"], "additionalProperties": true } }, "required": ["active", "queued", "commands", "output"], "additionalProperties": true }
22336
22336
  },
22337
- sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1403, "column": 9 }
22337
+ sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1396, "column": 9 }
22338
22338
  },
22339
22339
  "zerowallClaudeCode/installCli": {
22340
22340
  service: "zerowallClaudeCode",
@@ -22491,7 +22491,7 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
22491
22491
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_read_result$schema,
22492
22492
  jsonSchema: { "oneOf": [{ "type": "null", "const": null }, { "type": "object", "properties": { "id": { "type": "string" }, "provider": { "type": "string" }, "model": { "type": "string" }, "executablePath": { "type": "string", "description": "Absolute CLI entrypoint captured for this turn, before spawning it." }, "running": { "type": "boolean" }, "output": { "type": "string" }, "exitCode": { "oneOf": [{ "type": "null", "const": null }, { "type": "number" }] }, "message": { "type": "string" }, "skills": { "type": "number" }, "mcp": { "type": "number" }, "skipped": { "type": "array", "items": { "type": "string" } }, "renderer": { "type": "string", "enum": ["plugin", "native"] }, "turn": { "type": "number" }, "step": { "type": "number" }, "activity": { "type": "array", "items": { "type": "object", "properties": { "index": { "type": "number" }, "kind": { "type": "string", "enum": ["text", "reasoning", "tool-call"] }, "text": { "type": "string" }, "ended": { "type": "boolean" }, "id": { "type": "string" }, "name": { "type": "string" }, "result": { "type": "string" }, "failed": { "type": "boolean", "enum": [false, true] }, "answer": { "type": "boolean", "enum": [false, true] } }, "required": ["index", "kind", "text", "ended"], "additionalProperties": true } }, "nativeSessionId": { "type": "string" }, "resumed": { "type": "boolean", "enum": [false, true] }, "permission": { "type": "object", "properties": { "active": { "type": "boolean" }, "source": { "type": "string", "enum": ["plugin", "native"] }, "mode": { "type": "string", "enum": ["default", "dontAsk", "acceptEdits", "auto", "plan", "bypassPermissions"] }, "hostPreset": { "type": "string" }, "hostSandbox": { "type": "string" }, "hostApproval": { "type": "string" }, "runningMode": { "type": "string", "enum": ["default", "dontAsk", "acceptEdits", "auto", "plan", "bypassPermissions"] }, "nativeOptions": { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" } }, "required": ["value", "name"], "additionalProperties": true } } }, "required": ["active", "source", "mode", "hostPreset", "hostSandbox", "hostApproval", "nativeOptions"], "additionalProperties": true }, "resources": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["skill", "mcp"] }, "name": { "type": "string" }, "state": { "type": "string", "enum": ["failed", "manual", "synced", "on-demand", "disabled", "unavailable"] }, "detail": { "type": "string" } }, "required": ["kind", "name", "state"], "additionalProperties": true } }, "diagnostic": { "type": "object", "properties": { "id": { "type": "string" }, "category": { "type": "string" } }, "required": ["id", "category"], "additionalProperties": true }, "contextUsage": { "type": "object", "properties": { "totalTokens": { "type": "number" }, "maxTokens": { "type": "number" }, "rawMaxTokens": { "type": "number" }, "percentage": { "type": "number" }, "autoCompactThreshold": { "type": "number" }, "isAutoCompactEnabled": { "type": "boolean", "enum": [false, true], "description": "Present only when the managed Claude runtime reports its real state." }, "detail": { "type": "string", "enum": ["summary", "full"] }, "apiUsage": { "type": "object", "properties": { "input_tokens": { "type": "number" }, "output_tokens": { "type": "number" }, "cache_creation_input_tokens": { "type": "number" }, "cache_read_input_tokens": { "type": "number" } }, "required": [], "additionalProperties": true } }, "required": ["totalTokens", "maxTokens", "percentage", "detail"], "additionalProperties": true }, "lastCompact": { "type": "object", "properties": { "trigger": { "type": "string", "enum": ["auto", "manual"] }, "preTokens": { "type": "number" }, "postTokens": { "type": "number" }, "durationMs": { "type": "number" } }, "required": ["trigger", "preTokens"], "additionalProperties": true } }, "required": ["id", "provider", "model", "running", "output", "skills", "mcp", "skipped"], "additionalProperties": true }] }
22493
22493
  },
22494
- sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1437, "column": 3 }
22494
+ sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1430, "column": 3 }
22495
22495
  },
22496
22496
  "zerowallClaudeCode/readTranscript": {
22497
22497
  service: "zerowallClaudeCode",
@@ -22558,7 +22558,7 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
22558
22558
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_readTranscript_result$schema,
22559
22559
  jsonSchema: { "oneOf": [{ "type": "null", "const": null }, { "type": "object", "properties": { "turn": { "type": "number" }, "step": { "type": "number" }, "renderer": { "type": "string", "enum": ["plugin", "native"] }, "running": { "type": "boolean" }, "activity": { "type": "array", "items": { "type": "object", "properties": { "index": { "type": "number" }, "kind": { "type": "string", "enum": ["text", "reasoning", "tool-call"] }, "text": { "type": "string" }, "ended": { "type": "boolean" }, "id": { "type": "string" }, "name": { "type": "string" }, "result": { "type": "string" }, "failed": { "type": "boolean", "enum": [false, true] }, "answer": { "type": "boolean", "enum": [false, true] } }, "required": ["index", "kind", "text", "ended"], "additionalProperties": true } } }, "required": ["turn", "step", "renderer", "running", "activity"], "additionalProperties": true }] }
22560
22560
  },
22561
- sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1442, "column": 3 }
22561
+ sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1435, "column": 3 }
22562
22562
  },
22563
22563
  "zerowallClaudeCode/rollback": {
22564
22564
  service: "zerowallClaudeCode",
@@ -22794,7 +22794,7 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
22794
22794
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_stop_result$schema,
22795
22795
  jsonSchemaError: "typert tool schema: unsupported void value"
22796
22796
  },
22797
- sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1456, "column": 9 }
22797
+ sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1449, "column": 9 }
22798
22798
  },
22799
22799
  "zerowallClaudeCode/uninstall": {
22800
22800
  service: "zerowallClaudeCode",
package/lib/index.js CHANGED
@@ -83,7 +83,7 @@ function readClaudeTranscript(event) {
83
83
  }
84
84
 
85
85
  // src/host/index.ts
86
- import { createToolResultMessage as createToolResultMessage3, isAgentLoopRequest, ToolCallId as ToolCallId3 } from "@deepseek-ai/dsh-llm";
86
+ import { createToolResultMessage as createToolResultMessage3, HarnessError as HarnessError2, isAgentLoopRequest, ToolCallId as ToolCallId3 } from "@deepseek-ai/dsh-llm";
87
87
  import { NO_START_CAPABILITIES, assertUsableCwd, settleRunResult, subprocessRunHandle } from "@deepseek-ai/dsh-subagent";
88
88
  import { credentialRef } from "@deepseek-ai/dsh-credentials";
89
89
  import { Remote, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
@@ -880,50 +880,65 @@ async function projectSkillsForClaude(registry, cwd, scope) {
880
880
  }
881
881
 
882
882
  // src/host/route.ts
883
+ import { HarnessError } from "@deepseek-ai/dsh-llm";
884
+ var routeErrors = {
885
+ NO_SELECTION: "\u5F53\u524D\u4F1A\u8BDD\u6CA1\u6709\u9009\u62E9\u6A21\u578B\u3002",
886
+ NO_ROUTE: "\u5F53\u524D\u6A21\u578B\u8DEF\u7531\u6CA1\u6709\u53EF\u8BFB\u53D6\u7684\u534F\u8BAE\u914D\u7F6E\u3002",
887
+ NO_MANAGED_ROUTE: "\u5F53\u524D AI \u4E91\u6A21\u578B\u8DEF\u7531\u4E0D\u53EF\u7528\uFF0C\u8BF7\u5237\u65B0\u6A21\u578B\u5217\u8868\u540E\u91CD\u8BD5\u3002",
888
+ NO_ENDPOINT: "\u5F53\u524D\u8DEF\u7531\u6CA1\u6709\u53EF\u7528\u7684 API endpoint\u3002",
889
+ INVALID_ENDPOINT: "\u5F53\u524D\u8DEF\u7531\u7684 API endpoint \u4E0D\u53D7\u652F\u6301\u3002",
890
+ MISSING_CREDENTIAL: "\u5F53\u524D\u6A21\u578B\u8DEF\u7531\u6CA1\u6709\u53EF\u7528\u51ED\u636E\uFF0C\u8BF7\u5728\u5E73\u53F0\u5BF9\u8BDD\u8BBE\u7F6E\u4E2D\u914D\u7F6E\u3002",
891
+ UNSUPPORTED_EFFORT: "\u5F53\u524D\u9009\u62E9\u7684\u63A8\u7406\u5F3A\u5EA6\u4E0D\u53D7\u6B64 Claude Code \u7248\u672C\u652F\u6301\uFF0C\u8BF7\u5728\u5F53\u524D\u5BF9\u8BDD\u8C03\u6574\u3002",
892
+ UNSUPPORTED_PROTOCOL: "\u8BF7\u4E3A Claude Code \u9009\u62E9\u652F\u6301 Anthropic Messages \u7684\u624B\u52A8\u6A21\u578B\u8DEF\u7531\uFF0C\u6216\u9009\u62E9 AI \u4E91\u6A21\u578B\u3002"
893
+ };
894
+ var ClaudeRouteError = class extends HarnessError {
895
+ constructor(reason) {
896
+ super(routeErrors[reason], `CLAUDE_ROUTE_${reason}`);
897
+ this.reason = reason;
898
+ }
899
+ reason;
900
+ };
883
901
  function selectedClaudeModel(projection, fallback, loggedHeader) {
884
902
  const selected = projection?.pending ?? (loggedHeader === void 0 ? fallback() : {
885
903
  provider: loggedHeader.config.provider,
886
904
  model: loggedHeader.config.model,
887
905
  ...loggedHeader.config.reasoningEffort === void 0 || loggedHeader.adapterDefaults?.reasoningEffort === true ? {} : { reasoningEffort: loggedHeader.config.reasoningEffort }
888
906
  });
889
- if (!selected?.provider || !selected.model) throw new Error("\u5F53\u524D\u4F1A\u8BDD\u6CA1\u6709\u9009\u62E9\u6A21\u578B\u3002");
907
+ if (!selected?.provider || !selected.model) throw new ClaudeRouteError("NO_SELECTION");
890
908
  return { provider: selected.provider, model: selected.model, ...selected.reasoningEffort === void 0 ? {} : { reasoningEffort: selected.reasoningEffort } };
891
909
  }
892
910
  function endpoint(raw) {
893
- if (typeof raw !== "string" || !raw.trim() || raw.includes("\0")) throw new Error("\u5F53\u524D\u8DEF\u7531\u6CA1\u6709\u53EF\u7528\u7684 API endpoint\u3002");
894
- try {
895
- const url = new URL(raw);
896
- if (!["https:", "http:"].includes(url.protocol) || url.username || url.password || url.search || url.hash) throw new Error();
897
- return raw.replace(/\/+$/u, "");
898
- } catch {
899
- throw new Error("\u5F53\u524D\u8DEF\u7531\u7684 API endpoint \u4E0D\u53D7\u652F\u6301\u3002");
911
+ if (typeof raw !== "string" || !raw.trim() || raw.includes("\0")) throw new ClaudeRouteError("NO_ENDPOINT");
912
+ const url = URL.parse(raw);
913
+ if (!url || !["https:", "http:"].includes(url.protocol) || url.username || url.password || /[?#]/u.test(url.href)) {
914
+ throw new ClaudeRouteError("INVALID_ENDPOINT");
900
915
  }
916
+ return url;
901
917
  }
902
918
  async function resolveClaudeRoute(selection, services) {
903
919
  if (selection.reasoningEffort !== void 0 && !["low", "medium", "high", "xhigh", "max"].includes(selection.reasoningEffort)) {
904
- throw new Error("\u5F53\u524D\u9009\u62E9\u7684\u63A8\u7406\u5F3A\u5EA6\u4E0D\u53D7\u6B64 Claude Code \u7248\u672C\u652F\u6301\uFF0C\u8BF7\u5728\u5F53\u524D\u5BF9\u8BDD\u8C03\u6574\u3002");
920
+ throw new ClaudeRouteError("UNSUPPORTED_EFFORT");
905
921
  }
906
- let api, baseUrl, apiKey;
922
+ let baseUrl, apiKey;
907
923
  if (selection.provider.startsWith("zerowall-ai-cloud-")) {
908
924
  const route2 = await services.managedRoute?.(selection.provider, selection.model);
909
- api = route2?.api;
910
- baseUrl = route2?.baseUrl;
911
- apiKey = await services.managedCredential?.(selection.provider, selection.model) ?? route2?.apiKey;
925
+ if (!route2) throw new ClaudeRouteError("NO_MANAGED_ROUTE");
926
+ const gateway = endpoint(route2.baseUrl);
927
+ baseUrl = gateway.origin + gateway.pathname.replace(/\/+$/u, "").replace(/\/v1(?:beta)?$/u, "");
928
+ apiKey = await services.managedCredential?.(selection.provider, selection.model) ?? route2.apiKey;
912
929
  } else {
913
930
  const entry = services.directory().find((row2) => row2.provider === selection.provider);
914
- if (!entry) throw new Error("\u5F53\u524D\u6A21\u578B\u8DEF\u7531\u6CA1\u6709\u53EF\u8BFB\u53D6\u7684\u534F\u8BAE\u914D\u7F6E\u3002");
931
+ if (!entry) throw new ClaudeRouteError("NO_ROUTE");
915
932
  let profile = services.settings().find((row2) => row2.ns === entry.settingsNs)?.value;
916
933
  for (const segment of entry.settingsPath) profile = typeof profile === "object" && profile !== null ? Reflect.get(profile, segment) : void 0;
917
- if (typeof profile !== "object" || profile === null) throw new Error("\u5F53\u524D\u6A21\u578B\u8DEF\u7531\u6CA1\u6709\u53EF\u8BFB\u53D6\u7684\u534F\u8BAE\u914D\u7F6E\u3002");
918
- api = Reflect.get(profile, "api");
919
- baseUrl = Reflect.get(profile, "baseURL") ?? entry.defaultBaseURL;
934
+ if (typeof profile !== "object" || profile === null) throw new ClaudeRouteError("NO_ROUTE");
935
+ if (Reflect.get(profile, "api") !== "anthropic-messages") throw new ClaudeRouteError("UNSUPPORTED_PROTOCOL");
936
+ baseUrl = endpoint(Reflect.get(profile, "baseURL") ?? entry.defaultBaseURL).href.replace(/\/+$/u, "");
920
937
  const ref = Reflect.get(profile, "apiKeyEnv");
921
938
  if (typeof ref === "string" && /^[A-Za-z_][A-Za-z0-9_]*$/u.test(ref)) apiKey = await services.credential(ref);
922
939
  }
923
- if (api !== "anthropic-messages") throw new Error("Claude Code \u4EC5\u652F\u6301\u660E\u786E\u58F0\u660E\u4E3A Anthropic Messages \u7684\u6A21\u578B\u8DEF\u7531\uFF0C\u8BF7\u5728\u5F53\u524D\u5BF9\u8BDD\u5207\u6362\u6A21\u578B\u3002");
924
- const base = endpoint(baseUrl);
925
- if (typeof apiKey !== "string" || !apiKey.trim() || apiKey.includes("\0")) throw new Error("\u5F53\u524D\u6A21\u578B\u8DEF\u7531\u6CA1\u6709\u53EF\u7528\u51ED\u636E\uFF0C\u8BF7\u5728\u5E73\u53F0\u5BF9\u8BDD\u8BBE\u7F6E\u4E2D\u914D\u7F6E\u3002");
926
- return { ...selection, baseUrl: base, apiKey: apiKey.trim() };
940
+ if (typeof apiKey !== "string" || !apiKey.trim() || apiKey.includes("\0")) throw new ClaudeRouteError("MISSING_CREDENTIAL");
941
+ return { ...selection, baseUrl, apiKey: apiKey.trim() };
927
942
  }
928
943
  var ClaudeSafeOutput = class _ClaudeSafeOutput {
929
944
  constructor(secrets) {
@@ -2479,8 +2494,8 @@ var ClaudeCodeService = class extends (_a = TypertRemoteService, _status_dec = [
2479
2494
  turn = await this.launch(agent, text, selected, { cwd: request.cwd, signal: request.signal, scope: request.parent, request: input });
2480
2495
  } catch (error) {
2481
2496
  this.sessions.delete(id);
2482
- if (error instanceof Error && error.message === "Claude Code \u4EC5\u652F\u6301\u660E\u786E\u58F0\u660E\u4E3A Anthropic Messages \u7684\u6A21\u578B\u8DEF\u7531\uFF0C\u8BF7\u5728\u5F53\u524D\u5BF9\u8BDD\u5207\u6362\u6A21\u578B\u3002") {
2483
- throw new Error("Claude \u5B50 agent \u9700\u8981 Anthropic Messages \u8DEF\u7531\u3002\u8BF7\u5728\u5B50 agent \u6A21\u578B\u9009\u62E9\u8BBE\u7F6E\u4E2D\u542F\u7528\u5E76\u6388\u6743\u5DF2\u914D\u7F6E\u7684 Anthropic \u8DEF\u7531\uFF0C\u7136\u540E\u901A\u8FC7 claude_list_subagent_models \u67E5\u8BE2\u5E76\u4E3A claude_subagent \u6307\u5B9A provider \u548C model\uFF1B\u65E0\u9700\u66F4\u6539\u7236\u4F1A\u8BDD\u6A21\u578B\u3002");
2497
+ if (error instanceof ClaudeRouteError && error.reason === "UNSUPPORTED_PROTOCOL") {
2498
+ throw new HarnessError2("\u8BF7\u5728\u5B50 agent \u6A21\u578B\u9009\u62E9\u8BBE\u7F6E\u4E2D\u542F\u7528\u5E76\u6388\u6743 AI \u4E91\u6A21\u578B\u6216\u652F\u6301 Anthropic Messages \u7684\u624B\u52A8\u8DEF\u7531\u3002\u901A\u8FC7 claude_list_subagent_models \u67E5\u8BE2\u53EF\u7528\u6A21\u578B\uFF0C\u518D\u4E3A claude_subagent \u6307\u5B9A provider \u548C model\u3002", error.code, { cause: error });
2484
2499
  }
2485
2500
  throw error;
2486
2501
  }
@@ -2996,17 +3011,11 @@ var ClaudeCodeService = class extends (_a = TypertRemoteService, _status_dec = [
2996
3011
  }
2997
3012
  }
2998
3013
  if (cancel.signal.aborted) throw new Error("Claude Code \u4EFB\u52A1\u5DF2\u505C\u6B62\u3002");
3014
+ if (error instanceof ClaudeRouteError) throw error;
2999
3015
  const message = error instanceof Error ? error.message : "";
3000
3016
  if ([
3001
3017
  "\u8BF7\u5148\u5B89\u88C5 Claude Code\u3002",
3002
3018
  "\u5F53\u524D\u4F1A\u8BDD\u6CA1\u6709\u6709\u6548\u7684\u9879\u76EE\u76EE\u5F55\u3002",
3003
- "\u5F53\u524D\u4F1A\u8BDD\u6CA1\u6709\u9009\u62E9\u6A21\u578B\u3002",
3004
- "\u5F53\u524D\u6A21\u578B\u8DEF\u7531\u6CA1\u6709\u53EF\u8BFB\u53D6\u7684\u534F\u8BAE\u914D\u7F6E\u3002",
3005
- "\u5F53\u524D\u8DEF\u7531\u6CA1\u6709\u53EF\u7528\u7684 API endpoint\u3002",
3006
- "\u5F53\u524D\u8DEF\u7531\u7684 API endpoint \u4E0D\u53D7\u652F\u6301\u3002",
3007
- "\u5F53\u524D\u6A21\u578B\u8DEF\u7531\u6CA1\u6709\u53EF\u7528\u51ED\u636E\uFF0C\u8BF7\u5728\u5E73\u53F0\u5BF9\u8BDD\u8BBE\u7F6E\u4E2D\u914D\u7F6E\u3002",
3008
- "\u5F53\u524D\u9009\u62E9\u7684\u63A8\u7406\u5F3A\u5EA6\u4E0D\u53D7\u6B64 Claude Code \u7248\u672C\u652F\u6301\uFF0C\u8BF7\u5728\u5F53\u524D\u5BF9\u8BDD\u8C03\u6574\u3002",
3009
- "Claude Code \u4EC5\u652F\u6301\u660E\u786E\u58F0\u660E\u4E3A Anthropic Messages \u7684\u6A21\u578B\u8DEF\u7531\uFF0C\u8BF7\u5728\u5F53\u524D\u5BF9\u8BDD\u5207\u6362\u6A21\u578B\u3002",
3010
3019
  "Claude Code \u5B89\u88C5\u4E0E\u8FD0\u884C\u4EC5\u9002\u7528\u4E8E ZeroWall Desktop\u3002"
3011
3020
  ].includes(message)) throw new Error(message);
3012
3021
  if (message === "Claude Code \u5DF2\u8FBE\u5230\u6700\u5927\u5E76\u53D1\u8FDB\u7A0B\u6570\uFF0C\u8BF7\u7B49\u5F85\u5176\u4ED6\u4EFB\u52A1\u5B8C\u6210\u3002") throw new Error(message);
@@ -3303,16 +3312,9 @@ var ClaudeCodeService = class extends (_a = TypertRemoteService, _status_dec = [
3303
3312
  } else {
3304
3313
  if (turn?.diagnostics && error instanceof Error) turn.diagnostics.append(error.message);
3305
3314
  turn?.diagnostics?.finish();
3306
- const message = turn?.diagnostics ? `Claude Code \u6267\u884C\u5931\u8D25\uFF08\u8BCA\u65AD ${turn.view.id}\uFF09\u3002${turn.diagnostics.snapshot()}` : error instanceof Error && [
3315
+ const message = turn?.diagnostics ? `Claude Code \u6267\u884C\u5931\u8D25\uFF08\u8BCA\u65AD ${turn.view.id}\uFF09\u3002${turn.diagnostics.snapshot()}` : error instanceof ClaudeRouteError ? error.message : error instanceof Error && [
3307
3316
  "\u8BF7\u5148\u5B89\u88C5 Claude Code\u3002",
3308
3317
  "\u5F53\u524D\u4F1A\u8BDD\u6CA1\u6709\u6709\u6548\u7684\u9879\u76EE\u76EE\u5F55\u3002",
3309
- "\u5F53\u524D\u4F1A\u8BDD\u6CA1\u6709\u9009\u62E9\u6A21\u578B\u3002",
3310
- "\u5F53\u524D\u6A21\u578B\u8DEF\u7531\u6CA1\u6709\u53EF\u8BFB\u53D6\u7684\u534F\u8BAE\u914D\u7F6E\u3002",
3311
- "\u5F53\u524D\u8DEF\u7531\u6CA1\u6709\u53EF\u7528\u7684 API endpoint\u3002",
3312
- "\u5F53\u524D\u8DEF\u7531\u7684 API endpoint \u4E0D\u53D7\u652F\u6301\u3002",
3313
- "\u5F53\u524D\u6A21\u578B\u8DEF\u7531\u6CA1\u6709\u53EF\u7528\u51ED\u636E\uFF0C\u8BF7\u5728\u5E73\u53F0\u5BF9\u8BDD\u8BBE\u7F6E\u4E2D\u914D\u7F6E\u3002",
3314
- "\u5F53\u524D\u9009\u62E9\u7684\u63A8\u7406\u5F3A\u5EA6\u4E0D\u53D7\u6B64 Claude Code \u7248\u672C\u652F\u6301\uFF0C\u8BF7\u5728\u5F53\u524D\u5BF9\u8BDD\u8C03\u6574\u3002",
3315
- "Claude Code \u4EC5\u652F\u6301\u660E\u786E\u58F0\u660E\u4E3A Anthropic Messages \u7684\u6A21\u578B\u8DEF\u7531\uFF0C\u8BF7\u5728\u5F53\u524D\u5BF9\u8BDD\u5207\u6362\u6A21\u578B\u3002",
3316
3318
  "Claude Code \u5B89\u88C5\u4E0E\u8FD0\u884C\u4EC5\u9002\u7528\u4E8E ZeroWall Desktop\u3002",
3317
3319
  "Claude Code \u65E0\u6CD5\u51C6\u5907\u5F53\u524D\u4F1A\u8BDD\uFF0C\u8BF7\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u4E0E\u8D44\u6E90\u72B6\u6001\u3002",
3318
3320
  "Claude Code \u5DF2\u8FBE\u5230\u6700\u5927\u5E76\u53D1\u8FDB\u7A0B\u6570\uFF0C\u8BF7\u7B49\u5F85\u5176\u4ED6\u4EFB\u52A1\u5B8C\u6210\u3002",
@@ -672,7 +672,7 @@ const $remote = createTypertRemoteInfo({
672
672
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_clear_result$schema,
673
673
  jsonSchemaError: 'typert tool schema: unsupported void value',
674
674
  },
675
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1464,"column":3},
675
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1457,"column":3},
676
676
  },
677
677
  'zerowallClaudeCode/cliSetModel': {
678
678
  service: 'zerowallClaudeCode',
@@ -723,7 +723,7 @@ const $remote = createTypertRemoteInfo({
723
723
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_cliSetModel_result$schema,
724
724
  jsonSchema: {"type":"object","properties":{"active":{"type":"boolean"},"queued":{"type":"boolean"},"sessionId":{"type":"string"},"model":{"type":"string"},"commands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"argumentHint":{"type":"string"}},"required":["name"],"additionalProperties":true}},"output":{"type":"string"},"contextUsage":{"type":"object","properties":{"totalTokens":{"type":"number"},"maxTokens":{"type":"number"},"rawMaxTokens":{"type":"number"},"percentage":{"type":"number"},"autoCompactThreshold":{"type":"number"},"isAutoCompactEnabled":{"type":"boolean","enum":[false,true],"description":"Present only when the managed Claude runtime reports its real state."},"detail":{"type":"string","enum":["summary","full"]},"apiUsage":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cache_creation_input_tokens":{"type":"number"},"cache_read_input_tokens":{"type":"number"}},"required":[],"additionalProperties":true}},"required":["totalTokens","maxTokens","percentage","detail"],"additionalProperties":true},"lastCompact":{"type":"object","properties":{"trigger":{"type":"string","enum":["auto","manual"]},"preTokens":{"type":"number"},"postTokens":{"type":"number"},"durationMs":{"type":"number"}},"required":["trigger","preTokens"],"additionalProperties":true},"error":{"type":"string"},"diagnostics":{"type":"object","properties":{"model":{"type":"string"},"routeCredential":{"type":"string","enum":["missing","injected"]},"routeBaseUrl":{"type":"string","enum":["missing","injected"]},"claudeOAuth":{"type":"string","enum":["not-used","required"]},"skills":{"type":"object","properties":{"synced":{"type":"number"},"skipped":{"type":"number"}},"required":["synced","skipped"],"additionalProperties":true},"mcp":{"type":"object","properties":{"synced":{"type":"number"},"skipped":{"type":"number"}},"required":["synced","skipped"],"additionalProperties":true},"environmentNames":{"type":"array","items":{"type":"string"}},"skipped":{"type":"array","items":{"type":"string"}}},"required":["routeCredential","routeBaseUrl","claudeOAuth","skills","mcp","environmentNames","skipped"],"additionalProperties":true}},"required":["active","queued","commands","output"],"additionalProperties":true},
725
725
  },
726
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1420,"column":9},
726
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1413,"column":9},
727
727
  },
728
728
  'zerowallClaudeCode/cliSetPermissionMode': {
729
729
  service: 'zerowallClaudeCode',
@@ -774,7 +774,7 @@ const $remote = createTypertRemoteInfo({
774
774
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_cliSetPermissionMode_result$schema,
775
775
  jsonSchema: {"type":"object","properties":{"active":{"type":"boolean"},"queued":{"type":"boolean"},"sessionId":{"type":"string"},"model":{"type":"string"},"commands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"argumentHint":{"type":"string"}},"required":["name"],"additionalProperties":true}},"output":{"type":"string"},"contextUsage":{"type":"object","properties":{"totalTokens":{"type":"number"},"maxTokens":{"type":"number"},"rawMaxTokens":{"type":"number"},"percentage":{"type":"number"},"autoCompactThreshold":{"type":"number"},"isAutoCompactEnabled":{"type":"boolean","enum":[false,true],"description":"Present only when the managed Claude runtime reports its real state."},"detail":{"type":"string","enum":["summary","full"]},"apiUsage":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cache_creation_input_tokens":{"type":"number"},"cache_read_input_tokens":{"type":"number"}},"required":[],"additionalProperties":true}},"required":["totalTokens","maxTokens","percentage","detail"],"additionalProperties":true},"lastCompact":{"type":"object","properties":{"trigger":{"type":"string","enum":["auto","manual"]},"preTokens":{"type":"number"},"postTokens":{"type":"number"},"durationMs":{"type":"number"}},"required":["trigger","preTokens"],"additionalProperties":true},"error":{"type":"string"},"diagnostics":{"type":"object","properties":{"model":{"type":"string"},"routeCredential":{"type":"string","enum":["missing","injected"]},"routeBaseUrl":{"type":"string","enum":["missing","injected"]},"claudeOAuth":{"type":"string","enum":["not-used","required"]},"skills":{"type":"object","properties":{"synced":{"type":"number"},"skipped":{"type":"number"}},"required":["synced","skipped"],"additionalProperties":true},"mcp":{"type":"object","properties":{"synced":{"type":"number"},"skipped":{"type":"number"}},"required":["synced","skipped"],"additionalProperties":true},"environmentNames":{"type":"array","items":{"type":"string"}},"skipped":{"type":"array","items":{"type":"string"}}},"required":["routeCredential","routeBaseUrl","claudeOAuth","skills","mcp","environmentNames","skipped"],"additionalProperties":true}},"required":["active","queued","commands","output"],"additionalProperties":true},
776
776
  },
777
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1429,"column":9},
777
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1422,"column":9},
778
778
  },
779
779
  'zerowallClaudeCode/contextUsage': {
780
780
  service: 'zerowallClaudeCode',
@@ -826,7 +826,7 @@ const $remote = createTypertRemoteInfo({
826
826
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_contextUsage_result$schema,
827
827
  jsonSchema: {"type":"object","properties":{"active":{"type":"boolean"},"queued":{"type":"boolean"},"sessionId":{"type":"string"},"model":{"type":"string"},"commands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"argumentHint":{"type":"string"}},"required":["name"],"additionalProperties":true}},"output":{"type":"string"},"contextUsage":{"type":"object","properties":{"totalTokens":{"type":"number"},"maxTokens":{"type":"number"},"rawMaxTokens":{"type":"number"},"percentage":{"type":"number"},"autoCompactThreshold":{"type":"number"},"isAutoCompactEnabled":{"type":"boolean","enum":[false,true],"description":"Present only when the managed Claude runtime reports its real state."},"detail":{"type":"string","enum":["summary","full"]},"apiUsage":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cache_creation_input_tokens":{"type":"number"},"cache_read_input_tokens":{"type":"number"}},"required":[],"additionalProperties":true}},"required":["totalTokens","maxTokens","percentage","detail"],"additionalProperties":true},"lastCompact":{"type":"object","properties":{"trigger":{"type":"string","enum":["auto","manual"]},"preTokens":{"type":"number"},"postTokens":{"type":"number"},"durationMs":{"type":"number"}},"required":["trigger","preTokens"],"additionalProperties":true},"error":{"type":"string"},"diagnostics":{"type":"object","properties":{"model":{"type":"string"},"routeCredential":{"type":"string","enum":["missing","injected"]},"routeBaseUrl":{"type":"string","enum":["missing","injected"]},"claudeOAuth":{"type":"string","enum":["not-used","required"]},"skills":{"type":"object","properties":{"synced":{"type":"number"},"skipped":{"type":"number"}},"required":["synced","skipped"],"additionalProperties":true},"mcp":{"type":"object","properties":{"synced":{"type":"number"},"skipped":{"type":"number"}},"required":["synced","skipped"],"additionalProperties":true},"environmentNames":{"type":"array","items":{"type":"string"}},"skipped":{"type":"array","items":{"type":"string"}}},"required":["routeCredential","routeBaseUrl","claudeOAuth","skills","mcp","environmentNames","skipped"],"additionalProperties":true}},"required":["active","queued","commands","output"],"additionalProperties":true},
828
828
  },
829
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1403,"column":9},
829
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1396,"column":9},
830
830
  },
831
831
  'zerowallClaudeCode/installCli': {
832
832
  service: 'zerowallClaudeCode',
@@ -983,7 +983,7 @@ const $remote = createTypertRemoteInfo({
983
983
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_read_result$schema,
984
984
  jsonSchema: {"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"model":{"type":"string"},"executablePath":{"type":"string","description":"Absolute CLI entrypoint captured for this turn, before spawning it."},"running":{"type":"boolean"},"output":{"type":"string"},"exitCode":{"oneOf":[{"type":"null","const":null},{"type":"number"}]},"message":{"type":"string"},"skills":{"type":"number"},"mcp":{"type":"number"},"skipped":{"type":"array","items":{"type":"string"}},"renderer":{"type":"string","enum":["plugin","native"]},"turn":{"type":"number"},"step":{"type":"number"},"activity":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"kind":{"type":"string","enum":["text","reasoning","tool-call"]},"text":{"type":"string"},"ended":{"type":"boolean"},"id":{"type":"string"},"name":{"type":"string"},"result":{"type":"string"},"failed":{"type":"boolean","enum":[false,true]},"answer":{"type":"boolean","enum":[false,true]}},"required":["index","kind","text","ended"],"additionalProperties":true}},"nativeSessionId":{"type":"string"},"resumed":{"type":"boolean","enum":[false,true]},"permission":{"type":"object","properties":{"active":{"type":"boolean"},"source":{"type":"string","enum":["plugin","native"]},"mode":{"type":"string","enum":["default","dontAsk","acceptEdits","auto","plan","bypassPermissions"]},"hostPreset":{"type":"string"},"hostSandbox":{"type":"string"},"hostApproval":{"type":"string"},"runningMode":{"type":"string","enum":["default","dontAsk","acceptEdits","auto","plan","bypassPermissions"]},"nativeOptions":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["value","name"],"additionalProperties":true}}},"required":["active","source","mode","hostPreset","hostSandbox","hostApproval","nativeOptions"],"additionalProperties":true},"resources":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["skill","mcp"]},"name":{"type":"string"},"state":{"type":"string","enum":["failed","manual","synced","on-demand","disabled","unavailable"]},"detail":{"type":"string"}},"required":["kind","name","state"],"additionalProperties":true}},"diagnostic":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"}},"required":["id","category"],"additionalProperties":true},"contextUsage":{"type":"object","properties":{"totalTokens":{"type":"number"},"maxTokens":{"type":"number"},"rawMaxTokens":{"type":"number"},"percentage":{"type":"number"},"autoCompactThreshold":{"type":"number"},"isAutoCompactEnabled":{"type":"boolean","enum":[false,true],"description":"Present only when the managed Claude runtime reports its real state."},"detail":{"type":"string","enum":["summary","full"]},"apiUsage":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cache_creation_input_tokens":{"type":"number"},"cache_read_input_tokens":{"type":"number"}},"required":[],"additionalProperties":true}},"required":["totalTokens","maxTokens","percentage","detail"],"additionalProperties":true},"lastCompact":{"type":"object","properties":{"trigger":{"type":"string","enum":["auto","manual"]},"preTokens":{"type":"number"},"postTokens":{"type":"number"},"durationMs":{"type":"number"}},"required":["trigger","preTokens"],"additionalProperties":true}},"required":["id","provider","model","running","output","skills","mcp","skipped"],"additionalProperties":true}]},
985
985
  },
986
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1437,"column":3},
986
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1430,"column":3},
987
987
  },
988
988
  'zerowallClaudeCode/readTranscript': {
989
989
  service: 'zerowallClaudeCode',
@@ -1050,7 +1050,7 @@ const $remote = createTypertRemoteInfo({
1050
1050
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_readTranscript_result$schema,
1051
1051
  jsonSchema: {"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"turn":{"type":"number"},"step":{"type":"number"},"renderer":{"type":"string","enum":["plugin","native"]},"running":{"type":"boolean"},"activity":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"kind":{"type":"string","enum":["text","reasoning","tool-call"]},"text":{"type":"string"},"ended":{"type":"boolean"},"id":{"type":"string"},"name":{"type":"string"},"result":{"type":"string"},"failed":{"type":"boolean","enum":[false,true]},"answer":{"type":"boolean","enum":[false,true]}},"required":["index","kind","text","ended"],"additionalProperties":true}}},"required":["turn","step","renderer","running","activity"],"additionalProperties":true}]},
1052
1052
  },
1053
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1442,"column":3},
1053
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1435,"column":3},
1054
1054
  },
1055
1055
  'zerowallClaudeCode/rollback': {
1056
1056
  service: 'zerowallClaudeCode',
@@ -1292,7 +1292,7 @@ const $remote = createTypertRemoteInfo({
1292
1292
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_stop_result$schema,
1293
1293
  jsonSchemaError: 'typert tool schema: unsupported void value',
1294
1294
  },
1295
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1456,"column":9},
1295
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1449,"column":9},
1296
1296
  },
1297
1297
  'zerowallClaudeCode/uninstall': {
1298
1298
  service: 'zerowallClaudeCode',
@@ -1 +1 @@
1
- {"version":3,"file":"typert.remote-client.d.ts","names":["clear","cliSetModel","cliSetPermissionMode","contextUsage","installCli","permissionSet","permissionView","read","readTranscript","rollback","settingsGet","settingsGlobalGet","settingsGlobalUpdate","settingsInstall","settingsRollback","settingsStatus","settingsUninstall","settingsUpdate","status","stop","uninstall"],"sources":["../src/host/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;IAu7CEA,K;IA5CMC,W;IASAC,oB;IA1BAC,Y;IA3zBAC,U;IAkHAC,a;IAtBAC,c;IAiwBNC,I;IAKAC,c;IAh2BMC,Q;IA/QAC,W;IA0DAC,iB;IA+BAC,oB;IA2LAC,e;IAEAC,gB;IAzRAC,c;IA2RAC,iB;IA3QAC,c;IAtBAC,M;IAsoCAC,I;IA52BAC,S;;;IAo3BNpB,0B;IA5CMC,gC;IASAC,yC;IA1BAC,iC;IA3zBAC,+B;IAkHAC,kC;IAtBAC,mC;IAiwBNC,yB;IAKAC,mC;IAh2BMC,6B;IA/QAC,gC;IA0DAC,sC;IA+BAC,yC;IA2LAC,oC;IAEAC,qC;IAzRAC,mC;IA2RAC,sC;IA3QAC,mC;IAtBAC,2B;IAsoCAC,yB;IA52BAC,8B;;;;;;IAo3BNpB,gC;IA5CMC,sC;IASAC,+C;IA1BAC,uC;IA3zBAC,qC;IAkHAC,wC;IAtBAC,yC;IAiwBNC,+B;IAKAC,yC;IAh2BMC,mC;IAxRAS,iC;IAsoCAC,+B;IA52BAC,oC","ignoreList":[]}
1
+ {"version":3,"file":"typert.remote-client.d.ts","names":["clear","cliSetModel","cliSetPermissionMode","contextUsage","installCli","permissionSet","permissionView","read","readTranscript","rollback","settingsGet","settingsGlobalGet","settingsGlobalUpdate","settingsInstall","settingsRollback","settingsStatus","settingsUninstall","settingsUpdate","status","stop","uninstall"],"sources":["../src/host/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;IAg7CEA,K;IA5CMC,W;IASAC,oB;IA1BAC,Y;IApzBAC,U;IAkHAC,a;IAtBAC,c;IA0vBNC,I;IAKAC,c;IAz1BMC,Q;IA/QAC,W;IA0DAC,iB;IA+BAC,oB;IA2LAC,e;IAEAC,gB;IAzRAC,c;IA2RAC,iB;IA3QAC,c;IAtBAC,M;IA+nCAC,I;IAr2BAC,S;;;IA62BNpB,0B;IA5CMC,gC;IASAC,yC;IA1BAC,iC;IApzBAC,+B;IAkHAC,kC;IAtBAC,mC;IA0vBNC,yB;IAKAC,mC;IAz1BMC,6B;IA/QAC,gC;IA0DAC,sC;IA+BAC,yC;IA2LAC,oC;IAEAC,qC;IAzRAC,mC;IA2RAC,sC;IA3QAC,mC;IAtBAC,2B;IA+nCAC,yB;IAr2BAC,8B;;;;;;IA62BNpB,gC;IA5CMC,sC;IASAC,+C;IA1BAC,uC;IApzBAC,qC;IAkHAC,wC;IAtBAC,yC;IA0vBNC,+B;IAKAC,yC;IAz1BMC,mC;IAxRAS,iC;IA+nCAC,+B;IAr2BAC,oC","ignoreList":[]}
@@ -672,7 +672,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
672
672
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_clear_result$schema,
673
673
  jsonSchemaError: 'typert tool schema: unsupported void value',
674
674
  },
675
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1464,"column":3},
675
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1457,"column":3},
676
676
  },
677
677
  'zerowallClaudeCode/cliSetModel': {
678
678
  service: 'zerowallClaudeCode',
@@ -723,7 +723,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
723
723
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_cliSetModel_result$schema,
724
724
  jsonSchema: {"type":"object","properties":{"active":{"type":"boolean"},"queued":{"type":"boolean"},"sessionId":{"type":"string"},"model":{"type":"string"},"commands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"argumentHint":{"type":"string"}},"required":["name"],"additionalProperties":true}},"output":{"type":"string"},"contextUsage":{"type":"object","properties":{"totalTokens":{"type":"number"},"maxTokens":{"type":"number"},"rawMaxTokens":{"type":"number"},"percentage":{"type":"number"},"autoCompactThreshold":{"type":"number"},"isAutoCompactEnabled":{"type":"boolean","enum":[false,true],"description":"Present only when the managed Claude runtime reports its real state."},"detail":{"type":"string","enum":["summary","full"]},"apiUsage":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cache_creation_input_tokens":{"type":"number"},"cache_read_input_tokens":{"type":"number"}},"required":[],"additionalProperties":true}},"required":["totalTokens","maxTokens","percentage","detail"],"additionalProperties":true},"lastCompact":{"type":"object","properties":{"trigger":{"type":"string","enum":["auto","manual"]},"preTokens":{"type":"number"},"postTokens":{"type":"number"},"durationMs":{"type":"number"}},"required":["trigger","preTokens"],"additionalProperties":true},"error":{"type":"string"},"diagnostics":{"type":"object","properties":{"model":{"type":"string"},"routeCredential":{"type":"string","enum":["missing","injected"]},"routeBaseUrl":{"type":"string","enum":["missing","injected"]},"claudeOAuth":{"type":"string","enum":["not-used","required"]},"skills":{"type":"object","properties":{"synced":{"type":"number"},"skipped":{"type":"number"}},"required":["synced","skipped"],"additionalProperties":true},"mcp":{"type":"object","properties":{"synced":{"type":"number"},"skipped":{"type":"number"}},"required":["synced","skipped"],"additionalProperties":true},"environmentNames":{"type":"array","items":{"type":"string"}},"skipped":{"type":"array","items":{"type":"string"}}},"required":["routeCredential","routeBaseUrl","claudeOAuth","skills","mcp","environmentNames","skipped"],"additionalProperties":true}},"required":["active","queued","commands","output"],"additionalProperties":true},
725
725
  },
726
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1420,"column":9},
726
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1413,"column":9},
727
727
  },
728
728
  'zerowallClaudeCode/cliSetPermissionMode': {
729
729
  service: 'zerowallClaudeCode',
@@ -774,7 +774,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
774
774
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_cliSetPermissionMode_result$schema,
775
775
  jsonSchema: {"type":"object","properties":{"active":{"type":"boolean"},"queued":{"type":"boolean"},"sessionId":{"type":"string"},"model":{"type":"string"},"commands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"argumentHint":{"type":"string"}},"required":["name"],"additionalProperties":true}},"output":{"type":"string"},"contextUsage":{"type":"object","properties":{"totalTokens":{"type":"number"},"maxTokens":{"type":"number"},"rawMaxTokens":{"type":"number"},"percentage":{"type":"number"},"autoCompactThreshold":{"type":"number"},"isAutoCompactEnabled":{"type":"boolean","enum":[false,true],"description":"Present only when the managed Claude runtime reports its real state."},"detail":{"type":"string","enum":["summary","full"]},"apiUsage":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cache_creation_input_tokens":{"type":"number"},"cache_read_input_tokens":{"type":"number"}},"required":[],"additionalProperties":true}},"required":["totalTokens","maxTokens","percentage","detail"],"additionalProperties":true},"lastCompact":{"type":"object","properties":{"trigger":{"type":"string","enum":["auto","manual"]},"preTokens":{"type":"number"},"postTokens":{"type":"number"},"durationMs":{"type":"number"}},"required":["trigger","preTokens"],"additionalProperties":true},"error":{"type":"string"},"diagnostics":{"type":"object","properties":{"model":{"type":"string"},"routeCredential":{"type":"string","enum":["missing","injected"]},"routeBaseUrl":{"type":"string","enum":["missing","injected"]},"claudeOAuth":{"type":"string","enum":["not-used","required"]},"skills":{"type":"object","properties":{"synced":{"type":"number"},"skipped":{"type":"number"}},"required":["synced","skipped"],"additionalProperties":true},"mcp":{"type":"object","properties":{"synced":{"type":"number"},"skipped":{"type":"number"}},"required":["synced","skipped"],"additionalProperties":true},"environmentNames":{"type":"array","items":{"type":"string"}},"skipped":{"type":"array","items":{"type":"string"}}},"required":["routeCredential","routeBaseUrl","claudeOAuth","skills","mcp","environmentNames","skipped"],"additionalProperties":true}},"required":["active","queued","commands","output"],"additionalProperties":true},
776
776
  },
777
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1429,"column":9},
777
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1422,"column":9},
778
778
  },
779
779
  'zerowallClaudeCode/contextUsage': {
780
780
  service: 'zerowallClaudeCode',
@@ -826,7 +826,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
826
826
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_contextUsage_result$schema,
827
827
  jsonSchema: {"type":"object","properties":{"active":{"type":"boolean"},"queued":{"type":"boolean"},"sessionId":{"type":"string"},"model":{"type":"string"},"commands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"argumentHint":{"type":"string"}},"required":["name"],"additionalProperties":true}},"output":{"type":"string"},"contextUsage":{"type":"object","properties":{"totalTokens":{"type":"number"},"maxTokens":{"type":"number"},"rawMaxTokens":{"type":"number"},"percentage":{"type":"number"},"autoCompactThreshold":{"type":"number"},"isAutoCompactEnabled":{"type":"boolean","enum":[false,true],"description":"Present only when the managed Claude runtime reports its real state."},"detail":{"type":"string","enum":["summary","full"]},"apiUsage":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cache_creation_input_tokens":{"type":"number"},"cache_read_input_tokens":{"type":"number"}},"required":[],"additionalProperties":true}},"required":["totalTokens","maxTokens","percentage","detail"],"additionalProperties":true},"lastCompact":{"type":"object","properties":{"trigger":{"type":"string","enum":["auto","manual"]},"preTokens":{"type":"number"},"postTokens":{"type":"number"},"durationMs":{"type":"number"}},"required":["trigger","preTokens"],"additionalProperties":true},"error":{"type":"string"},"diagnostics":{"type":"object","properties":{"model":{"type":"string"},"routeCredential":{"type":"string","enum":["missing","injected"]},"routeBaseUrl":{"type":"string","enum":["missing","injected"]},"claudeOAuth":{"type":"string","enum":["not-used","required"]},"skills":{"type":"object","properties":{"synced":{"type":"number"},"skipped":{"type":"number"}},"required":["synced","skipped"],"additionalProperties":true},"mcp":{"type":"object","properties":{"synced":{"type":"number"},"skipped":{"type":"number"}},"required":["synced","skipped"],"additionalProperties":true},"environmentNames":{"type":"array","items":{"type":"string"}},"skipped":{"type":"array","items":{"type":"string"}}},"required":["routeCredential","routeBaseUrl","claudeOAuth","skills","mcp","environmentNames","skipped"],"additionalProperties":true}},"required":["active","queued","commands","output"],"additionalProperties":true},
828
828
  },
829
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1403,"column":9},
829
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1396,"column":9},
830
830
  },
831
831
  'zerowallClaudeCode/installCli': {
832
832
  service: 'zerowallClaudeCode',
@@ -983,7 +983,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
983
983
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_read_result$schema,
984
984
  jsonSchema: {"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"model":{"type":"string"},"executablePath":{"type":"string","description":"Absolute CLI entrypoint captured for this turn, before spawning it."},"running":{"type":"boolean"},"output":{"type":"string"},"exitCode":{"oneOf":[{"type":"null","const":null},{"type":"number"}]},"message":{"type":"string"},"skills":{"type":"number"},"mcp":{"type":"number"},"skipped":{"type":"array","items":{"type":"string"}},"renderer":{"type":"string","enum":["plugin","native"]},"turn":{"type":"number"},"step":{"type":"number"},"activity":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"kind":{"type":"string","enum":["text","reasoning","tool-call"]},"text":{"type":"string"},"ended":{"type":"boolean"},"id":{"type":"string"},"name":{"type":"string"},"result":{"type":"string"},"failed":{"type":"boolean","enum":[false,true]},"answer":{"type":"boolean","enum":[false,true]}},"required":["index","kind","text","ended"],"additionalProperties":true}},"nativeSessionId":{"type":"string"},"resumed":{"type":"boolean","enum":[false,true]},"permission":{"type":"object","properties":{"active":{"type":"boolean"},"source":{"type":"string","enum":["plugin","native"]},"mode":{"type":"string","enum":["default","dontAsk","acceptEdits","auto","plan","bypassPermissions"]},"hostPreset":{"type":"string"},"hostSandbox":{"type":"string"},"hostApproval":{"type":"string"},"runningMode":{"type":"string","enum":["default","dontAsk","acceptEdits","auto","plan","bypassPermissions"]},"nativeOptions":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["value","name"],"additionalProperties":true}}},"required":["active","source","mode","hostPreset","hostSandbox","hostApproval","nativeOptions"],"additionalProperties":true},"resources":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["skill","mcp"]},"name":{"type":"string"},"state":{"type":"string","enum":["failed","manual","synced","on-demand","disabled","unavailable"]},"detail":{"type":"string"}},"required":["kind","name","state"],"additionalProperties":true}},"diagnostic":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"}},"required":["id","category"],"additionalProperties":true},"contextUsage":{"type":"object","properties":{"totalTokens":{"type":"number"},"maxTokens":{"type":"number"},"rawMaxTokens":{"type":"number"},"percentage":{"type":"number"},"autoCompactThreshold":{"type":"number"},"isAutoCompactEnabled":{"type":"boolean","enum":[false,true],"description":"Present only when the managed Claude runtime reports its real state."},"detail":{"type":"string","enum":["summary","full"]},"apiUsage":{"type":"object","properties":{"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cache_creation_input_tokens":{"type":"number"},"cache_read_input_tokens":{"type":"number"}},"required":[],"additionalProperties":true}},"required":["totalTokens","maxTokens","percentage","detail"],"additionalProperties":true},"lastCompact":{"type":"object","properties":{"trigger":{"type":"string","enum":["auto","manual"]},"preTokens":{"type":"number"},"postTokens":{"type":"number"},"durationMs":{"type":"number"}},"required":["trigger","preTokens"],"additionalProperties":true}},"required":["id","provider","model","running","output","skills","mcp","skipped"],"additionalProperties":true}]},
985
985
  },
986
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1437,"column":3},
986
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1430,"column":3},
987
987
  },
988
988
  'zerowallClaudeCode/readTranscript': {
989
989
  service: 'zerowallClaudeCode',
@@ -1050,7 +1050,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
1050
1050
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_readTranscript_result$schema,
1051
1051
  jsonSchema: {"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"turn":{"type":"number"},"step":{"type":"number"},"renderer":{"type":"string","enum":["plugin","native"]},"running":{"type":"boolean"},"activity":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"kind":{"type":"string","enum":["text","reasoning","tool-call"]},"text":{"type":"string"},"ended":{"type":"boolean"},"id":{"type":"string"},"name":{"type":"string"},"result":{"type":"string"},"failed":{"type":"boolean","enum":[false,true]},"answer":{"type":"boolean","enum":[false,true]}},"required":["index","kind","text","ended"],"additionalProperties":true}}},"required":["turn","step","renderer","running","activity"],"additionalProperties":true}]},
1052
1052
  },
1053
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1442,"column":3},
1053
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1435,"column":3},
1054
1054
  },
1055
1055
  'zerowallClaudeCode/rollback': {
1056
1056
  service: 'zerowallClaudeCode',
@@ -1292,7 +1292,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
1292
1292
  create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_stop_result$schema,
1293
1293
  jsonSchemaError: 'typert tool schema: unsupported void value',
1294
1294
  },
1295
- sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1456,"column":9},
1295
+ sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1449,"column":9},
1296
1296
  },
1297
1297
  'zerowallClaudeCode/uninstall': {
1298
1298
  service: 'zerowallClaudeCode',
@@ -1,4 +1,5 @@
1
1
  /** Host-only route resolution. No value returned here may be sent over Remote. */
2
+ import { HarnessError } from '@deepseek-ai/dsh-llm';
2
3
  export interface ClaudeSelection {
3
4
  provider: string;
4
5
  model: string;
@@ -33,10 +34,33 @@ export interface ClaudeRouteServices {
33
34
  } | undefined>;
34
35
  managedCredential?(provider: string, model: string): Promise<string | undefined>;
35
36
  }
37
+ declare const routeErrors: {
38
+ readonly NO_SELECTION: "当前会话没有选择模型。";
39
+ readonly NO_ROUTE: "当前模型路由没有可读取的协议配置。";
40
+ readonly NO_MANAGED_ROUTE: "当前 AI 云模型路由不可用,请刷新模型列表后重试。";
41
+ readonly NO_ENDPOINT: "当前路由没有可用的 API endpoint。";
42
+ readonly INVALID_ENDPOINT: "当前路由的 API endpoint 不受支持。";
43
+ readonly MISSING_CREDENTIAL: "当前模型路由没有可用凭据,请在平台对话设置中配置。";
44
+ readonly UNSUPPORTED_EFFORT: "当前选择的推理强度不受此 Claude Code 版本支持,请在当前对话调整。";
45
+ readonly UNSUPPORTED_PROTOCOL: "请为 Claude Code 选择支持 Anthropic Messages 的手动模型路由,或选择 AI 云模型。";
46
+ };
47
+ /** Validation failures with fixed text safe for the conversation transcript. */
48
+ export declare class ClaudeRouteError extends HarnessError {
49
+ readonly reason: keyof typeof routeErrors;
50
+ constructor(reason: keyof typeof routeErrors);
51
+ }
36
52
  export declare function selectedClaudeModel(projection: {
37
53
  pending?: ClaudeSelection | null;
38
54
  lastUsed?: ClaudeSelection | null;
39
55
  } | undefined, fallback: () => ClaudeSelection, loggedHeader?: ClaudeRequestHeader): ClaudeSelection;
56
+ /**
57
+ * Resolve the SDK's Messages endpoint using the selected route's credential.
58
+ * AI Cloud profiles advertise the standard adapter's transport. The SDK sends
59
+ * Messages to the same gateway with the selected group key and exact model ID.
60
+ * @param selection - Current conversation or delegated model selection.
61
+ * @param services - Host-only route metadata and credential readers.
62
+ * @returns The SDK base URL and credential for this turn.
63
+ */
40
64
  export declare function resolveClaudeRoute(selection: ClaudeSelection, services: ClaudeRouteServices): Promise<ClaudeRoute>;
41
65
  /** Hold a suffix until enough bytes arrive to redact secrets spanning chunks. */
42
66
  export declare class ClaudeSafeOutput {
@@ -50,3 +74,4 @@ export declare class ClaudeSafeOutput {
50
74
  fork(): ClaudeSafeOutput;
51
75
  snapshot(): string;
52
76
  }
77
+ export {};
@@ -16,7 +16,7 @@ The settings page's runtime diagnostics show the absolute managed CLI path. Each
16
16
 
17
17
  ## Conversation routing and workspace access
18
18
 
19
- Each new run reads the selected conversation's current model route. It supports routes explicitly identified as Anthropic Messages compatible and passes the credential to the child process only for that run. Credentials are not written to plugin configuration, logs, UI or conversation history. Other protocols are reported as unsupported; the plugin does not translate requests between protocols.
19
+ Each run resolves the current model route. AI Cloud calls the selected group's Messages endpoint using the exact model ID and group key. The CLI reports errors returned by the gateway. Manually configured providers require an Anthropic Messages route. Credentials pass to the child process for the current run and stay out of plugin configuration, logs, UI and conversation history.
20
20
 
21
21
  The Claude agent preset routes ordinary conversation turns through the independently managed Claude Code CLI. New conversations keep the DSH Standard preset unless Claude Code is selected. Each turn uses the provider, model, and explicit reasoning effort from DSH's final request, and resolves its credential again for that request. Standard conversations continue using the DSH model adapter.
22
22
 
@@ -52,7 +52,7 @@ This ZeroWall plugin is a native adaptation. It does not include the upstream Cl
52
52
 
53
53
  ## Claude subagents
54
54
 
55
- The plugin mounts the official DSH delegation tool as `claude_subagent` in each Agent scope. It starts a text-only one-shot child with the managed Claude CLI, inherited Skills/MCP/environment, its own working directory and cancellation, and the parent's selected route by default. To delegate from an OpenAI parent, enable DSH's existing subagent model-selection setting and authorize an already configured Anthropic Messages route. `claude_list_subagent_models` discovers those allowed routes; pass exact `provider`, `model` and optional `reasoning_effort` to `claude_subagent`. This changes only the child process. The plugin never enables that setting or changes the parent/default model. Output schemas, continuation and max-token overrides are unsupported and fail explicitly.
55
+ The plugin mounts the official DSH delegation tool as `claude_subagent` in each Agent scope. It starts a text-only one-shot child with the managed Claude CLI, inherited Skills/MCP/environment, its own working directory and cancellation, and the parent's selected route by default. To use a different child model, enable DSH's subagent model-selection setting and authorize an AI Cloud model or a manually configured Anthropic Messages route. Use `claude_list_subagent_models` to find allowed routes, then pass the exact `provider`, `model` and optional `reasoning_effort` to `claude_subagent`. This changes only the child process. The plugin never enables that setting or changes the parent/default model. Output schemas, continuation and max-token overrides are unsupported and fail explicitly.
56
56
 
57
57
  ## Native settings surface
58
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerowall/dsh-claude-coderun",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Run an isolated Claude Code CLI from ZeroWall conversations.",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -101,13 +101,6 @@
101
101
  }
102
102
  }
103
103
  },
104
- "scripts": {
105
- "prepack": "pnpm run build",
106
- "bundle": "node ../../scripts/build-plugin.mjs",
107
- "typecheck": "tsc -p tsconfig.build.json --noEmit",
108
- "test": "vitest run",
109
- "build": "node ../../scripts/build-plugin.mjs"
110
- },
111
104
  "publishConfig": {
112
105
  "access": "public",
113
106
  "tag": "latest",
@@ -131,8 +124,6 @@
131
124
  "plugin-detail.zh.md"
132
125
  ],
133
126
  "dependencies": {
134
- "@zerowall/dsh-plugin-mcp": "0.1.0",
135
- "@zerowall/dsh-plugin-environment": "0.1.0",
136
127
  "@modelcontextprotocol/sdk": "^1.29.0",
137
128
  "react-dom": ">=18.2.0",
138
129
  "zod": "4.6.6",
@@ -252,5 +243,11 @@
252
243
  "engines": {
253
244
  "node": ">=24.9.0",
254
245
  "dsh": ">=0.2.2-rc.1"
246
+ },
247
+ "scripts": {
248
+ "bundle": "node ../../scripts/build-plugin.mjs",
249
+ "typecheck": "tsc -p tsconfig.build.json --noEmit",
250
+ "test": "vitest run",
251
+ "build": "node ../../scripts/build-plugin.mjs"
255
252
  }
256
- }
253
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerowall/dsh-claude-coderun",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "applicationVersion": "0.2.2-rc.1",
5
5
  "restartRequired": true,
6
6
  "desktop": {