From 7d36b552a030f09668aefc2de2b1ab2061a2b37d Mon Sep 17 00:00:00 2001 From: murashit Date: Mon, 22 Jun 2026 20:48:19 +0900 Subject: [PATCH] Narrow chat runtime projections --- src/app-server/protocol/runtime-config.ts | 40 +------------ src/app-server/threads.ts | 6 +- src/domain/runtime/config.ts | 34 +---------- src/domain/runtime/policy.ts | 56 ------------------- src/domain/runtime/thread-settings.ts | 22 +------- src/domain/threads/activation.ts | 4 +- .../chat/application/runtime/snapshot.ts | 2 - .../chat/application/state/actions.ts | 22 +------- .../chat/application/state/root-reducer.ts | 4 -- src/features/chat/domain/runtime/snapshot.ts | 4 +- src/features/chat/domain/runtime/state.ts | 20 +------ .../ephemeral-structured-turn.test.ts | 4 +- tests/app-server/thread-activation.test.ts | 6 +- .../thread-title-generation.test.ts | 4 +- .../chat/connection/reconnect-actions.test.ts | 2 - .../server-actions/server-actions.test.ts | 14 +---- .../turns/composer-submit-actions.test.ts | 2 - .../turns/plan-implementation.test.ts | 2 - .../turns/slash-command-executor.test.ts | 4 -- .../turns/turn-submission-actions.test.ts | 14 ----- .../features/chat/host/session-graph.test.ts | 2 - .../surface/message-stream-presenter.test.ts | 2 - .../chat/panel/surface/projection.test.ts | 2 +- .../chat/protocol/inbound/handler.test.ts | 18 ++---- .../chat/protocol/inbound/routing.test.ts | 4 +- .../chat/runtime/settings-actions.test.ts | 2 - tests/features/chat/state-actions.test.ts | 6 -- tests/features/chat/state-reducer.test.ts | 12 ---- .../active-thread-identity-sync.test.ts | 6 -- .../chat/threads/goal-actions.test.ts | 2 - .../chat/threads/resume-actions.test.ts | 6 -- .../chat/threads/selection-actions.test.ts | 2 - .../threads/thread-management-actions.test.ts | 16 ------ tests/features/chat/view-connection.test.ts | 4 -- .../selection-rewrite.test.ts | 4 +- tests/runtime/runtime-settings.test.ts | 2 - tests/runtime/service-tier-state.test.ts | 2 - tests/settings/settings.test.ts | 1 - 38 files changed, 30 insertions(+), 329 deletions(-) diff --git a/src/app-server/protocol/runtime-config.ts b/src/app-server/protocol/runtime-config.ts index 13f973de..9e981b7a 100644 --- a/src/app-server/protocol/runtime-config.ts +++ b/src/app-server/protocol/runtime-config.ts @@ -1,6 +1,6 @@ import { normalizeReasoningEffort } from "../../domain/catalog/metadata"; -import { approvalPolicyOrNull, approvalsReviewerOrNull, parseServiceTier } from "../../domain/runtime/policy"; -import type { ReasoningSummary, SandboxMode, RuntimeConfigSnapshot, Verbosity, WebSearchMode } from "../../domain/runtime/config"; +import { approvalsReviewerOrNull, parseServiceTier } from "../../domain/runtime/policy"; +import type { ReasoningSummary, RuntimeConfigSnapshot, Verbosity } from "../../domain/runtime/config"; interface ConfigLayerRecord { name: { type: string; profile?: unknown; [key: string]: unknown }; @@ -17,28 +17,18 @@ export interface ConfigReadResult { export function runtimeConfigSnapshotFromAppServerConfig(response: ConfigReadResult): RuntimeConfigSnapshot { const config = asRecord(response.config); - const tools = asRecordOrNull(config["tools"]); - const workspaceWrite = asRecordOrNull(config["sandbox_workspace_write"]); const effort = config["model_reasoning_effort"]; return { profile: selectedConfigProfile(response.layers), model: nonEmptyStringOrNull(config["model"]), modelProvider: nonEmptyStringOrNull(config["model_provider"]), reasoningEffort: normalizeReasoningEffort(effort), - rawReasoningEffort: nonEmptyStringOrNull(effort), reasoningSummary: reasoningSummaryOrNull(config["model_reasoning_summary"]), verbosity: verbosityOrNull(config["model_verbosity"]), serviceTier: parseServiceTier(config["service_tier"]), approvalsReviewer: approvalsReviewerOrNull(config["approvals_reviewer"]), - approvalPolicy: approvalPolicyOrNull(config["approval_policy"]), - webSearch: webSearchModeOrNull(config["web_search"]), modelContextWindow: numberOrNull(config["model_context_window"]), autoCompactTokenLimit: numberOrNull(config["model_auto_compact_token_limit"]), - sandboxMode: sandboxModeOrNull(config["sandbox_mode"]), - workspaceNetworkAccess: booleanOrNull(workspaceWrite?.["network_access"]), - writableRoots: stringArrayOrNull(workspaceWrite?.["writable_roots"]), - rawToolWebSearch: cloneJsonLike(asRecordOrNull(tools?.["web_search"])), - rawApps: cloneJsonLike(asRecordOrNull(config["apps"])), }; } @@ -46,10 +36,6 @@ function asRecord(value: unknown): Record { return value && typeof value === "object" ? (value as Record) : {}; } -function asRecordOrNull(value: unknown): Record | null { - return value && typeof value === "object" ? (value as Record) : null; -} - function selectedConfigProfile(layers: ConfigReadResult["layers"]): string | null { let selected: string | null = null; if (!layers) return null; @@ -72,14 +58,6 @@ function numberOrNull(value: unknown): number | null { return null; } -function booleanOrNull(value: unknown): boolean | null { - return typeof value === "boolean" ? value : null; -} - -function stringArrayOrNull(value: unknown): string[] | null { - return Array.isArray(value) ? value.filter((item): item is string => typeof item === "string") : null; -} - function reasoningSummaryOrNull(value: unknown): ReasoningSummary | null { return value === "auto" || value === "concise" || value === "detailed" || value === "none" ? value : null; } @@ -87,17 +65,3 @@ function reasoningSummaryOrNull(value: unknown): ReasoningSummary | null { function verbosityOrNull(value: unknown): Verbosity | null { return value === "low" || value === "medium" || value === "high" ? value : null; } - -function webSearchModeOrNull(value: unknown): WebSearchMode | null { - return value === "disabled" || value === "cached" || value === "live" ? value : null; -} - -function sandboxModeOrNull(value: unknown): SandboxMode | null { - return value === "read-only" || value === "workspace-write" || value === "danger-full-access" ? value : null; -} - -function cloneJsonLike(value: unknown): unknown { - if (Array.isArray(value)) return value.map(cloneJsonLike); - if (!value || typeof value !== "object") return value; - return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, cloneJsonLike(item)])); -} diff --git a/src/app-server/threads.ts b/src/app-server/threads.ts index f9453f4f..292eee44 100644 --- a/src/app-server/threads.ts +++ b/src/app-server/threads.ts @@ -7,7 +7,7 @@ import { transcriptEntriesFromTurnRecords, } from "./protocol/turn"; import { normalizeReasoningEffort } from "../domain/catalog/metadata"; -import type { ActivePermissionProfile, ApprovalPolicy, ApprovalsReviewer, ServiceTier } from "../domain/runtime/policy"; +import type { ApprovalsReviewer, ServiceTier } from "../domain/runtime/policy"; import { parseServiceTier } from "../domain/runtime/policy"; import type { ArchiveThreadInput } from "../domain/threads/archive-markdown"; import type { ThreadActivationSnapshot } from "../domain/threads/activation"; @@ -31,9 +31,7 @@ interface ThreadActivationResponse { cwd: string; model: string | null; serviceTier: ServiceTier | null; - approvalPolicy: ApprovalPolicy | null; approvalsReviewer: ApprovalsReviewer | null; - activePermissionProfile: ActivePermissionProfile | null; reasoningEffort: string | null; } @@ -140,9 +138,7 @@ export function threadActivationSnapshotFromAppServerResponse(response: ThreadAc model: response.model, reasoningEffort: normalizeReasoningEffort(response.reasoningEffort), serviceTier: parseServiceTier(response.serviceTier), - approvalPolicy: response.approvalPolicy, approvalsReviewer: response.approvalsReviewer, - activePermissionProfile: response.activePermissionProfile, }; } diff --git a/src/domain/runtime/config.ts b/src/domain/runtime/config.ts index e6e51d6f..623ee971 100644 --- a/src/domain/runtime/config.ts +++ b/src/domain/runtime/config.ts @@ -1,30 +1,20 @@ import type { ReasoningEffort } from "../catalog/metadata"; -import { cloneApprovalPolicy, type ApprovalPolicy, type ApprovalsReviewer, type ServiceTier } from "./policy"; +import type { ApprovalsReviewer, ServiceTier } from "./policy"; export type ReasoningSummary = "auto" | "concise" | "detailed" | "none"; export type Verbosity = "low" | "medium" | "high"; -export type WebSearchMode = "disabled" | "cached" | "live"; -export type SandboxMode = "read-only" | "workspace-write" | "danger-full-access"; export interface RuntimeConfigSnapshot { readonly profile: string | null; readonly model: string | null; readonly modelProvider: string | null; readonly reasoningEffort: ReasoningEffort | null; - readonly rawReasoningEffort: string | null; readonly reasoningSummary: ReasoningSummary | null; readonly verbosity: Verbosity | null; readonly serviceTier: ServiceTier | null; readonly approvalsReviewer: ApprovalsReviewer | null; - readonly approvalPolicy: ApprovalPolicy | null; - readonly webSearch: WebSearchMode | null; readonly modelContextWindow: number | null; readonly autoCompactTokenLimit: number | null; - readonly sandboxMode: SandboxMode | null; - readonly workspaceNetworkAccess: boolean | null; - readonly writableRoots: readonly string[] | null; - readonly rawToolWebSearch: unknown; - readonly rawApps: unknown; } export function emptyRuntimeConfigSnapshot(): RuntimeConfigSnapshot { @@ -33,35 +23,15 @@ export function emptyRuntimeConfigSnapshot(): RuntimeConfigSnapshot { model: null, modelProvider: null, reasoningEffort: null, - rawReasoningEffort: null, reasoningSummary: null, verbosity: null, serviceTier: null, approvalsReviewer: null, - approvalPolicy: null, - webSearch: null, modelContextWindow: null, autoCompactTokenLimit: null, - sandboxMode: null, - workspaceNetworkAccess: null, - writableRoots: null, - rawToolWebSearch: null, - rawApps: null, }; } export function cloneRuntimeConfigSnapshot(config: RuntimeConfigSnapshot): RuntimeConfigSnapshot { - return { - ...config, - approvalPolicy: cloneApprovalPolicy(config.approvalPolicy), - writableRoots: config.writableRoots ? [...config.writableRoots] : null, - rawToolWebSearch: cloneJsonLike(config.rawToolWebSearch), - rawApps: cloneJsonLike(config.rawApps), - }; -} - -function cloneJsonLike(value: unknown): unknown { - if (Array.isArray(value)) return value.map(cloneJsonLike); - if (!value || typeof value !== "object") return value; - return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, cloneJsonLike(item)])); + return { ...config }; } diff --git a/src/domain/runtime/policy.ts b/src/domain/runtime/policy.ts index 8ec98f3c..8e8a47ab 100644 --- a/src/domain/runtime/policy.ts +++ b/src/domain/runtime/policy.ts @@ -1,25 +1,6 @@ export type ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; -export type ApprovalPolicy = - | "untrusted" - | "on-failure" - | "on-request" - | { - readonly granular: { - readonly sandbox_approval: boolean; - readonly rules: boolean; - readonly skill_approval: boolean; - readonly request_permissions: boolean; - readonly mcp_elicitations: boolean; - }; - } - | "never"; export type ServiceTier = string; -export interface ActivePermissionProfile { - readonly id: string; - readonly extends: string | null; -} - export function approvalsReviewerOrNull(value: unknown): ApprovalsReviewer | null { return value === "user" || value === "auto_review" || value === "guardian_subagent" ? value : null; } @@ -28,40 +9,3 @@ export function parseServiceTier(value: unknown): ServiceTier | null { if (typeof value === "string" && value.length > 0) return value; return null; } - -export function approvalPolicyOrNull(value: unknown): ApprovalPolicy | null { - if (value === "untrusted" || value === "on-failure" || value === "on-request" || value === "never") return value; - const granular = asRecordOrNull(asRecordOrNull(value)?.["granular"]); - if (!granular) return null; - const sandboxApproval = granular["sandbox_approval"]; - const rules = granular["rules"]; - const skillApproval = granular["skill_approval"]; - const requestPermissions = granular["request_permissions"]; - const mcpElicitations = granular["mcp_elicitations"]; - if ( - typeof sandboxApproval !== "boolean" || - typeof rules !== "boolean" || - typeof skillApproval !== "boolean" || - typeof requestPermissions !== "boolean" || - typeof mcpElicitations !== "boolean" - ) { - return null; - } - return { - granular: { - sandbox_approval: sandboxApproval, - rules, - skill_approval: skillApproval, - request_permissions: requestPermissions, - mcp_elicitations: mcpElicitations, - }, - }; -} - -export function cloneApprovalPolicy(value: ApprovalPolicy | null): ApprovalPolicy | null { - return value && typeof value === "object" ? { granular: { ...value.granular } } : value; -} - -function asRecordOrNull(value: unknown): Record | null { - return value && typeof value === "object" ? (value as Record) : null; -} diff --git a/src/domain/runtime/thread-settings.ts b/src/domain/runtime/thread-settings.ts index b0e68913..2b7e80eb 100644 --- a/src/domain/runtime/thread-settings.ts +++ b/src/domain/runtime/thread-settings.ts @@ -1,23 +1,8 @@ import type { ReasoningEffort } from "../catalog/metadata"; -import type { ApprovalPolicy, ApprovalsReviewer } from "./policy"; -import type { ReasoningSummary } from "./config"; +import type { ApprovalsReviewer } from "./policy"; export type RuntimeServiceTierRequest = string | null | undefined; export type ModeKind = "plan" | "default"; -type Personality = "none" | "friendly" | "pragmatic"; -type NetworkAccess = "restricted" | "enabled"; - -type SandboxPolicy = - | { type: "dangerFullAccess" } - | { type: "readOnly"; networkAccess: boolean } - | { type: "externalSandbox"; networkAccess: NetworkAccess } - | { - type: "workspaceWrite"; - writableRoots: string[]; - networkAccess: boolean; - excludeTmpdirEnvVar: boolean; - excludeSlashTmp: boolean; - }; export interface CollaborationMode { mode: ModeKind; @@ -30,16 +15,11 @@ export interface CollaborationMode { export interface RuntimeSettingsPatch { cwd?: string | null; - approvalPolicy?: ApprovalPolicy | null; approvalsReviewer?: ApprovalsReviewer | null; - sandboxPolicy?: SandboxPolicy | null; - permissions?: string | null; model?: string | null; serviceTier?: string | null; effort?: ReasoningEffort | null; - summary?: ReasoningSummary | null; collaborationMode?: CollaborationMode | null; - personality?: Personality | null; } export function applyRuntimeSettingsPatchValue( diff --git a/src/domain/threads/activation.ts b/src/domain/threads/activation.ts index 9e5b6cd2..2da0a165 100644 --- a/src/domain/threads/activation.ts +++ b/src/domain/threads/activation.ts @@ -1,5 +1,5 @@ import type { ReasoningEffort } from "../catalog/metadata"; -import type { ActivePermissionProfile, ApprovalPolicy, ApprovalsReviewer, ServiceTier } from "../runtime/policy"; +import type { ApprovalsReviewer, ServiceTier } from "../runtime/policy"; import type { Thread } from "./model"; export interface ThreadActivationSnapshot { @@ -7,8 +7,6 @@ export interface ThreadActivationSnapshot { cwd: string; model: string | null; serviceTier: ServiceTier | null; - approvalPolicy: ApprovalPolicy | null; approvalsReviewer: ApprovalsReviewer | null; - activePermissionProfile: ActivePermissionProfile | null; reasoningEffort: ReasoningEffort | null; } diff --git a/src/features/chat/application/runtime/snapshot.ts b/src/features/chat/application/runtime/snapshot.ts index de17cf27..001b988d 100644 --- a/src/features/chat/application/runtime/snapshot.ts +++ b/src/features/chat/application/runtime/snapshot.ts @@ -24,9 +24,7 @@ export function runtimeSnapshotForChatSlices(input: RuntimeSnapshotInput): Runti activeReasoningEffort: input.runtime.activeReasoningEffort, activeCollaborationMode: input.runtime.activeCollaborationMode, activeServiceTier: input.runtime.activeServiceTier, - activeApprovalPolicy: input.runtime.activeApprovalPolicy, activeApprovalsReviewer: input.runtime.activeApprovalsReviewer, - activePermissionProfile: input.runtime.activePermissionProfile, requestedModel: input.runtime.requestedModel, requestedReasoningEffort: input.runtime.requestedReasoningEffort, requestedApprovalsReviewer: input.runtime.requestedApprovalsReviewer, diff --git a/src/features/chat/application/state/actions.ts b/src/features/chat/application/state/actions.ts index 7d172276..352654a2 100644 --- a/src/features/chat/application/state/actions.ts +++ b/src/features/chat/application/state/actions.ts @@ -18,15 +18,7 @@ interface ResumedThreadActionParams { interface ResumedThreadFromActiveRuntimeParams { thread: Thread; cwd: string; - runtime: Pick< - ChatRuntimeState, - | "activeModel" - | "activeReasoningEffort" - | "activeServiceTier" - | "activeApprovalPolicy" - | "activeApprovalsReviewer" - | "activePermissionProfile" - >; + runtime: Pick; listedThreads?: readonly Thread[]; items?: readonly MessageStreamItem[]; } @@ -38,9 +30,7 @@ export interface ActiveThreadResumedAction { model: string | null; reasoningEffort: ReasoningEffort | null; serviceTier: ServiceTier | null; - approvalPolicy: ChatRuntimeState["activeApprovalPolicy"]; approvalsReviewer: ChatRuntimeState["activeApprovalsReviewer"]; - activePermissionProfile: ChatRuntimeState["activePermissionProfile"]; items?: readonly MessageStreamItem[]; status?: string; listedThreads?: readonly Thread[]; @@ -54,9 +44,7 @@ export interface ActiveThreadSettingsAppliedAction { reasoningEffort: ReasoningEffort | null; collaborationMode: CollaborationModeSelection; serviceTier: ServiceTier | null; - approvalPolicy: ChatRuntimeState["activeApprovalPolicy"]; approvalsReviewer: ChatRuntimeState["activeApprovalsReviewer"]; - activePermissionProfile: ChatRuntimeState["activePermissionProfile"]; } export interface ActiveThreadSettingsAppliedActionSettings { @@ -65,9 +53,7 @@ export interface ActiveThreadSettingsAppliedActionSettings { effort: string | null; collaborationMode: { mode: CollaborationModeSelection }; serviceTier: string | null; - approvalPolicy: ChatRuntimeState["activeApprovalPolicy"]; approvalsReviewer: ChatRuntimeState["activeApprovalsReviewer"]; - activePermissionProfile: ChatRuntimeState["activePermissionProfile"]; } export interface ConnectionInitializedAction { @@ -125,9 +111,7 @@ export function resumedThreadActionFromActiveRuntime(params: ResumedThreadFromAc model: params.runtime.activeModel, reasoningEffort: params.runtime.activeReasoningEffort, serviceTier: params.runtime.activeServiceTier, - approvalPolicy: params.runtime.activeApprovalPolicy, approvalsReviewer: params.runtime.activeApprovalsReviewer, - activePermissionProfile: params.runtime.activePermissionProfile, }, ...(params.listedThreads ? { listedThreads: params.listedThreads } : {}), ...(params.items ? { items: params.items } : {}), @@ -143,9 +127,7 @@ export function resumedThreadAction(params: ResumedThreadActionParams): ActiveTh model: response.model, reasoningEffort: response.reasoningEffort, serviceTier: response.serviceTier, - approvalPolicy: response.approvalPolicy, approvalsReviewer: response.approvalsReviewer, - activePermissionProfile: response.activePermissionProfile, ...(params.items ? { items: params.items } : {}), ...(params.listedThreads ? { listedThreads: upsertThread(params.listedThreads, response.thread) } : {}), ...(params.preserveRequestedRuntimeSettings ? { preserveRequestedRuntimeSettings: true } : {}), @@ -160,8 +142,6 @@ export function activeThreadSettingsAppliedAction(settings: ActiveThreadSettings reasoningEffort: normalizeReasoningEffort(settings.effort), collaborationMode: settings.collaborationMode.mode, serviceTier: parseServiceTier(settings.serviceTier), - approvalPolicy: settings.approvalPolicy, approvalsReviewer: settings.approvalsReviewer, - activePermissionProfile: settings.activePermissionProfile, }; } diff --git a/src/features/chat/application/state/root-reducer.ts b/src/features/chat/application/state/root-reducer.ts index fe824547..8dc596af 100644 --- a/src/features/chat/application/state/root-reducer.ts +++ b/src/features/chat/application/state/root-reducer.ts @@ -336,9 +336,7 @@ function reduceActiveThreadResumedTransition(state: ChatState, action: ActiveThr activeReasoningEffort: action.reasoningEffort, activeCollaborationMode: initialActiveChatRuntimeState().activeCollaborationMode, activeServiceTier: action.serviceTier, - activeApprovalPolicy: action.approvalPolicy, activeApprovalsReviewer: action.approvalsReviewer, - activePermissionProfile: action.activePermissionProfile, }, turn: initialTurnState(), messageStream: initialMessageStreamState(action.items ?? []), @@ -361,9 +359,7 @@ function reduceActiveThreadSettingsAppliedTransition(state: ChatState, action: A activeCollaborationMode: action.collaborationMode, selectedCollaborationMode: action.collaborationMode, activeServiceTier: action.serviceTier, - activeApprovalPolicy: action.approvalPolicy, activeApprovalsReviewer: action.approvalsReviewer, - activePermissionProfile: action.activePermissionProfile, }, }); } diff --git a/src/features/chat/domain/runtime/snapshot.ts b/src/features/chat/domain/runtime/snapshot.ts index 4443c3bd..2ba22d6f 100644 --- a/src/features/chat/domain/runtime/snapshot.ts +++ b/src/features/chat/domain/runtime/snapshot.ts @@ -1,7 +1,7 @@ import type { ModelMetadata, ReasoningEffort } from "../../../../domain/catalog/metadata"; import type { RuntimeConfigSnapshot } from "../../../../domain/runtime/config"; import type { RateLimitSnapshot, ThreadTokenUsage } from "../../../../domain/runtime/metrics"; -import type { ActivePermissionProfile, ApprovalPolicy, ApprovalsReviewer, ServiceTier } from "../../../../domain/runtime/policy"; +import type { ApprovalsReviewer, ServiceTier } from "../../../../domain/runtime/policy"; import type { ActiveCollaborationMode, CollaborationModeSelection, PendingRuntimeIntent, RequestedFastMode } from "./intent"; export interface RuntimeSnapshot { @@ -11,9 +11,7 @@ export interface RuntimeSnapshot { activeReasoningEffort: ReasoningEffort | null; activeCollaborationMode: ActiveCollaborationMode; activeServiceTier: ServiceTier | null; - activeApprovalPolicy: ApprovalPolicy | null; activeApprovalsReviewer: ApprovalsReviewer | null; - activePermissionProfile: ActivePermissionProfile | null; requestedModel: PendingRuntimeIntent; requestedReasoningEffort: PendingRuntimeIntent; requestedApprovalsReviewer: PendingRuntimeIntent; diff --git a/src/features/chat/domain/runtime/state.ts b/src/features/chat/domain/runtime/state.ts index 3d23345a..28b9db57 100644 --- a/src/features/chat/domain/runtime/state.ts +++ b/src/features/chat/domain/runtime/state.ts @@ -1,10 +1,4 @@ -import { - parseServiceTier, - type ActivePermissionProfile, - type ApprovalPolicy, - type ApprovalsReviewer, - type ServiceTier, -} from "../../../../domain/runtime/policy"; +import { parseServiceTier, type ApprovalsReviewer, type ServiceTier } from "../../../../domain/runtime/policy"; import type { RuntimeSettingsPatch } from "../../../../domain/runtime/thread-settings"; import { normalizeReasoningEffort, type ReasoningEffort } from "../../../../domain/catalog/metadata"; import { @@ -22,9 +16,7 @@ export interface ChatRuntimeState { readonly activeReasoningEffort: ReasoningEffort | null; readonly activeCollaborationMode: ActiveCollaborationMode; readonly activeServiceTier: ServiceTier | null; - readonly activeApprovalPolicy: ApprovalPolicy | null; readonly activeApprovalsReviewer: ApprovalsReviewer | null; - readonly activePermissionProfile: ActivePermissionProfile | null; readonly requestedModel: PendingRuntimeIntent; readonly requestedReasoningEffort: PendingRuntimeIntent; readonly requestedApprovalsReviewer: PendingRuntimeIntent; @@ -34,22 +26,14 @@ export interface ChatRuntimeState { export function initialActiveChatRuntimeState(): Pick< ChatRuntimeState, - | "activeModel" - | "activeReasoningEffort" - | "activeCollaborationMode" - | "activeServiceTier" - | "activeApprovalPolicy" - | "activeApprovalsReviewer" - | "activePermissionProfile" + "activeModel" | "activeReasoningEffort" | "activeCollaborationMode" | "activeServiceTier" | "activeApprovalsReviewer" > { return { activeModel: null, activeReasoningEffort: null, activeCollaborationMode: null, activeServiceTier: null, - activeApprovalPolicy: null, activeApprovalsReviewer: null, - activePermissionProfile: null, }; } diff --git a/tests/app-server/ephemeral-structured-turn.test.ts b/tests/app-server/ephemeral-structured-turn.test.ts index ad1cc05c..de79c340 100644 --- a/tests/app-server/ephemeral-structured-turn.test.ts +++ b/tests/app-server/ephemeral-structured-turn.test.ts @@ -315,13 +315,13 @@ function threadStartResponse(threadId: string): ThreadStartResponse { model: "gpt-5.1", modelProvider: "openai", serviceTier: null, + approvalPolicy: "never", cwd: "/vault", runtimeWorkspaceRoots: [], instructionSources: [], - approvalPolicy: "never", approvalsReviewer: "auto_review", - sandbox: { type: "readOnly", networkAccess: false }, activePermissionProfile: null, + sandbox: { type: "readOnly", networkAccess: false }, reasoningEffort: null, }; } diff --git a/tests/app-server/thread-activation.test.ts b/tests/app-server/thread-activation.test.ts index 6f142a12..4a2f0543 100644 --- a/tests/app-server/thread-activation.test.ts +++ b/tests/app-server/thread-activation.test.ts @@ -15,9 +15,7 @@ describe("app-server thread activation", () => { cwd: "/vault", model: "gpt-5.5", serviceTier: "fast", - approvalPolicy: "on-request", approvalsReviewer: "user", - activePermissionProfile: null, reasoningEffort: "high", }); }); @@ -29,13 +27,13 @@ function responseFixture(thread: ThreadRecord): ThreadResumeResponse { model: "gpt-5.5", modelProvider: "openai", serviceTier: "fast", + approvalPolicy: "on-request", cwd: "/vault", runtimeWorkspaceRoots: [], instructionSources: [], - approvalPolicy: "on-request", approvalsReviewer: "user", - sandbox: { type: "readOnly", networkAccess: false }, activePermissionProfile: null, + sandbox: { type: "readOnly", networkAccess: false }, reasoningEffort: "high", initialTurnsPage: null, }; diff --git a/tests/app-server/thread-title-generation.test.ts b/tests/app-server/thread-title-generation.test.ts index 598e73b1..22eb7099 100644 --- a/tests/app-server/thread-title-generation.test.ts +++ b/tests/app-server/thread-title-generation.test.ts @@ -272,13 +272,13 @@ function threadStartResponse(threadId: string): ThreadStartResponse { model: "gpt-5.1", modelProvider: "openai", serviceTier: null, + approvalPolicy: "never", cwd: "/vault", runtimeWorkspaceRoots: [], instructionSources: [], - approvalPolicy: "never", approvalsReviewer: "auto_review", - sandbox: { type: "readOnly", networkAccess: false }, activePermissionProfile: null, + sandbox: { type: "readOnly", networkAccess: false }, reasoningEffort: null, }; } diff --git a/tests/features/chat/connection/reconnect-actions.test.ts b/tests/features/chat/connection/reconnect-actions.test.ts index 68563e38..51579a0b 100644 --- a/tests/features/chat/connection/reconnect-actions.test.ts +++ b/tests/features/chat/connection/reconnect-actions.test.ts @@ -14,9 +14,7 @@ function createHost(overrides: Partial = {}) { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); const host: ChatReconnectActionsHost = { stateStore, diff --git a/tests/features/chat/connection/server-actions/server-actions.test.ts b/tests/features/chat/connection/server-actions/server-actions.test.ts index 65306275..57eefbef 100644 --- a/tests/features/chat/connection/server-actions/server-actions.test.ts +++ b/tests/features/chat/connection/server-actions/server-actions.test.ts @@ -45,9 +45,7 @@ describe("chat server actions", () => { cwd: "/vault", model: "gpt-5", serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, reasoningEffort: null, }), } as unknown as AppServerClient; @@ -81,9 +79,7 @@ describe("chat server actions", () => { cwd: "/vault", model: "gpt-5", serviceTier: "fast", - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, reasoningEffort: null, }); const client = { @@ -120,9 +116,7 @@ describe("chat server actions", () => { cwd: "/vault", model: "gpt-5", serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, reasoningEffort: null, }), } as unknown as AppServerClient; @@ -151,9 +145,7 @@ describe("chat server actions", () => { cwd: "/vault", model: "gpt-5", serviceTier: "flex", - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, reasoningEffort: null, }); const client = { @@ -184,9 +176,7 @@ describe("chat server actions", () => { cwd: "/vault", model: "gpt-5", serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, reasoningEffort: null, }), } as unknown as AppServerClient; @@ -232,12 +222,12 @@ describe("chat server actions", () => { model: "gpt-5", modelProvider: "openai", serviceTier: null, + approvalPolicy: "on-request", runtimeWorkspaceRoots: [], instructionSources: [], - approvalPolicy: "on-request", approvalsReviewer: "user", - sandbox: { type: "readOnly", networkAccess: false }, activePermissionProfile: null, + sandbox: { type: "readOnly", networkAccess: false }, reasoningEffort: null, }); diff --git a/tests/features/chat/conversation/turns/composer-submit-actions.test.ts b/tests/features/chat/conversation/turns/composer-submit-actions.test.ts index 79cb53fe..49b15b1a 100644 --- a/tests/features/chat/conversation/turns/composer-submit-actions.test.ts +++ b/tests/features/chat/conversation/turns/composer-submit-actions.test.ts @@ -132,9 +132,7 @@ describe("submitComposer", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); stateStore.dispatch({ type: "turn/started", threadId: "thread", turnId: "turn" }); diff --git a/tests/features/chat/conversation/turns/plan-implementation.test.ts b/tests/features/chat/conversation/turns/plan-implementation.test.ts index 00df9430..008e57a4 100644 --- a/tests/features/chat/conversation/turns/plan-implementation.test.ts +++ b/tests/features/chat/conversation/turns/plan-implementation.test.ts @@ -33,9 +33,7 @@ function resumeThread(stateStore: ChatStateStore, items: readonly MessageStreamI model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, items, }); stateStore.dispatch({ type: "runtime/requested-collaboration-mode-set", collaborationMode: "plan" }); diff --git a/tests/features/chat/conversation/turns/slash-command-executor.test.ts b/tests/features/chat/conversation/turns/slash-command-executor.test.ts index fdee257a..6a2b0ba9 100644 --- a/tests/features/chat/conversation/turns/slash-command-executor.test.ts +++ b/tests/features/chat/conversation/turns/slash-command-executor.test.ts @@ -97,9 +97,7 @@ describe("executeSlashCommandWithState", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); await executeSlashCommandWithState(host, "compact", ""); @@ -116,9 +114,7 @@ describe("executeSlashCommandWithState", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); await executeSlashCommandWithState(host, "compact", ""); diff --git a/tests/features/chat/conversation/turns/turn-submission-actions.test.ts b/tests/features/chat/conversation/turns/turn-submission-actions.test.ts index 90ae7220..a34b5191 100644 --- a/tests/features/chat/conversation/turns/turn-submission-actions.test.ts +++ b/tests/features/chat/conversation/turns/turn-submission-actions.test.ts @@ -49,9 +49,7 @@ function createHost(overrides: TurnSubmissionHostOverrides = {}) { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); return {}; }), @@ -116,9 +114,7 @@ describe("TurnSubmissionActions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); startTurn.mockImplementation(async () => { stateStore.dispatch({ type: "active-thread/cleared" }); @@ -142,9 +138,7 @@ describe("TurnSubmissionActions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); stateStore.dispatch({ type: "turn/started", threadId: "thread", turnId: "turn" }); const actions = createTurnSubmissionActions(host); @@ -176,9 +170,7 @@ describe("TurnSubmissionActions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); const optimistic = optimisticTurnStart({ id: "local-user", text: "pending", codexInput: textInput("pending") }); stateStore.dispatch({ @@ -208,9 +200,7 @@ describe("TurnSubmissionActions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); } @@ -236,9 +226,7 @@ describe("TurnSubmissionActions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); stateStore.dispatch({ type: "turn/started", threadId: "thread", turnId: "turn" }); steerTurn.mockImplementation(async () => { @@ -264,9 +252,7 @@ describe("TurnSubmissionActions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); stateStore.dispatch({ type: "turn/started", threadId: "thread", turnId: "turn" }); steerTurn.mockImplementation(async () => { diff --git a/tests/features/chat/host/session-graph.test.ts b/tests/features/chat/host/session-graph.test.ts index d16a15cc..c84720ee 100644 --- a/tests/features/chat/host/session-graph.test.ts +++ b/tests/features/chat/host/session-graph.test.ts @@ -161,9 +161,7 @@ describe("createChatPanelSessionGraph actions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: "on-request", approvalsReviewer: null, - activePermissionProfile: null, }); stateStore.dispatch({ type: "ui/panel-set", panel: "history" }); diff --git a/tests/features/chat/panel/surface/message-stream-presenter.test.ts b/tests/features/chat/panel/surface/message-stream-presenter.test.ts index b7cf5f97..56707b5a 100644 --- a/tests/features/chat/panel/surface/message-stream-presenter.test.ts +++ b/tests/features/chat/panel/surface/message-stream-presenter.test.ts @@ -48,9 +48,7 @@ describe("MessageStreamPresenter scroll pinning", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); const projection = messageStreamSurfaceProjectionFromState( diff --git a/tests/features/chat/panel/surface/projection.test.ts b/tests/features/chat/panel/surface/projection.test.ts index 4e33038c..f9a4b450 100644 --- a/tests/features/chat/panel/surface/projection.test.ts +++ b/tests/features/chat/panel/surface/projection.test.ts @@ -81,7 +81,7 @@ describe("chat panel surface projections", () => { expect(debugDetails["vaultPath"]).toBe("/vault"); expect(debugDetails["configuredCommand"]).toBe("codex"); - expect(debugDetails["runtimeConfig"]).toMatchObject({ model: "gpt-debug", approvalPolicy: "on-request" }); + expect(debugDetails["runtimeConfig"]).toMatchObject({ model: "gpt-debug" }); expect(debugDetails["runtime"]).toMatchObject({ requestedModel: { kind: "set", value: "gpt-debug" } }); expect(debugDetails["availableModels"]).toMatchObject([{ model: "gpt-debug" }]); unmountUiRoot(parent); diff --git a/tests/features/chat/protocol/inbound/handler.test.ts b/tests/features/chat/protocol/inbound/handler.test.ts index be3fadd0..2bbfaebd 100644 --- a/tests/features/chat/protocol/inbound/handler.test.ts +++ b/tests/features/chat/protocol/inbound/handler.test.ts @@ -1584,19 +1584,19 @@ describe("ChatInboundHandler", () => { threadId: "thread-active", threadSettings: { cwd: "/workspace/active", - approvalPolicy: "on-request", approvalsReviewer: "auto_review", sandboxPolicy: { type: "readOnly", networkAccess: false }, - activePermissionProfile: null, model: "gpt-5.5", modelProvider: "openai", serviceTier: "fast", + approvalPolicy: "on-request", effort: "high", summary: null, collaborationMode: { mode: "default", settings: { model: "gpt-5.5", reasoning_effort: "high", developer_instructions: null }, }, + activePermissionProfile: null, personality: null, }, }, @@ -1605,9 +1605,7 @@ describe("ChatInboundHandler", () => { expect(handler.currentState().activeThread.cwd).toBe("/workspace/active"); expect(handler.currentState().runtime.activeModel).toBe("gpt-5.5"); expect(handler.currentState().runtime.activeServiceTier).toBe("fast"); - expect(handler.currentState().runtime.activeApprovalPolicy).toBe("on-request"); expect(handler.currentState().runtime.activeApprovalsReviewer).toBe("auto_review"); - expect(handler.currentState().runtime.activePermissionProfile).toBeNull(); expect(chatStateMessageStreamItems(handler.currentState())).toEqual([]); }); @@ -1617,9 +1615,7 @@ describe("ChatInboundHandler", () => { state = chatStateWith(state, { activeThread: { cwd: "/workspace/active" } }); state = chatStateWith(state, { runtime: { activeModel: "gpt-active" } }); state = chatStateWith(state, { runtime: { activeServiceTier: "flex" } }); - state = chatStateWith(state, { runtime: { activeApprovalPolicy: "on-request" } }); state = chatStateWith(state, { runtime: { activeApprovalsReviewer: "user" } }); - state = chatStateWith(state, { runtime: { activePermissionProfile: { id: ":workspace", extends: null } } }); const handler = handlerForState(state); handler.handleNotification({ @@ -1628,19 +1624,19 @@ describe("ChatInboundHandler", () => { threadId: "thread-other", threadSettings: { cwd: "/workspace/other", - approvalPolicy: "never", approvalsReviewer: "auto_review", sandboxPolicy: { type: "readOnly", networkAccess: false }, - activePermissionProfile: { id: ":read-only", extends: null }, model: "gpt-other", modelProvider: "openai", serviceTier: "fast", + approvalPolicy: "never", effort: "high", summary: null, collaborationMode: { mode: "plan", settings: { model: "gpt-other", reasoning_effort: "high", developer_instructions: null }, }, + activePermissionProfile: { id: ":read-only", extends: null }, personality: null, }, }, @@ -1649,9 +1645,7 @@ describe("ChatInboundHandler", () => { expect(handler.currentState().activeThread.cwd).toBe("/workspace/active"); expect(handler.currentState().runtime.activeModel).toBe("gpt-active"); expect(handler.currentState().runtime.activeServiceTier).toBe("flex"); - expect(handler.currentState().runtime.activeApprovalPolicy).toBe("on-request"); expect(handler.currentState().runtime.activeApprovalsReviewer).toBe("user"); - expect(handler.currentState().runtime.activePermissionProfile).toEqual({ id: ":workspace", extends: null }); }); it("syncs null service tier from settings notifications", () => { @@ -1666,19 +1660,19 @@ describe("ChatInboundHandler", () => { threadId: "thread-active", threadSettings: { cwd: "/workspace/active", - approvalPolicy: "on-request", approvalsReviewer: "user", sandboxPolicy: { type: "readOnly", networkAccess: false }, - activePermissionProfile: null, model: "gpt-5.5", modelProvider: "openai", serviceTier: null, + approvalPolicy: "on-request", effort: "high", summary: null, collaborationMode: { mode: "default", settings: { model: "gpt-5.5", reasoning_effort: "high", developer_instructions: null }, }, + activePermissionProfile: null, personality: null, }, }, diff --git a/tests/features/chat/protocol/inbound/routing.test.ts b/tests/features/chat/protocol/inbound/routing.test.ts index a2d1f934..90c3bc24 100644 --- a/tests/features/chat/protocol/inbound/routing.test.ts +++ b/tests/features/chat/protocol/inbound/routing.test.ts @@ -442,16 +442,16 @@ function threadSettingsUpdatedNotification(): Extract { activeModel: "gpt-5.5", activeReasoningEffort: "high", activeServiceTier: "fast", - activeApprovalPolicy: "on-request", activeApprovalsReviewer: "user", - activePermissionProfile: null, }, listedThreads: [existing], items: [loading], @@ -32,9 +30,7 @@ describe("chat thread resume helpers", () => { model: "gpt-5.5", reasoningEffort: "high", serviceTier: "fast", - approvalPolicy: "on-request", approvalsReviewer: "user", - activePermissionProfile: null, items: [loading], }); expect(action.listedThreads?.map((thread) => thread.id)).toEqual(["thread", "existing"]); @@ -63,9 +59,7 @@ function responseFixture(thread: Thread): ThreadActivationSnapshot { model: "gpt-5.5", serviceTier: "fast", cwd: "/vault", - approvalPolicy: "on-request", approvalsReviewer: "user", - activePermissionProfile: null, reasoningEffort: "high", }; } diff --git a/tests/features/chat/state-reducer.test.ts b/tests/features/chat/state-reducer.test.ts index 1958f904..dae08f44 100644 --- a/tests/features/chat/state-reducer.test.ts +++ b/tests/features/chat/state-reducer.test.ts @@ -24,7 +24,6 @@ describe("chatReducer", () => { state = chatStateWith(state, { runtime: { activeModel: "gpt-5.1" } }); state = chatStateWith(state, { runtime: { activeReasoningEffort: "high" } }); state = chatStateWith(state, { runtime: { activeServiceTier: "fast" } }); - state = chatStateWith(state, { runtime: { activeApprovalPolicy: "on-request" } }); state = chatStateWith(state, { runtime: { activeApprovalsReviewer: "auto_review" } }); state = chatStateWith(state, { runtime: { activeCollaborationMode: "plan" } }); state = chatStateWith(state, { runtime: { selectedCollaborationMode: "plan" } }); @@ -58,7 +57,6 @@ describe("chatReducer", () => { expect(next.runtime.activeModel).toBeNull(); expect(next.runtime.activeReasoningEffort).toBeNull(); expect(next.runtime.activeServiceTier).toBeNull(); - expect(next.runtime.activeApprovalPolicy).toBeNull(); expect(next.runtime.activeApprovalsReviewer).toBeNull(); expect(next.runtime.activeCollaborationMode).toBeNull(); expect(next.runtime.requestedModel).toEqual({ kind: "unchanged" }); @@ -116,9 +114,7 @@ describe("chatReducer", () => { model: "gpt-5.1", reasoningEffort: "high", serviceTier: "fast", - approvalPolicy: "on-request", approvalsReviewer: "user", - activePermissionProfile: null, items: resumedItems, }); @@ -158,9 +154,7 @@ describe("chatReducer", () => { model: "gpt-5", reasoningEffort: "medium", serviceTier: "fast", - approvalPolicy: "on-request", approvalsReviewer: "user", - activePermissionProfile: null, preserveRequestedRuntimeSettings: true, }); @@ -188,9 +182,7 @@ describe("chatReducer", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); expect(chatStateMessageStreamItems(next)).toEqual([]); @@ -709,9 +701,7 @@ describe("chatReducer", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); panelA.dispatch({ type: "composer/draft-set", draft: "panel A draft" }); panelA.dispatch({ type: "request/user-input-queued", input: userInput(1) }); @@ -724,9 +714,7 @@ describe("chatReducer", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); panelB.dispatch({ type: "composer/draft-set", draft: "panel B draft" }); panelB.dispatch({ type: "request/user-input-queued", input: userInput(2) }); diff --git a/tests/features/chat/threads/active-thread-identity-sync.test.ts b/tests/features/chat/threads/active-thread-identity-sync.test.ts index 46fc4e79..751d9a0d 100644 --- a/tests/features/chat/threads/active-thread-identity-sync.test.ts +++ b/tests/features/chat/threads/active-thread-identity-sync.test.ts @@ -50,9 +50,7 @@ describe("createActiveThreadIdentitySync", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); controller.applyThreadArchiveToActiveIdentity("thread"); @@ -74,9 +72,7 @@ describe("createActiveThreadIdentitySync", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); controller.applyThreadArchiveToActiveIdentity("other"); @@ -111,9 +107,7 @@ describe("createActiveThreadIdentitySync", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); controller.applyThreadRenameToActiveIdentity("thread", "New"); diff --git a/tests/features/chat/threads/goal-actions.test.ts b/tests/features/chat/threads/goal-actions.test.ts index ab084084..6f41ed46 100644 --- a/tests/features/chat/threads/goal-actions.test.ts +++ b/tests/features/chat/threads/goal-actions.test.ts @@ -208,9 +208,7 @@ describe("createGoalActions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); return { threadId: "thread-new" }; }); diff --git a/tests/features/chat/threads/resume-actions.test.ts b/tests/features/chat/threads/resume-actions.test.ts index e8f19b56..4d5b09e3 100644 --- a/tests/features/chat/threads/resume-actions.test.ts +++ b/tests/features/chat/threads/resume-actions.test.ts @@ -20,9 +20,7 @@ function activation(threadId: string, overrides: Partial { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); stateStore.dispatch({ type: "turn/started", threadId: "active", turnId: "turn" }); @@ -158,9 +154,7 @@ describe("ResumeActions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); await recovery.resolveAndFlush(tokenUsageFixture(42)); diff --git a/tests/features/chat/threads/selection-actions.test.ts b/tests/features/chat/threads/selection-actions.test.ts index 63553f45..e5aec52f 100644 --- a/tests/features/chat/threads/selection-actions.test.ts +++ b/tests/features/chat/threads/selection-actions.test.ts @@ -12,9 +12,7 @@ function resumeThreadState(stateStore: ChatStateStore, threadId: string): void { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); } diff --git a/tests/features/chat/threads/thread-management-actions.test.ts b/tests/features/chat/threads/thread-management-actions.test.ts index ce2b9a3f..7247397b 100644 --- a/tests/features/chat/threads/thread-management-actions.test.ts +++ b/tests/features/chat/threads/thread-management-actions.test.ts @@ -61,9 +61,7 @@ describe("thread management actions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); const controller = threadManagementActions(host); @@ -78,9 +76,7 @@ describe("thread management actions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); compact.resolve(undefined); await pendingCompact; @@ -250,9 +246,7 @@ describe("thread management actions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); host.stateStore.dispatch({ type: "thread-list/applied", @@ -272,9 +266,7 @@ describe("thread management actions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); fork.resolve({ thread: { ...archivedThread(), id: "forked", sessionId: "forked", name: null } }); await pendingFork; @@ -348,9 +340,7 @@ describe("thread management actions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); host.stateStore.dispatch({ type: "message-stream/items-replaced", @@ -383,9 +373,7 @@ describe("thread management actions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); host.stateStore.dispatch({ type: "message-stream/items-replaced", @@ -406,9 +394,7 @@ describe("thread management actions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); rollback.resolve({ thread: rollbackThread() }); await pendingRollback; @@ -437,9 +423,7 @@ describe("thread management actions", () => { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: null, approvalsReviewer: null, - activePermissionProfile: null, }); host.stateStore.dispatch({ type: "message-stream/items-replaced", diff --git a/tests/features/chat/view-connection.test.ts b/tests/features/chat/view-connection.test.ts index a02dcde5..fdbc0a58 100644 --- a/tests/features/chat/view-connection.test.ts +++ b/tests/features/chat/view-connection.test.ts @@ -1091,9 +1091,7 @@ function startedThread(threadId: string) { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: "on-request", approvalsReviewer: null, - activePermissionProfile: null, }; } @@ -1110,9 +1108,7 @@ function resumedThread(threadId: string) { model: null, reasoningEffort: null, serviceTier: null, - approvalPolicy: "on-request", approvalsReviewer: null, - activePermissionProfile: null, }; } diff --git a/tests/features/selection-rewrite/selection-rewrite.test.ts b/tests/features/selection-rewrite/selection-rewrite.test.ts index 159adab2..6e104d17 100644 --- a/tests/features/selection-rewrite/selection-rewrite.test.ts +++ b/tests/features/selection-rewrite/selection-rewrite.test.ts @@ -839,13 +839,13 @@ function threadStartResponse(threadId: string): ThreadStartResponse { model: "gpt-5.1", modelProvider: "openai", serviceTier: null, + approvalPolicy: "never", cwd: "/vault", runtimeWorkspaceRoots: [], instructionSources: [], - approvalPolicy: "never", approvalsReviewer: "auto_review", - sandbox: { type: "readOnly", networkAccess: false }, activePermissionProfile: null, + sandbox: { type: "readOnly", networkAccess: false }, reasoningEffort: null, }; } diff --git a/tests/runtime/runtime-settings.test.ts b/tests/runtime/runtime-settings.test.ts index d2cd9132..24d9b1ac 100644 --- a/tests/runtime/runtime-settings.test.ts +++ b/tests/runtime/runtime-settings.test.ts @@ -558,9 +558,7 @@ function runtimeSnapshot(overrides: Partial = {}): RuntimeSnaps activeReasoningEffort: null, activeCollaborationMode: null, activeServiceTier: null, - activeApprovalPolicy: null, activeApprovalsReviewer: null, - activePermissionProfile: null, requestedModel: { kind: "unchanged" }, requestedReasoningEffort: { kind: "unchanged" }, requestedApprovalsReviewer: { kind: "unchanged" }, diff --git a/tests/runtime/service-tier-state.test.ts b/tests/runtime/service-tier-state.test.ts index 3623051a..b976b2ba 100644 --- a/tests/runtime/service-tier-state.test.ts +++ b/tests/runtime/service-tier-state.test.ts @@ -35,9 +35,7 @@ function fastMode(serviceTier: string | null, serviceTiers: ModelMetadata["servi activeReasoningEffort: null, activeCollaborationMode: "default", activeServiceTier: serviceTier, - activeApprovalPolicy: null, activeApprovalsReviewer: null, - activePermissionProfile: null, requestedModel: { kind: "unchanged" }, requestedReasoningEffort: { kind: "unchanged" }, requestedApprovalsReviewer: { kind: "unchanged" }, diff --git a/tests/settings/settings.test.ts b/tests/settings/settings.test.ts index 3ae74e39..6cf5b16d 100644 --- a/tests/settings/settings.test.ts +++ b/tests/settings/settings.test.ts @@ -30,7 +30,6 @@ describe("settings", () => { archiveExportTags: "codex, archive", model: "gpt-5.5", sandboxMode: "workspace-write", - approvalPolicy: "on-request", hooks: [{ event: "postToolUse" }], extraPanelState: { threadId: "thread-1" }, };