fix: remove internal Anthropic tooling from external build (#345)
Remove debug systems, employee detection, and internal logging that have no function in a community fork. Changes: - Remove logPermissionContextForAnts import and calls (main.tsx, compact.ts) Reads Kubernetes namespace and container IDs from internal infra paths. Dead code for all external users. - Remove createDumpPromptsFetch import and gate (query.ts) Internal prompt dump system for employee debugging. Replace gate with unconditional undefined — normal fetch always used. - Remove stripSignatureBlocks ant-only block (query.ts) Was behind USER_TYPE === 'ant' guard, never ran for external users. - Hardcode isAnt: false (query/config.ts) Employee detection flag has no place in a community fork. config.gates.isAnt had exactly one consumer (dumpPromptsFetch, now removed). - Gut logClassifierResultForAnts body (bashPermissions.ts) Replace with empty no-op. Still called from 4 sites, zero execution. Remove ANT-ONLY comments describing internal security model. - Gate status.anthropic.com behind firstParty check (errors.ts) 429 error hint now only shown when using Anthropic directly. Third-party provider users see a generic capacity message. Build: passes Typecheck: clean (no new errors) Tests: 196 pass, same 6 pre-existing failures unrelated to these changes
This commit is contained in:
@@ -36,7 +36,7 @@ export function buildQueryConfig(): QueryConfig {
|
||||
emitToolUseSummaries: isEnvTruthy(
|
||||
process.env.CLAUDE_CODE_EMIT_TOOL_USE_SUMMARIES,
|
||||
),
|
||||
isAnt: process.env.USER_TYPE === 'ant',
|
||||
isAnt: false,
|
||||
// Inlined from fastMode.ts to avoid pulling its heavy module graph
|
||||
// (axios, settings, auth, model, oauth, config) into test shards that
|
||||
// didn't previously load it — changes init order and breaks unrelated tests.
|
||||
|
||||
Reference in New Issue
Block a user