(ctx: ToolPermissionCtx)
| 145 | } |
| 146 | |
| 147 | function permission<T = Tool.Info>(ctx: ToolPermissionCtx): ToolPermissionProps<T> { |
| 148 | return { |
| 149 | input: Object.assign(Object.create(null), ctx.input), |
| 150 | metadata: Object.assign(Object.create(null), ctx.meta), |
| 151 | patterns: ctx.patterns, |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | function text(v: unknown): string { |
| 156 | return typeof v === "string" ? v : "" |
no test coverage detected