@yinaoxiong/paseo-client 0.18.2-personal.2 → 0.19.2-personal.1

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/build-info.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "upstreamVersion": "0.18.2",
4
- "revision": 2,
5
- "version": "0.18.2-personal.2",
6
- "appVersion": "0.18.2",
7
- "androidVersionCode": 18002002,
8
- "iosBuildNumber": "18002002",
9
- "sourceSha": "96a72e49e867e89043fe70bbac4afe6921d1f477",
10
- "lockSha256": "8bcf4983ccfa57cfa444ec7ecbad301c8fef0fcc2c495df5176758cf1e2f2faa",
3
+ "upstreamVersion": "0.19.2",
4
+ "revision": 1,
5
+ "version": "0.19.2-personal.1",
6
+ "appVersion": "0.19.2",
7
+ "androidVersionCode": 19002001,
8
+ "iosBuildNumber": "19002001",
9
+ "sourceSha": "9cbe5ba2dd85ec96b031653dfa0bc75cb4c535d7",
10
+ "lockSha256": "09ab224c826745f06f8444ff5c7a842720c26b75bcd609f7112da1b7365f5cd2",
11
11
  "nodeVersion": "v24.21.0",
12
12
  "npmVersion": "11.19.0",
13
13
  "platform": "linux",
14
14
  "arch": "x64",
15
15
  "signature": "unsigned",
16
16
  "packageName": "@yinaoxiong/paseo-client",
17
- "desktopVersion": "0.18.2+personal.2"
17
+ "desktopVersion": "0.19.2+personal.1"
18
18
  }
