Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bootstrap/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ type State = {
agentColorIndex: number
// Last API request for bug reports
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
// to the API so /share's serialized_conversation.json reflects reality.
lastAPIRequestMessages: BetaMessageStreamParams['messages'] | null
Expand Down Expand Up @@ -185,7 +185,7 @@ type State = {
agentId: string | null
}
>
// Track slow operations for dev bar display (ant-only)
// Track slow operations for dev bar display (internal-only)
slowOperations: Array<{
operation: string
durationMs: number
Expand Down
4 changes: 2 additions & 2 deletions src/bridge/bridgeConfig.ts
Original file line number Diff line number Diff line change
@@ -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
* a dozen files — inboundAttachments, BriefTool/upload, bridgeMain,
* initReplBridge, remoteBridgeCore, daemon workers, /rename,
* /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.
* Callers that compose with a different auth source (e.g. daemon workers
* using IPC auth) use the Override getters directly.
Expand Down
2 changes: 1 addition & 1 deletion src/bridge/bridgeEnabled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export function checkBridgeMinVersion(): string | null {

/**
* 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
* default — the user can still opt out by setting remoteControlAtStartup=false
* in config (explicit settings always win over this default).
Expand Down
6 changes: 3 additions & 3 deletions src/bridge/bridgeMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@ export async function runBridgeLoop(
// Skip when the loop exited fatally (env expired, auth failed, give-up) —
// resume is impossible in those cases and the message would contradict the
// 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).
if (
feature('KAIROS') &&
Expand Down Expand Up @@ -1888,7 +1888,7 @@ export function parseArgs(args: string[]): ParsedArgs {

async function printHelp(): Promise<void> {
// 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 modes = EXTERNAL_PERMISSION_MODES.join(', ')
const showServer = await isMultiSessionSpawnEnabled()
Expand Down Expand Up @@ -2356,7 +2356,7 @@ export async function bridgeMain(args: string[]): Promise<void> {
// environment_id and reuse that for registration (idempotent on the
// backend). Left undefined otherwise — the backend rejects
// 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
// undefined here in external builds — this guard is for tree-shaking.
let reuseEnvironmentId: string | undefined
Expand Down
2 changes: 1 addition & 1 deletion src/bridge/initReplBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export async function initReplBridge(
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
// irrelevant. Skip 2b/2c to preserve that decoupling: an expired keychain
// token shouldn't block a bridge connection that doesn't use it.
Expand Down
2 changes: 1 addition & 1 deletion src/bridge/remoteBridgeCore.ts
Original file line number Diff line number Diff line change
@@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion src/bridge/replBridge.ts
Original file line number Diff line number Diff line change
@@ -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 {
createBridgeApiClient,
Expand Down
8 changes: 4 additions & 4 deletions src/cli/print.ts
Original file line number Diff line number Diff line change
@@ -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 { readFile, stat } from 'fs/promises'
import { dirname } from 'path'
Expand Down Expand Up @@ -2829,7 +2829,7 @@ function runHeadlessStreaming(

if (message.type === 'control_request') {
if (message.request.subtype === 'interrupt') {
// Track escapes for attribution (ant-only feature)
// Track escapes for attribution (internal-only feature)
if (feature('COMMIT_ATTRIBUTION')) {
setAppState(prev => ({
...prev,
Expand Down Expand Up @@ -3765,7 +3765,7 @@ function runHeadlessStreaming(
...getSettingsWithSources(),
applied: {
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,
},
})
Expand Down Expand Up @@ -5025,7 +5025,7 @@ async function loadInitialMessages(
}

// Handle resume in print mode (accepts session ID or URL)
// URLs are [ANT-ONLY]
// URLs are [internal-only]
if (options.resume) {
try {
logEvent('tengu_resume_print', {})
Expand Down
2 changes: 1 addition & 1 deletion src/commands.ts
Original file line number Diff line number Diff line change
@@ -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 autofixPr from './commands/autofix-pr/index.js'
import backfillSessions from './commands/backfill-sessions/index.js'
Expand Down
6 changes: 3 additions & 3 deletions src/commands/context/context-noninteractive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function formatContextAsMarkdownTable(data: ContextData): string {
output += `\n`
}

// System tools (ant-only)
// System tools (internal-only)
if (
systemTools &&
systemTools.length > 0 &&
Expand All @@ -214,7 +214,7 @@ function formatContextAsMarkdownTable(data: ContextData): string {
output += `\n`
}

// System prompt sections (ant-only)
// System prompt sections (internal-only)
if (
systemPromptSections &&
systemPromptSections.length > 0 &&
Expand Down Expand Up @@ -288,7 +288,7 @@ function formatContextAsMarkdownTable(data: ContextData): string {
output += `\n`
}

// Message breakdown (ant-only)
// Message breakdown (internal-only)
if (messageBreakdown && process.env.USER_TYPE === 'ant') {
output += `### [ANT-ONLY] Message Breakdown\n\n`
output += `| Category | Tokens |\n`
Expand Down
6 changes: 3 additions & 3 deletions src/commands/insights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2187,7 +2187,7 @@ function generateHtmlReport(
`
: ''

// Build Team Feedback section (collapsible, ant-only)
// Build Team Feedback section (collapsible, internal-only)
const ccImprovements =
process.env.USER_TYPE === 'ant'
? insights.cc_team_improvements?.improvements || []
Expand Down Expand Up @@ -2804,7 +2804,7 @@ export async function generateUsageReport(options?: {
}> {
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) {
const destDir = join(getClaudeConfigHomeDir(), 'projects')
const { hosts, totalCopied } = await collectAllRemoteHostData(destDir)
Expand Down Expand Up @@ -3085,7 +3085,7 @@ const usageReport: Command = {
`${data.git_commits} commits`,
].join(' · ')

// Build remote host info (ant-only)
// Build remote host info (internal-only)
let remoteInfo = ''
if (process.env.USER_TYPE === 'ant') {
if (remoteStats && remoteStats.totalCopied > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/terminalSetup/terminalSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export async function setupTerminal(theme: ThemeName): Promise<string> {
});
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') {
result += await setupShellCompletion(theme);
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/ultraplan.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const DEFAULT_INSTRUCTIONS: string = (typeof _rawPrompt === 'string' ? _rawPromp
// so the override path is DCE'd from external builds).
// Shell-set env only, so top-level process.env read is fine
// — 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;
/* eslint-enable custom-rules/no-process-env-top-level, custom-rules/no-sync-fs */

Expand Down
2 changes: 1 addition & 1 deletion src/components/LogoV2/LogoV2.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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 { Box, Text, color } from '../../ink.js';
import { useTerminalSize } from '../../hooks/useTerminalSize.js';
Expand Down
2 changes: 1 addition & 1 deletion src/components/PromptInput/IssueFlagBanner.tsx
Original file line number Diff line number Diff line change
@@ -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.
*/
export function IssueFlagBanner() {
Expand Down
4 changes: 2 additions & 2 deletions src/components/PromptInput/PromptInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ function PromptInput({
// the pill returns null for implicit-and-not-reconnecting, so nav must too,
// otherwise bridge becomes an invisible selection stop.
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 tmuxFooterVisible = "external" === 'ant' && hasTungstenSession;
// WebBrowser pill — visible when a browser is open
Expand Down Expand Up @@ -2153,7 +2153,7 @@ function PromptInput({
}} 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) {
return modelPickerElement;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/PromptInput/PromptInputFooterLeftSide.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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';
// Dead code elimination: conditional import for COORDINATOR_MODE
/* eslint-disable @typescript-eslint/no-require-imports */
Expand Down Expand Up @@ -364,7 +364,7 @@ function ModeIndicator({
// BackgroundTaskStatus is NOT in parts — it renders as a Box sibling so
// its click-target Box isn't nested inside the <Text wrap="truncate">
// 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!} />] : [])];

// Check if any in-process teammates exist (for hint text cycling)
Expand Down
6 changes: 3 additions & 3 deletions src/components/Settings/Config.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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 { Box, Text, useTheme, useThemeSetting, useTerminalFocus } from '../../ink.js';
import type { KeyboardEvent } from '../../ink/events/keyboard-event.js';
Expand Down Expand Up @@ -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() ? [{
id: 'fastMode',
label: `Fast mode (${FAST_MODE_MODEL_DISPLAY} only)`,
Expand Down Expand Up @@ -391,7 +391,7 @@ export function Config({
});
}
}] : []),
// Speculation toggle (ant-only)
// Speculation toggle (internal-only)
...("external" === 'ant' ? [{
id: 'speculationEnabled',
label: 'Speculative execution',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Settings/Settings.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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 { Suspense, useState } from 'react';
import { useKeybinding } from '../../keybindings/useKeybinding.js';
Expand Down
4 changes: 2 additions & 2 deletions src/components/Spinner.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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 * as React from 'react';
import { useEffect, useMemo, useRef, useState } from 'react';
Expand Down Expand Up @@ -258,7 +258,7 @@ function SpinnerWithVerbInner({
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;

// Budget text (ant-only) — shown above the tip line
// Budget text (internal-only) — shown above the tip line
let budgetText: string | null = null;
if (feature('TOKEN_BUDGET')) {
const budget = getCurrentTurnTokenBudget();
Expand Down
10 changes: 5 additions & 5 deletions src/components/Stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ function OverviewTab({
// Calculate range days based on selected date range
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: {
avgShots: string;
buckets: {
Expand Down Expand Up @@ -511,7 +511,7 @@ function OverviewTab({
</Box>
</Box>

{/* Speculation time saved (ant-only) */}
{/* Speculation time saved (internal-only) */}
{"external" === 'ant' && stats.totalSpeculationTimeSavedMs > 0 && <Box flexDirection="row" gap={4}>
<Box flexDirection="column" width={28}>
<Text wrap="truncate">
Expand All @@ -523,7 +523,7 @@ function OverviewTab({
</Box>
</Box>}

{/* Shot stats (ant-only) */}
{/* Shot stats (internal-only) */}
{shotStatsData && <>
<Box marginTop={1}>
<Text>Shot distribution</Text>
Expand Down Expand Up @@ -1150,13 +1150,13 @@ function renderOverviewToAnsi(stats: ClaudeCodeStats): string[] {
const peakHourVal = stats.peakActivityHour !== null ? `${stats.peakActivityHour}:00-${stats.peakActivityHour + 1}:00` : 'N/A';
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) {
const label = 'Speculation saved:'.padEnd(COL1_LABEL_WIDTH);
lines.push(label + h(formatDuration(stats.totalSpeculationTimeSavedMs)));
}

// Shot stats (ant-only)
// Shot stats (internal-only)
if (feature('SHOT_STATS') && stats.shotDistribution) {
const dist = stats.shotDistribution;
const totalWithShots = Object.values(dist).reduce((s, n) => s + n, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/components/messages/AttachmentMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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 { Ansi, Box, Text } from '../../ink.js';
import type { Attachment } from 'src/utils/attachments.js';
Expand Down
2 changes: 1 addition & 1 deletion src/components/messages/SystemTextMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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 { feature } from 'bun:bundle';
import * as React from 'react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function BashPermissionRequestInner({
// Editable prefix — initialize synchronously with the best prefix we can
// extract without tree-sitter, then refine via tree-sitter for compound
// 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.
//
// Lazy initializer: this runs regex + split on every render if left in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function powershellToolUseOptions({
}

// 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.
// Prefer the editable prefix input (static extractor + user edits) over the
Expand Down
2 changes: 1 addition & 1 deletion src/components/permissions/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
if (process.env.USER_TYPE === 'ant') {
const parsedInput = BashTool.inputSchema.safeParse(toolUseConfirm.input)
Expand Down
2 changes: 1 addition & 1 deletion src/components/tasks/BackgroundTasksDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ type ListItem = {
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
// bundler can dead-code-eliminate the branch.
/* eslint-disable @typescript-eslint/no-require-imports */
Expand Down
Loading
Loading