(input: BashToolInput)
| 522 | return `Running ${desc}`; |
| 523 | }, |
| 524 | async validateInput(input: BashToolInput): Promise<ValidationResult> { |
| 525 | if (feature('MONITOR_TOOL') && !isBackgroundTasksDisabled && !input.run_in_background) { |
| 526 | const sleepPattern = detectBlockedSleepPattern(input.command); |
| 527 | if (sleepPattern !== null) { |
| 528 | return { |
| 529 | result: false, |
| 530 | message: `Blocked: ${sleepPattern}. Run blocking commands in the background with run_in_background: true — you'll get a completion notification when done. For streaming events (watching logs, polling APIs), use the Monitor tool. If you genuinely need a delay (rate limiting, deliberate pacing), keep it under 2 seconds.`, |
| 531 | errorCode: 10 |
| 532 | }; |
| 533 | } |
| 534 | } |
| 535 | return { |
| 536 | result: true |
| 537 | }; |
| 538 | }, |
| 539 | async checkPermissions(input, context): Promise<PermissionResult> { |
| 540 | return bashToolHasPermission(input, context); |
| 541 | }, |
nothing calls this directly
no test coverage detected