MCPcopy
hub / github.com/codeaashu/claude-code / isUndercover

Function isUndercover

src/utils/undercover.ts:28–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26import { isEnvTruthy } from './envUtils.js'
27
28export function isUndercover(): boolean {
29 if (process.env.USER_TYPE === 'ant') {
30 if (isEnvTruthy(process.env.CLAUDE_CODE_UNDERCOVER)) return true
31 // Auto: active unless we've positively confirmed we're in an allowlisted
32 // internal repo. 'external', 'none', and null (check not yet run) all
33 // resolve to ON. The check is primed in setup.ts; only 'internal' → OFF.
34 return getRepoClassCached() !== 'internal'
35 }
36 return false
37}
38
39export function getUndercoverInstructions(): string {
40 if (process.env.USER_TYPE === 'ant') {

Callers 10

PromptInputFooterFunction · 0.85
getAttributionTextsFunction · 0.85
getEnhancedPRAttributionFunction · 0.85
getPromptContentFunction · 0.85
getPromptContentFunction · 0.85
computeEnvInfoFunction · 0.85
computeSimpleEnvInfoFunction · 0.85

Calls 2

isEnvTruthyFunction · 0.85
getRepoClassCachedFunction · 0.85

Tested by

no test coverage detected