Reduce internal-only labeling noise in source comments (#355)

This pass rewrites comment-only ANT-ONLY markers to neutral internal-only
language across the source tree without changing runtime strings, flags,
commands, or protocol identifiers. The goal is to lower obvious internal
prose leakage while keeping the diff mechanically safe and easy to review.

Constraint: Phase B is limited to comments/prose only; runtime strings and user-facing labels remain deferred
Rejected: Broad search-and-replace across strings and command descriptions | too risky for a prose-only pass
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Remaining ANT-ONLY hits are mostly runtime/user-facing strings and should be handled separately from comment cleanup
Tested: bun run build
Tested: bun run smoke
Tested: bun run verify:privacy
Tested: bun run test:provider
Tested: bun run test:provider-recommendation
Not-tested: Full repo typecheck (upstream baseline remains noisy)

Co-authored-by: anandh8x <test@example.com>
This commit is contained in:
Anandan
2026-04-04 23:26:14 +05:30
committed by GitHub
parent 9e84d2fddc
commit 2f162af60c
96 changed files with 160 additions and 160 deletions

View File

@@ -112,7 +112,7 @@ type State = {
agentColorIndex: number agentColorIndex: number
// Last API request for bug reports // Last API request for bug reports
lastAPIRequest: Omit<BetaMessageStreamParams, 'messages'> | null lastAPIRequest: Omit<BetaMessageStreamParams, 'messages'> | null
// Messages from the last API request (ant-only; reference, not clone). // Messages from the last API request (internal-only; reference, not clone).
// Captures the exact post-compaction, CLAUDE.md-injected message set sent // Captures the exact post-compaction, CLAUDE.md-injected message set sent
// to the API so /share's serialized_conversation.json reflects reality. // to the API so /share's serialized_conversation.json reflects reality.
lastAPIRequestMessages: BetaMessageStreamParams['messages'] | null lastAPIRequestMessages: BetaMessageStreamParams['messages'] | null
@@ -185,7 +185,7 @@ type State = {
agentId: string | null agentId: string | null
} }
> >
// Track slow operations for dev bar display (ant-only) // Track slow operations for dev bar display (internal-only)
slowOperations: Array<{ slowOperations: Array<{
operation: string operation: string
durationMs: number durationMs: number

View File

@@ -1,11 +1,11 @@
/** /**
* Shared bridge auth/URL resolution. Consolidates the ant-only * Shared bridge auth/URL resolution. Consolidates the internal-only
* CLAUDE_BRIDGE_* dev overrides that were previously copy-pasted across * CLAUDE_BRIDGE_* dev overrides that were previously copy-pasted across
* a dozen files — inboundAttachments, BriefTool/upload, bridgeMain, * a dozen files — inboundAttachments, BriefTool/upload, bridgeMain,
* initReplBridge, remoteBridgeCore, daemon workers, /rename, * initReplBridge, remoteBridgeCore, daemon workers, /rename,
* /remote-control. * /remote-control.
* *
* Two layers: *Override() returns the ant-only env var (or undefined); * Two layers: *Override() returns the internal-only env var (or undefined);
* the non-Override versions fall through to the real OAuth store/config. * the non-Override versions fall through to the real OAuth store/config.
* Callers that compose with a different auth source (e.g. daemon workers * Callers that compose with a different auth source (e.g. daemon workers
* using IPC auth) use the Override getters directly. * using IPC auth) use the Override getters directly.

View File

@@ -174,7 +174,7 @@ export function checkBridgeMinVersion(): string | null {
/** /**
* Default for remoteControlAtStartup when the user hasn't explicitly set it. * Default for remoteControlAtStartup when the user hasn't explicitly set it.
* When the CCR_AUTO_CONNECT build flag is present (ant-only) and the * When the CCR_AUTO_CONNECT build flag is present (internal-only) and the
* tengu_cobalt_harbor GrowthBook gate is on, all sessions connect to CCR by * tengu_cobalt_harbor GrowthBook gate is on, all sessions connect to CCR by
* default — the user can still opt out by setting remoteControlAtStartup=false * default — the user can still opt out by setting remoteControlAtStartup=false
* in config (explicit settings always win over this default). * in config (explicit settings always win over this default).

View File

@@ -1520,7 +1520,7 @@ export async function runBridgeLoop(
// Skip when the loop exited fatally (env expired, auth failed, give-up) — // Skip when the loop exited fatally (env expired, auth failed, give-up) —
// resume is impossible in those cases and the message would contradict the // resume is impossible in those cases and the message would contradict the
// error already printed. // error already printed.
// feature('KAIROS') gate: --session-id is ant-only; without the gate, // feature('KAIROS') gate: --session-id is internal-only; without the gate,
// revert to the pre-PR behavior (archive + deregister on every shutdown). // revert to the pre-PR behavior (archive + deregister on every shutdown).
if ( if (
feature('KAIROS') && feature('KAIROS') &&
@@ -1888,7 +1888,7 @@ export function parseArgs(args: string[]): ParsedArgs {
async function printHelp(): Promise<void> { async function printHelp(): Promise<void> {
// Use EXTERNAL_PERMISSION_MODES for help text — internal modes (bubble) // Use EXTERNAL_PERMISSION_MODES for help text — internal modes (bubble)
// are ant-only and auto is feature-gated; they're still accepted by validation. // are internal-only and auto is feature-gated; they're still accepted by validation.
const { EXTERNAL_PERMISSION_MODES } = await import('../types/permissions.js') const { EXTERNAL_PERMISSION_MODES } = await import('../types/permissions.js')
const modes = EXTERNAL_PERMISSION_MODES.join(', ') const modes = EXTERNAL_PERMISSION_MODES.join(', ')
const showServer = await isMultiSessionSpawnEnabled() const showServer = await isMultiSessionSpawnEnabled()
@@ -2356,7 +2356,7 @@ export async function bridgeMain(args: string[]): Promise<void> {
// environment_id and reuse that for registration (idempotent on the // environment_id and reuse that for registration (idempotent on the
// backend). Left undefined otherwise — the backend rejects // backend). Left undefined otherwise — the backend rejects
// client-generated UUIDs and will allocate a fresh environment. // client-generated UUIDs and will allocate a fresh environment.
// feature('KAIROS') gate: --session-id is ant-only; parseArgs already // feature('KAIROS') gate: --session-id is internal-only; parseArgs already
// rejects the flag when the gate is off, so resumeSessionId is always // rejects the flag when the gate is off, so resumeSessionId is always
// undefined here in external builds — this guard is for tree-shaking. // undefined here in external builds — this guard is for tree-shaking.
let reuseEnvironmentId: string | undefined let reuseEnvironmentId: string | undefined

View File

@@ -161,7 +161,7 @@ export async function initReplBridge(
return null return null
} }
// When CLAUDE_BRIDGE_OAUTH_TOKEN is set (ant-only local dev), the bridge // When CLAUDE_BRIDGE_OAUTH_TOKEN is set (internal-only local dev), the bridge
// uses that token directly via getBridgeAccessToken() — keychain state is // uses that token directly via getBridgeAccessToken() — keychain state is
// irrelevant. Skip 2b/2c to preserve that decoupling: an expired keychain // irrelevant. Skip 2b/2c to preserve that decoupling: an expired keychain
// token shouldn't block a bridge connection that doesn't use it. // token shouldn't block a bridge connection that doesn't use it.

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
/** /**
* Env-less Remote Control bridge core. * Env-less Remote Control bridge core.
* *

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { randomUUID } from 'crypto' import { randomUUID } from 'crypto'
import { import {
createBridgeApiClient, createBridgeApiClient,

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { feature } from 'bun:bundle' import { feature } from 'bun:bundle'
import { readFile, stat } from 'fs/promises' import { readFile, stat } from 'fs/promises'
import { dirname } from 'path' import { dirname } from 'path'
@@ -2829,7 +2829,7 @@ function runHeadlessStreaming(
if (message.type === 'control_request') { if (message.type === 'control_request') {
if (message.request.subtype === 'interrupt') { if (message.request.subtype === 'interrupt') {
// Track escapes for attribution (ant-only feature) // Track escapes for attribution (internal-only feature)
if (feature('COMMIT_ATTRIBUTION')) { if (feature('COMMIT_ATTRIBUTION')) {
setAppState(prev => ({ setAppState(prev => ({
...prev, ...prev,
@@ -3765,7 +3765,7 @@ function runHeadlessStreaming(
...getSettingsWithSources(), ...getSettingsWithSources(),
applied: { applied: {
model, model,
// Numeric effort (ant-only) → null; SDK schema is string-level only. // Numeric effort (internal-only) → null; SDK schema is string-level only.
effort: typeof effort === 'string' ? effort : null, effort: typeof effort === 'string' ? effort : null,
}, },
}) })
@@ -5025,7 +5025,7 @@ async function loadInitialMessages(
} }
// Handle resume in print mode (accepts session ID or URL) // Handle resume in print mode (accepts session ID or URL)
// URLs are [ANT-ONLY] // URLs are [internal-only]
if (options.resume) { if (options.resume) {
try { try {
logEvent('tengu_resume_print', {}) logEvent('tengu_resume_print', {})

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import addDir from './commands/add-dir/index.js' import addDir from './commands/add-dir/index.js'
import autofixPr from './commands/autofix-pr/index.js' import autofixPr from './commands/autofix-pr/index.js'
import backfillSessions from './commands/backfill-sessions/index.js' import backfillSessions from './commands/backfill-sessions/index.js'

View File

@@ -199,7 +199,7 @@ function formatContextAsMarkdownTable(data: ContextData): string {
output += `\n` output += `\n`
} }
// System tools (ant-only) // System tools (internal-only)
if ( if (
systemTools && systemTools &&
systemTools.length > 0 && systemTools.length > 0 &&
@@ -214,7 +214,7 @@ function formatContextAsMarkdownTable(data: ContextData): string {
output += `\n` output += `\n`
} }
// System prompt sections (ant-only) // System prompt sections (internal-only)
if ( if (
systemPromptSections && systemPromptSections &&
systemPromptSections.length > 0 && systemPromptSections.length > 0 &&
@@ -288,7 +288,7 @@ function formatContextAsMarkdownTable(data: ContextData): string {
output += `\n` output += `\n`
} }
// Message breakdown (ant-only) // Message breakdown (internal-only)
if (messageBreakdown && process.env.USER_TYPE === 'ant') { if (messageBreakdown && process.env.USER_TYPE === 'ant') {
output += `### [ANT-ONLY] Message Breakdown\n\n` output += `### [ANT-ONLY] Message Breakdown\n\n`
output += `| Category | Tokens |\n` output += `| Category | Tokens |\n`

View File

@@ -2187,7 +2187,7 @@ function generateHtmlReport(
` `
: '' : ''
// Build Team Feedback section (collapsible, ant-only) // Build Team Feedback section (collapsible, internal-only)
const ccImprovements = const ccImprovements =
process.env.USER_TYPE === 'ant' process.env.USER_TYPE === 'ant'
? insights.cc_team_improvements?.improvements || [] ? insights.cc_team_improvements?.improvements || []
@@ -2804,7 +2804,7 @@ export async function generateUsageReport(options?: {
}> { }> {
let remoteStats: { hosts: RemoteHostInfo[]; totalCopied: number } | undefined let remoteStats: { hosts: RemoteHostInfo[]; totalCopied: number } | undefined
// Optionally collect data from remote hosts first (ant-only) // Optionally collect data from remote hosts first (internal-only)
if (process.env.USER_TYPE === 'ant' && options?.collectRemote) { if (process.env.USER_TYPE === 'ant' && options?.collectRemote) {
const destDir = join(getClaudeConfigHomeDir(), 'projects') const destDir = join(getClaudeConfigHomeDir(), 'projects')
const { hosts, totalCopied } = await collectAllRemoteHostData(destDir) const { hosts, totalCopied } = await collectAllRemoteHostData(destDir)
@@ -3085,7 +3085,7 @@ const usageReport: Command = {
`${data.git_commits} commits`, `${data.git_commits} commits`,
].join(' · ') ].join(' · ')
// Build remote host info (ant-only) // Build remote host info (internal-only)
let remoteInfo = '' let remoteInfo = ''
if (process.env.USER_TYPE === 'ant') { if (process.env.USER_TYPE === 'ant') {
if (remoteStats && remoteStats.totalCopied > 0) { if (remoteStats && remoteStats.totalCopied > 0) {

View File

@@ -118,7 +118,7 @@ export async function setupTerminal(theme: ThemeName): Promise<string> {
}); });
maybeMarkProjectOnboardingComplete(); maybeMarkProjectOnboardingComplete();
// Install shell completions (ant-only, since the completion command is ant-only) // Install shell completions (internal-only, since the completion command is internal-only)
if ("external" === 'ant') { if ("external" === 'ant') {
result += await setupShellCompletion(theme); result += await setupShellCompletion(theme);
} }

View File

@@ -52,7 +52,7 @@ const DEFAULT_INSTRUCTIONS: string = (typeof _rawPrompt === 'string' ? _rawPromp
// so the override path is DCE'd from external builds). // so the override path is DCE'd from external builds).
// Shell-set env only, so top-level process.env read is fine // Shell-set env only, so top-level process.env read is fine
// — settings.env never injects this. // — settings.env never injects this.
/* eslint-disable custom-rules/no-process-env-top-level, custom-rules/no-sync-fs -- ant-only dev override; eager top-level read is the point (crash at startup, not silently inside the slash-command try/catch) */ /* eslint-disable custom-rules/no-process-env-top-level, custom-rules/no-sync-fs -- internal-only dev override; eager top-level read is the point (crash at startup, not silently inside the slash-command try/catch) */
const ULTRAPLAN_INSTRUCTIONS: string = "external" === 'ant' && process.env.ULTRAPLAN_PROMPT_FILE ? readFileSync(process.env.ULTRAPLAN_PROMPT_FILE, 'utf8').trimEnd() : DEFAULT_INSTRUCTIONS; const ULTRAPLAN_INSTRUCTIONS: string = "external" === 'ant' && process.env.ULTRAPLAN_PROMPT_FILE ? readFileSync(process.env.ULTRAPLAN_PROMPT_FILE, 'utf8').trimEnd() : DEFAULT_INSTRUCTIONS;
/* eslint-enable custom-rules/no-process-env-top-level, custom-rules/no-sync-fs */ /* eslint-enable custom-rules/no-process-env-top-level, custom-rules/no-sync-fs */

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime"; import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import * as React from 'react'; import * as React from 'react';
import { Box, Text, color } from '../../ink.js'; import { Box, Text, color } from '../../ink.js';
import { useTerminalSize } from '../../hooks/useTerminalSize.js'; import { useTerminalSize } from '../../hooks/useTerminalSize.js';

View File

@@ -1,5 +1,5 @@
/** /**
* ANT-ONLY: Banner shown in the transcript that prompts users to report * internal-only: Banner shown in the transcript that prompts users to report
* issues via /issue. Appears when friction is detected in the conversation. * issues via /issue. Appears when friction is detected in the conversation.
*/ */
export function IssueFlagBanner() { export function IssueFlagBanner() {

View File

@@ -293,7 +293,7 @@ function PromptInput({
// the pill returns null for implicit-and-not-reconnecting, so nav must too, // the pill returns null for implicit-and-not-reconnecting, so nav must too,
// otherwise bridge becomes an invisible selection stop. // otherwise bridge becomes an invisible selection stop.
const bridgeFooterVisible = replBridgeConnected && (replBridgeExplicit || replBridgeReconnecting); const bridgeFooterVisible = replBridgeConnected && (replBridgeExplicit || replBridgeReconnecting);
// Tmux pill (ant-only) — visible when there's an active tungsten session // Tmux pill (internal-only) — visible when there's an active tungsten session
const hasTungstenSession = useAppState(s => "external" === 'ant' && s.tungstenActiveSession !== undefined); const hasTungstenSession = useAppState(s => "external" === 'ant' && s.tungstenActiveSession !== undefined);
const tmuxFooterVisible = "external" === 'ant' && hasTungstenSession; const tmuxFooterVisible = "external" === 'ant' && hasTungstenSession;
// WebBrowser pill — visible when a browser is open // WebBrowser pill — visible when a browser is open
@@ -2153,7 +2153,7 @@ function PromptInput({
}} onCancel={() => setShowHistoryPicker(false)} />; }} onCancel={() => setShowHistoryPicker(false)} />;
} }
// Show loop mode menu when requested (ant-only, eliminated from external builds) // Show loop mode menu when requested (internal-only, eliminated from external builds)
if (modelPickerElement) { if (modelPickerElement) {
return modelPickerElement; return modelPickerElement;
} }

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime"; import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { feature } from 'bun:bundle'; import { feature } from 'bun:bundle';
// Dead code elimination: conditional import for COORDINATOR_MODE // Dead code elimination: conditional import for COORDINATOR_MODE
/* eslint-disable @typescript-eslint/no-require-imports */ /* eslint-disable @typescript-eslint/no-require-imports */
@@ -364,7 +364,7 @@ function ModeIndicator({
// BackgroundTaskStatus is NOT in parts — it renders as a Box sibling so // BackgroundTaskStatus is NOT in parts — it renders as a Box sibling so
// its click-target Box isn't nested inside the <Text wrap="truncate"> // its click-target Box isn't nested inside the <Text wrap="truncate">
// wrapper (reconciler throws on Box-in-Text). // wrapper (reconciler throws on Box-in-Text).
// Tmux pill (ant-only) — appears right after tasks in nav order // Tmux pill (internal-only) — appears right after tasks in nav order
...("external" === 'ant' && hasTmuxSession ? [<TungstenPill key="tmux" selected={tmuxSelected} />] : []), ...(isAgentSwarmsEnabled() && hasTeams ? [<TeamStatus key="teams" teamsSelected={teamsSelected} showHint={showHint && !hasBackgroundTasks} />] : []), ...(shouldShowPrStatus ? [<PrBadge key="pr-status" number={prStatus.number!} url={prStatus.url!} reviewState={prStatus.reviewState!} />] : [])]; ...("external" === 'ant' && hasTmuxSession ? [<TungstenPill key="tmux" selected={tmuxSelected} />] : []), ...(isAgentSwarmsEnabled() && hasTeams ? [<TeamStatus key="teams" teamsSelected={teamsSelected} showHint={showHint && !hasBackgroundTasks} />] : []), ...(shouldShowPrStatus ? [<PrBadge key="pr-status" number={prStatus.number!} url={prStatus.url!} reviewState={prStatus.reviewState!} />] : [])];
// Check if any in-process teammates exist (for hint text cycling) // Check if any in-process teammates exist (for hint text cycling)

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime"; import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { feature } from 'bun:bundle'; import { feature } from 'bun:bundle';
import { Box, Text, useTheme, useThemeSetting, useTerminalFocus } from '../../ink.js'; import { Box, Text, useTheme, useThemeSetting, useTerminalFocus } from '../../ink.js';
import type { KeyboardEvent } from '../../ink/events/keyboard-event.js'; import type { KeyboardEvent } from '../../ink/events/keyboard-event.js';
@@ -342,7 +342,7 @@ export function Config({
}); });
} }
}, },
// Fast mode toggle (ant-only, eliminated from external builds) // Fast mode toggle (internal-only, eliminated from external builds)
...(isFastModeEnabled() && isFastModeAvailable() ? [{ ...(isFastModeEnabled() && isFastModeAvailable() ? [{
id: 'fastMode', id: 'fastMode',
label: `Fast mode (${FAST_MODE_MODEL_DISPLAY} only)`, label: `Fast mode (${FAST_MODE_MODEL_DISPLAY} only)`,
@@ -391,7 +391,7 @@ export function Config({
}); });
} }
}] : []), }] : []),
// Speculation toggle (ant-only) // Speculation toggle (internal-only)
...("external" === 'ant' ? [{ ...("external" === 'ant' ? [{
id: 'speculationEnabled', id: 'speculationEnabled',
label: 'Speculative execution', label: 'Speculative execution',

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime"; import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import * as React from 'react'; import * as React from 'react';
import { Suspense, useState } from 'react'; import { Suspense, useState } from 'react';
import { useKeybinding } from '../../keybindings/useKeybinding.js'; import { useKeybinding } from '../../keybindings/useKeybinding.js';

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime"; import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { Box, Text } from '../ink.js'; import { Box, Text } from '../ink.js';
import * as React from 'react'; import * as React from 'react';
import { useEffect, useMemo, useRef, useState } from 'react'; import { useEffect, useMemo, useRef, useState } from 'react';
@@ -258,7 +258,7 @@ function SpinnerWithVerbInner({
const showBtwTip = tipsEnabled && elapsedSnapshot > 30_000 && !getGlobalConfig().btwUseCount; const showBtwTip = tipsEnabled && elapsedSnapshot > 30_000 && !getGlobalConfig().btwUseCount;
const effectiveTip = contextTipsActive ? undefined : showClearTip && !nextTask ? 'Use /clear to start fresh when switching topics and free up context' : showBtwTip && !nextTask ? "Use /btw to ask a quick side question without interrupting Claude's current work" : spinnerTip; const effectiveTip = contextTipsActive ? undefined : showClearTip && !nextTask ? 'Use /clear to start fresh when switching topics and free up context' : showBtwTip && !nextTask ? "Use /btw to ask a quick side question without interrupting Claude's current work" : spinnerTip;
// Budget text (ant-only) — shown above the tip line // Budget text (internal-only) — shown above the tip line
let budgetText: string | null = null; let budgetText: string | null = null;
if (feature('TOKEN_BUDGET')) { if (feature('TOKEN_BUDGET')) {
const budget = getCurrentTurnTokenBudget(); const budget = getCurrentTurnTokenBudget();

View File

@@ -379,7 +379,7 @@ function OverviewTab({
// Calculate range days based on selected date range // Calculate range days based on selected date range
const rangeDays = dateRange === '7d' ? 7 : dateRange === '30d' ? 30 : stats.totalDays; const rangeDays = dateRange === '7d' ? 7 : dateRange === '30d' ? 30 : stats.totalDays;
// Compute shot stats data (ant-only, gated by feature flag) // Compute shot stats data (internal-only, gated by feature flag)
let shotStatsData: { let shotStatsData: {
avgShots: string; avgShots: string;
buckets: { buckets: {
@@ -511,7 +511,7 @@ function OverviewTab({
</Box> </Box>
</Box> </Box>
{/* Speculation time saved (ant-only) */} {/* Speculation time saved (internal-only) */}
{"external" === 'ant' && stats.totalSpeculationTimeSavedMs > 0 && <Box flexDirection="row" gap={4}> {"external" === 'ant' && stats.totalSpeculationTimeSavedMs > 0 && <Box flexDirection="row" gap={4}>
<Box flexDirection="column" width={28}> <Box flexDirection="column" width={28}>
<Text wrap="truncate"> <Text wrap="truncate">
@@ -523,7 +523,7 @@ function OverviewTab({
</Box> </Box>
</Box>} </Box>}
{/* Shot stats (ant-only) */} {/* Shot stats (internal-only) */}
{shotStatsData && <> {shotStatsData && <>
<Box marginTop={1}> <Box marginTop={1}>
<Text>Shot distribution</Text> <Text>Shot distribution</Text>
@@ -1150,13 +1150,13 @@ function renderOverviewToAnsi(stats: ClaudeCodeStats): string[] {
const peakHourVal = stats.peakActivityHour !== null ? `${stats.peakActivityHour}:00-${stats.peakActivityHour + 1}:00` : 'N/A'; const peakHourVal = stats.peakActivityHour !== null ? `${stats.peakActivityHour}:00-${stats.peakActivityHour + 1}:00` : 'N/A';
lines.push(row('Active days', activeDaysVal, 'Peak hour', peakHourVal)); lines.push(row('Active days', activeDaysVal, 'Peak hour', peakHourVal));
// Speculation time saved (ant-only) // Speculation time saved (internal-only)
if ("external" === 'ant' && stats.totalSpeculationTimeSavedMs > 0) { if ("external" === 'ant' && stats.totalSpeculationTimeSavedMs > 0) {
const label = 'Speculation saved:'.padEnd(COL1_LABEL_WIDTH); const label = 'Speculation saved:'.padEnd(COL1_LABEL_WIDTH);
lines.push(label + h(formatDuration(stats.totalSpeculationTimeSavedMs))); lines.push(label + h(formatDuration(stats.totalSpeculationTimeSavedMs)));
} }
// Shot stats (ant-only) // Shot stats (internal-only)
if (feature('SHOT_STATS') && stats.shotDistribution) { if (feature('SHOT_STATS') && stats.shotDistribution) {
const dist = stats.shotDistribution; const dist = stats.shotDistribution;
const totalWithShots = Object.values(dist).reduce((s, n) => s + n, 0); const totalWithShots = Object.values(dist).reduce((s, n) => s + n, 0);

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime"; import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import React, { useMemo } from 'react'; import React, { useMemo } from 'react';
import { Ansi, Box, Text } from '../../ink.js'; import { Ansi, Box, Text } from '../../ink.js';
import type { Attachment } from 'src/utils/attachments.js'; import type { Attachment } from 'src/utils/attachments.js';

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime"; import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { Box, Text, type TextProps } from '../../ink.js'; import { Box, Text, type TextProps } from '../../ink.js';
import { feature } from 'bun:bundle'; import { feature } from 'bun:bundle';
import * as React from 'react'; import * as React from 'react';

View File

@@ -211,7 +211,7 @@ function BashPermissionRequestInner({
// Editable prefix — initialize synchronously with the best prefix we can // Editable prefix — initialize synchronously with the best prefix we can
// extract without tree-sitter, then refine via tree-sitter for compound // extract without tree-sitter, then refine via tree-sitter for compound
// commands. The sync path matters because TREE_SITTER_BASH is gated // commands. The sync path matters because TREE_SITTER_BASH is gated
// ant-only: in external builds the async refinement below always resolves // internal-only: in external builds the async refinement below always resolves
// to [] and this initial value is what the user sees. // to [] and this initial value is what the user sees.
// //
// Lazy initializer: this runs regex + split on every render if left in // Lazy initializer: this runs regex + split on every render if left in

View File

@@ -39,7 +39,7 @@ export function powershellToolUseOptions({
} }
// Note: No sandbox toggle for PowerShell - sandbox is not supported on Windows // Note: No sandbox toggle for PowerShell - sandbox is not supported on Windows
// Note: No classifier-reviewed option for PowerShell (ANT-ONLY feature for Bash) // Note: No classifier-reviewed option for PowerShell (internal-only feature for Bash)
// Only show "always allow" options when not restricted by allowManagedPermissionRulesOnly. // Only show "always allow" options when not restricted by allowManagedPermissionRulesOnly.
// Prefer the editable prefix input (static extractor + user edits) over the // Prefer the editable prefix input (static extractor + user edits) over the

View File

@@ -164,7 +164,7 @@ export function usePermissionRequestLogging(
} }
} }
// [ANT-ONLY] Log bash tool calls, so we can categorize // [internal-only] Log bash tool calls, so we can categorize
// & burn down calls that should have been allowed // & burn down calls that should have been allowed
if (process.env.USER_TYPE === 'ant') { if (process.env.USER_TYPE === 'ant') {
const parsedInput = BashTool.inputSchema.safeParse(toolUseConfirm.input) const parsedInput = BashTool.inputSchema.safeParse(toolUseConfirm.input)

View File

@@ -103,7 +103,7 @@ type ListItem = {
status: 'running'; status: 'running';
}; };
// WORKFLOW_SCRIPTS is ant-only (build_flags.yaml). Static imports would leak // WORKFLOW_SCRIPTS is internal-only (build_flags.yaml). Static imports would leak
// ~1.3K lines into external builds. Gate with feature() + require so the // ~1.3K lines into external builds. Gate with feature() + require so the
// bundler can dead-code-eliminate the branch. // bundler can dead-code-eliminate the branch.
/* eslint-disable @typescript-eslint/no-require-imports */ /* eslint-disable @typescript-eslint/no-require-imports */

View File

@@ -2,7 +2,7 @@ import memoize from 'lodash-es/memoize.js'
// This ensures you get the LOCAL date in ISO format // This ensures you get the LOCAL date in ISO format
export function getLocalISODate(): string { export function getLocalISODate(): string {
// Check for ant-only date override // Check for internal-only date override
if (process.env.CLAUDE_CODE_OVERRIDE_DATE) { if (process.env.CLAUDE_CODE_OVERRIDE_DATE) {
return process.env.CLAUDE_CODE_OVERRIDE_DATE return process.env.CLAUDE_CODE_OVERRIDE_DATE
} }

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { type as osType, version as osVersion, release as osRelease } from 'os' import { type as osType, version as osVersion, release as osRelease } from 'os'
import { env } from '../utils/env.js' import { env } from '../utils/env.js'
import { getIsGit } from '../utils/git.js' import { getIsGit } from '../utils/git.js'
@@ -389,7 +389,7 @@ function getSessionSpecificGuidanceSection(
: null, : null,
hasAgentTool && hasAgentTool &&
feature('VERIFICATION_AGENT') && feature('VERIFICATION_AGENT') &&
// 3P default: false — verification agent is ant-only A/B // 3P default: false — verification agent is internal-only A/B
getFeatureValue_CACHED_MAY_BE_STALE('tengu_hive_evidence', false) getFeatureValue_CACHED_MAY_BE_STALE('tengu_hive_evidence', false)
? `The contract: when non-trivial implementation happens on your turn, independent adversarial verification must happen before you report completion \u2014 regardless of who did the implementing (you directly, a fork you spawned, or a subagent). You are the one reporting to the user; you own the gate. Non-trivial means: 3+ file edits, backend/API changes, or infrastructure changes. Spawn the ${AGENT_TOOL_NAME} tool with subagent_type="${VERIFICATION_AGENT_TYPE}". Your own checks, caveats, and a fork's self-checks do NOT substitute \u2014 only the verifier assigns a verdict; you cannot self-assign PARTIAL. Pass the original user request, all files changed (by anyone), the approach, and the plan file path if applicable. Flag concerns if you have them but do NOT share test results or claim things work. On FAIL: fix, resume the verifier with its findings plus your fix, repeat until PASS. On PASS: spot-check it \u2014 re-run 2-3 commands from its report, confirm every PASS has a Command run block with output that matches your re-run. If any PASS lacks a command block or diverges, resume the verifier with the specifics. On PARTIAL (from the verifier): report what passed and what could not be verified.` ? `The contract: when non-trivial implementation happens on your turn, independent adversarial verification must happen before you report completion \u2014 regardless of who did the implementing (you directly, a fork you spawned, or a subagent). You are the one reporting to the user; you own the gate. Non-trivial means: 3+ file edits, backend/API changes, or infrastructure changes. Spawn the ${AGENT_TOOL_NAME} tool with subagent_type="${VERIFICATION_AGENT_TYPE}". Your own checks, caveats, and a fork's self-checks do NOT substitute \u2014 only the verifier assigns a verdict; you cannot self-assign PARTIAL. Pass the original user request, all files changed (by anyone), the approach, and the plan file path if applicable. Flag concerns if you have them but do NOT share test results or claim things work. On FAIL: fix, resume the verifier with its findings plus your fix, repeat until PASS. On PASS: spot-check it \u2014 re-run 2-3 commands from its report, confirm every PASS has a Command run block with output that matches your re-run. If any PASS lacks a command block or diverges, resume the verifier with the specifics. On PARTIAL (from the verifier): report what passed and what could not be verified.`
: null, : null,

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { feature } from 'bun:bundle' import { feature } from 'bun:bundle'
import { TASK_OUTPUT_TOOL_NAME } from '../tools/TaskOutputTool/constants.js' import { TASK_OUTPUT_TOOL_NAME } from '../tools/TaskOutputTool/constants.js'
import { EXIT_PLAN_MODE_V2_TOOL_NAME } from '../tools/ExitPlanModeTool/constants.js' import { EXIT_PLAN_MODE_V2_TOOL_NAME } from '../tools/ExitPlanModeTool/constants.js'

View File

@@ -19,7 +19,7 @@ import { logError } from './utils/log.js'
const MAX_STATUS_CHARS = 2000 const MAX_STATUS_CHARS = 2000
// System prompt injection for cache breaking (ant-only, ephemeral debugging state) // System prompt injection for cache breaking (internal-only, ephemeral debugging state)
let systemPromptInjection: string | null = null let systemPromptInjection: string | null = null
export function getSystemPromptInjection(): string | null { export function getSystemPromptInjection(): string | null {
@@ -127,7 +127,7 @@ export const getSystemContext = memoize(
? null ? null
: await getGitStatus() : await getGitStatus()
// Include system prompt injection if set (for cache breaking, ant-only) // Include system prompt injection if set (for cache breaking, internal-only)
const injection = feature('BREAK_CACHE_COMMAND') const injection = feature('BREAK_CACHE_COMMAND')
? getSystemPromptInjection() ? getSystemPromptInjection()
: null : null

View File

@@ -505,7 +505,7 @@ export const SDKControlGetSettingsResponseSchema = lazySchema(() =>
applied: z applied: z
.object({ .object({
model: z.string(), model: z.string(),
// String levels only — numeric effort is ant-only and the // String levels only — numeric effort is internal-only and the
// Zod→proto generator can't emit enumnumber unions. // Zod→proto generator can't emit enumnumber unions.
effort: z.enum(['low', 'medium', 'high', 'max']).nullable(), effort: z.enum(['low', 'medium', 'high', 'max']).nullable(),
}) })

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { useMemo } from 'react' import { useMemo } from 'react'
import type { Tools, ToolPermissionContext } from '../Tool.js' import type { Tools, ToolPermissionContext } from '../Tool.js'
import { assembleToolPool } from '../tools.js' import { assembleToolPool } from '../tools.js'

View File

@@ -306,7 +306,7 @@ export const DEFAULT_BINDINGS: KeybindingBlock[] = [
// Note: diff:back is handled by left arrow in detail mode // Note: diff:back is handled by left arrow in detail mode
}, },
}, },
// Model picker effort cycling (ant-only) // Model picker effort cycling (internal-only)
{ {
context: 'ModelPicker', context: 'ModelPicker',
bindings: { bindings: {

View File

@@ -150,7 +150,7 @@ export const KEYBINDING_ACTIONS = [
'diff:viewDetails', 'diff:viewDetails',
'diff:previousFile', 'diff:previousFile',
'diff:nextFile', 'diff:nextFile',
// Model picker actions (ant-only) // Model picker actions (internal-only)
'modelPicker:decreaseEffort', 'modelPicker:decreaseEffort',
'modelPicker:increaseEffort', 'modelPicker:increaseEffort',
// Select component actions (distinct from confirm: to avoid collisions) // Select component actions (distinct from confirm: to avoid collisions)

View File

@@ -1127,7 +1127,7 @@ async function run(): Promise<CommanderCommand> {
// Extract disable slash commands flag // Extract disable slash commands flag
const disableSlashCommands = options.disableSlashCommands || false; const disableSlashCommands = options.disableSlashCommands || false;
// Extract tasks mode options (ant-only) // Extract tasks mode options (internal-only)
const tasksOption = "external" === 'ant' && (options as { const tasksOption = "external" === 'ant' && (options as {
tasks?: boolean | string; tasks?: boolean | string;
}).tasks; }).tasks;
@@ -2213,7 +2213,7 @@ async function run(): Promise<CommanderCommand> {
const ctx = getRenderContext(false); const ctx = getRenderContext(false);
getFpsMetrics = ctx.getFpsMetrics; getFpsMetrics = ctx.getFpsMetrics;
stats = ctx.stats; stats = ctx.stats;
// Install asciicast recorder before Ink mounts (ant-only, opt-in via CLAUDE_CODE_TERMINAL_RECORDING=1) // Install asciicast recorder before Ink mounts (internal-only, opt-in via CLAUDE_CODE_TERMINAL_RECORDING=1)
if ("external" === 'ant') { if ("external" === 'ant') {
installAsciicastRecorder(); installAsciicastRecorder();
} }
@@ -2246,7 +2246,7 @@ async function run(): Promise<CommanderCommand> {
} }
} }
// Check for pending agent memory snapshot updates (only for --agent mode, ant-only) // Check for pending agent memory snapshot updates (only for --agent mode, internal-only)
if (feature('AGENT_MEMORY_SNAPSHOT') && mainThreadAgentDefinition && isCustomAgent(mainThreadAgentDefinition) && mainThreadAgentDefinition.memory && mainThreadAgentDefinition.pendingSnapshotUpdate) { if (feature('AGENT_MEMORY_SNAPSHOT') && mainThreadAgentDefinition && isCustomAgent(mainThreadAgentDefinition) && mainThreadAgentDefinition.memory && mainThreadAgentDefinition.pendingSnapshotUpdate) {
const agentDef = mainThreadAgentDefinition; const agentDef = mainThreadAgentDefinition;
const choice = await launchSnapshotUpdateDialog(root, { const choice = await launchSnapshotUpdateDialog(root, {
@@ -3041,7 +3041,7 @@ async function run(): Promise<CommanderCommand> {
logSessionTelemetry(); logSessionTelemetry();
}); });
// Set up per-turn session environment data uploader (ant-only build). // Set up per-turn session environment data uploader (internal-only build).
// Default-enabled for all ant users when working in an Anthropic-owned // Default-enabled for all ant users when working in an Anthropic-owned
// repo. Captures git/filesystem state (NOT transcripts) at each turn so // repo. Captures git/filesystem state (NOT transcripts) at each turn so
// environments can be recreated at any user message index. Gating: // environments can be recreated at any user message index. Gating:
@@ -3341,7 +3341,7 @@ async function run(): Promise<CommanderCommand> {
}, renderAndRun); }, renderAndRun);
return; return;
} else if (options.resume || options.fromPr || teleport || remote !== null) { } else if (options.resume || options.fromPr || teleport || remote !== null) {
// Handle resume flow - from file (ant-only), session ID, or interactive selector // Handle resume flow - from file (internal-only), session ID, or interactive selector
// Clear stale caches before resuming to ensure fresh file/skill discovery // Clear stale caches before resuming to ensure fresh file/skill discovery
const { const {
@@ -4246,7 +4246,7 @@ async function run(): Promise<CommanderCommand> {
} = await import('./cli/handlers/plugins.js'); } = await import('./cli/handlers/plugins.js');
await pluginUpdateHandler(plugin, options); await pluginUpdateHandler(plugin, options);
}); });
// END ANT-ONLY // END internal-only
// Setup token command // Setup token command
program.command('setup-token').description('Set up a long-lived authentication token (requires Claude subscription)').action(async () => { program.command('setup-token').description('Set up a long-lived authentication token (requires Claude subscription)').action(async () => {
@@ -4361,7 +4361,7 @@ async function run(): Promise<CommanderCommand> {
}); });
} }
// claude rollback (ant-only) // claude rollback (internal-only)
// Rolls back to previous releases // Rolls back to previous releases
if ("external" === 'ant') { if ("external" === 'ant') {
program.command('rollback [target]').description('[ANT-ONLY] Roll back to a previous release\n\nExamples:\n claude rollback Go 1 version back from current\n claude rollback 3 Go 3 versions back from current\n claude rollback 2.0.73-dev.20251217.t190658 Roll back to a specific version').option('-l, --list', 'List recent published versions with ages').option('--dry-run', 'Show what would be installed without installing').option('--safe', 'Roll back to the server-pinned safe version (set by oncall during incidents)').action(async (target?: string, options?: { program.command('rollback [target]').description('[ANT-ONLY] Roll back to a previous release\n\nExamples:\n claude rollback Go 1 version back from current\n claude rollback 3 Go 3 versions back from current\n claude rollback 2.0.73-dev.20251217.t190658 Roll back to a specific version').option('-l, --list', 'List recent published versions with ages').option('--dry-run', 'Show what would be installed without installing').option('--safe', 'Roll back to the server-pinned safe version (set by oncall during incidents)').action(async (target?: string, options?: {
@@ -4386,7 +4386,7 @@ async function run(): Promise<CommanderCommand> {
await installHandler(target, options); await installHandler(target, options);
}); });
// ant-only commands // internal-only commands
if ("external" === 'ant') { if ("external" === 'ant') {
const validateLogId = (value: string) => { const validateLogId = (value: string) => {
const maybeSessionId = validateUuid(value); const maybeSessionId = validateUuid(value);

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import type { import type {
ToolResultBlockParam, ToolResultBlockParam,
ToolUseBlock, ToolUseBlock,

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime"; import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { feature } from 'bun:bundle'; import { feature } from 'bun:bundle';
import { spawnSync } from 'child_process'; import { spawnSync } from 'child_process';
import { snapshotOutputTokensForTurn, getCurrentTurnTokenBudget, getTurnOutputTokens, getBudgetContinuationCount, getTotalInputTokens } from '../bootstrap/state.js'; import { snapshotOutputTokensForTurn, getCurrentTurnTokenBudget, getTurnOutputTokens, getBudgetContinuationCount, getTotalInputTokens } from '../bootstrap/state.js';
@@ -101,7 +101,7 @@ const useVoiceIntegration: typeof import('../hooks/useVoiceIntegration.js').useV
resetAnchor: () => { } resetAnchor: () => { }
}); });
const VoiceKeybindingHandler: typeof import('../hooks/useVoiceIntegration.js').VoiceKeybindingHandler = feature('VOICE_MODE') ? require('../hooks/useVoiceIntegration.js').VoiceKeybindingHandler : () => null; const VoiceKeybindingHandler: typeof import('../hooks/useVoiceIntegration.js').VoiceKeybindingHandler = feature('VOICE_MODE') ? require('../hooks/useVoiceIntegration.js').VoiceKeybindingHandler : () => null;
// Frustration detection is ant-only (dogfooding). Conditional require so external // Frustration detection is internal-only (dogfooding). Conditional require so external
// builds eliminate the module entirely (including its two O(n) useMemos that run // builds eliminate the module entirely (including its two O(n) useMemos that run
// on every messages change, plus the GrowthBook fetch). // on every messages change, plus the GrowthBook fetch).
const useFrustrationDetection: typeof import('../components/FeedbackSurvey/useFrustrationDetection.js').useFrustrationDetection = "external" === 'ant' ? require('../components/FeedbackSurvey/useFrustrationDetection.js').useFrustrationDetection : () => ({ const useFrustrationDetection: typeof import('../components/FeedbackSurvey/useFrustrationDetection.js').useFrustrationDetection = "external" === 'ant' ? require('../components/FeedbackSurvey/useFrustrationDetection.js').useFrustrationDetection : () => ({
@@ -726,7 +726,7 @@ export function REPL({
const [ideToInstallExtension, setIDEToInstallExtension] = useState<IdeType | null>(null); const [ideToInstallExtension, setIDEToInstallExtension] = useState<IdeType | null>(null);
const [ideInstallationStatus, setIDEInstallationStatus] = useState<IDEExtensionInstallationStatus | null>(null); const [ideInstallationStatus, setIDEInstallationStatus] = useState<IDEExtensionInstallationStatus | null>(null);
const [showIdeOnboarding, setShowIdeOnboarding] = useState(false); const [showIdeOnboarding, setShowIdeOnboarding] = useState(false);
// Dead code elimination: model switch callout state (ant-only) // Dead code elimination: model switch callout state (internal-only)
const [showModelSwitchCallout, setShowModelSwitchCallout] = useState(() => { const [showModelSwitchCallout, setShowModelSwitchCallout] = useState(() => {
if ("external" === 'ant') { if ("external" === 'ant') {
return shouldShowAntModelSwitch(); return shouldShowAntModelSwitch();
@@ -1161,7 +1161,7 @@ export function REPL({
} }
}, [sessionStatus, waitingFor]); }, [sessionStatus, waitingFor]);
// 3P default: off — OSC 21337 is ant-only while the spec stabilizes. // 3P default: off — OSC 21337 is internal-only while the spec stabilizes.
// Gated so we can roll back if the sidebar indicator conflicts with // Gated so we can roll back if the sidebar indicator conflicts with
// the title spinner in terminals that render both. When the flag is // the title spinner in terminals that render both. When the flag is
// on, the user-facing config setting controls whether it's active. // on, the user-facing config setting controls whether it's active.
@@ -1428,7 +1428,7 @@ export function REPL({
// Ref instead of state to avoid triggering React re-renders on every // Ref instead of state to avoid triggering React re-renders on every
// streaming text_delta. The spinner reads this via its animation timer. // streaming text_delta. The spinner reads this via its animation timer.
const responseLengthRef = useRef(0); const responseLengthRef = useRef(0);
// API performance metrics ref for ant-only spinner display (TTFT/OTPS). // API performance metrics ref for internal-only spinner display (TTFT/OTPS).
// Accumulates metrics from all API requests in a turn for P50 aggregation. // Accumulates metrics from all API requests in a turn for P50 aggregation.
const apiMetricsRef = useRef<Array<{ const apiMetricsRef = useRef<Array<{
ttftMs: number; ttftMs: number;
@@ -2044,10 +2044,10 @@ export function REPL({
// Onboarding dialogs (special conditions) // Onboarding dialogs (special conditions)
if (allowDialogsWithAnimation && showIdeOnboarding) return 'ide-onboarding'; if (allowDialogsWithAnimation && showIdeOnboarding) return 'ide-onboarding';
// Model switch callout (ant-only, eliminated from external builds) // Model switch callout (internal-only, eliminated from external builds)
if ("external" === 'ant' && allowDialogsWithAnimation && showModelSwitchCallout) return 'model-switch'; if ("external" === 'ant' && allowDialogsWithAnimation && showModelSwitchCallout) return 'model-switch';
// Undercover auto-enable explainer (ant-only, eliminated from external builds) // Undercover auto-enable explainer (internal-only, eliminated from external builds)
if ("external" === 'ant' && allowDialogsWithAnimation && showUndercoverCallout) return 'undercover-callout'; if ("external" === 'ant' && allowDialogsWithAnimation && showUndercoverCallout) return 'undercover-callout';
// Effort callout (shown once for Opus 4.6 users when effort is enabled) // Effort callout (shown once for Opus 4.6 users when effort is enabled)
@@ -2814,7 +2814,7 @@ export function REPL({
} }
queryCheckpoint('query_end'); queryCheckpoint('query_end');
// Capture ant-only API metrics before resetLoadingState clears the ref. // Capture internal-only API metrics before resetLoadingState clears the ref.
// For multi-request turns (tool use loops), compute P50 across all requests. // For multi-request turns (tool use loops), compute P50 across all requests.
if ("external" === 'ant' && apiMetricsRef.current.length > 0) { if ("external" === 'ant' && apiMetricsRef.current.length > 0) {
const entries = apiMetricsRef.current; const entries = apiMetricsRef.current;
@@ -2938,7 +2938,7 @@ export function REPL({
// can stop the spark animation and show post-turn UI. // can stop the spark animation and show post-turn UI.
sendBridgeResultRef.current(); sendBridgeResultRef.current();
// Auto-hide tungsten panel content at turn end (ant-only), but keep // Auto-hide tungsten panel content at turn end (internal-only), but keep
// tungstenActiveSession set so the pill stays in the footer and the user // tungstenActiveSession set so the pill stays in the footer and the user
// can reopen the panel. Background tmux tasks (e.g. /hunter) run for // can reopen the panel. Background tmux tasks (e.g. /hunter) run for
// minutes — wiping the session made the pill disappear entirely, forcing // minutes — wiping the session made the pill disappear entirely, forcing
@@ -2955,7 +2955,7 @@ export function REPL({
}); });
} }
// Capture budget info before clearing (ant-only) // Capture budget info before clearing (internal-only)
let budgetInfo: { let budgetInfo: {
tokens: number; tokens: number;
limit: number; limit: number;
@@ -4901,7 +4901,7 @@ export function REPL({
{postCompactSurvey.state !== 'closed' ? <FeedbackSurvey state={postCompactSurvey.state} lastResponse={postCompactSurvey.lastResponse} handleSelect={postCompactSurvey.handleSelect} inputValue={inputValue} setInputValue={setInputValue} onRequestFeedback={handleSurveyRequestFeedback} /> : memorySurvey.state !== 'closed' ? <FeedbackSurvey state={memorySurvey.state} lastResponse={memorySurvey.lastResponse} handleSelect={memorySurvey.handleSelect} handleTranscriptSelect={memorySurvey.handleTranscriptSelect} inputValue={inputValue} setInputValue={setInputValue} onRequestFeedback={handleSurveyRequestFeedback} message="How well did Claude use its memory? (optional)" /> : <FeedbackSurvey state={feedbackSurvey.state} lastResponse={feedbackSurvey.lastResponse} handleSelect={feedbackSurvey.handleSelect} handleTranscriptSelect={feedbackSurvey.handleTranscriptSelect} inputValue={inputValue} setInputValue={setInputValue} onRequestFeedback={didAutoRunIssueRef.current ? undefined : handleSurveyRequestFeedback} />} {postCompactSurvey.state !== 'closed' ? <FeedbackSurvey state={postCompactSurvey.state} lastResponse={postCompactSurvey.lastResponse} handleSelect={postCompactSurvey.handleSelect} inputValue={inputValue} setInputValue={setInputValue} onRequestFeedback={handleSurveyRequestFeedback} /> : memorySurvey.state !== 'closed' ? <FeedbackSurvey state={memorySurvey.state} lastResponse={memorySurvey.lastResponse} handleSelect={memorySurvey.handleSelect} handleTranscriptSelect={memorySurvey.handleTranscriptSelect} inputValue={inputValue} setInputValue={setInputValue} onRequestFeedback={handleSurveyRequestFeedback} message="How well did Claude use its memory? (optional)" /> : <FeedbackSurvey state={feedbackSurvey.state} lastResponse={feedbackSurvey.lastResponse} handleSelect={feedbackSurvey.handleSelect} handleTranscriptSelect={feedbackSurvey.handleTranscriptSelect} inputValue={inputValue} setInputValue={setInputValue} onRequestFeedback={didAutoRunIssueRef.current ? undefined : handleSurveyRequestFeedback} />}
{/* Frustration-triggered transcript sharing prompt */} {/* Frustration-triggered transcript sharing prompt */}
{frustrationDetection.state !== 'closed' && <FeedbackSurvey state={frustrationDetection.state} lastResponse={null} handleSelect={() => { }} handleTranscriptSelect={frustrationDetection.handleTranscriptSelect} inputValue={inputValue} setInputValue={setInputValue} />} {frustrationDetection.state !== 'closed' && <FeedbackSurvey state={frustrationDetection.state} lastResponse={null} handleSelect={() => { }} handleTranscriptSelect={frustrationDetection.handleTranscriptSelect} inputValue={inputValue} setInputValue={setInputValue} />}
{/* Skill improvement survey - appears when improvements detected (ant-only) */} {/* Skill improvement survey - appears when improvements detected (internal-only) */}
{"external" === 'ant' && skillImprovementSurvey.suggestion && <SkillImprovementSurvey isOpen={skillImprovementSurvey.isOpen} skillName={skillImprovementSurvey.suggestion.skillName} updates={skillImprovementSurvey.suggestion.updates} handleSelect={skillImprovementSurvey.handleSelect} inputValue={inputValue} setInputValue={setInputValue} />} {"external" === 'ant' && skillImprovementSurvey.suggestion && <SkillImprovementSurvey isOpen={skillImprovementSurvey.isOpen} skillName={skillImprovementSurvey.suggestion.skillName} updates={skillImprovementSurvey.suggestion.updates} handleSelect={skillImprovementSurvey.handleSelect} inputValue={inputValue} setInputValue={setInputValue} />}
{showIssueFlagBanner && <IssueFlagBanner />} {showIssueFlagBanner && <IssueFlagBanner />}
{ } { }

View File

@@ -282,7 +282,7 @@ const extractSessionMemory = sequential(async function (
// Check gate lazily when hook runs (cached, non-blocking) // Check gate lazily when hook runs (cached, non-blocking)
if (!isSessionMemoryGateEnabled()) { if (!isSessionMemoryGateEnabled()) {
// Log gate failure once per session (ant-only) // Log gate failure once per session (internal-only)
if (process.env.USER_TYPE === 'ant' && !hasLoggedGateFailure) { if (process.env.USER_TYPE === 'ant' && !hasLoggedGateFailure) {
hasLoggedGateFailure = true hasLoggedGateFailure = true
logEvent('tengu_session_memory_gate_disabled', {}) logEvent('tengu_session_memory_gate_disabled', {})
@@ -359,7 +359,7 @@ export function initSessionMemory(): void {
// Session memory is used for compaction, so respect auto-compact settings // Session memory is used for compaction, so respect auto-compact settings
const autoCompactEnabled = isAutoCompactEnabled() const autoCompactEnabled = isAutoCompactEnabled()
// Log initialization state (ant-only to avoid noise in external logs) // Log initialization state (internal-only to avoid noise in external logs)
if (process.env.USER_TYPE === 'ant') { if (process.env.USER_TYPE === 'ant') {
logEvent('tengu_session_memory_init', { logEvent('tengu_session_memory_init', {
auto_compact_enabled: autoCompactEnabled, auto_compact_enabled: autoCompactEnabled,

View File

@@ -711,7 +711,7 @@ export class FirstPartyEventLoggingExporter implements LogRecordExporter {
eventMetadata, eventMetadata,
) )
// _PROTO_* keys are PII-tagged values meant only for privileged BQ // _PROTO_* keys are PII-tagged values meinternal only for privileged BQ
// columns. Hoist known keys to proto fields, then defensively strip any // columns. Hoist known keys to proto fields, then defensively strip any
// remaining _PROTO_* so an unrecognized future key can't silently land // remaining _PROTO_* so an unrecognized future key can't silently land
// in the general-access additional_metadata blob. sink.ts applies the // in the general-access additional_metadata blob. sink.ts applies the

View File

@@ -202,7 +202,7 @@ export function hasGrowthBookEnvOverride(feature: string): boolean {
} }
/** /**
* Local config overrides set via /config Gates tab (ant-only). Checked after * Local config overrides set via /config Gates tab (internal-only). Checked after
* env-var overrides — env wins so eval harnesses remain deterministic. Unlike * env-var overrides — env wins so eval harnesses remain deterministic. Unlike
* getEnvOverrides this is not memoized: the user can change overrides at * getEnvOverrides this is not memoized: the user can change overrides at
* runtime, and getGlobalConfig() is already memory-cached (pointer-chase) * runtime, and getGlobalConfig() is already memory-cached (pointer-chase)

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
/** /**
* Shared event metadata enrichment for analytics systems * Shared event metadata enrichment for analytics systems
* *
@@ -490,9 +490,9 @@ export type EventMetadata = {
teamName?: string // Team name for swarm agents (from env var or AsyncLocalStorage) teamName?: string // Team name for swarm agents (from env var or AsyncLocalStorage)
subscriptionType?: string // OAuth subscription tier (max, pro, enterprise, team) subscriptionType?: string // OAuth subscription tier (max, pro, enterprise, team)
rh?: string // Hashed repo remote URL (first 16 chars of SHA256), for joining with server-side data rh?: string // Hashed repo remote URL (first 16 chars of SHA256), for joining with server-side data
kairosActive?: true // KAIROS assistant mode active (ant-only; set in main.tsx after gate check) kairosActive?: true // KAIROS assistant mode active (internal-only; set in main.tsx after gate check)
skillMode?: 'discovery' | 'coach' | 'discovery_and_coach' // Which skill surfacing mechanism(s) are gated on (ant-only; for BQ session segmentation) skillMode?: 'discovery' | 'coach' | 'discovery_and_coach' // Which skill surfacing mechanism(s) are gated on (internal-only; for BQ session segmentation)
observerMode?: 'backseat' | 'skillcoach' | 'both' // Which observer classifiers are gated on (ant-only; for BQ cohort splits on tengu_backseat_* events) observerMode?: 'backseat' | 'skillcoach' | 'both' // Which observer classifiers are gated on (internal-only; for BQ cohort splits on tengu_backseat_* events)
} }
/** /**

View File

@@ -62,7 +62,7 @@ function logEventImpl(eventName: string, metadata: LogEventMetadata): void {
if (shouldTrackDatadog()) { if (shouldTrackDatadog()) {
// Datadog is a general-access backend — strip _PROTO_* keys // Datadog is a general-access backend — strip _PROTO_* keys
// (unredacted PII-tagged values meant only for the 1P privileged column). // (unredacted PII-tagged values meinternal only for the 1P privileged column).
void trackDatadogEvent(eventName, stripProtoFields(metadataWithSampleRate)) void trackDatadogEvent(eventName, stripProtoFields(metadataWithSampleRate))
} }

View File

@@ -463,7 +463,7 @@ function configureEffortParams(
outputConfig.effort = effortValue outputConfig.effort = effortValue
betas.push(EFFORT_BETA_HEADER) betas.push(EFFORT_BETA_HEADER)
} else if (process.env.USER_TYPE === 'ant') { } else if (process.env.USER_TYPE === 'ant') {
// Numeric effort override - ant-only (uses anthropic_internal) // Numeric effort override - internal-only (uses anthropic_internal)
const existingInternal = const existingInternal =
(extraBodyParams.anthropic_internal as Record<string, unknown>) || {} (extraBodyParams.anthropic_internal as Record<string, unknown>) || {}
extraBodyParams.anthropic_internal = { extraBodyParams.anthropic_internal = {
@@ -1195,7 +1195,7 @@ async function* queryModel(
// Determine if cached microcompact is enabled for this model. // Determine if cached microcompact is enabled for this model.
// Computed once here (in async context) and captured by paramsFromContext. // Computed once here (in async context) and captured by paramsFromContext.
// The beta header is also captured here to avoid a top-level import of the // The beta header is also captured here to avoid a top-level import of the
// ant-only CACHE_EDITING_BETA_HEADER constant. // internal-only CACHE_EDITING_BETA_HEADER constant.
let cachedMCEnabled = false let cachedMCEnabled = false
let cacheEditingBetaHeader = '' let cacheEditingBetaHeader = ''
if (feature('CACHED_MICROCOMPACT')) { if (feature('CACHED_MICROCOMPACT')) {

View File

@@ -75,7 +75,7 @@ const FOREGROUND_529_RETRY_SOURCES = new Set<QuerySource>([
'side_question', 'side_question',
// Security classifiers — must complete for auto-mode correctness. // Security classifiers — must complete for auto-mode correctness.
// yoloClassifier.ts uses 'auto_mode' (not 'yolo_classifier' — that's // yoloClassifier.ts uses 'auto_mode' (not 'yolo_classifier' — that's
// type-only). bash_classifier is ant-only; feature-gate so the string // type-only). bash_classifier is internal-only; feature-gate so the string
// tree-shakes out of external builds (excluded-strings.txt). // tree-shakes out of external builds (excluded-strings.txt).
'auto_mode', 'auto_mode',
...(feature('BASH_CLASSIFIER') ? (['bash_classifier'] as const) : []), ...(feature('BASH_CLASSIFIER') ? (['bash_classifier'] as const) : []),
@@ -88,7 +88,7 @@ function shouldRetry529(querySource: QuerySource | undefined): boolean {
) )
} }
// CLAUDE_CODE_UNATTENDED_RETRY: for unattended sessions (ant-only). Retries 429/529 // CLAUDE_CODE_UNATTENDED_RETRY: for unattended sessions (internal-only). Retries 429/529
// indefinitely with higher backoff and periodic keep-alive yields so the host // indefinitely with higher backoff and periodic keep-alive yields so the host
// environment does not mark the session idle mid-wait. // environment does not mark the session idle mid-wait.
// TODO(ANT-344): the keep-alive via SystemAPIErrorMessage yields is a stopgap // TODO(ANT-344): the keep-alive via SystemAPIErrorMessage yields is a stopgap

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
// Background memory consolidation. Fires the /dream prompt as a forked // Background memory consolidation. Fires the /dream prompt as a forked
// subagent when time-gate passes AND enough sessions have accumulated. // subagent when time-gate passes AND enough sessions have accumulated.
// //

View File

@@ -86,7 +86,7 @@ export function getAPIContextManagement(options?: {
}) })
} }
// Tool clearing strategies are ant-only // Tool clearing strategies are internal-only
if (process.env.USER_TYPE !== 'ant') { if (process.env.USER_TYPE !== 'ant') {
return strategies.length > 0 ? { edits: strategies } : undefined return strategies.length > 0 ? { edits: strategies } : undefined
} }

View File

@@ -188,7 +188,7 @@ export async function shouldAutoCompact(
// Reactive-only mode: suppress proactive autocompact, let reactive compact // Reactive-only mode: suppress proactive autocompact, let reactive compact
// catch the API's prompt-too-long. feature() wrapper keeps the flag string // catch the API's prompt-too-long. feature() wrapper keeps the flag string
// out of external builds (REACTIVE_COMPACT is ant-only). // out of external builds (REACTIVE_COMPACT is internal-only).
// Note: returning false here also means autoCompactIfNeeded never reaches // Note: returning false here also means autoCompactIfNeeded never reaches
// trySessionMemoryCompaction in the query loop — the /compact call site // trySessionMemoryCompaction in the query loop — the /compact call site
// still tries session memory first. Revisit if reactive-only graduates. // still tries session memory first. Revisit if reactive-only graduates.

View File

@@ -49,7 +49,7 @@ const COMPACTABLE_TOOLS = new Set<string>([
FILE_WRITE_TOOL_NAME, FILE_WRITE_TOOL_NAME,
]) ])
// --- Cached microcompact state (ant-only, gated by feature('CACHED_MICROCOMPACT')) --- // --- Cached microcompact state (internal-only, gated by feature('CACHED_MICROCOMPACT')) ---
// Lazy-initialized cached MC module and state to avoid importing in external builds. // Lazy-initialized cached MC module and state to avoid importing in external builds.
// The imports and state live inside feature() checks for dead code elimination. // The imports and state live inside feature() checks for dead code elimination.

View File

@@ -419,7 +419,7 @@ export function shouldUseSessionMemoryCompaction(): boolean {
) )
const shouldUse = sessionMemoryFlag && smCompactFlag const shouldUse = sessionMemoryFlag && smCompactFlag
// Log flag states for debugging (ant-only to avoid noise in external logs) // Log flag states for debugging (internal-only to avoid noise in external logs)
if (process.env.USER_TYPE === 'ant') { if (process.env.USER_TYPE === 'ant') {
logEvent('tengu_sm_compact_flag_check', { logEvent('tengu_sm_compact_flag_check', {
tengu_session_memory: sessionMemoryFlag, tengu_session_memory: sessionMemoryFlag,

View File

@@ -1,4 +1,4 @@
// Mock rate limits for testing [ANT-ONLY] // Mock rate limits for testing [internal-only]
// This allows testing various rate limit scenarios without hitting actual limits // This allows testing various rate limit scenarios without hitting actual limits
// //
// ⚠️ WARNING: This is for internal testing/demo purposes only! // ⚠️ WARNING: This is for internal testing/demo purposes only!

View File

@@ -341,7 +341,7 @@ export async function setup(
setImmediate(() => { setImmediate(() => {
void import('./utils/attributionHooks.js').then( void import('./utils/attributionHooks.js').then(
({ registerAttributionHooks }) => { ({ registerAttributionHooks }) => {
registerAttributionHooks() // Register attribution tracking hooks (ant-only feature) registerAttributionHooks() // Register attribution tracking hooks (internal-only feature)
}, },
) )
}) })

View File

@@ -10,7 +10,7 @@ import { applySettingsChange } from '../utils/settings/applySettingsChange.js';
import type { SettingSource } from '../utils/settings/constants.js'; import type { SettingSource } from '../utils/settings/constants.js';
import { createStore } from './store.js'; import { createStore } from './store.js';
// DCE: voice context is ant-only. External builds get a passthrough. // DCE: voice context is internal-only. External builds get a passthrough.
/* eslint-disable @typescript-eslint/no-require-imports */ /* eslint-disable @typescript-eslint/no-require-imports */
const VoiceProvider: (props: { const VoiceProvider: (props: {
children: React.ReactNode; children: React.ReactNode;

View File

@@ -140,7 +140,7 @@ export function onChangeAppState({
})) }))
} }
// tungstenPanelVisible (ant-only tmux panel sticky toggle) // tungstenPanelVisible (internal-only tmux panel sticky toggle)
if (isAntEmployee()) { if (isAntEmployee()) {
if ( if (
newState.tungstenPanelVisible !== oldState.tungstenPanelVisible && newState.tungstenPanelVisible !== oldState.tungstenPanelVisible &&

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { toolMatchesName, type Tool, type Tools } from './Tool.js' import { toolMatchesName, type Tool, type Tools } from './Tool.js'
import { AgentTool } from './tools/AgentTool/AgentTool.js' import { AgentTool } from './tools/AgentTool/AgentTool.js'
import { SkillTool } from './tools/SkillTool/SkillTool.js' import { SkillTool } from './tools/SkillTool/SkillTool.js'
@@ -11,7 +11,7 @@ import { NotebookEditTool } from './tools/NotebookEditTool/NotebookEditTool.js'
import { WebFetchTool } from './tools/WebFetchTool/WebFetchTool.js' import { WebFetchTool } from './tools/WebFetchTool/WebFetchTool.js'
import { TaskStopTool } from './tools/TaskStopTool/TaskStopTool.js' import { TaskStopTool } from './tools/TaskStopTool/TaskStopTool.js'
import { BriefTool } from './tools/BriefTool/BriefTool.js' import { BriefTool } from './tools/BriefTool/BriefTool.js'
// Dead code elimination: conditional import for ant-only tools // Dead code elimination: conditional import for internal-only tools
/* eslint-disable custom-rules/no-process-env-top-level, @typescript-eslint/no-require-imports */ /* eslint-disable custom-rules/no-process-env-top-level, @typescript-eslint/no-require-imports */
const REPLTool = const REPLTool =
process.env.USER_TYPE === 'ant' process.env.USER_TYPE === 'ant'

View File

@@ -430,7 +430,7 @@ export const AgentTool = buildTool({
// Resolve effective isolation mode (explicit param overrides agent def) // Resolve effective isolation mode (explicit param overrides agent def)
const effectiveIsolation = isolation ?? selectedAgent.isolation; const effectiveIsolation = isolation ?? selectedAgent.isolation;
// Remote isolation: delegate to CCR. Gated ant-only — the guard enables // Remote isolation: delegate to CCR. Gated internal-only — the guard enables
// dead code elimination of the entire block for external builds. // dead code elimination of the entire block for external builds.
if ("external" === 'ant' && effectiveIsolation === 'remote') { if ("external" === 'ant' && effectiveIsolation === 'remote') {
const eligibility = await checkRemoteAgentEligibility(); const eligibility = await checkRemoteAgentEligibility();

View File

@@ -323,7 +323,7 @@ export function renderToolResultMessage(data: Output, progressMessagesForMessage
theme: ThemeName; theme: ThemeName;
isTranscriptMode?: boolean; isTranscriptMode?: boolean;
}): React.ReactNode { }): React.ReactNode {
// Remote-launched agents (ant-only) use a private output type not in the // Remote-launched agents (internal-only) use a private output type not in the
// public schema. Narrow via the internal discriminant. // public schema. Narrow via the internal discriminant.
const internal = data as Output | RemoteLaunchedOutput; const internal = data as Output | RemoteLaunchedOutput;
if (internal.status === 'remote_launched') { if (internal.status === 'remote_launched') {

View File

@@ -123,7 +123,7 @@ export type BaseAgentDefinition = {
background?: boolean // Always run as background task when spawned background?: boolean // Always run as background task when spawned
initialPrompt?: string // Prepended to the first user turn (slash commands work) initialPrompt?: string // Prepended to the first user turn (slash commands work)
memory?: AgentMemoryScope // Persistent memory scope memory?: AgentMemoryScope // Persistent memory scope
isolation?: 'worktree' | 'remote' // Run in an isolated git worktree, or remotely in CCR (ant-only) isolation?: 'worktree' | 'remote' // Run in an isolated git worktree, or remotely in CCR (internal-only)
pendingSnapshotUpdate?: { snapshotTimestamp: string } pendingSnapshotUpdate?: { snapshotTimestamp: string }
/** Omit CLAUDE.md hierarchy from the agent's userContext. Read-only agents /** Omit CLAUDE.md hierarchy from the agent's userContext. Read-only agents
* (Explore, Plan) don't need commit/PR/lint guidelines — the main agent has * (Explore, Plan) don't need commit/PR/lint guidelines — the main agent has
@@ -604,7 +604,7 @@ export function parseAgentFromMarkdown(
} }
} }
// Parse isolation mode. 'remote' is ant-only; external builds reject it at parse time. // Parse isolation mode. 'remote' is internal-only; external builds reject it at parse time.
type IsolationMode = 'worktree' | 'remote' type IsolationMode = 'worktree' | 'remote'
const VALID_ISOLATION_MODES: readonly IsolationMode[] = const VALID_ISOLATION_MODES: readonly IsolationMode[] =
process.env.USER_TYPE === 'ant' ? ['worktree', 'remote'] : ['worktree'] process.env.USER_TYPE === 'ant' ? ['worktree', 'remote'] : ['worktree']

View File

@@ -371,7 +371,7 @@ export async function* runAgent({
registerPerfettoAgent(agentId, agentDefinition.agentType, parentId) registerPerfettoAgent(agentId, agentDefinition.agentType, parentId)
} }
// Log API calls path for subagents (ant-only) // Log API calls path for subagents (internal-only)
if (process.env.USER_TYPE === 'ant') { if (process.env.USER_TYPE === 'ant') {
logForDebugging( logForDebugging(
`[Subagent ${agentDefinition.agentType}] API calls: ${getDisplayPath(getDumpPromptsPath(agentId))}`, `[Subagent ${agentDefinition.agentType}] API calls: ${getDisplayPath(getDumpPromptsPath(agentId))}`,

View File

@@ -1136,7 +1136,7 @@ const COMMAND_ALLOWLIST: Record<string, CommandConfig> = {
...DOCKER_READ_ONLY_COMMANDS, ...DOCKER_READ_ONLY_COMMANDS,
} }
// gh commands are ant-only since they make network requests, which goes against // gh commands are internal-only since they make network requests, which goes against
// the read-only validation principle of no network access // the read-only validation principle of no network access
const ANT_ONLY_COMMAND_ALLOWLIST: Record<string, CommandConfig> = { const ANT_ONLY_COMMAND_ALLOWLIST: Record<string, CommandConfig> = {
// All gh read-only commands from shared validation map // All gh read-only commands from shared validation map

View File

@@ -371,7 +371,7 @@ export const SkillTool: Tool<InputSchema, Output, Progress> = buildTool({
? trimmed.substring(1) ? trimmed.substring(1)
: trimmed : trimmed
// Remote canonical skill handling (ant-only experimental). Intercept // Remote canonical skill handling (internal-only experimental). Intercept
// `_canonical_<slug>` names before local command lookup since remote // `_canonical_<slug>` names before local command lookup since remote
// skills are not in the local command registry. // skills are not in the local command registry.
if ( if (
@@ -485,7 +485,7 @@ export const SkillTool: Tool<InputSchema, Output, Progress> = buildTool({
} }
} }
// Remote canonical skills are ant-only experimental — auto-grant. // Remote canonical skills are internal-only experimental — auto-grant.
// Placed AFTER the deny loop so a user-configured Skill(_canonical_:*) // Placed AFTER the deny loop so a user-configured Skill(_canonical_:*)
// deny rule is honored (same pattern as safe-properties auto-allow below). // deny rule is honored (same pattern as safe-properties auto-allow below).
// The skill content itself is canonical/curated, not user-authored. // The skill content itself is canonical/curated, not user-authored.
@@ -597,7 +597,7 @@ export const SkillTool: Tool<InputSchema, Output, Progress> = buildTool({
// Remove leading slash if present (for compatibility) // Remove leading slash if present (for compatibility)
const commandName = trimmed.startsWith('/') ? trimmed.substring(1) : trimmed const commandName = trimmed.startsWith('/') ? trimmed.substring(1) : trimmed
// Remote canonical skill execution (ant-only experimental). Intercepts // Remote canonical skill execution (internal-only experimental). Intercepts
// `_canonical_<slug>` before local command lookup — loads SKILL.md from // `_canonical_<slug>` before local command lookup — loads SKILL.md from
// AKI/GCS (with local cache), injects content directly as a user message. // AKI/GCS (with local cache), injects content directly as a user message.
// Remote skills are declarative markdown so no slash-command expansion // Remote skills are declarative markdown so no slash-command expansion

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { z } from 'zod/v4' import { z } from 'zod/v4'
import { lazySchema } from '../utils/lazySchema.js' import { lazySchema } from '../utils/lazySchema.js'
import { import {

View File

@@ -408,7 +408,7 @@ async function countBuiltInToolTokens(
) )
: 0 : 0
// Build per-tool breakdown for always-loaded tools (ant-only, proportional // Build per-tool breakdown for always-loaded tools (internal-only, proportional
// split of the bulk count based on rough schema size estimation). Excludes // split of the bulk count based on rough schema size estimation). Excludes
// SkillTool since its tokens are shown in the separate Skills category. // SkillTool since its tokens are shown in the separate Skills category.
let systemToolDetails: SystemToolDetail[] = [] let systemToolDetails: SystemToolDetail[] = []

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { import {
logEvent, logEvent,
type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,

View File

@@ -96,7 +96,7 @@ export function shouldAutoRunIssue(reason: AutoRunIssueReason): boolean {
/** /**
* Returns the appropriate command to auto-run based on the reason * Returns the appropriate command to auto-run based on the reason
* ANT-ONLY: good-claude command only exists in ant builds * internal-only: good-claude command only exists in ant builds
*/ */
export function getAutoRunCommand(reason: AutoRunIssueReason): string { export function getAutoRunCommand(reason: AutoRunIssueReason): string {
// Only ant builds have the /good-claude command // Only ant builds have the /good-claude command

View File

@@ -417,7 +417,7 @@ export async function getGcsDistTags(): Promise<NpmDistTags> {
} }
/** /**
* Get version history from npm registry (ant-only feature) * Get version history from npm registry (internal-only feature)
* Returns versions sorted newest-first, limited to the specified count * Returns versions sorted newest-first, limited to the specified count
* *
* Uses NATIVE_PACKAGE_URL when available because: * Uses NATIVE_PACKAGE_URL when available because:

View File

@@ -58,7 +58,7 @@ export async function parseCommand(
): Promise<ParsedCommandData | null> { ): Promise<ParsedCommandData | null> {
if (!command || command.length > MAX_COMMAND_LENGTH) return null if (!command || command.length > MAX_COMMAND_LENGTH) return null
// Gate: ant-only until pentest. External builds fall back to legacy // Gate: internal-only until pentest. External builds fall back to legacy
// regex/shell-quote path. Guarding the whole body inside the positive // regex/shell-quote path. Guarding the whole body inside the positive
// branch lets Bun DCE the NAPI import AND keeps telemetry honest — we // branch lets Bun DCE the NAPI import AND keeps telemetry honest — we
// only fire tengu_tree_sitter_load when a load was genuinely attempted. // only fire tengu_tree_sitter_load when a load was genuinely attempted.

View File

@@ -232,9 +232,9 @@ export type GlobalConfig = {
} }
primaryApiKey?: string // Primary API key for the user when no environment variable is set, set via oauth (TODO: rename) primaryApiKey?: string // Primary API key for the user when no environment variable is set, set via oauth (TODO: rename)
hasAcknowledgedCostThreshold?: boolean hasAcknowledgedCostThreshold?: boolean
hasSeenUndercoverAutoNotice?: boolean // ant-only: whether the one-time auto-undercover explainer has been shown hasSeenUndercoverAutoNotice?: boolean // internal-only: whether the one-time auto-undercover explainer has been shown
hasSeenUltraplanTerms?: boolean // ant-only: whether the one-time CCR terms notice has been shown in the ultraplan launch dialog hasSeenUltraplanTerms?: boolean // internal-only: whether the one-time CCR terms notice has been shown in the ultraplan launch dialog
hasResetAutoModeOptInForDefaultOffer?: boolean // ant-only: one-shot migration guard, re-prompts churned auto-mode users hasResetAutoModeOptInForDefaultOffer?: boolean // internal-only: one-shot migration guard, re-prompts churned auto-mode users
oauthAccount?: AccountInfo oauthAccount?: AccountInfo
iterm2KeyBindingInstalled?: boolean // Legacy - keeping for backward compatibility iterm2KeyBindingInstalled?: boolean // Legacy - keeping for backward compatibility
editorMode?: EditorMode editorMode?: EditorMode
@@ -405,7 +405,7 @@ export type GlobalConfig = {
// Claude Code usage tracking // Claude Code usage tracking
claudeCodeFirstTokenDate?: string // ISO timestamp of the user's first Claude Code OAuth token claudeCodeFirstTokenDate?: string // ISO timestamp of the user's first Claude Code OAuth token
// Model switch callout tracking (ant-only) // Model switch callout tracking (internal-only)
modelSwitchCalloutDismissed?: boolean // Whether user chose "Don't show again" modelSwitchCalloutDismissed?: boolean // Whether user chose "Don't show again"
modelSwitchCalloutLastShown?: number // Timestamp of last shown (don't show for 24h) modelSwitchCalloutLastShown?: number // Timestamp of last shown (don't show for 24h)
modelSwitchCalloutVersion?: string modelSwitchCalloutVersion?: string
@@ -457,7 +457,7 @@ export type GlobalConfig = {
// Cached GrowthBook feature values // Cached GrowthBook feature values
cachedGrowthBookFeatures?: { [featureName: string]: unknown } cachedGrowthBookFeatures?: { [featureName: string]: unknown }
// Local GrowthBook overrides (ant-only, set via /config Gates tab). // Local GrowthBook overrides (internal-only, set via /config Gates tab).
// Checked after env-var overrides but before the real resolved value. // Checked after env-var overrides but before the real resolved value.
growthBookOverrides?: { [featureName: string]: unknown } growthBookOverrides?: { [featureName: string]: unknown }
@@ -545,7 +545,7 @@ export type GlobalConfig = {
// PR status footer configuration (feature-flagged via GrowthBook) // PR status footer configuration (feature-flagged via GrowthBook)
prStatusFooterEnabled?: boolean // Show PR review status in footer (default: true) prStatusFooterEnabled?: boolean // Show PR review status in footer (default: true)
// Tmux live panel visibility (ant-only, toggled via Enter on tmux pill) // Tmux live panel visibility (internal-only, toggled via Enter on tmux pill)
tungstenPanelVisible?: boolean tungstenPanelVisible?: boolean
// Cached org-level fast mode status from the API. // Cached org-level fast mode status from the API.
@@ -564,10 +564,10 @@ export type GlobalConfig = {
// undefined = no cache, null = extra usage enabled, string = disabled reason. // undefined = no cache, null = extra usage enabled, string = disabled reason.
cachedExtraUsageDisabledReason?: string | null cachedExtraUsageDisabledReason?: string | null
// Auto permissions notification tracking (ant-only) // Auto permissions notification tracking (internal-only)
autoPermissionsNotificationCount?: number // Number of times the auto permissions notification has been shown autoPermissionsNotificationCount?: number // Number of times the auto permissions notification has been shown
// Speculation configuration (ant-only) // Speculation configuration (internal-only)
speculationEnabled?: boolean // Whether speculation is enabled (default: true) speculationEnabled?: boolean // Whether speculation is enabled (default: true)
@@ -913,7 +913,7 @@ let lastReadFileStats: { mtime: number; size: number } | null = null
let configCacheHits = 0 let configCacheHits = 0
let configCacheMisses = 0 let configCacheMisses = 0
// Session-total count of actual disk writes to the global config file. // Session-total count of actual disk writes to the global config file.
// Exposed for ant-only dev diagnostics (see inc-4552) so anomalous write // Exposed for internal-only dev diagnostics (see inc-4552) so anomalous write
// rates surface in the UI before they corrupt ~/.claude.json. // rates surface in the UI before they corrupt ~/.claude.json.
let globalConfigWriteCount = 0 let globalConfigWriteCount = 0
@@ -1125,7 +1125,7 @@ export function getGlobalConfig(): GlobalConfig {
/** /**
* Returns the effective value of remoteControlAtStartup. Precedence: * Returns the effective value of remoteControlAtStartup. Precedence:
* 1. User's explicit config value (always wins — honors opt-out) * 1. User's explicit config value (always wins — honors opt-out)
* 2. CCR auto-connect default (ant-only build, GrowthBook-gated) * 2. CCR auto-connect default (internal-only build, GrowthBook-gated)
* 3. false (Remote Control must be explicitly opted into) * 3. false (Remote Control must be explicitly opted into)
*/ */
export function getRemoteControlAtStartup(): boolean { export function getRemoteControlAtStartup(): boolean {

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { CONTEXT_1M_BETA_HEADER } from '../constants/betas.js' import { CONTEXT_1M_BETA_HEADER } from '../constants/betas.js'
import { getGlobalConfig } from './config.js' import { getGlobalConfig } from './config.js'
import { isEnvTruthy } from './envUtils.js' import { isEnvTruthy } from './envUtils.js'
@@ -53,7 +53,7 @@ export function getContextWindowForModel(
model: string, model: string,
betas?: string[], betas?: string[],
): number { ): number {
// Allow override via environment variable (ant-only) // Allow override via environment variable (internal-only)
// This takes precedence over all other context window resolution, including 1M detection, // This takes precedence over all other context window resolution, including 1M detection,
// so users can cap the effective context window for local decisions (auto-compact, etc.) // so users can cap the effective context window for local decisions (auto-compact, etc.)
// while still using a 1M-capable endpoint. // while still using a 1M-capable endpoint.

View File

@@ -50,7 +50,7 @@ import {
import { jsonStringify } from './slowOperations.js' import { jsonStringify } from './slowOperations.js'
import type { ContentReplacementRecord } from './toolResultStorage.js' import type { ContentReplacementRecord } from './toolResultStorage.js'
// Dead code elimination: ant-only tool names are conditionally required so // Dead code elimination: internal-only tool names are conditionally required so
// their strings don't leak into external builds. Static imports always bundle. // their strings don't leak into external builds. Static imports always bundle.
/* eslint-disable @typescript-eslint/no-require-imports */ /* eslint-disable @typescript-eslint/no-require-imports */
const BRIEF_TOOL_NAME: string | null = const BRIEF_TOOL_NAME: string | null =

View File

@@ -58,7 +58,7 @@ export const parseDebugFilter = memoize(
* - "category: message" -> ["category"] * - "category: message" -> ["category"]
* - "[CATEGORY] message" -> ["category"] * - "[CATEGORY] message" -> ["category"]
* - "MCP server \"name\": message" -> ["mcp", "name"] * - "MCP server \"name\": message" -> ["mcp", "name"]
* - "[ANT-ONLY] 1P event: tengu_timer" -> ["ant-only", "1p"] * - "[internal-only] 1P event: tengu_timer" -> ["internal-only", "1p"]
* *
* Returns lowercase categories for case-insensitive matching * Returns lowercase categories for case-insensitive matching
*/ */
@@ -85,7 +85,7 @@ export function extractDebugCategories(message: string): string[] {
} }
// Pattern 4: Check for additional categories in the message // Pattern 4: Check for additional categories in the message
// e.g., "[ANT-ONLY] 1P event: tengu_timer" should match both "ant-only" and "1p" // e.g., "[internal-only] 1P event: tengu_timer" should match both "internal-only" and "1p"
if (message.toLowerCase().includes('1p event:')) { if (message.toLowerCase().includes('1p event:')) {
categories.push('1p') categories.push('1p')
} }

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { isUltrathinkEnabled } from './thinking.js' import { isUltrathinkEnabled } from './thinking.js'
import { getInitialSettings } from './settings/settings.js' import { getInitialSettings } from './settings/settings.js'
import { isProSubscriber, isMaxSubscriber, isTeamSubscriber } from './auth.js' import { isProSubscriber, isMaxSubscriber, isTeamSubscriber } from './auth.js'

View File

@@ -107,7 +107,7 @@ export function _resetTmuxControlModeProbeForTesting(): void {
/** /**
* Whether fullscreen (flicker-free) mode is enabled. Env var takes highest * Whether fullscreen (flicker-free) mode is enabled. Env var takes highest
* precedence, then the `flickerFreeMode` config setting, then the ant-only * precedence, then the `flickerFreeMode` config setting, then the internal-only
* default. External users can enable via `/config` instead of setting the env. * default. External users can enable via `/config` instead of setting the env.
* *
* Priority order: * Priority order:

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
/** /**
* Hooks are user-defined shell commands that can be executed at various points * Hooks are user-defined shell commands that can be executed at various points
* in Claude Code's lifecycle. * in Claude Code's lifecycle.

View File

@@ -84,7 +84,7 @@ export function buildSystemInitMessage(inputs: SystemInitInputs): SDKMessage {
})), })),
uuid: randomUUID(), uuid: randomUUID(),
} }
// Hidden from public SDK types — ant-only UDS messaging socket path // Hidden from public SDK types — internal-only UDS messaging socket path
if (feature('UDS_INBOX')) { if (feature('UDS_INBOX')) {
/* eslint-disable @typescript-eslint/no-require-imports */ /* eslint-disable @typescript-eslint/no-require-imports */
;(initMessage as Record<string, unknown>).messaging_socket_path = ;(initMessage as Record<string, unknown>).messaging_socket_path =

View File

@@ -29,7 +29,7 @@ export type AntModelOverrideConfig = {
switchCallout?: AntModelSwitchCalloutConfig switchCallout?: AntModelSwitchCalloutConfig
} }
// @[MODEL LAUNCH]: Update tengu_ant_model_override with new ant-only models // @[MODEL LAUNCH]: Update tengu_ant_model_override with new internal-only models
// @[MODEL LAUNCH]: Add the codename to scripts/excluded-strings.txt to prevent it from leaking to external builds. // @[MODEL LAUNCH]: Add the codename to scripts/excluded-strings.txt to prevent it from leaking to external builds.
export function getAntModelOverrideConfig(): AntModelOverrideConfig | null { export function getAntModelOverrideConfig(): AntModelOverrideConfig | null {
if (process.env.USER_TYPE !== 'ant') { if (process.env.USER_TYPE !== 'ant') {

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
/** /**
* Ensure that any model codenames introduced here are also added to * Ensure that any model codenames introduced here are also added to
* scripts/excluded-strings.txt to avoid leaking them. Wrap any codename string * scripts/excluded-strings.txt to avoid leaking them. Wrap any codename string

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { getInitialMainLoopModel } from '../../bootstrap/state.js' import { getInitialMainLoopModel } from '../../bootstrap/state.js'
import { import {
isClaudeAISubscriber, isClaudeAISubscriber,

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { MODEL_ALIASES } from './aliases.js' import { MODEL_ALIASES } from './aliases.js'
import { isModelAllowed } from './modelAllowlist.js' import { isModelAllowed } from './modelAllowlist.js'
import { getAPIProvider } from './providers.js' import { getAPIProvider } from './providers.js'

View File

@@ -92,7 +92,7 @@ const PERMISSION_MODE_CONFIG: Partial<
/** /**
* Type guard to check if a PermissionMode is an ExternalPermissionMode. * Type guard to check if a PermissionMode is an ExternalPermissionMode.
* auto is ant-only and excluded from external modes. * auto is internal-only and excluded from external modes.
*/ */
export function isExternalPermissionMode( export function isExternalPermissionMode(
mode: PermissionMode, mode: PermissionMode,

View File

@@ -1,4 +1,4 @@
// Stub for external builds - classifier permissions feature is ANT-ONLY // Stub for external builds - classifier permissions feature is internal-only
export const PROMPT_PREFIX = 'prompt:' export const PROMPT_PREFIX = 'prompt:'

View File

@@ -50,9 +50,9 @@ export const DANGEROUS_BASH_PATTERNS: readonly string[] = [
'env', 'env',
'xargs', 'xargs',
'sudo', 'sudo',
// Anthropic internal: ant-only tools plus general tools that ant sandbox // Anthropic internal: internal-only tools plus general tools that ant sandbox
// dotfile data shows are commonly over-allowlisted as broad prefixes. // dotfile data shows are commonly over-allowlisted as broad prefixes.
// These stay ant-only — external users don't have coo, and the rest are // These stay internal-only — external users don't have coo, and the rest are
// an empirical-risk call grounded in ant sandbox data, not a universal // an empirical-risk call grounded in ant sandbox data, not a universal
// "this tool is unsafe" judgment. PS may want these once it has usage data. // "this tool is unsafe" judgment. PS may want these once it has usage data.
...(process.env.USER_TYPE === 'ant' ...(process.env.USER_TYPE === 'ant'

View File

@@ -4,7 +4,7 @@ import { TASK_OUTPUT_TOOL_NAME } from '../../tools/TaskOutputTool/constants.js'
import { TASK_STOP_TOOL_NAME } from '../../tools/TaskStopTool/prompt.js' import { TASK_STOP_TOOL_NAME } from '../../tools/TaskStopTool/prompt.js'
import type { PermissionRuleValue } from './PermissionRule.js' import type { PermissionRuleValue } from './PermissionRule.js'
// Dead code elimination: ant-only tool names are conditionally required so // Dead code elimination: internal-only tool names are conditionally required so
// their strings don't leak into external builds. Static imports always bundle. // their strings don't leak into external builds. Static imports always bundle.
/* eslint-disable @typescript-eslint/no-require-imports */ /* eslint-disable @typescript-eslint/no-require-imports */
const BRIEF_TOOL_NAME: string | null = const BRIEF_TOOL_NAME: string | null =

View File

@@ -558,7 +558,7 @@ export const hasPermissionsToUseTool: CanUseToolFn = async (
createDenialTrackingState() createDenialTrackingState()
// PowerShell requires explicit user permission in auto mode unless // PowerShell requires explicit user permission in auto mode unless
// POWERSHELL_AUTO_MODE (ant-only build flag) is on. When disabled, this // POWERSHELL_AUTO_MODE (internal-only build flag) is on. When disabled, this
// guard keeps PS out of the classifier and skips the acceptEdits // guard keeps PS out of the classifier and skips the acceptEdits
// fast-path below. When enabled, PS flows through to the classifier like // fast-path below. When enabled, PS flows through to the classifier like
// Bash — the classifier prompt gets POWERSHELL_DENY_GUIDANCE appended so // Bash — the classifier prompt gets POWERSHELL_DENY_GUIDANCE appended so

View File

@@ -1455,7 +1455,7 @@ function getClassifierModel(): string {
} }
/** /**
* Resolve the XML classifier setting: ant-only env var takes precedence, * Resolve the XML classifier setting: internal-only env var takes precedence,
* then GrowthBook. Returns undefined when unset (caller decides default). * then GrowthBook. Returns undefined when unset (caller decides default).
*/ */
function resolveTwoStageClassifier(): function resolveTwoStageClassifier():

View File

@@ -107,7 +107,7 @@ export function restoreSessionStateFromLog(
}) })
} }
// Restore attribution state (ant-only feature) // Restore attribution state (internal-only feature)
if ( if (
feature('COMMIT_ATTRIBUTION') && feature('COMMIT_ATTRIBUTION') &&
result.attributionSnapshots && result.attributionSnapshots &&

View File

@@ -2233,7 +2233,7 @@ function forEachParsedJSONLBufferEntry<T>(
function applySnipRemovals(messages: Map<UUID, TranscriptMessage>): void { function applySnipRemovals(messages: Map<UUID, TranscriptMessage>): void {
// Structural check — snipMetadata only exists on the boundary subtype. // Structural check — snipMetadata only exists on the boundary subtype.
// Avoids the subtype literal which is in excluded-strings.txt // Avoids the subtype literal which is in excluded-strings.txt
// (HISTORY_SNIP is ant-only; the literal must not leak into external builds). // (HISTORY_SNIP is internal-only; the literal must not leak into external builds).
type WithSnipMeta = { snipMetadata?: { removedUuids?: UUID[] } } type WithSnipMeta = { snipMetadata?: { removedUuids?: UUID[] } }
const toDelete = new Set<UUID>() const toDelete = new Set<UUID>()
for (const entry of messages.values()) { for (const entry of messages.values()) {

View File

@@ -39,7 +39,7 @@ export const MDM_SUBPROCESS_TIMEOUT_MS = 5000
/** /**
* Build the list of macOS plist paths in priority order (highest first). * Build the list of macOS plist paths in priority order (highest first).
* Evaluates `process.env.USER_TYPE` at call time so ant-only paths are * Evaluates `process.env.USER_TYPE` at call time so internal-only paths are
* included only when appropriate. * included only when appropriate.
*/ */
export function getMacOSPlistPaths(): Array<{ path: string; label: string }> { export function getMacOSPlistPaths(): Array<{ path: string; label: string }> {

View File

@@ -3,7 +3,7 @@
* *
* Exports complete command configuration maps that any shell tool can import: * Exports complete command configuration maps that any shell tool can import:
* - GIT_READ_ONLY_COMMANDS: all git subcommands with safe flags and callbacks * - GIT_READ_ONLY_COMMANDS: all git subcommands with safe flags and callbacks
* - GH_READ_ONLY_COMMANDS: ant-only gh CLI commands (network-dependent) * - GH_READ_ONLY_COMMANDS: internal-only gh CLI commands (network-dependent)
* - EXTERNAL_READONLY_COMMANDS: cross-shell commands that work in both bash and PowerShell * - EXTERNAL_READONLY_COMMANDS: cross-shell commands that work in both bash and PowerShell
* - containsVulnerableUncPath: UNC path detection for credential leak prevention * - containsVulnerableUncPath: UNC path detection for credential leak prevention
* - outputLimits are in outputLimits.ts * - outputLimits are in outputLimits.ts
@@ -602,7 +602,7 @@ export const GIT_READ_ONLY_COMMANDS: Record<string, ExternalCommandConfig> = {
'-s': 'none', // Print size of object '-s': 'none', // Print size of object
'-p': 'none', // Pretty-print object contents '-p': 'none', // Pretty-print object contents
'-e': 'none', // Exit with zero if object exists, non-zero otherwise '-e': 'none', // Exit with zero if object exists, non-zero otherwise
// Batch mode — read-only check variant only // Batch mode — read-only check variinternal only
'--batch-check': 'none', // For each object on stdin, print type and size (no content) '--batch-check': 'none', // For each object on stdin, print type and size (no content)
// Output control // Output control
'--allow-undetermined-type': 'none', '--allow-undetermined-type': 'none',
@@ -923,7 +923,7 @@ export const GIT_READ_ONLY_COMMANDS: Record<string, ExternalCommandConfig> = {
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// GH_READ_ONLY_COMMANDS — ant-only gh CLI commands (network-dependent) // GH_READ_ONLY_COMMANDS — internal-only gh CLI commands (network-dependent)
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// SECURITY: Shared callback for all gh commands to prevent network exfil. // SECURITY: Shared callback for all gh commands to prevent network exfil.

View File

@@ -81,7 +81,7 @@ export type ClaudeCodeStats = {
// Speculation time saved // Speculation time saved
totalSpeculationTimeSavedMs: number totalSpeculationTimeSavedMs: number
// Shot stats (ant-only, gated by SHOT_STATS feature flag) // Shot stats (internal-only, gated by SHOT_STATS feature flag)
shotDistribution?: { [shotCount: number]: number } shotDistribution?: { [shotCount: number]: number }
oneShotRate?: number oneShotRate?: number
} }
@@ -208,7 +208,7 @@ async function processSessionFiles(
// their token usage counted, but not as separate sessions. // their token usage counted, but not as separate sessions.
const isSubagentFile = sessionFile.includes(`${sep}subagents${sep}`) const isSubagentFile = sessionFile.includes(`${sep}subagents${sep}`)
// Extract shot count from PR attribution in gh pr create calls (ant-only) // Extract shot count from PR attribution in gh pr create calls (internal-only)
// This must run before the sidechain filter since subagent transcripts // This must run before the sidechain filter since subagent transcripts
// mark all messages as sidechain // mark all messages as sidechain
if (feature('SHOT_STATS') && shotDistributionMap) { if (feature('SHOT_STATS') && shotDistributionMap) {

View File

@@ -70,7 +70,7 @@ export type PersistedStatsCache = {
hourCounts: { [hour: number]: number } hourCounts: { [hour: number]: number }
// Speculation time saved across all sessions // Speculation time saved across all sessions
totalSpeculationTimeSavedMs: number totalSpeculationTimeSavedMs: number
// Shot distribution: map of shot count → number of sessions (ant-only) // Shot distribution: map of shot count → number of sessions (internal-only)
shotDistribution?: { [shotCount: number]: number } shotDistribution?: { [shotCount: number]: number }
} }

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { Box, Text } from '../ink.js'; import { Box, Text } from '../ink.js';
import * as React from 'react'; import * as React from 'react';
import { getLargeMemoryFiles, MAX_MEMORY_CHARACTER_COUNT, type MemoryFileInfo } from './claudemd.js'; import { getLargeMemoryFiles, MAX_MEMORY_CHARACTER_COUNT, type MemoryFileInfo } from './claudemd.js';

View File

@@ -316,7 +316,7 @@ export async function getTask(
const content = await readFile(path, 'utf-8') const content = await readFile(path, 'utf-8')
const data = jsonParse(content) as { status?: string } const data = jsonParse(content) as { status?: string }
// TEMPORARY: Migrate old status names for existing sessions (ant-only) // TEMPORARY: Migrate old status names for existing sessions (internal-only)
if (process.env.USER_TYPE === 'ant') { if (process.env.USER_TYPE === 'ant') {
if (data.status === 'open') data.status = 'pending' if (data.status === 'open') data.status = 'pending'
else if (data.status === 'resolved') data.status = 'completed' else if (data.status === 'resolved') data.status = 'completed'

View File

@@ -426,7 +426,7 @@ export function addBetaLLMResponseAttributes(
} }
} }
// Add thinking_output - ant-only // Add thinking_output - internal-only
if ( if (
process.env.USER_TYPE === 'ant' && process.env.USER_TYPE === 'ant' &&
metadata.thinkingOutput !== undefined metadata.thinkingOutput !== undefined

View File

@@ -4,7 +4,7 @@
* This module generates traces in the Chrome Trace Event format that can be * This module generates traces in the Chrome Trace Event format that can be
* viewed in ui.perfetto.dev or Chrome's chrome://tracing. * viewed in ui.perfetto.dev or Chrome's chrome://tracing.
* *
* NOTE: This feature is ant-only and eliminated from external builds. * NOTE: This feature is internal-only and eliminated from external builds.
* *
* The trace file includes: * The trace file includes:
* - Agent hierarchy (parent-child relationships in a swarm) * - Agent hierarchy (parent-child relationships in a swarm)

View File

@@ -1,4 +1,4 @@
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered // biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import type { Theme } from './theme.js' import type { Theme } from './theme.js'
import { feature } from 'bun:bundle' import { feature } from 'bun:bundle'
import { getFeatureValue_CACHED_MAY_BE_STALE } from '../services/analytics/growthbook.js' import { getFeatureValue_CACHED_MAY_BE_STALE } from '../services/analytics/growthbook.js'