( name: string, input: ToolDict, meta: ToolDict, patterns: string[], )
| 1339 | } |
| 1340 | |
| 1341 | export function toolPermissionInfo( |
| 1342 | name: string, |
| 1343 | input: ToolDict, |
| 1344 | meta: ToolDict, |
| 1345 | patterns: string[], |
| 1346 | ): ToolPermissionInfo | undefined { |
| 1347 | const draw = rule(name)?.permission |
| 1348 | if (!draw) { |
| 1349 | return undefined |
| 1350 | } |
| 1351 | |
| 1352 | try { |
| 1353 | return draw(permission({ input, meta, patterns })) |
| 1354 | } catch { |
| 1355 | return undefined |
| 1356 | } |
| 1357 | } |
| 1358 | |
| 1359 | export function toolSnapshot(commit: StreamCommit, raw: string): ToolSnapshot | undefined { |
| 1360 | const ctx = toolFrame(commit, raw) |
no test coverage detected