MCPcopy
hub / github.com/KeygraphHQ/shannon / isSpendingCapBehavior

Function isSpendingCapBehavior

apps/worker/src/utils/billing-detection.ts:83–90  ·  view source on GitHub ↗
(turns: number, cost: number, resultText: string)

Source from the content-addressed store, hash-verified

81 * @returns true if this looks like a spending cap hit
82 */
83export function isSpendingCapBehavior(turns: number, cost: number, resultText: string): boolean {
84 // Only check if turns <= 2 AND cost is exactly 0
85 if (turns > 2 || cost !== 0) {
86 return false;
87 }
88
89 return matchesBillingTextPattern(resultText);
90}

Callers 2

runClaudePromptFunction · 0.85
executeMethod · 0.85

Calls 1

Tested by

no test coverage detected