(schema: unknown)
| 154 | }; |
| 155 | |
| 156 | function getObjectShape(schema: unknown): Record<string, AnySchema> | null { |
| 157 | if (!schema || typeof schema !== 'object') { |
| 158 | return null; |
| 159 | } |
| 160 | |
| 161 | const objectSchema = schema as ZodObjectLike; |
| 162 | const shape = objectSchema.shape ?? objectSchema._def?.shape; |
| 163 | if (!shape) { |
| 164 | return null; |
| 165 | } |
| 166 | |
| 167 | return typeof shape === 'function' ? shape() : shape; |
| 168 | } |
| 169 | |
| 170 | /** |
| 171 | * Get the Zod raw shape for the action inputs only (inputs exposed to the agent). |
no outgoing calls
no test coverage detected