(input: unknown)
| 108 | } |
| 109 | |
| 110 | function readMcpToolConfig(input: unknown): McpToolConfig { |
| 111 | if (!input || typeof input !== 'object' || Array.isArray(input)) { |
| 112 | return { client: {}, outputFormat: 'optimized' }; |
| 113 | } |
| 114 | const record = input as Record<string, unknown>; |
| 115 | return { |
| 116 | client: readClientConfig(record), |
| 117 | outputFormat: readMcpOutputFormat(record.mcpOutputFormat), |
| 118 | }; |
| 119 | } |
| 120 | |
| 121 | function readClientConfig(record: Record<string, unknown>): AgentDeviceClientConfig { |
| 122 | const stateDir = record.stateDir; |
no test coverage detected