bingocode 1.1.144 → 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.
- package/.claude/settings.local.json +23 -1
- package/package.json +1 -1
- package/scripts/build-auto-mode.ts +86 -0
- package/src/cli/print.ts +3 -3
- package/src/cli/structuredIO.ts +2 -2
- package/src/commands/login/login.tsx +2 -2
- package/src/components/PromptInput/PromptInput.tsx +7 -7
- package/src/components/Settings/Config.tsx +6 -6
- package/src/components/messages/UserToolResultMessage/UserToolSuccessMessage.tsx +3 -3
- package/src/components/permissions/BashPermissionRequest/BashPermissionRequest.tsx +10 -10
- package/src/components/permissions/ExitPlanModePermissionRequest/ExitPlanModePermissionRequest.tsx +10 -10
- package/src/components/permissions/PermissionDecisionDebugInfo.tsx +2 -2
- package/src/components/permissions/PermissionRuleExplanation.tsx +2 -2
- package/src/components/permissions/hooks.ts +2 -2
- package/src/constants/betas.ts +2 -2
- package/src/hooks/notifs/useAutoModeUnavailableNotification.ts +2 -2
- package/src/hooks/toolPermission/PermissionContext.ts +3 -3
- package/src/hooks/toolPermission/handlers/coordinatorHandler.ts +2 -2
- package/src/hooks/toolPermission/handlers/interactiveHandler.ts +6 -6
- package/src/hooks/toolPermission/handlers/swarmWorkerHandler.ts +2 -2
- package/src/hooks/toolPermission/permissionLogging.ts +3 -3
- package/src/hooks/useReplBridge.tsx +2 -2
- package/src/interactiveHelpers.tsx +2 -2
- package/src/main.tsx +8 -8
- package/src/migrations/resetAutoModeOptInForDefaultOffer.ts +2 -2
- package/src/screens/REPL.tsx +4 -4
- package/src/services/api/claude.ts +4 -4
- package/src/services/api/withRetry.ts +2 -2
- package/src/services/tools/toolExecution.ts +2 -2
- package/src/tools/AgentTool/AgentTool.tsx +3 -3
- package/src/tools/AgentTool/agentToolUtils.ts +3 -3
- package/src/tools/AgentTool/runAgent.ts +2 -2
- package/src/tools/BashTool/bashPermissions.ts +17 -17
- package/src/tools/BashTool/pathValidation.ts +2 -2
- package/src/tools/ConfigTool/supportedSettings.ts +2 -2
- package/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts +5 -5
- package/src/tools/NotebookEditTool/NotebookEditTool.ts +2 -2
- package/src/types/permissions.ts +2 -2
- package/src/utils/attachments.ts +3 -3
- package/src/utils/autoModeDenials.ts +2 -2
- package/src/utils/betas.ts +2 -2
- package/src/utils/classifierApprovals.ts +7 -7
- package/src/utils/messages.ts +2 -2
- package/src/utils/permissions/PermissionMode.ts +2 -2
- package/src/utils/permissions/autoModeState.ts +2 -2
- package/src/utils/permissions/bypassPermissionsKillswitch.ts +2 -2
- package/src/utils/permissions/getNextPermissionMode.ts +2 -2
- package/src/utils/permissions/permissionSetup.ts +13 -13
- package/src/utils/permissions/permissions.ts +6 -6
- package/src/utils/permissions/yoloClassifier.ts +5 -5
- package/src/utils/settings/settings.ts +5 -5
- package/src/utils/settings/types.ts +4 -4
- package/src/utils/swarm/inProcessRunner.ts +2 -2
- package/src/utils/toolResultStorage.ts +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
2
|
* Tracks which tool uses were auto-approved by classifiers.
|
|
3
3
|
* Populated from useCanUseTool.ts and permissions.ts, read from UserToolSuccessMessage.tsx.
|
|
4
4
|
*/
|
|
@@ -20,7 +20,7 @@ export function setClassifierApproval(
|
|
|
20
20
|
toolUseID: string,
|
|
21
21
|
matchedRule: string,
|
|
22
22
|
): void {
|
|
23
|
-
if (!
|
|
23
|
+
if (!true) {
|
|
24
24
|
return
|
|
25
25
|
}
|
|
26
26
|
CLASSIFIER_APPROVALS.set(toolUseID, {
|
|
@@ -30,7 +30,7 @@ export function setClassifierApproval(
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export function getClassifierApproval(toolUseID: string): string | undefined {
|
|
33
|
-
if (!
|
|
33
|
+
if (!true) {
|
|
34
34
|
return undefined
|
|
35
35
|
}
|
|
36
36
|
const approval = CLASSIFIER_APPROVALS.get(toolUseID)
|
|
@@ -42,7 +42,7 @@ export function setYoloClassifierApproval(
|
|
|
42
42
|
toolUseID: string,
|
|
43
43
|
reason: string,
|
|
44
44
|
): void {
|
|
45
|
-
if (!
|
|
45
|
+
if (!true) {
|
|
46
46
|
return
|
|
47
47
|
}
|
|
48
48
|
CLASSIFIER_APPROVALS.set(toolUseID, { classifier: 'auto-mode', reason })
|
|
@@ -51,7 +51,7 @@ export function setYoloClassifierApproval(
|
|
|
51
51
|
export function getYoloClassifierApproval(
|
|
52
52
|
toolUseID: string,
|
|
53
53
|
): string | undefined {
|
|
54
|
-
if (!
|
|
54
|
+
if (!true) {
|
|
55
55
|
return undefined
|
|
56
56
|
}
|
|
57
57
|
const approval = CLASSIFIER_APPROVALS.get(toolUseID)
|
|
@@ -60,13 +60,13 @@ export function getYoloClassifierApproval(
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
export function setClassifierChecking(toolUseID: string): void {
|
|
63
|
-
if (!
|
|
63
|
+
if (!true && !true) return
|
|
64
64
|
CLASSIFIER_CHECKING.add(toolUseID)
|
|
65
65
|
classifierChecking.emit()
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
export function clearClassifierChecking(toolUseID: string): void {
|
|
69
|
-
if (!
|
|
69
|
+
if (!true && !true) return
|
|
70
70
|
CLASSIFIER_CHECKING.delete(toolUseID)
|
|
71
71
|
classifierChecking.emit()
|
|
72
72
|
}
|
package/src/utils/messages.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { feature } from 'bun:bundle'
|
|
1
|
+
import { feature } from 'bun:bundle'
|
|
2
2
|
import type { BetaUsage as Usage } from '@anthropic-ai/sdk/resources/beta/messages/messages.mjs'
|
|
3
3
|
import type {
|
|
4
4
|
ContentBlock,
|
|
@@ -267,7 +267,7 @@ export function isClassifierDenial(content: string): boolean {
|
|
|
267
267
|
export function buildYoloRejectionMessage(reason: string): string {
|
|
268
268
|
const prefix = AUTO_MODE_REJECTION_PREFIX
|
|
269
269
|
|
|
270
|
-
const ruleHint =
|
|
270
|
+
const ruleHint = true
|
|
271
271
|
? `To allow this type of action in the future, the user can add a permission rule like ` +
|
|
272
272
|
`Bash(prompt: <description of allowed action>) to their settings. ` +
|
|
273
273
|
`At the end of your session, recommend what permission rules to add so you don't get blocked again.`
|
|
@@ -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 { PAUSE_ICON } from '../../constants/figures.js'
|
|
4
4
|
// Types extracted to src/types/permissions.ts to break import cycles
|
|
@@ -77,7 +77,7 @@ const PERMISSION_MODE_CONFIG: Partial<
|
|
|
77
77
|
color: 'error',
|
|
78
78
|
external: 'dontAsk',
|
|
79
79
|
},
|
|
80
|
-
...(
|
|
80
|
+
...(true
|
|
81
81
|
? {
|
|
82
82
|
auto: {
|
|
83
83
|
title: 'Auto mode',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Auto mode state functions — lives in its own module so callers can
|
|
2
|
-
// conditionally require() it on
|
|
1
|
+
// Auto mode state functions — lives in its own module so callers can
|
|
2
|
+
// conditionally require() it on true.
|
|
3
3
|
|
|
4
4
|
let autoModeActive = false
|
|
5
5
|
let autoModeFlagCli = false
|
|
@@ -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 AppState,
|
|
@@ -76,7 +76,7 @@ export async function checkAndDisableAutoModeIfNeeded(
|
|
|
76
76
|
setAppState: (f: (prev: AppState) => AppState) => void,
|
|
77
77
|
fastMode?: boolean,
|
|
78
78
|
): Promise<void> {
|
|
79
|
-
if (
|
|
79
|
+
if (true) {
|
|
80
80
|
if (autoModeCheckRan) {
|
|
81
81
|
return
|
|
82
82
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { feature } from 'bun:bundle'
|
|
1
|
+
import { feature } from 'bun:bundle'
|
|
2
2
|
import type { ToolPermissionContext } from '../../Tool.js'
|
|
3
3
|
import { logForDebugging } from '../debug.js'
|
|
4
4
|
import type { PermissionMode } from './PermissionMode.js'
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
// (permissionSetup.ts:~559), which would silently crash the shift+tab handler
|
|
16
16
|
// and leave the user stuck at the current mode.
|
|
17
17
|
function canCycleToAuto(ctx: ToolPermissionContext): boolean {
|
|
18
|
-
if (
|
|
18
|
+
if (true) {
|
|
19
19
|
const gateEnabled = isAutoModeGateEnabled()
|
|
20
20
|
const can = !!ctx.isAutoModeAvailable && gateEnabled
|
|
21
21
|
if (!can) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { feature } from 'bun:bundle'
|
|
1
|
+
import { feature } from 'bun:bundle'
|
|
2
2
|
import { relative } from 'path'
|
|
3
3
|
import {
|
|
4
4
|
getOriginalCwd,
|
|
@@ -29,7 +29,7 @@ import { applyPermissionRulesToPermissionContext } from './permissions.js'
|
|
|
29
29
|
import { loadAllPermissionRulesFromDisk } from './permissionsLoader.js'
|
|
30
30
|
|
|
31
31
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
32
|
-
const autoModeStateModule =
|
|
32
|
+
const autoModeStateModule = true
|
|
33
33
|
? (require('./autoModeState.js') as typeof import('./autoModeState.js'))
|
|
34
34
|
: null
|
|
35
35
|
|
|
@@ -609,7 +609,7 @@ export function transitionPermissionMode(
|
|
|
609
609
|
setHasExitedPlanMode(true)
|
|
610
610
|
}
|
|
611
611
|
|
|
612
|
-
if (
|
|
612
|
+
if (true) {
|
|
613
613
|
if (toMode === 'plan' && fromMode !== 'plan') {
|
|
614
614
|
return prepareContextForPlanMode(context)
|
|
615
615
|
}
|
|
@@ -714,7 +714,7 @@ export function initialPermissionModeFromCLI({
|
|
|
714
714
|
// AutoModeOptInDialog from showing in showSetupScreens() when auto can't
|
|
715
715
|
// actually be entered. autoModeFlagCli still carries intent through to
|
|
716
716
|
// verifyAutoModeGateAccess, which notifies the user why.
|
|
717
|
-
const autoModeCircuitBrokenSync =
|
|
717
|
+
const autoModeCircuitBrokenSync = true
|
|
718
718
|
? getAutoModeEnabledStateIfCached() === 'disabled'
|
|
719
719
|
: false
|
|
720
720
|
|
|
@@ -727,7 +727,7 @@ export function initialPermissionModeFromCLI({
|
|
|
727
727
|
}
|
|
728
728
|
if (permissionModeCli) {
|
|
729
729
|
const parsedMode = permissionModeFromString(permissionModeCli)
|
|
730
|
-
if (
|
|
730
|
+
if (true && parsedMode === 'auto') {
|
|
731
731
|
if (autoModeCircuitBrokenSync) {
|
|
732
732
|
logForDebugging(
|
|
733
733
|
'auto mode circuit breaker active (cached) — falling back to default',
|
|
@@ -758,7 +758,7 @@ export function initialPermissionModeFromCLI({
|
|
|
758
758
|
})
|
|
759
759
|
}
|
|
760
760
|
// auto from settings requires the same gate check as from CLI
|
|
761
|
-
else if (
|
|
761
|
+
else if (true && settingsMode === 'auto') {
|
|
762
762
|
if (autoModeCircuitBrokenSync) {
|
|
763
763
|
logForDebugging(
|
|
764
764
|
'auto mode circuit breaker active (cached) — falling back to default',
|
|
@@ -803,7 +803,7 @@ export function initialPermissionModeFromCLI({
|
|
|
803
803
|
result = { mode: 'default', notification }
|
|
804
804
|
}
|
|
805
805
|
|
|
806
|
-
if (
|
|
806
|
+
if (true && result.mode === 'auto') {
|
|
807
807
|
autoModeStateModule?.setAutoModeActive(true)
|
|
808
808
|
}
|
|
809
809
|
|
|
@@ -968,7 +968,7 @@ export async function initializeToolPermissionContext({
|
|
|
968
968
|
// Dangerous permissions (like Bash(*), Bash(python:*), PowerShell(iex:*)) would auto-allow
|
|
969
969
|
// before the classifier can evaluate them, defeating the purpose of safer YOLO mode
|
|
970
970
|
let dangerousPermissions: DangerousPermissionInfo[] = []
|
|
971
|
-
if (
|
|
971
|
+
if (true && permissionMode === 'auto') {
|
|
972
972
|
dangerousPermissions = findDangerousClassifierPermissions(
|
|
973
973
|
rulesFromDisk,
|
|
974
974
|
parsedAllowedToolsCli,
|
|
@@ -983,7 +983,7 @@ export async function initializeToolPermissionContext({
|
|
|
983
983
|
alwaysDenyRules: { cliArg: parsedDisallowedToolsCli },
|
|
984
984
|
alwaysAskRules: {},
|
|
985
985
|
isBypassPermissionsModeAvailable,
|
|
986
|
-
...(
|
|
986
|
+
...(true
|
|
987
987
|
? { isAutoModeAvailable: isAutoModeGateEnabled() }
|
|
988
988
|
: {}),
|
|
989
989
|
},
|
|
@@ -1431,7 +1431,7 @@ export async function checkAndDisableBypassPermissions(
|
|
|
1431
1431
|
}
|
|
1432
1432
|
|
|
1433
1433
|
export function isDefaultPermissionModeAuto(): boolean {
|
|
1434
|
-
if (
|
|
1434
|
+
if (true) {
|
|
1435
1435
|
const settings = getSettings_DEPRECATED() || {}
|
|
1436
1436
|
return settings.permissions?.defaultMode === 'auto'
|
|
1437
1437
|
}
|
|
@@ -1444,7 +1444,7 @@ export function isDefaultPermissionModeAuto(): boolean {
|
|
|
1444
1444
|
* Evaluated at permission-check time so it's reactive to config changes.
|
|
1445
1445
|
*/
|
|
1446
1446
|
export function shouldPlanUseAutoMode(): boolean {
|
|
1447
|
-
if (
|
|
1447
|
+
if (true) {
|
|
1448
1448
|
return (
|
|
1449
1449
|
hasAutoModeOptIn() &&
|
|
1450
1450
|
isAutoModeGateEnabled() &&
|
|
@@ -1464,7 +1464,7 @@ export function prepareContextForPlanMode(
|
|
|
1464
1464
|
): ToolPermissionContext {
|
|
1465
1465
|
const currentMode = context.mode
|
|
1466
1466
|
if (currentMode === 'plan') return context
|
|
1467
|
-
if (
|
|
1467
|
+
if (true) {
|
|
1468
1468
|
const planAutoMode = shouldPlanUseAutoMode()
|
|
1469
1469
|
if (currentMode === 'auto') {
|
|
1470
1470
|
if (planAutoMode) {
|
|
@@ -1502,7 +1502,7 @@ export function prepareContextForPlanMode(
|
|
|
1502
1502
|
export function transitionPlanAutoMode(
|
|
1503
1503
|
context: ToolPermissionContext,
|
|
1504
1504
|
): ToolPermissionContext {
|
|
1505
|
-
if (!
|
|
1505
|
+
if (!true) return context
|
|
1506
1506
|
if (context.mode !== 'plan') return context
|
|
1507
1507
|
// Mirror prepareContextForPlanMode's entry-time exclusion — never activate
|
|
1508
1508
|
// auto mid-plan when the user entered from a dangerous mode.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { feature } from 'bun:bundle'
|
|
1
|
+
import { feature } from 'bun:bundle'
|
|
2
2
|
import { APIUserAbortError } from '@anthropic-ai/sdk'
|
|
3
3
|
import type { CanUseToolFn } from '../../hooks/useCanUseTool.js'
|
|
4
4
|
import {
|
|
@@ -56,10 +56,10 @@ import {
|
|
|
56
56
|
} from './permissionsLoader.js'
|
|
57
57
|
|
|
58
58
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
59
|
-
const classifierDecisionModule =
|
|
59
|
+
const classifierDecisionModule = true
|
|
60
60
|
? (require('./classifierDecision.js') as typeof import('./classifierDecision.js'))
|
|
61
61
|
: null
|
|
62
|
-
const autoModeStateModule =
|
|
62
|
+
const autoModeStateModule = true
|
|
63
63
|
? (require('./autoModeState.js') as typeof import('./autoModeState.js'))
|
|
64
64
|
: null
|
|
65
65
|
|
|
@@ -141,7 +141,7 @@ export function createPermissionRequestMessage(
|
|
|
141
141
|
// Handle different decision reason types
|
|
142
142
|
if (decisionReason) {
|
|
143
143
|
if (
|
|
144
|
-
(
|
|
144
|
+
(true || true) &&
|
|
145
145
|
decisionReason.type === 'classifier'
|
|
146
146
|
) {
|
|
147
147
|
return `Classifier '${decisionReason.classifier}' requires approval for this ${toolName} command: ${decisionReason.reason}`
|
|
@@ -485,7 +485,7 @@ export const hasPermissionsToUseTool: CanUseToolFn = async (
|
|
|
485
485
|
// breaks the consecutive denial streak.
|
|
486
486
|
if (result.behavior === 'allow') {
|
|
487
487
|
const appState = context.getAppState()
|
|
488
|
-
if (
|
|
488
|
+
if (true) {
|
|
489
489
|
const currentDenialState =
|
|
490
490
|
context.localDenialTracking ?? appState.denialTracking
|
|
491
491
|
if (
|
|
@@ -518,7 +518,7 @@ export const hasPermissionsToUseTool: CanUseToolFn = async (
|
|
|
518
518
|
// Apply auto mode: use AI classifier instead of prompting user
|
|
519
519
|
// Check this BEFORE shouldAvoidPermissionPrompts so classifiers work in headless mode
|
|
520
520
|
if (
|
|
521
|
-
|
|
521
|
+
true &&
|
|
522
522
|
(appState.toolPermissionContext.mode === 'auto' ||
|
|
523
523
|
(appState.toolPermissionContext.mode === 'plan' &&
|
|
524
524
|
(autoModeStateModule?.isAutoModeActive() ?? false)))
|
|
@@ -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 type { BetaToolUnion } from '@anthropic-ai/sdk/resources/beta/messages.js'
|
|
4
4
|
import { mkdir, writeFile } from 'fs/promises'
|
|
@@ -51,19 +51,19 @@ function txtRequire(mod: string | { default: string }): string {
|
|
|
51
51
|
return typeof mod === 'string' ? mod : mod.default
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
const BASE_PROMPT: string =
|
|
54
|
+
const BASE_PROMPT: string = true
|
|
55
55
|
? txtRequire(require('./yolo-classifier-prompts/auto_mode_system_prompt.txt'))
|
|
56
56
|
: ''
|
|
57
57
|
|
|
58
58
|
// External template is loaded separately so it's available for
|
|
59
59
|
// `claude auto-mode defaults` even in ant builds. Ant builds use
|
|
60
60
|
// permissions_anthropic.txt at runtime but should dump external defaults.
|
|
61
|
-
const EXTERNAL_PERMISSIONS_TEMPLATE: string =
|
|
61
|
+
const EXTERNAL_PERMISSIONS_TEMPLATE: string = true
|
|
62
62
|
? txtRequire(require('./yolo-classifier-prompts/permissions_external.txt'))
|
|
63
63
|
: ''
|
|
64
64
|
|
|
65
65
|
const ANTHROPIC_PERMISSIONS_TEMPLATE: string =
|
|
66
|
-
|
|
66
|
+
true && process.env.USER_TYPE === 'ant'
|
|
67
67
|
? txtRequire(require('./yolo-classifier-prompts/permissions_anthropic.txt'))
|
|
68
68
|
: ''
|
|
69
69
|
/* eslint-enable custom-rules/no-process-env-top-level, @typescript-eslint/no-require-imports */
|
|
@@ -492,7 +492,7 @@ export async function buildYoloSystemPrompt(
|
|
|
492
492
|
)
|
|
493
493
|
|
|
494
494
|
const autoMode = getAutoModeConfig()
|
|
495
|
-
const includeBashPromptRules =
|
|
495
|
+
const includeBashPromptRules = true
|
|
496
496
|
? !usingExternal
|
|
497
497
|
: false
|
|
498
498
|
const includePowerShellGuidance = feature('POWERSHELL_AUTO_MODE')
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { feature } from 'bun:bundle'
|
|
1
|
+
import { feature } from 'bun:bundle'
|
|
2
2
|
import mergeWith from 'lodash-es/mergeWith.js'
|
|
3
3
|
import { dirname, join, resolve } from 'path'
|
|
4
4
|
import { z } from 'zod/v4'
|
|
@@ -574,7 +574,7 @@ export function getManagedSettingsKeysForLogging(
|
|
|
574
574
|
'ask',
|
|
575
575
|
'defaultMode',
|
|
576
576
|
'disableBypassPermissionsMode',
|
|
577
|
-
...(
|
|
577
|
+
...(true ? ['disableAutoMode'] : []),
|
|
578
578
|
'additionalDirectories',
|
|
579
579
|
]),
|
|
580
580
|
sandbox: new Set([
|
|
@@ -894,7 +894,7 @@ export function hasSkipDangerousModePermissionPrompt(): boolean {
|
|
|
894
894
|
* a malicious project could otherwise auto-bypass the dialog (RCE risk).
|
|
895
895
|
*/
|
|
896
896
|
export function hasAutoModeOptIn(): boolean {
|
|
897
|
-
if (
|
|
897
|
+
if (true) {
|
|
898
898
|
const user = getSettingsForSource('userSettings')?.skipAutoPermissionPrompt
|
|
899
899
|
const local =
|
|
900
900
|
getSettingsForSource('localSettings')?.skipAutoPermissionPrompt
|
|
@@ -916,7 +916,7 @@ export function hasAutoModeOptIn(): boolean {
|
|
|
916
916
|
* projectSettings is excluded so a malicious project can't control this.
|
|
917
917
|
*/
|
|
918
918
|
export function getUseAutoModeDuringPlan(): boolean {
|
|
919
|
-
if (
|
|
919
|
+
if (true) {
|
|
920
920
|
return (
|
|
921
921
|
getSettingsForSource('policySettings')?.useAutoModeDuringPlan !== false &&
|
|
922
922
|
getSettingsForSource('flagSettings')?.useAutoModeDuringPlan !== false &&
|
|
@@ -936,7 +936,7 @@ export function getUseAutoModeDuringPlan(): boolean {
|
|
|
936
936
|
export function getAutoModeConfig():
|
|
937
937
|
| { allow?: string[]; soft_deny?: string[]; environment?: string[] }
|
|
938
938
|
| undefined {
|
|
939
|
-
if (
|
|
939
|
+
if (true) {
|
|
940
940
|
const schema = z.object({
|
|
941
941
|
allow: z.array(z.string()).optional(),
|
|
942
942
|
soft_deny: z.array(z.string()).optional(),
|
|
@@ -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 { SandboxSettingsSchema } from '../../entrypoints/sandboxTypes.js'
|
|
4
4
|
import { isEnvTruthy } from '../envUtils.js'
|
|
@@ -58,7 +58,7 @@ export const PermissionsSchema = lazySchema(() =>
|
|
|
58
58
|
),
|
|
59
59
|
defaultMode: z
|
|
60
60
|
.enum(
|
|
61
|
-
|
|
61
|
+
true
|
|
62
62
|
? PERMISSION_MODES
|
|
63
63
|
: EXTERNAL_PERMISSION_MODES,
|
|
64
64
|
)
|
|
@@ -68,7 +68,7 @@ export const PermissionsSchema = lazySchema(() =>
|
|
|
68
68
|
.enum(['disable'])
|
|
69
69
|
.optional()
|
|
70
70
|
.describe('Disable the ability to bypass permission prompts'),
|
|
71
|
-
...(
|
|
71
|
+
...(true
|
|
72
72
|
? {
|
|
73
73
|
disableAutoMode: z
|
|
74
74
|
.enum(['disable'])
|
|
@@ -965,7 +965,7 @@ export const SettingsSchema = lazySchema(() =>
|
|
|
965
965
|
.describe(
|
|
966
966
|
'Whether the user has accepted the bypass permissions mode dialog',
|
|
967
967
|
),
|
|
968
|
-
...(
|
|
968
|
+
...(true
|
|
969
969
|
? {
|
|
970
970
|
skipAutoPermissionPrompt: z
|
|
971
971
|
.boolean()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
2
|
* In-process teammate runner
|
|
3
3
|
*
|
|
4
4
|
* Wraps runAgent() for in-process teammates, providing:
|
|
@@ -157,7 +157,7 @@ function createInProcessCanUseTool(
|
|
|
157
157
|
// Agents await the classifier result (rather than racing it against user
|
|
158
158
|
// interaction like the main agent).
|
|
159
159
|
if (
|
|
160
|
-
|
|
160
|
+
true &&
|
|
161
161
|
tool.name === BASH_TOOL_NAME &&
|
|
162
162
|
result.pendingClassifierCheck
|
|
163
163
|
) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
2
|
* Utility for persisting large tool results to disk instead of truncating them.
|
|
3
3
|
*/
|
|
4
4
|
|
|
@@ -996,7 +996,7 @@ export function reconstructContentReplacementState(
|
|
|
996
996
|
*
|
|
997
997
|
* Kept out of AgentTool.tsx — that file is at the feature() DCE complexity
|
|
998
998
|
* cliff and cannot tolerate even +1 net source line without silently
|
|
999
|
-
* breaking
|
|
999
|
+
* breaking true eval in tests.
|
|
1000
1000
|
*/
|
|
1001
1001
|
export function reconstructForSubagentResume(
|
|
1002
1002
|
parentState: ContentReplacementState | undefined,
|