UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

76 lines (75 loc) 2.28 kB
import { n as CLI_RESUME_WATCHDOG_DEFAULTS, t as CLI_FRESH_WATCHDOG_DEFAULTS } from "./cli-watchdog-defaults-CzmnkdzO.js"; import { a as CLAUDE_CLI_SESSION_ID_FIELDS, i as CLAUDE_CLI_MODEL_ALIASES, r as CLAUDE_CLI_DEFAULT_MODEL_REF, t as CLAUDE_CLI_BACKEND_ID } from "./cli-constants-DrUvDt2r.js"; import { a as normalizeClaudeBackendConfig, c as resolveClaudeCliExecutionArgs, t as CLAUDE_CLI_CLEAR_ENV } from "./cli-shared-DAX1Ew1m.js"; //#region extensions/anthropic/cli-backend.ts /** Build the Claude CLI backend plugin descriptor. */ function buildAnthropicCliBackend() { return { id: CLAUDE_CLI_BACKEND_ID, modelProvider: "anthropic", liveTest: { defaultModelRef: CLAUDE_CLI_DEFAULT_MODEL_REF, defaultImageProbe: true, defaultMcpProbe: true, docker: { npmPackage: "@anthropic-ai/claude-code", binaryName: "claude" } }, bundleMcp: true, bundleMcpMode: "claude-config-file", nativeToolMode: "always-on", ownsNativeCompaction: true, config: { command: "claude", args: [ "-p", "--output-format", "stream-json", "--include-partial-messages", "--verbose", "--setting-sources", "user", "--allowedTools", "mcp__openclaw__*" ], resumeArgs: [ "-p", "--output-format", "stream-json", "--include-partial-messages", "--verbose", "--setting-sources", "user", "--allowedTools", "mcp__openclaw__*", "--resume", "{sessionId}" ], output: "jsonl", liveSession: "claude-stdio", input: "stdin", modelArg: "--model", modelAliases: CLAUDE_CLI_MODEL_ALIASES, imageArg: "@", imagePathScope: "workspace", sessionArg: "--session-id", sessionMode: "always", reseedFromRawTranscriptWhenUncompacted: true, sessionIdFields: [...CLAUDE_CLI_SESSION_ID_FIELDS], systemPromptFileArg: "--append-system-prompt-file", systemPromptMode: "append", systemPromptWhen: "always", clearEnv: [...CLAUDE_CLI_CLEAR_ENV], reliability: { watchdog: { fresh: { ...CLI_FRESH_WATCHDOG_DEFAULTS }, resume: { ...CLI_RESUME_WATCHDOG_DEFAULTS } } }, serialize: true }, normalizeConfig: normalizeClaudeBackendConfig, resolveExecutionArgs: resolveClaudeCliExecutionArgs }; } //#endregion export { buildAnthropicCliBackend as t };