( toolkit: Toolkit.WithHandler<Tools> )
| 1067 | // When tool calls are not resolved, their parameters are left encoded so that |
| 1068 | // `Toolkit.handle` can decode them |
| 1069 | const withEncodedParameters = <Tools extends Record<string, Tool.Any>>( |
| 1070 | toolkit: Toolkit.WithHandler<Tools> |
| 1071 | ): Toolkit.Any => |
| 1072 | Toolkit.make( |
| 1073 | ...Object.values(toolkit.tools).map((tool) => ({ |
| 1074 | ...tool, |
| 1075 | parametersSchema: Schema.encodedSchema(tool.parametersSchema) as any |
| 1076 | })) |
| 1077 | ) |
| 1078 | |
| 1079 | const resolveToolkit = <Tools extends Record<string, Tool.Any>, E, R>( |
| 1080 | toolkit: Toolkit.WithHandler<Tools> | Effect.Effect<Toolkit.WithHandler<Tools>, E, R> |
no test coverage detected