@@ -40,8 +40,10 @@ export declare const DEFAULT_CLIENT_CAPABILITIES: {
40
40
  compact_provider_snapshots: true;
41
41
  provider_snapshot_references: true;
42
42
  timeline_replacement_invalidation: true;
43
+ timeline_rewind_operations: true;
43
44
  timeline_notifications: true;
44
45
  plugin_timeline_items: true;
46
+ timeline_provider_switches: true;
45
47
  compaction_lifecycle: true;
46
48
  workspace_setup_blocked: true;
47
49
  workspace_setup_observation: true;
@@ -106,8 +106,10 @@ export const DEFAULT_CLIENT_CAPABILITIES = {
106
106
  [CLIENT_CAPS.compactProviderSnapshots]: true,
107
107
  [CLIENT_CAPS.providerSnapshotReferences]: true,
108
108
  [CLIENT_CAPS.timelineReplacementInvalidation]: true,
109
+ [CLIENT_CAPS.timelineRewindOperations]: true,
109
110
  [CLIENT_CAPS.timelineNotifications]: true,
110
111
  [CLIENT_CAPS.pluginTimelineItems]: true,
112
+ [CLIENT_CAPS.timelineProviderSwitches]: true,
111
113
  [CLIENT_CAPS.compactionLifecycle]: true,
112
114
  [CLIENT_CAPS.workspaceSetupBlocked]: true,
113
115
  [CLIENT_CAPS.workspaceSetupObservation]: true,
@@ -212,7 +212,9 @@ export class LegacySubscriptions {
212
212
  case "subscribe_terminal_request":
213
213
  return (message.type === "terminal_stream_exit" && message.payload.terminalId === query.terminalId);
214
214
  case "agent.timeline.set_subscription.request":
215
- return ((message.type === "agent_stream" || message.type === "agent.timeline.replacement") &&
215
+ return ((message.type === "agent_stream" ||
216
+ message.type === "agent.timeline.replacement" ||
217
+ message.type === "agent.timeline.rewind") &&
216
218
  query.agentIds.includes(message.payload.agentId));
217
219
  case "session.events.set_subscription.request":
218
220
  return query.events.includes(message.type === "status" ? `status.${message.payload.status}` : message.type);
@@ -1,11 +1,13 @@
1
1
  import { type DiffCompare, type DiffState } from "./diff/index.js";
2
2
  import { type HostRouteFrame } from "@getpaseo/protocol/binary-frames/host-route";
3
3
  import type { HostAdd, HostUpdate, HostDirectory } from "@getpaseo/protocol/hosts";
4
+ import type { DaemonClientsSnapshot, HelloClientInfo } from "@getpaseo/protocol/daemon-clients";
4
5
  import type { UpdateScheduleNewAgentConfigInput } from "@getpaseo/protocol/schedule/types";
5
6
  import type { PluginListingDetail, PluginListingIndex } from "@getpaseo/protocol/plugin-registry";
6
7
  import { type TimelineMessage } from "./timeline-subscription/index.js";
7
8
  import { type OwnedSubscription, type TimelineSubscription } from "./connection/index.js";
8
- import type { CreationSnapshot } from "@getpaseo/protocol/messages";
9
+ import type { CreationSnapshot, QueuedAgentMessagePayload } from "@getpaseo/protocol/messages";
10
+ import { type CollectionState, SyncedStoreRegistry, type SyncBackoff, type SyncPersistence, type SyncRequestOptions, type SyncStore } from "./sync/index.js";
9
11
  import type { JsonValue } from "@getpaseo/protocol/agent-types";
10
12
  import type { z } from "zod";
11
13
  import type { SessionEventSubscription } from "@getpaseo/protocol/messages";
@@ -16,9 +18,9 @@ export type { DownloadFileOptions, DownloadMetadata, DownloadSink } from "./file
16
18
  export { FileDownloadCancelledError, throwIfFileDownloadAborted } from "./file-download.js";
17
19
  import type { AgentAttentionNotificationPayload } from "@getpaseo/protocol/agent-attention-notification";
18
20
  import type { NotificationPreferences } from "@getpaseo/protocol/notification-preferences";
19
- import type { AgentRefreshedStatusPayloadSchema, CheckoutRenameBranchResponseSchema, RenameTerminalResponseSchema, RestartRequestedStatusPayloadSchema, ShutdownRequestedStatusPayloadSchema, DaemonUpdateResponseSchema, AgentActiveTurnBehavior, AgentUnarchiveResult, ServerInfoStatusPayload, TerminalDefaultColors } from "@getpaseo/protocol/messages";
21
+ import type { AgentRefreshedStatusPayloadSchema, CheckoutRenameBranchResponseSchema, RenameTerminalResponseSchema, RestartRequestedStatusPayloadSchema, ShutdownRequestedStatusPayloadSchema, DaemonUpdateResponseSchema, ActiveTurnBehavior, AgentActiveTurnBehavior, AgentUnarchiveResult, ServerInfoStatusPayload, TerminalDefaultColors } from "@getpaseo/protocol/messages";
20
22
  import type { DaemonProtocolCodec } from "./daemon-protocol-codec.js";
21
- import type { AgentStreamEventPayload, AgentSnapshotPayload, ProjectPlacementPayload, AgentPermissionResolvedMessage, CreateAgentRequestMessage, CreatePaseoWorktreeRequest, FileDownloadTokenResponse, FileUploadResponse, NetworkTunnelCreateTicketPayload, FileExplorerResponse, FileVersion, FileWriteResult, FetchAgentTimelineResponseMessage, AgentForkContextResponseMessage, GitSetupOptions, CheckoutStatusResponse, CheckoutCommit, CheckoutWorktree, ParsedDiffFile, CheckoutCommitResponse, CheckoutMergeResponse, CheckoutMergeFromBaseResponse, CheckoutPullResponse, CheckoutPushResponse, CheckoutRefreshResponse, CheckoutPrCreateResponse, CheckoutPrMergeResponse, CheckoutPrMergeMethod, CheckoutForgeSetAutoMergeResponse, CheckoutGithubSetAutoMergeResponse, CheckoutForgeGetCheckDetailsResponse, CheckoutGithubGetCheckDetailsResponse, CheckoutPrStatusResponse, PullRequestTimelineResponse, CheckoutSwitchBranchResponse, StashSaveResponse, StashPopResponse, StashListResponse, ValidateBranchResponse, BranchSuggestionsResponse, ForgeSearchResponse, ForgeSearchRequest, GitHubSearchResponse, GitHubSearchRequest, DirectorySuggestionsResponse, PaseoWorktreeListResponse, PaseoWorktreeArchiveResponse, ProjectIconSource, ProjectIconResponse, ProjectIconGetResponse, ProjectAddResponse, ProjectCreateDirectoryResponse, OpenProjectResponseMessage, WorkspaceGithubSearchRepositoriesResponse, ProjectGithubCloneProtocol, ProjectGithubCloneResponse, ArchiveWorkspaceResponseMessage, WorkspaceSetupStatusResponseMessage, ListCommandsResponse, ListProviderFeaturesResponseMessage, ProviderControlsListResponseMessage, ListProviderModelsResponseMessage, ListProviderModesResponseMessage, ListAvailableProvidersResponse, GetProvidersSnapshotResponseMessage, RefreshProvidersSnapshotResponseMessage, ProviderDiagnosticResponseMessage, ProviderUsageListResponseMessage, ProviderInstallationInspectResponseMessage, ProviderInstallationCheckUpdatesResponseMessage, UsageReportEntry, DaemonGetStatusResponse, DaemonTailscaleSetResponse, DaemonGetPairingOfferResponse, DaemonConfigReloadResponse, DiagnosticsResponse, AgentRewindResponseMessage, ListTerminalsResponse, CreateTerminalResponse, SubscribeTerminalResponse, SubscribeTerminalRequest, CloseItemsResponse, KillTerminalResponse, CaptureTerminalResponse, TerminalInput, SessionInboundMessage, SessionOutboundMessage, SendAgentMessageRequest, PaseoConfigRaw, PaseoConfigRevision, WorkspaceCreateRequest, WorkspaceRecoveryState, PluginListItem, PluginLogEntry, PluginSourceStatusItem, PluginSourceUpdateItem, PluginUpdateSelection, PluginUpdateProposal, PluginUpdatePreview, PluginUpdateResult, AgentSkillSelection, AgentSkillsStatus, AgentSkillsSaveResult } from "@getpaseo/protocol/messages";
23
+ import type { AgentStreamEventPayload, AgentSnapshotPayload, ProjectPlacementPayload, AgentPermissionResolvedMessage, CreateAgentRequestMessage, CreatePaseoWorktreeRequest, FileDownloadTokenResponse, FileUploadResponse, NetworkTunnelCreateTicketPayload, FileExplorerResponse, FileVersion, FileWriteResult, FetchAgentTimelineResponseMessage, AgentForkContextResponseMessage, GitSetupOptions, CheckoutStatusResponse, CheckoutCommit, CheckoutWorktree, ParsedDiffFile, CheckoutCommitResponse, CheckoutMergeResponse, CheckoutMergeFromBaseResponse, CheckoutPullResponse, CheckoutPushResponse, CheckoutRefreshResponse, CheckoutPrCreateResponse, CheckoutPrMergeResponse, CheckoutPrMergeMethod, CheckoutForgeSetAutoMergeResponse, CheckoutGithubSetAutoMergeResponse, CheckoutForgeGetCheckDetailsResponse, CheckoutGithubGetCheckDetailsResponse, CheckoutPrStatusResponse, PullRequestTimelineResponse, CheckoutSwitchBranchResponse, StashSaveResponse, StashPopResponse, StashListResponse, ValidateBranchResponse, BranchSuggestionsResponse, ForgeSearchResponse, ForgeSearchRequest, GitHubSearchResponse, GitHubSearchRequest, DirectorySuggestionsResponse, PaseoWorktreeListResponse, PaseoWorktreeArchiveResponse, ProjectIconSource, ProjectIconResponse, ProjectIconGetResponse, ProjectAddResponse, ProjectCreateDirectoryResponse, OpenProjectResponseMessage, WorkspaceGithubSearchRepositoriesResponse, ProjectGithubCloneProtocol, ProjectGithubCloneResponse, ArchiveWorkspaceResponseMessage, WorkspaceSetupStatusResponseMessage, ListCommandsResponse, ListProviderFeaturesResponseMessage, ProviderControlsListResponseMessage, ListProviderModelsResponseMessage, ListProviderModesResponseMessage, ListAvailableProvidersResponse, GetProvidersSnapshotResponseMessage, RefreshProvidersSnapshotResponseMessage, ProviderDiagnosticResponseMessage, ProviderUsageListResponseMessage, ProviderInstallationInspectResponseMessage, ProviderInstallationCheckUpdatesResponseMessage, UsageReportEntry, DaemonGetStatusResponse, DaemonTailscaleSetResponse, DaemonGetPairingOfferResponse, DaemonConfigReloadResponse, DiagnosticsResponse, AgentRewindResponseMessage, AgentProviderSwitchRequest, ListTerminalsResponse, CreateTerminalResponse, SubscribeTerminalResponse, SubscribeTerminalRequest, CloseItemsResponse, KillTerminalResponse, CaptureTerminalResponse, TerminalInput, SessionInboundMessage, SessionOutboundMessage, SendAgentMessageRequest, PaseoConfigRaw, PaseoConfigRevision, WorkspaceCreateRequest, WorkspaceRecoveryState, PluginListItem, PluginLogEntry, PluginSourceStatusItem, PluginSourceUpdateItem, PluginUpdateSelection, PluginUpdateProposal, PluginUpdatePreview, PluginUpdateResult, AgentSkillSelection, AgentSkillsStatus, AgentSkillsSaveResult } from "@getpaseo/protocol/messages";
22
24
  import type { AgentPermissionRequest, AgentPermissionResponse, AgentPersistenceHandle, AgentProviderNotice, AgentProvider, AgentSessionConfig } from "@getpaseo/protocol/agent-types";
23
25
  import type { AgentConfigApply, MutableDaemonConfig, MutableDaemonConfigPatch } from "@getpaseo/protocol/messages";
24
26
  import type { DaemonTransportFactory, WebSocketFactory } from "./daemon-client-transport-types.js";
@@ -33,6 +35,8 @@ export interface Logger {
33
35
  interface ImportAgentInputBase {
34
36
  cwd?: string;
35
37
  workspaceId?: string;
38
+ /** Import into a fresh workspace for `cwd` instead of the workspace already open there. */
39
+ newWorkspace?: boolean;
36
40
  labels?: Record<string, string>;
37
41
  }
38
42
  export type ImportAgentInput = (ImportAgentInputBase & {
@@ -147,6 +151,8 @@ export interface DaemonClientConfig {
147
151
  createPluginClientBundleStore?: (serverId: string) => PluginClientBundleStore;
148
152
  clientType?: "mobile" | "browser" | "cli" | "mcp" | "hub";
149
153
  appVersion?: string;
154
+ clientInfo?: HelloClientInfo;
155
+ hostLink?: boolean;
150
156
  runtimeGeneration?: number | null;
151
157
  password?: string;
152
158
  localCredential?: () => string | undefined | Promise<string | undefined>;
@@ -185,6 +191,10 @@ export interface DaemonClientConfig {
185
191
  * processes a wakeup per client every 10 s.
186
192
  */
187
193
  livenessHeartbeat?: boolean;
194
+ /** Keeps synced resource state between subscriptions. Defaults to 64 entries in memory. */
195
+ syncPersistence?: SyncPersistence;
196
+ /** Retry delays after a synced resource fails. Defaults to 1 s doubling up to 30 s. */
197
+ syncBackoff?: Partial<SyncBackoff>;
188
198
  }
189
199
  export interface DaemonClientTrace {
190
200
  isEnabled(): boolean;
@@ -196,6 +206,7 @@ export interface AgentMessageReceipt {
196
206
  deliveryStatus?: "queued";
197
207
  activeTurnBehavior?: AgentActiveTurnBehavior;
198
208
  guidance?: string;
209
+ messageId?: string;
199
210
  }
200
211
  export interface SendMessageOptions {
201
212
  sourceAgentId?: string;
@@ -213,6 +224,31 @@ export interface SendMessageOptions {
213
224
  }>;
214
225
  attachments?: SendAgentMessageRequest["attachments"];
215
226
  }
227
+ export interface SwitchAgentProviderOptions {
228
+ provider: AgentProvider;
229
+ model?: string | null;
230
+ modeId?: string | null;
231
+ thinkingOptionId?: string | null;
232
+ providerOptions?: Record<string, unknown>;
233
+ text: string;
234
+ messageId?: string;
235
+ images?: Array<{
236
+ data: string;
237
+ mimeType: string;
238
+ }>;
239
+ attachments?: AgentProviderSwitchRequest["attachments"];
240
+ /** Wait in the host's message queue and switch after the running turn ends. */
241
+ activeTurnBehavior?: "queue";
242
+ }
243
+ export interface SwitchAgentProviderResult {
244
+ agent?: AgentSnapshotPayload;
245
+ /** Set when the host queued the switch instead of running it. */
246
+ deliveryStatus?: "queued";
247
+ }
248
+ export declare class AgentProviderSwitchError extends Error {
249
+ readonly agent?: AgentSnapshotPayload | undefined;
250
+ constructor(message: string, agent?: AgentSnapshotPayload | undefined);
251
+ }
216
252
  export interface AgentAttentionRequiredNotification {
217
253
  agentId: string;
218
254
  reason: "finished" | "error" | "permission";
@@ -653,6 +689,29 @@ type CorrelatedResponsePayloads = {
653
689
  type CorrelatedResponsePayload<TType extends CorrelatedResponseType> = CorrelatedResponsePayloads[TType];
654
690
  export type AgentBackgroundWorkListPayload = CorrelatedResponsePayload<"agent.background_work.list.response">;
655
691
  export type AgentBackgroundWorkItem = AgentBackgroundWorkListPayload["items"][number];
692
+ export type AgentQueueItem = QueuedAgentMessagePayload;
693
+ export interface AgentQueueListResult {
694
+ held: boolean;
695
+ items: AgentQueueItem[];
696
+ }
697
+ export type AgentQueueStore = SyncStore<CollectionState<AgentQueueItem, {
698
+ held: boolean;
699
+ }>>;
700
+ export type AgentQueueWithdrawPayload = CorrelatedResponsePayload<"agent.queue.withdraw.response">;
701
+ export type AgentQueueWithdrawResult = {
702
+ withdrawn: true;
703
+ item: AgentQueueItem;
704
+ } | {
705
+ withdrawn: false;
706
+ reason: "not_found" | "already_dispatching";
707
+ };
708
+ export type AgentQueuePromotePayload = CorrelatedResponsePayload<"agent.queue.promote.response">;
709
+ export type AgentQueuePromoteResult = {
710
+ promoted: true;
711
+ } | {
712
+ promoted: false;
713
+ reason: "not_found" | "already_dispatching";
714
+ };
656
715
  type PluginCatalogResponseEntry = CorrelatedResponsePayload<"plugin.catalog.get.response">["plugins"][number];
657
716
  export type PluginCatalogEntry = Omit<PluginCatalogResponseEntry, "clientBundle"> & {
658
717
  clientBundle: string;
@@ -684,6 +743,14 @@ export declare class DaemonClientCore {
684
743
  private readonly codec;
685
744
  private readonly providerSnapshotUpdates;
686
745
  private readonly owned;
746
+ private readonly syncStores;
747
+ /**
748
+ * A synced resource partition. Collections fold themselves; streams take a reducer. The store is
749
+ * inert until subscribed and shares one host subscription with every store of the same key.
750
+ */
751
+ readonly sync: SyncedStoreRegistry["store"];
752
+ /** The current state of a synced resource partition, without keeping a subscription. */
753
+ readonly readSync: SyncedStoreRegistry["read"];
687
754
  private transport;
688
755
  private chunkedTransport;
689
756
  private helloAuth;
@@ -695,7 +762,7 @@ export declare class DaemonClientCore {
695
762
  private checkoutStatusInFlight;
696
763
  private connectionListeners;
697
764
  private reconnectTimeout;
698
- private connectTimeout;
765
+ private connectionAttempt;
699
766
  private pendingGenericTransportErrorTimeout;
700
767
  private reconnectAttempt;
701
768
  private traceConnectionAttempt;
@@ -743,6 +810,7 @@ export declare class DaemonClientCore {
743
810
  constructor(config: DaemonClientConfig);
744
811
  connect(): Promise<void>;
745
812
  private attemptConnect;
813
+ private openConnectionAttempt;
746
814
  private assertEncryptedRelayAuth;
747
815
  private resolveConnect;
748
816
  private rejectConnect;
@@ -754,6 +822,12 @@ export declare class DaemonClientCore {
754
822
  requireConnectedHosts(): void;
755
823
  listHosts(): Promise<HostDirectory>;
756
824
  observeHosts(): OwnedSubscription<HostDirectory>;
825
+ listConnectedClients(options?: {
826
+ includeInternal?: boolean;
827
+ }): Promise<DaemonClientsSnapshot>;
828
+ observeConnectedClients(options?: {
829
+ includeInternal?: boolean;
830
+ }): OwnedSubscription<DaemonClientsSnapshot>;
757
831
  addHost(input: HostAdd): Promise<{
758
832
  registrationId: string;
759
833
  serverId: string | null;
@@ -772,6 +846,9 @@ export declare class DaemonClientCore {
772
846
  code: string;
773
847
  message: string;
774
848
  } | null;
849
+ version?: string | null | undefined;
850
+ permissions?: ("daemon.read" | "daemon.manage" | "tunnel.manage" | "access.manage" | "workspace.read" | "workspace.write" | "workspace.manage" | "automation.manage" | "hub.execute")[] | undefined;
851
+ connectedAt?: string | null | undefined;
775
852
  }>;
776
853
  updateHost(registrationId: string, patch: HostUpdate): Promise<{
777
854
  registrationId: string;
@@ -791,6 +868,9 @@ export declare class DaemonClientCore {
791
868
  code: string;
792
869
  message: string;
793
870
  } | null;
871
+ version?: string | null | undefined;
872
+ permissions?: ("daemon.read" | "daemon.manage" | "tunnel.manage" | "access.manage" | "workspace.read" | "workspace.write" | "workspace.manage" | "automation.manage" | "hub.execute")[] | undefined;
873
+ connectedAt?: string | null | undefined;
794
874
  }>;
795
875
  removeHost(registrationId: string): Promise<void>;
796
876
  openHostRoute(serverId: string, scopeId: string): Promise<string>;
@@ -997,7 +1077,23 @@ export declare class DaemonClientCore {
997
1077
  stopWorkspaceScript(workspaceId: string, scriptName: string, requestId?: string): Promise<Extract<SessionOutboundMessage, {
998
1078
  type: "workspace.script.stop.response";
999
1079
  }>["payload"]>;
1000
- archiveWorkspace(workspaceId: string, requestId?: string): Promise<ArchiveWorkspacePayload>;
1080
+ private requireWorkspaceScriptTunnels;
1081
+ openWorkspaceScriptTunnel(input: {
1082
+ workspaceId: string;
1083
+ scriptName: string;
1084
+ providerId: string;
1085
+ }, requestId?: string): Promise<Extract<SessionOutboundMessage, {
1086
+ type: "workspace.script.tunnel.open.response";
1087
+ }>["payload"]>;
1088
+ closeWorkspaceScriptTunnel(input: {
1089
+ workspaceId: string;
1090
+ scriptName: string;
1091
+ }, requestId?: string): Promise<Extract<SessionOutboundMessage, {
1092
+ type: "workspace.script.tunnel.close.response";
1093
+ }>["payload"]>;
1094
+ archiveWorkspace(workspaceId: string, requestId?: string, options?: {
1095
+ force?: boolean;
1096
+ }): Promise<ArchiveWorkspacePayload>;
1001
1097
  observeWorkspaceSetup(workspaceId: string, options?: {
1002
1098
  signal?: AbortSignal;
1003
1099
  }): OwnedSubscription<CorrelatedResponsePayload<"workspace.setup.subscribe.response">>;
@@ -1090,6 +1186,19 @@ export declare class DaemonClientCore {
1090
1186
  signal?: AbortSignal;
1091
1187
  }): OwnedSubscription<CorrelatedResponsePayload<"session.events.set_subscription.response">>;
1092
1188
  private assertAgentBackgroundWorkSupported;
1189
+ listAgentQueue(agentId: string, options?: SyncRequestOptions): Promise<AgentQueueListResult>;
1190
+ /** The agent's queue, kept current while subscribed. */
1191
+ agentQueue(agentId: string): AgentQueueStore;
1192
+ private observeSync;
1193
+ withdrawAgentQueueItem(agentId: string, messageId: string, options?: {
1194
+ requestId?: string;
1195
+ timeout?: number;
1196
+ }): Promise<AgentQueueWithdrawResult>;
1197
+ promoteAgentQueueItem(agentId: string, messageId: string, activeTurnBehavior: ActiveTurnBehavior, options?: {
1198
+ requestId?: string;
1199
+ timeout?: number;
1200
+ }): Promise<AgentQueuePromoteResult>;
1201
+ private assertAgentMessageQueueSupported;
1093
1202
  fetchProviderSubagentTimeline(parentAgentId: string, subagentId: string, options?: FetchProviderSubagentTimelineOptions): Promise<ProviderSubagentTimelinePayload>;
1094
1203
  observeTimeline(agentIds: string[], options?: {
1095
1204
  signal?: AbortSignal;
@@ -1102,19 +1211,29 @@ export declare class DaemonClientCore {
1102
1211
  subscribeAgentTimeline(agentId: string, handler: (message: TimelineMessage) => void): TimelineSubscription;
1103
1212
  buildAgentForkContext(agentId: string, options?: AgentForkContextOptions): Promise<AgentForkContextPayload>;
1104
1213
  sendAgentMessage(agentId: string, text: string, options?: SendMessageOptions): Promise<AgentMessageReceipt>;
1214
+ switchAgentProvider(agentId: string, options: SwitchAgentProviderOptions): Promise<SwitchAgentProviderResult>;
1105
1215
  /** The behavior to put on the wire for this host. */
1106
1216
  private activeTurnBehaviorForHost;
1107
1217
  sendMessage(agentId: string, text: string, options?: SendMessageOptions): Promise<AgentMessageReceipt>;
1108
1218
  rewindAgent(agentId: string, messageId: string, mode: "conversation" | "files" | "both"): Promise<AgentRewindResponseMessage["payload"]>;
1109
1219
  cancelAgent(agentId: string): Promise<void>;
1110
- setAgentMode(agentId: string, modeId: string): Promise<AgentProviderNotice | null>;
1111
- setAgentModel(agentId: string, modelId: string | null): Promise<void>;
1112
- setAgentFeature(agentId: string, featureId: string, value: unknown): Promise<void>;
1220
+ private expectedProviderWireField;
1221
+ setAgentMode(agentId: string, modeId: string, options?: {
1222
+ expectedProvider?: AgentProvider;
1223
+ }): Promise<AgentProviderNotice | null>;
1224
+ setAgentModel(agentId: string, modelId: string | null, options?: {
1225
+ expectedProvider?: AgentProvider;
1226
+ }): Promise<void>;
1227
+ setAgentFeature(agentId: string, featureId: string, value: unknown, options?: {
1228
+ expectedProvider?: AgentProvider;
1229
+ }): Promise<void>;
1113
1230
  /**
1114
1231
  * Changes the agent's own provider options: top-level keys replace, `null` removes the key.
1115
1232
  * A daemon without `providerOptionControls` takes each key as a feature write.
1116
1233
  */
1117
- setAgentOptions(agentId: string, patch: Record<string, unknown>): Promise<AgentProviderNotice | null>;
1234
+ setAgentOptions(agentId: string, patch: Record<string, unknown>, options?: {
1235
+ expectedProvider?: AgentProvider;
1236
+ }): Promise<AgentProviderNotice | null>;
1118
1237
  /**
1119
1238
  * COMPAT(providerOptionControls): added in v0.15.0, remove after 2027-05-01.
1120
1239
  * A reset (`null`) on a daemon without `providerOptionControls` is written as the value its
@@ -1122,7 +1241,9 @@ export declare class DaemonClientCore {
1122
1241
  * the write is not delayed.
1123
1242
  */
1124
1243
  private legacyResetControls;
1125
- setAgentThinkingOption(agentId: string, thinkingOptionId: string | null): Promise<AgentProviderNotice | null>;
1244
+ setAgentThinkingOption(agentId: string, thinkingOptionId: string | null, options?: {
1245
+ expectedProvider?: AgentProvider;
1246
+ }): Promise<AgentProviderNotice | null>;
1126
1247
  /**
1127
1248
  * Applies a whole agent-config bundle in one request. Use this instead of
1128
1249
  * chaining the single-field setters when the values belong together so client
@@ -1130,7 +1251,9 @@ export declare class DaemonClientCore {
1130
1251
  * provider rejection can still leave earlier steps applied.
1131
1252
  * Gated on `server_info.features.agentConfigApply`.
1132
1253
  */
1133
- applyAgentConfig(agentId: string, config: AgentConfigApply): Promise<AgentProviderNotice | null>;
1254
+ applyAgentConfig(agentId: string, config: AgentConfigApply, options?: {
1255
+ expectedProvider?: AgentProvider;
1256
+ }): Promise<AgentProviderNotice | null>;
1134
1257
  restartServer(reason?: string, requestId?: string, options?: {
1135
1258
  timeout?: number;
1136
1259
  killTerminals?: boolean;
@@ -1258,6 +1381,7 @@ export declare class DaemonClientCore {
1258
1381
  branchName?: string;
1259
1382
  workspaceId?: string;
1260
1383
  scope?: "workspace" | "worktree";
1384
+ force?: boolean;
1261
1385
  }, requestId?: string): Promise<PaseoWorktreeArchivePayload>;
1262
1386
  createPaseoWorktree(input: CreatePaseoWorktreeInput, requestId?: string): Promise<CreatePaseoWorktreePayload>;
1263
1387
  createWorkspace(input: CreateWorkspaceRequestOptions, requestId?: string): Promise<WorkspaceCreatePayload>;
@@ -1356,6 +1480,10 @@ export declare class DaemonClientCore {
1356
1480
  * Gated on `server_info.features.networkTunnel`.
1357
1481
  */
1358
1482
  createNetworkTunnelTicket(requestId?: string): Promise<NetworkTunnelCreateTicketPayload>;
1483
+ private requireTunnelProviders;
1484
+ listTunnelProviders(requestId?: string): Promise<Extract<SessionOutboundMessage, {
1485
+ type: "tunnel.providers.list.response";
1486
+ }>["payload"]>;
1359
1487
  requestProjectIcon(cwd: string, requestId?: string): Promise<ProjectIconResponse["payload"]>;
1360
1488
  getProjectIcon(projectId: string, requestId?: string): Promise<ProjectIconGetResponse["payload"]>;
1361
1489
  listProviderModels(provider: AgentProvider, options?: {
@@ -1657,7 +1785,8 @@ export declare class DaemonClientCore {
1657
1785
  private sendHelloMessage;
1658
1786
  private disposeTransport;
1659
1787
  private cleanupTransport;
1660
- private resetConnectTimeout;
1788
+ private armHandshakeTimeout;
1789
+ private clearConnectionAttempt;
1661
1790
  private handleTransportMessage;
1662
1791
  private logSkippedElements;
1663
1792
  private handleJsonPayload;