@hyperdrive.bot/fleet-client 0.3.99
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/README.md +12 -0
- package/dist/compat/normalize-provider-models.d.ts +11 -0
- package/dist/compat/normalize-provider-models.js +42 -0
- package/dist/daemon-client-relay-e2ee-transport.d.ts +8 -0
- package/dist/daemon-client-relay-e2ee-transport.js +161 -0
- package/dist/daemon-client-runtime-metrics.d.ts +39 -0
- package/dist/daemon-client-runtime-metrics.js +173 -0
- package/dist/daemon-client-transport-types.d.ts +36 -0
- package/dist/daemon-client-transport-types.js +2 -0
- package/dist/daemon-client-transport-utils.d.ts +9 -0
- package/dist/daemon-client-transport-utils.js +121 -0
- package/dist/daemon-client-transport.d.ts +5 -0
- package/dist/daemon-client-transport.js +4 -0
- package/dist/daemon-client-websocket-transport.d.ts +8 -0
- package/dist/daemon-client-websocket-transport.js +120 -0
- package/dist/daemon-client.d.ts +1530 -0
- package/dist/daemon-client.js +5176 -0
- package/dist/index.d.ts +291 -0
- package/dist/index.js +181 -0
- package/dist/terminal-stream-router.d.ts +28 -0
- package/dist/terminal-stream-router.js +108 -0
- package/package.json +48 -0
|
@@ -0,0 +1,1530 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import { type ClientCapability } from "@hyperdrive.bot/fleet-protocol/client-capabilities";
|
|
3
|
+
import { AgentRefreshedStatusPayloadSchema, CheckoutRenameBranchResponseSchema, RenameTerminalResponseSchema, RestartRequestedStatusPayloadSchema, ShutdownRequestedStatusPayloadSchema, DaemonUpdateResponseSchema, type ServerInfoStatusPayload } from "@hyperdrive.bot/fleet-protocol/messages";
|
|
4
|
+
import type { SourceKind } from "@hyperdrive.bot/fleet-protocol/ingestion/types";
|
|
5
|
+
import type { FilterDraft, FilterPatch } from "@hyperdrive.bot/fleet-protocol/ingestion/rpc-schemas";
|
|
6
|
+
import type { ScheduleCadence } from "@hyperdrive.bot/fleet-protocol/schedule/types";
|
|
7
|
+
import type { AgentStreamEventPayload, InstalledExtension, AgentSnapshotPayload, ProjectPlacementPayload, AgentPermissionResolvedMessage, CreateAgentRequestMessage, CreatePaseoWorktreeRequest, FileDownloadTokenResponse, FileExplorerResponse, FetchAgentTimelineResponseMessage, AgentForkContextResponseMessage, GitSetupOptions, CheckoutStatusResponse, CheckoutCommitResponse, CheckoutMergeResponse, CheckoutMergeFromBaseResponse, CheckoutPullResponse, CheckoutPushResponse, CheckoutRefreshResponse, CheckoutPrCreateResponse, CheckoutPrMergeResponse, CheckoutPrMergeMethod, CheckoutGithubSetAutoMergeResponse, CheckoutGithubGetCheckDetailsResponse, CheckoutPrStatusResponse, PullRequestTimelineResponse, CheckoutSwitchBranchResponse, StashSaveResponse, StashPopResponse, StashListResponse, ValidateBranchResponse, BranchSuggestionsResponse, GitHubSearchResponse, GitHubSearchRequest, DirectorySuggestionsResponse, PaseoWorktreeListResponse, PaseoWorktreeArchiveResponse, ProjectIconResponse, ProjectAddResponse, OpenProjectResponseMessage, ArchiveWorkspaceResponseMessage, WorkspaceSetupStatusResponseMessage, ListCommandsResponse, ListProviderFeaturesResponseMessage, ListProviderModelsResponseMessage, ListProviderModesResponseMessage, ListAvailableProvidersResponse, GetProvidersSnapshotResponseMessage, RefreshProvidersSnapshotResponseMessage, ProviderDiagnosticResponseMessage, ProviderUsageListResponseMessage, DaemonGetStatusResponse, DaemonGetPairingOfferResponse, DiagnosticsResponse, AgentRewindResponseMessage, ListTerminalsResponse, CreateTerminalResponse, SubscribeTerminalResponse, SubscribeTerminalRequest, CloseItemsResponse, KillTerminalResponse, CaptureAgentPaneResponse, CaptureTerminalResponse, TerminalInput, SessionInboundMessage, SessionOutboundMessage, SendAgentMessageRequest, PaseoConfigRaw, PaseoConfigRevision, ProjectRenameResponse, BackgroundTaskPayload, ReferenceEnrichment, SessionDigest, SessionDigestLink, WatchNotificationActionMessage, WatchSessionSearchMessage, WatchComposerDictateMessage, WorkflowAgentPreset, WorkflowSnapshot, WorkflowStatus, WorkflowTaskGraph, WorkspaceCreateRequest, PendingDecision } from "@hyperdrive.bot/fleet-protocol/messages";
|
|
8
|
+
import type { AgentPermissionRequest, AgentPermissionResponse, AgentPersistenceHandle, AgentProviderNotice, AgentProvider, AgentSessionConfig } from "@hyperdrive.bot/fleet-protocol/agent-types";
|
|
9
|
+
import type { MutableDaemonConfig, MutableDaemonConfigPatch, ProvidersReloadConfigPayload } from "@hyperdrive.bot/fleet-protocol/messages";
|
|
10
|
+
import type { FileUploadErrorCode } from "@hyperdrive.bot/fleet-protocol/messages";
|
|
11
|
+
import { type DaemonTransportFactory, type WebSocketFactory } from "./daemon-client-transport.js";
|
|
12
|
+
import { type TerminalStreamEvent } from "./terminal-stream-router.js";
|
|
13
|
+
import type { BrowserAutomationExecuteRequest, BrowserAutomationExecuteResponse } from "@hyperdrive.bot/fleet-protocol/browser-automation/rpc-schemas";
|
|
14
|
+
export interface Logger {
|
|
15
|
+
debug(obj: object, msg?: string): void;
|
|
16
|
+
info(obj: object, msg?: string): void;
|
|
17
|
+
warn(obj: object, msg?: string): void;
|
|
18
|
+
error(obj: object, msg?: string): void;
|
|
19
|
+
}
|
|
20
|
+
interface ImportAgentInputBase {
|
|
21
|
+
cwd?: string;
|
|
22
|
+
labels?: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
export type ImportAgentInput = (ImportAgentInputBase & {
|
|
25
|
+
providerId: string;
|
|
26
|
+
providerHandleId: string;
|
|
27
|
+
}) | (ImportAgentInputBase & {
|
|
28
|
+
provider: AgentProvider;
|
|
29
|
+
sessionId: string;
|
|
30
|
+
});
|
|
31
|
+
export type { DaemonTransport, DaemonTransportFactory, WebSocketFactory, WebSocketLike, } from "./daemon-client-transport.js";
|
|
32
|
+
export type { TerminalStreamEvent };
|
|
33
|
+
export type ConnectionState = {
|
|
34
|
+
status: "idle";
|
|
35
|
+
} | {
|
|
36
|
+
status: "connecting";
|
|
37
|
+
attempt: number;
|
|
38
|
+
} | {
|
|
39
|
+
status: "connected";
|
|
40
|
+
} | {
|
|
41
|
+
status: "disconnected";
|
|
42
|
+
reason?: string;
|
|
43
|
+
} | {
|
|
44
|
+
status: "disposed";
|
|
45
|
+
};
|
|
46
|
+
export type DaemonEvent = {
|
|
47
|
+
type: "agent_update";
|
|
48
|
+
agentId: string;
|
|
49
|
+
payload: Extract<SessionOutboundMessage, {
|
|
50
|
+
type: "agent_update";
|
|
51
|
+
}>["payload"];
|
|
52
|
+
} | {
|
|
53
|
+
type: "workspace_update";
|
|
54
|
+
workspaceId: string;
|
|
55
|
+
payload: Extract<SessionOutboundMessage, {
|
|
56
|
+
type: "workspace_update";
|
|
57
|
+
}>["payload"];
|
|
58
|
+
} | {
|
|
59
|
+
type: "workspace_setup_progress";
|
|
60
|
+
workspaceId: string;
|
|
61
|
+
payload: Extract<SessionOutboundMessage, {
|
|
62
|
+
type: "workspace_setup_progress";
|
|
63
|
+
}>["payload"];
|
|
64
|
+
} | {
|
|
65
|
+
type: "agent_stream";
|
|
66
|
+
agentId: string;
|
|
67
|
+
event: AgentStreamEventPayload;
|
|
68
|
+
timestamp: string;
|
|
69
|
+
seq?: number;
|
|
70
|
+
epoch?: string;
|
|
71
|
+
} | {
|
|
72
|
+
type: "status";
|
|
73
|
+
payload: {
|
|
74
|
+
status: string;
|
|
75
|
+
} & Record<string, unknown>;
|
|
76
|
+
} | {
|
|
77
|
+
type: "agent_deleted";
|
|
78
|
+
agentId: string;
|
|
79
|
+
} | {
|
|
80
|
+
type: "agent_permission_request";
|
|
81
|
+
agentId: string;
|
|
82
|
+
request: AgentPermissionRequest;
|
|
83
|
+
} | {
|
|
84
|
+
type: "agent_permission_resolved";
|
|
85
|
+
agentId: string;
|
|
86
|
+
requestId: string;
|
|
87
|
+
resolution: AgentPermissionResponse;
|
|
88
|
+
} | {
|
|
89
|
+
type: "providers_snapshot_update";
|
|
90
|
+
payload: Extract<SessionOutboundMessage, {
|
|
91
|
+
type: "providers_snapshot_update";
|
|
92
|
+
}>["payload"];
|
|
93
|
+
} | {
|
|
94
|
+
type: "error";
|
|
95
|
+
message: string;
|
|
96
|
+
};
|
|
97
|
+
export type DaemonEventHandler = (event: DaemonEvent) => void;
|
|
98
|
+
export type BrowserAutomationExecuteRequestMessage = BrowserAutomationExecuteRequest;
|
|
99
|
+
export type BrowserAutomationExecuteResponseMessage = BrowserAutomationExecuteResponse;
|
|
100
|
+
export interface DaemonClientConfig {
|
|
101
|
+
url: string;
|
|
102
|
+
clientId: string;
|
|
103
|
+
clientType?: "mobile" | "browser" | "cli" | "mcp";
|
|
104
|
+
appVersion?: string;
|
|
105
|
+
runtimeGeneration?: number | null;
|
|
106
|
+
password?: string;
|
|
107
|
+
authHeader?: string;
|
|
108
|
+
suppressSendErrors?: boolean;
|
|
109
|
+
transportFactory?: DaemonTransportFactory;
|
|
110
|
+
webSocketFactory?: WebSocketFactory;
|
|
111
|
+
logger?: Logger;
|
|
112
|
+
connectTimeoutMs?: number;
|
|
113
|
+
e2ee?: {
|
|
114
|
+
enabled?: boolean;
|
|
115
|
+
daemonPublicKeyB64?: string;
|
|
116
|
+
};
|
|
117
|
+
reconnect?: {
|
|
118
|
+
enabled?: boolean;
|
|
119
|
+
baseDelayMs?: number;
|
|
120
|
+
maxDelayMs?: number;
|
|
121
|
+
};
|
|
122
|
+
runtimeMetricsIntervalMs?: number;
|
|
123
|
+
runtimeMetricsWindowMs?: number;
|
|
124
|
+
/**
|
|
125
|
+
* Override for how long a queued message waits for the WebSocket connection
|
|
126
|
+
* before its send is rejected with "Timed out waiting for connection".
|
|
127
|
+
* Defaults to {@link DEFAULT_SEND_QUEUE_TIMEOUT_MS} (10s). The mobile/host
|
|
128
|
+
* runtime ships a 2s override (Story B.2 / FR2.2) so the UI can render a
|
|
129
|
+
* "Reconnecting to daemon…" Suspense fallback quickly when the daemon is
|
|
130
|
+
* unreachable, instead of blocking the JS thread for ~10s per failing RPC.
|
|
131
|
+
*/
|
|
132
|
+
defaultSendQueueTimeoutMs?: number;
|
|
133
|
+
capabilities?: Partial<Record<ClientCapability, unknown>>;
|
|
134
|
+
}
|
|
135
|
+
export interface SendMessageOptions {
|
|
136
|
+
messageId?: string;
|
|
137
|
+
images?: Array<{
|
|
138
|
+
data: string;
|
|
139
|
+
mimeType: string;
|
|
140
|
+
}>;
|
|
141
|
+
attachments?: SendAgentMessageRequest["attachments"];
|
|
142
|
+
}
|
|
143
|
+
type AgentConfigOverrides = Partial<Omit<AgentSessionConfig, "provider" | "cwd">>;
|
|
144
|
+
export interface CreateAgentRequestOptions extends AgentConfigOverrides {
|
|
145
|
+
config?: AgentSessionConfig;
|
|
146
|
+
provider?: AgentProvider;
|
|
147
|
+
cwd?: string;
|
|
148
|
+
env?: CreateAgentRequestMessage["env"];
|
|
149
|
+
workspaceId?: string;
|
|
150
|
+
initialPrompt?: string;
|
|
151
|
+
clientMessageId?: string;
|
|
152
|
+
outputSchema?: Record<string, unknown>;
|
|
153
|
+
images?: CreateAgentRequestMessage["images"];
|
|
154
|
+
attachments?: CreateAgentRequestMessage["attachments"];
|
|
155
|
+
git?: GitSetupOptions;
|
|
156
|
+
worktree?: CreateAgentRequestMessage["worktree"];
|
|
157
|
+
autoArchive?: CreateAgentRequestMessage["autoArchive"];
|
|
158
|
+
worktreeName?: string;
|
|
159
|
+
requestId?: string;
|
|
160
|
+
labels?: Record<string, string>;
|
|
161
|
+
resumeSessionId?: string;
|
|
162
|
+
routine?: CreateAgentRequestMessage["routine"];
|
|
163
|
+
}
|
|
164
|
+
export interface CreatePaseoWorktreeInput extends Pick<CreatePaseoWorktreeRequest, "cwd" | "projectId" | "worktreeSlug" | "firstAgentContext" | "refName" | "action" | "githubPrNumber"> {
|
|
165
|
+
}
|
|
166
|
+
type CheckoutStatusPayload = CheckoutStatusResponse["payload"];
|
|
167
|
+
type SubscribeCheckoutDiffPayload = Extract<SessionOutboundMessage, {
|
|
168
|
+
type: "subscribe_checkout_diff_response";
|
|
169
|
+
}>["payload"];
|
|
170
|
+
type CheckoutDiffPayload = Omit<SubscribeCheckoutDiffPayload, "subscriptionId">;
|
|
171
|
+
type CheckoutCommitPayload = CheckoutCommitResponse["payload"];
|
|
172
|
+
type CheckoutMergePayload = CheckoutMergeResponse["payload"];
|
|
173
|
+
type CheckoutMergeFromBasePayload = CheckoutMergeFromBaseResponse["payload"];
|
|
174
|
+
type CheckoutPullPayload = CheckoutPullResponse["payload"];
|
|
175
|
+
type CheckoutPushPayload = CheckoutPushResponse["payload"];
|
|
176
|
+
type CheckoutRefreshPayload = CheckoutRefreshResponse["payload"];
|
|
177
|
+
type CheckoutPrCreatePayload = CheckoutPrCreateResponse["payload"];
|
|
178
|
+
type CheckoutPrMergePayload = CheckoutPrMergeResponse["payload"];
|
|
179
|
+
type CheckoutGithubSetAutoMergePayload = CheckoutGithubSetAutoMergeResponse["payload"];
|
|
180
|
+
type CheckoutGithubGetCheckDetailsPayload = CheckoutGithubGetCheckDetailsResponse["payload"];
|
|
181
|
+
type CheckoutPrStatusPayload = CheckoutPrStatusResponse["payload"];
|
|
182
|
+
type PullRequestTimelinePayload = PullRequestTimelineResponse["payload"];
|
|
183
|
+
type CheckoutSwitchBranchPayload = CheckoutSwitchBranchResponse["payload"];
|
|
184
|
+
export type RenameBranchResult = z.infer<typeof CheckoutRenameBranchResponseSchema>["payload"];
|
|
185
|
+
type StashSavePayload = StashSaveResponse["payload"];
|
|
186
|
+
type StashPopPayload = StashPopResponse["payload"];
|
|
187
|
+
type StashListPayload = StashListResponse["payload"];
|
|
188
|
+
type ValidateBranchPayload = ValidateBranchResponse["payload"];
|
|
189
|
+
type BranchSuggestionsPayload = BranchSuggestionsResponse["payload"];
|
|
190
|
+
type GitHubSearchPayload = GitHubSearchResponse["payload"];
|
|
191
|
+
type DirectorySuggestionsPayload = DirectorySuggestionsResponse["payload"];
|
|
192
|
+
type PaseoWorktreeListPayload = PaseoWorktreeListResponse["payload"];
|
|
193
|
+
type PaseoWorktreeArchivePayload = PaseoWorktreeArchiveResponse["payload"];
|
|
194
|
+
type CreatePaseoWorktreePayload = Extract<SessionOutboundMessage, {
|
|
195
|
+
type: "create_paseo_worktree_response";
|
|
196
|
+
}>["payload"];
|
|
197
|
+
type WorkspaceCreatePayload = Extract<SessionOutboundMessage, {
|
|
198
|
+
type: "workspace.create.response";
|
|
199
|
+
}>["payload"];
|
|
200
|
+
type FileExplorerPayload = FileExplorerResponse["payload"];
|
|
201
|
+
export type FileExplorerDirectoryPayload = NonNullable<FileExplorerPayload["directory"]>;
|
|
202
|
+
type LegacyFileExplorerFilePayload = NonNullable<FileExplorerPayload["file"]>;
|
|
203
|
+
export interface FileReadResult {
|
|
204
|
+
bytes: Uint8Array;
|
|
205
|
+
mime: string;
|
|
206
|
+
size: number;
|
|
207
|
+
path: string;
|
|
208
|
+
kind: LegacyFileExplorerFilePayload["kind"];
|
|
209
|
+
modifiedAt: string;
|
|
210
|
+
}
|
|
211
|
+
type FileDownloadTokenPayload = FileDownloadTokenResponse["payload"];
|
|
212
|
+
type ListProviderFeaturesPayload = ListProviderFeaturesResponseMessage["payload"];
|
|
213
|
+
type ListProviderModelsPayload = ListProviderModelsResponseMessage["payload"];
|
|
214
|
+
type ListProviderModesPayload = ListProviderModesResponseMessage["payload"];
|
|
215
|
+
type ListAvailableProvidersPayload = ListAvailableProvidersResponse["payload"];
|
|
216
|
+
type GetProvidersSnapshotPayload = GetProvidersSnapshotResponseMessage["payload"];
|
|
217
|
+
type RefreshProvidersSnapshotPayload = RefreshProvidersSnapshotResponseMessage["payload"];
|
|
218
|
+
type ProviderDiagnosticPayload = ProviderDiagnosticResponseMessage["payload"];
|
|
219
|
+
type ProviderUsageListPayload = ProviderUsageListResponseMessage["payload"];
|
|
220
|
+
type DaemonStatusPayload = DaemonGetStatusResponse["payload"];
|
|
221
|
+
type DaemonPairingOfferPayload = DaemonGetPairingOfferResponse["payload"];
|
|
222
|
+
type DiagnosticsPayload = DiagnosticsResponse["payload"];
|
|
223
|
+
type ReadProjectConfigPayload = Extract<SessionOutboundMessage, {
|
|
224
|
+
type: "read_project_config_response";
|
|
225
|
+
}>["payload"];
|
|
226
|
+
type WriteProjectConfigPayload = Extract<SessionOutboundMessage, {
|
|
227
|
+
type: "write_project_config_response";
|
|
228
|
+
}>["payload"];
|
|
229
|
+
type ListCommandsPayload = ListCommandsResponse["payload"];
|
|
230
|
+
type ListCommandsDraftConfig = Pick<AgentSessionConfig, "provider" | "cwd" | "modeId" | "model" | "thinkingOptionId" | "featureValues">;
|
|
231
|
+
export interface WriteProjectConfigInput {
|
|
232
|
+
repoRoot: string;
|
|
233
|
+
config: PaseoConfigRaw;
|
|
234
|
+
expectedRevision: PaseoConfigRevision | null;
|
|
235
|
+
requestId?: string;
|
|
236
|
+
}
|
|
237
|
+
interface ListCommandsOptions {
|
|
238
|
+
agentId: string;
|
|
239
|
+
requestId?: string;
|
|
240
|
+
draftConfig?: ListCommandsDraftConfig;
|
|
241
|
+
}
|
|
242
|
+
type LegacyListCommandsOptions = Omit<ListCommandsOptions, "agentId">;
|
|
243
|
+
type SetVoiceModePayload = Extract<SessionOutboundMessage, {
|
|
244
|
+
type: "set_voice_mode_response";
|
|
245
|
+
}>["payload"];
|
|
246
|
+
type AgentPermissionResolvedPayload = AgentPermissionResolvedMessage["payload"];
|
|
247
|
+
type ListTerminalsPayload = ListTerminalsResponse["payload"];
|
|
248
|
+
type CreateTerminalPayload = CreateTerminalResponse["payload"];
|
|
249
|
+
export type RenameTerminalResult = z.infer<typeof RenameTerminalResponseSchema>["payload"];
|
|
250
|
+
type SubscribeTerminalPayload = SubscribeTerminalResponse["payload"];
|
|
251
|
+
type CloseItemsPayload = CloseItemsResponse["payload"];
|
|
252
|
+
type KillTerminalPayload = KillTerminalResponse["payload"];
|
|
253
|
+
type CaptureTerminalPayload = CaptureTerminalResponse["payload"];
|
|
254
|
+
type CaptureAgentPanePayload = CaptureAgentPaneResponse["payload"];
|
|
255
|
+
type ChatCreatePayload = Extract<SessionOutboundMessage, {
|
|
256
|
+
type: "chat/create/response";
|
|
257
|
+
}>["payload"];
|
|
258
|
+
type ChatListPayload = Extract<SessionOutboundMessage, {
|
|
259
|
+
type: "chat/list/response";
|
|
260
|
+
}>["payload"];
|
|
261
|
+
type ChatInspectPayload = Extract<SessionOutboundMessage, {
|
|
262
|
+
type: "chat/inspect/response";
|
|
263
|
+
}>["payload"];
|
|
264
|
+
type ChatDeletePayload = Extract<SessionOutboundMessage, {
|
|
265
|
+
type: "chat/delete/response";
|
|
266
|
+
}>["payload"];
|
|
267
|
+
type ChatPostPayload = Extract<SessionOutboundMessage, {
|
|
268
|
+
type: "chat/post/response";
|
|
269
|
+
}>["payload"];
|
|
270
|
+
type ChatReadPayload = Extract<SessionOutboundMessage, {
|
|
271
|
+
type: "chat/read/response";
|
|
272
|
+
}>["payload"];
|
|
273
|
+
type ChatWaitPayload = Extract<SessionOutboundMessage, {
|
|
274
|
+
type: "chat/wait/response";
|
|
275
|
+
}>["payload"];
|
|
276
|
+
type LoopRunPayload = Extract<SessionOutboundMessage, {
|
|
277
|
+
type: "loop/run/response";
|
|
278
|
+
}>["payload"];
|
|
279
|
+
type LoopListPayload = Extract<SessionOutboundMessage, {
|
|
280
|
+
type: "loop/list/response";
|
|
281
|
+
}>["payload"];
|
|
282
|
+
type LoopInspectPayload = Extract<SessionOutboundMessage, {
|
|
283
|
+
type: "loop/inspect/response";
|
|
284
|
+
}>["payload"];
|
|
285
|
+
type LoopLogsPayload = Extract<SessionOutboundMessage, {
|
|
286
|
+
type: "loop/logs/response";
|
|
287
|
+
}>["payload"];
|
|
288
|
+
type LoopStopPayload = Extract<SessionOutboundMessage, {
|
|
289
|
+
type: "loop/stop/response";
|
|
290
|
+
}>["payload"];
|
|
291
|
+
type FleetListPayload = Extract<SessionOutboundMessage, {
|
|
292
|
+
type: "fleet/list/response";
|
|
293
|
+
}>["payload"];
|
|
294
|
+
type FleetInspectPayload = Extract<SessionOutboundMessage, {
|
|
295
|
+
type: "fleet/inspect/response";
|
|
296
|
+
}>["payload"];
|
|
297
|
+
type FleetRunNowPayload = Extract<SessionOutboundMessage, {
|
|
298
|
+
type: "fleet/run-now/response";
|
|
299
|
+
}>["payload"];
|
|
300
|
+
type FleetPausePayload = Extract<SessionOutboundMessage, {
|
|
301
|
+
type: "fleet/pause/response";
|
|
302
|
+
}>["payload"];
|
|
303
|
+
type FleetResumePayload = Extract<SessionOutboundMessage, {
|
|
304
|
+
type: "fleet/resume/response";
|
|
305
|
+
}>["payload"];
|
|
306
|
+
type FleetAskPayload = Extract<SessionOutboundMessage, {
|
|
307
|
+
type: "fleet/ask/response";
|
|
308
|
+
}>["payload"];
|
|
309
|
+
type FleetDecisionsPayload = Extract<SessionOutboundMessage, {
|
|
310
|
+
type: "fleet/decisions/response";
|
|
311
|
+
}>["payload"];
|
|
312
|
+
type FleetResolveDecisionPayload = Extract<SessionOutboundMessage, {
|
|
313
|
+
type: "fleet/resolve-decision/response";
|
|
314
|
+
}>["payload"];
|
|
315
|
+
type FleetSetParamsPayload = Extract<SessionOutboundMessage, {
|
|
316
|
+
type: "fleet/set-params/response";
|
|
317
|
+
}>["payload"];
|
|
318
|
+
type FleetSetModePayload = Extract<SessionOutboundMessage, {
|
|
319
|
+
type: "fleet/set-mode/response";
|
|
320
|
+
}>["payload"];
|
|
321
|
+
type FleetCreatePayload = Extract<SessionOutboundMessage, {
|
|
322
|
+
type: "fleet/create/response";
|
|
323
|
+
}>["payload"];
|
|
324
|
+
type FleetExecutionsPayload = Extract<SessionOutboundMessage, {
|
|
325
|
+
type: "fleet/executions/response";
|
|
326
|
+
}>["payload"];
|
|
327
|
+
export interface InspectFleetLoopOptions {
|
|
328
|
+
requestId?: string;
|
|
329
|
+
name: string;
|
|
330
|
+
}
|
|
331
|
+
export interface SetFleetLoopModeOptions {
|
|
332
|
+
requestId?: string;
|
|
333
|
+
name: string;
|
|
334
|
+
mode: "live" | "dry-run";
|
|
335
|
+
}
|
|
336
|
+
export interface AskFleetDecisionOptions {
|
|
337
|
+
requestId?: string;
|
|
338
|
+
name: string;
|
|
339
|
+
kind: "gate-approval" | "action-approval" | "outcome-review";
|
|
340
|
+
question: string;
|
|
341
|
+
posture: "blocking" | "deferring" | "advisory";
|
|
342
|
+
options: Array<{
|
|
343
|
+
id: string;
|
|
344
|
+
label: string;
|
|
345
|
+
effect: {
|
|
346
|
+
kind: "act" | "rehearse" | "defer" | "suppress";
|
|
347
|
+
reversibility: "reversible" | "compensable" | "irreversible";
|
|
348
|
+
compensatingAction?: string;
|
|
349
|
+
};
|
|
350
|
+
}>;
|
|
351
|
+
runId?: string;
|
|
352
|
+
itemKey?: string;
|
|
353
|
+
evidence?: string;
|
|
354
|
+
onExpiry?: string;
|
|
355
|
+
expiresInMs?: number;
|
|
356
|
+
}
|
|
357
|
+
export interface ListFleetDecisionsOptions {
|
|
358
|
+
requestId?: string;
|
|
359
|
+
name?: string;
|
|
360
|
+
includeResolved?: boolean;
|
|
361
|
+
}
|
|
362
|
+
export interface ResolveFleetDecisionOptions {
|
|
363
|
+
requestId?: string;
|
|
364
|
+
decisionId: string;
|
|
365
|
+
optionId: string;
|
|
366
|
+
}
|
|
367
|
+
export interface SetFleetLoopParamsOptions {
|
|
368
|
+
requestId?: string;
|
|
369
|
+
name: string;
|
|
370
|
+
values: Record<string, string | number | boolean | string[]>;
|
|
371
|
+
}
|
|
372
|
+
export interface CreateFleetLoopOptions {
|
|
373
|
+
requestId?: string;
|
|
374
|
+
name: string;
|
|
375
|
+
description: string;
|
|
376
|
+
cron: string;
|
|
377
|
+
action: string;
|
|
378
|
+
mode?: "live" | "dry-run";
|
|
379
|
+
rails?: string;
|
|
380
|
+
allowed?: string;
|
|
381
|
+
}
|
|
382
|
+
type ScheduleCreatePayload = Extract<SessionOutboundMessage, {
|
|
383
|
+
type: "schedule/create/response";
|
|
384
|
+
}>["payload"];
|
|
385
|
+
type ScheduleListPayload = Extract<SessionOutboundMessage, {
|
|
386
|
+
type: "schedule/list/response";
|
|
387
|
+
}>["payload"];
|
|
388
|
+
type IngestionBackfillPayload = Extract<SessionOutboundMessage, {
|
|
389
|
+
type: "ingestion/backfill/response";
|
|
390
|
+
}>["payload"];
|
|
391
|
+
export type IngestionApplyPayload = Extract<SessionOutboundMessage, {
|
|
392
|
+
type: "ingestion/apply/response";
|
|
393
|
+
}>["payload"];
|
|
394
|
+
export type IngestionCohortInspectPayload = Extract<SessionOutboundMessage, {
|
|
395
|
+
type: "ingestion/cohort/inspect/response";
|
|
396
|
+
}>["payload"];
|
|
397
|
+
export type IngestionCohortCancelPayload = Extract<SessionOutboundMessage, {
|
|
398
|
+
type: "ingestion/cohort/cancel/response";
|
|
399
|
+
}>["payload"];
|
|
400
|
+
/** Exported because `packages/app` (Story 6.3) renders this payload directly. */
|
|
401
|
+
export type IngestionRunsPayload = Extract<SessionOutboundMessage, {
|
|
402
|
+
type: "ingestion/runs/response";
|
|
403
|
+
}>["payload"];
|
|
404
|
+
export interface IngestionRunsOptions {
|
|
405
|
+
requestId?: string;
|
|
406
|
+
filterId: string;
|
|
407
|
+
/**
|
|
408
|
+
* Include the runs reconciliation has closed. Defaults to false at the daemon.
|
|
409
|
+
*
|
|
410
|
+
* Omit it. The Inbox wants open obligations, and the daemon's default is the
|
|
411
|
+
* one that cannot render a stale row by accident.
|
|
412
|
+
*/
|
|
413
|
+
includeClosed?: boolean;
|
|
414
|
+
}
|
|
415
|
+
type ScheduleInspectPayload = Extract<SessionOutboundMessage, {
|
|
416
|
+
type: "schedule/inspect/response";
|
|
417
|
+
}>["payload"];
|
|
418
|
+
type ScheduleLogsPayload = Extract<SessionOutboundMessage, {
|
|
419
|
+
type: "schedule/logs/response";
|
|
420
|
+
}>["payload"];
|
|
421
|
+
type SchedulePausePayload = Extract<SessionOutboundMessage, {
|
|
422
|
+
type: "schedule/pause/response";
|
|
423
|
+
}>["payload"];
|
|
424
|
+
type ScheduleResumePayload = Extract<SessionOutboundMessage, {
|
|
425
|
+
type: "schedule/resume/response";
|
|
426
|
+
}>["payload"];
|
|
427
|
+
type ScheduleDeletePayload = Extract<SessionOutboundMessage, {
|
|
428
|
+
type: "schedule/delete/response";
|
|
429
|
+
}>["payload"];
|
|
430
|
+
type ScheduleRunOncePayload = Extract<SessionOutboundMessage, {
|
|
431
|
+
type: "schedule/run-once/response";
|
|
432
|
+
}>["payload"];
|
|
433
|
+
type ScheduleUpdatePayload = Extract<SessionOutboundMessage, {
|
|
434
|
+
type: "schedule/update/response";
|
|
435
|
+
}>["payload"];
|
|
436
|
+
type SourceCataloguePayload = Extract<SessionOutboundMessage, {
|
|
437
|
+
type: "source/catalogue/response";
|
|
438
|
+
}>["payload"];
|
|
439
|
+
type SourceConnectPayload = Extract<SessionOutboundMessage, {
|
|
440
|
+
type: "source/connect/response";
|
|
441
|
+
}>["payload"];
|
|
442
|
+
type SourceListPayload = Extract<SessionOutboundMessage, {
|
|
443
|
+
type: "source/list/response";
|
|
444
|
+
}>["payload"];
|
|
445
|
+
type SourceCheckPayload = Extract<SessionOutboundMessage, {
|
|
446
|
+
type: "source/check/response";
|
|
447
|
+
}>["payload"];
|
|
448
|
+
export type IngestionFilterListPayload = Extract<SessionOutboundMessage, {
|
|
449
|
+
type: "ingestion/filter/list/response";
|
|
450
|
+
}>["payload"];
|
|
451
|
+
export type IngestionFilterCreatePayload = Extract<SessionOutboundMessage, {
|
|
452
|
+
type: "ingestion/filter/create/response";
|
|
453
|
+
}>["payload"];
|
|
454
|
+
export type IngestionFilterUpdatePayload = Extract<SessionOutboundMessage, {
|
|
455
|
+
type: "ingestion/filter/update/response";
|
|
456
|
+
}>["payload"];
|
|
457
|
+
export type IngestionFilterDeletePayload = Extract<SessionOutboundMessage, {
|
|
458
|
+
type: "ingestion/filter/delete/response";
|
|
459
|
+
}>["payload"];
|
|
460
|
+
export type FetchAgentTimelinePayload = FetchAgentTimelineResponseMessage["payload"];
|
|
461
|
+
export type AgentForkContextPayload = AgentForkContextResponseMessage["payload"];
|
|
462
|
+
export type FetchAgentTimelineDirection = FetchAgentTimelinePayload["direction"];
|
|
463
|
+
export type FetchAgentTimelineProjection = FetchAgentTimelinePayload["projection"];
|
|
464
|
+
export type FetchAgentTimelineCursor = NonNullable<FetchAgentTimelinePayload["startCursor"]>;
|
|
465
|
+
export interface FetchAgentOptions {
|
|
466
|
+
agentId: string;
|
|
467
|
+
requestId?: string;
|
|
468
|
+
timeout?: number;
|
|
469
|
+
}
|
|
470
|
+
type LegacyFetchAgentOptions = Omit<FetchAgentOptions, "agentId">;
|
|
471
|
+
export interface FetchAgentTimelineOptions {
|
|
472
|
+
direction?: FetchAgentTimelineDirection;
|
|
473
|
+
cursor?: FetchAgentTimelineCursor;
|
|
474
|
+
limit?: number;
|
|
475
|
+
projection?: FetchAgentTimelineProjection;
|
|
476
|
+
requestId?: string;
|
|
477
|
+
timeout?: number;
|
|
478
|
+
}
|
|
479
|
+
export interface AgentForkContextOptions {
|
|
480
|
+
boundaryMessageId?: string;
|
|
481
|
+
requestId?: string;
|
|
482
|
+
}
|
|
483
|
+
type AgentRefreshedStatusPayload = z.infer<typeof AgentRefreshedStatusPayloadSchema>;
|
|
484
|
+
type RestartRequestedStatusPayload = z.infer<typeof RestartRequestedStatusPayloadSchema>;
|
|
485
|
+
type ShutdownRequestedStatusPayload = z.infer<typeof ShutdownRequestedStatusPayloadSchema>;
|
|
486
|
+
export interface ShutdownServerOptions {
|
|
487
|
+
requestId?: string;
|
|
488
|
+
timeout?: number;
|
|
489
|
+
}
|
|
490
|
+
export interface DaemonStatusOptions {
|
|
491
|
+
requestId?: string;
|
|
492
|
+
timeout?: number;
|
|
493
|
+
}
|
|
494
|
+
export interface DaemonPairingOfferOptions {
|
|
495
|
+
requestId?: string;
|
|
496
|
+
timeout?: number;
|
|
497
|
+
}
|
|
498
|
+
type DaemonUpdateResponse = z.infer<typeof DaemonUpdateResponseSchema>;
|
|
499
|
+
type FetchAgentsPayload = Extract<SessionOutboundMessage, {
|
|
500
|
+
type: "fetch_agents_response";
|
|
501
|
+
}>["payload"];
|
|
502
|
+
type FetchAgentsRequest = Extract<SessionInboundMessage, {
|
|
503
|
+
type: "fetch_agents_request";
|
|
504
|
+
}>;
|
|
505
|
+
export type FetchAgentsOptions = Omit<FetchAgentsRequest, "type" | "requestId"> & {
|
|
506
|
+
requestId?: string;
|
|
507
|
+
timeout?: number;
|
|
508
|
+
};
|
|
509
|
+
export type FetchAgentsEntry = FetchAgentsPayload["entries"][number];
|
|
510
|
+
export type FetchAgentsPageInfo = FetchAgentsPayload["pageInfo"];
|
|
511
|
+
type FetchAgentHistoryPayload = Extract<SessionOutboundMessage, {
|
|
512
|
+
type: "fetch_agent_history_response";
|
|
513
|
+
}>["payload"];
|
|
514
|
+
type FetchAgentHistoryRequest = Extract<SessionInboundMessage, {
|
|
515
|
+
type: "fetch_agent_history_request";
|
|
516
|
+
}>;
|
|
517
|
+
export type FetchAgentHistoryOptions = Omit<FetchAgentHistoryRequest, "type" | "requestId"> & {
|
|
518
|
+
requestId?: string;
|
|
519
|
+
};
|
|
520
|
+
export type FetchAgentHistoryEntry = FetchAgentHistoryPayload["entries"][number];
|
|
521
|
+
export type FetchAgentHistoryPageInfo = FetchAgentHistoryPayload["pageInfo"];
|
|
522
|
+
type FetchRecentProviderSessionsPayload = Extract<SessionOutboundMessage, {
|
|
523
|
+
type: "fetch_recent_provider_sessions_response";
|
|
524
|
+
}>["payload"];
|
|
525
|
+
type FetchRecentProviderSessionsRequest = Extract<SessionInboundMessage, {
|
|
526
|
+
type: "fetch_recent_provider_sessions_request";
|
|
527
|
+
}>;
|
|
528
|
+
export type FetchRecentProviderSessionsOptions = Omit<FetchRecentProviderSessionsRequest, "type" | "requestId"> & {
|
|
529
|
+
requestId?: string;
|
|
530
|
+
};
|
|
531
|
+
export type FetchRecentProviderSessionEntry = FetchRecentProviderSessionsPayload["entries"][number];
|
|
532
|
+
type FetchWorkspacesPayload = Extract<SessionOutboundMessage, {
|
|
533
|
+
type: "fetch_workspaces_response";
|
|
534
|
+
}>["payload"];
|
|
535
|
+
type FetchWorkspacesRequest = Extract<SessionInboundMessage, {
|
|
536
|
+
type: "fetch_workspaces_request";
|
|
537
|
+
}>;
|
|
538
|
+
export type FetchWorkspacesOptions = Omit<FetchWorkspacesRequest, "type" | "requestId"> & {
|
|
539
|
+
requestId?: string;
|
|
540
|
+
};
|
|
541
|
+
export type FetchWorkspacesEntry = FetchWorkspacesPayload["entries"][number];
|
|
542
|
+
export type FetchWorkspacesPageInfo = FetchWorkspacesPayload["pageInfo"];
|
|
543
|
+
export interface CreateChatRoomOptions {
|
|
544
|
+
name: string;
|
|
545
|
+
purpose?: string | null;
|
|
546
|
+
requestId?: string;
|
|
547
|
+
}
|
|
548
|
+
export interface InspectChatRoomOptions {
|
|
549
|
+
room: string;
|
|
550
|
+
requestId?: string;
|
|
551
|
+
}
|
|
552
|
+
export interface DeleteChatRoomOptions {
|
|
553
|
+
room: string;
|
|
554
|
+
requestId?: string;
|
|
555
|
+
}
|
|
556
|
+
export interface PostChatMessageOptions {
|
|
557
|
+
room: string;
|
|
558
|
+
body: string;
|
|
559
|
+
authorAgentId?: string;
|
|
560
|
+
replyToMessageId?: string | null;
|
|
561
|
+
requestId?: string;
|
|
562
|
+
}
|
|
563
|
+
export interface ReadChatMessagesOptions {
|
|
564
|
+
room: string;
|
|
565
|
+
limit?: number;
|
|
566
|
+
since?: string;
|
|
567
|
+
authorAgentId?: string;
|
|
568
|
+
requestId?: string;
|
|
569
|
+
timeout?: number;
|
|
570
|
+
}
|
|
571
|
+
export interface WaitForChatMessagesOptions {
|
|
572
|
+
room: string;
|
|
573
|
+
afterMessageId?: string | null;
|
|
574
|
+
timeoutMs?: number;
|
|
575
|
+
requestId?: string;
|
|
576
|
+
}
|
|
577
|
+
export interface RunLoopOptions {
|
|
578
|
+
prompt: string;
|
|
579
|
+
cwd: string;
|
|
580
|
+
provider?: string;
|
|
581
|
+
model?: string;
|
|
582
|
+
modeId?: string;
|
|
583
|
+
verifierProvider?: string;
|
|
584
|
+
verifierModel?: string;
|
|
585
|
+
verifierModeId?: string;
|
|
586
|
+
verifyPrompt?: string | null;
|
|
587
|
+
verifyChecks?: string[];
|
|
588
|
+
name?: string | null;
|
|
589
|
+
sleepMs?: number;
|
|
590
|
+
maxIterations?: number;
|
|
591
|
+
maxTimeMs?: number;
|
|
592
|
+
requestId?: string;
|
|
593
|
+
}
|
|
594
|
+
export interface InspectLoopOptions {
|
|
595
|
+
id: string;
|
|
596
|
+
requestId?: string;
|
|
597
|
+
}
|
|
598
|
+
export interface LoopLogsOptions {
|
|
599
|
+
id: string;
|
|
600
|
+
afterSeq?: number;
|
|
601
|
+
requestId?: string;
|
|
602
|
+
}
|
|
603
|
+
export interface StopLoopOptions {
|
|
604
|
+
id: string;
|
|
605
|
+
requestId?: string;
|
|
606
|
+
}
|
|
607
|
+
export interface CreateScheduleOptions {
|
|
608
|
+
prompt: string;
|
|
609
|
+
name?: string | null;
|
|
610
|
+
cadence: ScheduleCadence;
|
|
611
|
+
target: {
|
|
612
|
+
type: "self";
|
|
613
|
+
agentId: string;
|
|
614
|
+
} | {
|
|
615
|
+
type: "agent";
|
|
616
|
+
agentId: string;
|
|
617
|
+
} | {
|
|
618
|
+
type: "new-agent";
|
|
619
|
+
config: {
|
|
620
|
+
provider: AgentProvider;
|
|
621
|
+
cwd: string;
|
|
622
|
+
modeId?: string;
|
|
623
|
+
model?: string;
|
|
624
|
+
thinkingOptionId?: string;
|
|
625
|
+
title?: string | null;
|
|
626
|
+
approvalPolicy?: string;
|
|
627
|
+
sandboxMode?: string;
|
|
628
|
+
networkAccess?: boolean;
|
|
629
|
+
webSearch?: boolean;
|
|
630
|
+
extra?: AgentSessionConfig["extra"];
|
|
631
|
+
systemPrompt?: string;
|
|
632
|
+
mcpServers?: AgentSessionConfig["mcpServers"];
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
maxRuns?: number;
|
|
636
|
+
expiresAt?: string;
|
|
637
|
+
runOnCreate?: boolean;
|
|
638
|
+
requestId?: string;
|
|
639
|
+
}
|
|
640
|
+
export interface InspectScheduleOptions {
|
|
641
|
+
id: string;
|
|
642
|
+
requestId?: string;
|
|
643
|
+
}
|
|
644
|
+
export interface SourceCatalogueOptions {
|
|
645
|
+
kind: SourceKind;
|
|
646
|
+
query: string;
|
|
647
|
+
/** Opaque aggregator cursor from a previous page. Pass it back untouched, never parse it. */
|
|
648
|
+
cursor?: string;
|
|
649
|
+
requestId?: string;
|
|
650
|
+
}
|
|
651
|
+
export interface SourceConnectOptions {
|
|
652
|
+
kind: SourceKind;
|
|
653
|
+
appSlug: string;
|
|
654
|
+
requestId?: string;
|
|
655
|
+
}
|
|
656
|
+
export interface SourceCheckOptions {
|
|
657
|
+
sourceId: string;
|
|
658
|
+
requestId?: string;
|
|
659
|
+
}
|
|
660
|
+
export interface IngestionFilterListOptions {
|
|
661
|
+
/** Absent means every filter on the daemon. */
|
|
662
|
+
sourceId?: string;
|
|
663
|
+
requestId?: string;
|
|
664
|
+
}
|
|
665
|
+
export interface IngestionFilterCreateOptions {
|
|
666
|
+
draft: FilterDraft;
|
|
667
|
+
requestId?: string;
|
|
668
|
+
}
|
|
669
|
+
export interface IngestionFilterUpdateOptions {
|
|
670
|
+
filterId: string;
|
|
671
|
+
patch: FilterPatch;
|
|
672
|
+
requestId?: string;
|
|
673
|
+
}
|
|
674
|
+
export interface IngestionFilterDeleteOptions {
|
|
675
|
+
filterId: string;
|
|
676
|
+
requestId?: string;
|
|
677
|
+
}
|
|
678
|
+
export interface UpdateScheduleNewAgentConfig {
|
|
679
|
+
provider?: string;
|
|
680
|
+
model?: string | null;
|
|
681
|
+
modeId?: string | null;
|
|
682
|
+
cwd?: string;
|
|
683
|
+
}
|
|
684
|
+
export interface UpdateScheduleOptions {
|
|
685
|
+
id: string;
|
|
686
|
+
name?: string | null;
|
|
687
|
+
prompt?: string;
|
|
688
|
+
cadence?: ScheduleCadence;
|
|
689
|
+
newAgentConfig?: UpdateScheduleNewAgentConfig;
|
|
690
|
+
maxRuns?: number | null;
|
|
691
|
+
expiresAt?: string | null;
|
|
692
|
+
requestId?: string;
|
|
693
|
+
}
|
|
694
|
+
export interface RenameBranchInput {
|
|
695
|
+
cwd: string;
|
|
696
|
+
branch: string;
|
|
697
|
+
requestId?: string;
|
|
698
|
+
}
|
|
699
|
+
export interface RenameTerminalInput {
|
|
700
|
+
terminalId: string;
|
|
701
|
+
title: string;
|
|
702
|
+
requestId?: string;
|
|
703
|
+
}
|
|
704
|
+
type OpenProjectPayload = OpenProjectResponseMessage["payload"];
|
|
705
|
+
type ProjectAddPayload = ProjectAddResponse["payload"];
|
|
706
|
+
type ArchiveWorkspacePayload = ArchiveWorkspaceResponseMessage["payload"];
|
|
707
|
+
type WorkspaceSetupStatusPayload = WorkspaceSetupStatusResponseMessage["payload"];
|
|
708
|
+
export interface FetchAgentResult {
|
|
709
|
+
agent: AgentSnapshotPayload;
|
|
710
|
+
project: ProjectPlacementPayload | null;
|
|
711
|
+
}
|
|
712
|
+
export interface WaitForFinishResult {
|
|
713
|
+
status: "idle" | "error" | "permission" | "timeout";
|
|
714
|
+
final: AgentSnapshotPayload | null;
|
|
715
|
+
error: string | null;
|
|
716
|
+
lastMessage: string | null;
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Thrown when an in-flight `uploadFile()` is cancelled via its `AbortSignal`.
|
|
720
|
+
* Distinct from {@link UploadCapExceededError} and {@link UploadFailedError} so
|
|
721
|
+
* Epic 5's attachment-chip UI can render the "cancelled" state specifically.
|
|
722
|
+
*/
|
|
723
|
+
export declare class UploadCancelledError extends Error {
|
|
724
|
+
readonly uploadId: string;
|
|
725
|
+
constructor(uploadId: string);
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Thrown when the daemon rejects an upload because it exceeds the size cap —
|
|
729
|
+
* either the declared-size early reject at begin, or an incremental reject
|
|
730
|
+
* mid-stream (story 2.2). Carries the `too_large` code and any daemon detail.
|
|
731
|
+
*/
|
|
732
|
+
export declare class UploadCapExceededError extends Error {
|
|
733
|
+
readonly uploadId: string;
|
|
734
|
+
readonly code: Extract<FileUploadErrorCode, "too_large">;
|
|
735
|
+
constructor(uploadId: string, detail?: string);
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* Thrown for any other upload failure — transport error, `write_failed`,
|
|
739
|
+
* `checksum_mismatch`, or an unexpected daemon error. The third distinguishable
|
|
740
|
+
* reject path alongside cancelled and cap-exceeded.
|
|
741
|
+
*/
|
|
742
|
+
export declare class UploadFailedError extends Error {
|
|
743
|
+
readonly uploadId: string;
|
|
744
|
+
readonly code?: FileUploadErrorCode;
|
|
745
|
+
constructor(uploadId: string, message: string, code?: FileUploadErrorCode);
|
|
746
|
+
}
|
|
747
|
+
export declare class DaemonClient {
|
|
748
|
+
private config;
|
|
749
|
+
private transport;
|
|
750
|
+
private transportCleanup;
|
|
751
|
+
private rawMessageListeners;
|
|
752
|
+
private messageHandlers;
|
|
753
|
+
private eventListeners;
|
|
754
|
+
private waiters;
|
|
755
|
+
private checkoutStatusInFlight;
|
|
756
|
+
private connectionListeners;
|
|
757
|
+
private reconnectTimeout;
|
|
758
|
+
private connectTimeout;
|
|
759
|
+
private pendingGenericTransportErrorTimeout;
|
|
760
|
+
private reconnectAttempt;
|
|
761
|
+
private shouldReconnect;
|
|
762
|
+
private connectPromise;
|
|
763
|
+
private connectResolve;
|
|
764
|
+
private connectReject;
|
|
765
|
+
private lastErrorValue;
|
|
766
|
+
private connectionState;
|
|
767
|
+
private checkoutDiffSubscriptions;
|
|
768
|
+
private terminalDirectorySubscriptions;
|
|
769
|
+
private readonly terminalStreams;
|
|
770
|
+
private pendingBinaryFileReads;
|
|
771
|
+
private activeBinaryFileTransfers;
|
|
772
|
+
private completedBinaryFileReads;
|
|
773
|
+
private logger;
|
|
774
|
+
private pendingSendQueue;
|
|
775
|
+
private readonly logConnectionPath;
|
|
776
|
+
private readonly logServerId;
|
|
777
|
+
private readonly logClientIdHash;
|
|
778
|
+
private readonly logGeneration;
|
|
779
|
+
private lastServerInfoMessage;
|
|
780
|
+
private runtimeMetricsInterval;
|
|
781
|
+
private runtimeMetrics;
|
|
782
|
+
private pingProbe;
|
|
783
|
+
private livenessHeartbeatTimer;
|
|
784
|
+
private lastLivenessRttMs;
|
|
785
|
+
private consecutiveLivenessFailures;
|
|
786
|
+
constructor(config: DaemonClientConfig);
|
|
787
|
+
connect(): Promise<void>;
|
|
788
|
+
private attemptConnect;
|
|
789
|
+
private resolveConnect;
|
|
790
|
+
private rejectConnect;
|
|
791
|
+
close(): Promise<void>;
|
|
792
|
+
ensureConnected(): void;
|
|
793
|
+
getConnectionState(): ConnectionState;
|
|
794
|
+
subscribeConnectionStatus(listener: (status: ConnectionState) => void): () => void;
|
|
795
|
+
get isConnected(): boolean;
|
|
796
|
+
get isConnecting(): boolean;
|
|
797
|
+
get lastError(): string | null;
|
|
798
|
+
getLastLivenessRttMs(): number | null;
|
|
799
|
+
subscribe(handler: DaemonEventHandler): () => void;
|
|
800
|
+
subscribeRawMessages(handler: (message: SessionOutboundMessage) => void): () => void;
|
|
801
|
+
on<TType extends SessionOutboundMessage["type"]>(type: TType, handler: (message: Extract<SessionOutboundMessage, {
|
|
802
|
+
type: TType;
|
|
803
|
+
}>) => void): () => void;
|
|
804
|
+
on(handler: DaemonEventHandler): () => void;
|
|
805
|
+
/**
|
|
806
|
+
* Send a session message. For fire-and-forget messages (heartbeats, etc.),
|
|
807
|
+
* failures are suppressed if `suppressSendErrors` is configured.
|
|
808
|
+
* For RPC methods that wait for responses, use `sendSessionMessageOrThrow` instead.
|
|
809
|
+
*/
|
|
810
|
+
private sendSessionMessage;
|
|
811
|
+
private sendBinaryFrame;
|
|
812
|
+
/**
|
|
813
|
+
* Send a session message for RPC methods that create waiters.
|
|
814
|
+
* If the connection is still being established ("connecting"), the message
|
|
815
|
+
* is queued and will be sent once connected (or rejected after timeout).
|
|
816
|
+
* This prevents waiters from hanging forever when called during connection.
|
|
817
|
+
*/
|
|
818
|
+
private sendSessionMessageOrThrow;
|
|
819
|
+
/**
|
|
820
|
+
* Flush pending send queue - called when connection is established.
|
|
821
|
+
*/
|
|
822
|
+
private flushPendingSendQueue;
|
|
823
|
+
/**
|
|
824
|
+
* Reject all pending sends - called when connection fails or is closed.
|
|
825
|
+
*/
|
|
826
|
+
private rejectPendingSendQueue;
|
|
827
|
+
protected sendRequest<T>(params: {
|
|
828
|
+
requestId: string;
|
|
829
|
+
message: SessionInboundMessage;
|
|
830
|
+
timeout?: number;
|
|
831
|
+
select: (msg: SessionOutboundMessage) => T | null;
|
|
832
|
+
options?: {
|
|
833
|
+
skipQueue?: boolean;
|
|
834
|
+
};
|
|
835
|
+
}): Promise<T>;
|
|
836
|
+
private sendCorrelatedRequest;
|
|
837
|
+
private sendCorrelatedSessionRequest;
|
|
838
|
+
private sendNamespacedCorrelatedSessionRequest;
|
|
839
|
+
private sendSessionMessageStrict;
|
|
840
|
+
clearAgentAttention(agentId: string | string[]): Promise<void>;
|
|
841
|
+
clearWorkspaceAttention(workspaceId: string | string[]): Promise<void>;
|
|
842
|
+
sendHeartbeat(params: {
|
|
843
|
+
deviceType: "web" | "mobile";
|
|
844
|
+
focusedAgentId: string | null;
|
|
845
|
+
focusedTerminalId?: string | null;
|
|
846
|
+
lastActivityAt: string;
|
|
847
|
+
appVisible: boolean;
|
|
848
|
+
appVisibilityChangedAt?: string;
|
|
849
|
+
}): void;
|
|
850
|
+
registerPushToken(token: string): void;
|
|
851
|
+
/**
|
|
852
|
+
* Relay a watch-originated action (`watch.*`) over the existing WebSocket
|
|
853
|
+
* session transport. Fire-and-forget: the watch message types are already
|
|
854
|
+
* members of `SessionInboundMessageSchema`, so this forwards straight to the
|
|
855
|
+
* private `sendSessionMessage` path (`{ type: "session", message }`) — never
|
|
856
|
+
* an HTTP route, never a response-waiting RPC.
|
|
857
|
+
*/
|
|
858
|
+
sendWatchAction(message: WatchNotificationActionMessage | WatchSessionSearchMessage | WatchComposerDictateMessage): void;
|
|
859
|
+
ping(params?: {
|
|
860
|
+
requestId?: string;
|
|
861
|
+
timeoutMs?: number;
|
|
862
|
+
}): Promise<{
|
|
863
|
+
requestId: string;
|
|
864
|
+
clientSentAt: number;
|
|
865
|
+
serverReceivedAt: number;
|
|
866
|
+
serverSentAt: number;
|
|
867
|
+
rttMs: number;
|
|
868
|
+
}>;
|
|
869
|
+
measureLatency(params?: {
|
|
870
|
+
timeoutMs?: number;
|
|
871
|
+
}): Promise<number>;
|
|
872
|
+
private livenessPing;
|
|
873
|
+
private sendPingAwaitRtt;
|
|
874
|
+
private startLivenessHeartbeat;
|
|
875
|
+
private stopLivenessHeartbeat;
|
|
876
|
+
private scheduleNextLivenessHeartbeat;
|
|
877
|
+
fetchAgents(options?: FetchAgentsOptions): Promise<FetchAgentsPayload>;
|
|
878
|
+
fetchAgentHistory(options?: FetchAgentHistoryOptions): Promise<FetchAgentHistoryPayload>;
|
|
879
|
+
fetchRecentProviderSessions(options?: FetchRecentProviderSessionsOptions): Promise<FetchRecentProviderSessionsPayload>;
|
|
880
|
+
fetchWorkspaces(options?: FetchWorkspacesOptions): Promise<FetchWorkspacesPayload>;
|
|
881
|
+
openProject(cwd: string, requestId?: string): Promise<OpenProjectPayload>;
|
|
882
|
+
addProject(cwd: string, requestId?: string): Promise<ProjectAddPayload>;
|
|
883
|
+
startWorkspaceScript(workspaceId: string, scriptName: string, requestId?: string): Promise<Extract<SessionOutboundMessage, {
|
|
884
|
+
type: "start_workspace_script_response";
|
|
885
|
+
}>["payload"]>;
|
|
886
|
+
archiveWorkspace(workspaceId: string, requestId?: string): Promise<ArchiveWorkspacePayload>;
|
|
887
|
+
/**
|
|
888
|
+
* Set or clear the user's custom project name override. Pass `null` (or an
|
|
889
|
+
* empty/whitespace string, which the server normalizes to `null`) to clear
|
|
890
|
+
* the override and fall back to the derived project name.
|
|
891
|
+
*/
|
|
892
|
+
renameProject(projectId: string, customName: string | null, requestId?: string): Promise<ProjectRenameResponse["payload"]>;
|
|
893
|
+
fetchWorkspaceSetupStatus(workspaceId: string, requestId?: string): Promise<WorkspaceSetupStatusPayload>;
|
|
894
|
+
fetchAgent(options: FetchAgentOptions): Promise<FetchAgentResult | null>;
|
|
895
|
+
fetchAgent(agentId: string, requestId?: string): Promise<FetchAgentResult | null>;
|
|
896
|
+
fetchAgent(agentId: string, options?: LegacyFetchAgentOptions): Promise<FetchAgentResult | null>;
|
|
897
|
+
private resubscribeCheckoutDiffSubscriptions;
|
|
898
|
+
private resubscribeTerminalDirectorySubscriptions;
|
|
899
|
+
createAgent(options: CreateAgentRequestOptions): Promise<AgentSnapshotPayload>;
|
|
900
|
+
/**
|
|
901
|
+
* Create an agent and its standing routine in ONE request.
|
|
902
|
+
*
|
|
903
|
+
* Split from `createAgent` only because the caller needs the scheduleId back:
|
|
904
|
+
* `createAgent`'s return type has always been the bare snapshot, and widening
|
|
905
|
+
* it would ripple through every call site for a field almost none of them
|
|
906
|
+
* want. Both go through the same request, so there is no second code path for
|
|
907
|
+
* the daemon to disagree with.
|
|
908
|
+
*/
|
|
909
|
+
createAgentWithRoutine(options: CreateAgentRequestOptions & {
|
|
910
|
+
routine: NonNullable<CreateAgentRequestOptions["routine"]>;
|
|
911
|
+
}): Promise<{
|
|
912
|
+
agent: AgentSnapshotPayload;
|
|
913
|
+
routine: {
|
|
914
|
+
scheduleId: string;
|
|
915
|
+
nextRunAt: string | null;
|
|
916
|
+
};
|
|
917
|
+
}>;
|
|
918
|
+
private createAgentRequest;
|
|
919
|
+
deleteAgent(agentId: string): Promise<void>;
|
|
920
|
+
archiveAgent(agentId: string): Promise<{
|
|
921
|
+
archivedAt: string;
|
|
922
|
+
}>;
|
|
923
|
+
/**
|
|
924
|
+
* Dismiss a live background shell. For Claude Code agents this drives the
|
|
925
|
+
* CLI's own `ctrl+x ctrl+k` kill chord over the PTY (kills it inside Claude
|
|
926
|
+
* Code). Resolves to whether the dismiss was delivered.
|
|
927
|
+
*/
|
|
928
|
+
/**
|
|
929
|
+
* List background shells -- one agent's, or every agent's when `agentId` is
|
|
930
|
+
* omitted. These are commands the provider launched with `run_in_background`
|
|
931
|
+
* so they outlive the turn; the rows carry the command, status and start time
|
|
932
|
+
* so the client can show what is running and for how long.
|
|
933
|
+
*/
|
|
934
|
+
listBackgroundTasks(agentId?: string): Promise<BackgroundTaskPayload[]>;
|
|
935
|
+
/**
|
|
936
|
+
* Record session context (links + non-live credentials) onto an agent's
|
|
937
|
+
* digest. Used by the context hook, which runs beside an agent rather than
|
|
938
|
+
* inside it and so cannot reach the agent-scoped `set_session_digest` MCP
|
|
939
|
+
* tool.
|
|
940
|
+
*
|
|
941
|
+
* Returns how many secrets the daemon had to mask, so a caller can report
|
|
942
|
+
* that it handed over something it should not have.
|
|
943
|
+
*/
|
|
944
|
+
setAgentContext(input: {
|
|
945
|
+
agentId: string;
|
|
946
|
+
links?: {
|
|
947
|
+
kind: SessionDigestLink["kind"];
|
|
948
|
+
url: string;
|
|
949
|
+
label?: string;
|
|
950
|
+
}[];
|
|
951
|
+
secrets?: {
|
|
952
|
+
label: string;
|
|
953
|
+
value: string;
|
|
954
|
+
source?: string;
|
|
955
|
+
}[];
|
|
956
|
+
}): Promise<{
|
|
957
|
+
digest: SessionDigest | null;
|
|
958
|
+
maskedCount: number;
|
|
959
|
+
error?: string;
|
|
960
|
+
}>;
|
|
961
|
+
/**
|
|
962
|
+
* Ask the daemon what it can see about external reference URLs -- a GitLab
|
|
963
|
+
* pipeline's status, a merge request's state, a Jira issue's column.
|
|
964
|
+
*
|
|
965
|
+
* The provider credentials live on the daemon, so the app never holds one.
|
|
966
|
+
* An entry the daemon could not look up still comes back, carrying
|
|
967
|
+
* `unavailableReason`, so a card can say what it could not see instead of
|
|
968
|
+
* spinning. See docs/session-context-rail.md.
|
|
969
|
+
*/
|
|
970
|
+
enrichReferences(urls: string[]): Promise<ReferenceEnrichment[]>;
|
|
971
|
+
/**
|
|
972
|
+
* Read a background shell's captured output. Resolves with `text: null` when
|
|
973
|
+
* the daemon does not know the shell or it captured nothing. The daemon tails
|
|
974
|
+
* and redacts before sending.
|
|
975
|
+
*/
|
|
976
|
+
readBackgroundTaskOutput(agentId: string, taskId: string, options?: {
|
|
977
|
+
maxBytes?: number;
|
|
978
|
+
}): Promise<{
|
|
979
|
+
text: string | null;
|
|
980
|
+
truncated: boolean;
|
|
981
|
+
byteSize: number;
|
|
982
|
+
}>;
|
|
983
|
+
dismissBackgroundTask(agentId: string, taskId: string): Promise<{
|
|
984
|
+
dismissed: boolean;
|
|
985
|
+
}>;
|
|
986
|
+
detachAgent(agentId: string): Promise<void>;
|
|
987
|
+
/**
|
|
988
|
+
* `labels` is a PATCH: a string sets the key, `null` DELETES it, and an absent
|
|
989
|
+
* key is left untouched. Never pass a rebuilt whole bag - the daemon owns keys
|
|
990
|
+
* the client does not know about (schedules, loops, workflows, kanban).
|
|
991
|
+
*
|
|
992
|
+
* This method is the compat boundary. Callers get one coherent patch; the wire
|
|
993
|
+
* carries the deletions in a separate additive `labelsRemove` array, so an
|
|
994
|
+
* older daemon strips them instead of rejecting the whole request. Keeping the
|
|
995
|
+
* split here means no UI code has to know the encoding.
|
|
996
|
+
*/
|
|
997
|
+
updateAgent(agentId: string, updates: {
|
|
998
|
+
name?: string;
|
|
999
|
+
labels?: Record<string, string | null>;
|
|
1000
|
+
}): Promise<void>;
|
|
1001
|
+
rewindSession(agentId: string, turnId: string): Promise<{
|
|
1002
|
+
newSessionId: string;
|
|
1003
|
+
}>;
|
|
1004
|
+
editMessage(agentId: string, turnId: string, newContent: string): Promise<{
|
|
1005
|
+
newSessionId: string;
|
|
1006
|
+
adopted: boolean;
|
|
1007
|
+
}>;
|
|
1008
|
+
listWorkspaceSessions(workspaceId: string, options?: {
|
|
1009
|
+
signal?: AbortSignal;
|
|
1010
|
+
}): Promise<Array<{
|
|
1011
|
+
sid: string;
|
|
1012
|
+
title: string | null;
|
|
1013
|
+
lastActivity: string;
|
|
1014
|
+
cwd: string;
|
|
1015
|
+
agentName: string | null;
|
|
1016
|
+
}>>;
|
|
1017
|
+
subscribePush(subscription: {
|
|
1018
|
+
type: "expo";
|
|
1019
|
+
token: string;
|
|
1020
|
+
} | {
|
|
1021
|
+
type: "web";
|
|
1022
|
+
subscription: {
|
|
1023
|
+
endpoint: string;
|
|
1024
|
+
keys: {
|
|
1025
|
+
p256dh: string;
|
|
1026
|
+
auth: string;
|
|
1027
|
+
};
|
|
1028
|
+
expirationTime?: number | null;
|
|
1029
|
+
};
|
|
1030
|
+
}): Promise<{
|
|
1031
|
+
ok: boolean;
|
|
1032
|
+
vapidPublicKey?: string;
|
|
1033
|
+
}>;
|
|
1034
|
+
getVapidPublicKey(): Promise<string | null>;
|
|
1035
|
+
listAllSessions(options?: {
|
|
1036
|
+
signal?: AbortSignal;
|
|
1037
|
+
}): Promise<Array<{
|
|
1038
|
+
sid: string;
|
|
1039
|
+
title: string | null;
|
|
1040
|
+
lastActivity: string;
|
|
1041
|
+
cwd: string;
|
|
1042
|
+
agentName: string | null;
|
|
1043
|
+
}>>;
|
|
1044
|
+
listWorkflows(): Promise<WorkflowSnapshot[]>;
|
|
1045
|
+
getWorkflow(workflowId: string): Promise<WorkflowSnapshot | null>;
|
|
1046
|
+
cancelWorkflow(workflowId: string): Promise<WorkflowSnapshot>;
|
|
1047
|
+
startWorkflow(input: {
|
|
1048
|
+
graph: WorkflowTaskGraph;
|
|
1049
|
+
provider: string;
|
|
1050
|
+
cwd: string;
|
|
1051
|
+
model?: string;
|
|
1052
|
+
title?: string;
|
|
1053
|
+
labels?: Record<string, string>;
|
|
1054
|
+
agentPresets?: Record<string, WorkflowAgentPreset>;
|
|
1055
|
+
}): Promise<{
|
|
1056
|
+
workflowId: string;
|
|
1057
|
+
childAgentIds: string[];
|
|
1058
|
+
status: WorkflowStatus;
|
|
1059
|
+
}>;
|
|
1060
|
+
listExtensions(): Promise<InstalledExtension[]>;
|
|
1061
|
+
executeExtensionCommand(commandId: string, args?: unknown[]): Promise<unknown>;
|
|
1062
|
+
searchSessions(params: {
|
|
1063
|
+
query: string;
|
|
1064
|
+
limit?: number;
|
|
1065
|
+
sources?: readonly string[];
|
|
1066
|
+
signal?: AbortSignal;
|
|
1067
|
+
}): Promise<Array<{
|
|
1068
|
+
sid: string;
|
|
1069
|
+
source: string;
|
|
1070
|
+
cwd: string;
|
|
1071
|
+
timestamp: string;
|
|
1072
|
+
snippet: string;
|
|
1073
|
+
resumeCommand: string;
|
|
1074
|
+
}>>;
|
|
1075
|
+
/**
|
|
1076
|
+
* Derive the daemon's HTTP base URL from the WebSocket URL we connected with.
|
|
1077
|
+
* Works for direct (ws://host:port/ws) and same-origin (web served by
|
|
1078
|
+
* daemon). For relay-mode (wss://relay.../ws), HTTP routes against the
|
|
1079
|
+
* daemon are not addressable — throws so callers fall back gracefully.
|
|
1080
|
+
*/
|
|
1081
|
+
private getHttpBaseUrl;
|
|
1082
|
+
private buildAuthHeader;
|
|
1083
|
+
private daemonHttpJson;
|
|
1084
|
+
removeProject(projectId: string, requestId?: string): Promise<{
|
|
1085
|
+
removedWorkspaceIds: string[];
|
|
1086
|
+
}>;
|
|
1087
|
+
setWorkspaceTitle(workspaceId: string, title: string | null, requestId?: string): Promise<{
|
|
1088
|
+
title: string | null;
|
|
1089
|
+
}>;
|
|
1090
|
+
/**
|
|
1091
|
+
* Answer a decision the agent parked on its digest. `optionId: null` with a
|
|
1092
|
+
* note is a free-text answer — an option the agent did not list.
|
|
1093
|
+
*/
|
|
1094
|
+
answerAgentDecision(agentId: string, decisionId: string, optionId: string | null, note: string | null, requestId?: string): Promise<{
|
|
1095
|
+
decision: PendingDecision | null;
|
|
1096
|
+
}>;
|
|
1097
|
+
resumeAgent(handle: AgentPersistenceHandle, overrides?: Partial<AgentSessionConfig>): Promise<AgentSnapshotPayload>;
|
|
1098
|
+
importAgent(input: ImportAgentInput): Promise<AgentSnapshotPayload>;
|
|
1099
|
+
refreshAgent(agentId: string, requestId?: string): Promise<AgentRefreshedStatusPayload>;
|
|
1100
|
+
fetchAgentTimeline(agentId: string, options?: FetchAgentTimelineOptions): Promise<FetchAgentTimelinePayload>;
|
|
1101
|
+
buildAgentForkContext(agentId: string, options?: AgentForkContextOptions): Promise<AgentForkContextPayload>;
|
|
1102
|
+
sendAgentMessage(agentId: string, text: string, options?: SendMessageOptions): Promise<void>;
|
|
1103
|
+
sendMessage(agentId: string, text: string, options?: SendMessageOptions): Promise<void>;
|
|
1104
|
+
rewindAgent(agentId: string, messageId: string, mode: "conversation" | "files" | "both"): Promise<AgentRewindResponseMessage["payload"]>;
|
|
1105
|
+
cancelAgent(agentId: string): Promise<void>;
|
|
1106
|
+
setAgentMode(agentId: string, modeId: string): Promise<AgentProviderNotice | null>;
|
|
1107
|
+
setAgentModel(agentId: string, modelId: string | null): Promise<void>;
|
|
1108
|
+
/**
|
|
1109
|
+
* Hot-swap a running agent's provider to a compatible one (e.g. Claude →
|
|
1110
|
+
* Claude (Pool)). Throws if the swap is rejected by the daemon (incompatible
|
|
1111
|
+
* wireFamily, target not in compatibleProviders list, target unavailable).
|
|
1112
|
+
*/
|
|
1113
|
+
swapAgentProvider(agentId: string, newProviderId: string, overrides?: {
|
|
1114
|
+
model?: string | null;
|
|
1115
|
+
modeId?: string;
|
|
1116
|
+
}): Promise<void>;
|
|
1117
|
+
setAgentFeature(agentId: string, featureId: string, value: unknown): Promise<void>;
|
|
1118
|
+
setAgentThinkingOption(agentId: string, thinkingOptionId: string | null): Promise<AgentProviderNotice | null>;
|
|
1119
|
+
restartServer(reason?: string, requestId?: string): Promise<RestartRequestedStatusPayload>;
|
|
1120
|
+
shutdownServer(options?: ShutdownServerOptions): Promise<ShutdownRequestedStatusPayload>;
|
|
1121
|
+
updateDaemon(requestId?: string): Promise<DaemonUpdateResponse["payload"]>;
|
|
1122
|
+
setVoiceMode(enabled: boolean, agentId?: string, language?: string): Promise<SetVoiceModePayload>;
|
|
1123
|
+
sendVoiceAudioChunk(audio: string, format: string, isLast?: boolean): Promise<void>;
|
|
1124
|
+
startDictationStream(dictationId: string, format: string, language?: string): Promise<void>;
|
|
1125
|
+
sendDictationStreamChunk(dictationId: string, seq: number, audio: string, format: string): void;
|
|
1126
|
+
finishDictationStream(dictationId: string, finalSeq: number): Promise<{
|
|
1127
|
+
dictationId: string;
|
|
1128
|
+
text: string;
|
|
1129
|
+
}>;
|
|
1130
|
+
cancelDictationStream(dictationId: string): void;
|
|
1131
|
+
abortRequest(): Promise<void>;
|
|
1132
|
+
audioPlayed(id: string): Promise<void>;
|
|
1133
|
+
getCheckoutStatus(cwd: string, options?: {
|
|
1134
|
+
requestId?: string;
|
|
1135
|
+
}): Promise<CheckoutStatusPayload>;
|
|
1136
|
+
private normalizeCheckoutDiffCompare;
|
|
1137
|
+
getCheckoutDiff(cwd: string, compare: {
|
|
1138
|
+
mode: "uncommitted" | "base";
|
|
1139
|
+
baseRef?: string;
|
|
1140
|
+
ignoreWhitespace?: boolean;
|
|
1141
|
+
}, requestId?: string): Promise<CheckoutDiffPayload>;
|
|
1142
|
+
subscribeCheckoutDiff(cwd: string, compare: {
|
|
1143
|
+
mode: "uncommitted" | "base";
|
|
1144
|
+
baseRef?: string;
|
|
1145
|
+
ignoreWhitespace?: boolean;
|
|
1146
|
+
}, options?: {
|
|
1147
|
+
subscriptionId?: string;
|
|
1148
|
+
requestId?: string;
|
|
1149
|
+
}): Promise<SubscribeCheckoutDiffPayload>;
|
|
1150
|
+
unsubscribeCheckoutDiff(subscriptionId: string): void;
|
|
1151
|
+
checkoutCommit(cwd: string, input: {
|
|
1152
|
+
message?: string;
|
|
1153
|
+
addAll?: boolean;
|
|
1154
|
+
}, requestId?: string): Promise<CheckoutCommitPayload>;
|
|
1155
|
+
checkoutMerge(cwd: string, input: {
|
|
1156
|
+
baseRef?: string;
|
|
1157
|
+
strategy?: "merge" | "squash";
|
|
1158
|
+
requireCleanTarget?: boolean;
|
|
1159
|
+
}, requestId?: string): Promise<CheckoutMergePayload>;
|
|
1160
|
+
checkoutMergeFromBase(cwd: string, input: {
|
|
1161
|
+
baseRef?: string;
|
|
1162
|
+
requireCleanTarget?: boolean;
|
|
1163
|
+
}, requestId?: string): Promise<CheckoutMergeFromBasePayload>;
|
|
1164
|
+
checkoutPull(cwd: string, requestId?: string): Promise<CheckoutPullPayload>;
|
|
1165
|
+
checkoutPush(cwd: string, requestId?: string): Promise<CheckoutPushPayload>;
|
|
1166
|
+
checkoutRefresh(cwd: string, requestId?: string): Promise<CheckoutRefreshPayload>;
|
|
1167
|
+
checkoutPrCreate(cwd: string, input: {
|
|
1168
|
+
title?: string;
|
|
1169
|
+
body?: string;
|
|
1170
|
+
baseRef?: string;
|
|
1171
|
+
}, requestId?: string): Promise<CheckoutPrCreatePayload>;
|
|
1172
|
+
checkoutPrMerge(cwd: string, input: {
|
|
1173
|
+
method: CheckoutPrMergeMethod;
|
|
1174
|
+
}, requestId?: string): Promise<CheckoutPrMergePayload>;
|
|
1175
|
+
checkoutGithubSetAutoMerge(cwd: string, input: {
|
|
1176
|
+
enabled: true;
|
|
1177
|
+
method: CheckoutPrMergeMethod;
|
|
1178
|
+
} | {
|
|
1179
|
+
enabled: false;
|
|
1180
|
+
}, requestId?: string): Promise<CheckoutGithubSetAutoMergePayload>;
|
|
1181
|
+
checkoutGithubGetCheckDetails(input: {
|
|
1182
|
+
cwd: string;
|
|
1183
|
+
repoOwner: string;
|
|
1184
|
+
repoName: string;
|
|
1185
|
+
checkRunId: number;
|
|
1186
|
+
workflowRunId?: number;
|
|
1187
|
+
}, requestId?: string): Promise<CheckoutGithubGetCheckDetailsPayload>;
|
|
1188
|
+
checkoutPrStatus(cwd: string, requestId?: string): Promise<CheckoutPrStatusPayload>;
|
|
1189
|
+
pullRequestTimeline(input: {
|
|
1190
|
+
cwd: string;
|
|
1191
|
+
prNumber: number;
|
|
1192
|
+
repoOwner: string;
|
|
1193
|
+
repoName: string;
|
|
1194
|
+
}, requestId?: string): Promise<PullRequestTimelinePayload>;
|
|
1195
|
+
checkoutSwitchBranch(cwd: string, branch: string, requestId?: string): Promise<CheckoutSwitchBranchPayload>;
|
|
1196
|
+
renameBranch(input: RenameBranchInput): Promise<RenameBranchResult>;
|
|
1197
|
+
stashSave(cwd: string, options?: {
|
|
1198
|
+
branch?: string;
|
|
1199
|
+
}, requestId?: string): Promise<StashSavePayload>;
|
|
1200
|
+
stashPop(cwd: string, stashIndex: number, requestId?: string): Promise<StashPopPayload>;
|
|
1201
|
+
stashList(cwd: string, options?: {
|
|
1202
|
+
paseoOnly?: boolean;
|
|
1203
|
+
}, requestId?: string): Promise<StashListPayload>;
|
|
1204
|
+
getPaseoWorktreeList(input: {
|
|
1205
|
+
cwd?: string;
|
|
1206
|
+
repoRoot?: string;
|
|
1207
|
+
}, requestId?: string): Promise<PaseoWorktreeListPayload>;
|
|
1208
|
+
archivePaseoWorktree(input: {
|
|
1209
|
+
worktreePath?: string;
|
|
1210
|
+
repoRoot?: string;
|
|
1211
|
+
branchName?: string;
|
|
1212
|
+
workspaceId?: string;
|
|
1213
|
+
scope?: "workspace" | "worktree";
|
|
1214
|
+
}, requestId?: string): Promise<PaseoWorktreeArchivePayload>;
|
|
1215
|
+
createPaseoWorktree(input: CreatePaseoWorktreeInput, requestId?: string): Promise<CreatePaseoWorktreePayload>;
|
|
1216
|
+
createWorkspace(input: {
|
|
1217
|
+
source: WorkspaceCreateRequest["source"];
|
|
1218
|
+
title?: string;
|
|
1219
|
+
firstAgentContext?: WorkspaceCreateRequest["firstAgentContext"];
|
|
1220
|
+
}, requestId?: string): Promise<WorkspaceCreatePayload>;
|
|
1221
|
+
validateBranch(options: {
|
|
1222
|
+
cwd: string;
|
|
1223
|
+
branchName: string;
|
|
1224
|
+
}, requestId?: string): Promise<ValidateBranchPayload>;
|
|
1225
|
+
getBranchSuggestions(options: {
|
|
1226
|
+
cwd: string;
|
|
1227
|
+
query?: string;
|
|
1228
|
+
limit?: number;
|
|
1229
|
+
}, requestId?: string): Promise<BranchSuggestionsPayload>;
|
|
1230
|
+
searchGitHub(options: {
|
|
1231
|
+
cwd: string;
|
|
1232
|
+
query: string;
|
|
1233
|
+
limit?: number;
|
|
1234
|
+
kinds?: GitHubSearchRequest["kinds"];
|
|
1235
|
+
}, requestId?: string): Promise<GitHubSearchPayload>;
|
|
1236
|
+
getDirectorySuggestions(options: {
|
|
1237
|
+
query: string;
|
|
1238
|
+
limit?: number;
|
|
1239
|
+
cwd?: string;
|
|
1240
|
+
includeFiles?: boolean;
|
|
1241
|
+
includeDirectories?: boolean;
|
|
1242
|
+
matchMode?: "fuzzy" | "suffix";
|
|
1243
|
+
}, requestId?: string): Promise<DirectorySuggestionsPayload>;
|
|
1244
|
+
private requestFileExplorer;
|
|
1245
|
+
listDirectory(cwd: string, path: string, requestId?: string): Promise<FileExplorerDirectoryPayload>;
|
|
1246
|
+
readFile(cwd: string, path: string, requestId?: string): Promise<FileReadResult>;
|
|
1247
|
+
requestDownloadToken(cwd: string, path: string, requestId?: string): Promise<FileDownloadTokenPayload>;
|
|
1248
|
+
requestProjectIcon(cwd: string, requestId?: string): Promise<ProjectIconResponse["payload"]>;
|
|
1249
|
+
listProviderModels(provider: AgentProvider, options?: {
|
|
1250
|
+
cwd?: string;
|
|
1251
|
+
requestId?: string;
|
|
1252
|
+
}): Promise<ListProviderModelsPayload>;
|
|
1253
|
+
listProviderModes(provider: AgentProvider, options?: {
|
|
1254
|
+
cwd?: string;
|
|
1255
|
+
requestId?: string;
|
|
1256
|
+
}): Promise<ListProviderModesPayload>;
|
|
1257
|
+
listProviderFeatures(draftConfig: ListCommandsDraftConfig, options?: {
|
|
1258
|
+
requestId?: string;
|
|
1259
|
+
}): Promise<ListProviderFeaturesPayload>;
|
|
1260
|
+
listAvailableProviders(options?: {
|
|
1261
|
+
requestId?: string;
|
|
1262
|
+
}): Promise<ListAvailableProvidersPayload>;
|
|
1263
|
+
getProvidersSnapshot(options?: {
|
|
1264
|
+
cwd?: string;
|
|
1265
|
+
requestId?: string;
|
|
1266
|
+
}): Promise<GetProvidersSnapshotPayload>;
|
|
1267
|
+
/**
|
|
1268
|
+
* Re-read `agents.providers` from the daemon's config.json into its live
|
|
1269
|
+
* provider registry. No restart. Returns the add/update/remove diff.
|
|
1270
|
+
*/
|
|
1271
|
+
reloadProviderConfig(options?: {
|
|
1272
|
+
requestId?: string;
|
|
1273
|
+
}): Promise<ProvidersReloadConfigPayload>;
|
|
1274
|
+
getDaemonConfig(requestId?: string): Promise<{
|
|
1275
|
+
requestId: string;
|
|
1276
|
+
config: MutableDaemonConfig;
|
|
1277
|
+
}>;
|
|
1278
|
+
getDaemonStatus(options?: DaemonStatusOptions): Promise<DaemonStatusPayload>;
|
|
1279
|
+
getDaemonPairingOffer(options?: DaemonPairingOfferOptions): Promise<DaemonPairingOfferPayload>;
|
|
1280
|
+
collectDiagnostics(requestId?: string): Promise<DiagnosticsPayload>;
|
|
1281
|
+
patchDaemonConfig(config: MutableDaemonConfigPatch, requestId?: string): Promise<{
|
|
1282
|
+
requestId: string;
|
|
1283
|
+
config: MutableDaemonConfig;
|
|
1284
|
+
}>;
|
|
1285
|
+
sendBrowserAutomationExecuteResponse(response: BrowserAutomationExecuteResponse): void;
|
|
1286
|
+
readProjectConfig(repoRoot: string, requestId?: string): Promise<ReadProjectConfigPayload>;
|
|
1287
|
+
writeProjectConfig(input: WriteProjectConfigInput): Promise<WriteProjectConfigPayload>;
|
|
1288
|
+
refreshProvidersSnapshot(options?: {
|
|
1289
|
+
cwd?: string;
|
|
1290
|
+
providers?: AgentProvider[];
|
|
1291
|
+
requestId?: string;
|
|
1292
|
+
}): Promise<RefreshProvidersSnapshotPayload>;
|
|
1293
|
+
getProviderDiagnostic(provider: AgentProvider, options?: {
|
|
1294
|
+
requestId?: string;
|
|
1295
|
+
}): Promise<ProviderDiagnosticPayload>;
|
|
1296
|
+
listProviderUsage(options?: {
|
|
1297
|
+
requestId?: string;
|
|
1298
|
+
}): Promise<ProviderUsageListPayload>;
|
|
1299
|
+
listCommands(options: ListCommandsOptions): Promise<ListCommandsPayload>;
|
|
1300
|
+
listCommands(agentId: string, requestId?: string): Promise<ListCommandsPayload>;
|
|
1301
|
+
listCommands(agentId: string, options?: LegacyListCommandsOptions): Promise<ListCommandsPayload>;
|
|
1302
|
+
respondToPermission(agentId: string, requestId: string, response: AgentPermissionResponse): Promise<void>;
|
|
1303
|
+
respondToPermissionAndWait(agentId: string, requestId: string, response: AgentPermissionResponse, timeout?: number): Promise<AgentPermissionResolvedPayload>;
|
|
1304
|
+
waitForAgentUpsert(agentId: string, predicate: (snapshot: AgentSnapshotPayload) => boolean, timeout?: number): Promise<AgentSnapshotPayload>;
|
|
1305
|
+
waitForFinish(agentId: string, timeout?: number): Promise<WaitForFinishResult>;
|
|
1306
|
+
subscribeTerminals(input: {
|
|
1307
|
+
cwd: string;
|
|
1308
|
+
workspaceId?: string;
|
|
1309
|
+
}): void;
|
|
1310
|
+
unsubscribeTerminals(input: {
|
|
1311
|
+
cwd: string;
|
|
1312
|
+
workspaceId?: string;
|
|
1313
|
+
}): void;
|
|
1314
|
+
listTerminals(cwd?: string, requestId?: string, options?: {
|
|
1315
|
+
workspaceId?: string;
|
|
1316
|
+
}): Promise<ListTerminalsPayload>;
|
|
1317
|
+
createTerminal(cwd: string, name?: string, requestId?: string, options?: {
|
|
1318
|
+
agentId?: string;
|
|
1319
|
+
command?: string;
|
|
1320
|
+
args?: string[];
|
|
1321
|
+
workspaceId?: string;
|
|
1322
|
+
}): Promise<CreateTerminalPayload>;
|
|
1323
|
+
renameTerminal(input: RenameTerminalInput): Promise<RenameTerminalResult>;
|
|
1324
|
+
subscribeTerminal(terminalId: string, optionsOrRequestId?: {
|
|
1325
|
+
restore?: SubscribeTerminalRequest["restore"];
|
|
1326
|
+
requestId?: string;
|
|
1327
|
+
} | string): Promise<SubscribeTerminalPayload>;
|
|
1328
|
+
unsubscribeTerminal(terminalId: string): void;
|
|
1329
|
+
sendTerminalInput(terminalId: string, message: TerminalInput["message"]): void;
|
|
1330
|
+
killTerminal(terminalId: string, requestId?: string): Promise<KillTerminalPayload>;
|
|
1331
|
+
closeItems(input: {
|
|
1332
|
+
agentIds?: string[];
|
|
1333
|
+
terminalIds?: string[];
|
|
1334
|
+
}, requestId?: string): Promise<CloseItemsPayload>;
|
|
1335
|
+
captureTerminal(terminalId: string, options?: {
|
|
1336
|
+
start?: number;
|
|
1337
|
+
end?: number;
|
|
1338
|
+
stripAnsi?: boolean;
|
|
1339
|
+
}, requestId?: string): Promise<CaptureTerminalPayload>;
|
|
1340
|
+
/**
|
|
1341
|
+
* Read an agent's rendered terminal screen.
|
|
1342
|
+
*
|
|
1343
|
+
* `payload.screen` is null when the agent has no readable pane (SDK transport, or a PTY
|
|
1344
|
+
* without tmux). That is the normal negative answer, not an error, so callers branch on it
|
|
1345
|
+
* rather than catching.
|
|
1346
|
+
*/
|
|
1347
|
+
captureAgentPane(agentId: string, options?: {
|
|
1348
|
+
ansi?: boolean;
|
|
1349
|
+
scrollbackLines?: number;
|
|
1350
|
+
}, requestId?: string): Promise<CaptureAgentPanePayload>;
|
|
1351
|
+
createChatRoom(options: CreateChatRoomOptions): Promise<ChatCreatePayload>;
|
|
1352
|
+
listChatRooms(requestId?: string): Promise<ChatListPayload>;
|
|
1353
|
+
inspectChatRoom(options: InspectChatRoomOptions): Promise<ChatInspectPayload>;
|
|
1354
|
+
deleteChatRoom(options: DeleteChatRoomOptions): Promise<ChatDeletePayload>;
|
|
1355
|
+
postChatMessage(options: PostChatMessageOptions): Promise<ChatPostPayload>;
|
|
1356
|
+
readChatMessages(options: ReadChatMessagesOptions): Promise<ChatReadPayload>;
|
|
1357
|
+
waitForChatMessages(options: WaitForChatMessagesOptions): Promise<ChatWaitPayload>;
|
|
1358
|
+
scheduleCreate(options: CreateScheduleOptions): Promise<ScheduleCreatePayload>;
|
|
1359
|
+
scheduleList(requestId?: string): Promise<ScheduleListPayload>;
|
|
1360
|
+
/**
|
|
1361
|
+
* Preview what a filter would have matched over a window of its source's
|
|
1362
|
+
* history. A READ: the daemon side of this arms nothing, mints no session and
|
|
1363
|
+
* writes no ledger row.
|
|
1364
|
+
*
|
|
1365
|
+
* `payload.result` and `payload.error` are both nullable and exactly one is
|
|
1366
|
+
* populated, so a caller can tell "the window held nothing" from "the read
|
|
1367
|
+
* failed" - a distinction a bare empty array would destroy.
|
|
1368
|
+
*/
|
|
1369
|
+
ingestionBackfill(options: {
|
|
1370
|
+
filterId: string;
|
|
1371
|
+
windowDays: 1 | 7 | 30 | 90;
|
|
1372
|
+
requestId?: string;
|
|
1373
|
+
}): Promise<IngestionBackfillPayload>;
|
|
1374
|
+
/**
|
|
1375
|
+
* Dispatch a selection, or ask the daemon what dispatching it would cost.
|
|
1376
|
+
*
|
|
1377
|
+
* TWO calls for anything that collapses to more than one session: the first
|
|
1378
|
+
* omits `confirmedGroups` and comes back `needs-confirmation` carrying the
|
|
1379
|
+
* daemon's own `collapse` and `report`; the second echoes
|
|
1380
|
+
* `collapse.groups` verbatim. The client never computes that number and never
|
|
1381
|
+
* adjusts it - the daemon recomputes on arrival and answers `stale-plan` on any
|
|
1382
|
+
* mismatch, which is the whole point of sending it.
|
|
1383
|
+
*/
|
|
1384
|
+
ingestionApply(options: {
|
|
1385
|
+
requestId?: string;
|
|
1386
|
+
filterId: string;
|
|
1387
|
+
itemKeys: string[];
|
|
1388
|
+
mode: "dry-run" | "apply";
|
|
1389
|
+
confirmedGroups?: number;
|
|
1390
|
+
}): Promise<IngestionApplyPayload>;
|
|
1391
|
+
/**
|
|
1392
|
+
* Read one cohort's progress. A READ, and the only way to get one.
|
|
1393
|
+
*
|
|
1394
|
+
* `payload.cohort` and `payload.error` are both nullable and their pairing is
|
|
1395
|
+
* the message: a null cohort with a null error means this cohort does not
|
|
1396
|
+
* exist, and a null cohort with an error means the read failed. A caller that
|
|
1397
|
+
* cannot tell those apart renders a broken daemon as a finished batch.
|
|
1398
|
+
*/
|
|
1399
|
+
ingestionCohortInspect(options: {
|
|
1400
|
+
cohortId: string;
|
|
1401
|
+
requestId?: string;
|
|
1402
|
+
}): Promise<IngestionCohortInspectPayload>;
|
|
1403
|
+
/**
|
|
1404
|
+
* Cancel a cohort's PENDING groups. Never its running ones.
|
|
1405
|
+
*
|
|
1406
|
+
* There is no field here through which a caller could ask for a live session to
|
|
1407
|
+
* be interrupted, because a running group may be mid-write to Gmail or GitLab
|
|
1408
|
+
* and the half-drafted email is the failure this whole path exists to avoid.
|
|
1409
|
+
* The response's `stillRunning` is the receipt for what was left alone.
|
|
1410
|
+
*/
|
|
1411
|
+
ingestionCohortCancel(options: {
|
|
1412
|
+
cohortId: string;
|
|
1413
|
+
requestId?: string;
|
|
1414
|
+
}): Promise<IngestionCohortCancelPayload>;
|
|
1415
|
+
/**
|
|
1416
|
+
* The STORED verification state of one filter's ingestion runs.
|
|
1417
|
+
*
|
|
1418
|
+
* A read, and only a read: the daemon answers from the ledger and issues no
|
|
1419
|
+
* source round-trip, so this is safe to call on a render. `runs: []` with
|
|
1420
|
+
* `error: null` is a real answer meaning "this filter has no source
|
|
1421
|
+
* schedule"; `[]` beside a non-null error means the read failed. A caller
|
|
1422
|
+
* that collapses the two shows a broken daemon as an idle filter.
|
|
1423
|
+
*/
|
|
1424
|
+
ingestionRuns(options: IngestionRunsOptions): Promise<IngestionRunsPayload>;
|
|
1425
|
+
fleetList(requestId?: string): Promise<FleetListPayload>;
|
|
1426
|
+
fleetInspect(options: InspectFleetLoopOptions): Promise<FleetInspectPayload>;
|
|
1427
|
+
fleetRunNow(options: InspectFleetLoopOptions): Promise<FleetRunNowPayload>;
|
|
1428
|
+
fleetPause(options: InspectFleetLoopOptions): Promise<FleetPausePayload>;
|
|
1429
|
+
/** Raise a typed question from a loop. */
|
|
1430
|
+
fleetAsk(options: AskFleetDecisionOptions): Promise<FleetAskPayload>;
|
|
1431
|
+
/** Decisions loops are waiting on a person for, most urgent first. */
|
|
1432
|
+
fleetDecisions(options?: ListFleetDecisionsOptions): Promise<FleetDecisionsPayload>;
|
|
1433
|
+
/** Answer one decision as the human. */
|
|
1434
|
+
fleetResolveDecision(options: ResolveFleetDecisionOptions): Promise<FleetResolveDecisionPayload>;
|
|
1435
|
+
/** Persist a loop's declared parameters. */
|
|
1436
|
+
fleetSetParams(options: SetFleetLoopParamsOptions): Promise<FleetSetParamsPayload>;
|
|
1437
|
+
/** Promote a loop to live, or demote it to dry-run. */
|
|
1438
|
+
fleetSetMode(options: SetFleetLoopModeOptions): Promise<FleetSetModePayload>;
|
|
1439
|
+
fleetResume(options: InspectFleetLoopOptions): Promise<FleetResumePayload>;
|
|
1440
|
+
fleetCreate(options: CreateFleetLoopOptions): Promise<FleetCreatePayload>;
|
|
1441
|
+
fleetExecutions(options: InspectFleetLoopOptions): Promise<FleetExecutionsPayload>;
|
|
1442
|
+
scheduleInspect(options: InspectScheduleOptions): Promise<ScheduleInspectPayload>;
|
|
1443
|
+
scheduleLogs(options: InspectScheduleOptions): Promise<ScheduleLogsPayload>;
|
|
1444
|
+
schedulePause(options: InspectScheduleOptions): Promise<SchedulePausePayload>;
|
|
1445
|
+
scheduleResume(options: InspectScheduleOptions): Promise<ScheduleResumePayload>;
|
|
1446
|
+
scheduleDelete(options: InspectScheduleOptions): Promise<ScheduleDeletePayload>;
|
|
1447
|
+
scheduleRunOnce(options: InspectScheduleOptions): Promise<ScheduleRunOncePayload>;
|
|
1448
|
+
scheduleUpdate(options: UpdateScheduleOptions): Promise<ScheduleUpdatePayload>;
|
|
1449
|
+
sourceCatalogue(options: SourceCatalogueOptions): Promise<SourceCataloguePayload>;
|
|
1450
|
+
sourceConnect(options: SourceConnectOptions): Promise<SourceConnectPayload>;
|
|
1451
|
+
sourceList(requestId?: string): Promise<SourceListPayload>;
|
|
1452
|
+
sourceCheck(options: SourceCheckOptions): Promise<SourceCheckPayload>;
|
|
1453
|
+
/**
|
|
1454
|
+
* FILTER AUTHORING (Epic 7).
|
|
1455
|
+
*
|
|
1456
|
+
* `ingestionFilterUpdate` is not a new name: `packages/app/src/components/
|
|
1457
|
+
* ingestion/filter-detail-sheet.tsx` has probed for this exact method since
|
|
1458
|
+
* Epic 6 and renders "Editing the brief needs a newer paseo host" when it is
|
|
1459
|
+
* absent. Every shipped daemon lacked it, so that control has been disabled
|
|
1460
|
+
* on every host that exists. This is the method it was waiting for.
|
|
1461
|
+
*/
|
|
1462
|
+
ingestionFilterList(options?: IngestionFilterListOptions): Promise<IngestionFilterListPayload>;
|
|
1463
|
+
ingestionFilterCreate(options: IngestionFilterCreateOptions): Promise<IngestionFilterCreatePayload>;
|
|
1464
|
+
ingestionFilterUpdate(options: IngestionFilterUpdateOptions): Promise<IngestionFilterUpdatePayload>;
|
|
1465
|
+
ingestionFilterDelete(options: IngestionFilterDeleteOptions): Promise<IngestionFilterDeletePayload>;
|
|
1466
|
+
loopRun(options: RunLoopOptions): Promise<LoopRunPayload>;
|
|
1467
|
+
loopList(requestId?: string): Promise<LoopListPayload>;
|
|
1468
|
+
loopInspect(options: string | InspectLoopOptions): Promise<LoopInspectPayload>;
|
|
1469
|
+
loopLogs(options: string | LoopLogsOptions, afterSeq?: number): Promise<LoopLogsPayload>;
|
|
1470
|
+
loopStop(options: string | StopLoopOptions): Promise<LoopStopPayload>;
|
|
1471
|
+
onTerminalStreamEvent(handler: (event: TerminalStreamEvent) => void): () => void;
|
|
1472
|
+
waitForTerminalStreamEvent(predicate: (event: TerminalStreamEvent) => boolean, timeout?: number): Promise<TerminalStreamEvent>;
|
|
1473
|
+
/**
|
|
1474
|
+
* Upload a file to an agent's workspace as a windowed, cancellable,
|
|
1475
|
+
* progress-reporting stream of {@link UPLOAD_CHUNK_SIZE_BYTES} `FileChunk`
|
|
1476
|
+
* frames with ack-based flow control. Resolves `{ fileId, path, size,
|
|
1477
|
+
* mimeType }` once the daemon finalizes the file.
|
|
1478
|
+
*
|
|
1479
|
+
* Purely additive over the receive path (`activeBinaryFileTransfers`): this
|
|
1480
|
+
* method only sends. It never buffers more than {@link UPLOAD_WINDOW_SIZE}
|
|
1481
|
+
* chunks in flight, so it cannot approach the relay's `MAX_PENDING_SENDS`
|
|
1482
|
+
* ceiling.
|
|
1483
|
+
*
|
|
1484
|
+
* @throws {UploadCancelledError} when `opts.signal` aborts
|
|
1485
|
+
* @throws {UploadCapExceededError} when the daemon rejects on the size cap
|
|
1486
|
+
* @throws {UploadFailedError} for any other transfer failure
|
|
1487
|
+
*/
|
|
1488
|
+
uploadFile(file: {
|
|
1489
|
+
bytes: Uint8Array;
|
|
1490
|
+
path: string;
|
|
1491
|
+
mime: string;
|
|
1492
|
+
modifiedAt: string;
|
|
1493
|
+
}, opts: {
|
|
1494
|
+
agentId: string;
|
|
1495
|
+
onProgress?: (bytesSent: number, totalBytes: number) => void;
|
|
1496
|
+
signal?: AbortSignal;
|
|
1497
|
+
}): Promise<{
|
|
1498
|
+
fileId: string;
|
|
1499
|
+
path: string;
|
|
1500
|
+
size: number;
|
|
1501
|
+
mimeType: string;
|
|
1502
|
+
}>;
|
|
1503
|
+
protected createRequestId(requestId?: string): string;
|
|
1504
|
+
getLastServerInfoMessage(): ServerInfoStatusPayload | null;
|
|
1505
|
+
getFileUploadsCapability(): boolean;
|
|
1506
|
+
private resolveTransportUrlForAttempt;
|
|
1507
|
+
private sendHelloMessage;
|
|
1508
|
+
private disposeTransport;
|
|
1509
|
+
private cleanupTransport;
|
|
1510
|
+
private resetConnectTimeout;
|
|
1511
|
+
private handleTransportMessage;
|
|
1512
|
+
private handleJsonPayload;
|
|
1513
|
+
private tryHandleBinaryFrame;
|
|
1514
|
+
private handleFileTransferFrame;
|
|
1515
|
+
private updateConnectionState;
|
|
1516
|
+
setReconnectEnabled(enabled: boolean): void;
|
|
1517
|
+
private scheduleReconnect;
|
|
1518
|
+
private emitDisconnectedStateForReconnect;
|
|
1519
|
+
private armReconnectTimer;
|
|
1520
|
+
private resolvePingProbe;
|
|
1521
|
+
private clearPingProbe;
|
|
1522
|
+
private rejectPingProbe;
|
|
1523
|
+
private recordLivenessFailure;
|
|
1524
|
+
private handleSessionMessage;
|
|
1525
|
+
private resolveWaiters;
|
|
1526
|
+
private clearWaiters;
|
|
1527
|
+
private toEvent;
|
|
1528
|
+
private waitForWithCancel;
|
|
1529
|
+
}
|
|
1530
|
+
//# sourceMappingURL=daemon-client.d.ts.map
|