* Get the trust level for a tool. * Returns: 'ok' | 'warn' | 'drop'
(toolName)
| 55 | * Returns: 'ok' | 'warn' | 'drop' |
| 56 | */ |
| 57 | level(toolName) { |
| 58 | if (this.disabled || !this.scores.has(toolName)) return 'ok'; |
| 59 | const s = this.scores.get(toolName); |
| 60 | if (s.consecutiveFails >= this.dropThreshold) return 'drop'; |
| 61 | if (s.consecutiveFails >= this.warnThreshold) return 'warn'; |
| 62 | return 'ok'; |
| 63 | } |
| 64 | |
| 65 | /** Returns true if this tool should be excluded from the schema list. */ |
| 66 | isDrop(toolName) { return this.level(toolName) === 'drop'; } |
no test coverage detected