(s: string)
| 310 | * `~/.fieldtheory/library/log.md` forever. |
| 311 | */ |
| 312 | export function redactSecrets(s: string): string { |
| 313 | return s |
| 314 | .replace(/\bsk-[A-Za-z0-9_-]{16,}/g, 'sk-***REDACTED***') |
| 315 | .replace(/\b(ghp|gho|ghu|ghs|ghr)_[A-Za-z0-9]{16,}/g, '$1_***REDACTED***') |
| 316 | .replace(/\bBearer\s+[A-Za-z0-9._-]{16,}/gi, 'Bearer ***REDACTED***'); |
| 317 | } |
| 318 | |
| 319 | /** Build a user-facing failure message. Deliberately does NOT inline the |
| 320 | * prompt — see EngineInvocationError for why. */ |
no outgoing calls
no test coverage detected