| 169 | } |
| 170 | |
| 171 | function withMcpConfigSchema(schema: JsonSchema): JsonSchema { |
| 172 | return { |
| 173 | ...schema, |
| 174 | properties: { |
| 175 | ...schema.properties, |
| 176 | stateDir: { type: 'string', description: 'Agent-device state directory.' }, |
| 177 | mcpOutputFormat: { |
| 178 | type: 'string', |
| 179 | enum: ['optimized', 'json'], |
| 180 | description: |
| 181 | 'MCP text content format. Defaults to optimized agent-friendly text; use json for JSON text. Structured content is always returned separately.', |
| 182 | }, |
| 183 | includeCost: { |
| 184 | type: 'boolean', |
| 185 | description: |
| 186 | 'Include per-command agent-cost (cost.wallClockMs, …) in structuredContent. Defaults to off; the default response shape is unchanged.', |
| 187 | }, |
| 188 | responseLevel: { |
| 189 | type: 'string', |
| 190 | enum: ['digest', 'default', 'full'], |
| 191 | description: |
| 192 | 'Response verbosity: token-cheap digest / default (today) / full. Defaults to default; the default response shape is unchanged.', |
| 193 | }, |
| 194 | }, |
| 195 | }; |
| 196 | } |
| 197 | |
| 198 | function renderToolText(params: { |
| 199 | name: CommandName; |