MCPcopy
hub / github.com/Doorman11991/smallcode / level

Method level

src/tools/trust_decay.js:57–63  ·  view source on GitHub ↗

* Get the trust level for a tool. * Returns: 'ok' | 'warn' | 'drop'

(toolName)

Source from the content-addressed store, hash-verified

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'; }

Callers 3

isDropMethod · 0.95
isWarnMethod · 0.95
filterAndSortMethod · 0.95

Calls 2

getMethod · 0.65
hasMethod · 0.45

Tested by

no test coverage detected