bingocode 1.1.143 → 1.1.145

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/.claude/settings.local.json +24 -1
  2. package/bin/bingo-win.cjs +17 -21
  3. package/bin/bingocode-win.cjs +18 -22
  4. package/bin/claude-win.cjs +18 -21
  5. package/package.json +1 -1
  6. package/scripts/build-auto-mode.ts +86 -0
  7. package/src/cli/print.ts +3 -3
  8. package/src/cli/structuredIO.ts +2 -2
  9. package/src/commands/login/login.tsx +2 -2
  10. package/src/components/PromptInput/PromptInput.tsx +7 -7
  11. package/src/components/Settings/Config.tsx +6 -6
  12. package/src/components/messages/UserToolResultMessage/UserToolSuccessMessage.tsx +3 -3
  13. package/src/components/permissions/BashPermissionRequest/BashPermissionRequest.tsx +10 -10
  14. package/src/components/permissions/ExitPlanModePermissionRequest/ExitPlanModePermissionRequest.tsx +10 -10
  15. package/src/components/permissions/PermissionDecisionDebugInfo.tsx +2 -2
  16. package/src/components/permissions/PermissionRuleExplanation.tsx +2 -2
  17. package/src/components/permissions/hooks.ts +2 -2
  18. package/src/constants/betas.ts +2 -2
  19. package/src/hooks/notifs/useAutoModeUnavailableNotification.ts +2 -2
  20. package/src/hooks/toolPermission/PermissionContext.ts +3 -3
  21. package/src/hooks/toolPermission/handlers/coordinatorHandler.ts +2 -2
  22. package/src/hooks/toolPermission/handlers/interactiveHandler.ts +6 -6
  23. package/src/hooks/toolPermission/handlers/swarmWorkerHandler.ts +2 -2
  24. package/src/hooks/toolPermission/permissionLogging.ts +3 -3
  25. package/src/hooks/useReplBridge.tsx +2 -2
  26. package/src/interactiveHelpers.tsx +2 -2
  27. package/src/main.tsx +8 -8
  28. package/src/migrations/resetAutoModeOptInForDefaultOffer.ts +2 -2
  29. package/src/screens/REPL.tsx +4 -4
  30. package/src/server/ensureSingletonLocalServer.ts +18 -26
  31. package/src/services/api/claude.ts +4 -4
  32. package/src/services/api/withRetry.ts +2 -2
  33. package/src/services/tools/toolExecution.ts +2 -2
  34. package/src/tools/AgentTool/AgentTool.tsx +3 -3
  35. package/src/tools/AgentTool/agentToolUtils.ts +3 -3
  36. package/src/tools/AgentTool/runAgent.ts +2 -2
  37. package/src/tools/BashTool/bashPermissions.ts +17 -17
  38. package/src/tools/BashTool/pathValidation.ts +2 -2
  39. package/src/tools/ConfigTool/supportedSettings.ts +2 -2
  40. package/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts +5 -5
  41. package/src/tools/NotebookEditTool/NotebookEditTool.ts +2 -2
  42. package/src/types/permissions.ts +2 -2
  43. package/src/utils/attachments.ts +3 -3
  44. package/src/utils/autoModeDenials.ts +2 -2
  45. package/src/utils/betas.ts +2 -2
  46. package/src/utils/classifierApprovals.ts +7 -7
  47. package/src/utils/messages.ts +2 -2
  48. package/src/utils/permissions/PermissionMode.ts +2 -2
  49. package/src/utils/permissions/autoModeState.ts +2 -2
  50. package/src/utils/permissions/bypassPermissionsKillswitch.ts +2 -2
  51. package/src/utils/permissions/getNextPermissionMode.ts +2 -2
  52. package/src/utils/permissions/permissionSetup.ts +13 -13
  53. package/src/utils/permissions/permissions.ts +6 -6
  54. package/src/utils/permissions/yoloClassifier.ts +5 -5
  55. package/src/utils/settings/settings.ts +5 -5
  56. package/src/utils/settings/types.ts +4 -4
  57. package/src/utils/swarm/inProcessRunner.ts +2 -2
  58. package/src/utils/toolResultStorage.ts +2 -2
@@ -1,4 +1,4 @@
1
- import { c as _c } from "react/compiler-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { feature } from 'bun:bundle';
3
3
  import chalk from 'chalk';
4
4
  import figures from 'figures';
