( schema: StaticToolDecl["inputSchema"] | StaticToolDecl["outputSchema"], side: StandardJsonSchemaSide, )
| 1284 | }; |
| 1285 | |
| 1286 | const staticToolSchemaRoot = ( |
| 1287 | schema: StaticToolDecl["inputSchema"] | StaticToolDecl["outputSchema"], |
| 1288 | side: StandardJsonSchemaSide, |
| 1289 | ): unknown | undefined => { |
| 1290 | if (!schema) return undefined; |
| 1291 | const standard = isReadonlyRecord(schema) ? schema["~standard"] : undefined; |
| 1292 | if (!isReadonlyRecord(standard)) return schema; |
| 1293 | const jsonSchema = standard["jsonSchema"]; |
| 1294 | if (!isReadonlyRecord(jsonSchema)) return schema; |
| 1295 | const materialize = (jsonSchema as StandardJsonSchemaFns)[side]; |
| 1296 | return typeof materialize === "function" ? materialize({ target: "draft-07" }) : jsonSchema; |
| 1297 | }; |
| 1298 | |
| 1299 | export const createExecutor = <const TPlugins extends readonly AnyPlugin[] = readonly []>( |
| 1300 | config: ExecutorConfig<TPlugins>, |
no test coverage detected