@zerowall/dsh-claude-coderun 0.1.0-preview.4 → 0.1.0-preview.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 +2 -2
- package/README.md +2 -0
- package/README.zh.md +2 -0
- package/lib/client.js +10 -10
- package/lib/index.js +92 -371
- package/lib/typert.host.js +10 -10
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +9 -9
- package/lib/types/host/sdk-driver.d.ts +1 -1
- package/lib/types/host/skill-files.d.ts +9 -0
- package/lib/types/shared/types.d.ts +1 -1
- package/package.json +4 -4
- package/zerowall.plugin.json +1 -1
package/README.i18n.yaml
CHANGED
package/README.md
CHANGED
|
@@ -24,3 +24,5 @@ pnpm run zerowall:pack
|
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Keep the package LICENSE and any third-party notices with redistributions.
|
|
27
|
+
|
|
28
|
+
Claude uses the current conversation’s Host tool bridge for MCP, including on-demand capability discovery. The session plugin directory contains enabled Skills with relative resources intact; external MCP credentials and direct connection settings remain with the Host. Host tool NAME is called as mcp__zerowall__NAME; Skills rewrite MCP references to the same bridge names. Registry changes refresh scoped tool schemas; newly enabled Skills are projected after tool operations.
|
package/README.zh.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -225,7 +225,7 @@ function ClaudeCodeAction(props) {
|
|
|
225
225
|
" ",
|
|
226
226
|
row.name,
|
|
227
227
|
"\uFF1A",
|
|
228
|
-
{ synced: "\u5DF2\u540C\u6B65", manual: "\u4EC5\u624B\u52A8\u8C03\u7528\uFF08\u5DF2\u540C\u6B65\uFF09", disabled: "\u5DF2\u7981\u7528", unavailable: "\u4E0D\u53EF\u7528", failed: "\u540C\u6B65\u5931\u8D25" }[row.state],
|
|
228
|
+
{ synced: "\u5DF2\u540C\u6B65", "on-demand": "\u6309\u9700\u8FDE\u63A5", manual: "\u4EC5\u624B\u52A8\u8C03\u7528\uFF08\u5DF2\u540C\u6B65\uFF09", disabled: "\u5DF2\u7981\u7528", unavailable: "\u4E0D\u53EF\u7528", failed: "\u540C\u6B65\u5931\u8D25" }[row.state],
|
|
229
229
|
row.detail ? ` \xB7 ${row.detail}` : ""
|
|
230
230
|
] }, `${row.kind}-${row.name}`)) })
|
|
231
231
|
] }),
|
|
@@ -16783,7 +16783,7 @@ var _zerowall_dsh_claude_coderun_zerowallClaudeCode_read_result$schema = () => _
|
|
|
16783
16783
|
"resources": external_exports.union([external_exports.undefined(), external_exports.array(external_exports.object({
|
|
16784
16784
|
"kind": external_exports.union([external_exports.literal("skill"), external_exports.literal("mcp")]),
|
|
16785
16785
|
"name": external_exports.string(),
|
|
16786
|
-
"state": external_exports.union([external_exports.literal("failed"), external_exports.literal("manual"), external_exports.literal("synced"), external_exports.literal("disabled"), external_exports.literal("unavailable")]),
|
|
16786
|
+
"state": external_exports.union([external_exports.literal("failed"), external_exports.literal("manual"), external_exports.literal("synced"), external_exports.literal("on-demand"), external_exports.literal("disabled"), external_exports.literal("unavailable")]),
|
|
16787
16787
|
"detail": external_exports.union([external_exports.undefined(), external_exports.string()]).optional()
|
|
16788
16788
|
}))]).optional(),
|
|
16789
16789
|
"diagnostic": external_exports.union([external_exports.undefined(), external_exports.object({
|
|
@@ -17184,7 +17184,7 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
17184
17184
|
create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_clear_result$schema,
|
|
17185
17185
|
jsonSchemaError: "typert tool schema: unsupported void value"
|
|
17186
17186
|
},
|
|
17187
|
-
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line":
|
|
17187
|
+
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1464, "column": 3 }
|
|
17188
17188
|
},
|
|
17189
17189
|
"zerowallClaudeCode/cliSetModel": {
|
|
17190
17190
|
service: "zerowallClaudeCode",
|
|
@@ -17235,7 +17235,7 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
17235
17235
|
create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_cliSetModel_result$schema,
|
|
17236
17236
|
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 }
|
|
17237
17237
|
},
|
|
17238
|
-
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line":
|
|
17238
|
+
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1420, "column": 9 }
|
|
17239
17239
|
},
|
|
17240
17240
|
"zerowallClaudeCode/cliSetPermissionMode": {
|
|
17241
17241
|
service: "zerowallClaudeCode",
|
|
@@ -17286,7 +17286,7 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
17286
17286
|
create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_cliSetPermissionMode_result$schema,
|
|
17287
17287
|
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 }
|
|
17288
17288
|
},
|
|
17289
|
-
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line":
|
|
17289
|
+
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1429, "column": 9 }
|
|
17290
17290
|
},
|
|
17291
17291
|
"zerowallClaudeCode/contextUsage": {
|
|
17292
17292
|
service: "zerowallClaudeCode",
|
|
@@ -17338,7 +17338,7 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
17338
17338
|
create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_contextUsage_result$schema,
|
|
17339
17339
|
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 }
|
|
17340
17340
|
},
|
|
17341
|
-
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line":
|
|
17341
|
+
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1403, "column": 9 }
|
|
17342
17342
|
},
|
|
17343
17343
|
"zerowallClaudeCode/installCli": {
|
|
17344
17344
|
service: "zerowallClaudeCode",
|
|
@@ -17493,9 +17493,9 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
17493
17493
|
mode: "strict",
|
|
17494
17494
|
typeSymbol: "@zerowall/dsh-claude-coderun#zerowallClaudeCode/read:result",
|
|
17495
17495
|
create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_read_result$schema,
|
|
17496
|
-
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", "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 }] }
|
|
17496
|
+
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 }] }
|
|
17497
17497
|
},
|
|
17498
|
-
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line":
|
|
17498
|
+
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1437, "column": 3 }
|
|
17499
17499
|
},
|
|
17500
17500
|
"zerowallClaudeCode/readTranscript": {
|
|
17501
17501
|
service: "zerowallClaudeCode",
|
|
@@ -17562,7 +17562,7 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
17562
17562
|
create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_readTranscript_result$schema,
|
|
17563
17563
|
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 }] }
|
|
17564
17564
|
},
|
|
17565
|
-
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line":
|
|
17565
|
+
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1442, "column": 3 }
|
|
17566
17566
|
},
|
|
17567
17567
|
"zerowallClaudeCode/rollback": {
|
|
17568
17568
|
service: "zerowallClaudeCode",
|
|
@@ -17798,7 +17798,7 @@ var TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
17798
17798
|
create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_stop_result$schema,
|
|
17799
17799
|
jsonSchemaError: "typert tool schema: unsupported void value"
|
|
17800
17800
|
},
|
|
17801
|
-
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line":
|
|
17801
|
+
sourceLocation: { "file": "packages/plugin/src/host/index.ts", "line": 1456, "column": 9 }
|
|
17802
17802
|
},
|
|
17803
17803
|
"zerowallClaudeCode/uninstall": {
|
|
17804
17804
|
service: "zerowallClaudeCode",
|
package/lib/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __runInitializers = (array, flags, self, value) => {
|
|
|
17
17
|
return value;
|
|
18
18
|
};
|
|
19
19
|
var __decorateElement = (array, flags, name2, decorators, target, extra) => {
|
|
20
|
-
var fn, it, done, ctx,
|
|
20
|
+
var fn, it, done, ctx, access, k = flags & 7, s = !!(flags & 8), p = !!(flags & 16);
|
|
21
21
|
var j = k > 3 ? array.length + 1 : k ? s ? 1 : 2 : 0, key = __decoratorStrings[k + 5];
|
|
22
22
|
var initializers = k > 3 && (array[j - 1] = []), extraInitializers = array[j] || (array[j] = []);
|
|
23
23
|
var desc = k && (!p && !s && (target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(k < 4 ? target : { get [name2]() {
|
|
@@ -29,9 +29,9 @@ var __decorateElement = (array, flags, name2, decorators, target, extra) => {
|
|
|
29
29
|
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
30
30
|
ctx = __decoratorContext(k, name2, done = {}, array[3], extraInitializers);
|
|
31
31
|
if (k) {
|
|
32
|
-
ctx.static = s, ctx.private = p,
|
|
33
|
-
if (k ^ 3)
|
|
34
|
-
if (k > 2)
|
|
32
|
+
ctx.static = s, ctx.private = p, access = ctx.access = { has: p ? (x) => __privateIn(target, x) : (x) => name2 in x };
|
|
33
|
+
if (k ^ 3) access.get = p ? (x) => (k ^ 1 ? __privateGet : __privateMethod)(x, target, k ^ 4 ? extra : desc.get) : (x) => x[name2];
|
|
34
|
+
if (k > 2) access.set = p ? (x, y) => __privateSet(x, target, y, k ^ 4 ? extra : desc.set) : (x, y) => x[name2] = y;
|
|
35
35
|
}
|
|
36
36
|
it = (0, decorators[i])(k ? k < 4 ? p ? extra : desc[key] : k > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
|
|
37
37
|
if (k ^ 4 || it === void 0) __expectFn(it) && (k > 4 ? initializers.unshift(it) : k ? p ? extra = it : desc[key] = it : target = it);
|
|
@@ -87,9 +87,9 @@ import { createToolResultMessage as createToolResultMessage3, isAgentLoopRequest
|
|
|
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";
|
|
90
|
-
import { createHash as
|
|
91
|
-
import { chmod, lstat as lstat2, mkdir as mkdir3, readdir as
|
|
92
|
-
import { isAbsolute as
|
|
90
|
+
import { createHash as createHash2, randomUUID as randomUUID4 } from "node:crypto";
|
|
91
|
+
import { chmod, lstat as lstat2, mkdir as mkdir3, readdir as readdir3, readFile as readFile2, rename as rename2, rm as rm3, writeFile as writeFile3 } from "node:fs/promises";
|
|
92
|
+
import { isAbsolute as isAbsolute2, join as join5, resolve as resolve2 } from "node:path";
|
|
93
93
|
import { stripVTControlCharacters } from "node:util";
|
|
94
94
|
import { SecretBrokerClient } from "@zerowall/dsh-plugin-ai-cloud/secrets";
|
|
95
95
|
|
|
@@ -732,7 +732,7 @@ var ClaudeRuntimeManager = class {
|
|
|
732
732
|
// src/host/installer.ts
|
|
733
733
|
import { spawn } from "node:child_process";
|
|
734
734
|
import { join as join2 } from "node:path";
|
|
735
|
-
var runInstaller = (command, args, options) => new Promise((
|
|
735
|
+
var runInstaller = (command, args, options) => new Promise((resolve3, reject) => {
|
|
736
736
|
const { timeoutMs = 3e5, signal, ...spawnOptions } = options;
|
|
737
737
|
if (signal?.aborted) {
|
|
738
738
|
reject(new Error("Claude Code preparation was canceled."));
|
|
@@ -796,153 +796,40 @@ var runInstaller = (command, args, options) => new Promise((resolve4, reject) =>
|
|
|
796
796
|
child.once("close", async (code) => {
|
|
797
797
|
await stopping;
|
|
798
798
|
if (failure) reject(failure);
|
|
799
|
-
else
|
|
799
|
+
else resolve3({ code: code ?? -1, ...versionProbe ? { stdout } : {} });
|
|
800
800
|
});
|
|
801
801
|
});
|
|
802
802
|
|
|
803
|
-
// src/host/
|
|
804
|
-
import {
|
|
805
|
-
import {
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
var launcherSource = `'use strict';
|
|
809
|
-
const { spawn } = require('node:child_process');
|
|
810
|
-
const { readFileSync } = require('node:fs');
|
|
811
|
-
const { isAbsolute } = require('node:path');
|
|
812
|
-
let spec;
|
|
813
|
-
try {
|
|
814
|
-
spec = JSON.parse(readFileSync(process.argv[2], 'utf8'));
|
|
815
|
-
if (!isAbsolute(spec.command) || !isAbsolute(spec.cwd) || !Array.isArray(spec.args)
|
|
816
|
-
|| spec.args.some(value => typeof value !== 'string' || value.includes('\\0'))
|
|
817
|
-
|| spec.env !== undefined && (typeof spec.env !== 'object' || Object.values(spec.env).some(value => typeof value !== 'string' || !/^ZW_CLAUDE_MCP_[A-F0-9]{20}$/.test(value)))) throw new Error();
|
|
818
|
-
} catch {
|
|
819
|
-
process.stderr.write('ZeroWall MCP launch configuration is invalid.\\n');
|
|
820
|
-
process.exit(1);
|
|
803
|
+
// src/host/skill-files.ts
|
|
804
|
+
import { cp, mkdir, readdir, rm, symlink, writeFile } from "node:fs/promises";
|
|
805
|
+
import { join as join3 } from "node:path";
|
|
806
|
+
function claudeHostText(text) {
|
|
807
|
+
return text.replace(/\bmcp__(?!zerowall__)([A-Za-z0-9_-]+)__([A-Za-z0-9_-]+)/gu, "mcp__zerowall__mcp__$1__$2");
|
|
821
808
|
}
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
const
|
|
826
|
-
|
|
827
|
-
for (const
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
const stop = () => {
|
|
843
|
-
if (stopping) return;
|
|
844
|
-
stopping = true;
|
|
845
|
-
process.stdin.unpipe(child.stdin);
|
|
846
|
-
child.stdin.destroy();
|
|
847
|
-
child.kill();
|
|
848
|
-
};
|
|
849
|
-
process.on('SIGTERM', stop);
|
|
850
|
-
process.on('SIGINT', stop);
|
|
851
|
-
process.on('SIGHUP', stop);
|
|
852
|
-
process.on('exit', () => { if (child.exitCode === null) child.kill(); });
|
|
853
|
-
process.stdin.on('error', stop);
|
|
854
|
-
process.stdout.on('error', stop);
|
|
855
|
-
process.stderr.on('error', stop);
|
|
856
|
-
child.stdin.on('error', stop);
|
|
857
|
-
process.stdin.pipe(child.stdin);
|
|
858
|
-
process.stdin.once('end', () => {
|
|
859
|
-
// Give an orderly protocol shutdown a short window before stopping a server
|
|
860
|
-
// that keeps running after Claude closes its input.
|
|
861
|
-
eofTimer = setTimeout(stop, 1000);
|
|
862
|
-
eofTimer.unref();
|
|
863
|
-
});
|
|
864
|
-
child.stdout.pipe(process.stdout, { end: false });
|
|
865
|
-
child.stderr.pipe(process.stderr, { end: false });
|
|
866
|
-
child.once('error', () => {
|
|
867
|
-
process.stderr.write('ZeroWall MCP process could not start.\\n');
|
|
868
|
-
});
|
|
869
|
-
child.once('close', (code, signal) => {
|
|
870
|
-
clearTimeout(eofTimer);
|
|
871
|
-
process.stdin.unpipe(child.stdin);
|
|
872
|
-
process.stdin.destroy();
|
|
873
|
-
process.exitCode = Number.isInteger(code) ? code : signal ? 143 : 1;
|
|
874
|
-
});
|
|
875
|
-
`;
|
|
876
|
-
async function resolveNativeFromPath(command, searchPath) {
|
|
877
|
-
if (!searchPath || /[\\/:]/u.test(command) || command !== command.trim()) return void 0;
|
|
878
|
-
const extensions = process.platform === "win32" ? extname(command) ? /\.(?:exe|com)$/iu.test(command) ? [""] : [] : [".exe", ".com"] : [""];
|
|
879
|
-
for (const entry of searchPath.split(delimiter)) {
|
|
880
|
-
const directory = entry.replace(/^"(.*)"$/u, "$1");
|
|
881
|
-
if (!isAbsolute2(directory)) continue;
|
|
882
|
-
for (const suffix of extensions) {
|
|
883
|
-
try {
|
|
884
|
-
const candidate = await realpath(join3(directory, `${command}${suffix}`));
|
|
885
|
-
if (!(await stat(candidate)).isFile()) continue;
|
|
886
|
-
if (process.platform !== "win32") await access(candidate, constants.X_OK);
|
|
887
|
-
return candidate;
|
|
888
|
-
} catch {
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
return void 0;
|
|
893
|
-
}
|
|
894
|
-
async function writeClaudeMcpLaunchers(projection, options) {
|
|
895
|
-
if (!isAbsolute2(options.root) || !isAbsolute2(options.executable) || options.root.includes("\0") || options.executable.includes("\0")) throw new Error("Invalid MCP launcher runtime.");
|
|
896
|
-
const root = join3(options.root, "mcp-launchers");
|
|
897
|
-
const wrapped = projection.servers.some((server) => server.type === "stdio" && server.launcher);
|
|
898
|
-
if (wrapped) {
|
|
899
|
-
await mkdir(root, { recursive: true, mode: 448 });
|
|
900
|
-
await writeFile(join3(root, "launch.cjs"), launcherSource, { mode: 384 });
|
|
901
|
-
}
|
|
902
|
-
const servers = [];
|
|
903
|
-
const skipped = [];
|
|
904
|
-
for (const server of projection.servers) {
|
|
905
|
-
if (server.type !== "stdio") {
|
|
906
|
-
servers.push(server);
|
|
907
|
-
continue;
|
|
908
|
-
}
|
|
909
|
-
const { launcher } = server;
|
|
910
|
-
if (!launcher) {
|
|
911
|
-
skipped.push({ serverName: server.serverName, reason: "unsupported-launch" });
|
|
912
|
-
continue;
|
|
913
|
-
}
|
|
914
|
-
const command = launcher.useBundledNode ? options.executable : launcher.resolveFromPath ? await resolveNativeFromPath(launcher.command, options.searchPath) : launcher.command;
|
|
915
|
-
if (!command) {
|
|
916
|
-
skipped.push({ serverName: server.serverName, reason: "unsupported-launch" });
|
|
917
|
-
continue;
|
|
918
|
-
}
|
|
919
|
-
const specPath = join3(root, `${createHash("sha256").update(server.serverName).digest("hex")}.json`);
|
|
920
|
-
const env = Object.fromEntries(Object.entries(server.env ?? {}).map(([target, placeholder]) => {
|
|
921
|
-
const match = /^\$\{(ZW_CLAUDE_MCP_[A-F0-9]{20})\}$/u.exec(placeholder);
|
|
922
|
-
if (!match) throw new Error("Claude MCP launcher credential placeholder is invalid.");
|
|
923
|
-
return [target, match[1]];
|
|
924
|
-
}));
|
|
925
|
-
await writeFile(specPath, JSON.stringify({
|
|
926
|
-
command,
|
|
927
|
-
args: launcher.args,
|
|
928
|
-
cwd: launcher.cwd,
|
|
929
|
-
env,
|
|
930
|
-
electron: Boolean(options.electron && launcher.useBundledNode)
|
|
931
|
-
}), { mode: 384 });
|
|
932
|
-
servers.push({
|
|
933
|
-
serverName: server.serverName,
|
|
934
|
-
type: "stdio",
|
|
935
|
-
command: options.executable,
|
|
936
|
-
args: [join3(root, "launch.cjs"), specPath],
|
|
937
|
-
...server.env || options.electron ? { env: { ...server.env, ...options.electron ? { ELECTRON_RUN_AS_NODE: "1" } : {} } } : {}
|
|
938
|
-
});
|
|
809
|
+
async function writeClaudeSkills(root, projection) {
|
|
810
|
+
const skillsRoot = join3(root, "skills");
|
|
811
|
+
await mkdir(skillsRoot, { recursive: true, mode: 448 });
|
|
812
|
+
const active = new Set(projection.skills.map((skill) => skill.name));
|
|
813
|
+
for (const entry of await readdir(skillsRoot)) if (!active.has(entry)) await rm(join3(skillsRoot, entry), { recursive: true, force: true });
|
|
814
|
+
for (const skill of projection.skills) {
|
|
815
|
+
const directory = join3(skillsRoot, skill.name);
|
|
816
|
+
await rm(directory, { recursive: true, force: true });
|
|
817
|
+
await mkdir(directory, { recursive: true, mode: 448 });
|
|
818
|
+
const resource = skill.resourceBase;
|
|
819
|
+
if (resource?.kind === "directory") {
|
|
820
|
+
for (const entry of await readdir(resource.path, { withFileTypes: true })) {
|
|
821
|
+
if (["SKILL.md", ".git", "node_modules", "__pycache__"].includes(entry.name)) continue;
|
|
822
|
+
const source = join3(resource.path, entry.name), target = join3(directory, entry.name);
|
|
823
|
+
if (entry.isDirectory() && !/\.asar(?:[\\/]|$)/u.test(source)) await symlink(source, target, process.platform === "win32" ? "junction" : "dir");
|
|
824
|
+
else await cp(source, target, { recursive: true, dereference: true });
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
const hint = resource?.kind === "url" ? "Resolve relative resource URLs against " + resource.url : resource?.kind === "opaque" ? resource.description : "Relative resources are available in this skill directory.";
|
|
828
|
+
await writeFile(join3(directory, "SKILL.md"), "---\nname: " + skill.name + "\ndescription: " + JSON.stringify(skill.description) + "\ndisable-model-invocation: " + !skill.invocation.modelInvocable + "\nuser-invocable: " + (skill.invocation.userInvocable !== false) + "\n---\n" + hint + "\n\n" + claudeHostText(skill.content), { mode: 384 });
|
|
939
829
|
}
|
|
940
|
-
return { servers, skipped };
|
|
941
830
|
}
|
|
942
831
|
|
|
943
832
|
// src/host/projection.ts
|
|
944
|
-
import { createHash as createHash2 } from "node:crypto";
|
|
945
|
-
import { basename, extname as extname2, isAbsolute as isAbsolute3, resolve as resolve2 } from "node:path";
|
|
946
833
|
var skillNamePattern = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u;
|
|
947
834
|
async function projectSkillsForClaude(registry, cwd, scope) {
|
|
948
835
|
const lookup = { cwd, ...scope === void 0 ? {} : { scope } };
|
|
@@ -991,162 +878,6 @@ async function projectSkillsForClaude(registry, cwd, scope) {
|
|
|
991
878
|
}
|
|
992
879
|
return { skills, skipped };
|
|
993
880
|
}
|
|
994
|
-
var mcpServerNamePattern = /^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$/u;
|
|
995
|
-
var referenceNamePattern = /^[A-Za-z_][A-Za-z0-9_]*$/u;
|
|
996
|
-
var httpHeaderNamePattern = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u;
|
|
997
|
-
function normalizedMcpUrl(value) {
|
|
998
|
-
if (typeof value !== "string" || value !== value.trim() || /[\u0000-\u0020\u007f?#]/u.test(value)) return void 0;
|
|
999
|
-
try {
|
|
1000
|
-
const url = new URL(value);
|
|
1001
|
-
if (!["https:", "http:"].includes(url.protocol) || url.username || url.password || url.search || url.hash) return void 0;
|
|
1002
|
-
return url.href;
|
|
1003
|
-
} catch {
|
|
1004
|
-
return void 0;
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
function normalizedWorkingDirectory(value) {
|
|
1008
|
-
if (typeof value !== "string" || value.includes("\0") || !isAbsolute3(value)) return void 0;
|
|
1009
|
-
const absolute = resolve2(value);
|
|
1010
|
-
return process.platform === "win32" ? absolute.toLowerCase() : absolute;
|
|
1011
|
-
}
|
|
1012
|
-
function independentLaunch(record, cwd, allowPath) {
|
|
1013
|
-
const command = record.command;
|
|
1014
|
-
const commandName = basename(command).toLowerCase();
|
|
1015
|
-
if (commandName === "node" || commandName === "node.exe") {
|
|
1016
|
-
return { cwd, command, args: [...record.args], useBundledNode: true };
|
|
1017
|
-
}
|
|
1018
|
-
if (/\.(?:cmd|bat|ps1|sh|cjs|mjs|js)$/iu.test(command)) return void 0;
|
|
1019
|
-
if (!isAbsolute3(command)) {
|
|
1020
|
-
if (!allowPath || /[\\/:]/u.test(command) || command !== command.trim()) return void 0;
|
|
1021
|
-
return { cwd, command, args: [...record.args], useBundledNode: false, resolveFromPath: true };
|
|
1022
|
-
}
|
|
1023
|
-
if (process.platform === "win32" && extname2(command).toLowerCase() !== ".exe") return void 0;
|
|
1024
|
-
return { cwd, command, args: [...record.args], useBundledNode: false };
|
|
1025
|
-
}
|
|
1026
|
-
function projectMcpForClaude(records, cwd) {
|
|
1027
|
-
const sessionCwd = normalizedWorkingDirectory(cwd);
|
|
1028
|
-
const counts2 = /* @__PURE__ */ new Map();
|
|
1029
|
-
for (const record of records) counts2.set(record.serverName, (counts2.get(record.serverName) ?? 0) + 1);
|
|
1030
|
-
const servers = [];
|
|
1031
|
-
const skipped = [];
|
|
1032
|
-
for (const record of records) {
|
|
1033
|
-
const serverName = typeof record.serverName === "string" ? record.serverName : "";
|
|
1034
|
-
if (record.enabled !== true) {
|
|
1035
|
-
skipped.push({ serverName, reason: "disabled" });
|
|
1036
|
-
continue;
|
|
1037
|
-
}
|
|
1038
|
-
if (record.transport !== "stdio" && record.transport !== "streamable-http") {
|
|
1039
|
-
skipped.push({ serverName, reason: "unsupported-transport" });
|
|
1040
|
-
continue;
|
|
1041
|
-
}
|
|
1042
|
-
if (serverName.startsWith("zerowall_managed_") || typeof record.command === "string" && record.command.startsWith("zerowall-managed:")) {
|
|
1043
|
-
skipped.push({ serverName, reason: "managed-server" });
|
|
1044
|
-
continue;
|
|
1045
|
-
}
|
|
1046
|
-
if (Object.keys((record.transport === "stdio" ? record.headerRefs : record.envRefs) ?? {}).length > 0) {
|
|
1047
|
-
skipped.push({ serverName, reason: "credential-reference" });
|
|
1048
|
-
continue;
|
|
1049
|
-
}
|
|
1050
|
-
const refs = record.transport === "stdio" ? record.envRefs ?? {} : record.headerRefs ?? {};
|
|
1051
|
-
const targets = Object.keys(refs);
|
|
1052
|
-
if (new Set(targets.map((target) => target.toLowerCase())).size !== targets.length || Object.entries(refs).some(([target, ref]) => typeof ref !== "string" || !referenceNamePattern.test(ref) || (record.transport === "streamable-http" ? !httpHeaderNamePattern.test(target) : !referenceNamePattern.test(target) || /^(?:ANTHROPIC_|CLAUDE_|DSH_|NPM_CONFIG_|PNPM_|XDG_)/iu.test(target) || ["PATH", "HOME", "USERPROFILE", "APPDATA", "LOCALAPPDATA", "SYSTEMROOT", "WINDIR", "COMSPEC", "NODE_OPTIONS", "NODE_PATH", "ELECTRON_RUN_AS_NODE", "TEMP", "TMP", "TMPDIR"].includes(target.toUpperCase())))) {
|
|
1053
|
-
skipped.push({ serverName, reason: "invalid-credential-reference" });
|
|
1054
|
-
continue;
|
|
1055
|
-
}
|
|
1056
|
-
if ((counts2.get(serverName) ?? 0) !== 1) {
|
|
1057
|
-
skipped.push({ serverName, reason: "duplicate-server-name" });
|
|
1058
|
-
continue;
|
|
1059
|
-
}
|
|
1060
|
-
if (!mcpServerNamePattern.test(serverName)) {
|
|
1061
|
-
skipped.push({ serverName, reason: "invalid-launch" });
|
|
1062
|
-
continue;
|
|
1063
|
-
}
|
|
1064
|
-
if (record.transport === "streamable-http") {
|
|
1065
|
-
const url = normalizedMcpUrl(record.url);
|
|
1066
|
-
if (!url) {
|
|
1067
|
-
skipped.push({ serverName, reason: "invalid-launch" });
|
|
1068
|
-
continue;
|
|
1069
|
-
}
|
|
1070
|
-
servers.push({ serverName, type: "http", url, headerRefs: { ...refs } });
|
|
1071
|
-
continue;
|
|
1072
|
-
}
|
|
1073
|
-
if (typeof record.command !== "string" || record.command.trim() === "" || record.command.includes("\0") || !Array.isArray(record.args) || record.args.some((argument) => typeof argument !== "string" || argument.includes("\0"))) {
|
|
1074
|
-
skipped.push({ serverName, reason: "invalid-launch" });
|
|
1075
|
-
continue;
|
|
1076
|
-
}
|
|
1077
|
-
if (process.platform === "win32" && /\.(?:cmd|bat)$/iu.test(record.command)) {
|
|
1078
|
-
skipped.push({ serverName, reason: "unsupported-launch" });
|
|
1079
|
-
continue;
|
|
1080
|
-
}
|
|
1081
|
-
if (!sessionCwd || record.cwd !== void 0 && (typeof record.cwd !== "string" || record.cwd.trim() !== "" && !normalizedWorkingDirectory(record.cwd))) {
|
|
1082
|
-
skipped.push({ serverName, reason: "unsupported-working-directory" });
|
|
1083
|
-
continue;
|
|
1084
|
-
}
|
|
1085
|
-
const requestedCwd = typeof record.cwd === "string" && record.cwd.trim() !== "" ? resolve2(record.cwd) : cwd;
|
|
1086
|
-
const differentCwd = record.cwd !== void 0 && record.cwd.trim() !== "" && normalizedWorkingDirectory(record.cwd) !== sessionCwd;
|
|
1087
|
-
const launcher = independentLaunch(record, requestedCwd, !differentCwd);
|
|
1088
|
-
if (!launcher) {
|
|
1089
|
-
skipped.push({ serverName, reason: "unsupported-launch" });
|
|
1090
|
-
continue;
|
|
1091
|
-
}
|
|
1092
|
-
servers.push({
|
|
1093
|
-
serverName,
|
|
1094
|
-
type: "stdio",
|
|
1095
|
-
command: record.command,
|
|
1096
|
-
args: [...record.args],
|
|
1097
|
-
envRefs: { ...record.envRefs },
|
|
1098
|
-
launcher
|
|
1099
|
-
});
|
|
1100
|
-
}
|
|
1101
|
-
return { servers, skipped };
|
|
1102
|
-
}
|
|
1103
|
-
async function prepareClaudeMcpRuntime(projection, resolveReference) {
|
|
1104
|
-
const servers = [];
|
|
1105
|
-
const environment = {};
|
|
1106
|
-
const skipped = [...projection.skipped];
|
|
1107
|
-
for (const server of projection.servers) {
|
|
1108
|
-
const placeholders = {};
|
|
1109
|
-
const serverEnvironment = {};
|
|
1110
|
-
const refs = server.type === "stdio" ? server.envRefs : server.headerRefs;
|
|
1111
|
-
let available = true;
|
|
1112
|
-
for (const [target, reference] of Object.entries(refs)) {
|
|
1113
|
-
let value;
|
|
1114
|
-
try {
|
|
1115
|
-
value = await resolveReference(reference);
|
|
1116
|
-
} catch {
|
|
1117
|
-
value = void 0;
|
|
1118
|
-
}
|
|
1119
|
-
if (typeof value !== "string" || !value.trim() || value.includes("\0") || server.type === "http" && /[\r\n]/u.test(value)) {
|
|
1120
|
-
available = false;
|
|
1121
|
-
break;
|
|
1122
|
-
}
|
|
1123
|
-
const variable = `ZW_CLAUDE_MCP_${createHash2("sha256").update(`${server.serverName}\0${target}`).digest("hex").slice(0, 20).toUpperCase()}`;
|
|
1124
|
-
serverEnvironment[variable] = value;
|
|
1125
|
-
placeholders[target] = `\${${variable}}`;
|
|
1126
|
-
}
|
|
1127
|
-
if (!available) {
|
|
1128
|
-
skipped.push({ serverName: server.serverName, reason: "credential-unavailable" });
|
|
1129
|
-
continue;
|
|
1130
|
-
}
|
|
1131
|
-
Object.assign(environment, serverEnvironment);
|
|
1132
|
-
if (server.type === "http") {
|
|
1133
|
-
servers.push({
|
|
1134
|
-
serverName: server.serverName,
|
|
1135
|
-
type: "http",
|
|
1136
|
-
url: server.url,
|
|
1137
|
-
...Object.keys(placeholders).length ? { headers: placeholders } : {}
|
|
1138
|
-
});
|
|
1139
|
-
} else servers.push({
|
|
1140
|
-
serverName: server.serverName,
|
|
1141
|
-
type: "stdio",
|
|
1142
|
-
command: server.command,
|
|
1143
|
-
args: server.args,
|
|
1144
|
-
...Object.keys(placeholders).length ? { env: placeholders } : {},
|
|
1145
|
-
..."launcher" in server && server.launcher ? { launcher: server.launcher } : {}
|
|
1146
|
-
});
|
|
1147
|
-
}
|
|
1148
|
-
return { servers, environment, skipped };
|
|
1149
|
-
}
|
|
1150
881
|
|
|
1151
882
|
// src/host/route.ts
|
|
1152
883
|
function selectedClaudeModel(projection, fallback, loggedHeader) {
|
|
@@ -1415,8 +1146,8 @@ var CLAUDE_MODE_BY_SANDBOX = {
|
|
|
1415
1146
|
};
|
|
1416
1147
|
|
|
1417
1148
|
// src/host/session-binding.ts
|
|
1418
|
-
import { createHash
|
|
1419
|
-
import { lstat, mkdir as mkdir2, readFile, readdir, rename, rm, writeFile as writeFile2 } from "node:fs/promises";
|
|
1149
|
+
import { createHash, randomUUID as randomUUID2 } from "node:crypto";
|
|
1150
|
+
import { lstat, mkdir as mkdir2, readFile, readdir as readdir2, rename, rm as rm2, writeFile as writeFile2 } from "node:fs/promises";
|
|
1420
1151
|
import { join as join4 } from "node:path";
|
|
1421
1152
|
import { createReadStream } from "node:fs";
|
|
1422
1153
|
import { createInterface } from "node:readline";
|
|
@@ -1426,7 +1157,7 @@ var ClaudeSessionBindings = class {
|
|
|
1426
1157
|
}
|
|
1427
1158
|
configDir;
|
|
1428
1159
|
file(id) {
|
|
1429
|
-
return join4(this.configDir, "bindings", `${
|
|
1160
|
+
return join4(this.configDir, "bindings", `${createHash("sha256").update(id).digest("hex")}.json`);
|
|
1430
1161
|
}
|
|
1431
1162
|
async load(id, cwd) {
|
|
1432
1163
|
let previous;
|
|
@@ -1479,12 +1210,12 @@ var ClaudeSessionBindings = class {
|
|
|
1479
1210
|
try {
|
|
1480
1211
|
await rename(temporary, file);
|
|
1481
1212
|
} finally {
|
|
1482
|
-
await
|
|
1213
|
+
await rm2(temporary, { force: true });
|
|
1483
1214
|
}
|
|
1484
1215
|
}
|
|
1485
1216
|
async transcript(nativeId) {
|
|
1486
1217
|
const root = join4(this.configDir, "projects");
|
|
1487
|
-
const directories = await
|
|
1218
|
+
const directories = await readdir2(root, { withFileTypes: true }).catch((error) => {
|
|
1488
1219
|
if (error.code === "ENOENT") return [];
|
|
1489
1220
|
throw error;
|
|
1490
1221
|
});
|
|
@@ -1501,7 +1232,7 @@ var ClaudeSessionBindings = class {
|
|
|
1501
1232
|
};
|
|
1502
1233
|
function inputKey(value) {
|
|
1503
1234
|
const message = value;
|
|
1504
|
-
return
|
|
1235
|
+
return createHash("sha256").update(typeof message?.id === "string" ? message.id : JSON.stringify(value)).digest("hex");
|
|
1505
1236
|
}
|
|
1506
1237
|
|
|
1507
1238
|
// src/host/sdk-driver.ts
|
|
@@ -1553,7 +1284,7 @@ async function settleClaudeToolCalls(agent) {
|
|
|
1553
1284
|
}
|
|
1554
1285
|
|
|
1555
1286
|
// src/host/sdk-driver.ts
|
|
1556
|
-
function createHostToolBridge(agent, schemas, signal, source, state = { concluded: false }, currentSchemas = () => schemas) {
|
|
1287
|
+
function createHostToolBridge(agent, schemas, signal, source, state = { concluded: false }, currentSchemas = () => schemas, synchronizeResources) {
|
|
1557
1288
|
const server = createSdkMcpServer({ name: "zerowall", version: "1.0.0", instructions: "These are built-in tools executing through the current ZeroWall Host, not separate external MCP services. Image tools are mcp__zerowall__generate_image and mcp__zerowall__edit_image when listed. Preserve the configured image model and parameters. After capability_search enables tools, their real schemas are refreshed; if needed call RefreshMcpTools for server zerowall once, then ToolSearch for the exact returned bridge name. Do not reconnect unrelated external servers." });
|
|
1558
1289
|
server.instance.server.registerCapabilities({ tools: { listChanged: true } });
|
|
1559
1290
|
let published = JSON.stringify(currentSchemas());
|
|
@@ -1603,8 +1334,8 @@ function createHostToolBridge(agent, schemas, signal, source, state = { conclude
|
|
|
1603
1334
|
server.instance.server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
1604
1335
|
const previous = queue;
|
|
1605
1336
|
let release;
|
|
1606
|
-
queue = new Promise((
|
|
1607
|
-
release =
|
|
1337
|
+
queue = new Promise((resolve3) => {
|
|
1338
|
+
release = resolve3;
|
|
1608
1339
|
});
|
|
1609
1340
|
await previous;
|
|
1610
1341
|
try {
|
|
@@ -1630,12 +1361,18 @@ function createHostToolBridge(agent, schemas, signal, source, state = { conclude
|
|
|
1630
1361
|
const content = await mcpContent(agent, result.content, lifetime);
|
|
1631
1362
|
for (const context2 of batch.additionalContexts) content.push(...await mcpContent(agent, context2.content, lifetime));
|
|
1632
1363
|
await state.delivered?.(batch.additionalContexts.map(inputKey));
|
|
1364
|
+
try {
|
|
1365
|
+
await synchronizeResources?.();
|
|
1366
|
+
} catch (_error) {
|
|
1367
|
+
content.push({ type: "text", text: "The operation completed, but the updated Skills could not be projected. Retry resource synchronization before using new Skills." });
|
|
1368
|
+
}
|
|
1633
1369
|
const latest = currentSchemas();
|
|
1634
1370
|
const fingerprint = JSON.stringify(latest);
|
|
1635
1371
|
if (fingerprint !== published) {
|
|
1636
1372
|
if (!await notifyChanges()) {
|
|
1637
1373
|
content.push({ type: "text", text: "The Host tool list changed but its notification could not be delivered. Call RefreshMcpTools for server zerowall to re-list tools; do not repeat the operation that just completed." });
|
|
1638
1374
|
}
|
|
1375
|
+
content.push({ type: "text", text: "Available bridge names: " + latest.map((schema2) => "mcp__zerowall__" + schema2.name).slice(0, 40).join(", ") });
|
|
1639
1376
|
content.push({ type: "text", text: 'Host tool schemas changed. Use the updated tools; if a newly enabled tool is not in ToolSearch yet, call RefreshMcpTools with {"server":"zerowall"} once, then search its exact mcp__zerowall__ name. No external MCP connection is required.' });
|
|
1640
1377
|
}
|
|
1641
1378
|
return { content, isError: result.isError };
|
|
@@ -1785,8 +1522,9 @@ function resourceStatus(skills, servers, tools, runtime = [], disabledSkills = [
|
|
|
1785
1522
|
for (const name2 of disabledSkills) if (!rows.some((row2) => row2.name === name2)) rows.push({ kind: "skill", name: name2, state: "disabled" });
|
|
1786
1523
|
for (const server of servers) {
|
|
1787
1524
|
const status = runtime.find((row2) => row2.serverName === server.serverName)?.runtimeState;
|
|
1525
|
+
const lazy = tools.some((tool) => tool.name === "capability_search") && server.enabled && !["error", "unavailable"].includes(status ?? "");
|
|
1788
1526
|
const available = tools.some((tool) => tool.name.startsWith(`mcp__${server.serverName}__`));
|
|
1789
|
-
rows.push({ kind: "mcp", name: server.serverName, state: !server.enabled ? "disabled" : available ? "synced" : status === "error" ? "failed" : "unavailable", detail: available ? "\u901A\u8FC7\u73B0\u6709 Host \u8FDE\u63A5\u6865\u63A5" : status ?? "\u5F53\u524D\u4F1A\u8BDD\u6CA1\u6709\u53EF\u7528\u5DE5\u5177" });
|
|
1527
|
+
rows.push({ kind: "mcp", name: server.serverName, state: !server.enabled ? "disabled" : available ? "synced" : status === "error" ? "failed" : lazy ? "on-demand" : "unavailable", detail: available ? "\u901A\u8FC7\u73B0\u6709 Host \u8FDE\u63A5\u6865\u63A5" : lazy ? "\u901A\u8FC7 capability_search \u6309\u9700\u8FDE\u63A5\uFF0C\u5DE5\u5177\u7531 Host \u6865\u63A5" : status ?? "\u5F53\u524D\u4F1A\u8BDD\u6CA1\u6709\u53EF\u7528\u5DE5\u5177" });
|
|
1790
1528
|
}
|
|
1791
1529
|
return rows;
|
|
1792
1530
|
}
|
|
@@ -2482,10 +2220,10 @@ var ClaudeCodeService = class extends (_a = TypertRemoteService, _status_dec = [
|
|
|
2482
2220
|
}
|
|
2483
2221
|
config;
|
|
2484
2222
|
desktop() {
|
|
2485
|
-
return Boolean(process.env.ZEROWALL_DESKTOP_RUNTIME_ROOT &&
|
|
2223
|
+
return Boolean(process.env.ZEROWALL_DESKTOP_RUNTIME_ROOT && isAbsolute2(process.env.ZEROWALL_DESKTOP_RUNTIME_ROOT));
|
|
2486
2224
|
}
|
|
2487
2225
|
runtimeRoot() {
|
|
2488
|
-
return
|
|
2226
|
+
return resolve2(this.config.runtimeRoot ?? process.env.ZEROWALL_CLAUDE_RUNTIME_ROOT ?? join5(resolveDshHome(), "zerowall", "claude-code", "runtime"));
|
|
2489
2227
|
}
|
|
2490
2228
|
anyRunning() {
|
|
2491
2229
|
return [...this.sessions.values()].some((state) => state.busy || state.turn?.view.running === true);
|
|
@@ -2522,16 +2260,16 @@ var ClaudeCodeService = class extends (_a = TypertRemoteService, _status_dec = [
|
|
|
2522
2260
|
if (this.sessionOccupied(owner)) return;
|
|
2523
2261
|
const waiters = owner.availableWaiters;
|
|
2524
2262
|
delete owner.availableWaiters;
|
|
2525
|
-
for (const
|
|
2263
|
+
for (const resolve3 of waiters ?? []) resolve3();
|
|
2526
2264
|
}
|
|
2527
2265
|
async waitForSessionAvailable(owner, signal) {
|
|
2528
2266
|
while (this.sessionOccupied(owner)) {
|
|
2529
2267
|
if (signal?.aborted) throw new Error("Claude Code request was canceled.");
|
|
2530
|
-
await new Promise((
|
|
2268
|
+
await new Promise((resolve3, reject) => {
|
|
2531
2269
|
const cleanup = () => signal?.removeEventListener("abort", abort);
|
|
2532
2270
|
const ready = () => {
|
|
2533
2271
|
cleanup();
|
|
2534
|
-
|
|
2272
|
+
resolve3();
|
|
2535
2273
|
};
|
|
2536
2274
|
const abort = () => {
|
|
2537
2275
|
owner.availableWaiters?.delete(ready);
|
|
@@ -2689,7 +2427,7 @@ var ClaudeCodeService = class extends (_a = TypertRemoteService, _status_dec = [
|
|
|
2689
2427
|
const root = this.desktop() ? join5(this.runtime().configDir, "output-styles") : "";
|
|
2690
2428
|
const user = [];
|
|
2691
2429
|
try {
|
|
2692
|
-
for (const entry of root ? (await
|
|
2430
|
+
for (const entry of root ? (await readdir3(root, { withFileTypes: true })).slice(0, 256) : []) {
|
|
2693
2431
|
if (!entry.isFile() || !entry.name.toLowerCase().endsWith(".md")) continue;
|
|
2694
2432
|
const fallback = entry.name.slice(0, -3);
|
|
2695
2433
|
let value = fallback;
|
|
@@ -2823,7 +2561,7 @@ var ClaudeCodeService = class extends (_a = TypertRemoteService, _status_dec = [
|
|
|
2823
2561
|
output.finish();
|
|
2824
2562
|
turn.view.running = false;
|
|
2825
2563
|
this.sessions.delete(id);
|
|
2826
|
-
if (turn.projectionRoot) await
|
|
2564
|
+
if (turn.projectionRoot) await rm3(turn.projectionRoot, { recursive: true, force: true }).catch(() => void 0);
|
|
2827
2565
|
if (turn.binding) {
|
|
2828
2566
|
turn.binding.state = turn.cancel.signal.aborted ? "stopped" : diagnostic ? "failed" : "idle";
|
|
2829
2567
|
await turn.bindingStore.save(id, turn.binding);
|
|
@@ -2879,7 +2617,7 @@ var ClaudeCodeService = class extends (_a = TypertRemoteService, _status_dec = [
|
|
|
2879
2617
|
await rename2(temporary, path);
|
|
2880
2618
|
await chmod(path, 384);
|
|
2881
2619
|
} finally {
|
|
2882
|
-
await
|
|
2620
|
+
await rm3(temporary, { force: true }).catch(() => void 0);
|
|
2883
2621
|
}
|
|
2884
2622
|
}
|
|
2885
2623
|
async install(agent) {
|
|
@@ -3082,52 +2820,18 @@ var ClaudeCodeService = class extends (_a = TypertRemoteService, _status_dec = [
|
|
|
3082
2820
|
if (!executable) throw new Error("\u8BF7\u5148\u5B89\u88C5 Claude Code\u3002");
|
|
3083
2821
|
const workingDirectory = this.ctx.get("workingDirectory");
|
|
3084
2822
|
const cwd = execution.cwd ?? workingDirectory.get(agent.session);
|
|
3085
|
-
if (!
|
|
2823
|
+
if (!isAbsolute2(cwd)) throw new Error("\u5F53\u524D\u4F1A\u8BDD\u6CA1\u6709\u6709\u6548\u7684\u9879\u76EE\u76EE\u5F55\u3002");
|
|
3086
2824
|
assertUsableCwd("Claude Code", "working directory", cwd);
|
|
3087
2825
|
const route2 = await this.route(agent, selected);
|
|
3088
2826
|
cancel.signal.throwIfAborted();
|
|
3089
2827
|
const skillsRegistry = agent.ctx.get("skills");
|
|
3090
2828
|
const projects = this.ctx.get("zerowallMcpConfigurationStore");
|
|
3091
|
-
|
|
3092
|
-
const credentials = this.ctx.get("credentials");
|
|
3093
|
-
const mcp = await prepareClaudeMcpRuntime(projectMcpForClaude(projects.listMcpServers(), cwd), async (reference) => {
|
|
3094
|
-
const specialKey = reference === "R_PLATFORM_MCP_AUTHORIZATION" ? "zerowall.mcp.rdatalinux_authorization" : reference === "HUAGONGSHE_MCP_AUTHORIZATION" ? "zerowall.mcp.huagongshe_token" : void 0;
|
|
3095
|
-
if (specialKey) {
|
|
3096
|
-
const value = await this.secrets.get(specialKey).catch(() => void 0);
|
|
3097
|
-
if (value?.trim()) return reference === "HUAGONGSHE_MCP_AUTHORIZATION" ? `Bearer ${value.trim()}` : value;
|
|
3098
|
-
}
|
|
3099
|
-
const stored = await this.secrets.get(`zerowall.environment.var.${reference.toLowerCase()}`).catch(() => void 0);
|
|
3100
|
-
return stored ?? (await credentials.resolve(credentialRef(reference)))?.value;
|
|
3101
|
-
});
|
|
2829
|
+
let skills = await projectSkillsForClaude(skillsRegistry, cwd, execution.scope ?? agent);
|
|
3102
2830
|
cancel.signal.throwIfAborted();
|
|
3103
|
-
projectionRoot = join5(runtime.configDir, "sessions",
|
|
3104
|
-
await
|
|
2831
|
+
projectionRoot = join5(runtime.configDir, "sessions", createHash2("sha256").update(agent.id).digest("hex"), "projection");
|
|
2832
|
+
await rm3(projectionRoot, { recursive: true, force: true }).catch(() => void 0);
|
|
3105
2833
|
await mkdir3(projectionRoot, { recursive: true, mode: 448 });
|
|
3106
|
-
|
|
3107
|
-
for (const skill of skills.skills) {
|
|
3108
|
-
const resource = skill.resourceBase;
|
|
3109
|
-
const hint = resource?.kind === "directory" ? `Resolve every relative skill resource path against this original base directory: ${resource.path}.` : resource?.kind === "url" ? `Resolve every relative skill resource URL against this original base URL: ${resource.url}.` : resource?.kind === "opaque" ? `Original skill resources: ${resource.description}` : "";
|
|
3110
|
-
const dir = join5(skillRoot, skill.name);
|
|
3111
|
-
await mkdir3(dir, { recursive: true, mode: 448 });
|
|
3112
|
-
await writeFile3(join5(dir, "SKILL.md"), `---
|
|
3113
|
-
name: ${skill.name}
|
|
3114
|
-
description: ${JSON.stringify(skill.description)}
|
|
3115
|
-
disable-model-invocation: ${!skill.invocation.modelInvocable}
|
|
3116
|
-
user-invocable: ${skill.invocation.userInvocable !== false}
|
|
3117
|
-
---
|
|
3118
|
-
${hint}
|
|
3119
|
-
|
|
3120
|
-
${skill.content}`, { mode: 384 });
|
|
3121
|
-
}
|
|
3122
|
-
const mcpPath = join5(projectionRoot, "mcp.json");
|
|
3123
|
-
const searchPath = Object.entries(process.env).find(([key]) => key.toUpperCase() === "PATH")?.[1];
|
|
3124
|
-
const { servers: mcpServers, skipped: launchSkipped } = await writeClaudeMcpLaunchers(mcp, {
|
|
3125
|
-
root: projectionRoot,
|
|
3126
|
-
executable: process.execPath,
|
|
3127
|
-
electron: Boolean(process.versions.electron),
|
|
3128
|
-
...searchPath ? { searchPath } : {}
|
|
3129
|
-
});
|
|
3130
|
-
await writeFile3(mcpPath, JSON.stringify({ mcpServers: Object.fromEntries(mcpServers.map(({ serverName, ...config }) => [serverName, config])) }), { mode: 384 });
|
|
2834
|
+
await writeClaudeSkills(projectionRoot, skills);
|
|
3131
2835
|
const pluginMeta = join5(projectionRoot, ".claude-plugin");
|
|
3132
2836
|
await mkdir3(pluginMeta, { mode: 448 });
|
|
3133
2837
|
await writeFile3(join5(pluginMeta, "plugin.json"), JSON.stringify({ name: "zerowall-session-skills", version: "0.1.0" }), { mode: 384 });
|
|
@@ -3144,7 +2848,7 @@ ${skill.content}`, { mode: 384 });
|
|
|
3144
2848
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: route2.model,
|
|
3145
2849
|
ANTHROPIC_DEFAULT_SONNET_MODEL: route2.model,
|
|
3146
2850
|
ANTHROPIC_DEFAULT_OPUS_MODEL: route2.model
|
|
3147
|
-
}, void 0,
|
|
2851
|
+
}, void 0, {}, configuredEnvironment);
|
|
3148
2852
|
const settingsEnvironment = claudeSettingsEnvironment(nativeSettings, route2.model, baseEnvironment);
|
|
3149
2853
|
const environment = settingsEnvironment.env;
|
|
3150
2854
|
const turn = {
|
|
@@ -3158,10 +2862,10 @@ ${skill.content}`, { mode: 384 });
|
|
|
3158
2862
|
renderer: nativeSettings.renderer ?? "plugin",
|
|
3159
2863
|
activity: [],
|
|
3160
2864
|
skills: skills.skills.length,
|
|
3161
|
-
mcp:
|
|
3162
|
-
skipped: [...settingsEnvironment.warnings.map((item) => `\u8BBE\u7F6E\uFF1A${item}`), ...skills.skipped.map((item) => `Skill ${item.name}: ${item.reason}`)
|
|
2865
|
+
mcp: 0,
|
|
2866
|
+
skipped: [...settingsEnvironment.warnings.map((item) => `\u8BBE\u7F6E\uFF1A${item}`), ...skills.skipped.map((item) => `Skill ${item.name}: ${item.reason}`)]
|
|
3163
2867
|
},
|
|
3164
|
-
safe: new ClaudeSafeOutput([route2.apiKey, ...Object.values(
|
|
2868
|
+
safe: new ClaudeSafeOutput([route2.apiKey, ...Object.values(configuredEnvironment)]),
|
|
3165
2869
|
cancel
|
|
3166
2870
|
};
|
|
3167
2871
|
owner.turn = turn;
|
|
@@ -3192,19 +2896,36 @@ ${skill.content}`, { mode: 384 });
|
|
|
3192
2896
|
await store.save(agent.id, binding);
|
|
3193
2897
|
} };
|
|
3194
2898
|
const bridgeAgent = execution.scope ?? agent;
|
|
2899
|
+
const skillRegistry = bridgeAgent.ctx.get("skills");
|
|
2900
|
+
if (!skillRegistry) throw new Error("The Skills registry is unavailable.");
|
|
2901
|
+
let skillCatalog = JSON.stringify((await skillsRegistry.snapshot({ cwd, scope: bridgeAgent })).skills);
|
|
3195
2902
|
const bridge = createHostToolBridge(
|
|
3196
2903
|
bridgeAgent,
|
|
3197
2904
|
schemas,
|
|
3198
2905
|
cancel.signal,
|
|
3199
2906
|
route2,
|
|
3200
2907
|
bridgeState,
|
|
3201
|
-
() => bridgeAgent.ctx.get("tools").schemas(bridgeAgent)
|
|
2908
|
+
() => bridgeAgent.ctx.get("tools").schemas(bridgeAgent),
|
|
2909
|
+
async () => {
|
|
2910
|
+
const current = await skillsRegistry.snapshot({ cwd, scope: bridgeAgent });
|
|
2911
|
+
if (!current.complete) throw new Error("The Skills catalog is incomplete.");
|
|
2912
|
+
if (JSON.stringify(current.skills) !== skillCatalog) {
|
|
2913
|
+
skills = await projectSkillsForClaude(skillsRegistry, cwd, bridgeAgent);
|
|
2914
|
+
await writeClaudeSkills(projectionRoot, skills);
|
|
2915
|
+
skillCatalog = JSON.stringify(current.skills);
|
|
2916
|
+
turn.view.skills = skills.skills.length;
|
|
2917
|
+
}
|
|
2918
|
+
const tools = bridgeAgent.ctx.get("tools").schemas(bridgeAgent);
|
|
2919
|
+
const runtime2 = await this.ctx.get("zerowallMcp")?.list() ?? [];
|
|
2920
|
+
const inventory = await skillRegistry.inventory({ cwd });
|
|
2921
|
+
const disabled2 = inventory.entries.filter((entry) => entry.effective && !entry.enabled).map((entry) => entry.skill.name);
|
|
2922
|
+
turn.view.resources = resourceStatus(skills, projects.listMcpServers(), tools, runtime2, disabled2);
|
|
2923
|
+
turn.view.mcp = turn.view.resources.filter((row2) => row2.kind === "mcp" && row2.state === "synced").length;
|
|
2924
|
+
}
|
|
3202
2925
|
);
|
|
3203
2926
|
if (bridgeState.drain) turn.drainBridge = bridgeState.drain;
|
|
3204
2927
|
const mcpService = this.ctx.get("zerowallMcp");
|
|
3205
2928
|
const mcpRuntime = await mcpService?.list().catch(() => []) ?? [];
|
|
3206
|
-
const skillRegistry = bridgeAgent.ctx.get("skills");
|
|
3207
|
-
if (!skillRegistry) throw new Error("The Skills registry is unavailable.");
|
|
3208
2929
|
const skillInventory = await skillRegistry.inventory({ cwd });
|
|
3209
2930
|
const disabled = skillInventory.entries.filter((entry) => entry.effective && !entry.enabled).map((entry) => entry.skill.name);
|
|
3210
2931
|
turn.view.resources = resourceStatus(skills, projects.listMcpServers(), schemas, mcpRuntime, disabled);
|
|
@@ -3232,7 +2953,7 @@ ${skill.content}`, { mode: 384 });
|
|
|
3232
2953
|
plugins: [{ type: "local", path: projectionRoot }],
|
|
3233
2954
|
...nativeSettings.outputStyle && nativeSettings.outputStyle !== "Default" ? { settings: { outputStyle: nativeSettings.outputStyle } } : {},
|
|
3234
2955
|
includePartialMessages: true,
|
|
3235
|
-
systemPrompt: sdkSystemPrompt(execution.request),
|
|
2956
|
+
systemPrompt: claudeHostText(sdkSystemPrompt(execution.request)) + "\n\nAll Host tools are bridged through server zerowall. For a Host tool NAME, call mcp__zerowall__NAME with its real schema. This includes external tools: mcp__zerowallrmcp__r_runtime becomes mcp__zerowall__mcp__zerowallrmcp__r_runtime. Use mcp__zerowall__capability_search for on-demand MCP connections, then RefreshMcpTools for server zerowall and ToolSearch if needed. Skills use the same Host registry and enablement settings; read them through the projected Skills plugin or the Host skill tools. Do not create a second direct MCP connection.",
|
|
3236
2957
|
mcpServers: { zerowall: bridge },
|
|
3237
2958
|
strictMcpConfig: true,
|
|
3238
2959
|
// Keep MCP tools out of the SDK's bare allowedTools auto-approval
|
|
@@ -3291,7 +3012,7 @@ ${skill.content}`, { mode: 384 });
|
|
|
3291
3012
|
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);
|
|
3292
3013
|
throw new Error("Claude Code \u65E0\u6CD5\u51C6\u5907\u5F53\u524D\u4F1A\u8BDD\uFF0C\u8BF7\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u4E0E\u8D44\u6E90\u72B6\u6001\u3002");
|
|
3293
3014
|
} finally {
|
|
3294
|
-
if (!processOwnsProjection && projectionRoot) await
|
|
3015
|
+
if (!processOwnsProjection && projectionRoot) await rm3(projectionRoot, { recursive: true, force: true }).catch(() => void 0);
|
|
3295
3016
|
if (!processOwnsProjection) release();
|
|
3296
3017
|
delete owner.preparing;
|
|
3297
3018
|
owner.busy = false;
|
|
@@ -3649,7 +3370,7 @@ ${skill.content}`, { mode: 384 });
|
|
|
3649
3370
|
activity: turn.view.activity ?? []
|
|
3650
3371
|
});
|
|
3651
3372
|
} finally {
|
|
3652
|
-
if (turn.projectionRoot) await
|
|
3373
|
+
if (turn.projectionRoot) await rm3(turn.projectionRoot, { recursive: true, force: true }).catch(() => void 0);
|
|
3653
3374
|
}
|
|
3654
3375
|
}
|
|
3655
3376
|
this.notifySessionAvailable(owner);
|
|
@@ -3772,7 +3493,7 @@ ${lines.join("\n")}
|
|
|
3772
3493
|
turn.binding.state = completed ? "idle" : turn.cancel.signal.aborted ? "stopped" : "failed";
|
|
3773
3494
|
await turn.bindingStore.save(agent.id, turn.binding).catch(() => void 0);
|
|
3774
3495
|
}
|
|
3775
|
-
if (turn.projectionRoot) await
|
|
3496
|
+
if (turn.projectionRoot) await rm3(turn.projectionRoot, { recursive: true, force: true }).catch(() => void 0);
|
|
3776
3497
|
const owner = this.owner(agent);
|
|
3777
3498
|
this.notifySessionAvailable(owner);
|
|
3778
3499
|
}
|
package/lib/typert.host.js
CHANGED
|
@@ -270,7 +270,7 @@ const _zerowall_dsh_claude_coderun_zerowallClaudeCode_read_result$schema = () =>
|
|
|
270
270
|
'resources': z.union([z.undefined(), z.array(z.object({
|
|
271
271
|
'kind': z.union([z.literal("skill"), z.literal("mcp")]),
|
|
272
272
|
'name': z.string(),
|
|
273
|
-
'state': z.union([z.literal("failed"), z.literal("manual"), z.literal("synced"), z.literal("disabled"), z.literal("unavailable")]),
|
|
273
|
+
'state': z.union([z.literal("failed"), z.literal("manual"), z.literal("synced"), z.literal("on-demand"), z.literal("disabled"), z.literal("unavailable")]),
|
|
274
274
|
'detail': z.union([z.undefined(), z.string()]).optional(),
|
|
275
275
|
}))]).optional(),
|
|
276
276
|
'diagnostic': z.union([z.undefined(), z.object({
|
|
@@ -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":
|
|
675
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1464,"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":
|
|
726
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1420,"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":
|
|
777
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1429,"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":
|
|
829
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1403,"column":9},
|
|
830
830
|
},
|
|
831
831
|
'zerowallClaudeCode/installCli': {
|
|
832
832
|
service: 'zerowallClaudeCode',
|
|
@@ -981,9 +981,9 @@ const $remote = createTypertRemoteInfo({
|
|
|
981
981
|
mode: 'strict',
|
|
982
982
|
typeSymbol: '@zerowall/dsh-claude-coderun#zerowallClaudeCode/read:result',
|
|
983
983
|
create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_read_result$schema,
|
|
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","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}]},
|
|
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":
|
|
986
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1437,"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":
|
|
1053
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1442,"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":
|
|
1295
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1456,"column":9},
|
|
1296
1296
|
},
|
|
1297
1297
|
'zerowallClaudeCode/uninstall': {
|
|
1298
1298
|
service: 'zerowallClaudeCode',
|
|
@@ -1603,7 +1603,7 @@ export const TYPERT = {
|
|
|
1603
1603
|
},
|
|
1604
1604
|
{
|
|
1605
1605
|
"name": "ClaudeResourceStatus",
|
|
1606
|
-
"declaration": "export interface ClaudeResourceStatus {\n kind: 'skill' | 'mcp';\n name: string;\n state: 'synced' | 'manual' | 'disabled' | 'unavailable' | 'failed';\n detail?: string;\n}"
|
|
1606
|
+
"declaration": "export interface ClaudeResourceStatus {\n kind: 'skill' | 'mcp';\n name: string;\n state: 'synced' | 'on-demand' | 'manual' | 'disabled' | 'unavailable' | 'failed';\n detail?: string;\n}"
|
|
1607
1607
|
},
|
|
1608
1608
|
{
|
|
1609
1609
|
"name": "ClaudeTranscript",
|
|
@@ -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":";;;;;;;;;;;
|
|
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":[]}
|
|
@@ -270,7 +270,7 @@ const _zerowall_dsh_claude_coderun_zerowallClaudeCode_read_result$schema = () =>
|
|
|
270
270
|
'resources': z.union([z.undefined(), z.array(z.object({
|
|
271
271
|
'kind': z.union([z.literal("skill"), z.literal("mcp")]),
|
|
272
272
|
'name': z.string(),
|
|
273
|
-
'state': z.union([z.literal("failed"), z.literal("manual"), z.literal("synced"), z.literal("disabled"), z.literal("unavailable")]),
|
|
273
|
+
'state': z.union([z.literal("failed"), z.literal("manual"), z.literal("synced"), z.literal("on-demand"), z.literal("disabled"), z.literal("unavailable")]),
|
|
274
274
|
'detail': z.union([z.undefined(), z.string()]).optional(),
|
|
275
275
|
}))]).optional(),
|
|
276
276
|
'diagnostic': z.union([z.undefined(), z.object({
|
|
@@ -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":
|
|
675
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1464,"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":
|
|
726
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1420,"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":
|
|
777
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1429,"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":
|
|
829
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1403,"column":9},
|
|
830
830
|
},
|
|
831
831
|
'zerowallClaudeCode/installCli': {
|
|
832
832
|
service: 'zerowallClaudeCode',
|
|
@@ -981,9 +981,9 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
981
981
|
mode: 'strict',
|
|
982
982
|
typeSymbol: '@zerowall/dsh-claude-coderun#zerowallClaudeCode/read:result',
|
|
983
983
|
create: _zerowall_dsh_claude_coderun_zerowallClaudeCode_read_result$schema,
|
|
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","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}]},
|
|
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":
|
|
986
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1437,"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":
|
|
1053
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1442,"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":
|
|
1295
|
+
sourceLocation: {"file":"packages/plugin/src/host/index.ts","line":1456,"column":9},
|
|
1296
1296
|
},
|
|
1297
1297
|
'zerowallClaudeCode/uninstall': {
|
|
1298
1298
|
service: 'zerowallClaudeCode',
|
|
@@ -12,7 +12,7 @@ export declare function createHostToolBridge(agent: Agent, schemas: readonly Too
|
|
|
12
12
|
concluded: boolean;
|
|
13
13
|
delivered?: (keys: string[]) => Promise<void>;
|
|
14
14
|
drain?: () => Promise<unknown>;
|
|
15
|
-
}, currentSchemas?: () => readonly ToolSchema[]): ReturnType<typeof createSdkMcpServer>;
|
|
15
|
+
}, currentSchemas?: () => readonly ToolSchema[], synchronizeResources?: () => Promise<void>): ReturnType<typeof createSdkMcpServer>;
|
|
16
16
|
/** Resumed turns also receive current DSH system-message updates. */
|
|
17
17
|
export declare function sdkSystemPrompt(request: GenerateOptions): string;
|
|
18
18
|
/** Keep an explicit output cap; never silently discard unsupported sampling controls. */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SkillProjectionResult } from './projection.js';
|
|
2
|
+
/** @param text - Host-authored skill or prompt text. @returns Tool references using Claude's Host bridge namespace. */
|
|
3
|
+
export declare function claudeHostText(text: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Replace only this session's projected skills. Resource directories use links on ordinary filesystems and copies inside ASAR.
|
|
6
|
+
* @param root - Private projection root owned by the active Claude session.
|
|
7
|
+
* @param projection - Enabled skill definitions from that session's Host registry.
|
|
8
|
+
*/
|
|
9
|
+
export declare function writeClaudeSkills(root: string, projection: SkillProjectionResult): Promise<void>;
|
|
@@ -214,7 +214,7 @@ export interface ClaudeCodeTurn {
|
|
|
214
214
|
export interface ClaudeResourceStatus {
|
|
215
215
|
kind: 'skill' | 'mcp';
|
|
216
216
|
name: string;
|
|
217
|
-
state: 'synced' | 'manual' | 'disabled' | 'unavailable' | 'failed';
|
|
217
|
+
state: 'synced' | 'on-demand' | 'manual' | 'disabled' | 'unavailable' | 'failed';
|
|
218
218
|
detail?: string;
|
|
219
219
|
}
|
|
220
220
|
export interface ClaudePermissionView {
|
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.6",
|
|
4
4
|
"description": "Run an isolated Claude Code CLI from ZeroWall conversations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -126,12 +126,12 @@
|
|
|
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.6",
|
|
130
|
+
"@zerowall/dsh-plugin-environment": "0.1.0-preview.6",
|
|
131
131
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
132
132
|
"react-dom": "^18.2.0",
|
|
133
133
|
"zod": "4.4.3",
|
|
134
|
-
"@zerowall/dsh-plugin-ai-cloud": "
|
|
134
|
+
"@zerowall/dsh-plugin-ai-cloud": "0.1.0-preview.11",
|
|
135
135
|
"@anthropic-ai/claude-agent-sdk": "0.3.263"
|
|
136
136
|
},
|
|
137
137
|
"peerDependencies": {
|