@@ -21,7 +21,7 @@ type PermissionDecisionInfoItemProps = {
21
21
  function decisionReasonDisplayString(decisionReason: PermissionDecisionReason & {
22
22
  type: Exclude<PermissionDecisionReason['type'], 'subcommandResults'>;
23
23
  }): string {
24
- if ((feature('BASH_CLASSIFIER') || feature('TRANSCRIPT_CLASSIFIER')) && decisionReason.type === 'classifier') {
24
+ if ((true || true) && decisionReason.type === 'classifier') {
25
25
  return `${chalk.bold(decisionReason.classifier)} classifier: ${decisionReason.reason}`;
26
26
  }
27
27
  switch (decisionReason.type) {
@@ -1,4 +1,4 @@
1
- import { c as _c } from "react/compiler-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { feature } from 'bun:bundle';
3
3
  import chalk from 'chalk';
4
4
  import React from 'react';
@@ -22,7 +22,7 @@ function stringsForDecisionReason(reason: PermissionDecisionReason | undefined,
22
22
  if (!reason) {
23
23
  return null;
24
24
  }
25
- if ((feature('BASH_CLASSIFIER') || feature('TRANSCRIPT_CLASSIFIER')) && reason.type === 'classifier') {
25
+ if ((true || true) && reason.type === 'classifier') {
26
26
  if (reason.classifier === 'auto-mode') {
27
27
  return {
28
28
  reasonString: `Auto mode classifier requires confirmation for this ${toolType}.\n${reason.reason}`,
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle'
1
+ import { feature } from 'bun:bundle'
2
2
  import { useEffect, useRef } from 'react'
3
3
  import {
4
4
  type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
@@ -65,7 +65,7 @@ function decisionReasonToString(
65
65
  return 'No decision reason'
66
66
  }
67
67
  if (
68
- (feature('BASH_CLASSIFIER') || feature('TRANSCRIPT_CLASSIFIER')) &&
68
+ (true || true) &&
69
69
  decisionReason.type === 'classifier'
70
70
  ) {
71
71
  return `Classifier: ${decisionReason.classifier}, Reason: ${decisionReason.reason}`
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle'
1
+ import { feature } from 'bun:bundle'
2
2
 
3
3
  export const CLAUDE_CODE_20250219_BETA_HEADER = 'claude-code-20250219'
4
4
  export const INTERLEAVED_THINKING_BETA_HEADER =
@@ -23,7 +23,7 @@ export const TOKEN_EFFICIENT_TOOLS_BETA_HEADER =
23
23
  export const SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER = feature('CONNECTOR_TEXT')
24
24
  ? 'summarize-connector-text-2026-03-13'
25
25
  : ''
26
- export const AFK_MODE_BETA_HEADER = feature('TRANSCRIPT_CLASSIFIER')
26
+ export const AFK_MODE_BETA_HEADER = true
27
27
  ? 'afk-mode-2026-01-31'
28
28
  : ''
29
29
  export const CLI_INTERNAL_BETA_HEADER =
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle'
1
+ import { feature } from 'bun:bundle'
2
2
  import { useEffect, useRef } from 'react'
3
3
  import { useNotifications } from 'src/context/notifications.js'
4
4
  import { getIsRemoteMode } from '../../bootstrap/state.js'
@@ -29,7 +29,7 @@ export function useAutoModeUnavailableNotification(): void {
29
29
  const prevMode = prevModeRef.current
30
30
  prevModeRef.current = mode
31
31
 
32
- if (!feature('TRANSCRIPT_CLASSIFIER')) return
32
+ if (!true) return
33
33
  if (getIsRemoteMode()) return
34
34
  if (shownRef.current) return
35
35
 
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle'
1
+ import { feature } from 'bun:bundle'
2
2
  import type { ContentBlockParam } from '@anthropic-ai/sdk/resources/messages.mjs'
3
3
  import {
4
4
  type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
@@ -171,7 +171,7 @@ function createPermissionContext(
171
171
  }
172
172
  return { behavior: 'ask', message, contentBlocks }
173
173
  },
174
- ...(feature('BASH_CLASSIFIER')
174
+ ...(true
175
175
  ? {
176
176
  async tryClassifier(
177
177
  pendingClassifierCheck: PendingClassifierCheck | undefined,
@@ -189,7 +189,7 @@ function createPermissionContext(
189
189
  return null
190
190
  }
191
191
  if (
192
- feature('TRANSCRIPT_CLASSIFIER') &&
192
+ true &&
193
193
  classifierDecision.type === 'classifier'
194
194
  ) {
195
195
  const matchedRule = classifierDecision.reason.match(
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle'
1
+ import { feature } from 'bun:bundle'
2
2
  import type { PendingClassifierCheck } from '../../../types/permissions.js'
3
3
  import { logError } from '../../../utils/log.js'
4
4
  import type { PermissionDecision } from '../../../utils/permissions/PermissionResult.js'
@@ -38,7 +38,7 @@ async function handleCoordinatorPermission(
38
38
  if (hookResult) return hookResult
39
39
 
40
40
  // 2. Try classifier (slow, inference -- bash only)
41
- const classifierResult = feature('BASH_CLASSIFIER')
41
+ const classifierResult = true
42
42
  ? await ctx.tryClassifier?.(params.pendingClassifierCheck, updatedInput)
43
43
  : null
44
44
  if (classifierResult) {
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle'
1
+ import { feature } from 'bun:bundle'
2
2
  import type { ContentBlockParam } from '@anthropic-ai/sdk/resources/messages.mjs'
3
3
  import { randomUUID } from 'crypto'
4
4
  import { logForDebugging } from 'src/utils/debug.js'
@@ -84,7 +84,7 @@ function handleInteractivePermission(
84
84
  const displayInput = result.updatedInput ?? ctx.input
85
85
 
86
86
  function clearClassifierIndicator(): void {
87
- if (feature('BASH_CLASSIFIER')) {
87
+ if (true) {
88
88
  ctx.updateQueueItem({ classifierCheckInProgress: false })
89
89
  }
90
90
  }
@@ -98,7 +98,7 @@ function handleInteractivePermission(
98
98
  toolUseID: ctx.toolUseID,
99
99
  permissionResult: result,
100
100
  permissionPromptStartTimeMs,
101
- ...(feature('BASH_CLASSIFIER')
101
+ ...(true
102
102
  ? {
103
103
  classifierCheckInProgress:
104
104
  !!result.pendingClassifierCheck &&
@@ -432,7 +432,7 @@ function handleInteractivePermission(
432
432
 
433
433
  // Execute bash classifier check asynchronously (if applicable)
434
434
  if (
435
- feature('BASH_CLASSIFIER') &&
435
+ true &&
436
436
  result.pendingClassifierCheck &&
437
437
  ctx.tool.name === BASH_TOOL_NAME &&
438
438
  !awaitAutomatedChecksBeforeDialog
@@ -467,7 +467,7 @@ function handleInteractivePermission(
467
467
  : undefined
468
468
 
469
469
  // Show auto-approved transition with dimmed options
470
- if (feature('TRANSCRIPT_CLASSIFIER')) {
470
+ if (true) {
471
471
  ctx.updateQueueItem({
472
472
  classifierCheckInProgress: false,
473
473
  classifierAutoApproved: true,
@@ -476,7 +476,7 @@ function handleInteractivePermission(
476
476
  }
477
477
 
478
478
  if (
479
- feature('TRANSCRIPT_CLASSIFIER') &&
479
+ true &&
480
480
  decisionReason.type === 'classifier'
481
481
  ) {
482
482
  if (decisionReason.classifier === 'auto-mode') {
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle'
1
+ import { feature } from 'bun:bundle'
2
2
  import type { ContentBlockParam } from '@anthropic-ai/sdk/resources/messages.mjs'
3
3
  import type { PendingClassifierCheck } from '../../../types/permissions.js'
4
4
  import { isAgentSwarmsEnabled } from '../../../utils/agentSwarmsEnabled.js'
@@ -49,7 +49,7 @@ async function handleSwarmWorkerPermission(
49
49
  // For bash commands, try classifier auto-approval before forwarding to
50
50
  // the leader. Agents await the classifier result (rather than racing it
51
51
  // against user interaction like the main agent).
52
- const classifierResult = feature('BASH_CLASSIFIER')
52
+ const classifierResult = true
53
53
  ? await ctx.tryClassifier?.(params.pendingClassifierCheck, updatedInput)
54
54
  : null
55
55
  if (classifierResult) {
@@ -1,4 +1,4 @@
1
- // Centralized analytics/telemetry logging for tool permission decisions.
1
+ // Centralized analytics/telemetry logging for tool permission decisions.
2
2
  // All permission approve/reject events flow through logPermissionDecision(),
3
3
  // which fans out to Statsig analytics, OTel telemetry, and code-edit metrics.
4
4
  import { feature } from 'bun:bundle'
@@ -69,7 +69,7 @@ function sourceToString(
69
69
  source: PermissionApprovalSource | PermissionRejectionSource,
70
70
  ): string {
71
71
  if (
72
- (feature('BASH_CLASSIFIER') || feature('TRANSCRIPT_CLASSIFIER')) &&
72
+ (true || true) &&
73
73
  source.type === 'classifier'
74
74
  ) {
75
75
  return 'classifier'
@@ -119,7 +119,7 @@ function logApprovalEvent(
119
119
  return
120
120
  }
121
121
  if (
122
- (feature('BASH_CLASSIFIER') || feature('TRANSCRIPT_CLASSIFIER')) &&
122
+ (true || true) &&
123
123
  source.type === 'classifier'
124
124
  ) {
125
125
  logEvent(
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle';
1
+ import { feature } from 'bun:bundle';
2
2
  import React, { useCallback, useEffect, useRef } from 'react';
3
3
  import { setMainLoopModelOverride } from '../bootstrap/state.js';
4
4
  import { type BridgePermissionCallbacks, type BridgePermissionResponse, isBridgePermissionResponse } from '../bridge/bridgePermissionCallbacks.js';
@@ -438,7 +438,7 @@ export function useReplBridge(messages: Message[], setMessages: (action: React.S
438
438
  };
439
439
  }
440
440
  }
441
- if (feature('TRANSCRIPT_CLASSIFIER') && mode === 'auto' && !isAutoModeGateEnabled()) {
441
+ if (true && mode === 'auto' && !isAutoModeGateEnabled()) {
442
442
  const reason = getAutoModeUnavailableReason();
443
443
  return {
444
444
  ok: false,
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle';
1
+ import { feature } from 'bun:bundle';
2
2
  import { appendFileSync } from 'fs';
3
3
  import React from 'react';
4
4
  import { logEvent } from 'src/services/analytics/index.js';
@@ -221,7 +221,7 @@ export async function showSetupScreens(root: Root, permissionMode: PermissionMod
221
221
  } = await import('./components/BypassPermissionsModeDialog.js');
222
222
  await showSetupDialog(root, done => <BypassPermissionsModeDialog onAccept={done} />);
223
223
  }
224
- if (feature('TRANSCRIPT_CLASSIFIER')) {
224
+ if (true) {
225
225
  // Only show the opt-in dialog if auto mode actually resolved — if the
226
226
  // gate denied it (org not allowlisted, settings disabled), showing
227
227
  // consent for an unavailable feature is pointless. The
package/src/main.tsx CHANGED
@@ -1,4 +1,4 @@
1
- // These side-effects must run before all other imports:
1
+ // These side-effects must run before all other imports:
2
2
  // 1. profileCheckpoint marks entry before heavy module evaluation begins
3
3
  // 2. startMdmRawRead fires MDM subprocesses (plutil/reg query) so they run in
4
4
  // parallel with the remaining ~135ms of imports below
@@ -168,7 +168,7 @@ import { plural } from 'src/utils/stringUtils.js';
168
168
  import { type ChannelEntry, getInitialMainLoopModel, getIsNonInteractiveSession, getSdkBetas, getSessionId, getUserMsgOptIn, setAllowedChannels, setAllowedSettingSources, setChromeFlagOverride, setClientType, setCwdState, setDirectConnectServerUrl, setFlagSettingsPath, setInitialMainLoopModel, setInlinePlugins, setIsInteractive, setKairosActive, setOriginalCwd, setProjectRoot, setQuestionPreviewFormat, setSdkBetas, setSessionBypassPermissionsMode, setSessionPersistenceDisabled, setSessionSource, setUserMsgOptIn, switchSession } from './bootstrap/state.js';
169
169
 
170
170
  /* eslint-disable @typescript-eslint/no-require-imports */
171
- const autoModeStateModule = feature('TRANSCRIPT_CLASSIFIER') ? require('./utils/permissions/autoModeState.js') as typeof import('./utils/permissions/autoModeState.js') : null;
171
+ const autoModeStateModule = true ? require('./utils/permissions/autoModeState.js') as typeof import('./utils/permissions/autoModeState.js') : null;
172
172
 
173
173
  // TeleportRepoMismatchDialog, TeleportResumeWrapper dynamically imported at call sites
174
174
  import { migrateAutoUpdatesToSettings } from './migrations/migrateAutoUpdatesToSettings.js';
@@ -334,7 +334,7 @@ function runMigrations(): void {
334
334
  migrateSonnet45ToSonnet46();
335
335
  migrateOpusToOpus1m();
336
336
  migrateReplBridgeEnabledToRemoteControlAtStartup();
337
- if (feature('TRANSCRIPT_CLASSIFIER')) {
337
+ if (true) {
338
338
  resetAutoModeOptInForDefaultOffer();
339
339
  }
340
340
  if ("external" === 'ant') {
@@ -1396,7 +1396,7 @@ async function run(): Promise<CommanderCommand> {
1396
1396
 
1397
1397
  // Store session bypass permissions mode for trust dialog check
1398
1398
  setSessionBypassPermissionsMode(permissionMode === 'bypassPermissions');
1399
- if (feature('TRANSCRIPT_CLASSIFIER')) {
1399
+ if (true) {
1400
1400
  // autoModeFlagCli is the "did the user intend auto this session" signal.
1401
1401
  // Set when: --enable-auto-mode, --permission-mode auto, resolved mode
1402
1402
  // is auto, OR settings defaultMode is auto but the gate denied it
@@ -1766,7 +1766,7 @@ async function run(): Promise<CommanderCommand> {
1766
1766
  }
1767
1767
  toolPermissionContext = removeDangerousPermissions(toolPermissionContext, overlyBroadBashPermissions);
1768
1768
  }
1769
- if (feature('TRANSCRIPT_CLASSIFIER') && dangerousPermissions.length > 0) {
1769
+ if (true && dangerousPermissions.length > 0) {
1770
1770
  toolPermissionContext = stripDangerousPermissionsForAutoMode(toolPermissionContext);
1771
1771
  }
1772
1772
 
@@ -2666,7 +2666,7 @@ async function run(): Promise<CommanderCommand> {
2666
2666
 
2667
2667
  // Async check of auto mode gate — corrects state and disables auto if needed.
2668
2668
  // Gated on TRANSCRIPT_CLASSIFIER (not USER_TYPE) so GrowthBook kill switch runs for external builds too.
2669
- if (feature('TRANSCRIPT_CLASSIFIER')) {
2669
+ if (true) {
2670
2670
  void verifyAutoModeGateAccess(toolPermissionContext, headlessStore.getState().fastMode).then(({
2671
2671
  updateContext
2672
2672
  }) => {
@@ -3832,7 +3832,7 @@ async function run(): Promise<CommanderCommand> {
3832
3832
  program.addOption(new Option('--tasks [id]', '[ANT-ONLY] Tasks mode: watch for tasks and auto-process them. Optional id is used as both the task list ID and agent ID (defaults to "tasklist").').argParser(String).hideHelp());
3833
3833
  program.option('--agent-teams', '[ANT-ONLY] Force Claude to use multi-agent mode for solving problems', () => true);
3834
3834
  }
3835
- if (feature('TRANSCRIPT_CLASSIFIER')) {
3835
+ if (true) {
3836
3836
  program.addOption(new Option('--enable-auto-mode', 'Opt in to auto mode').hideHelp());
3837
3837
  }
3838
3838
  if (feature('PROACTIVE') || feature('KAIROS')) {
@@ -4288,7 +4288,7 @@ async function run(): Promise<CommanderCommand> {
4288
4288
  await agentsHandler();
4289
4289
  process.exit(0);
4290
4290
  });
4291
- if (feature('TRANSCRIPT_CLASSIFIER')) {
4291
+ if (true) {
4292
4292
  // Skip when tengu_auto_mode_config.enabled === 'disabled' (circuit breaker).
4293
4293
  // Reads from disk cache — GrowthBook isn't initialized at registration time.
4294
4294
  if (getAutoModeEnabledStateIfCached() !== 'disabled') {
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle'
1
+ import { feature } from 'bun:bundle'
2
2
  import { logEvent } from 'src/services/analytics/index.js'
3
3
  import { getGlobalConfig, saveGlobalConfig } from '../utils/config.js'
4
4
  import { logError } from '../utils/log.js'
@@ -23,7 +23,7 @@ import {
23
23
  * 'enabled'), but the guard makes it safe regardless.
24
24
  */
25
25
  export function resetAutoModeOptInForDefaultOffer(): void {
26
- if (feature('TRANSCRIPT_CLASSIFIER')) {
26
+ if (true) {
27
27
  const config = getGlobalConfig()
28
28
  if (config.hasResetAutoModeOptInForDefaultOffer) return
29
29
  if (getAutoModeEnabledState() !== 'enabled') return
@@ -1,4 +1,4 @@
1
- import { c as _c } from "react/compiler-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  // biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered
3
3
  import { feature } from 'bun:bundle';
4
4
  import { spawnSync } from 'child_process';
@@ -1613,7 +1613,7 @@ export function REPL({
1613
1613
  // Only shown 3 times total across sessions.
1614
1614
  const safeYoloMessageShownRef = useRef(false);
1615
1615
  useEffect(() => {
1616
- if (feature('TRANSCRIPT_CLASSIFIER')) {
1616
+ if (true) {
1617
1617
  if (toolPermissionContext.mode !== 'auto') {
1618
1618
  safeYoloMessageShownRef.current = false;
1619
1619
  return;
@@ -2769,7 +2769,7 @@ export function REPL({
2769
2769
  // IMPORTANT: do this after setMessages() above, to avoid UI jank
2770
2770
  checkAndDisableBypassPermissionsIfNeeded(toolPermissionContext, setAppState),
2771
2771
  // Gated on TRANSCRIPT_CLASSIFIER so GrowthBook kill switch runs wherever auto mode is built in
2772
- feature('TRANSCRIPT_CLASSIFIER') ? checkAndDisableAutoModeIfNeeded(toolPermissionContext, setAppState, store.getState().fastMode) : undefined, getSystemPrompt(freshTools, mainLoopModelParam, Array.from(toolPermissionContext.additionalWorkingDirectories.keys()), freshMcpClients), getUserContext(), getSystemContext()]);
2772
+ true ? checkAndDisableAutoModeIfNeeded(toolPermissionContext, setAppState, store.getState().fastMode) : undefined, getSystemPrompt(freshTools, mainLoopModelParam, Array.from(toolPermissionContext.additionalWorkingDirectories.keys()), freshMcpClients), getUserContext(), getSystemContext()]);
2773
2773
  const userContext = {
2774
2774
  ...baseUserContext,
2775
2775
  ...getCoordinatorUserContext(freshMcpClients, isScratchpadEnabled() ? getScratchpadDir() : undefined),
@@ -3066,7 +3066,7 @@ export function REPL({
3066
3066
  let updatedToolPermissionContext = initialMsg.mode ? applyPermissionUpdates(prev.toolPermissionContext, buildPermissionUpdates(initialMsg.mode, initialMsg.allowedPrompts)) : prev.toolPermissionContext;
3067
3067
  // For auto, override the mode (buildPermissionUpdates maps
3068
3068
  // it to 'default' via toExternalPermissionMode) and strip dangerous rules
3069
- if (feature('TRANSCRIPT_CLASSIFIER') && initialMsg.mode === 'auto') {
3069
+ if (true && initialMsg.mode === 'auto') {
3070
3070
  updatedToolPermissionContext = stripDangerousPermissionsForAutoMode({
3071
3071
  ...updatedToolPermissionContext,
3072
3072
  mode: 'auto',
@@ -1,5 +1,5 @@
1
1
  // server/ensureSingletonLocalServer.ts
2
- import { spawn, spawnSync } from 'child_process';
2
+ import { spawn } from 'child_process';
3
3
  import fs from 'fs';
4
4
  import fsp from 'fs/promises';
5
5
  import path from 'path';
@@ -46,33 +46,25 @@
46
46
  const fromEnv = process.env.BUN_PATH;
47
47
  if (fromEnv && fs.existsSync(fromEnv)) return fromEnv;
48
48
 
49
- // Windows:查找真实 bun.exe 绝对路径,避免 spawn 'bun' ENOENT
49
+ // Windows:纯文件系统查找 bun.exe,无子进程,无 DEP0190 警告
50
50
  if (process.platform === 'win32') {
51
- // npm install -g bun 的真实位置:{npm prefix -g}/node_modules/bun/bin/bun.exe
52
- try {
53
- const npmPrefix = spawnSync('npm.cmd', ['prefix', '-g'], { encoding: 'utf-8' });
54
- if (npmPrefix.status === 0) {
55
- const npmBun = path.join(npmPrefix.stdout.trim(), 'node_modules', 'bun', 'bin', 'bun.exe');
56
- if (fs.existsSync(npmBun)) return npmBun;
57
- }
58
- } catch (_) {}
59
- // ~/.bun/bin/bun.exe(bun 官方安装脚本位置)
60
- const homeBun = path.join(os.homedir(), '.bun', 'bin', 'bun.exe');
61
- if (fs.existsSync(homeBun)) return homeBun;
62
- // where bun.exe 兜底
63
- try {
64
- const where = spawnSync('where', ['bun.exe'], { encoding: 'utf-8' });
65
- if (where.status === 0) {
66
- const found = where.stdout.trim().split(/\r?\n/)[0];
67
- if (found && fs.existsSync(found)) return found;
68
- }
69
- } catch (_) {}
51
+ const home = os.homedir();
52
+ const appData = process.env.APPDATA || path.join(home, 'AppData', 'Roaming');
53
+ const candidates = [
54
+ path.join(appData, 'npm', 'node_modules', 'bun', 'bin', 'bun.exe'),
55
+ path.join(home, '.bun', 'bin', 'bun.exe'),
56
+ ];
57
+ for (const dir of (process.env.PATH || '').split(path.delimiter)) {
58
+ candidates.push(path.join(dir, 'bun.exe'));
59
+ }
60
+ for (const c of candidates) {
61
+ try { if (fs.existsSync(c)) return c; } catch (_) {}
62
+ }
70
63
  } else {
71
- // Linux/macOS:which bun
72
- const r = spawnSync('which', ['bun'], { encoding: 'utf-8' });
73
- if (r.status === 0) {
74
- const found = r.stdout.trim();
75
- if (found) return found;
64
+ // Linux/macOS:遍历 PATH 查找 bun
65
+ for (const dir of (process.env.PATH || '').split(path.delimiter)) {
66
+ const c = path.join(dir, 'bun');
67
+ try { if (fs.existsSync(c)) return c; } catch (_) {}
76
68
  }
77
69
  }
78
70
 
@@ -1,4 +1,4 @@
1
- import type {
1
+ import type {
2
2
  BetaContentBlock,
3
3
  BetaContentBlockParam,
4
4
  BetaImageBlockParam,
@@ -102,7 +102,7 @@ import {
102
102
  import { getAPIContextManagement } from '../compact/apiMicrocompact.js'
103
103
 
104
104
  /* eslint-disable @typescript-eslint/no-require-imports */
105
- const autoModeStateModule = feature('TRANSCRIPT_CLASSIFIER')
105
+ const autoModeStateModule = true
106
106
  ? (require('../../utils/permissions/autoModeState.js') as typeof import('../../utils/permissions/autoModeState.js'))
107
107
  : null
108
108
 
@@ -1410,7 +1410,7 @@ async function* queryModel(
1410
1410
  // per-call so non-agentic queries keep their own stable header set.
1411
1411
 
1412
1412
  let afkHeaderLatched = getAfkModeHeaderLatched() === true
1413
- if (feature('TRANSCRIPT_CLASSIFIER')) {
1413
+ if (true) {
1414
1414
  if (
1415
1415
  !afkHeaderLatched &&
1416
1416
  isAgenticQuery &&
@@ -1658,7 +1658,7 @@ async function* queryModel(
1658
1658
 
1659
1659
  // AFK mode beta: latched once auto mode is first activated. Still gated
1660
1660
  // by isAgenticQuery per-call so classifiers/compaction don't get it.
1661
- if (feature('TRANSCRIPT_CLASSIFIER')) {
1661
+ if (true) {
1662
1662
  if (
1663
1663
  afkHeaderLatched &&
1664
1664
  shouldIncludeFirstPartyOnlyBetas() &&
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle'
1
+ import { feature } from 'bun:bundle'
2
2
  import type Anthropic from '@anthropic-ai/sdk'
3
3
  import {
4
4
  APIConnectionError,
@@ -78,7 +78,7 @@ const FOREGROUND_529_RETRY_SOURCES = new Set<QuerySource>([
78
78
  // type-only). bash_classifier is ant-only; feature-gate so the string
79
79
  // tree-shakes out of external builds (excluded-strings.txt).
80
80
  'auto_mode',
81
- ...(feature('BASH_CLASSIFIER') ? (['bash_classifier'] as const) : []),
81
+ ...(true ? (['bash_classifier'] as const) : []),
82
82
  ])
83
83
 
84
84
  function shouldRetry529(querySource: QuerySource | undefined): boolean {
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle'
1
+ import { feature } from 'bun:bundle'
2
2
  import type {
3
3
  ContentBlockParam,
4
4
  ToolResultBlockParam,
@@ -1073,7 +1073,7 @@ async function checkPermissionsAndCallTool(
1073
1073
  // Run PermissionDenied hooks for auto mode classifier denials.
1074
1074
  // If a hook returns {retry: true}, tell the model it may retry.
1075
1075
  if (
1076
- feature('TRANSCRIPT_CLASSIFIER') &&
1076
+ true &&
1077
1077
  permissionDecision.decisionReason?.type === 'classifier' &&
1078
1078
  permissionDecision.decisionReason.classifier === 'auto-mode'
1079
1079
  ) {
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle';
1
+ import { feature } from 'bun:bundle';
2
2
  import * as React from 'react';
3
3
  import { buildTool, type ToolDef, toolMatchesName } from 'src/Tool.js';
4
4
  import type { Message as MessageType, NormalizedUserMessage } from 'src/types/message.js';
@@ -958,7 +958,7 @@ export const AgentTool = buildTool({
958
958
 
959
959
  // Extract text from agent result content for the notification
960
960
  let finalMessage = extractTextContent(agentResult.content, '\n');
961
- if (feature('TRANSCRIPT_CLASSIFIER')) {
961
+ if (true) {
962
962
  const backgroundedAppState = toolUseContext.getAppState();
963
963
  const handoffWarning = await classifyHandoffIfNeeded({
964
964
  agentMessages,
@@ -1233,7 +1233,7 @@ export const AgentTool = buildTool({
1233
1233
  logForDebugging(`Sync agent recovering from error with ${agentMessages.length} messages`);
1234
1234
  }
1235
1235
  const agentResult = finalizeAgentTool(agentMessages, syncAgentId, metadata);
1236
- if (feature('TRANSCRIPT_CLASSIFIER')) {
1236
+ if (true) {
1237
1237
  const currentAppState = toolUseContext.getAppState();
1238
1238
  const handoffWarning = await classifyHandoffIfNeeded({
1239
1239
  agentMessages,
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle'
1
+ import { feature } from 'bun:bundle'
2
2
  import { z } from 'zod/v4'
3
3
  import { clearInvokedSkillsForAgent } from '../../bootstrap/state.js'
4
4
  import {
@@ -401,7 +401,7 @@ export async function classifyHandoffIfNeeded({
401
401
  subagentType: string
402
402
  totalToolUseCount: number
403
403
  }): Promise<string | null> {
404
- if (feature('TRANSCRIPT_CLASSIFIER')) {
404
+ if (true) {
405
405
  if (toolPermissionContext.mode !== 'auto') return null
406
406
 
407
407
  const agentTranscript = buildTranscriptForClassifier(agentMessages, tools)
@@ -604,7 +604,7 @@ export async function runAsyncAgentLifecycle({
604
604
 
605
605
  let finalMessage = extractTextContent(agentResult.content, '\n')
606
606
 
607
- if (feature('TRANSCRIPT_CLASSIFIER')) {
607
+ if (true) {
608
608
  const handoffWarning = await classifyHandoffIfNeeded({
609
609
  agentMessages,
610
610
  tools: toolUseContext.options.tools,
@@ -1,4 +1,4 @@
1
- import { feature } from 'bun:bundle'
1
+ import { feature } from 'bun:bundle'
2
2
  import type { UUID } from 'crypto'
3
3
  import { randomUUID } from 'crypto'
4
4
  import uniqBy from 'lodash-es/uniqBy.js'
@@ -423,7 +423,7 @@ export async function* runAgent({
423
423
  state.toolPermissionContext.mode !== 'bypassPermissions' &&
424
424
  state.toolPermissionContext.mode !== 'acceptEdits' &&
425
425
  !(
426
- feature('TRANSCRIPT_CLASSIFIER') &&
426
+ true &&
427
427
  state.toolPermissionContext.mode === 'auto'
428
428
  )
429
429
  ) {