(output: unknown)
| 43 | * `user_table` returns `{ data, message, success }` which is left alone. |
| 44 | */ |
| 45 | export function unwrapFunctionExecuteOutput(output: unknown): unknown { |
| 46 | if (!output || typeof output !== 'object' || Array.isArray(output)) return output |
| 47 | const obj = output as Record<string, unknown> |
| 48 | if ('result' in obj && 'stdout' in obj) { |
| 49 | return obj.result |
| 50 | } |
| 51 | return output |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Try to pull a flat array of row-objects out of an already-unwrapped tool |
no outgoing calls
no test coverage detected