diff --git a/packages/remote-control-server/src/types/messages.ts b/packages/remote-control-server/src/types/messages.ts
deleted file mode 100644
index 201ac9fc7..000000000
--- a/packages/remote-control-server/src/types/messages.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-/** SDK 消息类型 — 与 CC CLI bridge 模块兼容 */
-export interface SDKMessage {
- type: string;
- content?: unknown;
- [key: string]: unknown;
-}
-
-export interface UserMessage extends SDKMessage {
- type: "user";
- content: string;
-}
-
-export interface AssistantMessage extends SDKMessage {
- type: "assistant";
- content: string;
-}
-
-export interface PermissionRequest extends SDKMessage {
- type: "permission_request";
- tool_name: string;
- tool_input: unknown;
-}
-
-export interface PermissionResponse extends SDKMessage {
- type: "permission_response";
- approved: boolean;
- request_id: string;
-}
-
-export interface ControlRequest extends SDKMessage {
- type: "control_request";
- action: string;
- [key: string]: unknown;
-}
-
-export type SessionEventType =
- | "user"
- | "assistant"
- | "permission_request"
- | "permission_response"
- | "control_request"
- | "tool_use"
- | "tool_result"
- | "status"
- | "error";
-
-// --- Normalized Event Payloads (SSE contract) ---
-
-export interface NormalizedEventPayload {
- content: string;
- raw?: unknown;
- [key: string]: unknown;
-}
-
-export interface UserEventPayload extends NormalizedEventPayload {
- content: string;
-}
-
-export interface AssistantEventPayload extends NormalizedEventPayload {
- content: string;
-}
-
-export interface ToolUseEventPayload extends NormalizedEventPayload {
- content: string;
- tool_name: string;
- tool_input: unknown;
-}
-
-export interface ToolResultEventPayload extends NormalizedEventPayload {
- content: string;
-}
-
-export interface PermissionEventPayload extends NormalizedEventPayload {
- content: string;
- request_id: string;
- request: {
- subtype: string;
- tool_name: string;
- tool_input: unknown;
- };
-}
diff --git a/scripts/verify-gates.ts b/scripts/verify-gates.ts
deleted file mode 100644
index dbef1c8a4..000000000
--- a/scripts/verify-gates.ts
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/usr/bin/env bun
-/**
- * Verify GrowthBook gate defaults and compile-time feature flags.
- *
- * Usage:
- * bun run scripts/verify-gates.ts
- *
- * This script checks that LOCAL_GATE_DEFAULTS are being returned correctly
- * when GrowthBook is not connected, and that compile-time feature flags
- * are properly enabled.
- */
-
-// We can't import feature() from bun:bundle in a standalone script,
-// so we test the GrowthBook layer directly.
-
-import {
- getFeatureValue_CACHED_MAY_BE_STALE,
- checkStatsigFeatureGate_CACHED_MAY_BE_STALE,
-} from '../src/services/analytics/growthbook.js'
-
-interface GateCheck {
- name: string
- gate: string
- expected: unknown
- category: string
- /** If set, this compile flag must also be enabled at build time */
- compileFlag?: string
-}
-
-const gates: GateCheck[] = [
- // P0: Pure local
- { name: 'Custom keybindings', gate: 'tengu_keybinding_customization_release', expected: true, category: 'P0' },
- { name: 'Streaming tool exec', gate: 'tengu_streaming_tool_execution2', expected: true, category: 'P0' },
- { name: 'Cron tasks', gate: 'tengu_kairos_cron', expected: true, category: 'P0' },
- { name: 'JSON tools format', gate: 'tengu_amber_json_tools', expected: true, category: 'P0' },
- { name: 'Immediate model cmd', gate: 'tengu_immediate_model_command', expected: true, category: 'P0' },
- { name: 'MCP delta', gate: 'tengu_basalt_3kr', expected: true, category: 'P0' },
- { name: 'Leaf pruning', gate: 'tengu_pebble_leaf_prune', expected: true, category: 'P0' },
- { name: 'Message smooshing', gate: 'tengu_chair_sermon', expected: true, category: 'P0' },
- { name: 'Deep link', gate: 'tengu_lodestone_enabled', expected: true, category: 'P0', compileFlag: 'LODESTONE' },
- { name: 'Auto background', gate: 'tengu_auto_background_agents', expected: true, category: 'P0' },
- { name: 'Fine-grained tools', gate: 'tengu_fgts', expected: true, category: 'P0' },
-
- // P1: API-dependent
- { name: 'Session memory', gate: 'tengu_session_memory', expected: true, category: 'P1' },
- { name: 'Auto memory extract', gate: 'tengu_passport_quail', expected: true, category: 'P1', compileFlag: 'EXTRACT_MEMORIES' },
- { name: 'Memory skip index', gate: 'tengu_moth_copse', expected: true, category: 'P1' },
- { name: 'Memory search section', gate: 'tengu_coral_fern', expected: true, category: 'P1' },
- { name: 'Prompt suggestions', gate: 'tengu_chomp_inflection', expected: true, category: 'P1' },
- { name: 'Verification agent', gate: 'tengu_hive_evidence', expected: true, category: 'P1', compileFlag: 'VERIFICATION_AGENT' },
- { name: 'Brief mode', gate: 'tengu_kairos_brief', expected: true, category: 'P1', compileFlag: 'KAIROS_BRIEF' },
- { name: 'Away summary', gate: 'tengu_sedge_lantern', expected: true, category: 'P1', compileFlag: 'AWAY_SUMMARY' },
- { name: 'Idle return prompt', gate: 'tengu_willow_mode', expected: 'dialog', category: 'P1' },
-
- // Kill switches
- { name: 'Ultrathink', gate: 'tengu_turtle_carbon', expected: true, category: 'KS', compileFlag: 'ULTRATHINK' },
- { name: 'Explore/Plan agents', gate: 'tengu_amber_stoat', expected: true, category: 'KS', compileFlag: 'BUILTIN_EXPLORE_PLAN_AGENTS' },
- { name: 'Agent teams', gate: 'tengu_amber_flint', expected: true, category: 'KS' },
- { name: 'Slim subagent CLAUDE.md', gate: 'tengu_slim_subagent_claudemd', expected: true, category: 'KS' },
- { name: 'Bash security', gate: 'tengu_birch_trellis', expected: true, category: 'KS' },
- { name: 'macOS clipboard', gate: 'tengu_collage_kaleidoscope', expected: true, category: 'KS' },
- { name: 'Compact cache prefix', gate: 'tengu_compact_cache_prefix', expected: true, category: 'KS' },
- { name: 'Durable cron', gate: 'tengu_kairos_cron_durable', expected: true, category: 'KS' },
- { name: 'Attribution header', gate: 'tengu_attribution_header', expected: true, category: 'KS' },
- { name: 'Agent progress', gate: 'tengu_slate_prism', expected: true, category: 'KS' },
-]
-
-console.log('=== GrowthBook Local Gate Verification ===\n')
-
-let pass = 0
-let fail = 0
-
-for (const category of ['P0', 'P1', 'KS']) {
- const label = category === 'KS' ? 'Kill Switches' : category
- console.log(`--- ${label} ---`)
-
- for (const check of gates.filter(g => g.category === category)) {
- const actual = typeof check.expected === 'boolean'
- ? checkStatsigFeatureGate_CACHED_MAY_BE_STALE(check.gate)
- : getFeatureValue_CACHED_MAY_BE_STALE(check.gate, null)
-
- const matches = typeof check.expected === 'boolean'
- ? actual === check.expected
- : actual === check.expected || JSON.stringify(actual) === JSON.stringify(check.expected)
-
- const status = matches ? '\x1b[32mPASS\x1b[0m' : '\x1b[31mFAIL\x1b[0m'
- const flagNote = check.compileFlag ? ` [needs feature('${check.compileFlag}')]` : ''
-
- console.log(` ${status} ${check.name}: ${check.gate} = ${JSON.stringify(actual)}${flagNote}`)
-
- if (matches) pass++
- else fail++
- }
- console.log()
-}
-
-console.log(`\nResult: ${pass} passed, ${fail} failed out of ${pass + fail} gates`)
-
-if (fail > 0) {
- console.log('\n\x1b[31mSome gates are not returning expected values!\x1b[0m')
- console.log('If CLAUDE_CODE_DISABLE_LOCAL_GATES=1 is set, all gates will return defaults.')
- process.exit(1)
-}
-
-console.log('\n\x1b[32mAll GrowthBook gates returning expected local defaults.\x1b[0m')
-console.log('\nNote: Compile-time feature() flags cannot be verified in this script.')
-console.log('Use "bun run dev" and test manually for features with [needs feature()] markers.')
diff --git a/src/bootstrap/src/entrypoints/agentSdkTypes.ts b/src/bootstrap/src/entrypoints/agentSdkTypes.ts
deleted file mode 100644
index 8491988f8..000000000
--- a/src/bootstrap/src/entrypoints/agentSdkTypes.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type HookEvent = any;
-export type ModelUsage = any;
diff --git a/src/bootstrap/src/tools/AgentTool/agentColorManager.ts b/src/bootstrap/src/tools/AgentTool/agentColorManager.ts
deleted file mode 100644
index b1a565c12..000000000
--- a/src/bootstrap/src/tools/AgentTool/agentColorManager.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AgentColorName = any;
diff --git a/src/bootstrap/src/types/hooks.ts b/src/bootstrap/src/types/hooks.ts
deleted file mode 100644
index ee7a626db..000000000
--- a/src/bootstrap/src/types/hooks.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type HookCallbackMatcher = any;
diff --git a/src/bootstrap/src/types/ids.ts b/src/bootstrap/src/types/ids.ts
deleted file mode 100644
index 34291796d..000000000
--- a/src/bootstrap/src/types/ids.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SessionId = any;
diff --git a/src/bootstrap/src/utils/crypto.ts b/src/bootstrap/src/utils/crypto.ts
deleted file mode 100644
index 61e51b7c0..000000000
--- a/src/bootstrap/src/utils/crypto.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type randomUUID = any;
diff --git a/src/bootstrap/src/utils/model/model.ts b/src/bootstrap/src/utils/model/model.ts
deleted file mode 100644
index 982102634..000000000
--- a/src/bootstrap/src/utils/model/model.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ModelSetting = any;
diff --git a/src/bootstrap/src/utils/model/modelStrings.ts b/src/bootstrap/src/utils/model/modelStrings.ts
deleted file mode 100644
index d632b76bf..000000000
--- a/src/bootstrap/src/utils/model/modelStrings.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ModelStrings = any;
diff --git a/src/bootstrap/src/utils/settings/constants.ts b/src/bootstrap/src/utils/settings/constants.ts
deleted file mode 100644
index b82138d6a..000000000
--- a/src/bootstrap/src/utils/settings/constants.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SettingSource = any;
diff --git a/src/bootstrap/src/utils/settings/settingsCache.ts b/src/bootstrap/src/utils/settings/settingsCache.ts
deleted file mode 100644
index 818a7b15c..000000000
--- a/src/bootstrap/src/utils/settings/settingsCache.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type resetSettingsCache = any;
diff --git a/src/bootstrap/src/utils/settings/types.ts b/src/bootstrap/src/utils/settings/types.ts
deleted file mode 100644
index dfe971ff5..000000000
--- a/src/bootstrap/src/utils/settings/types.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type PluginHookMatcher = any;
diff --git a/src/bootstrap/src/utils/signal.ts b/src/bootstrap/src/utils/signal.ts
deleted file mode 100644
index 7c6732c50..000000000
--- a/src/bootstrap/src/utils/signal.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type createSignal = any;
diff --git a/src/bridge/src/entrypoints/sdk/controlTypes.ts b/src/bridge/src/entrypoints/sdk/controlTypes.ts
deleted file mode 100644
index bd1b0590d..000000000
--- a/src/bridge/src/entrypoints/sdk/controlTypes.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type StdoutMessage = any;
diff --git a/src/cli/src/QueryEngine.ts b/src/cli/src/QueryEngine.ts
deleted file mode 100644
index 4771549b4..000000000
--- a/src/cli/src/QueryEngine.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ask = any;
diff --git a/src/cli/src/cli/handlers/auth.ts b/src/cli/src/cli/handlers/auth.ts
deleted file mode 100644
index c420d9446..000000000
--- a/src/cli/src/cli/handlers/auth.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type installOAuthTokens = any;
diff --git a/src/cli/src/cli/remoteIO.ts b/src/cli/src/cli/remoteIO.ts
deleted file mode 100644
index 0fc9133a5..000000000
--- a/src/cli/src/cli/remoteIO.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type RemoteIO = any;
diff --git a/src/cli/src/cli/structuredIO.ts b/src/cli/src/cli/structuredIO.ts
deleted file mode 100644
index 00c29d618..000000000
--- a/src/cli/src/cli/structuredIO.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type StructuredIO = any;
diff --git a/src/cli/src/commands/context/context-noninteractive.ts b/src/cli/src/commands/context/context-noninteractive.ts
deleted file mode 100644
index 08e0c07c7..000000000
--- a/src/cli/src/commands/context/context-noninteractive.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type collectContextData = any;
diff --git a/src/cli/src/entrypoints/agentSdkTypes.ts b/src/cli/src/entrypoints/agentSdkTypes.ts
deleted file mode 100644
index 4ac970c6e..000000000
--- a/src/cli/src/entrypoints/agentSdkTypes.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SDKStatus = any;
-export type ModelInfo = any;
-export type SDKMessage = any;
-export type SDKUserMessage = any;
-export type SDKUserMessageReplay = any;
-export type PermissionResult = any;
-export type McpServerConfigForProcessTransport = any;
-export type McpServerStatus = any;
-export type RewindFilesResult = any;
-export type HookEvent = any;
-export type HookInput = any;
-export type HookJSONOutput = any;
-export type PermissionUpdate = any;
diff --git a/src/cli/src/entrypoints/sdk/controlSchemas.ts b/src/cli/src/entrypoints/sdk/controlSchemas.ts
deleted file mode 100644
index 886758286..000000000
--- a/src/cli/src/entrypoints/sdk/controlSchemas.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SDKControlElicitationResponseSchema = any;
diff --git a/src/cli/src/entrypoints/sdk/controlTypes.ts b/src/cli/src/entrypoints/sdk/controlTypes.ts
deleted file mode 100644
index e78800ea8..000000000
--- a/src/cli/src/entrypoints/sdk/controlTypes.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type StdoutMessage = any;
-export type SDKControlInitializeRequest = any;
-export type SDKControlInitializeResponse = any;
-export type SDKControlRequest = any;
-export type SDKControlResponse = any;
-export type SDKControlMcpSetServersResponse = any;
-export type SDKControlReloadPluginsResponse = any;
-export type StdinMessage = any;
diff --git a/src/cli/src/hooks/useCanUseTool.ts b/src/cli/src/hooks/useCanUseTool.ts
deleted file mode 100644
index 056468f12..000000000
--- a/src/cli/src/hooks/useCanUseTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type CanUseToolFn = any;
diff --git a/src/cli/src/services/PromptSuggestion/promptSuggestion.ts b/src/cli/src/services/PromptSuggestion/promptSuggestion.ts
deleted file mode 100644
index 29070743b..000000000
--- a/src/cli/src/services/PromptSuggestion/promptSuggestion.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type tryGenerateSuggestion = any;
-export type logSuggestionOutcome = any;
-export type logSuggestionSuppressed = any;
-export type PromptVariant = any;
diff --git a/src/cli/src/services/analytics/growthbook.ts b/src/cli/src/services/analytics/growthbook.ts
deleted file mode 100644
index e380906ea..000000000
--- a/src/cli/src/services/analytics/growthbook.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getFeatureValue_CACHED_MAY_BE_STALE = any;
diff --git a/src/cli/src/services/analytics/index.ts b/src/cli/src/services/analytics/index.ts
deleted file mode 100644
index ce0a9a827..000000000
--- a/src/cli/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logEvent = any;
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
diff --git a/src/cli/src/services/api/grove.ts b/src/cli/src/services/api/grove.ts
deleted file mode 100644
index 5a12d8ce5..000000000
--- a/src/cli/src/services/api/grove.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isQualifiedForGrove = any;
-export type checkGroveForNonInteractive = any;
diff --git a/src/cli/src/services/api/logging.ts b/src/cli/src/services/api/logging.ts
deleted file mode 100644
index 2676d9ab3..000000000
--- a/src/cli/src/services/api/logging.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type EMPTY_USAGE = any;
diff --git a/src/cli/src/services/claudeAiLimits.ts b/src/cli/src/services/claudeAiLimits.ts
deleted file mode 100644
index 5d55387cb..000000000
--- a/src/cli/src/services/claudeAiLimits.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type statusListeners = any;
-export type ClaudeAILimits = any;
diff --git a/src/cli/src/services/mcp/auth.ts b/src/cli/src/services/mcp/auth.ts
deleted file mode 100644
index dd96658d0..000000000
--- a/src/cli/src/services/mcp/auth.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type performMCPOAuthFlow = any;
-export type revokeServerTokens = any;
diff --git a/src/cli/src/services/mcp/channelAllowlist.ts b/src/cli/src/services/mcp/channelAllowlist.ts
deleted file mode 100644
index 3bae533e2..000000000
--- a/src/cli/src/services/mcp/channelAllowlist.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isChannelAllowlisted = any;
-export type isChannelsEnabled = any;
diff --git a/src/cli/src/services/mcp/channelNotification.ts b/src/cli/src/services/mcp/channelNotification.ts
deleted file mode 100644
index 2068b3ea8..000000000
--- a/src/cli/src/services/mcp/channelNotification.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ChannelMessageNotificationSchema = any;
-export type gateChannelServer = any;
-export type wrapChannelMessage = any;
-export type findChannelEntry = any;
diff --git a/src/cli/src/services/mcp/client.ts b/src/cli/src/services/mcp/client.ts
deleted file mode 100644
index 845c793d7..000000000
--- a/src/cli/src/services/mcp/client.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type setupSdkMcpClients = any;
-export type connectToServer = any;
-export type clearServerCache = any;
-export type fetchToolsForClient = any;
-export type areMcpConfigsEqual = any;
-export type reconnectMcpServerImpl = any;
diff --git a/src/cli/src/services/mcp/config.ts b/src/cli/src/services/mcp/config.ts
deleted file mode 100644
index edc224ea5..000000000
--- a/src/cli/src/services/mcp/config.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type filterMcpServersByPolicy = any;
-export type getMcpConfigByName = any;
-export type isMcpServerDisabled = any;
-export type setMcpServerEnabled = any;
-export type getAllMcpConfigs = any;
diff --git a/src/cli/src/services/mcp/elicitationHandler.ts b/src/cli/src/services/mcp/elicitationHandler.ts
deleted file mode 100644
index 2b791775c..000000000
--- a/src/cli/src/services/mcp/elicitationHandler.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type runElicitationHooks = any;
-export type runElicitationResultHooks = any;
diff --git a/src/cli/src/services/mcp/mcpStringUtils.ts b/src/cli/src/services/mcp/mcpStringUtils.ts
deleted file mode 100644
index 9391a1b8a..000000000
--- a/src/cli/src/services/mcp/mcpStringUtils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getMcpPrefix = any;
diff --git a/src/cli/src/services/mcp/types.ts b/src/cli/src/services/mcp/types.ts
deleted file mode 100644
index 9e3199967..000000000
--- a/src/cli/src/services/mcp/types.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type MCPServerConnection = any;
-export type McpSdkServerConfig = any;
-export type ScopedMcpServerConfig = any;
diff --git a/src/cli/src/services/mcp/utils.ts b/src/cli/src/services/mcp/utils.ts
deleted file mode 100644
index d77aad08e..000000000
--- a/src/cli/src/services/mcp/utils.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type commandBelongsToServer = any;
-export type filterToolsByServer = any;
diff --git a/src/cli/src/services/mcp/vscodeSdkMcp.ts b/src/cli/src/services/mcp/vscodeSdkMcp.ts
deleted file mode 100644
index acf5f2d9d..000000000
--- a/src/cli/src/services/mcp/vscodeSdkMcp.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type setupVscodeSdkMcp = any;
diff --git a/src/cli/src/services/oauth/index.ts b/src/cli/src/services/oauth/index.ts
deleted file mode 100644
index 81adfa1dc..000000000
--- a/src/cli/src/services/oauth/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type OAuthService = any;
diff --git a/src/cli/src/services/policyLimits/index.ts b/src/cli/src/services/policyLimits/index.ts
deleted file mode 100644
index 887817d1a..000000000
--- a/src/cli/src/services/policyLimits/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isPolicyAllowed = any;
diff --git a/src/cli/src/services/remoteManagedSettings/index.ts b/src/cli/src/services/remoteManagedSettings/index.ts
deleted file mode 100644
index c062fff71..000000000
--- a/src/cli/src/services/remoteManagedSettings/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type waitForRemoteManagedSettingsToLoad = any;
diff --git a/src/cli/src/services/settingsSync/index.ts b/src/cli/src/services/settingsSync/index.ts
deleted file mode 100644
index 2974be7d5..000000000
--- a/src/cli/src/services/settingsSync/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type downloadUserSettings = any;
-export type redownloadUserSettings = any;
diff --git a/src/cli/src/state/AppStateStore.ts b/src/cli/src/state/AppStateStore.ts
deleted file mode 100644
index caf2928ae..000000000
--- a/src/cli/src/state/AppStateStore.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AppState = any;
diff --git a/src/cli/src/state/onChangeAppState.ts b/src/cli/src/state/onChangeAppState.ts
deleted file mode 100644
index 676171dd6..000000000
--- a/src/cli/src/state/onChangeAppState.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type externalMetadataToAppState = any;
diff --git a/src/cli/src/tools.ts b/src/cli/src/tools.ts
deleted file mode 100644
index ce74ff75d..000000000
--- a/src/cli/src/tools.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type assembleToolPool = any;
-export type filterToolsByDenyRules = any;
diff --git a/src/cli/src/utils/abortController.ts b/src/cli/src/utils/abortController.ts
deleted file mode 100644
index 50ffcbc73..000000000
--- a/src/cli/src/utils/abortController.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type createAbortController = any;
diff --git a/src/cli/src/utils/array.ts b/src/cli/src/utils/array.ts
deleted file mode 100644
index 6ca22d907..000000000
--- a/src/cli/src/utils/array.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type uniq = any;
diff --git a/src/cli/src/utils/auth.ts b/src/cli/src/utils/auth.ts
deleted file mode 100644
index 3322df66f..000000000
--- a/src/cli/src/utils/auth.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getAccountInformation = any;
diff --git a/src/cli/src/utils/autoUpdater.ts b/src/cli/src/utils/autoUpdater.ts
deleted file mode 100644
index 5241e3992..000000000
--- a/src/cli/src/utils/autoUpdater.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getLatestVersion = any;
-export type InstallStatus = any;
-export type installGlobalPackage = any;
diff --git a/src/cli/src/utils/awsAuthStatusManager.ts b/src/cli/src/utils/awsAuthStatusManager.ts
deleted file mode 100644
index d0ba68cc8..000000000
--- a/src/cli/src/utils/awsAuthStatusManager.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AwsAuthStatusManager = any;
diff --git a/src/cli/src/utils/betas.ts b/src/cli/src/utils/betas.ts
deleted file mode 100644
index 3e452b4d5..000000000
--- a/src/cli/src/utils/betas.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type modelSupportsAutoMode = any;
diff --git a/src/cli/src/utils/cleanupRegistry.ts b/src/cli/src/utils/cleanupRegistry.ts
deleted file mode 100644
index 4cbbdec8f..000000000
--- a/src/cli/src/utils/cleanupRegistry.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type registerCleanup = any;
diff --git a/src/cli/src/utils/combinedAbortSignal.ts b/src/cli/src/utils/combinedAbortSignal.ts
deleted file mode 100644
index 603e78f81..000000000
--- a/src/cli/src/utils/combinedAbortSignal.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type createCombinedAbortSignal = any;
diff --git a/src/cli/src/utils/commandLifecycle.ts b/src/cli/src/utils/commandLifecycle.ts
deleted file mode 100644
index d2f254135..000000000
--- a/src/cli/src/utils/commandLifecycle.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type notifyCommandLifecycle = any;
diff --git a/src/cli/src/utils/commitAttribution.ts b/src/cli/src/utils/commitAttribution.ts
deleted file mode 100644
index 4ee7a474d..000000000
--- a/src/cli/src/utils/commitAttribution.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type incrementPromptCount = any;
diff --git a/src/cli/src/utils/completionCache.ts b/src/cli/src/utils/completionCache.ts
deleted file mode 100644
index 1989a7093..000000000
--- a/src/cli/src/utils/completionCache.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type regenerateCompletionCache = any;
diff --git a/src/cli/src/utils/config.ts b/src/cli/src/utils/config.ts
deleted file mode 100644
index 12caa8ef9..000000000
--- a/src/cli/src/utils/config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getGlobalConfig = any;
-export type InstallMethod = any;
-export type saveGlobalConfig = any;
diff --git a/src/cli/src/utils/conversationRecovery.ts b/src/cli/src/utils/conversationRecovery.ts
deleted file mode 100644
index 76a469ddc..000000000
--- a/src/cli/src/utils/conversationRecovery.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type loadConversationForResume = any;
-export type TurnInterruptionState = any;
diff --git a/src/cli/src/utils/cwd.ts b/src/cli/src/utils/cwd.ts
deleted file mode 100644
index 76c192ed8..000000000
--- a/src/cli/src/utils/cwd.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getCwd = any;
diff --git a/src/cli/src/utils/debug.ts b/src/cli/src/utils/debug.ts
deleted file mode 100644
index c64d5960c..000000000
--- a/src/cli/src/utils/debug.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logForDebugging = any;
diff --git a/src/cli/src/utils/diagLogs.ts b/src/cli/src/utils/diagLogs.ts
deleted file mode 100644
index 35f6099b5..000000000
--- a/src/cli/src/utils/diagLogs.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logForDiagnosticsNoPII = any;
-export type withDiagnosticsTiming = any;
diff --git a/src/cli/src/utils/doctorDiagnostic.ts b/src/cli/src/utils/doctorDiagnostic.ts
deleted file mode 100644
index 02bff9d33..000000000
--- a/src/cli/src/utils/doctorDiagnostic.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getDoctorDiagnostic = any;
diff --git a/src/cli/src/utils/effort.ts b/src/cli/src/utils/effort.ts
deleted file mode 100644
index 323def36c..000000000
--- a/src/cli/src/utils/effort.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type modelSupportsEffort = any;
-export type modelSupportsMaxEffort = any;
-export type EFFORT_LEVELS = any;
-export type resolveAppliedEffort = any;
diff --git a/src/cli/src/utils/errors.ts b/src/cli/src/utils/errors.ts
deleted file mode 100644
index 6dd7f879d..000000000
--- a/src/cli/src/utils/errors.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AbortError = any;
diff --git a/src/cli/src/utils/fastMode.ts b/src/cli/src/utils/fastMode.ts
deleted file mode 100644
index e67ddafc1..000000000
--- a/src/cli/src/utils/fastMode.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isFastModeAvailable = any;
-export type isFastModeEnabled = any;
-export type isFastModeSupportedByModel = any;
-export type getFastModeState = any;
diff --git a/src/cli/src/utils/fileHistory.ts b/src/cli/src/utils/fileHistory.ts
deleted file mode 100644
index d925e9f9e..000000000
--- a/src/cli/src/utils/fileHistory.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type fileHistoryRewind = any;
-export type fileHistoryCanRestore = any;
-export type fileHistoryEnabled = any;
-export type fileHistoryGetDiffStats = any;
diff --git a/src/cli/src/utils/filePersistence/filePersistence.ts b/src/cli/src/utils/filePersistence/filePersistence.ts
deleted file mode 100644
index 57d7cf708..000000000
--- a/src/cli/src/utils/filePersistence/filePersistence.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type executeFilePersistence = any;
diff --git a/src/cli/src/utils/fileStateCache.ts b/src/cli/src/utils/fileStateCache.ts
deleted file mode 100644
index eca7afcd2..000000000
--- a/src/cli/src/utils/fileStateCache.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type createFileStateCacheWithSizeLimit = any;
-export type mergeFileStateCaches = any;
-export type READ_FILE_STATE_CACHE_SIZE = any;
diff --git a/src/cli/src/utils/forkedAgent.ts b/src/cli/src/utils/forkedAgent.ts
deleted file mode 100644
index fa626eedd..000000000
--- a/src/cli/src/utils/forkedAgent.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getLastCacheSafeParams = any;
diff --git a/src/cli/src/utils/generators.ts b/src/cli/src/utils/generators.ts
deleted file mode 100644
index c9f2bd6e0..000000000
--- a/src/cli/src/utils/generators.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type fromArray = any;
diff --git a/src/cli/src/utils/gracefulShutdown.ts b/src/cli/src/utils/gracefulShutdown.ts
deleted file mode 100644
index c7e6f98bb..000000000
--- a/src/cli/src/utils/gracefulShutdown.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type gracefulShutdown = any;
-export type gracefulShutdownSync = any;
-export type isShuttingDown = any;
diff --git a/src/cli/src/utils/headlessProfiler.ts b/src/cli/src/utils/headlessProfiler.ts
deleted file mode 100644
index 3028607aa..000000000
--- a/src/cli/src/utils/headlessProfiler.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type headlessProfilerStartTurn = any;
-export type headlessProfilerCheckpoint = any;
-export type logHeadlessProfilerTurn = any;
diff --git a/src/cli/src/utils/hooks.ts b/src/cli/src/utils/hooks.ts
deleted file mode 100644
index 28c15cff6..000000000
--- a/src/cli/src/utils/hooks.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type executeNotificationHooks = any;
diff --git a/src/cli/src/utils/hooks/AsyncHookRegistry.ts b/src/cli/src/utils/hooks/AsyncHookRegistry.ts
deleted file mode 100644
index eca6e2fbc..000000000
--- a/src/cli/src/utils/hooks/AsyncHookRegistry.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type finalizePendingAsyncHooks = any;
diff --git a/src/cli/src/utils/hooks/hookEvents.ts b/src/cli/src/utils/hooks/hookEvents.ts
deleted file mode 100644
index 88419b696..000000000
--- a/src/cli/src/utils/hooks/hookEvents.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type registerHookEventHandler = any;
diff --git a/src/cli/src/utils/idleTimeout.ts b/src/cli/src/utils/idleTimeout.ts
deleted file mode 100644
index 0b3bf81e9..000000000
--- a/src/cli/src/utils/idleTimeout.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type createIdleTimeoutManager = any;
diff --git a/src/cli/src/utils/json.ts b/src/cli/src/utils/json.ts
deleted file mode 100644
index d9646ab1f..000000000
--- a/src/cli/src/utils/json.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type safeParseJSON = any;
diff --git a/src/cli/src/utils/localInstaller.ts b/src/cli/src/utils/localInstaller.ts
deleted file mode 100644
index e51976252..000000000
--- a/src/cli/src/utils/localInstaller.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type installOrUpdateClaudePackage = any;
-export type localInstallationExists = any;
diff --git a/src/cli/src/utils/log.ts b/src/cli/src/utils/log.ts
deleted file mode 100644
index 989e1cdb7..000000000
--- a/src/cli/src/utils/log.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getInMemoryErrors = any;
-export type logError = any;
-export type logMCPDebug = any;
diff --git a/src/cli/src/utils/messageQueueManager.ts b/src/cli/src/utils/messageQueueManager.ts
deleted file mode 100644
index bf258e11d..000000000
--- a/src/cli/src/utils/messageQueueManager.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type dequeue = any;
-export type dequeueAllMatching = any;
-export type enqueue = any;
-export type hasCommandsInQueue = any;
-export type peek = any;
-export type subscribeToCommandQueue = any;
-export type getCommandsByMaxPriority = any;
diff --git a/src/cli/src/utils/messages.ts b/src/cli/src/utils/messages.ts
deleted file mode 100644
index 7a268a925..000000000
--- a/src/cli/src/utils/messages.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type createModelSwitchBreadcrumbs = any;
diff --git a/src/cli/src/utils/messages/mappers.ts b/src/cli/src/utils/messages/mappers.ts
deleted file mode 100644
index 94ac2ac78..000000000
--- a/src/cli/src/utils/messages/mappers.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type toInternalMessages = any;
-export type toSDKRateLimitInfo = any;
diff --git a/src/cli/src/utils/model/model.ts b/src/cli/src/utils/model/model.ts
deleted file mode 100644
index 7986ad040..000000000
--- a/src/cli/src/utils/model/model.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getDefaultMainLoopModel = any;
-export type getMainLoopModel = any;
-export type modelDisplayString = any;
-export type parseUserSpecifiedModel = any;
diff --git a/src/cli/src/utils/model/modelOptions.ts b/src/cli/src/utils/model/modelOptions.ts
deleted file mode 100644
index b95242f35..000000000
--- a/src/cli/src/utils/model/modelOptions.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getModelOptions = any;
diff --git a/src/cli/src/utils/model/modelStrings.ts b/src/cli/src/utils/model/modelStrings.ts
deleted file mode 100644
index ad029ac9b..000000000
--- a/src/cli/src/utils/model/modelStrings.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ensureModelStringsInitialized = any;
diff --git a/src/cli/src/utils/model/providers.ts b/src/cli/src/utils/model/providers.ts
deleted file mode 100644
index df87a41b4..000000000
--- a/src/cli/src/utils/model/providers.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getAPIProvider = any;
diff --git a/src/cli/src/utils/nativeInstaller/index.ts b/src/cli/src/utils/nativeInstaller/index.ts
deleted file mode 100644
index 397e06654..000000000
--- a/src/cli/src/utils/nativeInstaller/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type installLatest = any;
-export type removeInstalledSymlink = any;
diff --git a/src/cli/src/utils/nativeInstaller/packageManagers.ts b/src/cli/src/utils/nativeInstaller/packageManagers.ts
deleted file mode 100644
index e73db3d9b..000000000
--- a/src/cli/src/utils/nativeInstaller/packageManagers.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getPackageManager = any;
diff --git a/src/cli/src/utils/path.ts b/src/cli/src/utils/path.ts
deleted file mode 100644
index a965844dd..000000000
--- a/src/cli/src/utils/path.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type expandPath = any;
diff --git a/src/cli/src/utils/permissions/PermissionPromptToolResultSchema.ts b/src/cli/src/utils/permissions/PermissionPromptToolResultSchema.ts
deleted file mode 100644
index ab281b487..000000000
--- a/src/cli/src/utils/permissions/PermissionPromptToolResultSchema.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type outputSchema = any;
-export type permissionPromptToolResultToPermissionDecision = any;
-export type Output = any;
diff --git a/src/cli/src/utils/permissions/PermissionResult.ts b/src/cli/src/utils/permissions/PermissionResult.ts
deleted file mode 100644
index e09cead08..000000000
--- a/src/cli/src/utils/permissions/PermissionResult.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type PermissionDecision = any;
-export type PermissionDecisionReason = any;
diff --git a/src/cli/src/utils/permissions/permissionSetup.ts b/src/cli/src/utils/permissions/permissionSetup.ts
deleted file mode 100644
index b669de315..000000000
--- a/src/cli/src/utils/permissions/permissionSetup.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isAutoModeGateEnabled = any;
-export type getAutoModeUnavailableNotification = any;
-export type getAutoModeUnavailableReason = any;
-export type isBypassPermissionsModeDisabled = any;
-export type transitionPermissionMode = any;
diff --git a/src/cli/src/utils/permissions/permissions.ts b/src/cli/src/utils/permissions/permissions.ts
deleted file mode 100644
index e8f8477e9..000000000
--- a/src/cli/src/utils/permissions/permissions.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type hasPermissionsToUseTool = any;
diff --git a/src/cli/src/utils/plugins/pluginIdentifier.ts b/src/cli/src/utils/plugins/pluginIdentifier.ts
deleted file mode 100644
index a6ca96949..000000000
--- a/src/cli/src/utils/plugins/pluginIdentifier.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type parsePluginIdentifier = any;
diff --git a/src/cli/src/utils/process.ts b/src/cli/src/utils/process.ts
deleted file mode 100644
index f3fc51827..000000000
--- a/src/cli/src/utils/process.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type writeToStdout = any;
-export type registerProcessOutputErrorHandlers = any;
diff --git a/src/cli/src/utils/queryContext.ts b/src/cli/src/utils/queryContext.ts
deleted file mode 100644
index 258dfa1b8..000000000
--- a/src/cli/src/utils/queryContext.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type buildSideQuestionFallbackParams = any;
diff --git a/src/cli/src/utils/queryHelpers.ts b/src/cli/src/utils/queryHelpers.ts
deleted file mode 100644
index 39a3af855..000000000
--- a/src/cli/src/utils/queryHelpers.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type PermissionPromptTool = any;
-export type extractReadFilesFromMessages = any;
diff --git a/src/cli/src/utils/queryProfiler.ts b/src/cli/src/utils/queryProfiler.ts
deleted file mode 100644
index dd554afb0..000000000
--- a/src/cli/src/utils/queryProfiler.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type startQueryProfile = any;
-export type logQueryProfileReport = any;
diff --git a/src/cli/src/utils/sandbox/sandbox-adapter.ts b/src/cli/src/utils/sandbox/sandbox-adapter.ts
deleted file mode 100644
index edebe2640..000000000
--- a/src/cli/src/utils/sandbox/sandbox-adapter.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SandboxManager = any;
diff --git a/src/cli/src/utils/semver.ts b/src/cli/src/utils/semver.ts
deleted file mode 100644
index a786c8772..000000000
--- a/src/cli/src/utils/semver.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type gte = any;
diff --git a/src/cli/src/utils/sessionRestore.ts b/src/cli/src/utils/sessionRestore.ts
deleted file mode 100644
index 8b6aebfd1..000000000
--- a/src/cli/src/utils/sessionRestore.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type restoreAgentFromSession = any;
-export type restoreSessionStateFromLog = any;
diff --git a/src/cli/src/utils/sessionStart.ts b/src/cli/src/utils/sessionStart.ts
deleted file mode 100644
index 3bd206870..000000000
--- a/src/cli/src/utils/sessionStart.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type processSessionStartHooks = any;
-export type processSetupHooks = any;
-export type takeInitialUserMessage = any;
diff --git a/src/cli/src/utils/sessionState.ts b/src/cli/src/utils/sessionState.ts
deleted file mode 100644
index 48d9aa34e..000000000
--- a/src/cli/src/utils/sessionState.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getSessionState = any;
-export type notifySessionStateChanged = any;
-export type notifySessionMetadataChanged = any;
-export type setPermissionModeChangedListener = any;
-export type RequiresActionDetails = any;
-export type SessionExternalMetadata = any;
diff --git a/src/cli/src/utils/sessionStorage.ts b/src/cli/src/utils/sessionStorage.ts
deleted file mode 100644
index 52b0f4d80..000000000
--- a/src/cli/src/utils/sessionStorage.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type hydrateRemoteSession = any;
-export type hydrateFromCCRv2InternalEvents = any;
-export type resetSessionFilePointer = any;
-export type doesMessageExistInSession = any;
-export type findUnresolvedToolUse = any;
-export type recordAttributionSnapshot = any;
-export type saveAgentSetting = any;
-export type saveMode = any;
-export type saveAiGeneratedTitle = any;
-export type restoreSessionMetadata = any;
diff --git a/src/cli/src/utils/sessionTitle.ts b/src/cli/src/utils/sessionTitle.ts
deleted file mode 100644
index 3675a2811..000000000
--- a/src/cli/src/utils/sessionTitle.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type generateSessionTitle = any;
diff --git a/src/cli/src/utils/sessionUrl.ts b/src/cli/src/utils/sessionUrl.ts
deleted file mode 100644
index a416c74b9..000000000
--- a/src/cli/src/utils/sessionUrl.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type parseSessionIdentifier = any;
diff --git a/src/cli/src/utils/sideQuestion.ts b/src/cli/src/utils/sideQuestion.ts
deleted file mode 100644
index 1282d133e..000000000
--- a/src/cli/src/utils/sideQuestion.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type runSideQuestion = any;
diff --git a/src/cli/src/utils/stream.ts b/src/cli/src/utils/stream.ts
deleted file mode 100644
index 60b9b2220..000000000
--- a/src/cli/src/utils/stream.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Stream = any;
diff --git a/src/cli/src/utils/streamJsonStdoutGuard.ts b/src/cli/src/utils/streamJsonStdoutGuard.ts
deleted file mode 100644
index 05236b55e..000000000
--- a/src/cli/src/utils/streamJsonStdoutGuard.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type installStreamJsonStdoutGuard = any;
diff --git a/src/cli/src/utils/streamlinedTransform.ts b/src/cli/src/utils/streamlinedTransform.ts
deleted file mode 100644
index 439c126e0..000000000
--- a/src/cli/src/utils/streamlinedTransform.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type createStreamlinedTransformer = any;
diff --git a/src/cli/src/utils/thinking.ts b/src/cli/src/utils/thinking.ts
deleted file mode 100644
index 451decd5e..000000000
--- a/src/cli/src/utils/thinking.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ThinkingConfig = any;
-export type modelSupportsAdaptiveThinking = any;
diff --git a/src/cli/src/utils/toolPool.ts b/src/cli/src/utils/toolPool.ts
deleted file mode 100644
index 66c7603a6..000000000
--- a/src/cli/src/utils/toolPool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type mergeAndFilterTools = any;
diff --git a/src/cli/src/utils/uuid.ts b/src/cli/src/utils/uuid.ts
deleted file mode 100644
index a95ef5217..000000000
--- a/src/cli/src/utils/uuid.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type validateUuid = any;
diff --git a/src/cli/src/utils/workloadContext.ts b/src/cli/src/utils/workloadContext.ts
deleted file mode 100644
index c80322f82..000000000
--- a/src/cli/src/utils/workloadContext.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type runWithWorkload = any;
-export type WORKLOAD_CRON = any;
diff --git a/src/cli/transports/src/entrypoints/sdk/controlTypes.ts b/src/cli/transports/src/entrypoints/sdk/controlTypes.ts
deleted file mode 100644
index 513ee706d..000000000
--- a/src/cli/transports/src/entrypoints/sdk/controlTypes.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type StdoutMessage = any;
-export type SDKPartialAssistantMessage = any;
diff --git a/src/commands/compact/src/bootstrap/state.ts b/src/commands/compact/src/bootstrap/state.ts
deleted file mode 100644
index a860c549e..000000000
--- a/src/commands/compact/src/bootstrap/state.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type markPostCompaction = any;
diff --git a/src/commands/ide/src/services/analytics/index.ts b/src/commands/ide/src/services/analytics/index.ts
deleted file mode 100644
index 60402f927..000000000
--- a/src/commands/ide/src/services/analytics/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logEvent = any;
diff --git a/src/commands/install-github-app/src/components/CustomSelect/index.ts b/src/commands/install-github-app/src/components/CustomSelect/index.ts
deleted file mode 100644
index d95b49c7a..000000000
--- a/src/commands/install-github-app/src/components/CustomSelect/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Select = any;
diff --git a/src/commands/install-github-app/src/services/analytics/index.ts b/src/commands/install-github-app/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/commands/install-github-app/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/commands/install-github-app/src/utils/config.ts b/src/commands/install-github-app/src/utils/config.ts
deleted file mode 100644
index 507e64a40..000000000
--- a/src/commands/install-github-app/src/utils/config.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type saveGlobalConfig = any;
diff --git a/src/commands/plugin/src/services/analytics/index.ts b/src/commands/plugin/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/commands/plugin/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/commands/src/commands.ts b/src/commands/src/commands.ts
deleted file mode 100644
index 8552dd207..000000000
--- a/src/commands/src/commands.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type CommandResultDisplay = any;
diff --git a/src/commands/src/services/analytics/index.ts b/src/commands/src/services/analytics/index.ts
deleted file mode 100644
index 60402f927..000000000
--- a/src/commands/src/services/analytics/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logEvent = any;
diff --git a/src/commands/terminalSetup/src/utils/theme.ts b/src/commands/terminalSetup/src/utils/theme.ts
deleted file mode 100644
index 62c7ea83c..000000000
--- a/src/commands/terminalSetup/src/utils/theme.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ThemeName = any;
diff --git a/src/components/BuiltinStatusLine.tsx b/src/components/BuiltinStatusLine.tsx
deleted file mode 100644
index 733d5574b..000000000
--- a/src/components/BuiltinStatusLine.tsx
+++ /dev/null
@@ -1,151 +0,0 @@
-import React, { useEffect, useState } from 'react';
-import { formatCost } from '../cost-tracker.js';
-import { Box, Text, ProgressBar } from '@anthropic/ink';
-import { formatTokens } from '../utils/format.js';
-import { useTerminalSize } from '../hooks/useTerminalSize.js';
-
-type RateLimitBucket = {
- utilization: number;
- resets_at: number;
-};
-
-type BuiltinStatusLineProps = {
- modelName: string;
- contextUsedPct: number;
- usedTokens: number;
- contextWindowSize: number;
- totalCostUsd: number;
- rateLimits: {
- five_hour?: RateLimitBucket;
- seven_day?: RateLimitBucket;
- };
-};
-
-/**
- * Format a countdown from now until the given epoch time (in seconds).
- * Returns a compact human-readable string like "3h12m", "5d20h", "45m", or "now".
- */
-export function formatCountdown(epochSeconds: number): string {
- const diff = epochSeconds - Date.now() / 1000;
- if (diff <= 0) return 'now';
-
- const days = Math.floor(diff / 86400);
- const hours = Math.floor((diff % 86400) / 3600);
- const minutes = Math.floor((diff % 3600) / 60);
-
- if (days >= 1) return `${days}d${hours}h`;
- if (hours >= 1) return `${hours}h${minutes}m`;
- return `${minutes}m`;
-}
-
-function Separator() {
- return {' \u2502 '};
-}
-
-function BuiltinStatusLineInner({
- modelName,
- contextUsedPct,
- usedTokens,
- contextWindowSize,
- totalCostUsd,
- rateLimits,
-}: BuiltinStatusLineProps) {
- const { columns } = useTerminalSize();
-
- // Force re-render every 60s so countdowns stay current
- const [tick, setTick] = useState(0);
- useEffect(() => {
- const hasResetTime = (rateLimits.five_hour?.resets_at ?? 0) || (rateLimits.seven_day?.resets_at ?? 0);
- if (!hasResetTime) return;
- const id = setInterval(() => setTick(t => t + 1), 60_000);
- return () => clearInterval(id);
- }, [rateLimits.five_hour?.resets_at, rateLimits.seven_day?.resets_at]);
-
- // Suppress unused-variable lint for tick (it exists only to trigger re-renders)
- void tick;
-
- // Model display: use first two words (e.g. "Opus 4.6") instead of just first word
- const modelParts = modelName.split(' ');
- const shortModel = modelParts.length >= 2 ? `${modelParts[0]} ${modelParts[1]}` : modelName;
-
- const wide = columns >= 100;
- const narrow = columns < 60;
-
- const hasFiveHour = rateLimits.five_hour != null;
- const hasSevenDay = rateLimits.seven_day != null;
-
- const fiveHourPct = hasFiveHour ? Math.round(rateLimits.five_hour!.utilization * 100) : 0;
- const sevenDayPct = hasSevenDay ? Math.round(rateLimits.seven_day!.utilization * 100) : 0;
-
- // Token display: "50k/1M"
- const tokenDisplay = `${formatTokens(usedTokens)}/${formatTokens(contextWindowSize)}`;
-
- return (
-
- {/* Model name */}
- {shortModel}
-
- {/* Context usage with token counts */}
-
- Context
- {contextUsedPct}%
- {!narrow && ({tokenDisplay})}
-
- {/* 5-hour session rate limit */}
- {hasFiveHour && (
- <>
-
- Session
- {wide && (
- <>
-
-
- >
- )}
- {fiveHourPct}%
- {!narrow && rateLimits.five_hour!.resets_at > 0 && (
- {formatCountdown(rateLimits.five_hour!.resets_at)}
- )}
- >
- )}
-
- {/* 7-day weekly rate limit */}
- {hasSevenDay && (
- <>
-
- Weekly
- {wide && (
- <>
-
-
- >
- )}
- {sevenDayPct}%
- {!narrow && rateLimits.seven_day!.resets_at > 0 && (
- {formatCountdown(rateLimits.seven_day!.resets_at)}
- )}
- >
- )}
-
- {/* Cost */}
- {totalCostUsd > 0 && (
- <>
-
- {formatCost(totalCostUsd)}
- >
- )}
-
- );
-}
-
-export const BuiltinStatusLine = React.memo(BuiltinStatusLineInner);
diff --git a/src/components/FeedbackSurvey/src/hooks/useDynamicConfig.ts b/src/components/FeedbackSurvey/src/hooks/useDynamicConfig.ts
deleted file mode 100644
index 5657e8465..000000000
--- a/src/components/FeedbackSurvey/src/hooks/useDynamicConfig.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useDynamicConfig = any;
diff --git a/src/components/FeedbackSurvey/src/services/analytics/config.ts b/src/components/FeedbackSurvey/src/services/analytics/config.ts
deleted file mode 100644
index 5ce8a06db..000000000
--- a/src/components/FeedbackSurvey/src/services/analytics/config.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isFeedbackSurveyDisabled = any;
diff --git a/src/components/FeedbackSurvey/src/services/analytics/growthbook.ts b/src/components/FeedbackSurvey/src/services/analytics/growthbook.ts
deleted file mode 100644
index 1df9f09d9..000000000
--- a/src/components/FeedbackSurvey/src/services/analytics/growthbook.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getFeatureValue_CACHED_MAY_BE_STALE = any;
-export type checkStatsigFeatureGate_CACHED_MAY_BE_STALE = any;
diff --git a/src/components/FeedbackSurvey/src/services/analytics/index.ts b/src/components/FeedbackSurvey/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/components/FeedbackSurvey/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/components/HelpV2/src/hooks/useExitOnCtrlCDWithKeybindings.ts b/src/components/HelpV2/src/hooks/useExitOnCtrlCDWithKeybindings.ts
deleted file mode 100644
index 38810d68c..000000000
--- a/src/components/HelpV2/src/hooks/useExitOnCtrlCDWithKeybindings.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useExitOnCtrlCDWithKeybindings = any;
diff --git a/src/components/HelpV2/src/keybindings/useShortcutDisplay.ts b/src/components/HelpV2/src/keybindings/useShortcutDisplay.ts
deleted file mode 100644
index 351fb3f9e..000000000
--- a/src/components/HelpV2/src/keybindings/useShortcutDisplay.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useShortcutDisplay = any;
diff --git a/src/components/LogoV2/src/ink.ts b/src/components/LogoV2/src/ink.ts
deleted file mode 100644
index d373e1b93..000000000
--- a/src/components/LogoV2/src/ink.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Box = any;
-export type Text = any;
-export type useTheme = any;
diff --git a/src/components/LogoV2/src/services/analytics/growthbook.ts b/src/components/LogoV2/src/services/analytics/growthbook.ts
deleted file mode 100644
index 7e9a775d0..000000000
--- a/src/components/LogoV2/src/services/analytics/growthbook.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getDynamicConfig_CACHED_MAY_BE_STALE = any;
diff --git a/src/components/LogoV2/src/services/api/dumpPrompts.ts b/src/components/LogoV2/src/services/api/dumpPrompts.ts
deleted file mode 100644
index bba0c3d9a..000000000
--- a/src/components/LogoV2/src/services/api/dumpPrompts.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getDumpPromptsPath = any;
diff --git a/src/components/LogoV2/src/utils/config.ts b/src/components/LogoV2/src/utils/config.ts
deleted file mode 100644
index 7cf15deca..000000000
--- a/src/components/LogoV2/src/utils/config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getGlobalConfig = any;
-export type saveGlobalConfig = any;
diff --git a/src/components/LogoV2/src/utils/debug.ts b/src/components/LogoV2/src/utils/debug.ts
deleted file mode 100644
index 75bad1b41..000000000
--- a/src/components/LogoV2/src/utils/debug.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isDebugMode = any;
-export type isDebugToStdErr = any;
-export type getDebugLogPath = any;
diff --git a/src/components/LogoV2/src/utils/envUtils.ts b/src/components/LogoV2/src/utils/envUtils.ts
deleted file mode 100644
index deb349096..000000000
--- a/src/components/LogoV2/src/utils/envUtils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isEnvTruthy = any;
diff --git a/src/components/LogoV2/src/utils/sandbox/sandbox-adapter.ts b/src/components/LogoV2/src/utils/sandbox/sandbox-adapter.ts
deleted file mode 100644
index edebe2640..000000000
--- a/src/components/LogoV2/src/utils/sandbox/sandbox-adapter.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SandboxManager = any;
diff --git a/src/components/LogoV2/src/utils/settings/settings.ts b/src/components/LogoV2/src/utils/settings/settings.ts
deleted file mode 100644
index 7765101ae..000000000
--- a/src/components/LogoV2/src/utils/settings/settings.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getInitialSettings = any;
diff --git a/src/components/LogoV2/src/utils/startupProfiler.ts b/src/components/LogoV2/src/utils/startupProfiler.ts
deleted file mode 100644
index 16c5c6e4a..000000000
--- a/src/components/LogoV2/src/utils/startupProfiler.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getStartupPerfLogPath = any;
-export type isDetailedProfilingEnabled = any;
diff --git a/src/components/LogoV2/src/utils/systemTheme.ts b/src/components/LogoV2/src/utils/systemTheme.ts
deleted file mode 100644
index c69869078..000000000
--- a/src/components/LogoV2/src/utils/systemTheme.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type resolveThemeSetting = any;
diff --git a/src/components/PromptInput/src/context/notifications.ts b/src/components/PromptInput/src/context/notifications.ts
deleted file mode 100644
index 8db063f70..000000000
--- a/src/components/PromptInput/src/context/notifications.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Notification = any;
-export type useNotifications = any;
diff --git a/src/components/PromptInput/src/history.ts b/src/components/PromptInput/src/history.ts
deleted file mode 100644
index 626e5c17d..000000000
--- a/src/components/PromptInput/src/history.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getPastedTextRefNumLines = any;
diff --git a/src/components/PromptInput/src/hooks/useArrowKeyHistory.ts b/src/components/PromptInput/src/hooks/useArrowKeyHistory.ts
deleted file mode 100644
index 943c7404f..000000000
--- a/src/components/PromptInput/src/hooks/useArrowKeyHistory.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type HistoryMode = any;
diff --git a/src/components/PromptInput/src/hooks/useCommandQueue.ts b/src/components/PromptInput/src/hooks/useCommandQueue.ts
deleted file mode 100644
index ef6e2c885..000000000
--- a/src/components/PromptInput/src/hooks/useCommandQueue.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useCommandQueue = any;
diff --git a/src/components/PromptInput/src/hooks/useIdeAtMentioned.ts b/src/components/PromptInput/src/hooks/useIdeAtMentioned.ts
deleted file mode 100644
index c0d005f12..000000000
--- a/src/components/PromptInput/src/hooks/useIdeAtMentioned.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type IDEAtMentioned = any;
-export type useIdeAtMentioned = any;
diff --git a/src/components/PromptInput/src/ink.ts b/src/components/PromptInput/src/ink.ts
deleted file mode 100644
index 51d6eb4b7..000000000
--- a/src/components/PromptInput/src/ink.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Box = any;
-export type Text = any;
diff --git a/src/components/PromptInput/src/services/analytics/index.ts b/src/components/PromptInput/src/services/analytics/index.ts
deleted file mode 100644
index ce0a9a827..000000000
--- a/src/components/PromptInput/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logEvent = any;
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
diff --git a/src/components/PromptInput/src/state/AppState.ts b/src/components/PromptInput/src/state/AppState.ts
deleted file mode 100644
index 46a69cf69..000000000
--- a/src/components/PromptInput/src/state/AppState.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useAppState = any;
-export type useAppStateStore = any;
-export type AppState = any;
-export type useSetAppState = any;
diff --git a/src/components/PromptInput/src/state/AppStateStore.ts b/src/components/PromptInput/src/state/AppStateStore.ts
deleted file mode 100644
index f27111408..000000000
--- a/src/components/PromptInput/src/state/AppStateStore.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FooterItem = any;
diff --git a/src/components/PromptInput/src/tools/AgentTool/agentColorManager.ts b/src/components/PromptInput/src/tools/AgentTool/agentColorManager.ts
deleted file mode 100644
index e2c6f578c..000000000
--- a/src/components/PromptInput/src/tools/AgentTool/agentColorManager.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AGENT_COLOR_TO_THEME_COLOR = any;
-export type AGENT_COLORS = any;
-export type AgentColorName = any;
diff --git a/src/components/PromptInput/src/types/textInputTypes.ts b/src/components/PromptInput/src/types/textInputTypes.ts
deleted file mode 100644
index a289d0789..000000000
--- a/src/components/PromptInput/src/types/textInputTypes.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type PromptInputMode = any;
diff --git a/src/components/PromptInput/src/utils/config.ts b/src/components/PromptInput/src/utils/config.ts
deleted file mode 100644
index 7e541740c..000000000
--- a/src/components/PromptInput/src/utils/config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getGlobalConfig = any;
-export type PastedContent = any;
diff --git a/src/components/PromptInput/src/utils/cwd.ts b/src/components/PromptInput/src/utils/cwd.ts
deleted file mode 100644
index 76c192ed8..000000000
--- a/src/components/PromptInput/src/utils/cwd.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getCwd = any;
diff --git a/src/components/PromptInput/src/utils/exampleCommands.ts b/src/components/PromptInput/src/utils/exampleCommands.ts
deleted file mode 100644
index c6ce8c5e9..000000000
--- a/src/components/PromptInput/src/utils/exampleCommands.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getExampleCommandFromCache = any;
diff --git a/src/components/PromptInput/src/utils/messageQueueManager.ts b/src/components/PromptInput/src/utils/messageQueueManager.ts
deleted file mode 100644
index a08a46829..000000000
--- a/src/components/PromptInput/src/utils/messageQueueManager.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isQueuedCommandEditable = any;
-export type popAllEditable = any;
diff --git a/src/components/PromptInput/src/utils/platform.ts b/src/components/PromptInput/src/utils/platform.ts
deleted file mode 100644
index b6686f812..000000000
--- a/src/components/PromptInput/src/utils/platform.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getPlatform = any;
diff --git a/src/components/PromptInput/src/utils/teammate.ts b/src/components/PromptInput/src/utils/teammate.ts
deleted file mode 100644
index fb30f2184..000000000
--- a/src/components/PromptInput/src/utils/teammate.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getTeammateColor = any;
diff --git a/src/components/PromptInput/src/utils/theme.ts b/src/components/PromptInput/src/utils/theme.ts
deleted file mode 100644
index c6999a678..000000000
--- a/src/components/PromptInput/src/utils/theme.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Theme = any;
diff --git a/src/components/Settings/src/commands/extra-usage/index.ts b/src/components/Settings/src/commands/extra-usage/index.ts
deleted file mode 100644
index 981d9a598..000000000
--- a/src/components/Settings/src/commands/extra-usage/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type extraUsage = any;
diff --git a/src/components/Settings/src/constants/outputStyles.ts b/src/components/Settings/src/constants/outputStyles.ts
deleted file mode 100644
index 42c1edbfa..000000000
--- a/src/components/Settings/src/constants/outputStyles.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type DEFAULT_OUTPUT_STYLE_NAME = any;
diff --git a/src/components/Settings/src/cost-tracker.ts b/src/components/Settings/src/cost-tracker.ts
deleted file mode 100644
index 135cea9b7..000000000
--- a/src/components/Settings/src/cost-tracker.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type formatCost = any;
diff --git a/src/components/Settings/src/services/analytics/index.ts b/src/components/Settings/src/services/analytics/index.ts
deleted file mode 100644
index ce0a9a827..000000000
--- a/src/components/Settings/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logEvent = any;
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
diff --git a/src/components/Settings/src/utils/auth.ts b/src/components/Settings/src/utils/auth.ts
deleted file mode 100644
index d7b41ce38..000000000
--- a/src/components/Settings/src/utils/auth.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getSubscriptionType = any;
diff --git a/src/components/Settings/src/utils/claudemd.ts b/src/components/Settings/src/utils/claudemd.ts
deleted file mode 100644
index 1ebadee7b..000000000
--- a/src/components/Settings/src/utils/claudemd.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getExternalClaudeMdIncludes = any;
-export type getMemoryFiles = any;
-export type hasExternalClaudeMdIncludes = any;
diff --git a/src/components/Settings/src/utils/envUtils.ts b/src/components/Settings/src/utils/envUtils.ts
deleted file mode 100644
index 04dde7791..000000000
--- a/src/components/Settings/src/utils/envUtils.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isEnvTruthy = any;
-export type isRunningOnHomespace = any;
diff --git a/src/components/StructuredDiff/src/utils/theme.ts b/src/components/StructuredDiff/src/utils/theme.ts
deleted file mode 100644
index 62c7ea83c..000000000
--- a/src/components/StructuredDiff/src/utils/theme.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ThemeName = any;
diff --git a/src/components/TrustDialog/src/services/analytics/index.ts b/src/components/TrustDialog/src/services/analytics/index.ts
deleted file mode 100644
index 60402f927..000000000
--- a/src/components/TrustDialog/src/services/analytics/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logEvent = any;
diff --git a/src/components/TrustDialog/src/utils/permissions/PermissionRule.ts b/src/components/TrustDialog/src/utils/permissions/PermissionRule.ts
deleted file mode 100644
index 349593ae4..000000000
--- a/src/components/TrustDialog/src/utils/permissions/PermissionRule.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type PermissionRule = any;
diff --git a/src/components/TrustDialog/src/utils/settings/settings.ts b/src/components/TrustDialog/src/utils/settings/settings.ts
deleted file mode 100644
index 76099c0ec..000000000
--- a/src/components/TrustDialog/src/utils/settings/settings.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getSettingsForSource = any;
diff --git a/src/components/TrustDialog/src/utils/settings/types.ts b/src/components/TrustDialog/src/utils/settings/types.ts
deleted file mode 100644
index 2e9d3270c..000000000
--- a/src/components/TrustDialog/src/utils/settings/types.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SettingsJson = any;
diff --git a/src/components/agents/new-agent-creation/wizard-steps/src/services/analytics/index.ts b/src/components/agents/new-agent-creation/wizard-steps/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/components/agents/new-agent-creation/wizard-steps/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/components/agents/new-agent-creation/wizard-steps/src/state/AppState.ts b/src/components/agents/new-agent-creation/wizard-steps/src/state/AppState.ts
deleted file mode 100644
index 93788b82c..000000000
--- a/src/components/agents/new-agent-creation/wizard-steps/src/state/AppState.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useSetAppState = any;
diff --git a/src/components/agents/src/Tool.ts b/src/components/agents/src/Tool.ts
deleted file mode 100644
index 03b2b7ee7..000000000
--- a/src/components/agents/src/Tool.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Tool = any;
-export type Tools = any;
-export type getEmptyToolPermissionContext = any;
diff --git a/src/components/agents/src/context.ts b/src/components/agents/src/context.ts
deleted file mode 100644
index 3ce849ca0..000000000
--- a/src/components/agents/src/context.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getUserContext = any;
diff --git a/src/components/agents/src/services/api/claude.ts b/src/components/agents/src/services/api/claude.ts
deleted file mode 100644
index b02c1424c..000000000
--- a/src/components/agents/src/services/api/claude.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type queryModelWithoutStreaming = any;
diff --git a/src/components/agents/src/services/mcp/mcpStringUtils.ts b/src/components/agents/src/services/mcp/mcpStringUtils.ts
deleted file mode 100644
index 6813ff192..000000000
--- a/src/components/agents/src/services/mcp/mcpStringUtils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type mcpInfoFromString = any;
diff --git a/src/components/agents/src/services/mcp/utils.ts b/src/components/agents/src/services/mcp/utils.ts
deleted file mode 100644
index 3bd1bb388..000000000
--- a/src/components/agents/src/services/mcp/utils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isMcpTool = any;
diff --git a/src/components/agents/src/state/AppState.ts b/src/components/agents/src/state/AppState.ts
deleted file mode 100644
index 93788b82c..000000000
--- a/src/components/agents/src/state/AppState.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useSetAppState = any;
diff --git a/src/components/agents/src/tools/AgentTool/agentToolUtils.ts b/src/components/agents/src/tools/AgentTool/agentToolUtils.ts
deleted file mode 100644
index 1a95f5b3f..000000000
--- a/src/components/agents/src/tools/AgentTool/agentToolUtils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type filterToolsForAgent = any;
diff --git a/src/components/agents/src/tools/AgentTool/constants.ts b/src/components/agents/src/tools/AgentTool/constants.ts
deleted file mode 100644
index c5969e5de..000000000
--- a/src/components/agents/src/tools/AgentTool/constants.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AGENT_TOOL_NAME = any;
diff --git a/src/components/agents/src/tools/BashTool/BashTool.ts b/src/components/agents/src/tools/BashTool/BashTool.ts
deleted file mode 100644
index 7a3ea3cc5..000000000
--- a/src/components/agents/src/tools/BashTool/BashTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type BashTool = any;
diff --git a/src/components/agents/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts b/src/components/agents/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts
deleted file mode 100644
index f9708d2b3..000000000
--- a/src/components/agents/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ExitPlanModeV2Tool = any;
diff --git a/src/components/agents/src/tools/FileEditTool/FileEditTool.ts b/src/components/agents/src/tools/FileEditTool/FileEditTool.ts
deleted file mode 100644
index 0d3bc60eb..000000000
--- a/src/components/agents/src/tools/FileEditTool/FileEditTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FileEditTool = any;
diff --git a/src/components/agents/src/tools/FileReadTool/FileReadTool.ts b/src/components/agents/src/tools/FileReadTool/FileReadTool.ts
deleted file mode 100644
index b9ca41b17..000000000
--- a/src/components/agents/src/tools/FileReadTool/FileReadTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FileReadTool = any;
diff --git a/src/components/agents/src/tools/FileWriteTool/FileWriteTool.ts b/src/components/agents/src/tools/FileWriteTool/FileWriteTool.ts
deleted file mode 100644
index 9417a7a94..000000000
--- a/src/components/agents/src/tools/FileWriteTool/FileWriteTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FileWriteTool = any;
diff --git a/src/components/agents/src/tools/GlobTool/GlobTool.ts b/src/components/agents/src/tools/GlobTool/GlobTool.ts
deleted file mode 100644
index a411d3dd7..000000000
--- a/src/components/agents/src/tools/GlobTool/GlobTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type GlobTool = any;
diff --git a/src/components/agents/src/tools/GrepTool/GrepTool.ts b/src/components/agents/src/tools/GrepTool/GrepTool.ts
deleted file mode 100644
index 0ed073688..000000000
--- a/src/components/agents/src/tools/GrepTool/GrepTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type GrepTool = any;
diff --git a/src/components/agents/src/tools/ListMcpResourcesTool/ListMcpResourcesTool.ts b/src/components/agents/src/tools/ListMcpResourcesTool/ListMcpResourcesTool.ts
deleted file mode 100644
index 17b103d50..000000000
--- a/src/components/agents/src/tools/ListMcpResourcesTool/ListMcpResourcesTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ListMcpResourcesTool = any;
diff --git a/src/components/agents/src/tools/NotebookEditTool/NotebookEditTool.ts b/src/components/agents/src/tools/NotebookEditTool/NotebookEditTool.ts
deleted file mode 100644
index 9ebe8c2b0..000000000
--- a/src/components/agents/src/tools/NotebookEditTool/NotebookEditTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type NotebookEditTool = any;
diff --git a/src/components/agents/src/tools/ReadMcpResourceTool/ReadMcpResourceTool.ts b/src/components/agents/src/tools/ReadMcpResourceTool/ReadMcpResourceTool.ts
deleted file mode 100644
index bee0f9bdd..000000000
--- a/src/components/agents/src/tools/ReadMcpResourceTool/ReadMcpResourceTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ReadMcpResourceTool = any;
diff --git a/src/components/agents/src/tools/TaskOutputTool/TaskOutputTool.ts b/src/components/agents/src/tools/TaskOutputTool/TaskOutputTool.ts
deleted file mode 100644
index f77e9dbfb..000000000
--- a/src/components/agents/src/tools/TaskOutputTool/TaskOutputTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type TaskOutputTool = any;
diff --git a/src/components/agents/src/tools/TaskStopTool/TaskStopTool.ts b/src/components/agents/src/tools/TaskStopTool/TaskStopTool.ts
deleted file mode 100644
index 0a069d4d0..000000000
--- a/src/components/agents/src/tools/TaskStopTool/TaskStopTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type TaskStopTool = any;
diff --git a/src/components/agents/src/tools/TodoWriteTool/TodoWriteTool.ts b/src/components/agents/src/tools/TodoWriteTool/TodoWriteTool.ts
deleted file mode 100644
index ce5e439e1..000000000
--- a/src/components/agents/src/tools/TodoWriteTool/TodoWriteTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type TodoWriteTool = any;
diff --git a/src/components/agents/src/tools/TungstenTool/TungstenTool.ts b/src/components/agents/src/tools/TungstenTool/TungstenTool.ts
deleted file mode 100644
index e86bbfbe8..000000000
--- a/src/components/agents/src/tools/TungstenTool/TungstenTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type TungstenTool = any;
diff --git a/src/components/agents/src/tools/WebFetchTool/WebFetchTool.ts b/src/components/agents/src/tools/WebFetchTool/WebFetchTool.ts
deleted file mode 100644
index 97d4995f7..000000000
--- a/src/components/agents/src/tools/WebFetchTool/WebFetchTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type WebFetchTool = any;
diff --git a/src/components/agents/src/tools/WebSearchTool/WebSearchTool.ts b/src/components/agents/src/tools/WebSearchTool/WebSearchTool.ts
deleted file mode 100644
index 606345335..000000000
--- a/src/components/agents/src/tools/WebSearchTool/WebSearchTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type WebSearchTool = any;
diff --git a/src/components/agents/src/utils/api.ts b/src/components/agents/src/utils/api.ts
deleted file mode 100644
index d5a1bbc37..000000000
--- a/src/components/agents/src/utils/api.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type prependUserContext = any;
diff --git a/src/components/agents/src/utils/messages.ts b/src/components/agents/src/utils/messages.ts
deleted file mode 100644
index 4c11a77c9..000000000
--- a/src/components/agents/src/utils/messages.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type createUserMessage = any;
-export type normalizeMessagesForAPI = any;
diff --git a/src/components/agents/src/utils/model/model.ts b/src/components/agents/src/utils/model/model.ts
deleted file mode 100644
index abf3bce15..000000000
--- a/src/components/agents/src/utils/model/model.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ModelName = any;
diff --git a/src/components/agents/src/utils/settings/constants.ts b/src/components/agents/src/utils/settings/constants.ts
deleted file mode 100644
index 48b2b5a37..000000000
--- a/src/components/agents/src/utils/settings/constants.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SettingSource = any;
-export type getSettingSourceName = any;
diff --git a/src/components/agents/src/utils/settings/managedPath.ts b/src/components/agents/src/utils/settings/managedPath.ts
deleted file mode 100644
index 1214f262c..000000000
--- a/src/components/agents/src/utils/settings/managedPath.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getManagedFilePath = any;
diff --git a/src/components/design-system/ThemedBox.tsx b/src/components/design-system/ThemedBox.tsx
deleted file mode 100644
index 30059f318..000000000
--- a/src/components/design-system/ThemedBox.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export { Box as default } from '@anthropic/ink'
diff --git a/src/components/grove/src/services/analytics/index.ts b/src/components/grove/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/components/grove/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/components/hooks/src/entrypoints/agentSdkTypes.ts b/src/components/hooks/src/entrypoints/agentSdkTypes.ts
deleted file mode 100644
index 2ad98a3ad..000000000
--- a/src/components/hooks/src/entrypoints/agentSdkTypes.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type HookEvent = any;
diff --git a/src/components/hooks/src/state/AppState.ts b/src/components/hooks/src/state/AppState.ts
deleted file mode 100644
index cbb9746b4..000000000
--- a/src/components/hooks/src/state/AppState.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useAppState = any;
-export type useAppStateStore = any;
diff --git a/src/components/hooks/src/utils/hooks/hooksConfigManager.ts b/src/components/hooks/src/utils/hooks/hooksConfigManager.ts
deleted file mode 100644
index 33a2e63cc..000000000
--- a/src/components/hooks/src/utils/hooks/hooksConfigManager.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type HookEventMetadata = any;
diff --git a/src/components/mcp/src/services/analytics/index.ts b/src/components/mcp/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/components/mcp/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/components/mcp/src/services/mcp/config.ts b/src/components/mcp/src/services/mcp/config.ts
deleted file mode 100644
index 05cc41c4c..000000000
--- a/src/components/mcp/src/services/mcp/config.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getMcpConfigsByScope = any;
diff --git a/src/components/mcp/src/services/mcp/types.ts b/src/components/mcp/src/services/mcp/types.ts
deleted file mode 100644
index f604edd2e..000000000
--- a/src/components/mcp/src/services/mcp/types.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ConfigScope = any;
diff --git a/src/components/mcp/src/services/mcp/utils.ts b/src/components/mcp/src/services/mcp/utils.ts
deleted file mode 100644
index e6cf8a737..000000000
--- a/src/components/mcp/src/services/mcp/utils.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type describeMcpConfigFilePath = any;
-export type getScopeLabel = any;
diff --git a/src/components/mcp/src/utils/settings/validation.ts b/src/components/mcp/src/utils/settings/validation.ts
deleted file mode 100644
index 6ed579a6a..000000000
--- a/src/components/mcp/src/utils/settings/validation.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ValidationError = any;
diff --git a/src/components/messages/UserToolResultMessage/src/components/InterruptedByUser.ts b/src/components/messages/UserToolResultMessage/src/components/InterruptedByUser.ts
deleted file mode 100644
index b98ac191d..000000000
--- a/src/components/messages/UserToolResultMessage/src/components/InterruptedByUser.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type InterruptedByUser = any;
diff --git a/src/components/messages/UserToolResultMessage/src/components/Markdown.ts b/src/components/messages/UserToolResultMessage/src/components/Markdown.ts
deleted file mode 100644
index 44bbabff4..000000000
--- a/src/components/messages/UserToolResultMessage/src/components/Markdown.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Markdown = any;
diff --git a/src/components/messages/UserToolResultMessage/src/components/MessageResponse.ts b/src/components/messages/UserToolResultMessage/src/components/MessageResponse.ts
deleted file mode 100644
index cc1c024e1..000000000
--- a/src/components/messages/UserToolResultMessage/src/components/MessageResponse.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type MessageResponse = any;
diff --git a/src/components/messages/UserToolResultMessage/src/components/SentryErrorBoundary.ts b/src/components/messages/UserToolResultMessage/src/components/SentryErrorBoundary.ts
deleted file mode 100644
index 6c2e95bfc..000000000
--- a/src/components/messages/UserToolResultMessage/src/components/SentryErrorBoundary.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SentryErrorBoundary = any;
diff --git a/src/components/messages/src/commands/extra-usage/index.ts b/src/components/messages/src/commands/extra-usage/index.ts
deleted file mode 100644
index 981d9a598..000000000
--- a/src/components/messages/src/commands/extra-usage/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type extraUsage = any;
diff --git a/src/components/messages/src/entrypoints/agentSdkTypes.ts b/src/components/messages/src/entrypoints/agentSdkTypes.ts
deleted file mode 100644
index 2ad98a3ad..000000000
--- a/src/components/messages/src/entrypoints/agentSdkTypes.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type HookEvent = any;
diff --git a/src/components/messages/src/hooks/useTerminalSize.ts b/src/components/messages/src/hooks/useTerminalSize.ts
deleted file mode 100644
index 4a0ef3ea3..000000000
--- a/src/components/messages/src/hooks/useTerminalSize.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useTerminalSize = any;
diff --git a/src/components/messages/src/ink.ts b/src/components/messages/src/ink.ts
deleted file mode 100644
index 51d6eb4b7..000000000
--- a/src/components/messages/src/ink.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Box = any;
-export type Text = any;
diff --git a/src/components/messages/src/services/api/errorUtils.ts b/src/components/messages/src/services/api/errorUtils.ts
deleted file mode 100644
index b931a01ac..000000000
--- a/src/components/messages/src/services/api/errorUtils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type formatAPIError = any;
diff --git a/src/components/messages/src/services/claudeAiLimitsHook.ts b/src/components/messages/src/services/claudeAiLimitsHook.ts
deleted file mode 100644
index 617852958..000000000
--- a/src/components/messages/src/services/claudeAiLimitsHook.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useClaudeAiLimits = any;
diff --git a/src/components/messages/src/services/compact/compact.ts b/src/components/messages/src/services/compact/compact.ts
deleted file mode 100644
index 628b299f4..000000000
--- a/src/components/messages/src/services/compact/compact.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ERROR_MESSAGE_USER_ABORT = any;
diff --git a/src/components/messages/src/services/rateLimitMessages.ts b/src/components/messages/src/services/rateLimitMessages.ts
deleted file mode 100644
index 3bad4ecc1..000000000
--- a/src/components/messages/src/services/rateLimitMessages.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isRateLimitErrorMessage = any;
diff --git a/src/components/messages/src/services/rateLimitMocking.ts b/src/components/messages/src/services/rateLimitMocking.ts
deleted file mode 100644
index dcb1004a0..000000000
--- a/src/components/messages/src/services/rateLimitMocking.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type shouldProcessMockLimits = any;
diff --git a/src/components/messages/src/types/message.ts b/src/components/messages/src/types/message.ts
deleted file mode 100644
index 0e8a93593..000000000
--- a/src/components/messages/src/types/message.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SystemAPIErrorMessage = any;
diff --git a/src/components/messages/src/utils/attachments.ts b/src/components/messages/src/utils/attachments.ts
deleted file mode 100644
index 69d3ceac5..000000000
--- a/src/components/messages/src/utils/attachments.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Attachment = any;
diff --git a/src/components/messages/src/utils/auth.ts b/src/components/messages/src/utils/auth.ts
deleted file mode 100644
index 4a25a2f83..000000000
--- a/src/components/messages/src/utils/auth.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getRateLimitTier = any;
-export type getSubscriptionType = any;
-export type isClaudeAISubscriber = any;
diff --git a/src/components/messages/src/utils/billing.ts b/src/components/messages/src/utils/billing.ts
deleted file mode 100644
index fd3cae2d7..000000000
--- a/src/components/messages/src/utils/billing.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type hasClaudeAiBillingAccess = any;
diff --git a/src/components/messages/src/utils/file.ts b/src/components/messages/src/utils/file.ts
deleted file mode 100644
index 74475b437..000000000
--- a/src/components/messages/src/utils/file.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getDisplayPath = any;
diff --git a/src/components/messages/src/utils/format.ts b/src/components/messages/src/utils/format.ts
deleted file mode 100644
index 0fcc3e5ee..000000000
--- a/src/components/messages/src/utils/format.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type formatFileSize = any;
diff --git a/src/components/messages/src/utils/messages.ts b/src/components/messages/src/utils/messages.ts
deleted file mode 100644
index f552071d2..000000000
--- a/src/components/messages/src/utils/messages.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type buildMessageLookups = any;
-export type getContentText = any;
diff --git a/src/components/messages/src/utils/theme.ts b/src/components/messages/src/utils/theme.ts
deleted file mode 100644
index 6c2dc45a6..000000000
--- a/src/components/messages/src/utils/theme.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ThemeName = any;
-export type Theme = any;
diff --git a/src/components/permissions/ExitPlanModePermissionRequest/src/context/notifications.ts b/src/components/permissions/ExitPlanModePermissionRequest/src/context/notifications.ts
deleted file mode 100644
index 82956e65a..000000000
--- a/src/components/permissions/ExitPlanModePermissionRequest/src/context/notifications.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useNotifications = any;
diff --git a/src/components/permissions/ExitPlanModePermissionRequest/src/services/analytics/index.ts b/src/components/permissions/ExitPlanModePermissionRequest/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/components/permissions/ExitPlanModePermissionRequest/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/components/permissions/ExitPlanModePermissionRequest/src/state/AppState.ts b/src/components/permissions/ExitPlanModePermissionRequest/src/state/AppState.ts
deleted file mode 100644
index f1e2aa661..000000000
--- a/src/components/permissions/ExitPlanModePermissionRequest/src/state/AppState.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useAppState = any;
-export type useAppStateStore = any;
-export type useSetAppState = any;
diff --git a/src/components/permissions/FileEditPermissionRequest/src/components/FileEditToolDiff.ts b/src/components/permissions/FileEditPermissionRequest/src/components/FileEditToolDiff.ts
deleted file mode 100644
index d6d114f60..000000000
--- a/src/components/permissions/FileEditPermissionRequest/src/components/FileEditToolDiff.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FileEditToolDiff = any;
diff --git a/src/components/permissions/FileEditPermissionRequest/src/utils/cwd.ts b/src/components/permissions/FileEditPermissionRequest/src/utils/cwd.ts
deleted file mode 100644
index 76c192ed8..000000000
--- a/src/components/permissions/FileEditPermissionRequest/src/utils/cwd.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getCwd = any;
diff --git a/src/components/permissions/FilePermissionDialog/src/state/AppState.ts b/src/components/permissions/FilePermissionDialog/src/state/AppState.ts
deleted file mode 100644
index 3c93608d8..000000000
--- a/src/components/permissions/FilePermissionDialog/src/state/AppState.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useAppState = any;
diff --git a/src/components/permissions/SedEditPermissionRequest/src/components/FileEditToolDiff.ts b/src/components/permissions/SedEditPermissionRequest/src/components/FileEditToolDiff.ts
deleted file mode 100644
index d6d114f60..000000000
--- a/src/components/permissions/SedEditPermissionRequest/src/components/FileEditToolDiff.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FileEditToolDiff = any;
diff --git a/src/components/permissions/SedEditPermissionRequest/src/utils/cwd.ts b/src/components/permissions/SedEditPermissionRequest/src/utils/cwd.ts
deleted file mode 100644
index 76c192ed8..000000000
--- a/src/components/permissions/SedEditPermissionRequest/src/utils/cwd.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getCwd = any;
diff --git a/src/components/permissions/SedEditPermissionRequest/src/utils/errors.ts b/src/components/permissions/SedEditPermissionRequest/src/utils/errors.ts
deleted file mode 100644
index 8ccaeabf1..000000000
--- a/src/components/permissions/SedEditPermissionRequest/src/utils/errors.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isENOENT = any;
diff --git a/src/components/permissions/SedEditPermissionRequest/src/utils/fileRead.ts b/src/components/permissions/SedEditPermissionRequest/src/utils/fileRead.ts
deleted file mode 100644
index 69d200068..000000000
--- a/src/components/permissions/SedEditPermissionRequest/src/utils/fileRead.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type detectEncodingForResolvedPath = any;
diff --git a/src/components/permissions/SedEditPermissionRequest/src/utils/fsOperations.ts b/src/components/permissions/SedEditPermissionRequest/src/utils/fsOperations.ts
deleted file mode 100644
index d30ccea0a..000000000
--- a/src/components/permissions/SedEditPermissionRequest/src/utils/fsOperations.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getFsImplementation = any;
diff --git a/src/components/permissions/SkillPermissionRequest/src/utils/log.ts b/src/components/permissions/SkillPermissionRequest/src/utils/log.ts
deleted file mode 100644
index cf30e90da..000000000
--- a/src/components/permissions/SkillPermissionRequest/src/utils/log.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logError = any;
diff --git a/src/components/permissions/rules/src/state/AppState.ts b/src/components/permissions/rules/src/state/AppState.ts
deleted file mode 100644
index cc3978f9a..000000000
--- a/src/components/permissions/rules/src/state/AppState.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useAppState = any;
-export type useSetAppState = any;
diff --git a/src/components/permissions/rules/src/utils/permissions/PermissionUpdate.ts b/src/components/permissions/rules/src/utils/permissions/PermissionUpdate.ts
deleted file mode 100644
index 9d49451cb..000000000
--- a/src/components/permissions/rules/src/utils/permissions/PermissionUpdate.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type applyPermissionUpdate = any;
-export type persistPermissionUpdate = any;
diff --git a/src/components/permissions/rules/src/utils/permissions/PermissionUpdateSchema.ts b/src/components/permissions/rules/src/utils/permissions/PermissionUpdateSchema.ts
deleted file mode 100644
index 7f663cb14..000000000
--- a/src/components/permissions/rules/src/utils/permissions/PermissionUpdateSchema.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type PermissionUpdateDestination = any;
diff --git a/src/components/permissions/src/ink.ts b/src/components/permissions/src/ink.ts
deleted file mode 100644
index 51d6eb4b7..000000000
--- a/src/components/permissions/src/ink.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Box = any;
-export type Text = any;
diff --git a/src/components/permissions/src/services/analytics/index.ts b/src/components/permissions/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/components/permissions/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/components/permissions/src/services/analytics/metadata.ts b/src/components/permissions/src/services/analytics/metadata.ts
deleted file mode 100644
index 807602756..000000000
--- a/src/components/permissions/src/services/analytics/metadata.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type sanitizeToolNameForAnalytics = any;
diff --git a/src/components/permissions/src/tools/BashTool/BashTool.ts b/src/components/permissions/src/tools/BashTool/BashTool.ts
deleted file mode 100644
index 7a3ea3cc5..000000000
--- a/src/components/permissions/src/tools/BashTool/BashTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type BashTool = any;
diff --git a/src/components/permissions/src/tools/EnterPlanModeTool/EnterPlanModeTool.ts b/src/components/permissions/src/tools/EnterPlanModeTool/EnterPlanModeTool.ts
deleted file mode 100644
index c4d43e44a..000000000
--- a/src/components/permissions/src/tools/EnterPlanModeTool/EnterPlanModeTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type EnterPlanModeTool = any;
diff --git a/src/components/permissions/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts b/src/components/permissions/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts
deleted file mode 100644
index f9708d2b3..000000000
--- a/src/components/permissions/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ExitPlanModeV2Tool = any;
diff --git a/src/components/permissions/src/utils/bash/commands.ts b/src/components/permissions/src/utils/bash/commands.ts
deleted file mode 100644
index 8886e5cc6..000000000
--- a/src/components/permissions/src/utils/bash/commands.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type splitCommand_DEPRECATED = any;
diff --git a/src/components/permissions/src/utils/permissions/PermissionResult.ts b/src/components/permissions/src/utils/permissions/PermissionResult.ts
deleted file mode 100644
index 7958ed68e..000000000
--- a/src/components/permissions/src/utils/permissions/PermissionResult.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type PermissionDecisionReason = any;
-export type PermissionResult = any;
diff --git a/src/components/permissions/src/utils/permissions/PermissionUpdate.ts b/src/components/permissions/src/utils/permissions/PermissionUpdate.ts
deleted file mode 100644
index 5779475d9..000000000
--- a/src/components/permissions/src/utils/permissions/PermissionUpdate.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type extractRules = any;
-export type hasRules = any;
diff --git a/src/components/permissions/src/utils/permissions/permissionRuleParser.ts b/src/components/permissions/src/utils/permissions/permissionRuleParser.ts
deleted file mode 100644
index 37691b2d9..000000000
--- a/src/components/permissions/src/utils/permissions/permissionRuleParser.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type permissionRuleValueToString = any;
diff --git a/src/components/permissions/src/utils/sandbox/sandbox-adapter.ts b/src/components/permissions/src/utils/sandbox/sandbox-adapter.ts
deleted file mode 100644
index 5dd1d93d7..000000000
--- a/src/components/permissions/src/utils/sandbox/sandbox-adapter.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type NetworkHostPattern = any;
-export type shouldAllowManagedSandboxDomainsOnly = any;
-export type SandboxManager = any;
diff --git a/src/components/src/bootstrap/state.ts b/src/components/src/bootstrap/state.ts
deleted file mode 100644
index c6af340fa..000000000
--- a/src/components/src/bootstrap/state.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getLastAPIRequest = any;
diff --git a/src/components/src/commands.ts b/src/components/src/commands.ts
deleted file mode 100644
index 8552dd207..000000000
--- a/src/components/src/commands.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type CommandResultDisplay = any;
diff --git a/src/components/src/components/shell/OutputLine.ts b/src/components/src/components/shell/OutputLine.ts
deleted file mode 100644
index 9c5093c9a..000000000
--- a/src/components/src/components/shell/OutputLine.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type stripUnderlineAnsi = any;
diff --git a/src/components/src/hooks/useExitOnCtrlCDWithKeybindings.ts b/src/components/src/hooks/useExitOnCtrlCDWithKeybindings.ts
deleted file mode 100644
index 38810d68c..000000000
--- a/src/components/src/hooks/useExitOnCtrlCDWithKeybindings.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useExitOnCtrlCDWithKeybindings = any;
diff --git a/src/components/src/hooks/useTerminalSize.ts b/src/components/src/hooks/useTerminalSize.ts
deleted file mode 100644
index 4a0ef3ea3..000000000
--- a/src/components/src/hooks/useTerminalSize.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useTerminalSize = any;
diff --git a/src/components/src/services/analytics/firstPartyEventLogger.ts b/src/components/src/services/analytics/firstPartyEventLogger.ts
deleted file mode 100644
index 3387d83a1..000000000
--- a/src/components/src/services/analytics/firstPartyEventLogger.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logEventTo1P = any;
diff --git a/src/components/src/services/analytics/index.ts b/src/components/src/services/analytics/index.ts
deleted file mode 100644
index ce0a9a827..000000000
--- a/src/components/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logEvent = any;
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
diff --git a/src/components/src/state/AppState.ts b/src/components/src/state/AppState.ts
deleted file mode 100644
index cc3978f9a..000000000
--- a/src/components/src/state/AppState.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useAppState = any;
-export type useSetAppState = any;
diff --git a/src/components/src/tools/FileEditTool/types.ts b/src/components/src/tools/FileEditTool/types.ts
deleted file mode 100644
index 077f10550..000000000
--- a/src/components/src/tools/FileEditTool/types.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FileEditOutput = any;
diff --git a/src/components/src/tools/FileWriteTool/FileWriteTool.ts b/src/components/src/tools/FileWriteTool/FileWriteTool.ts
deleted file mode 100644
index 50716571f..000000000
--- a/src/components/src/tools/FileWriteTool/FileWriteTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Output = any;
diff --git a/src/components/src/utils/background/remote/preconditions.ts b/src/components/src/utils/background/remote/preconditions.ts
deleted file mode 100644
index 4c7df781f..000000000
--- a/src/components/src/utils/background/remote/preconditions.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type checkIsGitClean = any;
-export type checkNeedsClaudeAiLogin = any;
diff --git a/src/components/src/utils/conversationRecovery.ts b/src/components/src/utils/conversationRecovery.ts
deleted file mode 100644
index ecd18bdac..000000000
--- a/src/components/src/utils/conversationRecovery.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type TeleportRemoteResponse = any;
diff --git a/src/components/src/utils/cwd.ts b/src/components/src/utils/cwd.ts
deleted file mode 100644
index 76c192ed8..000000000
--- a/src/components/src/utils/cwd.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getCwd = any;
diff --git a/src/components/src/utils/debug.ts b/src/components/src/utils/debug.ts
deleted file mode 100644
index c64d5960c..000000000
--- a/src/components/src/utils/debug.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logForDebugging = any;
diff --git a/src/components/src/utils/envDynamic.ts b/src/components/src/utils/envDynamic.ts
deleted file mode 100644
index f97791718..000000000
--- a/src/components/src/utils/envDynamic.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type envDynamic = any;
diff --git a/src/components/src/utils/fastMode.ts b/src/components/src/utils/fastMode.ts
deleted file mode 100644
index cf4c9c15a..000000000
--- a/src/components/src/utils/fastMode.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FAST_MODE_MODEL_DISPLAY = any;
-export type isFastModeAvailable = any;
-export type isFastModeCooldown = any;
-export type isFastModeEnabled = any;
diff --git a/src/components/src/utils/fileHistory.ts b/src/components/src/utils/fileHistory.ts
deleted file mode 100644
index d3a0a3eb9..000000000
--- a/src/components/src/utils/fileHistory.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type DiffStats = any;
-export type fileHistoryCanRestore = any;
-export type fileHistoryEnabled = any;
-export type fileHistoryGetDiffStats = any;
diff --git a/src/components/src/utils/gracefulShutdown.ts b/src/components/src/utils/gracefulShutdown.ts
deleted file mode 100644
index 6b72be424..000000000
--- a/src/components/src/utils/gracefulShutdown.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type gracefulShutdown = any;
-export type gracefulShutdownSync = any;
diff --git a/src/components/src/utils/log.ts b/src/components/src/utils/log.ts
deleted file mode 100644
index cf30e90da..000000000
--- a/src/components/src/utils/log.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logError = any;
diff --git a/src/components/src/utils/messages.ts b/src/components/src/utils/messages.ts
deleted file mode 100644
index e84ec855e..000000000
--- a/src/components/src/utils/messages.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type extractTag = any;
-export type getLastAssistantMessage = any;
-export type normalizeMessagesForAPI = any;
diff --git a/src/components/src/utils/permissions/PermissionMode.ts b/src/components/src/utils/permissions/PermissionMode.ts
deleted file mode 100644
index 1bc6199f9..000000000
--- a/src/components/src/utils/permissions/PermissionMode.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type PermissionMode = any;
diff --git a/src/components/src/utils/platform.ts b/src/components/src/utils/platform.ts
deleted file mode 100644
index b6686f812..000000000
--- a/src/components/src/utils/platform.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getPlatform = any;
diff --git a/src/components/src/utils/process.ts b/src/components/src/utils/process.ts
deleted file mode 100644
index 4fde4749b..000000000
--- a/src/components/src/utils/process.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type writeToStdout = any;
diff --git a/src/components/src/utils/sandbox/sandbox-ui-utils.ts b/src/components/src/utils/sandbox/sandbox-ui-utils.ts
deleted file mode 100644
index f514e53a9..000000000
--- a/src/components/src/utils/sandbox/sandbox-ui-utils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type removeSandboxViolationTags = any;
diff --git a/src/components/src/utils/set.ts b/src/components/src/utils/set.ts
deleted file mode 100644
index 9450ee339..000000000
--- a/src/components/src/utils/set.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type every = any;
diff --git a/src/components/src/utils/teleport/api.ts b/src/components/src/utils/teleport/api.ts
deleted file mode 100644
index d532f65b9..000000000
--- a/src/components/src/utils/teleport/api.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type CodeSession = any;
-export type fetchCodeSessionsFromSessionsAPI = any;
diff --git a/src/components/src/utils/theme.ts b/src/components/src/utils/theme.ts
deleted file mode 100644
index c6999a678..000000000
--- a/src/components/src/utils/theme.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Theme = any;
diff --git a/src/components/tasks/src/Task.ts b/src/components/tasks/src/Task.ts
deleted file mode 100644
index cd6d817c8..000000000
--- a/src/components/tasks/src/Task.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type TaskStatus = any;
diff --git a/src/components/tasks/src/Tool.ts b/src/components/tasks/src/Tool.ts
deleted file mode 100644
index 0492ff4d5..000000000
--- a/src/components/tasks/src/Tool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ToolUseContext = any;
diff --git a/src/components/tasks/src/coordinator/coordinatorMode.ts b/src/components/tasks/src/coordinator/coordinatorMode.ts
deleted file mode 100644
index 1879d10cd..000000000
--- a/src/components/tasks/src/coordinator/coordinatorMode.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isCoordinatorMode = any;
diff --git a/src/components/tasks/src/entrypoints/agentSdkTypes.ts b/src/components/tasks/src/entrypoints/agentSdkTypes.ts
deleted file mode 100644
index d4bdb4fb4..000000000
--- a/src/components/tasks/src/entrypoints/agentSdkTypes.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SDKMessage = any;
diff --git a/src/components/tasks/src/hooks/useTerminalSize.ts b/src/components/tasks/src/hooks/useTerminalSize.ts
deleted file mode 100644
index 4a0ef3ea3..000000000
--- a/src/components/tasks/src/hooks/useTerminalSize.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useTerminalSize = any;
diff --git a/src/components/tasks/src/ink.ts b/src/components/tasks/src/ink.ts
deleted file mode 100644
index 9fa0986a6..000000000
--- a/src/components/tasks/src/ink.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Text = any;
diff --git a/src/components/tasks/src/ink/stringWidth.ts b/src/components/tasks/src/ink/stringWidth.ts
deleted file mode 100644
index aa33710c8..000000000
--- a/src/components/tasks/src/ink/stringWidth.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type stringWidth = any;
diff --git a/src/components/tasks/src/state/AppState.ts b/src/components/tasks/src/state/AppState.ts
deleted file mode 100644
index cc3978f9a..000000000
--- a/src/components/tasks/src/state/AppState.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useAppState = any;
-export type useSetAppState = any;
diff --git a/src/components/tasks/src/state/teammateViewHelpers.ts b/src/components/tasks/src/state/teammateViewHelpers.ts
deleted file mode 100644
index 197123737..000000000
--- a/src/components/tasks/src/state/teammateViewHelpers.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type enterTeammateView = any;
-export type exitTeammateView = any;
diff --git a/src/components/tasks/src/tasks/DreamTask/DreamTask.ts b/src/components/tasks/src/tasks/DreamTask/DreamTask.ts
deleted file mode 100644
index 1bb986a93..000000000
--- a/src/components/tasks/src/tasks/DreamTask/DreamTask.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-// Type re-exports for DreamTask — bridges the component tree to the task registry.
-// The real implementation lives in src/tasks/DreamTask/DreamTask.ts.
-// Note: Currently unused — BackgroundTasksDialog.tsx imports directly from
-// src/tasks/DreamTask/DreamTask.js. Kept for decompilation completeness.
-
-export type { DreamTaskState, DreamPhase, DreamTurn } from '../../../../../tasks/DreamTask/DreamTask.js'
-export { isDreamTask, registerDreamTask, addDreamTurn, completeDreamTask, failDreamTask, DreamTask } from '../../../../../tasks/DreamTask/DreamTask.js'
diff --git a/src/components/tasks/src/tasks/InProcessTeammateTask/InProcessTeammateTask.ts b/src/components/tasks/src/tasks/InProcessTeammateTask/InProcessTeammateTask.ts
deleted file mode 100644
index 58a3fc93d..000000000
--- a/src/components/tasks/src/tasks/InProcessTeammateTask/InProcessTeammateTask.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type InProcessTeammateTask = any;
diff --git a/src/components/tasks/src/tasks/InProcessTeammateTask/types.ts b/src/components/tasks/src/tasks/InProcessTeammateTask/types.ts
deleted file mode 100644
index 67314b658..000000000
--- a/src/components/tasks/src/tasks/InProcessTeammateTask/types.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type InProcessTeammateTaskState = any;
diff --git a/src/components/tasks/src/tasks/LocalAgentTask/LocalAgentTask.ts b/src/components/tasks/src/tasks/LocalAgentTask/LocalAgentTask.ts
deleted file mode 100644
index ecfe9aad9..000000000
--- a/src/components/tasks/src/tasks/LocalAgentTask/LocalAgentTask.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isPanelAgentTask = any;
-export type LocalAgentTaskState = any;
-export type LocalAgentTask = any;
diff --git a/src/components/tasks/src/tasks/LocalShellTask/LocalShellTask.ts b/src/components/tasks/src/tasks/LocalShellTask/LocalShellTask.ts
deleted file mode 100644
index 169ad065d..000000000
--- a/src/components/tasks/src/tasks/LocalShellTask/LocalShellTask.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type LocalShellTask = any;
diff --git a/src/components/tasks/src/tasks/LocalShellTask/guards.ts b/src/components/tasks/src/tasks/LocalShellTask/guards.ts
deleted file mode 100644
index baf4fdb8f..000000000
--- a/src/components/tasks/src/tasks/LocalShellTask/guards.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type LocalShellTaskState = any;
diff --git a/src/components/tasks/src/tasks/LocalWorkflowTask/LocalWorkflowTask.ts b/src/components/tasks/src/tasks/LocalWorkflowTask/LocalWorkflowTask.ts
deleted file mode 100644
index 655d5da82..000000000
--- a/src/components/tasks/src/tasks/LocalWorkflowTask/LocalWorkflowTask.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated stub — replace with real implementation
-export {};
diff --git a/src/components/tasks/src/tasks/MonitorMcpTask/MonitorMcpTask.ts b/src/components/tasks/src/tasks/MonitorMcpTask/MonitorMcpTask.ts
deleted file mode 100644
index e7f7d4e85..000000000
--- a/src/components/tasks/src/tasks/MonitorMcpTask/MonitorMcpTask.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type MonitorMcpTaskState = any;
diff --git a/src/components/tasks/src/tasks/RemoteAgentTask/RemoteAgentTask.ts b/src/components/tasks/src/tasks/RemoteAgentTask/RemoteAgentTask.ts
deleted file mode 100644
index 5c1366343..000000000
--- a/src/components/tasks/src/tasks/RemoteAgentTask/RemoteAgentTask.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type RemoteAgentTaskState = any;
-export type RemoteAgentTask = any;
diff --git a/src/components/tasks/src/tasks/pillLabel.ts b/src/components/tasks/src/tasks/pillLabel.ts
deleted file mode 100644
index e72c9424e..000000000
--- a/src/components/tasks/src/tasks/pillLabel.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getPillLabel = any;
-export type pillNeedsCta = any;
diff --git a/src/components/tasks/src/tasks/types.ts b/src/components/tasks/src/tasks/types.ts
deleted file mode 100644
index d48d29071..000000000
--- a/src/components/tasks/src/tasks/types.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type BackgroundTaskState = any;
-export type isBackgroundTask = any;
-export type TaskState = any;
diff --git a/src/components/tasks/src/types/utils.ts b/src/components/tasks/src/types/utils.ts
deleted file mode 100644
index 655d5da82..000000000
--- a/src/components/tasks/src/types/utils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated stub — replace with real implementation
-export {};
diff --git a/src/components/tasks/src/utils/array.ts b/src/components/tasks/src/utils/array.ts
deleted file mode 100644
index ee55dafe2..000000000
--- a/src/components/tasks/src/utils/array.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type intersperse = any;
diff --git a/src/components/tasks/src/utils/collapseReadSearch.ts b/src/components/tasks/src/utils/collapseReadSearch.ts
deleted file mode 100644
index 137b5d428..000000000
--- a/src/components/tasks/src/utils/collapseReadSearch.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type summarizeRecentActivities = any;
diff --git a/src/components/tasks/src/utils/format.ts b/src/components/tasks/src/utils/format.ts
deleted file mode 100644
index ae90c3800..000000000
--- a/src/components/tasks/src/utils/format.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type truncate = any;
diff --git a/src/components/tasks/src/utils/horizontalScroll.ts b/src/components/tasks/src/utils/horizontalScroll.ts
deleted file mode 100644
index d89f93f24..000000000
--- a/src/components/tasks/src/utils/horizontalScroll.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type calculateHorizontalScrollWindow = any;
diff --git a/src/components/tasks/src/utils/ink.ts b/src/components/tasks/src/utils/ink.ts
deleted file mode 100644
index 53989201a..000000000
--- a/src/components/tasks/src/utils/ink.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type toInkColor = any;
diff --git a/src/components/tasks/src/utils/stringUtils.ts b/src/components/tasks/src/utils/stringUtils.ts
deleted file mode 100644
index 8b747e13b..000000000
--- a/src/components/tasks/src/utils/stringUtils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type plural = any;
diff --git a/src/components/tasks/src/utils/swarm/constants.ts b/src/components/tasks/src/utils/swarm/constants.ts
deleted file mode 100644
index 69a5e1ff5..000000000
--- a/src/components/tasks/src/utils/swarm/constants.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type TEAM_LEAD_NAME = any;
diff --git a/src/constants/src/commands.ts b/src/constants/src/commands.ts
deleted file mode 100644
index e358f0755..000000000
--- a/src/constants/src/commands.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getSkillToolCommands = any;
diff --git a/src/constants/src/services/analytics/growthbook.ts b/src/constants/src/services/analytics/growthbook.ts
deleted file mode 100644
index e380906ea..000000000
--- a/src/constants/src/services/analytics/growthbook.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getFeatureValue_CACHED_MAY_BE_STALE = any;
diff --git a/src/constants/src/tools/AgentTool/built-in/exploreAgent.ts b/src/constants/src/tools/AgentTool/built-in/exploreAgent.ts
deleted file mode 100644
index 7ec141a4e..000000000
--- a/src/constants/src/tools/AgentTool/built-in/exploreAgent.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type EXPLORE_AGENT = any;
-export type EXPLORE_AGENT_MIN_QUERIES = any;
diff --git a/src/constants/src/tools/AgentTool/builtInAgents.ts b/src/constants/src/tools/AgentTool/builtInAgents.ts
deleted file mode 100644
index 8358c0b6b..000000000
--- a/src/constants/src/tools/AgentTool/builtInAgents.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type areExplorePlanAgentsEnabled = any;
diff --git a/src/constants/src/tools/GlobTool/prompt.ts b/src/constants/src/tools/GlobTool/prompt.ts
deleted file mode 100644
index 060caf29c..000000000
--- a/src/constants/src/tools/GlobTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type GLOB_TOOL_NAME = any;
diff --git a/src/constants/src/tools/GrepTool/prompt.ts b/src/constants/src/tools/GrepTool/prompt.ts
deleted file mode 100644
index 08b8a8d29..000000000
--- a/src/constants/src/tools/GrepTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type GREP_TOOL_NAME = any;
diff --git a/src/constants/src/utils/embeddedTools.ts b/src/constants/src/utils/embeddedTools.ts
deleted file mode 100644
index c0160dbf9..000000000
--- a/src/constants/src/utils/embeddedTools.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type hasEmbeddedSearchTools = any;
diff --git a/src/constants/src/utils/envUtils.ts b/src/constants/src/utils/envUtils.ts
deleted file mode 100644
index deb349096..000000000
--- a/src/constants/src/utils/envUtils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isEnvTruthy = any;
diff --git a/src/context/src/state/AppState.ts b/src/context/src/state/AppState.ts
deleted file mode 100644
index 5237ca451..000000000
--- a/src/context/src/state/AppState.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useAppStateStore = any;
-export type useSetAppState = any;
diff --git a/src/entrypoints/src/bootstrap/state.ts b/src/entrypoints/src/bootstrap/state.ts
deleted file mode 100644
index 9f1f964ae..000000000
--- a/src/entrypoints/src/bootstrap/state.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getIsNonInteractiveSession = any;
diff --git a/src/entrypoints/src/state/AppStateStore.ts b/src/entrypoints/src/state/AppStateStore.ts
deleted file mode 100644
index 1d4f082ab..000000000
--- a/src/entrypoints/src/state/AppStateStore.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getDefaultAppState = any;
diff --git a/src/hooks/notifs/src/context/notifications.ts b/src/hooks/notifs/src/context/notifications.ts
deleted file mode 100644
index 95d2759e1..000000000
--- a/src/hooks/notifs/src/context/notifications.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useNotifications = any;
-export type Notification = any;
diff --git a/src/hooks/notifs/src/ink.ts b/src/hooks/notifs/src/ink.ts
deleted file mode 100644
index 9fa0986a6..000000000
--- a/src/hooks/notifs/src/ink.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Text = any;
diff --git a/src/hooks/notifs/src/services/claudeAiLimits.ts b/src/hooks/notifs/src/services/claudeAiLimits.ts
deleted file mode 100644
index 4dceb08d6..000000000
--- a/src/hooks/notifs/src/services/claudeAiLimits.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getRateLimitWarning = any;
-export type getUsingOverageText = any;
diff --git a/src/hooks/notifs/src/services/claudeAiLimitsHook.ts b/src/hooks/notifs/src/services/claudeAiLimitsHook.ts
deleted file mode 100644
index 617852958..000000000
--- a/src/hooks/notifs/src/services/claudeAiLimitsHook.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useClaudeAiLimits = any;
diff --git a/src/hooks/notifs/src/services/mcp/types.ts b/src/hooks/notifs/src/services/mcp/types.ts
deleted file mode 100644
index be4f983ff..000000000
--- a/src/hooks/notifs/src/services/mcp/types.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type MCPServerConnection = any;
diff --git a/src/hooks/notifs/src/services/oauth/getOauthProfile.ts b/src/hooks/notifs/src/services/oauth/getOauthProfile.ts
deleted file mode 100644
index 3741d6442..000000000
--- a/src/hooks/notifs/src/services/oauth/getOauthProfile.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getOauthProfileFromApiKey = any;
diff --git a/src/hooks/notifs/src/state/AppState.ts b/src/hooks/notifs/src/state/AppState.ts
deleted file mode 100644
index cc3978f9a..000000000
--- a/src/hooks/notifs/src/state/AppState.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useAppState = any;
-export type useSetAppState = any;
diff --git a/src/hooks/notifs/src/utils/auth.ts b/src/hooks/notifs/src/utils/auth.ts
deleted file mode 100644
index c473f1703..000000000
--- a/src/hooks/notifs/src/utils/auth.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getSubscriptionType = any;
-export type isClaudeAISubscriber = any;
diff --git a/src/hooks/notifs/src/utils/billing.ts b/src/hooks/notifs/src/utils/billing.ts
deleted file mode 100644
index fd3cae2d7..000000000
--- a/src/hooks/notifs/src/utils/billing.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type hasClaudeAiBillingAccess = any;
diff --git a/src/hooks/notifs/src/utils/bundledMode.ts b/src/hooks/notifs/src/utils/bundledMode.ts
deleted file mode 100644
index d2d26c4ec..000000000
--- a/src/hooks/notifs/src/utils/bundledMode.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isInBundledMode = any;
diff --git a/src/hooks/notifs/src/utils/config.ts b/src/hooks/notifs/src/utils/config.ts
deleted file mode 100644
index a42d3c993..000000000
--- a/src/hooks/notifs/src/utils/config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getGlobalConfig = any;
-export type saveGlobalConfig = any;
-export type GlobalConfig = any;
diff --git a/src/hooks/notifs/src/utils/doctorDiagnostic.ts b/src/hooks/notifs/src/utils/doctorDiagnostic.ts
deleted file mode 100644
index ed3809f04..000000000
--- a/src/hooks/notifs/src/utils/doctorDiagnostic.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getCurrentInstallationType = any;
diff --git a/src/hooks/notifs/src/utils/envUtils.ts b/src/hooks/notifs/src/utils/envUtils.ts
deleted file mode 100644
index deb349096..000000000
--- a/src/hooks/notifs/src/utils/envUtils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isEnvTruthy = any;
diff --git a/src/hooks/notifs/src/utils/fastMode.ts b/src/hooks/notifs/src/utils/fastMode.ts
deleted file mode 100644
index 14189e5bd..000000000
--- a/src/hooks/notifs/src/utils/fastMode.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type CooldownReason = any;
-export type isFastModeEnabled = any;
-export type onCooldownExpired = any;
-export type onCooldownTriggered = any;
-export type onFastModeOverageRejection = any;
-export type onOrgFastModeChanged = any;
diff --git a/src/hooks/notifs/src/utils/format.ts b/src/hooks/notifs/src/utils/format.ts
deleted file mode 100644
index 8cb04d1d0..000000000
--- a/src/hooks/notifs/src/utils/format.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type formatDuration = any;
diff --git a/src/hooks/notifs/src/utils/ide.ts b/src/hooks/notifs/src/utils/ide.ts
deleted file mode 100644
index 3903e6d4a..000000000
--- a/src/hooks/notifs/src/utils/ide.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type detectIDEs = any;
-export type IDEExtensionInstallationStatus = any;
-export type isJetBrainsIde = any;
-export type isSupportedTerminal = any;
diff --git a/src/hooks/notifs/src/utils/model/deprecation.ts b/src/hooks/notifs/src/utils/model/deprecation.ts
deleted file mode 100644
index 2a5102d0a..000000000
--- a/src/hooks/notifs/src/utils/model/deprecation.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getModelDeprecationWarning = any;
diff --git a/src/hooks/notifs/src/utils/nativeInstaller/index.ts b/src/hooks/notifs/src/utils/nativeInstaller/index.ts
deleted file mode 100644
index 19088d1b0..000000000
--- a/src/hooks/notifs/src/utils/nativeInstaller/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type checkInstall = any;
diff --git a/src/hooks/src/bootstrap/state.ts b/src/hooks/src/bootstrap/state.ts
deleted file mode 100644
index 5c3776b79..000000000
--- a/src/hooks/src/bootstrap/state.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type setTeleportedSessionInfo = any;
diff --git a/src/hooks/src/components/PromptInput/PromptInputFooterSuggestions.ts b/src/hooks/src/components/PromptInput/PromptInputFooterSuggestions.ts
deleted file mode 100644
index d0fd674c7..000000000
--- a/src/hooks/src/components/PromptInput/PromptInputFooterSuggestions.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SuggestionItem = any;
diff --git a/src/hooks/src/components/PromptInput/inputModes.ts b/src/hooks/src/components/PromptInput/inputModes.ts
deleted file mode 100644
index 22713bb37..000000000
--- a/src/hooks/src/components/PromptInput/inputModes.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isInputModeCharacter = any;
-export type getModeFromInput = any;
diff --git a/src/hooks/src/context/notifications.ts b/src/hooks/src/context/notifications.ts
deleted file mode 100644
index 82956e65a..000000000
--- a/src/hooks/src/context/notifications.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useNotifications = any;
diff --git a/src/hooks/src/hooks/fileSuggestions.ts b/src/hooks/src/hooks/fileSuggestions.ts
deleted file mode 100644
index 273e550e1..000000000
--- a/src/hooks/src/hooks/fileSuggestions.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type generateFileSuggestions = any;
diff --git a/src/hooks/src/ink.ts b/src/hooks/src/ink.ts
deleted file mode 100644
index 9fa0986a6..000000000
--- a/src/hooks/src/ink.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Text = any;
diff --git a/src/hooks/src/ink/components/TerminalSizeContext.ts b/src/hooks/src/ink/components/TerminalSizeContext.ts
deleted file mode 100644
index c0d125b18..000000000
--- a/src/hooks/src/ink/components/TerminalSizeContext.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type TerminalSize = any;
-export type TerminalSizeContext = any;
diff --git a/src/hooks/src/services/analytics/index.ts b/src/hooks/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/hooks/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/hooks/src/services/analytics/metadata.ts b/src/hooks/src/services/analytics/metadata.ts
deleted file mode 100644
index dd7c40970..000000000
--- a/src/hooks/src/services/analytics/metadata.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type sanitizeToolNameForAnalytics = any;
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
diff --git a/src/hooks/src/services/mcp/types.ts b/src/hooks/src/services/mcp/types.ts
deleted file mode 100644
index a0f730eaa..000000000
--- a/src/hooks/src/services/mcp/types.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ServerResource = any;
diff --git a/src/hooks/src/state/AppState.ts b/src/hooks/src/state/AppState.ts
deleted file mode 100644
index f1e2aa661..000000000
--- a/src/hooks/src/state/AppState.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useAppState = any;
-export type useAppStateStore = any;
-export type useSetAppState = any;
diff --git a/src/hooks/src/tools/AgentTool/agentColorManager.ts b/src/hooks/src/tools/AgentTool/agentColorManager.ts
deleted file mode 100644
index 83720443d..000000000
--- a/src/hooks/src/tools/AgentTool/agentColorManager.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getAgentColor = any;
diff --git a/src/hooks/src/tools/AgentTool/loadAgentsDir.ts b/src/hooks/src/tools/AgentTool/loadAgentsDir.ts
deleted file mode 100644
index 3fa66c4bb..000000000
--- a/src/hooks/src/tools/AgentTool/loadAgentsDir.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AgentDefinition = { name: string; [key: string]: unknown };
diff --git a/src/hooks/src/utils/conversationRecovery.ts b/src/hooks/src/utils/conversationRecovery.ts
deleted file mode 100644
index ecd18bdac..000000000
--- a/src/hooks/src/utils/conversationRecovery.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type TeleportRemoteResponse = any;
diff --git a/src/hooks/src/utils/fileRead.ts b/src/hooks/src/utils/fileRead.ts
deleted file mode 100644
index 108536974..000000000
--- a/src/hooks/src/utils/fileRead.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type readFileSync = any;
diff --git a/src/hooks/src/utils/format.ts b/src/hooks/src/utils/format.ts
deleted file mode 100644
index b4e3460a4..000000000
--- a/src/hooks/src/utils/format.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type truncateToWidth = any;
diff --git a/src/hooks/src/utils/log.ts b/src/hooks/src/utils/log.ts
deleted file mode 100644
index cf30e90da..000000000
--- a/src/hooks/src/utils/log.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logError = any;
diff --git a/src/hooks/src/utils/markdownConfigLoader.ts b/src/hooks/src/utils/markdownConfigLoader.ts
deleted file mode 100644
index 2c3f2d06c..000000000
--- a/src/hooks/src/utils/markdownConfigLoader.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type CLAUDE_CONFIG_DIRECTORIES = any;
-export type loadMarkdownFilesForSubdir = any;
diff --git a/src/hooks/src/utils/path.ts b/src/hooks/src/utils/path.ts
deleted file mode 100644
index a965844dd..000000000
--- a/src/hooks/src/utils/path.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type expandPath = any;
diff --git a/src/hooks/src/utils/teleport/api.ts b/src/hooks/src/utils/teleport/api.ts
deleted file mode 100644
index d43b96cab..000000000
--- a/src/hooks/src/utils/teleport/api.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type CodeSession = any;
diff --git a/src/hooks/src/utils/theme.ts b/src/hooks/src/utils/theme.ts
deleted file mode 100644
index c6999a678..000000000
--- a/src/hooks/src/utils/theme.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Theme = any;
diff --git a/src/hooks/toolPermission/handlers/src/utils/debug.ts b/src/hooks/toolPermission/handlers/src/utils/debug.ts
deleted file mode 100644
index c64d5960c..000000000
--- a/src/hooks/toolPermission/handlers/src/utils/debug.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logForDebugging = any;
diff --git a/src/hooks/toolPermission/src/services/analytics/index.ts b/src/hooks/toolPermission/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/hooks/toolPermission/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/hooks/toolPermission/src/services/analytics/metadata.ts b/src/hooks/toolPermission/src/services/analytics/metadata.ts
deleted file mode 100644
index 807602756..000000000
--- a/src/hooks/toolPermission/src/services/analytics/metadata.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type sanitizeToolNameForAnalytics = any;
diff --git a/src/keybindings/match.ts b/src/keybindings/match.ts
deleted file mode 100644
index ab4b976ef..000000000
--- a/src/keybindings/match.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Re-export from @anthropic/ink keybindings module
-export { getKeyName, matchesKeystroke, matchesBinding } from '@anthropic/ink'
diff --git a/src/keybindings/src/utils/semver.ts b/src/keybindings/src/utils/semver.ts
deleted file mode 100644
index 28b438729..000000000
--- a/src/keybindings/src/utils/semver.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type satisfies = any;
diff --git a/src/migrations/migrateAutoUpdatesToSettings.ts b/src/migrations/migrateAutoUpdatesToSettings.ts
deleted file mode 100644
index c541713b1..000000000
--- a/src/migrations/migrateAutoUpdatesToSettings.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import { logEvent } from 'src/services/analytics/index.js'
-import { getGlobalConfig, saveGlobalConfig } from '../utils/config.js'
-import { logError } from '../utils/log.js'
-import {
- getSettingsForSource,
- updateSettingsForSource,
-} from '../utils/settings/settings.js'
-/**
- * Migration: Move user-set autoUpdates preference to settings.json env var
- * Only migrates if user explicitly disabled auto-updates (not for protection)
- * This preserves user intent while allowing native installations to auto-update
- */
-export function migrateAutoUpdatesToSettings(): void {
- const globalConfig = getGlobalConfig()
-
- // Only migrate if autoUpdates was explicitly set to false by user preference
- // (not automatically for native protection)
- if (
- globalConfig.autoUpdates !== false ||
- globalConfig.autoUpdatesProtectedForNative === true
- ) {
- return
- }
-
- try {
- const userSettings = getSettingsForSource('userSettings') || {}
-
- // Always set DISABLE_AUTOUPDATER to preserve user intent
- // We need to overwrite even if it exists, to ensure the migration is complete
- updateSettingsForSource('userSettings', {
- ...userSettings,
- env: {
- ...userSettings.env,
- DISABLE_AUTOUPDATER: '1',
- },
- })
-
- logEvent('tengu_migrate_autoupdates_to_settings', {
- was_user_preference: true,
- already_had_env_var: !!userSettings.env?.DISABLE_AUTOUPDATER,
- })
-
- // explicitly set, so this takes effect immediately
- process.env.DISABLE_AUTOUPDATER = '1'
-
- // Remove autoUpdates from global config after successful migration
- saveGlobalConfig(current => {
- const {
- autoUpdates: _,
- autoUpdatesProtectedForNative: __,
- ...updatedConfig
- } = current
- return updatedConfig
- })
- } catch (error) {
- logError(new Error(`Failed to migrate auto-updates: ${error}`))
- logEvent('tengu_migrate_autoupdates_error', {
- has_error: true,
- })
- }
-}
diff --git a/src/migrations/src/services/analytics/index.ts b/src/migrations/src/services/analytics/index.ts
deleted file mode 100644
index 60402f927..000000000
--- a/src/migrations/src/services/analytics/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logEvent = any;
diff --git a/src/native-ts/yoga-layout/enums.ts b/src/native-ts/yoga-layout/enums.ts
deleted file mode 100644
index 8cbb6ecff..000000000
--- a/src/native-ts/yoga-layout/enums.ts
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * Yoga enums — ported from yoga-layout/src/generated/YGEnums.ts
- * Kept as `const` objects (not TS enums) per repo convention.
- * Values match upstream exactly so callers don't change.
- */
-
-export const Align = {
- Auto: 0,
- FlexStart: 1,
- Center: 2,
- FlexEnd: 3,
- Stretch: 4,
- Baseline: 5,
- SpaceBetween: 6,
- SpaceAround: 7,
- SpaceEvenly: 8,
-} as const
-export type Align = (typeof Align)[keyof typeof Align]
-
-export const BoxSizing = {
- BorderBox: 0,
- ContentBox: 1,
-} as const
-export type BoxSizing = (typeof BoxSizing)[keyof typeof BoxSizing]
-
-export const Dimension = {
- Width: 0,
- Height: 1,
-} as const
-export type Dimension = (typeof Dimension)[keyof typeof Dimension]
-
-export const Direction = {
- Inherit: 0,
- LTR: 1,
- RTL: 2,
-} as const
-export type Direction = (typeof Direction)[keyof typeof Direction]
-
-export const Display = {
- Flex: 0,
- None: 1,
- Contents: 2,
-} as const
-export type Display = (typeof Display)[keyof typeof Display]
-
-export const Edge = {
- Left: 0,
- Top: 1,
- Right: 2,
- Bottom: 3,
- Start: 4,
- End: 5,
- Horizontal: 6,
- Vertical: 7,
- All: 8,
-} as const
-export type Edge = (typeof Edge)[keyof typeof Edge]
-
-export const Errata = {
- None: 0,
- StretchFlexBasis: 1,
- AbsolutePositionWithoutInsetsExcludesPadding: 2,
- AbsolutePercentAgainstInnerSize: 4,
- All: 2147483647,
- Classic: 2147483646,
-} as const
-export type Errata = (typeof Errata)[keyof typeof Errata]
-
-export const ExperimentalFeature = {
- WebFlexBasis: 0,
-} as const
-export type ExperimentalFeature =
- (typeof ExperimentalFeature)[keyof typeof ExperimentalFeature]
-
-export const FlexDirection = {
- Column: 0,
- ColumnReverse: 1,
- Row: 2,
- RowReverse: 3,
-} as const
-export type FlexDirection = (typeof FlexDirection)[keyof typeof FlexDirection]
-
-export const Gutter = {
- Column: 0,
- Row: 1,
- All: 2,
-} as const
-export type Gutter = (typeof Gutter)[keyof typeof Gutter]
-
-export const Justify = {
- FlexStart: 0,
- Center: 1,
- FlexEnd: 2,
- SpaceBetween: 3,
- SpaceAround: 4,
- SpaceEvenly: 5,
-} as const
-export type Justify = (typeof Justify)[keyof typeof Justify]
-
-export const MeasureMode = {
- Undefined: 0,
- Exactly: 1,
- AtMost: 2,
-} as const
-export type MeasureMode = (typeof MeasureMode)[keyof typeof MeasureMode]
-
-export const Overflow = {
- Visible: 0,
- Hidden: 1,
- Scroll: 2,
-} as const
-export type Overflow = (typeof Overflow)[keyof typeof Overflow]
-
-export const PositionType = {
- Static: 0,
- Relative: 1,
- Absolute: 2,
-} as const
-export type PositionType = (typeof PositionType)[keyof typeof PositionType]
-
-export const Unit = {
- Undefined: 0,
- Point: 1,
- Percent: 2,
- Auto: 3,
-} as const
-export type Unit = (typeof Unit)[keyof typeof Unit]
-
-export const Wrap = {
- NoWrap: 0,
- Wrap: 1,
- WrapReverse: 2,
-} as const
-export type Wrap = (typeof Wrap)[keyof typeof Wrap]
diff --git a/src/native-ts/yoga-layout/index.ts b/src/native-ts/yoga-layout/index.ts
deleted file mode 100644
index 49b9602be..000000000
--- a/src/native-ts/yoga-layout/index.ts
+++ /dev/null
@@ -1,2578 +0,0 @@
-/**
- * Pure-TypeScript port of yoga-layout (Meta's flexbox engine).
- *
- * This matches the `yoga-layout/load` API surface used by src/ink/layout/yoga.ts.
- * The upstream C++ source is ~2500 lines in CalculateLayout.cpp alone; this port
- * is a simplified single-pass flexbox implementation that covers the subset of
- * features Ink actually uses:
- * - flex-direction (row/column + reverse)
- * - flex-grow / flex-shrink / flex-basis
- * - align-items / align-self (stretch, flex-start, center, flex-end)
- * - justify-content (all six values)
- * - margin / padding / border / gap
- * - width / height / min / max (point, percent, auto)
- * - position: relative / absolute
- * - display: flex / none
- * - measure functions (for text nodes)
- *
- * Also implemented for spec parity (not used by Ink):
- * - margin: auto (main + cross axis, overrides justify/align)
- * - multi-pass flex clamping when children hit min/max constraints
- * - flex-grow/shrink against container min/max when size is indefinite
- *
- * Also implemented for spec parity (not used by Ink):
- * - flex-wrap: wrap / wrap-reverse (multi-line flex)
- * - align-content (positions wrapped lines on cross axis)
- *
- * Also implemented for spec parity (not used by Ink):
- * - display: contents (children lifted to grandparent, box removed)
- *
- * Also implemented for spec parity (not used by Ink):
- * - baseline alignment (align-items/align-self: baseline)
- *
- * Not implemented (not used by Ink):
- * - aspect-ratio
- * - box-sizing: content-box
- * - RTL direction (Ink always passes Direction.LTR)
- *
- * Upstream: https://github.com/facebook/yoga
- */
-
-import {
- Align,
- BoxSizing,
- Dimension,
- Direction,
- Display,
- Edge,
- Errata,
- ExperimentalFeature,
- FlexDirection,
- Gutter,
- Justify,
- MeasureMode,
- Overflow,
- PositionType,
- Unit,
- Wrap,
-} from './enums.js'
-
-export {
- Align,
- BoxSizing,
- Dimension,
- Direction,
- Display,
- Edge,
- Errata,
- ExperimentalFeature,
- FlexDirection,
- Gutter,
- Justify,
- MeasureMode,
- Overflow,
- PositionType,
- Unit,
- Wrap,
-}
-
-// --
-// Value types
-
-export type Value = {
- unit: Unit
- value: number
-}
-
-const UNDEFINED_VALUE: Value = { unit: Unit.Undefined, value: NaN }
-const AUTO_VALUE: Value = { unit: Unit.Auto, value: NaN }
-
-function pointValue(v: number): Value {
- return { unit: Unit.Point, value: v }
-}
-function percentValue(v: number): Value {
- return { unit: Unit.Percent, value: v }
-}
-
-function resolveValue(v: Value, ownerSize: number): number {
- switch (v.unit) {
- case Unit.Point:
- return v.value
- case Unit.Percent:
- return isNaN(ownerSize) ? NaN : (v.value * ownerSize) / 100
- default:
- return NaN
- }
-}
-
-function isDefined(n: number): boolean {
- return !isNaN(n)
-}
-
-// NaN-safe equality for layout-cache input comparison
-function sameFloat(a: number, b: number): boolean {
- return a === b || (a !== a && b !== b)
-}
-
-// --
-// Layout result (computed values)
-
-type Layout = {
- left: number
- top: number
- width: number
- height: number
- // Computed per-edge values (resolved to physical edges)
- border: [number, number, number, number] // left, top, right, bottom
- padding: [number, number, number, number]
- margin: [number, number, number, number]
-}
-
-// --
-// Style (input values)
-
-type Style = {
- direction: Direction
- flexDirection: FlexDirection
- justifyContent: Justify
- alignItems: Align
- alignSelf: Align
- alignContent: Align
- flexWrap: Wrap
- overflow: Overflow
- display: Display
- positionType: PositionType
-
- flexGrow: number
- flexShrink: number
- flexBasis: Value
-
- // 9-edge arrays indexed by Edge enum
- margin: Value[]
- padding: Value[]
- border: Value[]
- position: Value[]
-
- // 3-gutter array indexed by Gutter enum
- gap: Value[]
-
- width: Value
- height: Value
- minWidth: Value
- minHeight: Value
- maxWidth: Value
- maxHeight: Value
-}
-
-function defaultStyle(): Style {
- return {
- direction: Direction.Inherit,
- flexDirection: FlexDirection.Column,
- justifyContent: Justify.FlexStart,
- alignItems: Align.Stretch,
- alignSelf: Align.Auto,
- alignContent: Align.FlexStart,
- flexWrap: Wrap.NoWrap,
- overflow: Overflow.Visible,
- display: Display.Flex,
- positionType: PositionType.Relative,
- flexGrow: 0,
- flexShrink: 0,
- flexBasis: AUTO_VALUE,
- margin: new Array(9).fill(UNDEFINED_VALUE),
- padding: new Array(9).fill(UNDEFINED_VALUE),
- border: new Array(9).fill(UNDEFINED_VALUE),
- position: new Array(9).fill(UNDEFINED_VALUE),
- gap: new Array(3).fill(UNDEFINED_VALUE),
- width: AUTO_VALUE,
- height: AUTO_VALUE,
- minWidth: UNDEFINED_VALUE,
- minHeight: UNDEFINED_VALUE,
- maxWidth: UNDEFINED_VALUE,
- maxHeight: UNDEFINED_VALUE,
- }
-}
-
-// --
-// Edge resolution — yoga's 9-edge model collapsed to 4 physical edges
-
-const EDGE_LEFT = 0
-const EDGE_TOP = 1
-const EDGE_RIGHT = 2
-const EDGE_BOTTOM = 3
-
-function resolveEdge(
- edges: Value[],
- physicalEdge: number,
- ownerSize: number,
- // For margin/position we allow auto; for padding/border auto resolves to 0
- allowAuto = false,
-): number {
- // Precedence: specific edge > horizontal/vertical > all
- let v = edges[physicalEdge]!
- if (v.unit === Unit.Undefined) {
- if (physicalEdge === EDGE_LEFT || physicalEdge === EDGE_RIGHT) {
- v = edges[Edge.Horizontal]!
- } else {
- v = edges[Edge.Vertical]!
- }
- }
- if (v.unit === Unit.Undefined) {
- v = edges[Edge.All]!
- }
- // Start/End map to Left/Right for LTR (Ink is always LTR)
- if (v.unit === Unit.Undefined) {
- if (physicalEdge === EDGE_LEFT) v = edges[Edge.Start]!
- if (physicalEdge === EDGE_RIGHT) v = edges[Edge.End]!
- }
- if (v.unit === Unit.Undefined) return 0
- if (v.unit === Unit.Auto) return allowAuto ? NaN : 0
- return resolveValue(v, ownerSize)
-}
-
-function resolveEdgeRaw(edges: Value[], physicalEdge: number): Value {
- let v = edges[physicalEdge]!
- if (v.unit === Unit.Undefined) {
- if (physicalEdge === EDGE_LEFT || physicalEdge === EDGE_RIGHT) {
- v = edges[Edge.Horizontal]!
- } else {
- v = edges[Edge.Vertical]!
- }
- }
- if (v.unit === Unit.Undefined) v = edges[Edge.All]!
- if (v.unit === Unit.Undefined) {
- if (physicalEdge === EDGE_LEFT) v = edges[Edge.Start]!
- if (physicalEdge === EDGE_RIGHT) v = edges[Edge.End]!
- }
- return v
-}
-
-function isMarginAuto(edges: Value[], physicalEdge: number): boolean {
- return resolveEdgeRaw(edges, physicalEdge).unit === Unit.Auto
-}
-
-// Setter helpers for the _hasAutoMargin / _hasPosition fast-path flags.
-// Unit.Undefined = 0, Unit.Auto = 3.
-function hasAnyAutoEdge(edges: Value[]): boolean {
- for (let i = 0; i < 9; i++) if (edges[i]!.unit === 3) return true
- return false
-}
-function hasAnyDefinedEdge(edges: Value[]): boolean {
- for (let i = 0; i < 9; i++) if (edges[i]!.unit !== 0) return true
- return false
-}
-
-// Hot path: resolve all 4 physical edges in one pass, writing into `out`.
-// Equivalent to calling resolveEdge() 4× with allowAuto=false, but hoists the
-// shared fallback lookups (Horizontal/Vertical/All/Start/End) and avoids
-// allocating a fresh 4-array on every layoutNode() call.
-function resolveEdges4Into(
- edges: Value[],
- ownerSize: number,
- out: [number, number, number, number],
-): void {
- // Hoist fallbacks once — the 4 per-edge chains share these reads.
- const eH = edges[6]! // Edge.Horizontal
- const eV = edges[7]! // Edge.Vertical
- const eA = edges[8]! // Edge.All
- const eS = edges[4]! // Edge.Start
- const eE = edges[5]! // Edge.End
- const pctDenom = isNaN(ownerSize) ? NaN : ownerSize / 100
-
- // Left: edges[0] → Horizontal → All → Start
- let v = edges[0]!
- if (v.unit === 0) v = eH
- if (v.unit === 0) v = eA
- if (v.unit === 0) v = eS
- out[0] = v.unit === 1 ? v.value : v.unit === 2 ? v.value * pctDenom : 0
-
- // Top: edges[1] → Vertical → All
- v = edges[1]!
- if (v.unit === 0) v = eV
- if (v.unit === 0) v = eA
- out[1] = v.unit === 1 ? v.value : v.unit === 2 ? v.value * pctDenom : 0
-
- // Right: edges[2] → Horizontal → All → End
- v = edges[2]!
- if (v.unit === 0) v = eH
- if (v.unit === 0) v = eA
- if (v.unit === 0) v = eE
- out[2] = v.unit === 1 ? v.value : v.unit === 2 ? v.value * pctDenom : 0
-
- // Bottom: edges[3] → Vertical → All
- v = edges[3]!
- if (v.unit === 0) v = eV
- if (v.unit === 0) v = eA
- out[3] = v.unit === 1 ? v.value : v.unit === 2 ? v.value * pctDenom : 0
-}
-
-// --
-// Axis helpers
-
-function isRow(dir: FlexDirection): boolean {
- return dir === FlexDirection.Row || dir === FlexDirection.RowReverse
-}
-function isReverse(dir: FlexDirection): boolean {
- return dir === FlexDirection.RowReverse || dir === FlexDirection.ColumnReverse
-}
-function crossAxis(dir: FlexDirection): FlexDirection {
- return isRow(dir) ? FlexDirection.Column : FlexDirection.Row
-}
-function leadingEdge(dir: FlexDirection): number {
- switch (dir) {
- case FlexDirection.Row:
- return EDGE_LEFT
- case FlexDirection.RowReverse:
- return EDGE_RIGHT
- case FlexDirection.Column:
- return EDGE_TOP
- case FlexDirection.ColumnReverse:
- return EDGE_BOTTOM
- }
-}
-function trailingEdge(dir: FlexDirection): number {
- switch (dir) {
- case FlexDirection.Row:
- return EDGE_RIGHT
- case FlexDirection.RowReverse:
- return EDGE_LEFT
- case FlexDirection.Column:
- return EDGE_BOTTOM
- case FlexDirection.ColumnReverse:
- return EDGE_TOP
- }
-}
-
-// --
-// Public types
-
-export type MeasureFunction = (
- width: number,
- widthMode: MeasureMode,
- height: number,
- heightMode: MeasureMode,
-) => { width: number; height: number }
-
-export type Size = { width: number; height: number }
-
-// --
-// Config
-
-export type Config = {
- pointScaleFactor: number
- errata: Errata
- useWebDefaults: boolean
- free(): void
- isExperimentalFeatureEnabled(_: ExperimentalFeature): boolean
- setExperimentalFeatureEnabled(_: ExperimentalFeature, __: boolean): void
- setPointScaleFactor(factor: number): void
- getErrata(): Errata
- setErrata(errata: Errata): void
- setUseWebDefaults(v: boolean): void
-}
-
-function createConfig(): Config {
- const config: Config = {
- pointScaleFactor: 1,
- errata: Errata.None,
- useWebDefaults: false,
- free() {},
- isExperimentalFeatureEnabled() {
- return false
- },
- setExperimentalFeatureEnabled() {},
- setPointScaleFactor(f) {
- config.pointScaleFactor = f
- },
- getErrata() {
- return config.errata
- },
- setErrata(e) {
- config.errata = e
- },
- setUseWebDefaults(v) {
- config.useWebDefaults = v
- },
- }
- return config
-}
-
-// --
-// Node implementation
-
-export class Node {
- style: Style
- layout: Layout
- parent: Node | null
- children: Node[]
- measureFunc: MeasureFunction | null
- config: Config
- isDirty_: boolean
- isReferenceBaseline_: boolean
-
- // Per-layout scratch (not public API)
- _flexBasis = 0
- _mainSize = 0
- _crossSize = 0
- _lineIndex = 0
- // Fast-path flags maintained by style setters. Per CPU profile, the
- // positioning loop calls isMarginAuto 6× and resolveEdgeRaw(position) 4×
- // per child per layout pass — ~11k calls for the 1000-node bench, nearly
- // all of which return false/undefined since most nodes have no auto
- // margins and no position insets. These flags let us skip straight to
- // the common case with a single branch.
- _hasAutoMargin = false
- _hasPosition = false
- // Same pattern for the 3× resolveEdges4Into calls at the top of every
- // layoutNode(). In the 1000-node bench ~67% of those calls operate on
- // all-undefined edge arrays (most nodes have no border; only cols have
- // padding; only leaf cells have margin) — a single-branch skip beats
- // ~20 property reads + ~15 compares + 4 writes of zeros.
- _hasPadding = false
- _hasBorder = false
- _hasMargin = false
- // -- Dirty-flag layout cache. Mirrors upstream CalculateLayout.cpp's
- // layoutNodeInternal: skip a subtree entirely when it's clean and we're
- // asking the same question we cached the answer to. Two slots since
- // each node typically sees a measure call (performLayout=false, from
- // computeFlexBasis) followed by a layout call (performLayout=true) with
- // different inputs per parent pass — a single slot thrashes. Re-layout
- // bench (dirty one leaf, recompute root) went 2.7x→1.1x with this:
- // clean siblings skip straight through, only the dirty chain recomputes.
- _lW = NaN
- _lH = NaN
- _lWM: MeasureMode = 0
- _lHM: MeasureMode = 0
- _lOW = NaN
- _lOH = NaN
- _lFW = false
- _lFH = false
- // _hasL stores INPUTS early (before compute) but layout.width/height are
- // mutated by the multi-entry cache and by subsequent compute calls with
- // different inputs. Without storing OUTPUTS, a _hasL hit returns whatever
- // layout.width/height happened to be left by the last call — the scrollbox
- // vpH=33→2624 bug. Store + restore outputs like the multi-entry cache does.
- _lOutW = NaN
- _lOutH = NaN
- _hasL = false
- _mW = NaN
- _mH = NaN
- _mWM: MeasureMode = 0
- _mHM: MeasureMode = 0
- _mOW = NaN
- _mOH = NaN
- _mOutW = NaN
- _mOutH = NaN
- _hasM = false
- // Cached computeFlexBasis result. For clean children, basis only depends
- // on the container's inner dimensions — if those haven't changed, skip the
- // layoutNode(performLayout=false) recursion entirely. This is the hot path
- // for scroll: 500-message content container is dirty, its 499 clean
- // children each get measured ~20× as the dirty chain's measure/layout
- // passes cascade. Basis cache short-circuits at the child boundary.
- _fbBasis = NaN
- _fbOwnerW = NaN
- _fbOwnerH = NaN
- _fbAvailMain = NaN
- _fbAvailCross = NaN
- _fbCrossMode: MeasureMode = 0
- // Generation at which _fbBasis was written. Dirty nodes from a PREVIOUS
- // generation have stale cache (subtree changed), but within the SAME
- // generation the cache is fresh — the dirty chain's measure→layout
- // cascade invokes computeFlexBasis ≥2^depth times per calculateLayout on
- // fresh-mounted items, and the subtree doesn't change between calls.
- // Gating on generation instead of isDirty_ lets fresh mounts (virtual
- // scroll) cache-hit after first compute: 105k visits → ~10k.
- _fbGen = -1
- // Multi-entry layout cache — stores (inputs → computed w,h) so hits with
- // different inputs than _hasL can restore the right dimensions. Upstream
- // yoga uses 16; 4 covers Ink's dirty-chain depth. Packed as flat arrays
- // to avoid per-entry object allocs. Slot i uses indices [i*8, i*8+8) in
- // _cIn (aW,aH,wM,hM,oW,oH,fW,fH) and [i*2, i*2+2) in _cOut (w,h).
- _cIn: Float64Array | null = null
- _cOut: Float64Array | null = null
- _cGen = -1
- _cN = 0
- _cWr = 0
-
- constructor(config?: Config) {
- this.style = defaultStyle()
- this.layout = {
- left: 0,
- top: 0,
- width: 0,
- height: 0,
- border: [0, 0, 0, 0],
- padding: [0, 0, 0, 0],
- margin: [0, 0, 0, 0],
- }
- this.parent = null
- this.children = []
- this.measureFunc = null
- this.config = config ?? DEFAULT_CONFIG
- this.isDirty_ = true
- this.isReferenceBaseline_ = false
- _yogaLiveNodes++
- }
-
- // -- Tree
-
- insertChild(child: Node, index: number): void {
- child.parent = this
- this.children.splice(index, 0, child)
- this.markDirty()
- }
- removeChild(child: Node): void {
- const idx = this.children.indexOf(child)
- if (idx >= 0) {
- this.children.splice(idx, 1)
- child.parent = null
- this.markDirty()
- }
- }
- getChild(index: number): Node {
- return this.children[index]!
- }
- getChildCount(): number {
- return this.children.length
- }
- getParent(): Node | null {
- return this.parent
- }
-
- // -- Lifecycle
-
- free(): void {
- this.parent = null
- this.children = []
- this.measureFunc = null
- this._cIn = null
- this._cOut = null
- _yogaLiveNodes--
- }
- freeRecursive(): void {
- for (const c of this.children) c.freeRecursive()
- this.free()
- }
- reset(): void {
- this.style = defaultStyle()
- this.children = []
- this.parent = null
- this.measureFunc = null
- this.isDirty_ = true
- this._hasAutoMargin = false
- this._hasPosition = false
- this._hasPadding = false
- this._hasBorder = false
- this._hasMargin = false
- this._hasL = false
- this._hasM = false
- this._cN = 0
- this._cWr = 0
- this._fbBasis = NaN
- }
-
- // -- Dirty tracking
-
- markDirty(): void {
- this.isDirty_ = true
- if (this.parent && !this.parent.isDirty_) this.parent.markDirty()
- }
- isDirty(): boolean {
- return this.isDirty_
- }
- hasNewLayout(): boolean {
- return true
- }
- markLayoutSeen(): void {}
-
- // -- Measure function
-
- setMeasureFunc(fn: MeasureFunction | null): void {
- this.measureFunc = fn
- this.markDirty()
- }
- unsetMeasureFunc(): void {
- this.measureFunc = null
- this.markDirty()
- }
-
- // -- Computed layout getters
-
- getComputedLeft(): number {
- return this.layout.left
- }
- getComputedTop(): number {
- return this.layout.top
- }
- getComputedWidth(): number {
- return this.layout.width
- }
- getComputedHeight(): number {
- return this.layout.height
- }
- getComputedRight(): number {
- const p = this.parent
- return p ? p.layout.width - this.layout.left - this.layout.width : 0
- }
- getComputedBottom(): number {
- const p = this.parent
- return p ? p.layout.height - this.layout.top - this.layout.height : 0
- }
- getComputedLayout(): {
- left: number
- top: number
- right: number
- bottom: number
- width: number
- height: number
- } {
- return {
- left: this.layout.left,
- top: this.layout.top,
- right: this.getComputedRight(),
- bottom: this.getComputedBottom(),
- width: this.layout.width,
- height: this.layout.height,
- }
- }
- getComputedBorder(edge: Edge): number {
- return this.layout.border[physicalEdge(edge)]!
- }
- getComputedPadding(edge: Edge): number {
- return this.layout.padding[physicalEdge(edge)]!
- }
- getComputedMargin(edge: Edge): number {
- return this.layout.margin[physicalEdge(edge)]!
- }
-
- // -- Style setters: dimensions
-
- setWidth(v: number | 'auto' | string | undefined): void {
- this.style.width = parseDimension(v)
- this.markDirty()
- }
- setWidthPercent(v: number): void {
- this.style.width = percentValue(v)
- this.markDirty()
- }
- setWidthAuto(): void {
- this.style.width = AUTO_VALUE
- this.markDirty()
- }
- setHeight(v: number | 'auto' | string | undefined): void {
- this.style.height = parseDimension(v)
- this.markDirty()
- }
- setHeightPercent(v: number): void {
- this.style.height = percentValue(v)
- this.markDirty()
- }
- setHeightAuto(): void {
- this.style.height = AUTO_VALUE
- this.markDirty()
- }
- setMinWidth(v: number | string | undefined): void {
- this.style.minWidth = parseDimension(v)
- this.markDirty()
- }
- setMinWidthPercent(v: number): void {
- this.style.minWidth = percentValue(v)
- this.markDirty()
- }
- setMinHeight(v: number | string | undefined): void {
- this.style.minHeight = parseDimension(v)
- this.markDirty()
- }
- setMinHeightPercent(v: number): void {
- this.style.minHeight = percentValue(v)
- this.markDirty()
- }
- setMaxWidth(v: number | string | undefined): void {
- this.style.maxWidth = parseDimension(v)
- this.markDirty()
- }
- setMaxWidthPercent(v: number): void {
- this.style.maxWidth = percentValue(v)
- this.markDirty()
- }
- setMaxHeight(v: number | string | undefined): void {
- this.style.maxHeight = parseDimension(v)
- this.markDirty()
- }
- setMaxHeightPercent(v: number): void {
- this.style.maxHeight = percentValue(v)
- this.markDirty()
- }
-
- // -- Style setters: flex
-
- setFlexDirection(dir: FlexDirection): void {
- this.style.flexDirection = dir
- this.markDirty()
- }
- setFlexGrow(v: number | undefined): void {
- this.style.flexGrow = v ?? 0
- this.markDirty()
- }
- setFlexShrink(v: number | undefined): void {
- this.style.flexShrink = v ?? 0
- this.markDirty()
- }
- setFlex(v: number | undefined): void {
- if (v === undefined || isNaN(v)) {
- this.style.flexGrow = 0
- this.style.flexShrink = 0
- } else if (v > 0) {
- this.style.flexGrow = v
- this.style.flexShrink = 1
- this.style.flexBasis = pointValue(0)
- } else if (v < 0) {
- this.style.flexGrow = 0
- this.style.flexShrink = -v
- } else {
- this.style.flexGrow = 0
- this.style.flexShrink = 0
- }
- this.markDirty()
- }
- setFlexBasis(v: number | 'auto' | string | undefined): void {
- this.style.flexBasis = parseDimension(v)
- this.markDirty()
- }
- setFlexBasisPercent(v: number): void {
- this.style.flexBasis = percentValue(v)
- this.markDirty()
- }
- setFlexBasisAuto(): void {
- this.style.flexBasis = AUTO_VALUE
- this.markDirty()
- }
- setFlexWrap(wrap: Wrap): void {
- this.style.flexWrap = wrap
- this.markDirty()
- }
-
- // -- Style setters: alignment
-
- setAlignItems(a: Align): void {
- this.style.alignItems = a
- this.markDirty()
- }
- setAlignSelf(a: Align): void {
- this.style.alignSelf = a
- this.markDirty()
- }
- setAlignContent(a: Align): void {
- this.style.alignContent = a
- this.markDirty()
- }
- setJustifyContent(j: Justify): void {
- this.style.justifyContent = j
- this.markDirty()
- }
-
- // -- Style setters: display / position / overflow
-
- setDisplay(d: Display): void {
- this.style.display = d
- this.markDirty()
- }
- getDisplay(): Display {
- return this.style.display
- }
- setPositionType(t: PositionType): void {
- this.style.positionType = t
- this.markDirty()
- }
- setPosition(edge: Edge, v: number | string | undefined): void {
- this.style.position[edge] = parseDimension(v)
- this._hasPosition = hasAnyDefinedEdge(this.style.position)
- this.markDirty()
- }
- setPositionPercent(edge: Edge, v: number): void {
- this.style.position[edge] = percentValue(v)
- this._hasPosition = true
- this.markDirty()
- }
- setPositionAuto(edge: Edge): void {
- this.style.position[edge] = AUTO_VALUE
- this._hasPosition = true
- this.markDirty()
- }
- setOverflow(o: Overflow): void {
- this.style.overflow = o
- this.markDirty()
- }
- setDirection(d: Direction): void {
- this.style.direction = d
- this.markDirty()
- }
- setBoxSizing(_: BoxSizing): void {
- // Not implemented — Ink doesn't use content-box
- }
-
- // -- Style setters: spacing
-
- setMargin(edge: Edge, v: number | 'auto' | string | undefined): void {
- const val = parseDimension(v)
- this.style.margin[edge] = val
- if (val.unit === Unit.Auto) this._hasAutoMargin = true
- else this._hasAutoMargin = hasAnyAutoEdge(this.style.margin)
- this._hasMargin =
- this._hasAutoMargin || hasAnyDefinedEdge(this.style.margin)
- this.markDirty()
- }
- setMarginPercent(edge: Edge, v: number): void {
- this.style.margin[edge] = percentValue(v)
- this._hasAutoMargin = hasAnyAutoEdge(this.style.margin)
- this._hasMargin = true
- this.markDirty()
- }
- setMarginAuto(edge: Edge): void {
- this.style.margin[edge] = AUTO_VALUE
- this._hasAutoMargin = true
- this._hasMargin = true
- this.markDirty()
- }
- setPadding(edge: Edge, v: number | string | undefined): void {
- this.style.padding[edge] = parseDimension(v)
- this._hasPadding = hasAnyDefinedEdge(this.style.padding)
- this.markDirty()
- }
- setPaddingPercent(edge: Edge, v: number): void {
- this.style.padding[edge] = percentValue(v)
- this._hasPadding = true
- this.markDirty()
- }
- setBorder(edge: Edge, v: number | undefined): void {
- this.style.border[edge] = v === undefined ? UNDEFINED_VALUE : pointValue(v)
- this._hasBorder = hasAnyDefinedEdge(this.style.border)
- this.markDirty()
- }
- setGap(gutter: Gutter, v: number | string | undefined): void {
- this.style.gap[gutter] = parseDimension(v)
- this.markDirty()
- }
- setGapPercent(gutter: Gutter, v: number): void {
- this.style.gap[gutter] = percentValue(v)
- this.markDirty()
- }
-
- // -- Style getters (partial — only what tests need)
-
- getFlexDirection(): FlexDirection {
- return this.style.flexDirection
- }
- getJustifyContent(): Justify {
- return this.style.justifyContent
- }
- getAlignItems(): Align {
- return this.style.alignItems
- }
- getAlignSelf(): Align {
- return this.style.alignSelf
- }
- getAlignContent(): Align {
- return this.style.alignContent
- }
- getFlexGrow(): number {
- return this.style.flexGrow
- }
- getFlexShrink(): number {
- return this.style.flexShrink
- }
- getFlexBasis(): Value {
- return this.style.flexBasis
- }
- getFlexWrap(): Wrap {
- return this.style.flexWrap
- }
- getWidth(): Value {
- return this.style.width
- }
- getHeight(): Value {
- return this.style.height
- }
- getOverflow(): Overflow {
- return this.style.overflow
- }
- getPositionType(): PositionType {
- return this.style.positionType
- }
- getDirection(): Direction {
- return this.style.direction
- }
-
- // -- Unused API stubs (present for API parity)
-
- copyStyle(_: Node): void {}
- setDirtiedFunc(_: unknown): void {}
- unsetDirtiedFunc(): void {}
- setIsReferenceBaseline(v: boolean): void {
- this.isReferenceBaseline_ = v
- this.markDirty()
- }
- isReferenceBaseline(): boolean {
- return this.isReferenceBaseline_
- }
- setAspectRatio(_: number | undefined): void {}
- getAspectRatio(): number {
- return NaN
- }
- setAlwaysFormsContainingBlock(_: boolean): void {}
-
- // -- Layout entry point
-
- calculateLayout(
- ownerWidth: number | undefined,
- ownerHeight: number | undefined,
- _direction?: Direction,
- ): void {
- _yogaNodesVisited = 0
- _yogaMeasureCalls = 0
- _yogaCacheHits = 0
- _generation++
- const w = ownerWidth === undefined ? NaN : ownerWidth
- const h = ownerHeight === undefined ? NaN : ownerHeight
- layoutNode(
- this,
- w,
- h,
- isDefined(w) ? MeasureMode.Exactly : MeasureMode.Undefined,
- isDefined(h) ? MeasureMode.Exactly : MeasureMode.Undefined,
- w,
- h,
- true,
- )
- // Root's own position = margin + position insets (yoga applies position
- // to the root even without a parent container; this matters for rounding
- // since the root's abs top/left seeds the pixel-grid walk).
- const mar = this.layout.margin
- const posL = resolveValue(
- resolveEdgeRaw(this.style.position, EDGE_LEFT),
- isDefined(w) ? w : 0,
- )
- const posT = resolveValue(
- resolveEdgeRaw(this.style.position, EDGE_TOP),
- isDefined(w) ? w : 0,
- )
- this.layout.left = mar[EDGE_LEFT] + (isDefined(posL) ? posL : 0)
- this.layout.top = mar[EDGE_TOP] + (isDefined(posT) ? posT : 0)
- roundLayout(this, this.config.pointScaleFactor, 0, 0)
- }
-}
-
-const DEFAULT_CONFIG = createConfig()
-
-const CACHE_SLOTS = 4
-function cacheWrite(
- node: Node,
- aW: number,
- aH: number,
- wM: MeasureMode,
- hM: MeasureMode,
- oW: number,
- oH: number,
- fW: boolean,
- fH: boolean,
- wasDirty: boolean,
-): void {
- if (!node._cIn) {
- node._cIn = new Float64Array(CACHE_SLOTS * 8)
- node._cOut = new Float64Array(CACHE_SLOTS * 2)
- }
- // First write after a dirty clears stale entries from before the dirty.
- // _cGen < _generation means entries are from a previous calculateLayout;
- // if wasDirty, the subtree changed since then → old dimensions invalid.
- // Clean nodes' old entries stay — same subtree → same result for same
- // inputs, so cross-generation caching works (the scroll hot path where
- // 499 clean messages cache-hit while one dirty leaf recomputes).
- if (wasDirty && node._cGen !== _generation) {
- node._cN = 0
- node._cWr = 0
- }
- // LRU write index wraps; _cN stays at CACHE_SLOTS so the read scan always
- // checks all populated slots (not just those since last wrap).
- const i = node._cWr++ % CACHE_SLOTS
- if (node._cN < CACHE_SLOTS) node._cN = node._cWr
- const o = i * 8
- const cIn = node._cIn
- cIn[o] = aW
- cIn[o + 1] = aH
- cIn[o + 2] = wM
- cIn[o + 3] = hM
- cIn[o + 4] = oW
- cIn[o + 5] = oH
- cIn[o + 6] = fW ? 1 : 0
- cIn[o + 7] = fH ? 1 : 0
- node._cOut![i * 2] = node.layout.width
- node._cOut![i * 2 + 1] = node.layout.height
- node._cGen = _generation
-}
-
-// Store computed layout.width/height into the single-slot cache output fields.
-// _hasL/_hasM inputs are committed at the TOP of layoutNode (before compute);
-// outputs must be committed HERE (after compute) so a cache hit can restore
-// the correct dimensions. Without this, a _hasL hit returns whatever
-// layout.width/height was left by the last call — which may be the intrinsic
-// content height from a heightMode=Undefined measure pass rather than the
-// constrained viewport height from the layout pass. That's the scrollbox
-// vpH=33→2624 bug: scrollTop clamps to 0, viewport goes blank.
-function commitCacheOutputs(node: Node, performLayout: boolean): void {
- if (performLayout) {
- node._lOutW = node.layout.width
- node._lOutH = node.layout.height
- } else {
- node._mOutW = node.layout.width
- node._mOutH = node.layout.height
- }
-}
-
-// --
-// Core flexbox algorithm
-
-// Profiling counters — reset per calculateLayout, read via getYogaCounters.
-// Incremented on each calculateLayout(). Nodes stamp _fbGen/_cGen when
-// their cache is written; a cache entry with gen === _generation was
-// computed THIS pass and is fresh regardless of isDirty_ state.
-let _generation = 0
-let _yogaNodesVisited = 0
-let _yogaMeasureCalls = 0
-let _yogaCacheHits = 0
-let _yogaLiveNodes = 0
-export function getYogaCounters(): {
- visited: number
- measured: number
- cacheHits: number
- live: number
-} {
- return {
- visited: _yogaNodesVisited,
- measured: _yogaMeasureCalls,
- cacheHits: _yogaCacheHits,
- live: _yogaLiveNodes,
- }
-}
-
-function layoutNode(
- node: Node,
- availableWidth: number,
- availableHeight: number,
- widthMode: MeasureMode,
- heightMode: MeasureMode,
- ownerWidth: number,
- ownerHeight: number,
- performLayout: boolean,
- // When true, ignore style dimension on this axis — the flex container
- // has already determined the main size (flex-basis + grow/shrink result).
- forceWidth = false,
- forceHeight = false,
-): void {
- _yogaNodesVisited++
- const style = node.style
- const layout = node.layout
-
- // Dirty-flag skip: clean subtree + matching inputs → layout object already
- // holds the answer. A cached layout result also satisfies a measure request
- // (positions are a superset of dimensions); the reverse does not hold.
- // Same-generation entries are fresh regardless of isDirty_ — they were
- // computed THIS calculateLayout, the subtree hasn't changed since.
- // Previous-generation entries need !isDirty_ (a dirty node's cache from
- // before the dirty is stale).
- // sameGen bypass only for MEASURE calls — a layout-pass cache hit would
- // skip the child-positioning recursion (STEP 5), leaving children at
- // stale positions. Measure calls only need w/h which the cache stores.
- const sameGen = node._cGen === _generation && !performLayout
- if (!node.isDirty_ || sameGen) {
- if (
- !node.isDirty_ &&
- node._hasL &&
- node._lWM === widthMode &&
- node._lHM === heightMode &&
- node._lFW === forceWidth &&
- node._lFH === forceHeight &&
- sameFloat(node._lW, availableWidth) &&
- sameFloat(node._lH, availableHeight) &&
- sameFloat(node._lOW, ownerWidth) &&
- sameFloat(node._lOH, ownerHeight)
- ) {
- _yogaCacheHits++
- layout.width = node._lOutW
- layout.height = node._lOutH
- return
- }
- // Multi-entry cache: scan for matching inputs, restore cached w/h on hit.
- // Covers the scroll case where a dirty ancestor's measure→layout cascade
- // produces N>1 distinct input combos per clean child — the single _hasL
- // slot thrashed, forcing full subtree recursion. With 500-message
- // scrollbox and one dirty leaf, this took dirty-leaf relayout from
- // 76k layoutNode calls (21.7×nodes) to 4k (1.2×nodes), 6.86ms → 550µs.
- // Same-generation check covers fresh-mounted (dirty) nodes during
- // virtual scroll — the dirty chain invokes them ≥2^depth times, first
- // call writes cache, rest hit: 105k visits → ~10k for 1593-node tree.
- if (node._cN > 0 && (sameGen || !node.isDirty_)) {
- const cIn = node._cIn!
- for (let i = 0; i < node._cN; i++) {
- const o = i * 8
- if (
- cIn[o + 2] === widthMode &&
- cIn[o + 3] === heightMode &&
- cIn[o + 6] === (forceWidth ? 1 : 0) &&
- cIn[o + 7] === (forceHeight ? 1 : 0) &&
- sameFloat(cIn[o]!, availableWidth) &&
- sameFloat(cIn[o + 1]!, availableHeight) &&
- sameFloat(cIn[o + 4]!, ownerWidth) &&
- sameFloat(cIn[o + 5]!, ownerHeight)
- ) {
- layout.width = node._cOut![i * 2]!
- layout.height = node._cOut![i * 2 + 1]!
- _yogaCacheHits++
- return
- }
- }
- }
- if (
- !node.isDirty_ &&
- !performLayout &&
- node._hasM &&
- node._mWM === widthMode &&
- node._mHM === heightMode &&
- sameFloat(node._mW, availableWidth) &&
- sameFloat(node._mH, availableHeight) &&
- sameFloat(node._mOW, ownerWidth) &&
- sameFloat(node._mOH, ownerHeight)
- ) {
- layout.width = node._mOutW
- layout.height = node._mOutH
- _yogaCacheHits++
- return
- }
- }
- // Commit cache inputs up front so every return path leaves a valid entry.
- // Only clear isDirty_ on the LAYOUT pass — the measure pass (computeFlexBasis
- // → layoutNode(performLayout=false)) runs before the layout pass in the same
- // calculateLayout call. Clearing dirty during measure lets the subsequent
- // layout pass hit the STALE _hasL cache from the previous calculateLayout
- // (before children were inserted), so ScrollBox content height never grows
- // and sticky-scroll never follows new content. A dirty node's _hasL entry is
- // stale by definition — invalidate it so the layout pass recomputes.
- const wasDirty = node.isDirty_
- if (performLayout) {
- node._lW = availableWidth
- node._lH = availableHeight
- node._lWM = widthMode
- node._lHM = heightMode
- node._lOW = ownerWidth
- node._lOH = ownerHeight
- node._lFW = forceWidth
- node._lFH = forceHeight
- node._hasL = true
- node.isDirty_ = false
- // Previous approach cleared _cN here to prevent stale pre-dirty entries
- // from hitting (long-continuous blank-screen bug). Now replaced by
- // generation stamping: the cache check requires sameGen || !isDirty_, so
- // previous-generation entries from a dirty node can't hit. Clearing here
- // would wipe fresh same-generation entries from an earlier measure call,
- // forcing recompute on the layout call.
- if (wasDirty) node._hasM = false
- } else {
- node._mW = availableWidth
- node._mH = availableHeight
- node._mWM = widthMode
- node._mHM = heightMode
- node._mOW = ownerWidth
- node._mOH = ownerHeight
- node._hasM = true
- // Don't clear isDirty_. For DIRTY nodes, invalidate _hasL so the upcoming
- // performLayout=true call recomputes with the new child set (otherwise
- // sticky-scroll never follows new content — the bug from 4557bc9f9c).
- // Clean nodes keep _hasL: their layout from the previous generation is
- // still valid, they're only here because an ancestor is dirty and called
- // with different inputs than cached.
- if (wasDirty) node._hasL = false
- }
-
- // Resolve padding/border/margin against ownerWidth (yoga uses ownerWidth for %)
- // Write directly into the pre-allocated layout arrays — avoids 3 allocs per
- // layoutNode call and 12 resolveEdge calls (was the #1 hotspot per CPU profile).
- // Skip entirely when no edges are set — the 4-write zero is cheaper than
- // the ~20 reads + ~15 compares resolveEdges4Into does to produce zeros.
- const pad = layout.padding
- const bor = layout.border
- const mar = layout.margin
- if (node._hasPadding) resolveEdges4Into(style.padding, ownerWidth, pad)
- else pad[0] = pad[1] = pad[2] = pad[3] = 0
- if (node._hasBorder) resolveEdges4Into(style.border, ownerWidth, bor)
- else bor[0] = bor[1] = bor[2] = bor[3] = 0
- if (node._hasMargin) resolveEdges4Into(style.margin, ownerWidth, mar)
- else mar[0] = mar[1] = mar[2] = mar[3] = 0
-
- const paddingBorderWidth = pad[0] + pad[2] + bor[0] + bor[2]
- const paddingBorderHeight = pad[1] + pad[3] + bor[1] + bor[3]
-
- // Resolve style dimensions
- const styleWidth = forceWidth ? NaN : resolveValue(style.width, ownerWidth)
- const styleHeight = forceHeight
- ? NaN
- : resolveValue(style.height, ownerHeight)
-
- // If style dimension is defined, it overrides the available size
- let width = availableWidth
- let height = availableHeight
- let wMode = widthMode
- let hMode = heightMode
- if (isDefined(styleWidth)) {
- width = styleWidth
- wMode = MeasureMode.Exactly
- }
- if (isDefined(styleHeight)) {
- height = styleHeight
- hMode = MeasureMode.Exactly
- }
-
- // Apply min/max constraints to the node's own dimensions
- width = boundAxis(style, true, width, ownerWidth, ownerHeight)
- height = boundAxis(style, false, height, ownerWidth, ownerHeight)
-
- // Measure-func leaf node
- if (node.measureFunc && node.children.length === 0) {
- const innerW =
- wMode === MeasureMode.Undefined
- ? NaN
- : Math.max(0, width - paddingBorderWidth)
- const innerH =
- hMode === MeasureMode.Undefined
- ? NaN
- : Math.max(0, height - paddingBorderHeight)
- _yogaMeasureCalls++
- const measured = node.measureFunc(innerW, wMode, innerH, hMode)
- node.layout.width =
- wMode === MeasureMode.Exactly
- ? width
- : boundAxis(
- style,
- true,
- (measured.width ?? 0) + paddingBorderWidth,
- ownerWidth,
- ownerHeight,
- )
- node.layout.height =
- hMode === MeasureMode.Exactly
- ? height
- : boundAxis(
- style,
- false,
- (measured.height ?? 0) + paddingBorderHeight,
- ownerWidth,
- ownerHeight,
- )
- commitCacheOutputs(node, performLayout)
- // Write cache even for dirty nodes — fresh-mounted items during virtual
- // scroll are dirty on first layout, but the dirty chain's measure→layout
- // cascade invokes them ≥2^depth times per calculateLayout. Writing here
- // lets the 2nd+ calls hit cache (isDirty_ was cleared in the layout pass
- // above). Measured: 105k visits → 10k for a 1593-node fresh-mount tree.
- cacheWrite(
- node,
- availableWidth,
- availableHeight,
- widthMode,
- heightMode,
- ownerWidth,
- ownerHeight,
- forceWidth,
- forceHeight,
- wasDirty,
- )
- return
- }
-
- // Leaf node with no children and no measure func
- if (node.children.length === 0) {
- node.layout.width =
- wMode === MeasureMode.Exactly
- ? width
- : boundAxis(style, true, paddingBorderWidth, ownerWidth, ownerHeight)
- node.layout.height =
- hMode === MeasureMode.Exactly
- ? height
- : boundAxis(style, false, paddingBorderHeight, ownerWidth, ownerHeight)
- commitCacheOutputs(node, performLayout)
- // Write cache even for dirty nodes — fresh-mounted items during virtual
- // scroll are dirty on first layout, but the dirty chain's measure→layout
- // cascade invokes them ≥2^depth times per calculateLayout. Writing here
- // lets the 2nd+ calls hit cache (isDirty_ was cleared in the layout pass
- // above). Measured: 105k visits → 10k for a 1593-node fresh-mount tree.
- cacheWrite(
- node,
- availableWidth,
- availableHeight,
- widthMode,
- heightMode,
- ownerWidth,
- ownerHeight,
- forceWidth,
- forceHeight,
- wasDirty,
- )
- return
- }
-
- // Container with children — run flexbox algorithm
- const mainAxis = style.flexDirection
- const crossAx = crossAxis(mainAxis)
- const isMainRow = isRow(mainAxis)
-
- const mainSize = isMainRow ? width : height
- const crossSize = isMainRow ? height : width
- const mainMode = isMainRow ? wMode : hMode
- const crossMode = isMainRow ? hMode : wMode
- const mainPadBorder = isMainRow ? paddingBorderWidth : paddingBorderHeight
- const crossPadBorder = isMainRow ? paddingBorderHeight : paddingBorderWidth
-
- const innerMainSize = isDefined(mainSize)
- ? Math.max(0, mainSize - mainPadBorder)
- : NaN
- const innerCrossSize = isDefined(crossSize)
- ? Math.max(0, crossSize - crossPadBorder)
- : NaN
-
- // Resolve gap
- const gapMain = resolveGap(
- style,
- isMainRow ? Gutter.Column : Gutter.Row,
- innerMainSize,
- )
-
- // Partition children into flow vs absolute. display:contents nodes are
- // transparent — their children are lifted into the grandparent's child list
- // (recursively), and the contents node itself gets zero layout.
- const flowChildren: Node[] = []
- const absChildren: Node[] = []
- collectLayoutChildren(node, flowChildren, absChildren)
-
- // ownerW/H are the reference sizes for resolving children's percentage
- // values. Per CSS, a % width resolves against the parent's content-box
- // width. If this node's width is indefinite, children's % widths are also
- // indefinite — do NOT fall through to the grandparent's size.
- const ownerW = isDefined(width) ? width : NaN
- const ownerH = isDefined(height) ? height : NaN
- const isWrap = style.flexWrap !== Wrap.NoWrap
- const gapCross = resolveGap(
- style,
- isMainRow ? Gutter.Row : Gutter.Column,
- innerCrossSize,
- )
-
- // STEP 1: Compute flex-basis for each flow child and break into lines.
- // Single-line (NoWrap) containers always get one line; multi-line containers
- // break when accumulated basis+margin+gap exceeds innerMainSize.
- for (const c of flowChildren) {
- c._flexBasis = computeFlexBasis(
- c,
- mainAxis,
- innerMainSize,
- innerCrossSize,
- crossMode,
- ownerW,
- ownerH,
- )
- }
- const lines: Node[][] = []
- if (!isWrap || !isDefined(innerMainSize) || flowChildren.length === 0) {
- for (const c of flowChildren) c._lineIndex = 0
- lines.push(flowChildren)
- } else {
- // Line-break decisions use the min/max-clamped basis (flexbox spec §9.3.5:
- // "hypothetical main size"), not the raw flex-basis.
- let lineStart = 0
- let lineLen = 0
- for (let i = 0; i < flowChildren.length; i++) {
- const c = flowChildren[i]!
- const hypo = boundAxis(c.style, isMainRow, c._flexBasis, ownerW, ownerH)
- const outer = Math.max(0, hypo) + childMarginForAxis(c, mainAxis, ownerW)
- const withGap = i > lineStart ? gapMain : 0
- if (i > lineStart && lineLen + withGap + outer > innerMainSize) {
- lines.push(flowChildren.slice(lineStart, i))
- lineStart = i
- lineLen = outer
- } else {
- lineLen += withGap + outer
- }
- c._lineIndex = lines.length
- }
- lines.push(flowChildren.slice(lineStart))
- }
- const lineCount = lines.length
- const isBaseline = isBaselineLayout(node, flowChildren)
-
- // STEP 2+3: For each line, resolve flexible lengths and lay out children to
- // measure cross sizes. Track per-line consumed main and max cross.
- const lineConsumedMain: number[] = new Array(lineCount)
- const lineCrossSizes: number[] = new Array(lineCount)
- // Baseline layout tracks max ascent (baseline + leading margin) per line so
- // baseline-aligned items can be positioned at maxAscent - childBaseline.
- const lineMaxAscent: number[] = isBaseline ? new Array(lineCount).fill(0) : []
- let maxLineMain = 0
- let totalLinesCross = 0
- for (let li = 0; li < lineCount; li++) {
- const line = lines[li]!
- const lineGap = line.length > 1 ? gapMain * (line.length - 1) : 0
- let lineBasis = lineGap
- for (const c of line) {
- lineBasis += c._flexBasis + childMarginForAxis(c, mainAxis, ownerW)
- }
- // Resolve flexible lengths against available inner main. For indefinite
- // containers with min/max, flex against the clamped size.
- let availMain = innerMainSize
- if (!isDefined(availMain)) {
- const mainOwner = isMainRow ? ownerWidth : ownerHeight
- const minM = resolveValue(
- isMainRow ? style.minWidth : style.minHeight,
- mainOwner,
- )
- const maxM = resolveValue(
- isMainRow ? style.maxWidth : style.maxHeight,
- mainOwner,
- )
- if (isDefined(maxM) && lineBasis > maxM - mainPadBorder) {
- availMain = Math.max(0, maxM - mainPadBorder)
- } else if (isDefined(minM) && lineBasis < minM - mainPadBorder) {
- availMain = Math.max(0, minM - mainPadBorder)
- }
- }
- resolveFlexibleLengths(
- line,
- availMain,
- lineBasis,
- isMainRow,
- ownerW,
- ownerH,
- )
-
- // Lay out each child in this line to measure cross
- let lineCross = 0
- for (const c of line) {
- const cStyle = c.style
- const childAlign =
- cStyle.alignSelf === Align.Auto ? style.alignItems : cStyle.alignSelf
- const cMarginCross = childMarginForAxis(c, crossAx, ownerW)
- let childCrossSize = NaN
- let childCrossMode: MeasureMode = MeasureMode.Undefined
- const resolvedCrossStyle = resolveValue(
- isMainRow ? cStyle.height : cStyle.width,
- isMainRow ? ownerH : ownerW,
- )
- const crossLeadE = isMainRow ? EDGE_TOP : EDGE_LEFT
- const crossTrailE = isMainRow ? EDGE_BOTTOM : EDGE_RIGHT
- const hasCrossAutoMargin =
- c._hasAutoMargin &&
- (isMarginAuto(cStyle.margin, crossLeadE) ||
- isMarginAuto(cStyle.margin, crossTrailE))
- // Single-line stretch goes directly to the container cross size.
- // Multi-line wrap measures intrinsic cross (Undefined mode) so
- // flex-grow grandchildren don't expand to the container — the line
- // cross size is determined first, then items are re-stretched.
- if (isDefined(resolvedCrossStyle)) {
- childCrossSize = resolvedCrossStyle
- childCrossMode = MeasureMode.Exactly
- } else if (
- childAlign === Align.Stretch &&
- !hasCrossAutoMargin &&
- !isWrap &&
- isDefined(innerCrossSize) &&
- crossMode === MeasureMode.Exactly
- ) {
- childCrossSize = Math.max(0, innerCrossSize - cMarginCross)
- childCrossMode = MeasureMode.Exactly
- } else if (!isWrap && isDefined(innerCrossSize)) {
- childCrossSize = Math.max(0, innerCrossSize - cMarginCross)
- childCrossMode = MeasureMode.AtMost
- }
- const cw = isMainRow ? c._mainSize : childCrossSize
- const ch = isMainRow ? childCrossSize : c._mainSize
- layoutNode(
- c,
- cw,
- ch,
- isMainRow ? MeasureMode.Exactly : childCrossMode,
- isMainRow ? childCrossMode : MeasureMode.Exactly,
- ownerW,
- ownerH,
- performLayout,
- isMainRow,
- !isMainRow,
- )
- c._crossSize = isMainRow ? c.layout.height : c.layout.width
- lineCross = Math.max(lineCross, c._crossSize + cMarginCross)
- }
- // Baseline layout: line cross size must fit maxAscent + maxDescent of
- // baseline-aligned children (yoga STEP 8). Only applies to row direction.
- if (isBaseline) {
- let maxAscent = 0
- let maxDescent = 0
- for (const c of line) {
- if (resolveChildAlign(node, c) !== Align.Baseline) continue
- const mTop = resolveEdge(c.style.margin, EDGE_TOP, ownerW)
- const mBot = resolveEdge(c.style.margin, EDGE_BOTTOM, ownerW)
- const ascent = calculateBaseline(c) + mTop
- const descent = c.layout.height + mTop + mBot - ascent
- if (ascent > maxAscent) maxAscent = ascent
- if (descent > maxDescent) maxDescent = descent
- }
- lineMaxAscent[li] = maxAscent
- if (maxAscent + maxDescent > lineCross) {
- lineCross = maxAscent + maxDescent
- }
- }
- // layoutNode(c) at line ~1117 above already resolved c.layout.margin[] via
- // resolveEdges4Into with the same ownerW — read directly instead of
- // re-resolving through childMarginForAxis → 2× resolveEdge.
- const mainLead = leadingEdge(mainAxis)
- const mainTrail = trailingEdge(mainAxis)
- let consumed = lineGap
- for (const c of line) {
- const cm = c.layout.margin
- consumed += c._mainSize + cm[mainLead]! + cm[mainTrail]!
- }
- lineConsumedMain[li] = consumed
- lineCrossSizes[li] = lineCross
- maxLineMain = Math.max(maxLineMain, consumed)
- totalLinesCross += lineCross
- }
- const totalCrossGap = lineCount > 1 ? gapCross * (lineCount - 1) : 0
- totalLinesCross += totalCrossGap
-
- // STEP 4: Determine container dimensions. Per yoga's STEP 9, for both
- // AtMost (FitContent) and Undefined (MaxContent) the node sizes to its
- // content — AtMost is NOT a hard clamp, items may overflow the available
- // space (CSS "fit-content" behavior). Only Scroll overflow clamps to the
- // available size. Wrap containers that broke into multiple lines under
- // AtMost fill the available main size since they wrapped at that boundary.
- const isScroll = style.overflow === Overflow.Scroll
- const contentMain = maxLineMain + mainPadBorder
- const finalMainSize =
- mainMode === MeasureMode.Exactly
- ? mainSize
- : mainMode === MeasureMode.AtMost && isScroll
- ? Math.max(Math.min(mainSize, contentMain), mainPadBorder)
- : isWrap && lineCount > 1 && mainMode === MeasureMode.AtMost
- ? mainSize
- : contentMain
- const contentCross = totalLinesCross + crossPadBorder
- const finalCrossSize =
- crossMode === MeasureMode.Exactly
- ? crossSize
- : crossMode === MeasureMode.AtMost && isScroll
- ? Math.max(Math.min(crossSize, contentCross), crossPadBorder)
- : contentCross
- node.layout.width = boundAxis(
- style,
- true,
- isMainRow ? finalMainSize : finalCrossSize,
- ownerWidth,
- ownerHeight,
- )
- node.layout.height = boundAxis(
- style,
- false,
- isMainRow ? finalCrossSize : finalMainSize,
- ownerWidth,
- ownerHeight,
- )
- commitCacheOutputs(node, performLayout)
- // Write cache even for dirty nodes — fresh-mounted items during virtual scroll
- cacheWrite(
- node,
- availableWidth,
- availableHeight,
- widthMode,
- heightMode,
- ownerWidth,
- ownerHeight,
- forceWidth,
- forceHeight,
- wasDirty,
- )
-
- if (!performLayout) return
-
- // STEP 5: Position lines (align-content) and children (justify-content +
- // align-items + auto margins).
- const actualInnerMain =
- (isMainRow ? node.layout.width : node.layout.height) - mainPadBorder
- const actualInnerCross =
- (isMainRow ? node.layout.height : node.layout.width) - crossPadBorder
- const mainLeadEdgePhys = leadingEdge(mainAxis)
- const mainTrailEdgePhys = trailingEdge(mainAxis)
- const crossLeadEdgePhys = isMainRow ? EDGE_TOP : EDGE_LEFT
- const crossTrailEdgePhys = isMainRow ? EDGE_BOTTOM : EDGE_RIGHT
- const reversed = isReverse(mainAxis)
- const mainContainerSize = isMainRow ? node.layout.width : node.layout.height
- const crossLead = pad[crossLeadEdgePhys]! + bor[crossLeadEdgePhys]!
-
- // Align-content: distribute free cross space among lines. Single-line
- // containers use the full cross size for the one line (align-items handles
- // positioning within it).
- let lineCrossOffset = crossLead
- let betweenLines = gapCross
- const freeCross = actualInnerCross - totalLinesCross
- if (lineCount === 1 && !isWrap && !isBaseline) {
- lineCrossSizes[0] = actualInnerCross
- } else {
- const remCross = Math.max(0, freeCross)
- switch (style.alignContent) {
- case Align.FlexStart:
- break
- case Align.Center:
- lineCrossOffset += freeCross / 2
- break
- case Align.FlexEnd:
- lineCrossOffset += freeCross
- break
- case Align.Stretch:
- if (lineCount > 0 && remCross > 0) {
- const add = remCross / lineCount
- for (let i = 0; i < lineCount; i++) lineCrossSizes[i]! += add
- }
- break
- case Align.SpaceBetween:
- if (lineCount > 1) betweenLines += remCross / (lineCount - 1)
- break
- case Align.SpaceAround:
- if (lineCount > 0) {
- betweenLines += remCross / lineCount
- lineCrossOffset += remCross / lineCount / 2
- }
- break
- case Align.SpaceEvenly:
- if (lineCount > 0) {
- betweenLines += remCross / (lineCount + 1)
- lineCrossOffset += remCross / (lineCount + 1)
- }
- break
- default:
- break
- }
- }
-
- // For wrap-reverse, lines stack from the trailing cross edge. Walk lines in
- // order but flip the cross position within the container.
- const wrapReverse = style.flexWrap === Wrap.WrapReverse
- const crossContainerSize = isMainRow ? node.layout.height : node.layout.width
- let lineCrossPos = lineCrossOffset
- for (let li = 0; li < lineCount; li++) {
- const line = lines[li]!
- const lineCross = lineCrossSizes[li]!
- const consumedMain = lineConsumedMain[li]!
- const n = line.length
-
- // Re-stretch children whose cross is auto and align is stretch, now that
- // the line cross size is known. Needed for multi-line wrap (line cross
- // wasn't known during initial measure) AND single-line when the container
- // cross was not Exactly (initial stretch at ~line 1250 was skipped because
- // innerCrossSize wasn't defined — the container sized to max child cross).
- if (isWrap || crossMode !== MeasureMode.Exactly) {
- for (const c of line) {
- const cStyle = c.style
- const childAlign =
- cStyle.alignSelf === Align.Auto ? style.alignItems : cStyle.alignSelf
- const crossStyleDef = isDefined(
- resolveValue(
- isMainRow ? cStyle.height : cStyle.width,
- isMainRow ? ownerH : ownerW,
- ),
- )
- const hasCrossAutoMargin =
- c._hasAutoMargin &&
- (isMarginAuto(cStyle.margin, crossLeadEdgePhys) ||
- isMarginAuto(cStyle.margin, crossTrailEdgePhys))
- if (
- childAlign === Align.Stretch &&
- !crossStyleDef &&
- !hasCrossAutoMargin
- ) {
- const cMarginCross = childMarginForAxis(c, crossAx, ownerW)
- const target = Math.max(0, lineCross - cMarginCross)
- if (c._crossSize !== target) {
- const cw = isMainRow ? c._mainSize : target
- const ch = isMainRow ? target : c._mainSize
- layoutNode(
- c,
- cw,
- ch,
- MeasureMode.Exactly,
- MeasureMode.Exactly,
- ownerW,
- ownerH,
- performLayout,
- isMainRow,
- !isMainRow,
- )
- c._crossSize = target
- }
- }
- }
- }
-
- // Justify-content + auto margins for this line
- let mainOffset = pad[mainLeadEdgePhys]! + bor[mainLeadEdgePhys]!
- let betweenMain = gapMain
- let numAutoMarginsMain = 0
- for (const c of line) {
- if (!c._hasAutoMargin) continue
- if (isMarginAuto(c.style.margin, mainLeadEdgePhys)) numAutoMarginsMain++
- if (isMarginAuto(c.style.margin, mainTrailEdgePhys)) numAutoMarginsMain++
- }
- const freeMain = actualInnerMain - consumedMain
- const remainingMain = Math.max(0, freeMain)
- const autoMarginMainSize =
- numAutoMarginsMain > 0 && remainingMain > 0
- ? remainingMain / numAutoMarginsMain
- : 0
- if (numAutoMarginsMain === 0) {
- switch (style.justifyContent) {
- case Justify.FlexStart:
- break
- case Justify.Center:
- mainOffset += freeMain / 2
- break
- case Justify.FlexEnd:
- mainOffset += freeMain
- break
- case Justify.SpaceBetween:
- if (n > 1) betweenMain += remainingMain / (n - 1)
- break
- case Justify.SpaceAround:
- if (n > 0) {
- betweenMain += remainingMain / n
- mainOffset += remainingMain / n / 2
- }
- break
- case Justify.SpaceEvenly:
- if (n > 0) {
- betweenMain += remainingMain / (n + 1)
- mainOffset += remainingMain / (n + 1)
- }
- break
- }
- }
-
- const effectiveLineCrossPos = wrapReverse
- ? crossContainerSize - lineCrossPos - lineCross
- : lineCrossPos
-
- let pos = mainOffset
- for (const c of line) {
- const cMargin = c.style.margin
- // c.layout.margin[] was populated by resolveEdges4Into inside the
- // layoutNode(c) call above (same ownerW). Read resolved values directly
- // instead of re-running the edge fallback chain 4× via resolveEdge.
- // Auto margins resolve to 0 in layout.margin, so autoMarginMainSize
- // substitution still uses the isMarginAuto check against style.
- const cLayoutMargin = c.layout.margin
- let autoMainLead = false
- let autoMainTrail = false
- let autoCrossLead = false
- let autoCrossTrail = false
- let mMainLead: number
- let mMainTrail: number
- let mCrossLead: number
- let mCrossTrail: number
- if (c._hasAutoMargin) {
- autoMainLead = isMarginAuto(cMargin, mainLeadEdgePhys)
- autoMainTrail = isMarginAuto(cMargin, mainTrailEdgePhys)
- autoCrossLead = isMarginAuto(cMargin, crossLeadEdgePhys)
- autoCrossTrail = isMarginAuto(cMargin, crossTrailEdgePhys)
- mMainLead = autoMainLead
- ? autoMarginMainSize
- : cLayoutMargin[mainLeadEdgePhys]!
- mMainTrail = autoMainTrail
- ? autoMarginMainSize
- : cLayoutMargin[mainTrailEdgePhys]!
- mCrossLead = autoCrossLead ? 0 : cLayoutMargin[crossLeadEdgePhys]!
- mCrossTrail = autoCrossTrail ? 0 : cLayoutMargin[crossTrailEdgePhys]!
- } else {
- // Fast path: no auto margins — read resolved values directly.
- mMainLead = cLayoutMargin[mainLeadEdgePhys]!
- mMainTrail = cLayoutMargin[mainTrailEdgePhys]!
- mCrossLead = cLayoutMargin[crossLeadEdgePhys]!
- mCrossTrail = cLayoutMargin[crossTrailEdgePhys]!
- }
-
- const mainPos = reversed
- ? mainContainerSize - (pos + mMainLead) - c._mainSize
- : pos + mMainLead
-
- const childAlign =
- c.style.alignSelf === Align.Auto ? style.alignItems : c.style.alignSelf
- let crossPos = effectiveLineCrossPos + mCrossLead
- const crossFree = lineCross - c._crossSize - mCrossLead - mCrossTrail
- if (autoCrossLead && autoCrossTrail) {
- crossPos += Math.max(0, crossFree) / 2
- } else if (autoCrossLead) {
- crossPos += Math.max(0, crossFree)
- } else if (autoCrossTrail) {
- // stays at leading
- } else {
- switch (childAlign) {
- case Align.FlexStart:
- case Align.Stretch:
- if (wrapReverse) crossPos += crossFree
- break
- case Align.Center:
- crossPos += crossFree / 2
- break
- case Align.FlexEnd:
- if (!wrapReverse) crossPos += crossFree
- break
- case Align.Baseline:
- // Row direction only (isBaselineLayout checked this). Position so
- // the child's baseline aligns with the line's max ascent. Per
- // yoga: top = currentLead + maxAscent - childBaseline + leadingPosition.
- if (isBaseline) {
- crossPos =
- effectiveLineCrossPos +
- lineMaxAscent[li]! -
- calculateBaseline(c)
- }
- break
- default:
- break
- }
- }
-
- // Relative position offsets. Fast path: no position insets set →
- // skip 4× resolveEdgeRaw + 4× resolveValue + 4× isDefined.
- let relX = 0
- let relY = 0
- if (c._hasPosition) {
- const relLeft = resolveValue(
- resolveEdgeRaw(c.style.position, EDGE_LEFT),
- ownerW,
- )
- const relRight = resolveValue(
- resolveEdgeRaw(c.style.position, EDGE_RIGHT),
- ownerW,
- )
- const relTop = resolveValue(
- resolveEdgeRaw(c.style.position, EDGE_TOP),
- ownerW,
- )
- const relBottom = resolveValue(
- resolveEdgeRaw(c.style.position, EDGE_BOTTOM),
- ownerW,
- )
- relX = isDefined(relLeft)
- ? relLeft
- : isDefined(relRight)
- ? -relRight
- : 0
- relY = isDefined(relTop)
- ? relTop
- : isDefined(relBottom)
- ? -relBottom
- : 0
- }
-
- if (isMainRow) {
- c.layout.left = mainPos + relX
- c.layout.top = crossPos + relY
- } else {
- c.layout.left = crossPos + relX
- c.layout.top = mainPos + relY
- }
- pos += c._mainSize + mMainLead + mMainTrail + betweenMain
- }
- lineCrossPos += lineCross + betweenLines
- }
-
- // STEP 6: Absolute-positioned children
- for (const c of absChildren) {
- layoutAbsoluteChild(
- node,
- c,
- node.layout.width,
- node.layout.height,
- pad,
- bor,
- )
- }
-}
-
-function layoutAbsoluteChild(
- parent: Node,
- child: Node,
- parentWidth: number,
- parentHeight: number,
- pad: [number, number, number, number],
- bor: [number, number, number, number],
-): void {
- const cs = child.style
- const posLeft = resolveEdgeRaw(cs.position, EDGE_LEFT)
- const posRight = resolveEdgeRaw(cs.position, EDGE_RIGHT)
- const posTop = resolveEdgeRaw(cs.position, EDGE_TOP)
- const posBottom = resolveEdgeRaw(cs.position, EDGE_BOTTOM)
-
- const rLeft = resolveValue(posLeft, parentWidth)
- const rRight = resolveValue(posRight, parentWidth)
- const rTop = resolveValue(posTop, parentHeight)
- const rBottom = resolveValue(posBottom, parentHeight)
-
- // Absolute children's percentage dimensions resolve against the containing
- // block's padding-box (parent size minus border), per CSS §10.1.
- const paddingBoxW = parentWidth - bor[0] - bor[2]
- const paddingBoxH = parentHeight - bor[1] - bor[3]
- let cw = resolveValue(cs.width, paddingBoxW)
- let ch = resolveValue(cs.height, paddingBoxH)
-
- // If both left+right defined and width not, derive width
- if (!isDefined(cw) && isDefined(rLeft) && isDefined(rRight)) {
- cw = paddingBoxW - rLeft - rRight
- }
- if (!isDefined(ch) && isDefined(rTop) && isDefined(rBottom)) {
- ch = paddingBoxH - rTop - rBottom
- }
-
- layoutNode(
- child,
- cw,
- ch,
- isDefined(cw) ? MeasureMode.Exactly : MeasureMode.Undefined,
- isDefined(ch) ? MeasureMode.Exactly : MeasureMode.Undefined,
- paddingBoxW,
- paddingBoxH,
- true,
- )
-
- // Margin of absolute child (applied in addition to insets)
- const mL = resolveEdge(cs.margin, EDGE_LEFT, parentWidth)
- const mT = resolveEdge(cs.margin, EDGE_TOP, parentWidth)
- const mR = resolveEdge(cs.margin, EDGE_RIGHT, parentWidth)
- const mB = resolveEdge(cs.margin, EDGE_BOTTOM, parentWidth)
-
- const mainAxis = parent.style.flexDirection
- const reversed = isReverse(mainAxis)
- const mainRow = isRow(mainAxis)
- const wrapReverse = parent.style.flexWrap === Wrap.WrapReverse
- // alignSelf overrides alignItems for absolute children (same as flow items)
- const alignment =
- cs.alignSelf === Align.Auto ? parent.style.alignItems : cs.alignSelf
-
- // Position
- let left: number
- if (isDefined(rLeft)) {
- left = bor[0] + rLeft + mL
- } else if (isDefined(rRight)) {
- left = parentWidth - bor[2] - rRight - child.layout.width - mR
- } else if (mainRow) {
- // Main axis — justify-content, flipped for reversed
- const lead = pad[0] + bor[0]
- const trail = parentWidth - pad[2] - bor[2]
- left = reversed
- ? trail - child.layout.width - mR
- : justifyAbsolute(
- parent.style.justifyContent,
- lead,
- trail,
- child.layout.width,
- ) + mL
- } else {
- left =
- alignAbsolute(
- alignment,
- pad[0] + bor[0],
- parentWidth - pad[2] - bor[2],
- child.layout.width,
- wrapReverse,
- ) + mL
- }
-
- let top: number
- if (isDefined(rTop)) {
- top = bor[1] + rTop + mT
- } else if (isDefined(rBottom)) {
- top = parentHeight - bor[3] - rBottom - child.layout.height - mB
- } else if (mainRow) {
- top =
- alignAbsolute(
- alignment,
- pad[1] + bor[1],
- parentHeight - pad[3] - bor[3],
- child.layout.height,
- wrapReverse,
- ) + mT
- } else {
- const lead = pad[1] + bor[1]
- const trail = parentHeight - pad[3] - bor[3]
- top = reversed
- ? trail - child.layout.height - mB
- : justifyAbsolute(
- parent.style.justifyContent,
- lead,
- trail,
- child.layout.height,
- ) + mT
- }
-
- child.layout.left = left
- child.layout.top = top
-}
-
-function justifyAbsolute(
- justify: Justify,
- leadEdge: number,
- trailEdge: number,
- childSize: number,
-): number {
- switch (justify) {
- case Justify.Center:
- return leadEdge + (trailEdge - leadEdge - childSize) / 2
- case Justify.FlexEnd:
- return trailEdge - childSize
- default:
- return leadEdge
- }
-}
-
-function alignAbsolute(
- align: Align,
- leadEdge: number,
- trailEdge: number,
- childSize: number,
- wrapReverse: boolean,
-): number {
- // Wrap-reverse flips the cross axis: flex-start/stretch go to trailing,
- // flex-end goes to leading (yoga's absoluteLayoutChild flips the align value
- // when the containing block has wrap-reverse).
- switch (align) {
- case Align.Center:
- return leadEdge + (trailEdge - leadEdge - childSize) / 2
- case Align.FlexEnd:
- return wrapReverse ? leadEdge : trailEdge - childSize
- default:
- return wrapReverse ? trailEdge - childSize : leadEdge
- }
-}
-
-function computeFlexBasis(
- child: Node,
- mainAxis: FlexDirection,
- availableMain: number,
- availableCross: number,
- crossMode: MeasureMode,
- ownerWidth: number,
- ownerHeight: number,
-): number {
- // Same-generation cache hit: basis was computed THIS calculateLayout, so
- // it's fresh regardless of isDirty_. Covers both clean children (scrolling
- // past unchanged messages) AND fresh-mounted dirty children (virtual
- // scroll mounts new items — the dirty chain's measure→layout cascade
- // invokes this ≥2^depth times, but the child's subtree doesn't change
- // between calls within one calculateLayout). For clean children with
- // cache from a PREVIOUS generation, also hit if inputs match — isDirty_
- // gates since a dirty child's previous-gen cache is stale.
- const sameGen = child._fbGen === _generation
- if (
- (sameGen || !child.isDirty_) &&
- child._fbCrossMode === crossMode &&
- sameFloat(child._fbOwnerW, ownerWidth) &&
- sameFloat(child._fbOwnerH, ownerHeight) &&
- sameFloat(child._fbAvailMain, availableMain) &&
- sameFloat(child._fbAvailCross, availableCross)
- ) {
- return child._fbBasis
- }
- const cs = child.style
- const isMainRow = isRow(mainAxis)
-
- // Explicit flex-basis
- const basis = resolveValue(cs.flexBasis, availableMain)
- if (isDefined(basis)) {
- const b = Math.max(0, basis)
- child._fbBasis = b
- child._fbOwnerW = ownerWidth
- child._fbOwnerH = ownerHeight
- child._fbAvailMain = availableMain
- child._fbAvailCross = availableCross
- child._fbCrossMode = crossMode
- child._fbGen = _generation
- return b
- }
-
- // Style dimension on main axis
- const mainStyleDim = isMainRow ? cs.width : cs.height
- const mainOwner = isMainRow ? ownerWidth : ownerHeight
- const resolved = resolveValue(mainStyleDim, mainOwner)
- if (isDefined(resolved)) {
- const b = Math.max(0, resolved)
- child._fbBasis = b
- child._fbOwnerW = ownerWidth
- child._fbOwnerH = ownerHeight
- child._fbAvailMain = availableMain
- child._fbAvailCross = availableCross
- child._fbCrossMode = crossMode
- child._fbGen = _generation
- return b
- }
-
- // Need to measure the child to get its natural size
- const crossStyleDim = isMainRow ? cs.height : cs.width
- const crossOwner = isMainRow ? ownerHeight : ownerWidth
- let crossConstraint = resolveValue(crossStyleDim, crossOwner)
- let crossConstraintMode: MeasureMode = isDefined(crossConstraint)
- ? MeasureMode.Exactly
- : MeasureMode.Undefined
- if (!isDefined(crossConstraint) && isDefined(availableCross)) {
- crossConstraint = availableCross
- crossConstraintMode =
- crossMode === MeasureMode.Exactly && isStretchAlign(child)
- ? MeasureMode.Exactly
- : MeasureMode.AtMost
- }
-
- // Upstream yoga (YGNodeComputeFlexBasisForChild) passes the available inner
- // width with mode AtMost when the subtree will call a measure-func — so text
- // nodes don't report unconstrained intrinsic width as flex-basis, which
- // would force siblings to shrink and the text to wrap at the wrong width.
- // Passing Undefined here made Ink's inside get
- // width = intrinsic instead of available, dropping chars at wrap boundaries.
- //
- // Two constraints on when this applies:
- // - Width only. Height is never constrained during basis measurement —
- // column containers must measure children at natural height so
- // scrollable content can overflow (constraining height clips ScrollBox).
- // - Subtree has a measure-func. Pure layout subtrees (no measure-func)
- // with flex-grow children would grow into the AtMost constraint,
- // inflating the basis (breaks YGMinMaxDimensionTest flex_grow_in_at_most
- // where a flexGrow:1 child should stay at basis 0, not grow to 100).
- let mainConstraint = NaN
- let mainConstraintMode: MeasureMode = MeasureMode.Undefined
- if (isMainRow && isDefined(availableMain) && hasMeasureFuncInSubtree(child)) {
- mainConstraint = availableMain
- mainConstraintMode = MeasureMode.AtMost
- }
-
- const mw = isMainRow ? mainConstraint : crossConstraint
- const mh = isMainRow ? crossConstraint : mainConstraint
- const mwMode = isMainRow ? mainConstraintMode : crossConstraintMode
- const mhMode = isMainRow ? crossConstraintMode : mainConstraintMode
-
- layoutNode(child, mw, mh, mwMode, mhMode, ownerWidth, ownerHeight, false)
- const b = isMainRow ? child.layout.width : child.layout.height
- child._fbBasis = b
- child._fbOwnerW = ownerWidth
- child._fbOwnerH = ownerHeight
- child._fbAvailMain = availableMain
- child._fbAvailCross = availableCross
- child._fbCrossMode = crossMode
- child._fbGen = _generation
- return b
-}
-
-function hasMeasureFuncInSubtree(node: Node): boolean {
- if (node.measureFunc) return true
- for (const c of node.children) {
- if (hasMeasureFuncInSubtree(c)) return true
- }
- return false
-}
-
-function resolveFlexibleLengths(
- children: Node[],
- availableInnerMain: number,
- totalFlexBasis: number,
- isMainRow: boolean,
- ownerW: number,
- ownerH: number,
-): void {
- // Multi-pass flex distribution per CSS flexbox spec §9.7 "Resolving Flexible
- // Lengths": distribute free space, detect min/max violations, freeze all
- // violators, redistribute among unfrozen children. Repeat until stable.
- const n = children.length
- const frozen: boolean[] = new Array(n).fill(false)
- const initialFree = isDefined(availableInnerMain)
- ? availableInnerMain - totalFlexBasis
- : 0
- // Freeze inflexible items at their clamped basis
- for (let i = 0; i < n; i++) {
- const c = children[i]!
- const clamped = boundAxis(c.style, isMainRow, c._flexBasis, ownerW, ownerH)
- const inflexible =
- !isDefined(availableInnerMain) ||
- (initialFree >= 0 ? c.style.flexGrow === 0 : c.style.flexShrink === 0)
- if (inflexible) {
- c._mainSize = Math.max(0, clamped)
- frozen[i] = true
- } else {
- c._mainSize = c._flexBasis
- }
- }
- // Iteratively distribute until no violations. Free space is recomputed each
- // pass: initial free space minus the delta frozen children consumed beyond
- // (or below) their basis.
- const unclamped: number[] = new Array(n)
- for (let iter = 0; iter <= n; iter++) {
- let frozenDelta = 0
- let totalGrow = 0
- let totalShrinkScaled = 0
- let unfrozenCount = 0
- for (let i = 0; i < n; i++) {
- const c = children[i]!
- if (frozen[i]) {
- frozenDelta += c._mainSize - c._flexBasis
- } else {
- totalGrow += c.style.flexGrow
- totalShrinkScaled += c.style.flexShrink * c._flexBasis
- unfrozenCount++
- }
- }
- if (unfrozenCount === 0) break
- let remaining = initialFree - frozenDelta
- // Spec §9.7 step 4c: if sum of flex factors < 1, only distribute
- // initialFree × sum, not the full remaining space (partial flex).
- if (remaining > 0 && totalGrow > 0 && totalGrow < 1) {
- const scaled = initialFree * totalGrow
- if (scaled < remaining) remaining = scaled
- } else if (remaining < 0 && totalShrinkScaled > 0) {
- let totalShrink = 0
- for (let i = 0; i < n; i++) {
- if (!frozen[i]) totalShrink += children[i]!.style.flexShrink
- }
- if (totalShrink < 1) {
- const scaled = initialFree * totalShrink
- if (scaled > remaining) remaining = scaled
- }
- }
- // Compute targets + violations for all unfrozen children
- let totalViolation = 0
- for (let i = 0; i < n; i++) {
- if (frozen[i]) continue
- const c = children[i]!
- let t = c._flexBasis
- if (remaining > 0 && totalGrow > 0) {
- t += (remaining * c.style.flexGrow) / totalGrow
- } else if (remaining < 0 && totalShrinkScaled > 0) {
- t +=
- (remaining * (c.style.flexShrink * c._flexBasis)) / totalShrinkScaled
- }
- unclamped[i] = t
- const clamped = Math.max(
- 0,
- boundAxis(c.style, isMainRow, t, ownerW, ownerH),
- )
- c._mainSize = clamped
- totalViolation += clamped - t
- }
- // Freeze per spec §9.7 step 5: if totalViolation is zero freeze all; if
- // positive freeze min-violators; if negative freeze max-violators.
- if (totalViolation === 0) break
- let anyFrozen = false
- for (let i = 0; i < n; i++) {
- if (frozen[i]) continue
- const v = children[i]!._mainSize - unclamped[i]!
- if ((totalViolation > 0 && v > 0) || (totalViolation < 0 && v < 0)) {
- frozen[i] = true
- anyFrozen = true
- }
- }
- if (!anyFrozen) break
- }
-}
-
-function isStretchAlign(child: Node): boolean {
- const p = child.parent
- if (!p) return false
- const align =
- child.style.alignSelf === Align.Auto
- ? p.style.alignItems
- : child.style.alignSelf
- return align === Align.Stretch
-}
-
-function resolveChildAlign(parent: Node, child: Node): Align {
- return child.style.alignSelf === Align.Auto
- ? parent.style.alignItems
- : child.style.alignSelf
-}
-
-// Baseline of a node per CSS Flexbox §8.5 / yoga's YGBaseline. Leaf nodes
-// (no children) use their own height. Containers recurse into the first
-// baseline-aligned child on the first line (or the first flow child if none
-// are baseline-aligned), returning that child's baseline + its top offset.
-function calculateBaseline(node: Node): number {
- let baselineChild: Node | null = null
- for (const c of node.children) {
- if (c._lineIndex > 0) break
- if (c.style.positionType === PositionType.Absolute) continue
- if (c.style.display === Display.None) continue
- if (
- resolveChildAlign(node, c) === Align.Baseline ||
- c.isReferenceBaseline_
- ) {
- baselineChild = c
- break
- }
- if (baselineChild === null) baselineChild = c
- }
- if (baselineChild === null) return node.layout.height
- return calculateBaseline(baselineChild) + baselineChild.layout.top
-}
-
-// A container uses baseline layout only for row direction, when either
-// align-items is baseline or any flow child has align-self: baseline.
-function isBaselineLayout(node: Node, flowChildren: Node[]): boolean {
- if (!isRow(node.style.flexDirection)) return false
- if (node.style.alignItems === Align.Baseline) return true
- for (const c of flowChildren) {
- if (c.style.alignSelf === Align.Baseline) return true
- }
- return false
-}
-
-function childMarginForAxis(
- child: Node,
- axis: FlexDirection,
- ownerWidth: number,
-): number {
- if (!child._hasMargin) return 0
- const lead = resolveEdge(child.style.margin, leadingEdge(axis), ownerWidth)
- const trail = resolveEdge(child.style.margin, trailingEdge(axis), ownerWidth)
- return lead + trail
-}
-
-function resolveGap(style: Style, gutter: Gutter, ownerSize: number): number {
- let v = style.gap[gutter]!
- if (v.unit === Unit.Undefined) v = style.gap[Gutter.All]!
- const r = resolveValue(v, ownerSize)
- return isDefined(r) ? Math.max(0, r) : 0
-}
-
-function boundAxis(
- style: Style,
- isWidth: boolean,
- value: number,
- ownerWidth: number,
- ownerHeight: number,
-): number {
- const minV = isWidth ? style.minWidth : style.minHeight
- const maxV = isWidth ? style.maxWidth : style.maxHeight
- const minU = minV.unit
- const maxU = maxV.unit
- // Fast path: no min/max constraints set. Per CPU profile this is the
- // overwhelmingly common case (~32k calls/layout on the 1000-node bench,
- // nearly all with undefined min/max) — skipping 2× resolveValue + 2× isNaN
- // that always no-op. Unit.Undefined = 0.
- if (minU === 0 && maxU === 0) return value
- const owner = isWidth ? ownerWidth : ownerHeight
- let v = value
- // Inlined resolveValue: Unit.Point=1, Unit.Percent=2. `m === m` is !isNaN.
- if (maxU === 1) {
- if (v > maxV.value) v = maxV.value
- } else if (maxU === 2) {
- const m = (maxV.value * owner) / 100
- if (m === m && v > m) v = m
- }
- if (minU === 1) {
- if (v < minV.value) v = minV.value
- } else if (minU === 2) {
- const m = (minV.value * owner) / 100
- if (m === m && v < m) v = m
- }
- return v
-}
-
-function zeroLayoutRecursive(node: Node): void {
- for (const c of node.children) {
- c.layout.left = 0
- c.layout.top = 0
- c.layout.width = 0
- c.layout.height = 0
- // Invalidate layout cache — without this, unhide → calculateLayout finds
- // the child clean (!isDirty_) with _hasL intact, hits the cache at line
- // ~1086, restores stale _lOutW/_lOutH, and returns early — skipping the
- // child-positioning recursion. Grandchildren stay at (0,0,0,0) from the
- // zeroing above and render invisible. isDirty_=true also gates _cN and
- // _fbBasis via their (sameGen || !isDirty_) checks — _cGen/_fbGen freeze
- // during hide so sameGen is false on unhide.
- c.isDirty_ = true
- c._hasL = false
- c._hasM = false
- zeroLayoutRecursive(c)
- }
-}
-
-function collectLayoutChildren(node: Node, flow: Node[], abs: Node[]): void {
- // Partition a node's children into flow and absolute lists, flattening
- // display:contents subtrees so their children are laid out as direct
- // children of this node (per CSS display:contents spec — the box is removed
- // from the layout tree but its children remain, lifted to the grandparent).
- for (const c of node.children) {
- const disp = c.style.display
- if (disp === Display.None) {
- c.layout.left = 0
- c.layout.top = 0
- c.layout.width = 0
- c.layout.height = 0
- zeroLayoutRecursive(c)
- } else if (disp === Display.Contents) {
- c.layout.left = 0
- c.layout.top = 0
- c.layout.width = 0
- c.layout.height = 0
- // Recurse — nested display:contents lifts all the way up. The contents
- // node's own margin/padding/position/dimensions are ignored.
- collectLayoutChildren(c, flow, abs)
- } else if (c.style.positionType === PositionType.Absolute) {
- abs.push(c)
- } else {
- flow.push(c)
- }
- }
-}
-
-function roundLayout(
- node: Node,
- scale: number,
- absLeft: number,
- absTop: number,
-): void {
- if (scale === 0) return
- const l = node.layout
- const nodeLeft = l.left
- const nodeTop = l.top
- const nodeWidth = l.width
- const nodeHeight = l.height
-
- const absNodeLeft = absLeft + nodeLeft
- const absNodeTop = absTop + nodeTop
-
- // Upstream YGRoundValueToPixelGrid: text nodes (has measureFunc) floor their
- // positions so wrapped text never starts past its allocated column. Width
- // uses ceil-if-fractional to avoid clipping the last glyph. Non-text nodes
- // use standard round. Matches yoga's PixelGrid.cpp — without this, justify
- // center/space-evenly positions are off-by-one vs WASM and flex-shrink
- // overflow places siblings at the wrong column.
- const isText = node.measureFunc !== null
- l.left = roundValue(nodeLeft, scale, false, isText)
- l.top = roundValue(nodeTop, scale, false, isText)
-
- // Width/height rounded via absolute edges to avoid cumulative drift
- const absRight = absNodeLeft + nodeWidth
- const absBottom = absNodeTop + nodeHeight
- const hasFracW = !isWholeNumber(nodeWidth * scale)
- const hasFracH = !isWholeNumber(nodeHeight * scale)
- l.width =
- roundValue(absRight, scale, isText && hasFracW, isText && !hasFracW) -
- roundValue(absNodeLeft, scale, false, isText)
- l.height =
- roundValue(absBottom, scale, isText && hasFracH, isText && !hasFracH) -
- roundValue(absNodeTop, scale, false, isText)
-
- for (const c of node.children) {
- roundLayout(c, scale, absNodeLeft, absNodeTop)
- }
-}
-
-function isWholeNumber(v: number): boolean {
- const frac = v - Math.floor(v)
- return frac < 0.0001 || frac > 0.9999
-}
-
-function roundValue(
- v: number,
- scale: number,
- forceCeil: boolean,
- forceFloor: boolean,
-): number {
- let scaled = v * scale
- let frac = scaled - Math.floor(scaled)
- if (frac < 0) frac += 1
- // Float-epsilon tolerance matches upstream YGDoubleEqual (1e-4)
- if (frac < 0.0001) {
- scaled = Math.floor(scaled)
- } else if (frac > 0.9999) {
- scaled = Math.ceil(scaled)
- } else if (forceCeil) {
- scaled = Math.ceil(scaled)
- } else if (forceFloor) {
- scaled = Math.floor(scaled)
- } else {
- // Round half-up (>= 0.5 goes up), per upstream
- scaled = Math.floor(scaled) + (frac >= 0.4999 ? 1 : 0)
- }
- return scaled / scale
-}
-
-// --
-// Helpers
-
-function parseDimension(v: number | string | undefined): Value {
- if (v === undefined) return UNDEFINED_VALUE
- if (v === 'auto') return AUTO_VALUE
- if (typeof v === 'number') {
- // WASM yoga's YGFloatIsUndefined treats NaN and ±Infinity as undefined.
- // Ink passes height={Infinity} (e.g. LogSelector maxHeight default) and
- // expects it to mean "unconstrained" — storing it as a literal point value
- // makes the node height Infinity and breaks all downstream layout.
- return Number.isFinite(v) ? pointValue(v) : UNDEFINED_VALUE
- }
- if (typeof v === 'string' && v.endsWith('%')) {
- return percentValue(parseFloat(v))
- }
- const n = parseFloat(v)
- return isNaN(n) ? UNDEFINED_VALUE : pointValue(n)
-}
-
-function physicalEdge(edge: Edge): number {
- switch (edge) {
- case Edge.Left:
- case Edge.Start:
- return EDGE_LEFT
- case Edge.Top:
- return EDGE_TOP
- case Edge.Right:
- case Edge.End:
- return EDGE_RIGHT
- case Edge.Bottom:
- return EDGE_BOTTOM
- default:
- return EDGE_LEFT
- }
-}
-
-// --
-// Module API matching yoga-layout/load
-
-export type Yoga = {
- Config: {
- create(): Config
- destroy(config: Config): void
- }
- Node: {
- create(config?: Config): Node
- createDefault(): Node
- createWithConfig(config: Config): Node
- destroy(node: Node): void
- }
-}
-
-const YOGA_INSTANCE: Yoga = {
- Config: {
- create: createConfig,
- destroy() {},
- },
- Node: {
- create: (config?: Config) => new Node(config),
- createDefault: () => new Node(),
- createWithConfig: (config: Config) => new Node(config),
- destroy() {},
- },
-}
-
-export function loadYoga(): Promise {
- return Promise.resolve(YOGA_INSTANCE)
-}
-
-export default YOGA_INSTANCE
diff --git a/src/schemas/src/entrypoints/agentSdkTypes.ts b/src/schemas/src/entrypoints/agentSdkTypes.ts
deleted file mode 100644
index 264ee1cdd..000000000
--- a/src/schemas/src/entrypoints/agentSdkTypes.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type HOOK_EVENTS = any;
-export type HookEvent = any;
diff --git a/src/screens/src/cli/structuredIO.ts b/src/screens/src/cli/structuredIO.ts
deleted file mode 100644
index 8e536b8a2..000000000
--- a/src/screens/src/cli/structuredIO.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SANDBOX_NETWORK_ACCESS_TOOL_NAME = any;
diff --git a/src/screens/src/components/AutoModeOptInDialog.ts b/src/screens/src/components/AutoModeOptInDialog.ts
deleted file mode 100644
index f441f7e57..000000000
--- a/src/screens/src/components/AutoModeOptInDialog.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AUTO_MODE_DESCRIPTION = any;
diff --git a/src/screens/src/components/ClaudeCodeHint/PluginHintMenu.ts b/src/screens/src/components/ClaudeCodeHint/PluginHintMenu.ts
deleted file mode 100644
index 2369289c7..000000000
--- a/src/screens/src/components/ClaudeCodeHint/PluginHintMenu.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type PluginHintMenu = any;
diff --git a/src/screens/src/components/DesktopUpsell/DesktopUpsellStartup.ts b/src/screens/src/components/DesktopUpsell/DesktopUpsellStartup.ts
deleted file mode 100644
index fcb5dc73d..000000000
--- a/src/screens/src/components/DesktopUpsell/DesktopUpsellStartup.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type DesktopUpsellStartup = any;
-export type shouldShowDesktopUpsellStartup = any;
diff --git a/src/screens/src/components/FeedbackSurvey/FeedbackSurvey.ts b/src/screens/src/components/FeedbackSurvey/FeedbackSurvey.ts
deleted file mode 100644
index 2466dd075..000000000
--- a/src/screens/src/components/FeedbackSurvey/FeedbackSurvey.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FeedbackSurvey = any;
diff --git a/src/screens/src/components/FeedbackSurvey/useFeedbackSurvey.ts b/src/screens/src/components/FeedbackSurvey/useFeedbackSurvey.ts
deleted file mode 100644
index dcff53ce8..000000000
--- a/src/screens/src/components/FeedbackSurvey/useFeedbackSurvey.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useFeedbackSurvey = any;
diff --git a/src/screens/src/components/FeedbackSurvey/useMemorySurvey.ts b/src/screens/src/components/FeedbackSurvey/useMemorySurvey.ts
deleted file mode 100644
index f7e0029db..000000000
--- a/src/screens/src/components/FeedbackSurvey/useMemorySurvey.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useMemorySurvey = any;
diff --git a/src/screens/src/components/FeedbackSurvey/usePostCompactSurvey.ts b/src/screens/src/components/FeedbackSurvey/usePostCompactSurvey.ts
deleted file mode 100644
index e81d32694..000000000
--- a/src/screens/src/components/FeedbackSurvey/usePostCompactSurvey.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type usePostCompactSurvey = any;
diff --git a/src/screens/src/components/KeybindingWarnings.ts b/src/screens/src/components/KeybindingWarnings.ts
deleted file mode 100644
index e57e1f78f..000000000
--- a/src/screens/src/components/KeybindingWarnings.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type KeybindingWarnings = any;
diff --git a/src/screens/src/components/LspRecommendation/LspRecommendationMenu.ts b/src/screens/src/components/LspRecommendation/LspRecommendationMenu.ts
deleted file mode 100644
index 0628cdcb0..000000000
--- a/src/screens/src/components/LspRecommendation/LspRecommendationMenu.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type LspRecommendationMenu = any;
diff --git a/src/screens/src/components/SandboxViolationExpandedView.ts b/src/screens/src/components/SandboxViolationExpandedView.ts
deleted file mode 100644
index 4af5947d8..000000000
--- a/src/screens/src/components/SandboxViolationExpandedView.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SandboxViolationExpandedView = any;
diff --git a/src/screens/src/components/mcp/McpParsingWarnings.ts b/src/screens/src/components/mcp/McpParsingWarnings.ts
deleted file mode 100644
index ab05516ed..000000000
--- a/src/screens/src/components/mcp/McpParsingWarnings.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type McpParsingWarnings = any;
diff --git a/src/screens/src/components/messages/UserTextMessage.ts b/src/screens/src/components/messages/UserTextMessage.ts
deleted file mode 100644
index 40106edbb..000000000
--- a/src/screens/src/components/messages/UserTextMessage.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type UserTextMessage = any;
diff --git a/src/screens/src/components/permissions/SandboxPermissionRequest.ts b/src/screens/src/components/permissions/SandboxPermissionRequest.ts
deleted file mode 100644
index bd5e216a4..000000000
--- a/src/screens/src/components/permissions/SandboxPermissionRequest.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SandboxPermissionRequest = any;
diff --git a/src/screens/src/hooks/notifs/useAutoModeUnavailableNotification.ts b/src/screens/src/hooks/notifs/useAutoModeUnavailableNotification.ts
deleted file mode 100644
index b240eb3f5..000000000
--- a/src/screens/src/hooks/notifs/useAutoModeUnavailableNotification.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useAutoModeUnavailableNotification = any;
diff --git a/src/screens/src/hooks/notifs/useCanSwitchToExistingSubscription.ts b/src/screens/src/hooks/notifs/useCanSwitchToExistingSubscription.ts
deleted file mode 100644
index 7a4814cec..000000000
--- a/src/screens/src/hooks/notifs/useCanSwitchToExistingSubscription.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useCanSwitchToExistingSubscription = any;
diff --git a/src/screens/src/hooks/notifs/useDeprecationWarningNotification.ts b/src/screens/src/hooks/notifs/useDeprecationWarningNotification.ts
deleted file mode 100644
index c919ed0d7..000000000
--- a/src/screens/src/hooks/notifs/useDeprecationWarningNotification.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useDeprecationWarningNotification = any;
diff --git a/src/screens/src/hooks/notifs/useFastModeNotification.ts b/src/screens/src/hooks/notifs/useFastModeNotification.ts
deleted file mode 100644
index 2d8192243..000000000
--- a/src/screens/src/hooks/notifs/useFastModeNotification.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useFastModeNotification = any;
diff --git a/src/screens/src/hooks/notifs/useIDEStatusIndicator.ts b/src/screens/src/hooks/notifs/useIDEStatusIndicator.ts
deleted file mode 100644
index c85b1a312..000000000
--- a/src/screens/src/hooks/notifs/useIDEStatusIndicator.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useIDEStatusIndicator = any;
diff --git a/src/screens/src/hooks/notifs/useInstallMessages.ts b/src/screens/src/hooks/notifs/useInstallMessages.ts
deleted file mode 100644
index 033331f33..000000000
--- a/src/screens/src/hooks/notifs/useInstallMessages.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useInstallMessages = any;
diff --git a/src/screens/src/hooks/notifs/useLspInitializationNotification.ts b/src/screens/src/hooks/notifs/useLspInitializationNotification.ts
deleted file mode 100644
index 67239f66d..000000000
--- a/src/screens/src/hooks/notifs/useLspInitializationNotification.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useLspInitializationNotification = any;
diff --git a/src/screens/src/hooks/notifs/useMcpConnectivityStatus.ts b/src/screens/src/hooks/notifs/useMcpConnectivityStatus.ts
deleted file mode 100644
index 7abc0f54f..000000000
--- a/src/screens/src/hooks/notifs/useMcpConnectivityStatus.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useMcpConnectivityStatus = any;
diff --git a/src/screens/src/hooks/notifs/useModelMigrationNotifications.ts b/src/screens/src/hooks/notifs/useModelMigrationNotifications.ts
deleted file mode 100644
index 2dbde4b2f..000000000
--- a/src/screens/src/hooks/notifs/useModelMigrationNotifications.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useModelMigrationNotifications = any;
diff --git a/src/screens/src/hooks/notifs/useNpmDeprecationNotification.ts b/src/screens/src/hooks/notifs/useNpmDeprecationNotification.ts
deleted file mode 100644
index ee5cd8011..000000000
--- a/src/screens/src/hooks/notifs/useNpmDeprecationNotification.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useNpmDeprecationNotification = any;
diff --git a/src/screens/src/hooks/notifs/usePluginAutoupdateNotification.ts b/src/screens/src/hooks/notifs/usePluginAutoupdateNotification.ts
deleted file mode 100644
index 020e8df25..000000000
--- a/src/screens/src/hooks/notifs/usePluginAutoupdateNotification.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type usePluginAutoupdateNotification = any;
diff --git a/src/screens/src/hooks/notifs/usePluginInstallationStatus.ts b/src/screens/src/hooks/notifs/usePluginInstallationStatus.ts
deleted file mode 100644
index c20954050..000000000
--- a/src/screens/src/hooks/notifs/usePluginInstallationStatus.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type usePluginInstallationStatus = any;
diff --git a/src/screens/src/hooks/notifs/useRateLimitWarningNotification.ts b/src/screens/src/hooks/notifs/useRateLimitWarningNotification.ts
deleted file mode 100644
index 81d3a769c..000000000
--- a/src/screens/src/hooks/notifs/useRateLimitWarningNotification.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useRateLimitWarningNotification = any;
diff --git a/src/screens/src/hooks/notifs/useSettingsErrors.ts b/src/screens/src/hooks/notifs/useSettingsErrors.ts
deleted file mode 100644
index 0724b24d6..000000000
--- a/src/screens/src/hooks/notifs/useSettingsErrors.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useSettingsErrors = any;
diff --git a/src/screens/src/hooks/notifs/useTeammateShutdownNotification.ts b/src/screens/src/hooks/notifs/useTeammateShutdownNotification.ts
deleted file mode 100644
index 9fd3f8a7f..000000000
--- a/src/screens/src/hooks/notifs/useTeammateShutdownNotification.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useTeammateLifecycleNotification = any;
diff --git a/src/screens/src/hooks/useAwaySummary.ts b/src/screens/src/hooks/useAwaySummary.ts
deleted file mode 100644
index 4455dec96..000000000
--- a/src/screens/src/hooks/useAwaySummary.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useAwaySummary = any;
diff --git a/src/screens/src/hooks/useChromeExtensionNotification.ts b/src/screens/src/hooks/useChromeExtensionNotification.ts
deleted file mode 100644
index c97ee1f82..000000000
--- a/src/screens/src/hooks/useChromeExtensionNotification.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useChromeExtensionNotification = any;
diff --git a/src/screens/src/hooks/useClaudeCodeHintRecommendation.ts b/src/screens/src/hooks/useClaudeCodeHintRecommendation.ts
deleted file mode 100644
index 83701c8a8..000000000
--- a/src/screens/src/hooks/useClaudeCodeHintRecommendation.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useClaudeCodeHintRecommendation = any;
diff --git a/src/screens/src/hooks/useFileHistorySnapshotInit.ts b/src/screens/src/hooks/useFileHistorySnapshotInit.ts
deleted file mode 100644
index 8d14981c0..000000000
--- a/src/screens/src/hooks/useFileHistorySnapshotInit.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useFileHistorySnapshotInit = any;
diff --git a/src/screens/src/hooks/useLspPluginRecommendation.ts b/src/screens/src/hooks/useLspPluginRecommendation.ts
deleted file mode 100644
index c6d24fab8..000000000
--- a/src/screens/src/hooks/useLspPluginRecommendation.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useLspPluginRecommendation = any;
diff --git a/src/screens/src/hooks/useOfficialMarketplaceNotification.ts b/src/screens/src/hooks/useOfficialMarketplaceNotification.ts
deleted file mode 100644
index 95d10a32d..000000000
--- a/src/screens/src/hooks/useOfficialMarketplaceNotification.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useOfficialMarketplaceNotification = any;
diff --git a/src/screens/src/hooks/usePromptsFromClaudeInChrome.ts b/src/screens/src/hooks/usePromptsFromClaudeInChrome.ts
deleted file mode 100644
index ca8e71f05..000000000
--- a/src/screens/src/hooks/usePromptsFromClaudeInChrome.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type usePromptsFromClaudeInChrome = any;
diff --git a/src/screens/src/hooks/useTerminalSize.ts b/src/screens/src/hooks/useTerminalSize.ts
deleted file mode 100644
index 4a0ef3ea3..000000000
--- a/src/screens/src/hooks/useTerminalSize.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type useTerminalSize = any;
diff --git a/src/screens/src/services/analytics/growthbook.ts b/src/screens/src/services/analytics/growthbook.ts
deleted file mode 100644
index e380906ea..000000000
--- a/src/screens/src/services/analytics/growthbook.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getFeatureValue_CACHED_MAY_BE_STALE = any;
diff --git a/src/screens/src/services/analytics/index.ts b/src/screens/src/services/analytics/index.ts
deleted file mode 100644
index ce0a9a827..000000000
--- a/src/screens/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logEvent = any;
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
diff --git a/src/screens/src/services/mcp/MCPConnectionManager.ts b/src/screens/src/services/mcp/MCPConnectionManager.ts
deleted file mode 100644
index 2a0ec4e7f..000000000
--- a/src/screens/src/services/mcp/MCPConnectionManager.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type MCPConnectionManager = any;
diff --git a/src/screens/src/services/tips/tipScheduler.ts b/src/screens/src/services/tips/tipScheduler.ts
deleted file mode 100644
index 813f4de4e..000000000
--- a/src/screens/src/services/tips/tipScheduler.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getTipToShowOnSpinner = any;
-export type recordShownTip = any;
diff --git a/src/screens/src/utils/context.ts b/src/screens/src/utils/context.ts
deleted file mode 100644
index 03d405458..000000000
--- a/src/screens/src/utils/context.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getModelMaxOutputTokens = any;
diff --git a/src/screens/src/utils/envUtils.ts b/src/screens/src/utils/envUtils.ts
deleted file mode 100644
index ef637d0cf..000000000
--- a/src/screens/src/utils/envUtils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getClaudeConfigHomeDir = any;
diff --git a/src/screens/src/utils/permissions/bypassPermissionsKillswitch.ts b/src/screens/src/utils/permissions/bypassPermissionsKillswitch.ts
deleted file mode 100644
index cd1c15aa3..000000000
--- a/src/screens/src/utils/permissions/bypassPermissionsKillswitch.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type checkAndDisableBypassPermissionsIfNeeded = any;
-export type checkAndDisableAutoModeIfNeeded = any;
-export type useKickOffCheckAndDisableBypassPermissionsIfNeeded = any;
-export type useKickOffCheckAndDisableAutoModeIfNeeded = any;
diff --git a/src/screens/src/utils/plugins/performStartupChecks.ts b/src/screens/src/utils/plugins/performStartupChecks.ts
deleted file mode 100644
index e555a9f1f..000000000
--- a/src/screens/src/utils/plugins/performStartupChecks.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type performStartupChecks = any;
diff --git a/src/screens/src/utils/sandbox/sandbox-adapter.ts b/src/screens/src/utils/sandbox/sandbox-adapter.ts
deleted file mode 100644
index edebe2640..000000000
--- a/src/screens/src/utils/sandbox/sandbox-adapter.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SandboxManager = any;
diff --git a/src/screens/src/utils/settings/constants.ts b/src/screens/src/utils/settings/constants.ts
deleted file mode 100644
index b82138d6a..000000000
--- a/src/screens/src/utils/settings/constants.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SettingSource = any;
diff --git a/src/screens/src/utils/theme.ts b/src/screens/src/utils/theme.ts
deleted file mode 100644
index c6999a678..000000000
--- a/src/screens/src/utils/theme.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Theme = any;
diff --git a/src/services/analytics/src/utils/user.ts b/src/services/analytics/src/utils/user.ts
deleted file mode 100644
index be2aa4592..000000000
--- a/src/services/analytics/src/utils/user.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type CoreUserData = any;
diff --git a/src/services/api/src/Tool.ts b/src/services/api/src/Tool.ts
deleted file mode 100644
index 63577b373..000000000
--- a/src/services/api/src/Tool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type QueryChainTracking = any;
diff --git a/src/services/api/src/bootstrap/state.ts b/src/services/api/src/bootstrap/state.ts
deleted file mode 100644
index 24331fe0d..000000000
--- a/src/services/api/src/bootstrap/state.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getSessionId = any;
-export type getAfkModeHeaderLatched = any;
-export type getCacheEditingHeaderLatched = any;
-export type getFastModeHeaderLatched = any;
-export type getLastApiCompletionTimestamp = any;
-export type getPromptCache1hAllowlist = any;
-export type getPromptCache1hEligible = any;
-export type getThinkingClearLatched = any;
-export type setAfkModeHeaderLatched = any;
-export type setCacheEditingHeaderLatched = any;
-export type setFastModeHeaderLatched = any;
-export type setLastMainRequestId = any;
-export type setPromptCache1hAllowlist = any;
-export type setPromptCache1hEligible = any;
-export type setThinkingClearLatched = any;
-export type addToTotalDurationState = any;
-export type consumePostCompaction = any;
-export type getIsNonInteractiveSession = any;
-export type getTeleportedSessionInfo = any;
-export type markFirstTeleportMessageLogged = any;
-export type setLastApiCompletionTimestamp = any;
diff --git a/src/services/api/src/constants/betas.ts b/src/services/api/src/constants/betas.ts
deleted file mode 100644
index fd08b7176..000000000
--- a/src/services/api/src/constants/betas.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AFK_MODE_BETA_HEADER = any;
-export type CONTEXT_1M_BETA_HEADER = any;
-export type CONTEXT_MANAGEMENT_BETA_HEADER = any;
-export type EFFORT_BETA_HEADER = any;
-export type FAST_MODE_BETA_HEADER = any;
-export type PROMPT_CACHING_SCOPE_BETA_HEADER = any;
-export type REDACT_THINKING_BETA_HEADER = any;
-export type STRUCTURED_OUTPUTS_BETA_HEADER = any;
-export type TASK_BUDGETS_BETA_HEADER = any;
diff --git a/src/services/api/src/constants/querySource.ts b/src/services/api/src/constants/querySource.ts
deleted file mode 100644
index 61a17200d..000000000
--- a/src/services/api/src/constants/querySource.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type QuerySource = any;
diff --git a/src/services/api/src/context/notifications.ts b/src/services/api/src/context/notifications.ts
deleted file mode 100644
index c212e68b7..000000000
--- a/src/services/api/src/context/notifications.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Notification = any;
diff --git a/src/services/api/src/cost-tracker.ts b/src/services/api/src/cost-tracker.ts
deleted file mode 100644
index 3f76a9113..000000000
--- a/src/services/api/src/cost-tracker.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type addToTotalSessionCost = any;
diff --git a/src/services/api/src/entrypoints/agentSdkTypes.ts b/src/services/api/src/entrypoints/agentSdkTypes.ts
deleted file mode 100644
index 0a85ba1ac..000000000
--- a/src/services/api/src/entrypoints/agentSdkTypes.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SDKAssistantMessageError = any;
diff --git a/src/services/api/src/services/analytics/growthbook.ts b/src/services/api/src/services/analytics/growthbook.ts
deleted file mode 100644
index e380906ea..000000000
--- a/src/services/api/src/services/analytics/growthbook.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getFeatureValue_CACHED_MAY_BE_STALE = any;
diff --git a/src/services/api/src/services/analytics/index.ts b/src/services/api/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/services/api/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/services/api/src/types/connectorText.ts b/src/services/api/src/types/connectorText.ts
deleted file mode 100644
index 6af50eb27..000000000
--- a/src/services/api/src/types/connectorText.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isConnectorTextBlock = (block: unknown) => boolean;
diff --git a/src/services/api/src/types/ids.ts b/src/services/api/src/types/ids.ts
deleted file mode 100644
index c8c60ebe5..000000000
--- a/src/services/api/src/types/ids.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AgentId = any;
diff --git a/src/services/api/src/types/message.ts b/src/services/api/src/types/message.ts
deleted file mode 100644
index c420ee31b..000000000
--- a/src/services/api/src/types/message.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Message = any;
-export type AssistantMessage = any;
-export type UserMessage = any;
-export type SystemAPIErrorMessage = any;
diff --git a/src/services/api/src/utils/advisor.ts b/src/services/api/src/utils/advisor.ts
deleted file mode 100644
index 57cbac38c..000000000
--- a/src/services/api/src/utils/advisor.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ADVISOR_TOOL_INSTRUCTIONS = any;
-export type getExperimentAdvisorModels = any;
-export type isAdvisorEnabled = any;
-export type isValidAdvisorModel = any;
-export type modelSupportsAdvisor = any;
diff --git a/src/services/api/src/utils/agentContext.ts b/src/services/api/src/utils/agentContext.ts
deleted file mode 100644
index 92f1d4946..000000000
--- a/src/services/api/src/utils/agentContext.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getAgentContext = any;
diff --git a/src/services/api/src/utils/auth.ts b/src/services/api/src/utils/auth.ts
deleted file mode 100644
index ee66093d8..000000000
--- a/src/services/api/src/utils/auth.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getAnthropicApiKeyWithSource = any;
-export type getClaudeAIOAuthTokens = any;
-export type getOauthAccountInfo = any;
-export type isClaudeAISubscriber = any;
-export type checkAndRefreshOAuthTokenIfNeeded = any;
-export type getAnthropicApiKey = any;
-export type getApiKeyFromApiKeyHelper = any;
-export type refreshAndGetAwsCredentials = any;
-export type refreshGcpCredentialsIfNeeded = any;
-export type isConsumerSubscriber = any;
-export type hasProfileScope = any;
diff --git a/src/services/api/src/utils/aws.ts b/src/services/api/src/utils/aws.ts
deleted file mode 100644
index 1929aaf98..000000000
--- a/src/services/api/src/utils/aws.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isAwsCredentialsProviderError = any;
diff --git a/src/services/api/src/utils/betas.ts b/src/services/api/src/utils/betas.ts
deleted file mode 100644
index 20d09935e..000000000
--- a/src/services/api/src/utils/betas.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getToolSearchBetaHeader = any;
-export type modelSupportsStructuredOutputs = any;
-export type shouldIncludeFirstPartyOnlyBetas = any;
-export type shouldUseGlobalCacheScope = any;
diff --git a/src/services/api/src/utils/claudeInChrome/common.ts b/src/services/api/src/utils/claudeInChrome/common.ts
deleted file mode 100644
index 26f787dab..000000000
--- a/src/services/api/src/utils/claudeInChrome/common.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type CLAUDE_IN_CHROME_MCP_SERVER_NAME = any;
diff --git a/src/services/api/src/utils/claudeInChrome/prompt.ts b/src/services/api/src/utils/claudeInChrome/prompt.ts
deleted file mode 100644
index 5029b1cc6..000000000
--- a/src/services/api/src/utils/claudeInChrome/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type CHROME_TOOL_SEARCH_INSTRUCTIONS = any;
diff --git a/src/services/api/src/utils/context.ts b/src/services/api/src/utils/context.ts
deleted file mode 100644
index 3840f431a..000000000
--- a/src/services/api/src/utils/context.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getMaxThinkingTokensForModel = any;
diff --git a/src/services/api/src/utils/debug.ts b/src/services/api/src/utils/debug.ts
deleted file mode 100644
index c64d5960c..000000000
--- a/src/services/api/src/utils/debug.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logForDebugging = any;
diff --git a/src/services/api/src/utils/diagLogs.ts b/src/services/api/src/utils/diagLogs.ts
deleted file mode 100644
index b016581ff..000000000
--- a/src/services/api/src/utils/diagLogs.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logForDiagnosticsNoPII = any;
diff --git a/src/services/api/src/utils/effort.ts b/src/services/api/src/utils/effort.ts
deleted file mode 100644
index c3acecb56..000000000
--- a/src/services/api/src/utils/effort.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type EffortValue = 'low' | 'medium' | 'high' | 'max' | number;
-export type modelSupportsEffort = (model: string) => boolean;
-export type EffortLevel = 'low' | 'medium' | 'high' | 'max';
diff --git a/src/services/api/src/utils/fastMode.ts b/src/services/api/src/utils/fastMode.ts
deleted file mode 100644
index 1228a5815..000000000
--- a/src/services/api/src/utils/fastMode.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isFastModeAvailable = any;
-export type isFastModeCooldown = any;
-export type isFastModeEnabled = any;
-export type isFastModeSupportedByModel = any;
diff --git a/src/services/api/src/utils/generators.ts b/src/services/api/src/utils/generators.ts
deleted file mode 100644
index 5a7707488..000000000
--- a/src/services/api/src/utils/generators.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type returnValue = any;
diff --git a/src/services/api/src/utils/gracefulShutdown.ts b/src/services/api/src/utils/gracefulShutdown.ts
deleted file mode 100644
index 28329ba76..000000000
--- a/src/services/api/src/utils/gracefulShutdown.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type gracefulShutdown = any;
diff --git a/src/services/api/src/utils/hash.ts b/src/services/api/src/utils/hash.ts
deleted file mode 100644
index 6aaf94a67..000000000
--- a/src/services/api/src/utils/hash.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type djb2Hash = any;
diff --git a/src/services/api/src/utils/headlessProfiler.ts b/src/services/api/src/utils/headlessProfiler.ts
deleted file mode 100644
index 123f78a48..000000000
--- a/src/services/api/src/utils/headlessProfiler.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type headlessProfilerCheckpoint = any;
diff --git a/src/services/api/src/utils/http.ts b/src/services/api/src/utils/http.ts
deleted file mode 100644
index 22100b2eb..000000000
--- a/src/services/api/src/utils/http.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getUserAgent = any;
diff --git a/src/services/api/src/utils/log.ts b/src/services/api/src/utils/log.ts
deleted file mode 100644
index cf30e90da..000000000
--- a/src/services/api/src/utils/log.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logError = any;
diff --git a/src/services/api/src/utils/mcpInstructionsDelta.ts b/src/services/api/src/utils/mcpInstructionsDelta.ts
deleted file mode 100644
index 5da03fccc..000000000
--- a/src/services/api/src/utils/mcpInstructionsDelta.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isMcpInstructionsDeltaEnabled = any;
diff --git a/src/services/api/src/utils/messages.ts b/src/services/api/src/utils/messages.ts
deleted file mode 100644
index 27c84668c..000000000
--- a/src/services/api/src/utils/messages.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type createAssistantAPIErrorMessage = any;
-export type NO_RESPONSE_REQUESTED = any;
-export type createSystemAPIErrorMessage = any;
diff --git a/src/services/api/src/utils/model/model.ts b/src/services/api/src/utils/model/model.ts
deleted file mode 100644
index 401fe0248..000000000
--- a/src/services/api/src/utils/model/model.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getDefaultMainLoopModelSetting = any;
-export type isNonCustomOpusModel = any;
-export type getSmallFastModel = any;
diff --git a/src/services/api/src/utils/model/modelStrings.ts b/src/services/api/src/utils/model/modelStrings.ts
deleted file mode 100644
index 1265ece0e..000000000
--- a/src/services/api/src/utils/model/modelStrings.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getModelStrings = any;
diff --git a/src/services/api/src/utils/model/providers.ts b/src/services/api/src/utils/model/providers.ts
deleted file mode 100644
index f8e248dfa..000000000
--- a/src/services/api/src/utils/model/providers.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getAPIProvider = any;
-export type getAPIProviderForStatsig = any;
-export type isFirstPartyAnthropicBaseUrl = any;
diff --git a/src/services/api/src/utils/modelCost.ts b/src/services/api/src/utils/modelCost.ts
deleted file mode 100644
index a37f5df38..000000000
--- a/src/services/api/src/utils/modelCost.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type calculateUSDCost = any;
diff --git a/src/services/api/src/utils/permissions/PermissionMode.ts b/src/services/api/src/utils/permissions/PermissionMode.ts
deleted file mode 100644
index 1bc6199f9..000000000
--- a/src/services/api/src/utils/permissions/PermissionMode.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type PermissionMode = any;
diff --git a/src/services/api/src/utils/permissions/filesystem.ts b/src/services/api/src/utils/permissions/filesystem.ts
deleted file mode 100644
index ef39cc7f8..000000000
--- a/src/services/api/src/utils/permissions/filesystem.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getClaudeTempDir = any;
diff --git a/src/services/api/src/utils/privacyLevel.ts b/src/services/api/src/utils/privacyLevel.ts
deleted file mode 100644
index 9d1c3506f..000000000
--- a/src/services/api/src/utils/privacyLevel.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isEssentialTrafficOnly = any;
diff --git a/src/services/api/src/utils/process.ts b/src/services/api/src/utils/process.ts
deleted file mode 100644
index 1085e5d63..000000000
--- a/src/services/api/src/utils/process.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type writeToStderr = any;
diff --git a/src/services/api/src/utils/proxy.ts b/src/services/api/src/utils/proxy.ts
deleted file mode 100644
index e93b33d2d..000000000
--- a/src/services/api/src/utils/proxy.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getProxyFetchOptions = any;
diff --git a/src/services/api/src/utils/queryProfiler.ts b/src/services/api/src/utils/queryProfiler.ts
deleted file mode 100644
index 1283fcc9e..000000000
--- a/src/services/api/src/utils/queryProfiler.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type endQueryProfile = any;
-export type queryCheckpoint = any;
diff --git a/src/services/api/src/utils/slowOperations.ts b/src/services/api/src/utils/slowOperations.ts
deleted file mode 100644
index b888efc24..000000000
--- a/src/services/api/src/utils/slowOperations.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type jsonStringify = any;
diff --git a/src/services/api/src/utils/telemetry/events.ts b/src/services/api/src/utils/telemetry/events.ts
deleted file mode 100644
index 4ae001883..000000000
--- a/src/services/api/src/utils/telemetry/events.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logOTelEvent = any;
diff --git a/src/services/api/src/utils/telemetry/sessionTracing.ts b/src/services/api/src/utils/telemetry/sessionTracing.ts
deleted file mode 100644
index 094d0f999..000000000
--- a/src/services/api/src/utils/telemetry/sessionTracing.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type endLLMRequestSpan = any;
-export type isBetaTracingEnabled = any;
-export type Span = any;
diff --git a/src/services/api/src/utils/thinking.ts b/src/services/api/src/utils/thinking.ts
deleted file mode 100644
index ea79bd179..000000000
--- a/src/services/api/src/utils/thinking.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type modelSupportsAdaptiveThinking = any;
-export type modelSupportsThinking = any;
-export type ThinkingConfig = any;
diff --git a/src/services/api/src/utils/toolSearch.ts b/src/services/api/src/utils/toolSearch.ts
deleted file mode 100644
index 3df7e9955..000000000
--- a/src/services/api/src/utils/toolSearch.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type extractDiscoveredToolNames = any;
-export type isDeferredToolsDeltaEnabled = any;
-export type isToolSearchEnabled = any;
diff --git a/src/services/compact/src/bootstrap/state.ts b/src/services/compact/src/bootstrap/state.ts
deleted file mode 100644
index a860c549e..000000000
--- a/src/services/compact/src/bootstrap/state.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type markPostCompaction = any;
diff --git a/src/services/compact/src/tools/FileEditTool/constants.ts b/src/services/compact/src/tools/FileEditTool/constants.ts
deleted file mode 100644
index b455c0655..000000000
--- a/src/services/compact/src/tools/FileEditTool/constants.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FILE_EDIT_TOOL_NAME = any;
diff --git a/src/services/compact/src/tools/FileReadTool/prompt.ts b/src/services/compact/src/tools/FileReadTool/prompt.ts
deleted file mode 100644
index fac6439fc..000000000
--- a/src/services/compact/src/tools/FileReadTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FILE_READ_TOOL_NAME = any;
diff --git a/src/services/compact/src/tools/FileWriteTool/prompt.ts b/src/services/compact/src/tools/FileWriteTool/prompt.ts
deleted file mode 100644
index e69299d74..000000000
--- a/src/services/compact/src/tools/FileWriteTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FILE_WRITE_TOOL_NAME = any;
diff --git a/src/services/compact/src/tools/GlobTool/prompt.ts b/src/services/compact/src/tools/GlobTool/prompt.ts
deleted file mode 100644
index 060caf29c..000000000
--- a/src/services/compact/src/tools/GlobTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type GLOB_TOOL_NAME = any;
diff --git a/src/services/compact/src/tools/GrepTool/prompt.ts b/src/services/compact/src/tools/GrepTool/prompt.ts
deleted file mode 100644
index 08b8a8d29..000000000
--- a/src/services/compact/src/tools/GrepTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type GREP_TOOL_NAME = any;
diff --git a/src/services/compact/src/tools/NotebookEditTool/constants.ts b/src/services/compact/src/tools/NotebookEditTool/constants.ts
deleted file mode 100644
index 6c6c94bad..000000000
--- a/src/services/compact/src/tools/NotebookEditTool/constants.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type NOTEBOOK_EDIT_TOOL_NAME = any;
diff --git a/src/services/compact/src/tools/WebFetchTool/prompt.ts b/src/services/compact/src/tools/WebFetchTool/prompt.ts
deleted file mode 100644
index 63b342a25..000000000
--- a/src/services/compact/src/tools/WebFetchTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type WEB_FETCH_TOOL_NAME = any;
diff --git a/src/services/compact/src/tools/WebSearchTool/prompt.ts b/src/services/compact/src/tools/WebSearchTool/prompt.ts
deleted file mode 100644
index 38871a0ba..000000000
--- a/src/services/compact/src/tools/WebSearchTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type WEB_SEARCH_TOOL_NAME = any;
diff --git a/src/services/compact/src/utils/shell/shellToolUtils.ts b/src/services/compact/src/utils/shell/shellToolUtils.ts
deleted file mode 100644
index c89fe2ada..000000000
--- a/src/services/compact/src/utils/shell/shellToolUtils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SHELL_TOOL_NAMES = any;
diff --git a/src/services/mcp/adapter/analytics.ts b/src/services/mcp/adapter/analytics.ts
deleted file mode 100644
index 6b3bf46c1..000000000
--- a/src/services/mcp/adapter/analytics.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-// Host analytics adapter — bridges logEvent to mcp-client's AnalyticsSink interface
-
-import type { AnalyticsSink } from '@claude-code-best/mcp-client'
-import {
- type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
- logEvent,
-} from '../../analytics/index.js'
-
-/**
- * Creates an AnalyticsSink implementation that delegates to the host's logEvent.
- */
-export function createMcpAnalytics(): AnalyticsSink {
- return {
- trackEvent(event: string, metadata: Record) {
- logEvent(event, metadata as Record)
- },
- }
-}
diff --git a/src/services/mcp/adapter/auth.ts b/src/services/mcp/adapter/auth.ts
deleted file mode 100644
index e10f86a2e..000000000
--- a/src/services/mcp/adapter/auth.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-// Host auth provider adapter — bridges OAuth token management to mcp-client's AuthProvider interface
-
-import type { AuthProvider } from '@claude-code-best/mcp-client'
-import {
- getClaudeAIOAuthTokens,
- checkAndRefreshOAuthTokenIfNeeded,
- handleOAuth401Error,
-} from '../../../utils/auth.js'
-
-/**
- * Creates an AuthProvider implementation using the host's OAuth token management.
- */
-export function createMcpAuth(): AuthProvider {
- return {
- async getTokens() {
- const tokens = getClaudeAIOAuthTokens()
- if (!tokens) return null
- return { accessToken: tokens.accessToken }
- },
- async refreshTokens() {
- await checkAndRefreshOAuthTokenIfNeeded()
- },
- async handleOAuthError(error: unknown) {
- const currentToken = getClaudeAIOAuthTokens()?.accessToken ?? ''
- await handleOAuth401Error(currentToken)
- },
- }
-}
diff --git a/src/services/mcp/adapter/featureGate.ts b/src/services/mcp/adapter/featureGate.ts
deleted file mode 100644
index 2afddd747..000000000
--- a/src/services/mcp/adapter/featureGate.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-// Host feature gate adapter — bridges feature() to mcp-client's FeatureGate interface
-
-import type { FeatureGate } from '@claude-code-best/mcp-client'
-import { feature } from 'bun:bundle'
-
-/**
- * Creates a FeatureGate implementation using the host's feature flag system.
- */
-export function createMcpFeatureGate(): FeatureGate {
- return {
- isEnabled(flag: string) {
- return feature(flag)
- },
- }
-}
diff --git a/src/services/mcp/adapter/httpConfig.ts b/src/services/mcp/adapter/httpConfig.ts
deleted file mode 100644
index cebf3d60f..000000000
--- a/src/services/mcp/adapter/httpConfig.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-// Host HTTP config adapter — bridges getUserAgent/getSessionId to mcp-client's HttpConfig interface
-
-import type { HttpConfig } from '@claude-code-best/mcp-client'
-import { getMCPUserAgent } from '../../../utils/http.js'
-import { getSessionId } from '../../../bootstrap/state.js'
-
-/**
- * Creates an HttpConfig implementation using the host's user agent and session ID.
- */
-export function createMcpHttpConfig(): HttpConfig {
- return {
- getUserAgent: () => getMCPUserAgent(),
- getSessionId: () => getSessionId(),
- }
-}
diff --git a/src/services/mcp/adapter/imageProcessor.ts b/src/services/mcp/adapter/imageProcessor.ts
deleted file mode 100644
index f8670d64a..000000000
--- a/src/services/mcp/adapter/imageProcessor.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-// Host image processor adapter — bridges maybeResizeAndDownsampleImageBuffer to mcp-client's ImageProcessor interface
-
-import type { ImageProcessor } from '@claude-code-best/mcp-client'
-import { maybeResizeAndDownsampleImageBuffer } from '../../../utils/imageResizer.js'
-
-/**
- * Creates an ImageProcessor implementation using the host's image resizing.
- */
-export function createMcpImageProcessor(): ImageProcessor {
- return {
- async resizeAndDownsample(buffer: Buffer) {
- const result = await maybeResizeAndDownsampleImageBuffer(buffer, buffer.length, 'png')
- return result.buffer
- },
- }
-}
diff --git a/src/services/mcp/adapter/index.ts b/src/services/mcp/adapter/index.ts
deleted file mode 100644
index 5fd0f7881..000000000
--- a/src/services/mcp/adapter/index.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-// Host dependency injection — assembles McpClientDependencies from host infrastructure
-// This is the single entry point for creating the dependencies object used by createMcpManager()
-
-import type { McpClientDependencies } from '@claude-code-best/mcp-client'
-import { createMcpLogger } from './logger.js'
-import { createMcpHttpConfig } from './httpConfig.js'
-import { createMcpProxyConfig } from './proxy.js'
-import { createMcpAnalytics } from './analytics.js'
-import { createMcpSubprocessEnv } from './subprocessEnv.js'
-import { createMcpStorage } from './storage.js'
-import { createMcpImageProcessor } from './imageProcessor.js'
-import { createMcpAuth } from './auth.js'
-/**
- * Creates the full set of MCP client dependencies using host infrastructure.
- * All adapters are lazy — they only call into host modules when invoked.
- *
- * Note: featureGate is omitted because Bun's feature() requires string-literal
- * arguments at compile time and cannot accept runtime variables. The interface
- * field is optional and the mcp-client package does not use it currently.
- */
-export function createMcpDependencies(): McpClientDependencies {
- return {
- logger: createMcpLogger(),
- httpConfig: createMcpHttpConfig(),
- proxy: createMcpProxyConfig(),
- analytics: createMcpAnalytics(),
- subprocessEnv: createMcpSubprocessEnv(),
- storage: createMcpStorage(),
- imageProcessor: createMcpImageProcessor(),
- auth: createMcpAuth(),
- }
-}
diff --git a/src/services/mcp/adapter/logger.ts b/src/services/mcp/adapter/logger.ts
deleted file mode 100644
index 473fa8421..000000000
--- a/src/services/mcp/adapter/logger.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-// Host logger adapter — bridges logMCPDebug/logMCPError to mcp-client's Logger interface
-
-import type { Logger } from '@claude-code-best/mcp-client'
-import { logMCPDebug, logMCPError } from '../../../utils/log.js'
-
-/**
- * Creates a Logger implementation that delegates to the host's MCP logging system.
- */
-export function createMcpLogger(): Logger {
- return {
- debug(message: string, ...args: unknown[]) {
- // Extract server name from bracketed prefix if present: [serverName] message
- const match = message.match(/^\[([^\]]+)\]\s*(.*)/)
- if (match) {
- logMCPDebug(match[1], match[2])
- }
- // Silently ignore messages without server name prefix
- },
- info(message: string, ...args: unknown[]) {
- const match = message.match(/^\[([^\]]+)\]\s*(.*)/)
- if (match) {
- logMCPDebug(match[1], match[2])
- }
- },
- warn(message: string, ...args: unknown[]) {
- const match = message.match(/^\[([^\]]+)\]\s*(.*)/)
- if (match) {
- logMCPError(match[1], message)
- }
- },
- error(message: string, ...args: unknown[]) {
- const match = message.match(/^\[([^\]]+)\]\s*(.*)/)
- if (match) {
- logMCPError(match[1], args[0] ?? message)
- }
- },
- }
-}
diff --git a/src/services/mcp/adapter/proxy.ts b/src/services/mcp/adapter/proxy.ts
deleted file mode 100644
index 5fe74dc24..000000000
--- a/src/services/mcp/adapter/proxy.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-// Host proxy config adapter — bridges proxy/MTLS to mcp-client's ProxyConfig interface
-
-import type { ProxyConfig } from '@claude-code-best/mcp-client'
-import {
- getProxyFetchOptions,
- getWebSocketProxyAgent,
- getWebSocketProxyUrl,
-} from '../../../utils/proxy.js'
-import { getWebSocketTLSOptions } from '../../../utils/mtls.js'
-
-/**
- * Creates a ProxyConfig implementation using the host's proxy and TLS settings.
- */
-export function createMcpProxyConfig(): ProxyConfig {
- return {
- getFetchOptions() {
- return getProxyFetchOptions() as Record
- },
- getWebSocketAgent(url: string) {
- return getWebSocketProxyAgent(url)
- },
- getWebSocketUrl(url: string) {
- return getWebSocketProxyUrl(url)
- },
- getTLSOptions() {
- const opts = getWebSocketTLSOptions()
- return opts as Record | undefined
- },
- }
-}
diff --git a/src/services/mcp/adapter/storage.ts b/src/services/mcp/adapter/storage.ts
deleted file mode 100644
index 8ba2f2526..000000000
--- a/src/services/mcp/adapter/storage.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-// Host content storage adapter — bridges persistBinaryContent to mcp-client's ContentStorage interface
-
-import type { ContentStorage } from '@claude-code-best/mcp-client'
-import { persistBinaryContent } from '../../../utils/mcpOutputStorage.js'
-import { persistToolResult, isPersistError } from '../../../utils/toolResultStorage.js'
-
-/**
- * Creates a ContentStorage implementation using the host's binary persistence.
- */
-export function createMcpStorage(): ContentStorage {
- return {
- async persistBinaryContent(data: Buffer, ext: string) {
- const result = await persistBinaryContent(data, ext, `mcp-adapter-${Date.now()}`)
- if ('error' in result) {
- throw new Error(result.error)
- }
- return result.filepath
- },
- }
-}
diff --git a/src/services/mcp/adapter/subprocessEnv.ts b/src/services/mcp/adapter/subprocessEnv.ts
deleted file mode 100644
index 9e049a672..000000000
--- a/src/services/mcp/adapter/subprocessEnv.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-// Host subprocess environment adapter
-
-import type { SubprocessEnvProvider } from '@claude-code-best/mcp-client'
-import { subprocessEnv } from '../../../utils/subprocessEnv.js'
-
-/**
- * Creates a SubprocessEnvProvider using the host's subprocess environment logic.
- */
-export function createMcpSubprocessEnv(): SubprocessEnvProvider {
- return {
- getEnv(additional?: Record) {
- return { ...subprocessEnv(), ...additional } as Record
- },
- }
-}
diff --git a/src/services/mcp/src/constants/oauth.ts b/src/services/mcp/src/constants/oauth.ts
deleted file mode 100644
index a1b08933a..000000000
--- a/src/services/mcp/src/constants/oauth.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getOauthConfig = any;
diff --git a/src/services/mcp/src/services/analytics/index.ts b/src/services/mcp/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/services/mcp/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/services/mcp/src/services/mcp/config.ts b/src/services/mcp/src/services/mcp/config.ts
deleted file mode 100644
index 109c9d3cc..000000000
--- a/src/services/mcp/src/services/mcp/config.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type dedupClaudeAiMcpServers = any;
-export type doesEnterpriseMcpConfigExist = any;
-export type filterMcpServersByPolicy = any;
-export type getClaudeCodeMcpConfigs = any;
-export type isMcpServerDisabled = any;
-export type setMcpServerEnabled = any;
diff --git a/src/services/mcp/src/state/AppState.ts b/src/services/mcp/src/state/AppState.ts
deleted file mode 100644
index caf2928ae..000000000
--- a/src/services/mcp/src/state/AppState.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AppState = any;
diff --git a/src/services/mcp/src/types/message.ts b/src/services/mcp/src/types/message.ts
deleted file mode 100644
index a689141e4..000000000
--- a/src/services/mcp/src/types/message.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AssistantMessage = any;
diff --git a/src/services/mcp/src/types/plugin.ts b/src/services/mcp/src/types/plugin.ts
deleted file mode 100644
index 5129b6880..000000000
--- a/src/services/mcp/src/types/plugin.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type PluginError = any;
diff --git a/src/services/mcp/src/utils/auth.ts b/src/services/mcp/src/utils/auth.ts
deleted file mode 100644
index 118c05735..000000000
--- a/src/services/mcp/src/utils/auth.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getClaudeAIOAuthTokens = any;
diff --git a/src/services/mcp/src/utils/config.ts b/src/services/mcp/src/utils/config.ts
deleted file mode 100644
index 7cf15deca..000000000
--- a/src/services/mcp/src/utils/config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getGlobalConfig = any;
-export type saveGlobalConfig = any;
diff --git a/src/services/mcp/src/utils/debug.ts b/src/services/mcp/src/utils/debug.ts
deleted file mode 100644
index c64d5960c..000000000
--- a/src/services/mcp/src/utils/debug.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logForDebugging = any;
diff --git a/src/services/mcp/src/utils/envUtils.ts b/src/services/mcp/src/utils/envUtils.ts
deleted file mode 100644
index f6fa62ed7..000000000
--- a/src/services/mcp/src/utils/envUtils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isEnvDefinedFalsy = any;
diff --git a/src/services/mcp/src/utils/platform.ts b/src/services/mcp/src/utils/platform.ts
deleted file mode 100644
index b6686f812..000000000
--- a/src/services/mcp/src/utils/platform.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getPlatform = any;
diff --git a/src/services/oauth/src/constants/oauth.ts b/src/services/oauth/src/constants/oauth.ts
deleted file mode 100644
index 870b6dd12..000000000
--- a/src/services/oauth/src/constants/oauth.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getOauthConfig = any;
-export type OAUTH_BETA_HEADER = any;
diff --git a/src/services/oauth/src/services/analytics/index.ts b/src/services/oauth/src/services/analytics/index.ts
deleted file mode 100644
index ce0a9a827..000000000
--- a/src/services/oauth/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logEvent = any;
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
diff --git a/src/services/oauth/src/services/oauth/types.ts b/src/services/oauth/src/services/oauth/types.ts
deleted file mode 100644
index bc5c3d5cc..000000000
--- a/src/services/oauth/src/services/oauth/types.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type OAuthProfileResponse = any;
diff --git a/src/services/oauth/src/utils/auth.ts b/src/services/oauth/src/utils/auth.ts
deleted file mode 100644
index 2a02cad70..000000000
--- a/src/services/oauth/src/utils/auth.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getAnthropicApiKey = any;
diff --git a/src/services/oauth/src/utils/config.ts b/src/services/oauth/src/utils/config.ts
deleted file mode 100644
index 00cdd1299..000000000
--- a/src/services/oauth/src/utils/config.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getGlobalConfig = any;
diff --git a/src/services/oauth/src/utils/log.ts b/src/services/oauth/src/utils/log.ts
deleted file mode 100644
index cf30e90da..000000000
--- a/src/services/oauth/src/utils/log.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logError = any;
diff --git a/src/services/src/cost-tracker.ts b/src/services/src/cost-tracker.ts
deleted file mode 100644
index 3f76a9113..000000000
--- a/src/services/src/cost-tracker.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type addToTotalSessionCost = any;
diff --git a/src/services/src/utils/log.ts b/src/services/src/utils/log.ts
deleted file mode 100644
index cf30e90da..000000000
--- a/src/services/src/utils/log.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logError = any;
diff --git a/src/services/src/utils/model/providers.ts b/src/services/src/utils/model/providers.ts
deleted file mode 100644
index df87a41b4..000000000
--- a/src/services/src/utils/model/providers.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getAPIProvider = any;
diff --git a/src/services/src/utils/modelCost.ts b/src/services/src/utils/modelCost.ts
deleted file mode 100644
index a37f5df38..000000000
--- a/src/services/src/utils/modelCost.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type calculateUSDCost = any;
diff --git a/src/services/tips/src/utils/debug.ts b/src/services/tips/src/utils/debug.ts
deleted file mode 100644
index c64d5960c..000000000
--- a/src/services/tips/src/utils/debug.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logForDebugging = any;
diff --git a/src/services/tips/src/utils/fileHistory.ts b/src/services/tips/src/utils/fileHistory.ts
deleted file mode 100644
index 5c33161bd..000000000
--- a/src/services/tips/src/utils/fileHistory.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type fileHistoryEnabled = any;
diff --git a/src/services/tips/src/utils/settings/settings.ts b/src/services/tips/src/utils/settings/settings.ts
deleted file mode 100644
index bdf4efb89..000000000
--- a/src/services/tips/src/utils/settings/settings.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getInitialSettings = any;
-export type getSettings_DEPRECATED = any;
-export type getSettingsForSource = any;
diff --git a/src/services/tools/src/services/analytics/index.ts b/src/services/tools/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/services/tools/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/services/tools/src/services/analytics/metadata.ts b/src/services/tools/src/services/analytics/metadata.ts
deleted file mode 100644
index e702ce446..000000000
--- a/src/services/tools/src/services/analytics/metadata.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type sanitizeToolNameForAnalytics = any;
-export type extractMcpToolDetails = any;
-export type extractSkillName = any;
-export type extractToolInputForTelemetry = any;
-export type getFileExtensionForAnalytics = any;
-export type getFileExtensionsFromBashCommand = any;
-export type isToolDetailsLoggingEnabled = any;
-export type mcpToolDetailsForAnalytics = any;
diff --git a/src/services/tools/src/utils/messages.ts b/src/services/tools/src/utils/messages.ts
deleted file mode 100644
index edf1650fc..000000000
--- a/src/services/tools/src/utils/messages.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type createUserMessage = any;
-export type REJECT_MESSAGE = any;
-export type withMemoryCorrectionHint = any;
diff --git a/src/skills/bundled/src/tools/AgentTool/built-in/claudeCodeGuideAgent.ts b/src/skills/bundled/src/tools/AgentTool/built-in/claudeCodeGuideAgent.ts
deleted file mode 100644
index d9e0c872d..000000000
--- a/src/skills/bundled/src/tools/AgentTool/built-in/claudeCodeGuideAgent.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type CLAUDE_CODE_GUIDE_AGENT_TYPE = any;
diff --git a/src/skills/bundled/src/utils/claudeInChrome/setup.ts b/src/skills/bundled/src/utils/claudeInChrome/setup.ts
deleted file mode 100644
index 0f25ac9b8..000000000
--- a/src/skills/bundled/src/utils/claudeInChrome/setup.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type shouldAutoEnableClaudeInChrome = any;
diff --git a/src/skills/bundled/src/utils/settings/settings.ts b/src/skills/bundled/src/utils/settings/settings.ts
deleted file mode 100644
index c9d1262e3..000000000
--- a/src/skills/bundled/src/utils/settings/settings.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getSettingsFilePathForSource = any;
diff --git a/src/state/src/context/notifications.ts b/src/state/src/context/notifications.ts
deleted file mode 100644
index c212e68b7..000000000
--- a/src/state/src/context/notifications.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Notification = any;
diff --git a/src/state/src/utils/todo/types.ts b/src/state/src/utils/todo/types.ts
deleted file mode 100644
index 273f5ec20..000000000
--- a/src/state/src/utils/todo/types.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type TodoList = any;
diff --git a/src/types/src/entrypoints/agentSdkTypes.ts b/src/types/src/entrypoints/agentSdkTypes.ts
deleted file mode 100644
index d06fee6e9..000000000
--- a/src/types/src/entrypoints/agentSdkTypes.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type HookEvent = any;
-export type HOOK_EVENTS = any;
-export type HookInput = any;
-export type PermissionUpdate = any;
-export type HookJSONOutput = any;
-export type AsyncHookJSONOutput = any;
-export type SyncHookJSONOutput = any;
diff --git a/src/types/src/types/message.ts b/src/types/src/types/message.ts
deleted file mode 100644
index 585895d8e..000000000
--- a/src/types/src/types/message.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Message = any;
diff --git a/src/types/src/utils/fileHistory.ts b/src/types/src/utils/fileHistory.ts
deleted file mode 100644
index f1dbe566a..000000000
--- a/src/types/src/utils/fileHistory.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FileHistorySnapshot = any;
diff --git a/src/types/src/utils/permissions/PermissionResult.ts b/src/types/src/utils/permissions/PermissionResult.ts
deleted file mode 100644
index 4ffc39c69..000000000
--- a/src/types/src/utils/permissions/PermissionResult.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type PermissionResult = any;
diff --git a/src/types/src/utils/permissions/PermissionRule.ts b/src/types/src/utils/permissions/PermissionRule.ts
deleted file mode 100644
index 2b6b7b27a..000000000
--- a/src/types/src/utils/permissions/PermissionRule.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type permissionBehaviorSchema = any;
diff --git a/src/types/src/utils/permissions/PermissionUpdateSchema.ts b/src/types/src/utils/permissions/PermissionUpdateSchema.ts
deleted file mode 100644
index a56a548e6..000000000
--- a/src/types/src/utils/permissions/PermissionUpdateSchema.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type permissionUpdateSchema = any;
diff --git a/src/types/src/utils/toolResultStorage.ts b/src/types/src/utils/toolResultStorage.ts
deleted file mode 100644
index 2229baa6d..000000000
--- a/src/types/src/utils/toolResultStorage.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ContentReplacementRecord = any;
diff --git a/src/utils/background/remote/src/constants/oauth.ts b/src/utils/background/remote/src/constants/oauth.ts
deleted file mode 100644
index a1b08933a..000000000
--- a/src/utils/background/remote/src/constants/oauth.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getOauthConfig = any;
diff --git a/src/utils/background/remote/src/entrypoints/agentSdkTypes.ts b/src/utils/background/remote/src/entrypoints/agentSdkTypes.ts
deleted file mode 100644
index d4bdb4fb4..000000000
--- a/src/utils/background/remote/src/entrypoints/agentSdkTypes.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SDKMessage = any;
diff --git a/src/utils/background/remote/src/services/oauth/client.ts b/src/utils/background/remote/src/services/oauth/client.ts
deleted file mode 100644
index 5a7055fbe..000000000
--- a/src/utils/background/remote/src/services/oauth/client.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getOrganizationUUID = any;
diff --git a/src/utils/bash/src/components/PromptInput/PromptInputFooterSuggestions.ts b/src/utils/bash/src/components/PromptInput/PromptInputFooterSuggestions.ts
deleted file mode 100644
index d0fd674c7..000000000
--- a/src/utils/bash/src/components/PromptInput/PromptInputFooterSuggestions.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SuggestionItem = any;
diff --git a/src/utils/bash/src/services/analytics/index.ts b/src/utils/bash/src/services/analytics/index.ts
deleted file mode 100644
index 60402f927..000000000
--- a/src/utils/bash/src/services/analytics/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logEvent = any;
diff --git a/src/utils/computerUse/win32/ocr.ts b/src/utils/computerUse/win32/ocr.ts
deleted file mode 100644
index 02536d919..000000000
--- a/src/utils/computerUse/win32/ocr.ts
+++ /dev/null
@@ -1,250 +0,0 @@
-/**
- * OCR module using Windows.Media.Ocr.OcrEngine via PowerShell.
- * Captures a screen region or window, then runs WinRT OCR to extract text.
- */
-
-import { ps as runPs } from './shared.js'
-
-export interface OcrLine {
- text: string
- bounds: { x: number; y: number; w: number; h: number }
-}
-
-export interface OcrResult {
- text: string
- lines: OcrLine[]
- language: string
-}
-
-function emptyResult(language: string): OcrResult {
- return { text: '', lines: [], language }
-}
-
-/**
- * PowerShell script that:
- * 1. Screenshots a screen region using CopyFromScreen
- * 2. Saves to temp PNG
- * 3. Loads via WinRT BitmapDecoder -> SoftwareBitmap
- * 4. Runs OcrEngine.RecognizeAsync
- * 5. Outputs JSON with text, lines, and bounding rects
- */
-function buildOcrRegionScript(
- x: number,
- y: number,
- w: number,
- h: number,
- lang: string,
-): string {
- return `
-Add-Type -AssemblyName System.Drawing
-Add-Type -AssemblyName System.Runtime.WindowsRuntime
-
-# Load WinRT types
-$null = [Windows.Media.Ocr.OcrEngine, Windows.Foundation, ContentType = WindowsRuntime]
-$null = [Windows.Graphics.Imaging.SoftwareBitmap, Windows.Foundation, ContentType = WindowsRuntime]
-$null = [Windows.Graphics.Imaging.BitmapDecoder, Windows.Foundation, ContentType = WindowsRuntime]
-$null = [Windows.Storage.StorageFile, Windows.Foundation, ContentType = WindowsRuntime]
-$null = [Windows.Storage.Streams.RandomAccessStream, Windows.Foundation, ContentType = WindowsRuntime]
-$null = [Windows.Globalization.Language, Windows.Foundation, ContentType = WindowsRuntime]
-
-# Await helper for WinRT async operations
-$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | Where-Object {
- $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and
- $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation\`1'
-})[0]
-Function Await($WinRtTask, $ResultType) {
- $asTask = $asTaskGeneric.MakeGenericMethod($ResultType)
- $netTask = $asTask.Invoke($null, @($WinRtTask))
- $netTask.Wait(-1) | Out-Null
- $netTask.Result
-}
-
-try {
- # Step 1: Screenshot region
- $bmp = New-Object System.Drawing.Bitmap(${w}, ${h})
- $g = [System.Drawing.Graphics]::FromImage($bmp)
- $g.CopyFromScreen(${x}, ${y}, 0, 0, (New-Object System.Drawing.Size(${w}, ${h})))
- $g.Dispose()
-
- # Step 2: Save to temp file
- $tmpFile = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), "ocrtemp_$([guid]::NewGuid().ToString('N')).png")
- $bmp.Save($tmpFile, [System.Drawing.Imaging.ImageFormat]::Png)
- $bmp.Dispose()
-
- # Step 3: Open as StorageFile -> BitmapDecoder -> SoftwareBitmap
- $storageFile = Await ([Windows.Storage.StorageFile]::GetFileFromPathAsync($tmpFile)) ([Windows.Storage.StorageFile])
- $stream = Await ($storageFile.OpenAsync([Windows.Storage.FileAccessMode]::Read)) ([Windows.Storage.Streams.IRandomAccessStream])
- $decoder = Await ([Windows.Graphics.Imaging.BitmapDecoder]::CreateAsync($stream)) ([Windows.Graphics.Imaging.BitmapDecoder])
- $softwareBmp = Await ($decoder.GetSoftwareBitmapAsync()) ([Windows.Graphics.Imaging.SoftwareBitmap])
-
- # Step 4: Create OCR engine
- $ocrLang = New-Object Windows.Globalization.Language('${lang}')
- $engine = [Windows.Media.Ocr.OcrEngine]::TryCreateFromLanguage($ocrLang)
- if ($engine -eq $null) {
- # Fallback to en-US
- $ocrLang = New-Object Windows.Globalization.Language('en-US')
- $engine = [Windows.Media.Ocr.OcrEngine]::TryCreateFromLanguage($ocrLang)
- }
- if ($engine -eq $null) {
- Write-Output '{"text":"","lines":[],"language":"${lang}"}'
- return
- }
-
- # Step 5: Run OCR
- $ocrResult = Await ($engine.RecognizeAsync($softwareBmp)) ([Windows.Media.Ocr.OcrResult])
-
- # Step 6: Extract lines with bounding rects
- $lines = @()
- foreach ($line in $ocrResult.Lines) {
- $minX = [double]::MaxValue; $minY = [double]::MaxValue
- $maxX = 0.0; $maxY = 0.0
- foreach ($word in $line.Words) {
- $r = $word.BoundingRect
- if ($r.X -lt $minX) { $minX = $r.X }
- if ($r.Y -lt $minY) { $minY = $r.Y }
- if (($r.X + $r.Width) -gt $maxX) { $maxX = $r.X + $r.Width }
- if (($r.Y + $r.Height) -gt $maxY) { $maxY = $r.Y + $r.Height }
- }
- $lines += @{
- text = $line.Text
- bounds = @{
- x = [int]$minX
- y = [int]$minY
- w = [int]($maxX - $minX)
- h = [int]($maxY - $minY)
- }
- }
- }
-
- $output = @{
- text = $ocrResult.Text
- lines = $lines
- language = $ocrLang.LanguageTag
- }
- Write-Output (ConvertTo-Json $output -Depth 4 -Compress)
-
- # Cleanup
- $stream.Dispose()
- Remove-Item $tmpFile -ErrorAction SilentlyContinue
-} catch {
- Write-Output '{"text":"","lines":[],"language":"${lang}"}'
-}
-`
-}
-
-/**
- * PowerShell script to get a window's bounding rect by title.
- */
-function buildGetWindowRectScript(windowTitle: string): string {
- const escaped = windowTitle.replace(/'/g, "''")
- return `
-Add-Type @'
-using System;
-using System.Runtime.InteropServices;
-public class WinRect {
- [DllImport("user32.dll", CharSet=CharSet.Unicode)]
- public static extern IntPtr FindWindow(string c, string t);
- [DllImport("user32.dll")]
- public static extern bool GetWindowRect(IntPtr h, out RECT r);
- [StructLayout(LayoutKind.Sequential)]
- public struct RECT { public int L, T, R, B; }
- public static string Get(string title) {
- IntPtr hwnd = FindWindow(null, title);
- if (hwnd == IntPtr.Zero) return "NOT_FOUND";
- RECT r; GetWindowRect(hwnd, out r);
- int w = r.R - r.L; int h = r.B - r.T;
- if (w <= 0 || h <= 0) return "INVALID_SIZE";
- return r.L + "," + r.T + "," + w + "," + h;
- }
-}
-'@
-[WinRect]::Get('${escaped}')
-`
-}
-
-function parseOcrOutput(raw: string, lang: string): OcrResult {
- if (!raw) return emptyResult(lang)
- try {
- const parsed = JSON.parse(raw)
- return {
- text: parsed.text ?? '',
- lines: Array.isArray(parsed.lines)
- ? parsed.lines.map((l: any) => ({
- text: l.text ?? '',
- bounds: {
- x: l.bounds?.x ?? 0,
- y: l.bounds?.y ?? 0,
- w: l.bounds?.w ?? 0,
- h: l.bounds?.h ?? 0,
- },
- }))
- : [],
- language: parsed.language ?? lang,
- }
- } catch {
- return emptyResult(lang)
- }
-}
-
-/**
- * Perform OCR on a screen region.
- * Screenshots the specified rectangle, then runs WinRT OcrEngine.
- *
- * @param x - Left coordinate
- * @param y - Top coordinate
- * @param w - Width in pixels
- * @param h - Height in pixels
- * @param lang - BCP-47 language tag (default 'en-US'). Confirmed: 'en-US', 'zh-Hans-CN'
- */
-export async function ocrRegion(
- x: number,
- y: number,
- w: number,
- h: number,
- lang?: string,
-): Promise {
- const language = lang ?? 'en-US'
- if (w <= 0 || h <= 0) return emptyResult(language)
-
- try {
- const script = buildOcrRegionScript(x, y, w, h, language)
- const raw = runPs(script)
- return parseOcrOutput(raw, language)
- } catch {
- return emptyResult(language)
- }
-}
-
-/**
- * Perform OCR on a specific window by its title.
- * Gets the window rect, then delegates to ocrRegion.
- *
- * @param windowTitle - Exact window title to find via FindWindow
- * @param lang - BCP-47 language tag (default 'en-US')
- */
-export async function ocrWindow(
- windowTitle: string,
- lang?: string,
-): Promise {
- const language = lang ?? 'en-US'
-
- try {
- const rectScript = buildGetWindowRectScript(windowTitle)
- const raw = runPs(rectScript)
- const trimmed = raw.trim()
-
- if (!trimmed || trimmed === 'NOT_FOUND' || trimmed === 'INVALID_SIZE') {
- return emptyResult(language)
- }
-
- const parts = trimmed.split(',')
- if (parts.length !== 4) return emptyResult(language)
-
- const [x, y, w, h] = parts.map(Number)
- if (!w || !h) return emptyResult(language)
-
- return ocrRegion(x, y, w, h, lang)
- } catch {
- return emptyResult(language)
- }
-}
diff --git a/src/utils/deepLink/src/services/analytics/growthbook.ts b/src/utils/deepLink/src/services/analytics/growthbook.ts
deleted file mode 100644
index e380906ea..000000000
--- a/src/utils/deepLink/src/services/analytics/growthbook.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getFeatureValue_CACHED_MAY_BE_STALE = any;
diff --git a/src/utils/deepLink/src/services/analytics/index.ts b/src/utils/deepLink/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/utils/deepLink/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/utils/hooks/src/entrypoints/agentSdkTypes.ts b/src/utils/hooks/src/entrypoints/agentSdkTypes.ts
deleted file mode 100644
index 8dbc64c4c..000000000
--- a/src/utils/hooks/src/entrypoints/agentSdkTypes.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type HookEvent = any;
-export type AsyncHookJSONOutput = any;
-export type SyncHookJSONOutput = any;
-export type HOOK_EVENTS = any;
diff --git a/src/utils/hooks/src/entrypoints/sdk/coreTypes.ts b/src/utils/hooks/src/entrypoints/sdk/coreTypes.ts
deleted file mode 100644
index 263795d50..000000000
--- a/src/utils/hooks/src/entrypoints/sdk/coreTypes.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type HOOK_EVENTS = any;
diff --git a/src/utils/hooks/src/state/AppState.ts b/src/utils/hooks/src/state/AppState.ts
deleted file mode 100644
index caf2928ae..000000000
--- a/src/utils/hooks/src/state/AppState.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AppState = any;
diff --git a/src/utils/hooks/src/types/message.ts b/src/utils/hooks/src/types/message.ts
deleted file mode 100644
index 585895d8e..000000000
--- a/src/utils/hooks/src/types/message.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Message = any;
diff --git a/src/utils/messages/src/bootstrap/state.ts b/src/utils/messages/src/bootstrap/state.ts
deleted file mode 100644
index 9acff45f8..000000000
--- a/src/utils/messages/src/bootstrap/state.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getSessionId = any;
-export type getSdkBetas = any;
diff --git a/src/utils/messages/src/constants/outputStyles.ts b/src/utils/messages/src/constants/outputStyles.ts
deleted file mode 100644
index 42c1edbfa..000000000
--- a/src/utils/messages/src/constants/outputStyles.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type DEFAULT_OUTPUT_STYLE_NAME = any;
diff --git a/src/utils/messages/src/constants/xml.ts b/src/utils/messages/src/constants/xml.ts
deleted file mode 100644
index 4b3d2947b..000000000
--- a/src/utils/messages/src/constants/xml.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type LOCAL_COMMAND_STDERR_TAG = any;
-export type LOCAL_COMMAND_STDOUT_TAG = any;
diff --git a/src/utils/messages/src/entrypoints/agentSdkTypes.ts b/src/utils/messages/src/entrypoints/agentSdkTypes.ts
deleted file mode 100644
index 59874aee6..000000000
--- a/src/utils/messages/src/entrypoints/agentSdkTypes.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SDKAssistantMessage = any;
-export type SDKCompactBoundaryMessage = any;
-export type SDKMessage = any;
-export type SDKRateLimitInfo = any;
-export type ApiKeySource = any;
-export type PermissionMode = any;
diff --git a/src/utils/messages/src/services/claudeAiLimits.ts b/src/utils/messages/src/services/claudeAiLimits.ts
deleted file mode 100644
index 42797958c..000000000
--- a/src/utils/messages/src/services/claudeAiLimits.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ClaudeAILimits = any;
diff --git a/src/utils/messages/src/tools/AgentTool/constants.ts b/src/utils/messages/src/tools/AgentTool/constants.ts
deleted file mode 100644
index 4c701619f..000000000
--- a/src/utils/messages/src/tools/AgentTool/constants.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AGENT_TOOL_NAME = any;
-export type LEGACY_AGENT_TOOL_NAME = any;
diff --git a/src/utils/messages/src/tools/ExitPlanModeTool/constants.ts b/src/utils/messages/src/tools/ExitPlanModeTool/constants.ts
deleted file mode 100644
index f0f7cce97..000000000
--- a/src/utils/messages/src/tools/ExitPlanModeTool/constants.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type EXIT_PLAN_MODE_V2_TOOL_NAME = any;
diff --git a/src/utils/messages/src/types/message.ts b/src/utils/messages/src/types/message.ts
deleted file mode 100644
index 36aae2ce9..000000000
--- a/src/utils/messages/src/types/message.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AssistantMessage = any;
-export type CompactMetadata = any;
-export type Message = any;
diff --git a/src/utils/messages/src/types/utils.ts b/src/utils/messages/src/types/utils.ts
deleted file mode 100644
index b620f7a26..000000000
--- a/src/utils/messages/src/types/utils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type DeepImmutable = any;
diff --git a/src/utils/model/src/bootstrap/state.ts b/src/utils/model/src/bootstrap/state.ts
deleted file mode 100644
index 492747a3f..000000000
--- a/src/utils/model/src/bootstrap/state.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getModelStrings = any;
-export type setModelStrings = any;
diff --git a/src/utils/model/src/services/analytics/growthbook.ts b/src/utils/model/src/services/analytics/growthbook.ts
deleted file mode 100644
index e380906ea..000000000
--- a/src/utils/model/src/services/analytics/growthbook.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getFeatureValue_CACHED_MAY_BE_STALE = any;
diff --git a/src/utils/model/src/services/claudeAiLimits.ts b/src/utils/model/src/services/claudeAiLimits.ts
deleted file mode 100644
index 85b6bcc6a..000000000
--- a/src/utils/model/src/services/claudeAiLimits.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type OverageDisabledReason = any;
diff --git a/src/utils/nativeInstaller/src/services/analytics/index.ts b/src/utils/nativeInstaller/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/utils/nativeInstaller/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/utils/permissions/src/Tool.ts b/src/utils/permissions/src/Tool.ts
deleted file mode 100644
index 9f3d854f0..000000000
--- a/src/utils/permissions/src/Tool.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ToolPermissionContext = any;
-export type Tool = any;
-export type ToolUseContext = any;
diff --git a/src/utils/permissions/src/memdir/paths.ts b/src/utils/permissions/src/memdir/paths.ts
deleted file mode 100644
index 2411afd7f..000000000
--- a/src/utils/permissions/src/memdir/paths.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type hasAutoMemPathOverride = any;
-export type isAutoMemPath = any;
diff --git a/src/utils/permissions/src/services/analytics/growthbook.ts b/src/utils/permissions/src/services/analytics/growthbook.ts
deleted file mode 100644
index 8b70dad0a..000000000
--- a/src/utils/permissions/src/services/analytics/growthbook.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type checkSecurityRestrictionGate = any;
-export type checkStatsigFeatureGate_CACHED_MAY_BE_STALE = any;
-export type getDynamicConfig_BLOCKS_ON_INIT = any;
-export type getFeatureValue_CACHED_MAY_BE_STALE = any;
diff --git a/src/utils/permissions/src/state/AppState.ts b/src/utils/permissions/src/state/AppState.ts
deleted file mode 100644
index 994ed9cc4..000000000
--- a/src/utils/permissions/src/state/AppState.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AppState = any;
-export type useAppState = any;
-export type useAppStateStore = any;
-export type useSetAppState = any;
diff --git a/src/utils/permissions/src/tools/AgentTool/agentMemory.ts b/src/utils/permissions/src/tools/AgentTool/agentMemory.ts
deleted file mode 100644
index 0cd1375dd..000000000
--- a/src/utils/permissions/src/tools/AgentTool/agentMemory.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isAgentMemoryPath = any;
diff --git a/src/utils/permissions/src/tools/FileEditTool/constants.ts b/src/utils/permissions/src/tools/FileEditTool/constants.ts
deleted file mode 100644
index 34c77efd8..000000000
--- a/src/utils/permissions/src/tools/FileEditTool/constants.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type CLAUDE_FOLDER_PERMISSION_PATTERN = any;
-export type FILE_EDIT_TOOL_NAME = any;
-export type GLOBAL_CLAUDE_FOLDER_PERMISSION_PATTERN = any;
diff --git a/src/utils/plugins/src/entrypoints/agentSdkTypes.ts b/src/utils/plugins/src/entrypoints/agentSdkTypes.ts
deleted file mode 100644
index 2ad98a3ad..000000000
--- a/src/utils/plugins/src/entrypoints/agentSdkTypes.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type HookEvent = any;
diff --git a/src/utils/processUserInput/src/Tool.ts b/src/utils/processUserInput/src/Tool.ts
deleted file mode 100644
index 56e1f7036..000000000
--- a/src/utils/processUserInput/src/Tool.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SetToolJSXFn = any;
-export type ToolUseContext = any;
diff --git a/src/utils/processUserInput/src/bootstrap/state.ts b/src/utils/processUserInput/src/bootstrap/state.ts
deleted file mode 100644
index c79c908f1..000000000
--- a/src/utils/processUserInput/src/bootstrap/state.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type setPromptId = any;
diff --git a/src/utils/processUserInput/src/commands.ts b/src/utils/processUserInput/src/commands.ts
deleted file mode 100644
index f8826ed74..000000000
--- a/src/utils/processUserInput/src/commands.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type builtInCommandNames = any;
-export type Command = any;
-export type CommandBase = any;
-export type findCommand = any;
-export type getCommand = any;
-export type getCommandName = any;
-export type hasCommand = any;
-export type PromptCommand = any;
diff --git a/src/utils/processUserInput/src/components/BashModeProgress.ts b/src/utils/processUserInput/src/components/BashModeProgress.ts
deleted file mode 100644
index c1db5a924..000000000
--- a/src/utils/processUserInput/src/components/BashModeProgress.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type BashModeProgress = any;
diff --git a/src/utils/processUserInput/src/constants/messages.ts b/src/utils/processUserInput/src/constants/messages.ts
deleted file mode 100644
index 7c5ff73d9..000000000
--- a/src/utils/processUserInput/src/constants/messages.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type NO_CONTENT_MESSAGE = any;
diff --git a/src/utils/processUserInput/src/constants/querySource.ts b/src/utils/processUserInput/src/constants/querySource.ts
deleted file mode 100644
index 61a17200d..000000000
--- a/src/utils/processUserInput/src/constants/querySource.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type QuerySource = any;
diff --git a/src/utils/processUserInput/src/services/analytics/index.ts b/src/utils/processUserInput/src/services/analytics/index.ts
deleted file mode 100644
index 60402f927..000000000
--- a/src/utils/processUserInput/src/services/analytics/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logEvent = any;
diff --git a/src/utils/processUserInput/src/tools/BashTool/BashTool.ts b/src/utils/processUserInput/src/tools/BashTool/BashTool.ts
deleted file mode 100644
index 7a3ea3cc5..000000000
--- a/src/utils/processUserInput/src/tools/BashTool/BashTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type BashTool = any;
diff --git a/src/utils/processUserInput/src/types/message.ts b/src/utils/processUserInput/src/types/message.ts
deleted file mode 100644
index ddb10eb20..000000000
--- a/src/utils/processUserInput/src/types/message.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AttachmentMessage = any;
-export type SystemMessage = any;
-export type UserMessage = any;
-export type AssistantMessage = any;
-export type Message = any;
-export type NormalizedUserMessage = any;
-export type ProgressMessage = any;
diff --git a/src/utils/processUserInput/src/types/tools.ts b/src/utils/processUserInput/src/types/tools.ts
deleted file mode 100644
index df558fc7f..000000000
--- a/src/utils/processUserInput/src/types/tools.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ShellProgress = any;
diff --git a/src/utils/processUserInput/src/utils/messages.ts b/src/utils/processUserInput/src/utils/messages.ts
deleted file mode 100644
index fcafd5386..000000000
--- a/src/utils/processUserInput/src/utils/messages.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getContentText = any;
diff --git a/src/utils/sandbox/src/tools/BashTool/toolName.ts b/src/utils/sandbox/src/tools/BashTool/toolName.ts
deleted file mode 100644
index 2da8eb7a9..000000000
--- a/src/utils/sandbox/src/tools/BashTool/toolName.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type BASH_TOOL_NAME = any;
diff --git a/src/utils/sandbox/src/tools/FileEditTool/constants.ts b/src/utils/sandbox/src/tools/FileEditTool/constants.ts
deleted file mode 100644
index b455c0655..000000000
--- a/src/utils/sandbox/src/tools/FileEditTool/constants.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FILE_EDIT_TOOL_NAME = any;
diff --git a/src/utils/sandbox/src/tools/FileReadTool/prompt.ts b/src/utils/sandbox/src/tools/FileReadTool/prompt.ts
deleted file mode 100644
index fac6439fc..000000000
--- a/src/utils/sandbox/src/tools/FileReadTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FILE_READ_TOOL_NAME = any;
diff --git a/src/utils/sandbox/src/tools/WebFetchTool/prompt.ts b/src/utils/sandbox/src/tools/WebFetchTool/prompt.ts
deleted file mode 100644
index 63b342a25..000000000
--- a/src/utils/sandbox/src/tools/WebFetchTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type WEB_FETCH_TOOL_NAME = any;
diff --git a/src/utils/secureStorage/src/constants/oauth.ts b/src/utils/secureStorage/src/constants/oauth.ts
deleted file mode 100644
index a1b08933a..000000000
--- a/src/utils/secureStorage/src/constants/oauth.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getOauthConfig = any;
diff --git a/src/utils/settings/src/Tool.ts b/src/utils/settings/src/Tool.ts
deleted file mode 100644
index ed896638d..000000000
--- a/src/utils/settings/src/Tool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ValidationResult = any;
diff --git a/src/utils/settings/src/services/mcp/types.ts b/src/utils/settings/src/services/mcp/types.ts
deleted file mode 100644
index f604edd2e..000000000
--- a/src/utils/settings/src/services/mcp/types.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ConfigScope = any;
diff --git a/src/utils/src/bootstrap/state.ts b/src/utils/src/bootstrap/state.ts
deleted file mode 100644
index 7c1a523bf..000000000
--- a/src/utils/src/bootstrap/state.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getOriginalCwd = any;
-export type getSessionId = any;
-export type getIsNonInteractiveSession = any;
-export type isSessionPersistenceDisabled = any;
diff --git a/src/utils/src/constants/oauth.ts b/src/utils/src/constants/oauth.ts
deleted file mode 100644
index 4a2c8878d..000000000
--- a/src/utils/src/constants/oauth.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getOauthConfig = any;
-export type OAUTH_BETA_HEADER = any;
-export type CLAUDE_AI_PROFILE_SCOPE = any;
diff --git a/src/utils/src/constants/prompts.ts b/src/utils/src/constants/prompts.ts
deleted file mode 100644
index 5f6f23012..000000000
--- a/src/utils/src/constants/prompts.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getSystemPrompt = any;
-export type SYSTEM_PROMPT_DYNAMIC_BOUNDARY = any;
diff --git a/src/utils/src/constants/querySource.ts b/src/utils/src/constants/querySource.ts
deleted file mode 100644
index 61a17200d..000000000
--- a/src/utils/src/constants/querySource.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type QuerySource = any;
diff --git a/src/utils/src/context.ts b/src/utils/src/context.ts
deleted file mode 100644
index f303aa8c4..000000000
--- a/src/utils/src/context.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getSystemContext = any;
-export type getUserContext = any;
diff --git a/src/utils/src/entrypoints/agentSdkTypes.ts b/src/utils/src/entrypoints/agentSdkTypes.ts
deleted file mode 100644
index 982295636..000000000
--- a/src/utils/src/entrypoints/agentSdkTypes.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ExitReason = any;
-export type HookEvent = any;
-export type SDKAssistantMessageError = any;
-export type ModelUsage = any;
-export type SDKMessage = any;
-export type SyncHookJSONOutput = any;
-export type HookInput = any;
-export type HookJSONOutput = any;
-export type NotificationHookInput = any;
-export type PostToolUseHookInput = any;
-export type PostToolUseFailureHookInput = any;
-export type PermissionDeniedHookInput = any;
-export type PreCompactHookInput = any;
-export type PostCompactHookInput = any;
-export type PreToolUseHookInput = any;
-export type SessionStartHookInput = any;
-export type SessionEndHookInput = any;
-export type SetupHookInput = any;
-export type StopHookInput = any;
-export type StopFailureHookInput = any;
-export type SubagentStartHookInput = any;
-export type SubagentStopHookInput = any;
-export type TeammateIdleHookInput = any;
-export type TaskCreatedHookInput = any;
-export type TaskCompletedHookInput = any;
-export type ConfigChangeHookInput = any;
-export type CwdChangedHookInput = any;
-export type FileChangedHookInput = any;
-export type InstructionsLoadedHookInput = any;
-export type UserPromptSubmitHookInput = any;
-export type PermissionRequestHookInput = any;
-export type ElicitationHookInput = any;
-export type ElicitationResultHookInput = any;
-export type PermissionUpdate = any;
-export type AsyncHookJSONOutput = any;
-export type SDKAssistantMessage = any;
diff --git a/src/utils/src/entrypoints/sdk/controlTypes.ts b/src/utils/src/entrypoints/sdk/controlTypes.ts
deleted file mode 100644
index bd1b0590d..000000000
--- a/src/utils/src/entrypoints/sdk/controlTypes.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type StdoutMessage = any;
diff --git a/src/utils/src/entrypoints/sdk/runtimeTypes.ts b/src/utils/src/entrypoints/sdk/runtimeTypes.ts
deleted file mode 100644
index 9ce95c99b..000000000
--- a/src/utils/src/entrypoints/sdk/runtimeTypes.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type EffortLevel = 'low' | 'medium' | 'high' | 'max';
diff --git a/src/utils/src/services/analytics/config.ts b/src/utils/src/services/analytics/config.ts
deleted file mode 100644
index a74c40666..000000000
--- a/src/utils/src/services/analytics/config.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isAnalyticsDisabled = any;
diff --git a/src/utils/src/services/analytics/growthbook.ts b/src/utils/src/services/analytics/growthbook.ts
deleted file mode 100644
index 5b9ce0380..000000000
--- a/src/utils/src/services/analytics/growthbook.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type checkGate_CACHED_OR_BLOCKING = any;
-export type getFeatureValue_CACHED_MAY_BE_STALE = any;
-export type checkStatsigFeatureGate_CACHED_MAY_BE_STALE = any;
-export type getDynamicConfig_BLOCKS_ON_INIT = any;
diff --git a/src/utils/src/services/analytics/index.ts b/src/utils/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/utils/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/utils/src/services/analytics/metadata.ts b/src/utils/src/services/analytics/metadata.ts
deleted file mode 100644
index b00cab5f1..000000000
--- a/src/utils/src/services/analytics/metadata.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type sanitizeToolNameForAnalytics = any;
diff --git a/src/utils/src/services/compact/microCompact.ts b/src/utils/src/services/compact/microCompact.ts
deleted file mode 100644
index 26c0c27cf..000000000
--- a/src/utils/src/services/compact/microCompact.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type microcompactMessages = any;
diff --git a/src/utils/src/services/mcp/client.ts b/src/utils/src/services/mcp/client.ts
deleted file mode 100644
index 65f6d1153..000000000
--- a/src/utils/src/services/mcp/client.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type prefetchAllMcpResources = any;
diff --git a/src/utils/src/services/mcp/types.ts b/src/utils/src/services/mcp/types.ts
deleted file mode 100644
index 8d1c88e90..000000000
--- a/src/utils/src/services/mcp/types.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ScopedMcpServerConfig = any;
diff --git a/src/utils/src/services/mcp/vscodeSdkMcp.ts b/src/utils/src/services/mcp/vscodeSdkMcp.ts
deleted file mode 100644
index ac040b3c9..000000000
--- a/src/utils/src/services/mcp/vscodeSdkMcp.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type notifyVscodeFileUpdated = any;
diff --git a/src/utils/src/services/policyLimits/index.ts b/src/utils/src/services/policyLimits/index.ts
deleted file mode 100644
index 887817d1a..000000000
--- a/src/utils/src/services/policyLimits/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type isPolicyAllowed = any;
diff --git a/src/utils/src/tools.ts b/src/utils/src/tools.ts
deleted file mode 100644
index f9dcbf2e5..000000000
--- a/src/utils/src/tools.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getTools = any;
diff --git a/src/utils/src/tools/AgentTool/built-in/exploreAgent.ts b/src/utils/src/tools/AgentTool/built-in/exploreAgent.ts
deleted file mode 100644
index 22214f18c..000000000
--- a/src/utils/src/tools/AgentTool/built-in/exploreAgent.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type EXPLORE_AGENT = any;
diff --git a/src/utils/src/tools/AgentTool/built-in/planAgent.ts b/src/utils/src/tools/AgentTool/built-in/planAgent.ts
deleted file mode 100644
index 6ff4323b2..000000000
--- a/src/utils/src/tools/AgentTool/built-in/planAgent.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type PLAN_AGENT = any;
diff --git a/src/utils/src/tools/AgentTool/builtInAgents.ts b/src/utils/src/tools/AgentTool/builtInAgents.ts
deleted file mode 100644
index 8358c0b6b..000000000
--- a/src/utils/src/tools/AgentTool/builtInAgents.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type areExplorePlanAgentsEnabled = any;
diff --git a/src/utils/src/tools/AgentTool/constants.ts b/src/utils/src/tools/AgentTool/constants.ts
deleted file mode 100644
index c5969e5de..000000000
--- a/src/utils/src/tools/AgentTool/constants.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AGENT_TOOL_NAME = any;
diff --git a/src/utils/src/tools/AskUserQuestionTool/prompt.ts b/src/utils/src/tools/AskUserQuestionTool/prompt.ts
deleted file mode 100644
index 93098f1a8..000000000
--- a/src/utils/src/tools/AskUserQuestionTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ASK_USER_QUESTION_TOOL_NAME = any;
diff --git a/src/utils/src/tools/BashTool/BashTool.ts b/src/utils/src/tools/BashTool/BashTool.ts
deleted file mode 100644
index 7a3ea3cc5..000000000
--- a/src/utils/src/tools/BashTool/BashTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type BashTool = any;
diff --git a/src/utils/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts b/src/utils/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts
deleted file mode 100644
index f9708d2b3..000000000
--- a/src/utils/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type ExitPlanModeV2Tool = any;
diff --git a/src/utils/src/tools/FileEditTool/FileEditTool.ts b/src/utils/src/tools/FileEditTool/FileEditTool.ts
deleted file mode 100644
index 0d3bc60eb..000000000
--- a/src/utils/src/tools/FileEditTool/FileEditTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FileEditTool = any;
diff --git a/src/utils/src/tools/FileEditTool/constants.ts b/src/utils/src/tools/FileEditTool/constants.ts
deleted file mode 100644
index b455c0655..000000000
--- a/src/utils/src/tools/FileEditTool/constants.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FILE_EDIT_TOOL_NAME = any;
diff --git a/src/utils/src/tools/FileEditTool/utils.ts b/src/utils/src/tools/FileEditTool/utils.ts
deleted file mode 100644
index 5a2f3c0af..000000000
--- a/src/utils/src/tools/FileEditTool/utils.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type normalizeFileEditInput = any;
-export type stripTrailingWhitespace = any;
-export type getSnippetForTwoFileDiff = any;
diff --git a/src/utils/src/tools/FileReadTool/limits.ts b/src/utils/src/tools/FileReadTool/limits.ts
deleted file mode 100644
index a094e85b8..000000000
--- a/src/utils/src/tools/FileReadTool/limits.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getDefaultFileReadingLimits = any;
diff --git a/src/utils/src/tools/FileReadTool/prompt.ts b/src/utils/src/tools/FileReadTool/prompt.ts
deleted file mode 100644
index a8a0962eb..000000000
--- a/src/utils/src/tools/FileReadTool/prompt.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FILE_READ_TOOL_NAME = any;
-export type MAX_LINES_TO_READ = any;
diff --git a/src/utils/src/tools/FileWriteTool/FileWriteTool.ts b/src/utils/src/tools/FileWriteTool/FileWriteTool.ts
deleted file mode 100644
index 9417a7a94..000000000
--- a/src/utils/src/tools/FileWriteTool/FileWriteTool.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FileWriteTool = any;
diff --git a/src/utils/src/tools/FileWriteTool/prompt.ts b/src/utils/src/tools/FileWriteTool/prompt.ts
deleted file mode 100644
index e69299d74..000000000
--- a/src/utils/src/tools/FileWriteTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type FILE_WRITE_TOOL_NAME = any;
diff --git a/src/utils/src/tools/GlobTool/prompt.ts b/src/utils/src/tools/GlobTool/prompt.ts
deleted file mode 100644
index 060caf29c..000000000
--- a/src/utils/src/tools/GlobTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type GLOB_TOOL_NAME = any;
diff --git a/src/utils/src/tools/GrepTool/prompt.ts b/src/utils/src/tools/GrepTool/prompt.ts
deleted file mode 100644
index 08b8a8d29..000000000
--- a/src/utils/src/tools/GrepTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type GREP_TOOL_NAME = any;
diff --git a/src/utils/src/tools/LSPTool/prompt.ts b/src/utils/src/tools/LSPTool/prompt.ts
deleted file mode 100644
index 9be378e3c..000000000
--- a/src/utils/src/tools/LSPTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type LSP_TOOL_NAME = any;
diff --git a/src/utils/src/tools/ListMcpResourcesTool/prompt.ts b/src/utils/src/tools/ListMcpResourcesTool/prompt.ts
deleted file mode 100644
index 987c4a383..000000000
--- a/src/utils/src/tools/ListMcpResourcesTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type LIST_MCP_RESOURCES_TOOL_NAME = any;
diff --git a/src/utils/src/tools/NotebookEditTool/constants.ts b/src/utils/src/tools/NotebookEditTool/constants.ts
deleted file mode 100644
index 6c6c94bad..000000000
--- a/src/utils/src/tools/NotebookEditTool/constants.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type NOTEBOOK_EDIT_TOOL_NAME = any;
diff --git a/src/utils/src/tools/TaskStopTool/prompt.ts b/src/utils/src/tools/TaskStopTool/prompt.ts
deleted file mode 100644
index 28c2e71db..000000000
--- a/src/utils/src/tools/TaskStopTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type TASK_STOP_TOOL_NAME = any;
diff --git a/src/utils/src/tools/WebSearchTool/prompt.ts b/src/utils/src/tools/WebSearchTool/prompt.ts
deleted file mode 100644
index 38871a0ba..000000000
--- a/src/utils/src/tools/WebSearchTool/prompt.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type WEB_SEARCH_TOOL_NAME = any;
diff --git a/src/utils/src/types/ids.ts b/src/utils/src/types/ids.ts
deleted file mode 100644
index ba0dcc8a1..000000000
--- a/src/utils/src/types/ids.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AgentId = any;
-export type SessionId = any;
diff --git a/src/utils/src/types/logs.ts b/src/utils/src/types/logs.ts
deleted file mode 100644
index 729b9b474..000000000
--- a/src/utils/src/types/logs.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type LogOption = any;
diff --git a/src/utils/src/types/message.ts b/src/utils/src/types/message.ts
deleted file mode 100644
index b7e8d1779..000000000
--- a/src/utils/src/types/message.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AssistantMessage = any;
-export type AttachmentMessage = any;
-export type SystemFileSnapshotMessage = any;
-export type UserMessage = any;
-export type Message = any;
-export type MessageOrigin = any;
-export type HookResultMessage = any;
diff --git a/src/utils/src/types/textInputTypes.ts b/src/utils/src/types/textInputTypes.ts
deleted file mode 100644
index 976f11a1b..000000000
--- a/src/utils/src/types/textInputTypes.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type QueuedCommand = any;
-export type getImagePasteIds = any;
-export type isValidImagePaste = any;
diff --git a/src/utils/src/types/utils.ts b/src/utils/src/types/utils.ts
deleted file mode 100644
index 96cc5d26d..000000000
--- a/src/utils/src/types/utils.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type Permutations = any;
-export type DeepImmutable = any;
diff --git a/src/utils/src/utils/cwd.ts b/src/utils/src/utils/cwd.ts
deleted file mode 100644
index 76c192ed8..000000000
--- a/src/utils/src/utils/cwd.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getCwd = any;
diff --git a/src/utils/src/utils/messages.ts b/src/utils/src/utils/messages.ts
deleted file mode 100644
index f77394204..000000000
--- a/src/utils/src/utils/messages.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type extractTextContent = any;
diff --git a/src/utils/src/utils/model/modelStrings.ts b/src/utils/src/utils/model/modelStrings.ts
deleted file mode 100644
index 1265ece0e..000000000
--- a/src/utils/src/utils/model/modelStrings.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getModelStrings = any;
diff --git a/src/utils/src/utils/model/providers.ts b/src/utils/src/utils/model/providers.ts
deleted file mode 100644
index df87a41b4..000000000
--- a/src/utils/src/utils/model/providers.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getAPIProvider = any;
diff --git a/src/utils/src/utils/secureStorage/macOsKeychainHelpers.ts b/src/utils/src/utils/secureStorage/macOsKeychainHelpers.ts
deleted file mode 100644
index 9a57f4079..000000000
--- a/src/utils/src/utils/secureStorage/macOsKeychainHelpers.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getMacOsKeychainStorageServiceName = any;
diff --git a/src/utils/src/utils/shell/shellToolUtils.ts b/src/utils/src/utils/shell/shellToolUtils.ts
deleted file mode 100644
index c89fe2ada..000000000
--- a/src/utils/src/utils/shell/shellToolUtils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SHELL_TOOL_NAMES = any;
diff --git a/src/utils/src/utils/stringUtils.ts b/src/utils/src/utils/stringUtils.ts
deleted file mode 100644
index ac925fccf..000000000
--- a/src/utils/src/utils/stringUtils.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type capitalize = any;
diff --git a/src/utils/suggestions/src/components/PromptInput/PromptInputFooterSuggestions.ts b/src/utils/suggestions/src/components/PromptInput/PromptInputFooterSuggestions.ts
deleted file mode 100644
index d0fd674c7..000000000
--- a/src/utils/suggestions/src/components/PromptInput/PromptInputFooterSuggestions.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type SuggestionItem = any;
diff --git a/src/utils/suggestions/src/utils/cwd.ts b/src/utils/suggestions/src/utils/cwd.ts
deleted file mode 100644
index 76c192ed8..000000000
--- a/src/utils/suggestions/src/utils/cwd.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getCwd = any;
diff --git a/src/utils/suggestions/src/utils/fsOperations.ts b/src/utils/suggestions/src/utils/fsOperations.ts
deleted file mode 100644
index d30ccea0a..000000000
--- a/src/utils/suggestions/src/utils/fsOperations.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getFsImplementation = any;
diff --git a/src/utils/suggestions/src/utils/log.ts b/src/utils/suggestions/src/utils/log.ts
deleted file mode 100644
index cf30e90da..000000000
--- a/src/utils/suggestions/src/utils/log.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type logError = any;
diff --git a/src/utils/suggestions/src/utils/path.ts b/src/utils/suggestions/src/utils/path.ts
deleted file mode 100644
index a965844dd..000000000
--- a/src/utils/suggestions/src/utils/path.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type expandPath = any;
diff --git a/src/utils/telemetry/src/bootstrap/state.ts b/src/utils/telemetry/src/bootstrap/state.ts
deleted file mode 100644
index 88e65b64f..000000000
--- a/src/utils/telemetry/src/bootstrap/state.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getEventLogger = any;
-export type getPromptId = any;
-export type getLoggerProvider = any;
-export type getMeterProvider = any;
-export type getTracerProvider = any;
-export type setEventLogger = any;
-export type setLoggerProvider = any;
-export type setMeterProvider = any;
-export type setTracerProvider = any;
diff --git a/src/utils/telemetry/src/services/api/metricsOptOut.ts b/src/utils/telemetry/src/services/api/metricsOptOut.ts
deleted file mode 100644
index abe38aa99..000000000
--- a/src/utils/telemetry/src/services/api/metricsOptOut.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type checkMetricsEnabled = any;
diff --git a/src/utils/telemetry/src/utils/auth.ts b/src/utils/telemetry/src/utils/auth.ts
deleted file mode 100644
index 250437a55..000000000
--- a/src/utils/telemetry/src/utils/auth.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getOtelHeadersFromHelper = any;
-export type getSubscriptionType = any;
-export type is1PApiCustomer = any;
-export type isClaudeAISubscriber = any;
diff --git a/src/utils/telemetry/src/utils/platform.ts b/src/utils/telemetry/src/utils/platform.ts
deleted file mode 100644
index da6332eed..000000000
--- a/src/utils/telemetry/src/utils/platform.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getPlatform = any;
-export type getWslVersion = any;
diff --git a/src/utils/teleport/src/constants/oauth.ts b/src/utils/teleport/src/constants/oauth.ts
deleted file mode 100644
index a1b08933a..000000000
--- a/src/utils/teleport/src/constants/oauth.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getOauthConfig = any;
diff --git a/src/utils/teleport/src/services/analytics/index.ts b/src/utils/teleport/src/services/analytics/index.ts
deleted file mode 100644
index 142e7b6f5..000000000
--- a/src/utils/teleport/src/services/analytics/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = any;
-export type logEvent = any;
diff --git a/src/utils/teleport/src/services/oauth/client.ts b/src/utils/teleport/src/services/oauth/client.ts
deleted file mode 100644
index 5a7055fbe..000000000
--- a/src/utils/teleport/src/services/oauth/client.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// Auto-generated type stub — replace with real implementation
-export type getOrganizationUUID = any;