import type { AgentResult, RunnerErrorEnvelope, SafetyTemplates, TaskInput } from '@cutie-crypto/connector-core'; import type { OpenClawAdapterConfig, PlatformAdapter, PlatformId, PlatformSetupResult } from './base'; export declare class OpenClawPlatform implements PlatformAdapter { readonly id: PlatformId; private readonly dir; private readonly configFile; private readonly cutieWorkspace; /** 由 ConnectorConnection wrapper 在 start 之前注入。窄字段类型(约束 2): * callAgent 用 gateway_url / gateway_secret / agent_model;augmentHeartbeat 当前不读 config */ private config; attachConfig(config: OpenClawAdapterConfig): void; callAgent(input: TaskInput): Promise; selfUpgrade(targetVersion: string): Promise; augmentHeartbeat(envelope: Record): Record; probeAgentHealth(): Promise; getCapabilities(): string[]; /** * W2.1 route precedence: * 1. input.agent_route(server 计算好的 `:` 路由名) * 2. input.model(旧 payload.agent_model 透传) * * 防御:agent_route 必须是 `openclaw:*` 格式才采用;其他平台前缀(hermes:/zylos:) * 显然不该路由到 OpenClaw gateway——记 warn 并 fallback 到 input.model。 */ private routeForOpenClaw; getDataDir(): string; isInstalled(): boolean; readGatewaySecret(): string | null; getDefaultGatewayPort(): number; getDefaultAgentModel(): string; getCutieWorkspaceDir(): string; applySafetyTemplates(templates: SafetyTemplates): void; addCutieAgent(agentModel: string): boolean; enableResponsesEndpoint(): boolean; configureSessionMaintenance(): boolean; getRestartCommand(): string; coerceAgentModel(serverModel: string | undefined, configModel: string): string; derivePersonalitySync(): { main_workspace: string; cutie_workspace: string; } | null; runPlatformSetup(ctx: { agentsMd?: string; soulMd?: string; agentModel: string; }): Promise; private readJson; private writeJson; private addAgentViaJson; private setAgentSkillsEmpty; private resolveBackingModel; private isOpenClawRouteModel; private getMainAgentModel; }