import { type RootState, type SessionState, type TerminalState } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state"; import { type RootAction, type ClientRootAction, type SessionAction, type ClientSessionAction, type TerminalAction, type ClientTerminalAction } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/action-origin.generated"; /** * Soft assertion for exhaustiveness checking. Place in the `default` branch of * a switch on a discriminated union so the compiler errors when a new variant * is added but not handled. * * At runtime, logs a warning instead of throwing so that forward-compatible * clients receiving unknown actions from a newer server degrade gracefully. */ export declare function softAssertNever(value: never, log?: (msg: string) => void): void; /** * Pure reducer for root state. Handles all {@link RootAction} variants. */ export declare function rootReducer(state: RootState, action: RootAction, log?: (msg: string) => void): RootState; /** * Pure reducer for session state. Handles all {@link SessionAction} variants. */ export declare function sessionReducer(state: SessionState, action: SessionAction, log?: (msg: string) => void): SessionState; /** * Pure reducer for terminal state. Handles all {@link TerminalAction} variants. */ export declare function terminalReducer(state: TerminalState, action: TerminalAction, log?: (msg: string) => void): TerminalState; /** * Type guard that checks whether an action may be dispatched by a client. * * Servers SHOULD call this to validate incoming `dispatchAction` requests * and reject any action the client is not allowed to originate. */ export declare function isClientDispatchable(action: RootAction | SessionAction | TerminalAction): action is ClientRootAction | ClientSessionAction | ClientTerminalAction;