(path: string)
| 76 | execute: (input, context) => { |
| 77 | const applied: Array<typeof Applied.Type> = [] |
| 78 | const fail = (path: string) => { |
| 79 | const prefix = |
| 80 | applied.length === 0 |
| 81 | ? `Unable to apply patch at ${path}` |
| 82 | : `Patch partially applied before failing at ${path}. Applied: ${applied.map((item) => item.resource).join(", ")}` |
| 83 | return new ToolFailure({ message: prefix }) |
| 84 | } |
| 85 | return Effect.gen(function* () { |
| 86 | const source = { |
| 87 | type: "tool" as const, |