export { ActionType, type ActionEnvelope, type ActionOrigin, type RootAgentsChangedAction, type RootActiveSessionsChangedAction, type SessionCreationFailedAction, type SessionChatAddedAction, type SessionChatRemovedAction, type SessionChatUpdatedAction, type SessionDefaultChatChangedAction, type ChatDeltaAction, type ChatErrorAction, type SessionReadyAction, type ChatReasoningAction, type ChatResponsePartAction, type ChatToolCallCompleteAction, type ChatToolCallConfirmedAction, type ChatToolCallApprovedAction, type ChatToolCallDeniedAction, type ChatToolCallDeltaAction, type ChatToolCallReadyAction, type ChatToolCallResultConfirmedAction, type ChatToolCallStartAction, type SessionTitleChangedAction, type ChatTurnCancelledAction, type ChatTurnCompleteAction, type ChatTurnStartedAction, type CanvasStateChangedAction, type ChatUsageAction, type SessionServerToolsChangedAction, type SessionActiveClientSetAction, type SessionActiveClientRemovedAction, type SessionWorkingDirectorySetAction, type SessionWorkingDirectoryRemovedAction, type SessionWorkingDirectoryReplacedAction, type SessionCustomizationsChangedAction, type SessionCustomizationToggledAction, type ChatPendingMessageSetAction, type ChatPendingMessageRemovedAction, type ChatQueuedMessagesReorderedAction, type ChatInputRequestedAction, type ChatInputCompletedAction, type ChatInputAnswerChangedAction, type SessionIsReadChangedAction, type SessionIsArchivedChangedAction, type ChatConfigChangedAction, type ChatToolCallContentChangedAction, type ChatTruncatedAction, type ChangesetStatusChangedAction, type ChangesetFileSetAction, type ChangesetFileRemovedAction, type ChangesetContentChangedAction, type ChangesetOperationsChangedAction, type ChangesetClearedAction, type AnnotationsSetAction, type AnnotationsUpdatedAction, type AnnotationsRemovedAction, type AnnotationsEntrySetAction, type AnnotationsEntryRemovedAction, type ResourceWatchChangedAction, type AutomationCreateRequestedAction, type AutomationUpdateRequestedAction, type AutomationSetAction, type AutomationRemovedAction, type AutomationRunLifecycleChangedAction, type AutomationRunSessionSetAction, type AutomationRunSessionRemovedAction, type AutomationRunPrimarySessionChangedAction, type AutomationRunCancelRequestedAction, type StateAction, } from "./protocol/actions.js"; export { AuthRequiredReason, type SessionAddedParams, type SessionRemovedParams, type ProgressParams, type AuthRequiredParams, } from "./protocol/notifications.js"; /** * String discriminants for the protocol notification methods that previously * lived inside a `notification` wrapper. These values are the JSON-RPC method * names sent over the wire by a channels-era server; they are also the `type` * discriminant on {@link ProtocolNotification} variants. */ export declare const NotificationType: { readonly SessionAdded: "root/sessionAdded"; readonly SessionRemoved: "root/sessionRemoved"; readonly SessionSummaryChanged: "root/sessionSummaryChanged"; readonly Progress: "root/progress"; readonly AuthRequired: "auth/required"; }; export type NotificationType = typeof NotificationType[keyof typeof NotificationType]; import { type RootAgentsChangedAction, type RootActiveSessionsChangedAction, type ChatDeltaAction, type ChatReasoningAction, type ChatResponsePartAction, type ChatToolCallApprovedAction, type ChatToolCallCompleteAction, type ChatToolCallConfirmedAction, type ChatToolCallDeniedAction, type ChatToolCallDeltaAction, type ChatToolCallReadyAction, type ChatToolCallResultConfirmedAction, type ChatToolCallStartAction, type SessionTitleChangedAction, type ChatTurnCancelledAction, type ChatTurnCompleteAction, type ChatTurnStartedAction, type ChatErrorAction, type ChatUsageAction, type ChatToolCallContentChangedAction, type StateAction, type ChatPendingMessageSetAction, type ChatPendingMessageRemovedAction, type ChatQueuedMessagesReorderedAction, type SessionIsReadChangedAction, type SessionIsArchivedChangedAction, type SessionWorkingDirectorySetAction, type SessionWorkingDirectoryRemovedAction, type SessionWorkingDirectoryReplacedAction, type RootConfigChangedAction } from "./protocol/actions.js"; import type { SessionSummary } from "./protocol/state.js"; import type { SessionAddedParams, SessionRemovedParams, SessionSummaryChangedParams as ProtocolSessionSummaryChangedParams, ProgressParams, AuthRequiredParams } from "./protocol/notifications.js"; import type { RootAction as IRootAction_, SessionAction as ISessionAction_, ChatAction as IChatAction_, ClientSessionAction as IClientSessionAction_, ServerSessionAction as IServerSessionAction_, ClientChatAction as IClientChatAction_, ServerChatAction as IServerChatAction_, TerminalAction as ITerminalAction_, ClientTerminalAction as IClientTerminalAction_, ChangesetAction as IChangesetAction_, ClientChangesetAction as IClientChangesetAction_, AnnotationsAction as IAnnotationsAction_, ClientAnnotationsAction as IClientAnnotationsAction_, AutomationAction as IAutomationAction_, ClientAutomationAction as IClientAutomationAction_, AutomationRunAction as IAutomationRunAction_, ClientAutomationRunAction as IClientAutomationRunAction_ } from "./protocol/action-origin.generated.js"; export type SessionSummaryChanges = Omit, "activity"> & { /** `null` explicitly clears activity; omission leaves it unchanged. */ activity?: string | null; }; export type SessionSummaryChangedParams = Omit & { readonly changes: SessionSummaryChanges; }; /** * Discriminated union of all server→client protocol notifications other than * the action envelope. Each variant carries its protocol `method` so callers * can switch on `type` the same way they did against the old `NotificationType` * enum. */ export type ProtocolNotification = ({ type: "root/sessionAdded"; } & SessionAddedParams) | ({ type: "root/sessionRemoved"; } & SessionRemovedParams) | ({ type: "root/sessionSummaryChanged"; } & SessionSummaryChangedParams) | ({ type: "root/progress"; } & ProgressParams) | ({ type: "auth/required"; } & AuthRequiredParams); export type RootAction = IRootAction_; export type SessionAction = ISessionAction_; export type ChatAction = IChatAction_; export type ClientSessionAction = IClientSessionAction_; export type ServerSessionAction = IServerSessionAction_; export type ClientChatAction = IClientChatAction_; export type ServerChatAction = IServerChatAction_; export type TerminalAction = ITerminalAction_; export type ClientTerminalAction = IClientTerminalAction_; export type ChangesetAction = IChangesetAction_; export type ClientChangesetAction = IClientChangesetAction_; export type AnnotationsAction = IAnnotationsAction_; export type ClientAnnotationsAction = IClientAnnotationsAction_; export type AutomationAction = IAutomationAction_; export type ClientAutomationAction = IClientAutomationAction_; export type AutomationRunAction = IAutomationRunAction_; export type ClientAutomationRunAction = IClientAutomationRunAction_; export type IAgentsChangedAction = RootAgentsChangedAction; export type IActiveSessionsChangedAction = RootActiveSessionsChangedAction; export type IRootConfigChangedAction = RootConfigChangedAction; export type ITurnStartedAction = ChatTurnStartedAction; export type IDeltaAction = ChatDeltaAction; export type IResponsePartAction = ChatResponsePartAction; export type IToolCallStartAction = ChatToolCallStartAction; export type IToolCallDeltaAction = ChatToolCallDeltaAction; export type IToolCallReadyAction = ChatToolCallReadyAction; export type IToolCallApprovedAction = ChatToolCallApprovedAction; export type IToolCallDeniedAction = ChatToolCallDeniedAction; export type IToolCallConfirmedAction = ChatToolCallConfirmedAction; export type IToolCallCompleteAction = ChatToolCallCompleteAction; export type IToolCallResultConfirmedAction = ChatToolCallResultConfirmedAction; export type ITurnCompleteAction = ChatTurnCompleteAction; export type ITurnCancelledAction = ChatTurnCancelledAction; export type ITitleChangedAction = SessionTitleChangedAction; export type IUsageAction = ChatUsageAction; export type IReasoningAction = ChatReasoningAction; export type IErrorAction = ChatErrorAction; export type IToolCallContentChangedAction = ChatToolCallContentChangedAction; export type ICustomizationsChangedAction = import("./protocol/actions.js").SessionCustomizationsChangedAction; export type ICustomizationToggledAction = import("./protocol/actions.js").SessionCustomizationToggledAction; export type IPendingMessageSetAction = ChatPendingMessageSetAction; export type IPendingMessageRemovedAction = ChatPendingMessageRemovedAction; export type IQueuedMessagesReorderedAction = ChatQueuedMessagesReorderedAction; export type IIsReadChangedAction = SessionIsReadChangedAction; export type IIsArchivedChangedAction = SessionIsArchivedChangedAction; /** Session-level working-directory mutations. */ export type SessionWorkingDirectoryAction = SessionWorkingDirectorySetAction | SessionWorkingDirectoryRemovedAction | SessionWorkingDirectoryReplacedAction; export type INotification = ProtocolNotification; export declare function isRootAction(action: StateAction): action is RootAction; export declare function isSessionAction(action: StateAction): action is SessionAction; export declare function isChatAction(action: StateAction): action is ChatAction; export declare function isTerminalAction(action: StateAction): action is TerminalAction; export declare function isChangesetAction(action: StateAction): action is ChangesetAction; export declare function isAnnotationsAction(action: StateAction): action is AnnotationsAction; export declare function isAutomationAction(action: StateAction): action is AutomationAction; export declare function isAutomationRunAction(action: StateAction): action is AutomationRunAction; /** * Whether `action` only toggles durable session metadata (archived / read) * rather than mutating the conversation. These carry no intent to open a * session, so the host applies them without materializing it. */ export declare function isPassiveSessionMetadataAction(action: StateAction): action is SessionIsArchivedChangedAction | SessionIsReadChangedAction;