(value: unknown)
| 81 | }; |
| 82 | |
| 83 | const toolData = <T>(value: unknown): T => { |
| 84 | const result = value as { readonly ok?: boolean; readonly data?: T; readonly error?: unknown }; |
| 85 | assert(result.ok === true, `Tool returned failure: ${JSON.stringify(value)}`); |
| 86 | return result.data as T; |
| 87 | }; |
| 88 | |
| 89 | const extractExecutionId = (text: string): string => { |
| 90 | const match = /executionId:\s*(exec_[A-Za-z0-9_]+)/.exec(text); |
no test coverage detected