(argv: Record<string, unknown>)
| 38 | * Convert CLI argv keys (kebab-case) back to tool param keys (camelCase). |
| 39 | */ |
| 40 | export function convertArgvToToolParams(argv: Record<string, unknown>): Record<string, unknown> { |
| 41 | const result: Record<string, unknown> = {}; |
| 42 | for (const [key, value] of Object.entries(argv)) { |
| 43 | // Skip yargs internal keys |
| 44 | if (key === '_' || key === '$0') continue; |
| 45 | // Convert kebab-case to camelCase |
| 46 | const camelKey = toCamelCase(key); |
| 47 | result[camelKey] = value; |
| 48 | } |
| 49 | return result; |
| 50 | } |
no test coverage detected