@hyperdrive.bot/fleet-client 0.3.220 → 0.3.222
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 +39 -7
- package/dist/compat/normalize-provider-models.d.ts +2 -2
- package/dist/compat/normalize-provider-models.js +13 -4
- package/dist/connection/index.d.ts +50 -0
- package/dist/connection/index.js +119 -0
- package/dist/connection/legacy-workspaces.d.ts +19 -0
- package/dist/connection/legacy-workspaces.js +160 -0
- package/dist/connection/legacy.d.ts +31 -0
- package/dist/connection/legacy.js +245 -0
- package/dist/connection/owned.d.ts +36 -0
- package/dist/connection/owned.js +210 -0
- package/dist/creation/index.d.ts +40 -0
- package/dist/creation/index.js +197 -0
- package/dist/daemon-client-relay-e2ee-transport.d.ts +1 -0
- package/dist/daemon-client-relay-e2ee-transport.js +10 -6
- package/dist/daemon-client-transport-types.d.ts +1 -1
- package/dist/daemon-client-transport-utils.d.ts +5 -1
- package/dist/daemon-client-transport-utils.js +8 -6
- package/dist/daemon-client-transport.d.ts +2 -2
- package/dist/daemon-client-transport.js +2 -2
- package/dist/daemon-client-websocket-transport.d.ts +4 -0
- package/dist/daemon-client-websocket-transport.js +23 -3
- package/dist/daemon-client.d.ts +1377 -922
- package/dist/daemon-client.js +4075 -2691
- package/dist/index.d.ts +197 -66
- package/dist/index.js +435 -72
- package/dist/legacy-usage-icons.d.ts +2 -0
- package/dist/legacy-usage-icons.js +16 -0
- package/dist/provider-snapshots/index.d.ts +21 -0
- package/dist/provider-snapshots/index.js +56 -0
- package/dist/terminal-stream-router.d.ts +7 -10
- package/dist/terminal-stream-router.js +41 -87
- package/dist/terminals/index.d.ts +69 -0
- package/dist/terminals/index.js +103 -0
- package/dist/timeline-subscription/index.d.ts +25 -0
- package/dist/timeline-subscription/index.js +56 -0
- package/package.json +10 -6
package/dist/daemon-client.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { type TimelineMessage } from "./timeline-subscription/index.js";
|
|
2
|
+
import { type OwnedSubscription, type TimelineSubscription } from "./connection/index.js";
|
|
3
|
+
import { type CreationSnapshot, type SessionEventSubscription, AgentRefreshedStatusPayloadSchema, CheckoutRenameBranchResponseSchema, RenameTerminalResponseSchema, RestartRequestedStatusPayloadSchema, ShutdownRequestedStatusPayloadSchema, DaemonUpdateResponseSchema, type ActiveTurnBehavior, type ServerInfoStatusPayload, type AgentStreamEventPayload, type AgentSnapshotPayload, type ProjectPlacementPayload, type AgentPermissionResolvedMessage, type CreateAgentRequestMessage, type CreatePaseoWorktreeRequest, type FileDownloadTokenResponse, type FileUploadResponse, type FileExplorerResponse, type FileVersion, type FileWriteResult, type FetchAgentTimelineResponseMessage, type AgentForkContextResponseMessage, type GitSetupOptions, type CheckoutStatusResponse, type CheckoutCommit, type ParsedDiffFile, type CheckoutCommitResponse, type CheckoutMergeResponse, type CheckoutMergeFromBaseResponse, type CheckoutPullResponse, type CheckoutPushResponse, type CheckoutRefreshResponse, type CheckoutPrCreateResponse, type CheckoutPrMergeResponse, type CheckoutPrMergeMethod, type CheckoutForgeSetAutoMergeResponse, type CheckoutGithubSetAutoMergeResponse, type CheckoutForgeGetCheckDetailsResponse, type CheckoutGithubGetCheckDetailsResponse, type CheckoutPrStatusResponse, type PullRequestTimelineResponse, type CheckoutSwitchBranchResponse, type StashSaveResponse, type StashPopResponse, type StashListResponse, type ValidateBranchResponse, type BranchSuggestionsResponse, type ForgeSearchResponse, type ForgeSearchRequest, type GitHubSearchResponse, type GitHubSearchRequest, type DirectorySuggestionsResponse, type PaseoWorktreeListResponse, type PaseoWorktreeArchiveResponse, type ProjectIconSource, type ProjectIconResponse, type ProjectIconGetResponse, type ProjectAddResponse, type ProjectCreateDirectoryResponse, type OpenProjectResponseMessage, type WorkspaceGithubSearchRepositoriesResponse, type ProjectGithubCloneProtocol, type ProjectGithubCloneResponse, type ArchiveWorkspaceResponseMessage, type WorkspaceSetupStatusResponseMessage, type ListCommandsResponse, type ListProviderFeaturesResponseMessage, type ListProviderModelsResponseMessage, type ListProviderModesResponseMessage, type ListAvailableProvidersResponse, type GetProvidersSnapshotResponseMessage, type RefreshProvidersSnapshotResponseMessage, type ProviderDiagnosticResponseMessage, type ProviderUsageListResponseMessage, type UsageListReportsResponseMessage, type DaemonGetStatusResponse, type DaemonGetPairingOfferResponse, type DaemonConfigReloadResponse, type DiagnosticsResponse, type AgentRewindResponseMessage, type ListTerminalsResponse, type CreateTerminalResponse, type SubscribeTerminalResponse, type SubscribeTerminalRequest, type CloseItemsResponse, type KillTerminalResponse, type CaptureTerminalResponse, type TerminalInput, type SessionInboundMessage, type SessionOutboundMessage, type SendAgentMessageRequest, type PaseoConfigRaw, type PaseoConfigRevision, type WorkspaceCreateRequest, type WorkspaceRecoveryState, type PluginListItem, type PluginLogEntry, type PluginSourceStatusItem, type PluginSourceUpdateItem, type PluginUpdateSelection, type PluginUpdateProposal, type PluginUpdatePreview, type PluginUpdateResult, type AgentSkillSelection, type AgentSkillsStatus, type AgentSkillsSaveResult, type AgentConfigApply, type MutableDaemonConfig, type MutableDaemonConfigPatch, type AgentSnoozeState, type InstalledExtension, type CaptureAgentPaneResponse, type ProjectRenameResponse, type BackgroundTaskPayload, type ReferenceEnrichment, type SessionDigest, type SessionDigestLink, type WatchNotificationActionMessage, type WatchSessionSearchMessage, type WatchComposerDictateMessage, type WorkflowAgentPreset, type WorkflowSnapshot, type WorkflowStatus, type WorkflowTaskGraph, type PendingDecision, type ExpiredDecisionRow, type ProvidersReloadConfigPayload, type FileUploadErrorCode } from "@hyperdrive.bot/fleet-protocol/messages";
|
|
1
4
|
import type { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
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, ExpiredDecisionRow } from "@hyperdrive.bot/fleet-protocol/messages";
|
|
5
|
+
import type { ClientCapability } from "@hyperdrive.bot/fleet-protocol/client-capabilities";
|
|
6
|
+
import type { AgentAttentionNotificationPayload } from "@hyperdrive.bot/fleet-protocol/agent-attention-notification";
|
|
8
7
|
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
8
|
import { type DaemonTransportFactory, type WebSocketFactory } from "./daemon-client-transport.js";
|
|
12
9
|
import { type TerminalStreamEvent } from "./terminal-stream-router.js";
|
|
13
10
|
import type { BrowserAutomationExecuteRequest, BrowserAutomationExecuteResponse } from "@hyperdrive.bot/fleet-protocol/browser-automation/rpc-schemas";
|
|
11
|
+
import type { SourceKind } from "@hyperdrive.bot/fleet-protocol/ingestion/types";
|
|
12
|
+
import type { FilterDraft, FilterPatch } from "@hyperdrive.bot/fleet-protocol/ingestion/rpc-schemas";
|
|
13
|
+
import type { ScheduleCadence } from "@hyperdrive.bot/fleet-protocol/schedule/types";
|
|
14
14
|
export interface Logger {
|
|
15
15
|
debug(obj: object, msg?: string): void;
|
|
16
16
|
info(obj: object, msg?: string): void;
|
|
@@ -19,6 +19,7 @@ export interface Logger {
|
|
|
19
19
|
}
|
|
20
20
|
interface ImportAgentInputBase {
|
|
21
21
|
cwd?: string;
|
|
22
|
+
workspaceId?: string;
|
|
22
23
|
labels?: Record<string, string>;
|
|
23
24
|
}
|
|
24
25
|
export type ImportAgentInput = (ImportAgentInputBase & {
|
|
@@ -28,6 +29,12 @@ export type ImportAgentInput = (ImportAgentInputBase & {
|
|
|
28
29
|
provider: AgentProvider;
|
|
29
30
|
sessionId: string;
|
|
30
31
|
});
|
|
32
|
+
export type DaemonAuthFailureReason = "password_required" | "incorrect_password";
|
|
33
|
+
export declare class DaemonAuthenticationError extends Error {
|
|
34
|
+
readonly reason: DaemonAuthFailureReason;
|
|
35
|
+
constructor(reason: DaemonAuthFailureReason);
|
|
36
|
+
}
|
|
37
|
+
export declare function getDaemonAuthFailureReason(error: unknown): DaemonAuthFailureReason | null;
|
|
31
38
|
export type { DaemonTransport, DaemonTransportFactory, WebSocketFactory, WebSocketLike, } from "./daemon-client-transport.js";
|
|
32
39
|
export type { TerminalStreamEvent };
|
|
33
40
|
export type ConnectionState = {
|
|
@@ -55,6 +62,11 @@ export type DaemonEvent = {
|
|
|
55
62
|
payload: Extract<SessionOutboundMessage, {
|
|
56
63
|
type: "workspace_update";
|
|
57
64
|
}>["payload"];
|
|
65
|
+
} | {
|
|
66
|
+
type: "project.update";
|
|
67
|
+
payload: Extract<SessionOutboundMessage, {
|
|
68
|
+
type: "project.update";
|
|
69
|
+
}>["payload"];
|
|
58
70
|
} | {
|
|
59
71
|
type: "workspace_setup_progress";
|
|
60
72
|
workspaceId: string;
|
|
@@ -98,12 +110,22 @@ export type DaemonEventHandler = (event: DaemonEvent) => void;
|
|
|
98
110
|
export type BrowserAutomationExecuteRequestMessage = BrowserAutomationExecuteRequest;
|
|
99
111
|
export type BrowserAutomationExecuteResponseMessage = BrowserAutomationExecuteResponse;
|
|
100
112
|
export interface DaemonClientConfig {
|
|
113
|
+
/**
|
|
114
|
+
* Fork setting: how long a message queued while the transport is still
|
|
115
|
+
* connecting waits before it rejects. Lets a caller fail fast when the
|
|
116
|
+
* daemon is unreachable instead of blocking for the full RPC timeout.
|
|
117
|
+
*/
|
|
118
|
+
defaultSendQueueTimeoutMs?: number;
|
|
119
|
+
/** Deliver compact bodies/hash references to a caller-owned snapshot cache.
|
|
120
|
+
* The default keeps public SDK snapshot entries expanded. */
|
|
121
|
+
providerSnapshots?: "wire";
|
|
101
122
|
url: string;
|
|
102
123
|
clientId: string;
|
|
103
|
-
clientType?: "mobile" | "browser" | "cli" | "mcp";
|
|
124
|
+
clientType?: "mobile" | "browser" | "cli" | "mcp" | "hub";
|
|
104
125
|
appVersion?: string;
|
|
105
126
|
runtimeGeneration?: number | null;
|
|
106
127
|
password?: string;
|
|
128
|
+
localCredential?: () => string | undefined | Promise<string | undefined>;
|
|
107
129
|
authHeader?: string;
|
|
108
130
|
suppressSendErrors?: boolean;
|
|
109
131
|
transportFactory?: DaemonTransportFactory;
|
|
@@ -121,15 +143,7 @@ export interface DaemonClientConfig {
|
|
|
121
143
|
};
|
|
122
144
|
runtimeMetricsIntervalMs?: number;
|
|
123
145
|
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;
|
|
146
|
+
trace?: DaemonClientTrace;
|
|
133
147
|
capabilities?: Partial<Record<ClientCapability, unknown>>;
|
|
134
148
|
/**
|
|
135
149
|
* Called once per request/response round trip that goes through the shared
|
|
@@ -139,30 +153,40 @@ export interface DaemonClientConfig {
|
|
|
139
153
|
*/
|
|
140
154
|
onRequestComplete?: (event: DaemonRequestCompletion) => void;
|
|
141
155
|
}
|
|
142
|
-
export interface
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
request: SessionInboundMessage;
|
|
147
|
-
/** The selected response value on `ok`, otherwise undefined. */
|
|
148
|
-
response?: unknown;
|
|
156
|
+
export interface DaemonClientTrace {
|
|
157
|
+
isEnabled(): boolean;
|
|
158
|
+
beginSection(name: string, args?: Record<string, string>): void;
|
|
159
|
+
endSection(): void;
|
|
149
160
|
}
|
|
150
161
|
export interface SendMessageOptions {
|
|
151
162
|
messageId?: string;
|
|
163
|
+
/** What happens when the agent is mid-turn. The daemon interrupts the turn when omitted. */
|
|
164
|
+
activeTurnBehavior?: ActiveTurnBehavior;
|
|
152
165
|
images?: Array<{
|
|
153
166
|
data: string;
|
|
154
167
|
mimeType: string;
|
|
155
168
|
}>;
|
|
156
169
|
attachments?: SendAgentMessageRequest["attachments"];
|
|
157
170
|
}
|
|
171
|
+
export interface AgentAttentionRequiredNotification {
|
|
172
|
+
agentId: string;
|
|
173
|
+
reason: "finished" | "error" | "permission";
|
|
174
|
+
timestamp: string;
|
|
175
|
+
shouldNotify: boolean;
|
|
176
|
+
notification?: AgentAttentionNotificationPayload;
|
|
177
|
+
}
|
|
158
178
|
type AgentConfigOverrides = Partial<Omit<AgentSessionConfig, "provider" | "cwd">>;
|
|
159
179
|
export interface CreateAgentRequestOptions extends AgentConfigOverrides {
|
|
180
|
+
agentId?: string;
|
|
181
|
+
onEvent?: (snapshot: CreationSnapshot) => void;
|
|
160
182
|
config?: AgentSessionConfig;
|
|
161
183
|
provider?: AgentProvider;
|
|
162
184
|
cwd?: string;
|
|
163
185
|
env?: CreateAgentRequestMessage["env"];
|
|
164
186
|
workspaceId?: string;
|
|
187
|
+
callerAgentId?: string;
|
|
165
188
|
initialPrompt?: string;
|
|
189
|
+
idempotencyKey?: string;
|
|
166
190
|
clientMessageId?: string;
|
|
167
191
|
outputSchema?: Record<string, unknown>;
|
|
168
192
|
images?: CreateAgentRequestMessage["images"];
|
|
@@ -176,7 +200,17 @@ export interface CreateAgentRequestOptions extends AgentConfigOverrides {
|
|
|
176
200
|
resumeSessionId?: string;
|
|
177
201
|
routine?: CreateAgentRequestMessage["routine"];
|
|
178
202
|
}
|
|
179
|
-
export interface
|
|
203
|
+
export interface CreateWorkspaceRequestOptions {
|
|
204
|
+
source: WorkspaceCreateRequest["source"];
|
|
205
|
+
title?: string;
|
|
206
|
+
idempotencyKey?: string;
|
|
207
|
+
workspaceId?: string;
|
|
208
|
+
agent?: Omit<CreateAgentRequestOptions, "workspaceId" | "onEvent" | "worktree" | "git" | "worktreeName" | "idempotencyKey" | "requestId">;
|
|
209
|
+
onEvent?: (snapshot: CreationSnapshot) => void;
|
|
210
|
+
firstAgentContext?: WorkspaceCreateRequest["firstAgentContext"];
|
|
211
|
+
requestId?: string;
|
|
212
|
+
}
|
|
213
|
+
export interface CreatePaseoWorktreeInput extends Pick<CreatePaseoWorktreeRequest, "cwd" | "projectId" | "worktreeSlug" | "firstAgentContext" | "refName" | "action" | "checkoutSource" | "githubPrNumber"> {
|
|
180
214
|
}
|
|
181
215
|
type CheckoutStatusPayload = CheckoutStatusResponse["payload"];
|
|
182
216
|
type SubscribeCheckoutDiffPayload = Extract<SessionOutboundMessage, {
|
|
@@ -191,24 +225,20 @@ type CheckoutPushPayload = CheckoutPushResponse["payload"];
|
|
|
191
225
|
type CheckoutRefreshPayload = CheckoutRefreshResponse["payload"];
|
|
192
226
|
type CheckoutPrCreatePayload = CheckoutPrCreateResponse["payload"];
|
|
193
227
|
type CheckoutPrMergePayload = CheckoutPrMergeResponse["payload"];
|
|
228
|
+
type CheckoutForgeSetAutoMergePayload = CheckoutForgeSetAutoMergeResponse["payload"];
|
|
194
229
|
type CheckoutGithubSetAutoMergePayload = CheckoutGithubSetAutoMergeResponse["payload"];
|
|
230
|
+
type CheckoutForgeGetCheckDetailsPayload = CheckoutForgeGetCheckDetailsResponse["payload"];
|
|
195
231
|
type CheckoutGithubGetCheckDetailsPayload = CheckoutGithubGetCheckDetailsResponse["payload"];
|
|
196
232
|
type CheckoutPrStatusPayload = CheckoutPrStatusResponse["payload"];
|
|
197
233
|
type PullRequestTimelinePayload = PullRequestTimelineResponse["payload"];
|
|
198
234
|
type CheckoutSwitchBranchPayload = CheckoutSwitchBranchResponse["payload"];
|
|
199
|
-
export interface AgentDecisionsExpireResult {
|
|
200
|
-
dryRun: boolean;
|
|
201
|
-
expired: ExpiredDecisionRow[];
|
|
202
|
-
agents: number;
|
|
203
|
-
archivedAgents: number;
|
|
204
|
-
written: number;
|
|
205
|
-
}
|
|
206
235
|
export type RenameBranchResult = z.infer<typeof CheckoutRenameBranchResponseSchema>["payload"];
|
|
207
236
|
type StashSavePayload = StashSaveResponse["payload"];
|
|
208
237
|
type StashPopPayload = StashPopResponse["payload"];
|
|
209
238
|
type StashListPayload = StashListResponse["payload"];
|
|
210
239
|
type ValidateBranchPayload = ValidateBranchResponse["payload"];
|
|
211
240
|
type BranchSuggestionsPayload = BranchSuggestionsResponse["payload"];
|
|
241
|
+
type ForgeSearchPayload = ForgeSearchResponse["payload"];
|
|
212
242
|
type GitHubSearchPayload = GitHubSearchResponse["payload"];
|
|
213
243
|
type DirectorySuggestionsPayload = DirectorySuggestionsResponse["payload"];
|
|
214
244
|
type PaseoWorktreeListPayload = PaseoWorktreeListResponse["payload"];
|
|
@@ -229,7 +259,17 @@ export interface FileReadResult {
|
|
|
229
259
|
path: string;
|
|
230
260
|
kind: LegacyFileExplorerFilePayload["kind"];
|
|
231
261
|
modifiedAt: string;
|
|
262
|
+
revision?: string;
|
|
263
|
+
}
|
|
264
|
+
export interface FileUploadInput {
|
|
265
|
+
fileName: string;
|
|
266
|
+
mimeType: string;
|
|
267
|
+
bytes: Uint8Array | ArrayBuffer;
|
|
268
|
+
modifiedAt?: string;
|
|
269
|
+
requestId?: string;
|
|
270
|
+
chunkSize?: number;
|
|
232
271
|
}
|
|
272
|
+
export type FileUploadResult = FileUploadResponse["payload"];
|
|
233
273
|
type FileDownloadTokenPayload = FileDownloadTokenResponse["payload"];
|
|
234
274
|
type ListProviderFeaturesPayload = ListProviderFeaturesResponseMessage["payload"];
|
|
235
275
|
type ListProviderModelsPayload = ListProviderModelsResponseMessage["payload"];
|
|
@@ -239,6 +279,7 @@ type GetProvidersSnapshotPayload = GetProvidersSnapshotResponseMessage["payload"
|
|
|
239
279
|
type RefreshProvidersSnapshotPayload = RefreshProvidersSnapshotResponseMessage["payload"];
|
|
240
280
|
type ProviderDiagnosticPayload = ProviderDiagnosticResponseMessage["payload"];
|
|
241
281
|
type ProviderUsageListPayload = ProviderUsageListResponseMessage["payload"];
|
|
282
|
+
type UsageListReportsPayload = UsageListReportsResponseMessage["payload"];
|
|
242
283
|
type DaemonStatusPayload = DaemonGetStatusResponse["payload"];
|
|
243
284
|
type DaemonPairingOfferPayload = DaemonGetPairingOfferResponse["payload"];
|
|
244
285
|
type DiagnosticsPayload = DiagnosticsResponse["payload"];
|
|
@@ -273,167 +314,12 @@ type SubscribeTerminalPayload = SubscribeTerminalResponse["payload"];
|
|
|
273
314
|
type CloseItemsPayload = CloseItemsResponse["payload"];
|
|
274
315
|
type KillTerminalPayload = KillTerminalResponse["payload"];
|
|
275
316
|
type CaptureTerminalPayload = CaptureTerminalResponse["payload"];
|
|
276
|
-
type CaptureAgentPanePayload = CaptureAgentPaneResponse["payload"];
|
|
277
|
-
type ChatCreatePayload = Extract<SessionOutboundMessage, {
|
|
278
|
-
type: "chat/create/response";
|
|
279
|
-
}>["payload"];
|
|
280
|
-
type ChatListPayload = Extract<SessionOutboundMessage, {
|
|
281
|
-
type: "chat/list/response";
|
|
282
|
-
}>["payload"];
|
|
283
|
-
type ChatInspectPayload = Extract<SessionOutboundMessage, {
|
|
284
|
-
type: "chat/inspect/response";
|
|
285
|
-
}>["payload"];
|
|
286
|
-
type ChatDeletePayload = Extract<SessionOutboundMessage, {
|
|
287
|
-
type: "chat/delete/response";
|
|
288
|
-
}>["payload"];
|
|
289
|
-
type ChatPostPayload = Extract<SessionOutboundMessage, {
|
|
290
|
-
type: "chat/post/response";
|
|
291
|
-
}>["payload"];
|
|
292
|
-
type ChatReadPayload = Extract<SessionOutboundMessage, {
|
|
293
|
-
type: "chat/read/response";
|
|
294
|
-
}>["payload"];
|
|
295
|
-
type ChatWaitPayload = Extract<SessionOutboundMessage, {
|
|
296
|
-
type: "chat/wait/response";
|
|
297
|
-
}>["payload"];
|
|
298
|
-
type LoopRunPayload = Extract<SessionOutboundMessage, {
|
|
299
|
-
type: "loop/run/response";
|
|
300
|
-
}>["payload"];
|
|
301
|
-
type LoopListPayload = Extract<SessionOutboundMessage, {
|
|
302
|
-
type: "loop/list/response";
|
|
303
|
-
}>["payload"];
|
|
304
|
-
type LoopInspectPayload = Extract<SessionOutboundMessage, {
|
|
305
|
-
type: "loop/inspect/response";
|
|
306
|
-
}>["payload"];
|
|
307
|
-
type LoopLogsPayload = Extract<SessionOutboundMessage, {
|
|
308
|
-
type: "loop/logs/response";
|
|
309
|
-
}>["payload"];
|
|
310
|
-
type LoopStopPayload = Extract<SessionOutboundMessage, {
|
|
311
|
-
type: "loop/stop/response";
|
|
312
|
-
}>["payload"];
|
|
313
|
-
type FleetListPayload = Extract<SessionOutboundMessage, {
|
|
314
|
-
type: "fleet/list/response";
|
|
315
|
-
}>["payload"];
|
|
316
|
-
type FleetInspectPayload = Extract<SessionOutboundMessage, {
|
|
317
|
-
type: "fleet/inspect/response";
|
|
318
|
-
}>["payload"];
|
|
319
|
-
type FleetRunNowPayload = Extract<SessionOutboundMessage, {
|
|
320
|
-
type: "fleet/run-now/response";
|
|
321
|
-
}>["payload"];
|
|
322
|
-
type FleetPausePayload = Extract<SessionOutboundMessage, {
|
|
323
|
-
type: "fleet/pause/response";
|
|
324
|
-
}>["payload"];
|
|
325
|
-
type FleetResumePayload = Extract<SessionOutboundMessage, {
|
|
326
|
-
type: "fleet/resume/response";
|
|
327
|
-
}>["payload"];
|
|
328
|
-
type FleetAskPayload = Extract<SessionOutboundMessage, {
|
|
329
|
-
type: "fleet/ask/response";
|
|
330
|
-
}>["payload"];
|
|
331
|
-
type FleetDecisionsPayload = Extract<SessionOutboundMessage, {
|
|
332
|
-
type: "fleet/decisions/response";
|
|
333
|
-
}>["payload"];
|
|
334
|
-
type FleetResolveDecisionPayload = Extract<SessionOutboundMessage, {
|
|
335
|
-
type: "fleet/resolve-decision/response";
|
|
336
|
-
}>["payload"];
|
|
337
|
-
type FleetSetParamsPayload = Extract<SessionOutboundMessage, {
|
|
338
|
-
type: "fleet/set-params/response";
|
|
339
|
-
}>["payload"];
|
|
340
|
-
type FleetSetModePayload = Extract<SessionOutboundMessage, {
|
|
341
|
-
type: "fleet/set-mode/response";
|
|
342
|
-
}>["payload"];
|
|
343
|
-
type FleetCreatePayload = Extract<SessionOutboundMessage, {
|
|
344
|
-
type: "fleet/create/response";
|
|
345
|
-
}>["payload"];
|
|
346
|
-
type FleetExecutionsPayload = Extract<SessionOutboundMessage, {
|
|
347
|
-
type: "fleet/executions/response";
|
|
348
|
-
}>["payload"];
|
|
349
|
-
export interface InspectFleetLoopOptions {
|
|
350
|
-
requestId?: string;
|
|
351
|
-
name: string;
|
|
352
|
-
}
|
|
353
|
-
export interface SetFleetLoopModeOptions {
|
|
354
|
-
requestId?: string;
|
|
355
|
-
name: string;
|
|
356
|
-
mode: "live" | "dry-run";
|
|
357
|
-
}
|
|
358
|
-
export interface AskFleetDecisionOptions {
|
|
359
|
-
requestId?: string;
|
|
360
|
-
name: string;
|
|
361
|
-
kind: "gate-approval" | "action-approval" | "outcome-review";
|
|
362
|
-
question: string;
|
|
363
|
-
posture: "blocking" | "deferring" | "advisory";
|
|
364
|
-
options: Array<{
|
|
365
|
-
id: string;
|
|
366
|
-
label: string;
|
|
367
|
-
effect: {
|
|
368
|
-
kind: "act" | "rehearse" | "defer" | "suppress";
|
|
369
|
-
reversibility: "reversible" | "compensable" | "irreversible";
|
|
370
|
-
compensatingAction?: string;
|
|
371
|
-
};
|
|
372
|
-
}>;
|
|
373
|
-
runId?: string;
|
|
374
|
-
itemKey?: string;
|
|
375
|
-
evidence?: string;
|
|
376
|
-
onExpiry?: string;
|
|
377
|
-
expiresInMs?: number;
|
|
378
|
-
}
|
|
379
|
-
export interface ListFleetDecisionsOptions {
|
|
380
|
-
requestId?: string;
|
|
381
|
-
name?: string;
|
|
382
|
-
includeResolved?: boolean;
|
|
383
|
-
}
|
|
384
|
-
export interface ResolveFleetDecisionOptions {
|
|
385
|
-
requestId?: string;
|
|
386
|
-
decisionId: string;
|
|
387
|
-
optionId: string;
|
|
388
|
-
}
|
|
389
|
-
export interface SetFleetLoopParamsOptions {
|
|
390
|
-
requestId?: string;
|
|
391
|
-
name: string;
|
|
392
|
-
values: Record<string, string | number | boolean | string[]>;
|
|
393
|
-
}
|
|
394
|
-
export interface CreateFleetLoopOptions {
|
|
395
|
-
requestId?: string;
|
|
396
|
-
name: string;
|
|
397
|
-
description: string;
|
|
398
|
-
cron: string;
|
|
399
|
-
action: string;
|
|
400
|
-
mode?: "live" | "dry-run";
|
|
401
|
-
rails?: string;
|
|
402
|
-
allowed?: string;
|
|
403
|
-
}
|
|
404
317
|
type ScheduleCreatePayload = Extract<SessionOutboundMessage, {
|
|
405
318
|
type: "schedule/create/response";
|
|
406
319
|
}>["payload"];
|
|
407
320
|
type ScheduleListPayload = Extract<SessionOutboundMessage, {
|
|
408
321
|
type: "schedule/list/response";
|
|
409
322
|
}>["payload"];
|
|
410
|
-
type IngestionBackfillPayload = Extract<SessionOutboundMessage, {
|
|
411
|
-
type: "ingestion/backfill/response";
|
|
412
|
-
}>["payload"];
|
|
413
|
-
export type IngestionApplyPayload = Extract<SessionOutboundMessage, {
|
|
414
|
-
type: "ingestion/apply/response";
|
|
415
|
-
}>["payload"];
|
|
416
|
-
export type IngestionCohortInspectPayload = Extract<SessionOutboundMessage, {
|
|
417
|
-
type: "ingestion/cohort/inspect/response";
|
|
418
|
-
}>["payload"];
|
|
419
|
-
export type IngestionCohortCancelPayload = Extract<SessionOutboundMessage, {
|
|
420
|
-
type: "ingestion/cohort/cancel/response";
|
|
421
|
-
}>["payload"];
|
|
422
|
-
/** Exported because `packages/app` (Story 6.3) renders this payload directly. */
|
|
423
|
-
export type IngestionRunsPayload = Extract<SessionOutboundMessage, {
|
|
424
|
-
type: "ingestion/runs/response";
|
|
425
|
-
}>["payload"];
|
|
426
|
-
export interface IngestionRunsOptions {
|
|
427
|
-
requestId?: string;
|
|
428
|
-
filterId: string;
|
|
429
|
-
/**
|
|
430
|
-
* Include the runs reconciliation has closed. Defaults to false at the daemon.
|
|
431
|
-
*
|
|
432
|
-
* Omit it. The Inbox wants open obligations, and the daemon's default is the
|
|
433
|
-
* one that cannot render a stale row by accident.
|
|
434
|
-
*/
|
|
435
|
-
includeClosed?: boolean;
|
|
436
|
-
}
|
|
437
323
|
type ScheduleInspectPayload = Extract<SessionOutboundMessage, {
|
|
438
324
|
type: "schedule/inspect/response";
|
|
439
325
|
}>["payload"];
|
|
@@ -455,66 +341,6 @@ type ScheduleRunOncePayload = Extract<SessionOutboundMessage, {
|
|
|
455
341
|
type ScheduleUpdatePayload = Extract<SessionOutboundMessage, {
|
|
456
342
|
type: "schedule/update/response";
|
|
457
343
|
}>["payload"];
|
|
458
|
-
type SourceCataloguePayload = Extract<SessionOutboundMessage, {
|
|
459
|
-
type: "source/catalogue/response";
|
|
460
|
-
}>["payload"];
|
|
461
|
-
type SourceConnectPayload = Extract<SessionOutboundMessage, {
|
|
462
|
-
type: "source/connect/response";
|
|
463
|
-
}>["payload"];
|
|
464
|
-
type SourceListPayload = Extract<SessionOutboundMessage, {
|
|
465
|
-
type: "source/list/response";
|
|
466
|
-
}>["payload"];
|
|
467
|
-
type SourceCheckPayload = Extract<SessionOutboundMessage, {
|
|
468
|
-
type: "source/check/response";
|
|
469
|
-
}>["payload"];
|
|
470
|
-
export type SourceTriggersPayload = Extract<SessionOutboundMessage, {
|
|
471
|
-
type: "source/triggers/response";
|
|
472
|
-
}>["payload"];
|
|
473
|
-
export type SourceSubscribePayload = Extract<SessionOutboundMessage, {
|
|
474
|
-
type: "source/subscribe/response";
|
|
475
|
-
}>["payload"];
|
|
476
|
-
export type SourceActionsPayload = Extract<SessionOutboundMessage, {
|
|
477
|
-
type: "source/actions/response";
|
|
478
|
-
}>["payload"];
|
|
479
|
-
export type SourceRunPayload = Extract<SessionOutboundMessage, {
|
|
480
|
-
type: "source/run/response";
|
|
481
|
-
}>["payload"];
|
|
482
|
-
export type SourceDisconnectPayload = Extract<SessionOutboundMessage, {
|
|
483
|
-
type: "source/disconnect/response";
|
|
484
|
-
}>["payload"];
|
|
485
|
-
export type SourceRenamePayload = Extract<SessionOutboundMessage, {
|
|
486
|
-
type: "source/rename/response";
|
|
487
|
-
}>["payload"];
|
|
488
|
-
export type SourceAccountsPayload = Extract<SessionOutboundMessage, {
|
|
489
|
-
type: "source/accounts/response";
|
|
490
|
-
}>["payload"];
|
|
491
|
-
export type SourceAssignPayload = Extract<SessionOutboundMessage, {
|
|
492
|
-
type: "source/assign/response";
|
|
493
|
-
}>["payload"];
|
|
494
|
-
export type SourceAddCustomPayload = Extract<SessionOutboundMessage, {
|
|
495
|
-
type: "source/add-custom/response";
|
|
496
|
-
}>["payload"];
|
|
497
|
-
export type SourceTestCustomPayload = Extract<SessionOutboundMessage, {
|
|
498
|
-
type: "source/test-custom/response";
|
|
499
|
-
}>["payload"];
|
|
500
|
-
export type SourceSetSecretPayload = Extract<SessionOutboundMessage, {
|
|
501
|
-
type: "source/set-secret/response";
|
|
502
|
-
}>["payload"];
|
|
503
|
-
export type SourceItemsPayload = Extract<SessionOutboundMessage, {
|
|
504
|
-
type: "source/items/response";
|
|
505
|
-
}>["payload"];
|
|
506
|
-
export type IngestionFilterListPayload = Extract<SessionOutboundMessage, {
|
|
507
|
-
type: "ingestion/filter/list/response";
|
|
508
|
-
}>["payload"];
|
|
509
|
-
export type IngestionFilterCreatePayload = Extract<SessionOutboundMessage, {
|
|
510
|
-
type: "ingestion/filter/create/response";
|
|
511
|
-
}>["payload"];
|
|
512
|
-
export type IngestionFilterUpdatePayload = Extract<SessionOutboundMessage, {
|
|
513
|
-
type: "ingestion/filter/update/response";
|
|
514
|
-
}>["payload"];
|
|
515
|
-
export type IngestionFilterDeletePayload = Extract<SessionOutboundMessage, {
|
|
516
|
-
type: "ingestion/filter/delete/response";
|
|
517
|
-
}>["payload"];
|
|
518
344
|
export type FetchAgentTimelinePayload = FetchAgentTimelineResponseMessage["payload"];
|
|
519
345
|
export type AgentForkContextPayload = AgentForkContextResponseMessage["payload"];
|
|
520
346
|
export type FetchAgentTimelineDirection = FetchAgentTimelinePayload["direction"];
|
|
@@ -531,11 +357,37 @@ export interface FetchAgentTimelineOptions {
|
|
|
531
357
|
cursor?: FetchAgentTimelineCursor;
|
|
532
358
|
limit?: number;
|
|
533
359
|
projection?: FetchAgentTimelineProjection;
|
|
360
|
+
mergeWindow?: boolean;
|
|
534
361
|
requestId?: string;
|
|
535
362
|
timeout?: number;
|
|
536
363
|
}
|
|
537
|
-
export interface
|
|
538
|
-
|
|
364
|
+
export interface AgentTimelineSearchOptions {
|
|
365
|
+
agentId: string;
|
|
366
|
+
query: string;
|
|
367
|
+
cursor?: number;
|
|
368
|
+
}
|
|
369
|
+
export type AgentTimelineSearchPayload = Extract<SessionOutboundMessage, {
|
|
370
|
+
type: "agent.timeline.search.response";
|
|
371
|
+
}>["payload"];
|
|
372
|
+
export type AgentTimelinePromptIndexPayload = Extract<SessionOutboundMessage, {
|
|
373
|
+
type: "agent.timeline.list_prompts.response";
|
|
374
|
+
}>["payload"];
|
|
375
|
+
export type ProviderSubagentListPayload = Extract<SessionOutboundMessage, {
|
|
376
|
+
type: "agent.provider_subagents.list.response";
|
|
377
|
+
}>["payload"];
|
|
378
|
+
export type ProviderSubagentTimelinePayload = Extract<SessionOutboundMessage, {
|
|
379
|
+
type: "agent.provider_subagents.timeline.get.response";
|
|
380
|
+
}>["payload"];
|
|
381
|
+
export interface FetchProviderSubagentTimelineOptions {
|
|
382
|
+
direction?: ProviderSubagentTimelinePayload["direction"];
|
|
383
|
+
cursor?: FetchAgentTimelineCursor;
|
|
384
|
+
limit?: number;
|
|
385
|
+
requestId?: string;
|
|
386
|
+
timeout?: number;
|
|
387
|
+
}
|
|
388
|
+
export interface AgentForkContextOptions {
|
|
389
|
+
boundaryCursor?: FetchAgentTimelineCursor;
|
|
390
|
+
boundaryMessageId?: string;
|
|
539
391
|
requestId?: string;
|
|
540
392
|
}
|
|
541
393
|
type AgentRefreshedStatusPayload = z.infer<typeof AgentRefreshedStatusPayloadSchema>;
|
|
@@ -561,13 +413,11 @@ type FetchAgentsRequest = Extract<SessionInboundMessage, {
|
|
|
561
413
|
type: "fetch_agents_request";
|
|
562
414
|
}>;
|
|
563
415
|
export type FetchAgentsOptions = Omit<FetchAgentsRequest, "type" | "requestId"> & {
|
|
416
|
+
signal?: AbortSignal;
|
|
564
417
|
requestId?: string;
|
|
565
418
|
timeout?: number;
|
|
566
419
|
};
|
|
567
420
|
export type FetchAgentsEntry = FetchAgentsPayload["entries"][number];
|
|
568
|
-
export type GetAgentsByIdsPayload = Extract<SessionOutboundMessage, {
|
|
569
|
-
type: "get_agents_by_ids_response";
|
|
570
|
-
}>["payload"];
|
|
571
421
|
export type FetchAgentsPageInfo = FetchAgentsPayload["pageInfo"];
|
|
572
422
|
type FetchAgentHistoryPayload = Extract<SessionOutboundMessage, {
|
|
573
423
|
type: "fetch_agent_history_response";
|
|
@@ -597,74 +447,35 @@ type FetchWorkspacesRequest = Extract<SessionInboundMessage, {
|
|
|
597
447
|
type: "fetch_workspaces_request";
|
|
598
448
|
}>;
|
|
599
449
|
export type FetchWorkspacesOptions = Omit<FetchWorkspacesRequest, "type" | "requestId"> & {
|
|
450
|
+
signal?: AbortSignal;
|
|
600
451
|
requestId?: string;
|
|
601
452
|
};
|
|
602
453
|
export type FetchWorkspacesEntry = FetchWorkspacesPayload["entries"][number];
|
|
603
454
|
export type FetchWorkspacesPageInfo = FetchWorkspacesPayload["pageInfo"];
|
|
604
|
-
export
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
}
|
|
613
|
-
export
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
limit?: number;
|
|
627
|
-
since?: string;
|
|
628
|
-
authorAgentId?: string;
|
|
629
|
-
requestId?: string;
|
|
630
|
-
timeout?: number;
|
|
631
|
-
}
|
|
632
|
-
export interface WaitForChatMessagesOptions {
|
|
633
|
-
room: string;
|
|
634
|
-
afterMessageId?: string | null;
|
|
635
|
-
timeoutMs?: number;
|
|
636
|
-
requestId?: string;
|
|
637
|
-
}
|
|
638
|
-
export interface RunLoopOptions {
|
|
639
|
-
prompt: string;
|
|
640
|
-
cwd: string;
|
|
641
|
-
provider?: string;
|
|
642
|
-
model?: string;
|
|
643
|
-
modeId?: string;
|
|
644
|
-
verifierProvider?: string;
|
|
645
|
-
verifierModel?: string;
|
|
646
|
-
verifierModeId?: string;
|
|
647
|
-
verifyPrompt?: string | null;
|
|
648
|
-
verifyChecks?: string[];
|
|
649
|
-
name?: string | null;
|
|
650
|
-
sleepMs?: number;
|
|
651
|
-
maxIterations?: number;
|
|
652
|
-
maxTimeMs?: number;
|
|
653
|
-
requestId?: string;
|
|
654
|
-
}
|
|
655
|
-
export interface InspectLoopOptions {
|
|
656
|
-
id: string;
|
|
657
|
-
requestId?: string;
|
|
658
|
-
}
|
|
659
|
-
export interface LoopLogsOptions {
|
|
660
|
-
id: string;
|
|
661
|
-
afterSeq?: number;
|
|
662
|
-
requestId?: string;
|
|
663
|
-
}
|
|
664
|
-
export interface StopLoopOptions {
|
|
665
|
-
id: string;
|
|
455
|
+
export type WorkspaceLabelListPayload = Extract<SessionOutboundMessage, {
|
|
456
|
+
type: "workspace.label.list.response";
|
|
457
|
+
}>["payload"];
|
|
458
|
+
export type WorkspaceLabelAssignmentPayload = Extract<SessionOutboundMessage, {
|
|
459
|
+
type: "workspace.label.assignment.set.response";
|
|
460
|
+
}>["payload"];
|
|
461
|
+
export type WorkspaceLabelUpdatePayload = Extract<SessionOutboundMessage, {
|
|
462
|
+
type: "workspace.label.update.response";
|
|
463
|
+
}>["payload"];
|
|
464
|
+
export type WorkspaceLabelDeletePayload = Extract<SessionOutboundMessage, {
|
|
465
|
+
type: "workspace.label.delete.response";
|
|
466
|
+
}>["payload"];
|
|
467
|
+
export type WorkspaceLabelDeleteInspectPayload = Extract<SessionOutboundMessage, {
|
|
468
|
+
type: "workspace.label.delete.inspect.response";
|
|
469
|
+
}>["payload"];
|
|
470
|
+
export type ProjectListPayload = Extract<SessionOutboundMessage, {
|
|
471
|
+
type: "project.list.response";
|
|
472
|
+
}>["payload"];
|
|
473
|
+
type ProjectListRequest = Extract<SessionInboundMessage, {
|
|
474
|
+
type: "project.list.request";
|
|
475
|
+
}>;
|
|
476
|
+
export type ProjectListOptions = Omit<ProjectListRequest, "type" | "requestId"> & {
|
|
666
477
|
requestId?: string;
|
|
667
|
-
}
|
|
478
|
+
};
|
|
668
479
|
export interface CreateScheduleOptions {
|
|
669
480
|
prompt: string;
|
|
670
481
|
name?: string | null;
|
|
@@ -683,12 +494,10 @@ export interface CreateScheduleOptions {
|
|
|
683
494
|
modeId?: string;
|
|
684
495
|
model?: string;
|
|
685
496
|
thinkingOptionId?: string;
|
|
497
|
+
archiveOnFinish?: boolean;
|
|
498
|
+
isolation?: "local" | "worktree";
|
|
686
499
|
title?: string | null;
|
|
687
|
-
|
|
688
|
-
sandboxMode?: string;
|
|
689
|
-
networkAccess?: boolean;
|
|
690
|
-
webSearch?: boolean;
|
|
691
|
-
extra?: AgentSessionConfig["extra"];
|
|
500
|
+
providerOptions?: AgentSessionConfig["providerOptions"];
|
|
692
501
|
systemPrompt?: string;
|
|
693
502
|
mcpServers?: AgentSessionConfig["mcpServers"];
|
|
694
503
|
};
|
|
@@ -696,122 +505,23 @@ export interface CreateScheduleOptions {
|
|
|
696
505
|
maxRuns?: number;
|
|
697
506
|
expiresAt?: string;
|
|
698
507
|
runOnCreate?: boolean;
|
|
508
|
+
gate?: {
|
|
509
|
+
command: string;
|
|
510
|
+
timeoutMs?: number;
|
|
511
|
+
};
|
|
699
512
|
requestId?: string;
|
|
700
513
|
}
|
|
701
514
|
export interface InspectScheduleOptions {
|
|
702
515
|
id: string;
|
|
703
516
|
requestId?: string;
|
|
704
517
|
}
|
|
705
|
-
export interface SourceCatalogueOptions {
|
|
706
|
-
kind: SourceKind;
|
|
707
|
-
query: string;
|
|
708
|
-
/** Opaque aggregator cursor from a previous page. Pass it back untouched, never parse it. */
|
|
709
|
-
cursor?: string;
|
|
710
|
-
requestId?: string;
|
|
711
|
-
}
|
|
712
|
-
export interface SourceConnectOptions {
|
|
713
|
-
kind: SourceKind;
|
|
714
|
-
appSlug: string;
|
|
715
|
-
/**
|
|
716
|
-
* A custom OAuth client for the authorization (Pipedream `oa_...`). Check
|
|
717
|
-
* `server_info.features.sourceConnectOauthApp` first: an older daemon drops it.
|
|
718
|
-
*/
|
|
719
|
-
oauthAppId?: string;
|
|
720
|
-
requestId?: string;
|
|
721
|
-
}
|
|
722
|
-
export interface SourceCheckOptions {
|
|
723
|
-
sourceId: string;
|
|
724
|
-
requestId?: string;
|
|
725
|
-
}
|
|
726
|
-
export interface SourceSubscribeOptions {
|
|
727
|
-
sourceId: string;
|
|
728
|
-
componentId?: string;
|
|
729
|
-
/** Values for the trigger's own props, by name (e.g. `{ drive: "My Drive" }`). */
|
|
730
|
-
props?: Record<string, unknown>;
|
|
731
|
-
requestId?: string;
|
|
732
|
-
}
|
|
733
|
-
export interface SourceDisconnectOptions {
|
|
734
|
-
sourceId: string;
|
|
735
|
-
requestId?: string;
|
|
736
|
-
}
|
|
737
|
-
export interface SourceRenameOptions {
|
|
738
|
-
sourceId: string;
|
|
739
|
-
/** Null clears the name, and so does a blank string (the daemon trims). */
|
|
740
|
-
nickname: string | null;
|
|
741
|
-
requestId?: string;
|
|
742
|
-
}
|
|
743
|
-
export interface SourceAccountsOptions {
|
|
744
|
-
sourceId: string;
|
|
745
|
-
requestId?: string;
|
|
746
|
-
}
|
|
747
|
-
export interface SourceActionsOptions {
|
|
748
|
-
sourceId: string;
|
|
749
|
-
requestId?: string;
|
|
750
|
-
}
|
|
751
|
-
export interface SourceRunOptions {
|
|
752
|
-
sourceId: string;
|
|
753
|
-
/** The action component id, as `source/actions` lists it (e.g. "gmail-send-email"). */
|
|
754
|
-
actionId: string;
|
|
755
|
-
/** The action's own input. The account is never part of it. */
|
|
756
|
-
props: Record<string, unknown>;
|
|
757
|
-
requestId?: string;
|
|
758
|
-
}
|
|
759
|
-
export interface SourceAssignOptions {
|
|
760
|
-
sourceId: string;
|
|
761
|
-
/** The aggregator account id, as `source/accounts` reports it. */
|
|
762
|
-
accountId: string;
|
|
763
|
-
requestId?: string;
|
|
764
|
-
}
|
|
765
|
-
/** An HTTPS API to add or test as a custom source. */
|
|
766
|
-
export interface SourceCustomApiOptions {
|
|
767
|
-
appSlug: "gitlab" | "github" | "jira" | "generic";
|
|
768
|
-
baseUrl: string;
|
|
769
|
-
auth: {
|
|
770
|
-
scheme: "none";
|
|
771
|
-
} | {
|
|
772
|
-
scheme: "bearer";
|
|
773
|
-
} | {
|
|
774
|
-
scheme: "basic";
|
|
775
|
-
} | {
|
|
776
|
-
scheme: "header";
|
|
777
|
-
name: string;
|
|
778
|
-
};
|
|
779
|
-
/** A generic API's probe path, relative to `baseUrl`. */
|
|
780
|
-
probePath?: string;
|
|
781
|
-
/** Write-only: the daemon keeps it and no response ever carries it back. */
|
|
782
|
-
secret?: string | null;
|
|
783
|
-
requestId?: string;
|
|
784
|
-
}
|
|
785
|
-
export interface SourceItemsOptions {
|
|
786
|
-
sourceId: string;
|
|
787
|
-
/** Epoch ms, inclusive. Nothing older comes back. */
|
|
788
|
-
sinceMs: number;
|
|
789
|
-
/** Events read from each deployed trigger. Absent means the daemon's default. */
|
|
790
|
-
perTriggerLimit?: number;
|
|
791
|
-
requestId?: string;
|
|
792
|
-
}
|
|
793
|
-
export interface IngestionFilterListOptions {
|
|
794
|
-
/** Absent means every filter on the daemon. */
|
|
795
|
-
sourceId?: string;
|
|
796
|
-
requestId?: string;
|
|
797
|
-
}
|
|
798
|
-
export interface IngestionFilterCreateOptions {
|
|
799
|
-
draft: FilterDraft;
|
|
800
|
-
requestId?: string;
|
|
801
|
-
}
|
|
802
|
-
export interface IngestionFilterUpdateOptions {
|
|
803
|
-
filterId: string;
|
|
804
|
-
patch: FilterPatch;
|
|
805
|
-
requestId?: string;
|
|
806
|
-
}
|
|
807
|
-
export interface IngestionFilterDeleteOptions {
|
|
808
|
-
filterId: string;
|
|
809
|
-
requestId?: string;
|
|
810
|
-
}
|
|
811
518
|
export interface UpdateScheduleNewAgentConfig {
|
|
812
519
|
provider?: string;
|
|
813
520
|
model?: string | null;
|
|
814
521
|
modeId?: string | null;
|
|
522
|
+
thinkingOptionId?: string | null;
|
|
523
|
+
archiveOnFinish?: boolean;
|
|
524
|
+
isolation?: "local" | "worktree";
|
|
815
525
|
cwd?: string;
|
|
816
526
|
}
|
|
817
527
|
export interface UpdateScheduleOptions {
|
|
@@ -822,6 +532,10 @@ export interface UpdateScheduleOptions {
|
|
|
822
532
|
newAgentConfig?: UpdateScheduleNewAgentConfig;
|
|
823
533
|
maxRuns?: number | null;
|
|
824
534
|
expiresAt?: string | null;
|
|
535
|
+
gate?: {
|
|
536
|
+
command: string;
|
|
537
|
+
timeoutMs?: number;
|
|
538
|
+
} | null;
|
|
825
539
|
requestId?: string;
|
|
826
540
|
}
|
|
827
541
|
export interface RenameBranchInput {
|
|
@@ -836,6 +550,9 @@ export interface RenameTerminalInput {
|
|
|
836
550
|
}
|
|
837
551
|
type OpenProjectPayload = OpenProjectResponseMessage["payload"];
|
|
838
552
|
type ProjectAddPayload = ProjectAddResponse["payload"];
|
|
553
|
+
export type ProjectCreateDirectoryPayload = ProjectCreateDirectoryResponse["payload"];
|
|
554
|
+
export type WorkspaceGithubSearchRepositoriesPayload = WorkspaceGithubSearchRepositoriesResponse["payload"];
|
|
555
|
+
type ProjectGithubClonePayload = ProjectGithubCloneResponse["payload"];
|
|
839
556
|
type ArchiveWorkspacePayload = ArchiveWorkspaceResponseMessage["payload"];
|
|
840
557
|
type WorkspaceSetupStatusPayload = WorkspaceSetupStatusResponseMessage["payload"];
|
|
841
558
|
export interface FetchAgentResult {
|
|
@@ -848,36 +565,433 @@ export interface WaitForFinishResult {
|
|
|
848
565
|
error: string | null;
|
|
849
566
|
lastMessage: string | null;
|
|
850
567
|
}
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
568
|
+
type GetDaemonConfigResponse = Extract<SessionOutboundMessage, {
|
|
569
|
+
type: "get_daemon_config_response";
|
|
570
|
+
}>;
|
|
571
|
+
type SetDaemonConfigResponse = Extract<SessionOutboundMessage, {
|
|
572
|
+
type: "set_daemon_config_response";
|
|
573
|
+
}>;
|
|
574
|
+
type CorrelatedResponseMessage = Extract<SessionOutboundMessage, {
|
|
575
|
+
payload: {
|
|
576
|
+
requestId: string;
|
|
577
|
+
};
|
|
578
|
+
}> | Extract<SessionOutboundMessage, {
|
|
579
|
+
type: "terminals_changed";
|
|
580
|
+
}> | GetDaemonConfigResponse | SetDaemonConfigResponse;
|
|
581
|
+
type CorrelatedResponseType = CorrelatedResponseMessage["type"];
|
|
582
|
+
type CorrelatedResponsePayloads = {
|
|
583
|
+
[Message in CorrelatedResponseMessage as Message["type"]]: Message["payload"];
|
|
584
|
+
};
|
|
585
|
+
type CorrelatedResponsePayload<TType extends CorrelatedResponseType> = CorrelatedResponsePayloads[TType];
|
|
586
|
+
export declare class DaemonConnectionError extends Error {
|
|
587
|
+
readonly code: "DAEMON_CONNECTION_LOST" | "DAEMON_REQUEST_TIMEOUT";
|
|
588
|
+
constructor(message: string, code?: "DAEMON_CONNECTION_LOST" | "DAEMON_REQUEST_TIMEOUT");
|
|
859
589
|
}
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
readonly code: Extract<FileUploadErrorCode, "too_large">;
|
|
868
|
-
constructor(uploadId: string, detail?: string);
|
|
590
|
+
export declare function supportsUsageReports(features: ServerInfoStatusPayload["features"]): boolean;
|
|
591
|
+
export interface AgentDecisionsExpireResult {
|
|
592
|
+
dryRun: boolean;
|
|
593
|
+
expired: ExpiredDecisionRow[];
|
|
594
|
+
agents: number;
|
|
595
|
+
archivedAgents: number;
|
|
596
|
+
written: number;
|
|
869
597
|
}
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
598
|
+
export interface AskFleetDecisionOptions {
|
|
599
|
+
requestId?: string;
|
|
600
|
+
name: string;
|
|
601
|
+
kind: "gate-approval" | "action-approval" | "outcome-review";
|
|
602
|
+
question: string;
|
|
603
|
+
posture: "blocking" | "deferring" | "advisory";
|
|
604
|
+
options: Array<{
|
|
605
|
+
id: string;
|
|
606
|
+
label: string;
|
|
607
|
+
effect: {
|
|
608
|
+
kind: "act" | "rehearse" | "defer" | "suppress";
|
|
609
|
+
reversibility: "reversible" | "compensable" | "irreversible";
|
|
610
|
+
compensatingAction?: string;
|
|
611
|
+
};
|
|
612
|
+
}>;
|
|
613
|
+
runId?: string;
|
|
614
|
+
itemKey?: string;
|
|
615
|
+
evidence?: string;
|
|
616
|
+
onExpiry?: string;
|
|
617
|
+
expiresInMs?: number;
|
|
879
618
|
}
|
|
880
|
-
|
|
619
|
+
type CaptureAgentPanePayload = CaptureAgentPaneResponse["payload"];
|
|
620
|
+
type ChatCreatePayload = Extract<SessionOutboundMessage, {
|
|
621
|
+
type: "chat/create/response";
|
|
622
|
+
}>["payload"];
|
|
623
|
+
type ChatDeletePayload = Extract<SessionOutboundMessage, {
|
|
624
|
+
type: "chat/delete/response";
|
|
625
|
+
}>["payload"];
|
|
626
|
+
type ChatInspectPayload = Extract<SessionOutboundMessage, {
|
|
627
|
+
type: "chat/inspect/response";
|
|
628
|
+
}>["payload"];
|
|
629
|
+
type ChatListPayload = Extract<SessionOutboundMessage, {
|
|
630
|
+
type: "chat/list/response";
|
|
631
|
+
}>["payload"];
|
|
632
|
+
type ChatPostPayload = Extract<SessionOutboundMessage, {
|
|
633
|
+
type: "chat/post/response";
|
|
634
|
+
}>["payload"];
|
|
635
|
+
type ChatReadPayload = Extract<SessionOutboundMessage, {
|
|
636
|
+
type: "chat/read/response";
|
|
637
|
+
}>["payload"];
|
|
638
|
+
type ChatWaitPayload = Extract<SessionOutboundMessage, {
|
|
639
|
+
type: "chat/wait/response";
|
|
640
|
+
}>["payload"];
|
|
641
|
+
export interface CreateChatRoomOptions {
|
|
642
|
+
name: string;
|
|
643
|
+
purpose?: string | null;
|
|
644
|
+
requestId?: string;
|
|
645
|
+
}
|
|
646
|
+
export interface CreateFleetLoopOptions {
|
|
647
|
+
requestId?: string;
|
|
648
|
+
name: string;
|
|
649
|
+
description: string;
|
|
650
|
+
cron: string;
|
|
651
|
+
action: string;
|
|
652
|
+
mode?: "live" | "dry-run";
|
|
653
|
+
rails?: string;
|
|
654
|
+
allowed?: string;
|
|
655
|
+
}
|
|
656
|
+
export interface DaemonRequestCompletion {
|
|
657
|
+
requestType: SessionInboundMessage["type"];
|
|
658
|
+
durationMs: number;
|
|
659
|
+
outcome: "ok" | "error" | "timeout";
|
|
660
|
+
request: SessionInboundMessage;
|
|
661
|
+
/** The selected response value on `ok`, otherwise undefined. */
|
|
662
|
+
response?: unknown;
|
|
663
|
+
}
|
|
664
|
+
export interface DeleteChatRoomOptions {
|
|
665
|
+
room: string;
|
|
666
|
+
requestId?: string;
|
|
667
|
+
}
|
|
668
|
+
type FleetAskPayload = Extract<SessionOutboundMessage, {
|
|
669
|
+
type: "fleet/ask/response";
|
|
670
|
+
}>["payload"];
|
|
671
|
+
type FleetCreatePayload = Extract<SessionOutboundMessage, {
|
|
672
|
+
type: "fleet/create/response";
|
|
673
|
+
}>["payload"];
|
|
674
|
+
type FleetDecisionsPayload = Extract<SessionOutboundMessage, {
|
|
675
|
+
type: "fleet/decisions/response";
|
|
676
|
+
}>["payload"];
|
|
677
|
+
type FleetExecutionsPayload = Extract<SessionOutboundMessage, {
|
|
678
|
+
type: "fleet/executions/response";
|
|
679
|
+
}>["payload"];
|
|
680
|
+
type FleetInspectPayload = Extract<SessionOutboundMessage, {
|
|
681
|
+
type: "fleet/inspect/response";
|
|
682
|
+
}>["payload"];
|
|
683
|
+
type FleetListPayload = Extract<SessionOutboundMessage, {
|
|
684
|
+
type: "fleet/list/response";
|
|
685
|
+
}>["payload"];
|
|
686
|
+
type FleetPausePayload = Extract<SessionOutboundMessage, {
|
|
687
|
+
type: "fleet/pause/response";
|
|
688
|
+
}>["payload"];
|
|
689
|
+
type FleetResolveDecisionPayload = Extract<SessionOutboundMessage, {
|
|
690
|
+
type: "fleet/resolve-decision/response";
|
|
691
|
+
}>["payload"];
|
|
692
|
+
type FleetResumePayload = Extract<SessionOutboundMessage, {
|
|
693
|
+
type: "fleet/resume/response";
|
|
694
|
+
}>["payload"];
|
|
695
|
+
type FleetRunNowPayload = Extract<SessionOutboundMessage, {
|
|
696
|
+
type: "fleet/run-now/response";
|
|
697
|
+
}>["payload"];
|
|
698
|
+
type FleetSetModePayload = Extract<SessionOutboundMessage, {
|
|
699
|
+
type: "fleet/set-mode/response";
|
|
700
|
+
}>["payload"];
|
|
701
|
+
type FleetSetParamsPayload = Extract<SessionOutboundMessage, {
|
|
702
|
+
type: "fleet/set-params/response";
|
|
703
|
+
}>["payload"];
|
|
704
|
+
export type GetAgentsByIdsPayload = Extract<SessionOutboundMessage, {
|
|
705
|
+
type: "get_agents_by_ids_response";
|
|
706
|
+
}>["payload"];
|
|
707
|
+
export type IngestionApplyPayload = Extract<SessionOutboundMessage, {
|
|
708
|
+
type: "ingestion/apply/response";
|
|
709
|
+
}>["payload"];
|
|
710
|
+
type IngestionBackfillPayload = Extract<SessionOutboundMessage, {
|
|
711
|
+
type: "ingestion/backfill/response";
|
|
712
|
+
}>["payload"];
|
|
713
|
+
export type IngestionCohortCancelPayload = Extract<SessionOutboundMessage, {
|
|
714
|
+
type: "ingestion/cohort/cancel/response";
|
|
715
|
+
}>["payload"];
|
|
716
|
+
export type IngestionCohortInspectPayload = Extract<SessionOutboundMessage, {
|
|
717
|
+
type: "ingestion/cohort/inspect/response";
|
|
718
|
+
}>["payload"];
|
|
719
|
+
export interface IngestionFilterCreateOptions {
|
|
720
|
+
draft: FilterDraft;
|
|
721
|
+
requestId?: string;
|
|
722
|
+
}
|
|
723
|
+
export type IngestionFilterCreatePayload = Extract<SessionOutboundMessage, {
|
|
724
|
+
type: "ingestion/filter/create/response";
|
|
725
|
+
}>["payload"];
|
|
726
|
+
export interface IngestionFilterDeleteOptions {
|
|
727
|
+
filterId: string;
|
|
728
|
+
requestId?: string;
|
|
729
|
+
}
|
|
730
|
+
export type IngestionFilterDeletePayload = Extract<SessionOutboundMessage, {
|
|
731
|
+
type: "ingestion/filter/delete/response";
|
|
732
|
+
}>["payload"];
|
|
733
|
+
export interface IngestionFilterListOptions {
|
|
734
|
+
/** Absent means every filter on the daemon. */
|
|
735
|
+
sourceId?: string;
|
|
736
|
+
requestId?: string;
|
|
737
|
+
}
|
|
738
|
+
export type IngestionFilterListPayload = Extract<SessionOutboundMessage, {
|
|
739
|
+
type: "ingestion/filter/list/response";
|
|
740
|
+
}>["payload"];
|
|
741
|
+
export interface IngestionFilterUpdateOptions {
|
|
742
|
+
filterId: string;
|
|
743
|
+
patch: FilterPatch;
|
|
744
|
+
requestId?: string;
|
|
745
|
+
}
|
|
746
|
+
export type IngestionFilterUpdatePayload = Extract<SessionOutboundMessage, {
|
|
747
|
+
type: "ingestion/filter/update/response";
|
|
748
|
+
}>["payload"];
|
|
749
|
+
export interface IngestionRunsOptions {
|
|
750
|
+
requestId?: string;
|
|
751
|
+
filterId: string;
|
|
752
|
+
/**
|
|
753
|
+
* Include the runs reconciliation has closed. Defaults to false at the daemon.
|
|
754
|
+
*
|
|
755
|
+
* Omit it. The Inbox wants open obligations, and the daemon's default is the
|
|
756
|
+
* one that cannot render a stale row by accident.
|
|
757
|
+
*/
|
|
758
|
+
includeClosed?: boolean;
|
|
759
|
+
}
|
|
760
|
+
/** Exported because `packages/app` (Story 6.3) renders this payload directly. */
|
|
761
|
+
export type IngestionRunsPayload = Extract<SessionOutboundMessage, {
|
|
762
|
+
type: "ingestion/runs/response";
|
|
763
|
+
}>["payload"];
|
|
764
|
+
export interface InspectChatRoomOptions {
|
|
765
|
+
room: string;
|
|
766
|
+
requestId?: string;
|
|
767
|
+
}
|
|
768
|
+
export interface InspectFleetLoopOptions {
|
|
769
|
+
requestId?: string;
|
|
770
|
+
name: string;
|
|
771
|
+
}
|
|
772
|
+
export interface InspectLoopOptions {
|
|
773
|
+
id: string;
|
|
774
|
+
requestId?: string;
|
|
775
|
+
}
|
|
776
|
+
export interface ListFleetDecisionsOptions {
|
|
777
|
+
requestId?: string;
|
|
778
|
+
name?: string;
|
|
779
|
+
includeResolved?: boolean;
|
|
780
|
+
}
|
|
781
|
+
type LoopInspectPayload = Extract<SessionOutboundMessage, {
|
|
782
|
+
type: "loop/inspect/response";
|
|
783
|
+
}>["payload"];
|
|
784
|
+
type LoopListPayload = Extract<SessionOutboundMessage, {
|
|
785
|
+
type: "loop/list/response";
|
|
786
|
+
}>["payload"];
|
|
787
|
+
export interface LoopLogsOptions {
|
|
788
|
+
id: string;
|
|
789
|
+
afterSeq?: number;
|
|
790
|
+
requestId?: string;
|
|
791
|
+
}
|
|
792
|
+
type LoopLogsPayload = Extract<SessionOutboundMessage, {
|
|
793
|
+
type: "loop/logs/response";
|
|
794
|
+
}>["payload"];
|
|
795
|
+
type LoopRunPayload = Extract<SessionOutboundMessage, {
|
|
796
|
+
type: "loop/run/response";
|
|
797
|
+
}>["payload"];
|
|
798
|
+
type LoopStopPayload = Extract<SessionOutboundMessage, {
|
|
799
|
+
type: "loop/stop/response";
|
|
800
|
+
}>["payload"];
|
|
801
|
+
export interface PostChatMessageOptions {
|
|
802
|
+
room: string;
|
|
803
|
+
body: string;
|
|
804
|
+
authorAgentId?: string;
|
|
805
|
+
replyToMessageId?: string | null;
|
|
806
|
+
requestId?: string;
|
|
807
|
+
}
|
|
808
|
+
export interface ReadChatMessagesOptions {
|
|
809
|
+
room: string;
|
|
810
|
+
limit?: number;
|
|
811
|
+
since?: string;
|
|
812
|
+
authorAgentId?: string;
|
|
813
|
+
requestId?: string;
|
|
814
|
+
timeout?: number;
|
|
815
|
+
}
|
|
816
|
+
export interface ResolveFleetDecisionOptions {
|
|
817
|
+
requestId?: string;
|
|
818
|
+
decisionId: string;
|
|
819
|
+
optionId: string;
|
|
820
|
+
}
|
|
821
|
+
export interface RunLoopOptions {
|
|
822
|
+
prompt: string;
|
|
823
|
+
cwd: string;
|
|
824
|
+
provider?: string;
|
|
825
|
+
model?: string;
|
|
826
|
+
modeId?: string;
|
|
827
|
+
verifierProvider?: string;
|
|
828
|
+
verifierModel?: string;
|
|
829
|
+
verifierModeId?: string;
|
|
830
|
+
verifyPrompt?: string | null;
|
|
831
|
+
verifyChecks?: string[];
|
|
832
|
+
name?: string | null;
|
|
833
|
+
sleepMs?: number;
|
|
834
|
+
maxIterations?: number;
|
|
835
|
+
maxTimeMs?: number;
|
|
836
|
+
requestId?: string;
|
|
837
|
+
}
|
|
838
|
+
export interface SetFleetLoopModeOptions {
|
|
839
|
+
requestId?: string;
|
|
840
|
+
name: string;
|
|
841
|
+
mode: "live" | "dry-run";
|
|
842
|
+
}
|
|
843
|
+
export interface SetFleetLoopParamsOptions {
|
|
844
|
+
requestId?: string;
|
|
845
|
+
name: string;
|
|
846
|
+
values: Record<string, string | number | boolean | string[]>;
|
|
847
|
+
}
|
|
848
|
+
export interface SourceAccountsOptions {
|
|
849
|
+
sourceId: string;
|
|
850
|
+
requestId?: string;
|
|
851
|
+
}
|
|
852
|
+
export type SourceAccountsPayload = Extract<SessionOutboundMessage, {
|
|
853
|
+
type: "source/accounts/response";
|
|
854
|
+
}>["payload"];
|
|
855
|
+
export interface SourceActionsOptions {
|
|
856
|
+
sourceId: string;
|
|
857
|
+
requestId?: string;
|
|
858
|
+
}
|
|
859
|
+
export type SourceActionsPayload = Extract<SessionOutboundMessage, {
|
|
860
|
+
type: "source/actions/response";
|
|
861
|
+
}>["payload"];
|
|
862
|
+
export interface SourceAssignOptions {
|
|
863
|
+
sourceId: string;
|
|
864
|
+
/** The aggregator account id, as `source/accounts` reports it. */
|
|
865
|
+
accountId: string;
|
|
866
|
+
requestId?: string;
|
|
867
|
+
}
|
|
868
|
+
export type SourceAssignPayload = Extract<SessionOutboundMessage, {
|
|
869
|
+
type: "source/assign/response";
|
|
870
|
+
}>["payload"];
|
|
871
|
+
export type SourceAddCustomPayload = Extract<SessionOutboundMessage, {
|
|
872
|
+
type: "source/add-custom/response";
|
|
873
|
+
}>["payload"];
|
|
874
|
+
export type SourceTestCustomPayload = Extract<SessionOutboundMessage, {
|
|
875
|
+
type: "source/test-custom/response";
|
|
876
|
+
}>["payload"];
|
|
877
|
+
export type SourceSetSecretPayload = Extract<SessionOutboundMessage, {
|
|
878
|
+
type: "source/set-secret/response";
|
|
879
|
+
}>["payload"];
|
|
880
|
+
/** An HTTPS API to add or test as a custom source. */
|
|
881
|
+
export interface SourceCustomApiOptions {
|
|
882
|
+
appSlug: "gitlab" | "github" | "jira" | "generic";
|
|
883
|
+
baseUrl: string;
|
|
884
|
+
auth: {
|
|
885
|
+
scheme: "none";
|
|
886
|
+
} | {
|
|
887
|
+
scheme: "bearer";
|
|
888
|
+
} | {
|
|
889
|
+
scheme: "basic";
|
|
890
|
+
} | {
|
|
891
|
+
scheme: "header";
|
|
892
|
+
name: string;
|
|
893
|
+
};
|
|
894
|
+
/** A generic API's probe path, relative to `baseUrl`. */
|
|
895
|
+
probePath?: string;
|
|
896
|
+
/** Write-only: the daemon keeps it and no response ever carries it back. */
|
|
897
|
+
secret?: string | null;
|
|
898
|
+
requestId?: string;
|
|
899
|
+
}
|
|
900
|
+
export interface SourceCatalogueOptions {
|
|
901
|
+
kind: SourceKind;
|
|
902
|
+
query: string;
|
|
903
|
+
/** Opaque aggregator cursor from a previous page. Pass it back untouched, never parse it. */
|
|
904
|
+
cursor?: string;
|
|
905
|
+
requestId?: string;
|
|
906
|
+
}
|
|
907
|
+
type SourceCataloguePayload = Extract<SessionOutboundMessage, {
|
|
908
|
+
type: "source/catalogue/response";
|
|
909
|
+
}>["payload"];
|
|
910
|
+
export interface SourceCheckOptions {
|
|
911
|
+
sourceId: string;
|
|
912
|
+
requestId?: string;
|
|
913
|
+
}
|
|
914
|
+
type SourceCheckPayload = Extract<SessionOutboundMessage, {
|
|
915
|
+
type: "source/check/response";
|
|
916
|
+
}>["payload"];
|
|
917
|
+
export interface SourceConnectOptions {
|
|
918
|
+
kind: SourceKind;
|
|
919
|
+
appSlug: string;
|
|
920
|
+
/**
|
|
921
|
+
* A custom OAuth client for the authorization (Pipedream `oa_...`). Check
|
|
922
|
+
* `server_info.features.sourceConnectOauthApp` first: an older daemon drops it.
|
|
923
|
+
*/
|
|
924
|
+
oauthAppId?: string;
|
|
925
|
+
requestId?: string;
|
|
926
|
+
}
|
|
927
|
+
type SourceConnectPayload = Extract<SessionOutboundMessage, {
|
|
928
|
+
type: "source/connect/response";
|
|
929
|
+
}>["payload"];
|
|
930
|
+
export interface SourceDisconnectOptions {
|
|
931
|
+
sourceId: string;
|
|
932
|
+
requestId?: string;
|
|
933
|
+
}
|
|
934
|
+
export type SourceDisconnectPayload = Extract<SessionOutboundMessage, {
|
|
935
|
+
type: "source/disconnect/response";
|
|
936
|
+
}>["payload"];
|
|
937
|
+
export interface SourceItemsOptions {
|
|
938
|
+
sourceId: string;
|
|
939
|
+
/** Epoch ms, inclusive. Nothing older comes back. */
|
|
940
|
+
sinceMs: number;
|
|
941
|
+
/** Events read from each deployed trigger. Absent means the daemon's default. */
|
|
942
|
+
perTriggerLimit?: number;
|
|
943
|
+
requestId?: string;
|
|
944
|
+
}
|
|
945
|
+
export type SourceItemsPayload = Extract<SessionOutboundMessage, {
|
|
946
|
+
type: "source/items/response";
|
|
947
|
+
}>["payload"];
|
|
948
|
+
type SourceListPayload = Extract<SessionOutboundMessage, {
|
|
949
|
+
type: "source/list/response";
|
|
950
|
+
}>["payload"];
|
|
951
|
+
export interface SourceRenameOptions {
|
|
952
|
+
sourceId: string;
|
|
953
|
+
/** Null clears the name, and so does a blank string (the daemon trims). */
|
|
954
|
+
nickname: string | null;
|
|
955
|
+
requestId?: string;
|
|
956
|
+
}
|
|
957
|
+
export type SourceRenamePayload = Extract<SessionOutboundMessage, {
|
|
958
|
+
type: "source/rename/response";
|
|
959
|
+
}>["payload"];
|
|
960
|
+
export interface SourceRunOptions {
|
|
961
|
+
sourceId: string;
|
|
962
|
+
/** The action component id, as `source/actions` lists it (e.g. "gmail-send-email"). */
|
|
963
|
+
actionId: string;
|
|
964
|
+
/** The action's own input. The account is never part of it. */
|
|
965
|
+
props: Record<string, unknown>;
|
|
966
|
+
requestId?: string;
|
|
967
|
+
}
|
|
968
|
+
export type SourceRunPayload = Extract<SessionOutboundMessage, {
|
|
969
|
+
type: "source/run/response";
|
|
970
|
+
}>["payload"];
|
|
971
|
+
export interface SourceSubscribeOptions {
|
|
972
|
+
sourceId: string;
|
|
973
|
+
componentId?: string;
|
|
974
|
+
/** Values for the trigger's own props, by name (e.g. `{ drive: "My Drive" }`). */
|
|
975
|
+
props?: Record<string, unknown>;
|
|
976
|
+
requestId?: string;
|
|
977
|
+
}
|
|
978
|
+
export type SourceSubscribePayload = Extract<SessionOutboundMessage, {
|
|
979
|
+
type: "source/subscribe/response";
|
|
980
|
+
}>["payload"];
|
|
981
|
+
export type SourceTriggersPayload = Extract<SessionOutboundMessage, {
|
|
982
|
+
type: "source/triggers/response";
|
|
983
|
+
}>["payload"];
|
|
984
|
+
export interface StopLoopOptions {
|
|
985
|
+
id: string;
|
|
986
|
+
requestId?: string;
|
|
987
|
+
}
|
|
988
|
+
export interface WaitForChatMessagesOptions {
|
|
989
|
+
room: string;
|
|
990
|
+
afterMessageId?: string | null;
|
|
991
|
+
timeoutMs?: number;
|
|
992
|
+
requestId?: string;
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
881
995
|
* A directory-suggestions request that a later keystroke replaced before it finished.
|
|
882
996
|
*
|
|
883
997
|
* Not a failure of anything: the answer was simply abandoned because it is no longer the
|
|
@@ -888,9 +1002,41 @@ export declare class UploadFailedError extends Error {
|
|
|
888
1002
|
export declare class DirectorySuggestionsSupersededError extends Error {
|
|
889
1003
|
constructor();
|
|
890
1004
|
}
|
|
1005
|
+
/**
|
|
1006
|
+
* Thrown when an in-flight `uploadFile()` is cancelled via its `AbortSignal`.
|
|
1007
|
+
* Distinct from {@link UploadCapExceededError} and {@link UploadFailedError} so
|
|
1008
|
+
* Epic 5's attachment-chip UI can render the "cancelled" state specifically.
|
|
1009
|
+
*/
|
|
1010
|
+
export declare class UploadCancelledError extends Error {
|
|
1011
|
+
readonly uploadId: string;
|
|
1012
|
+
constructor(uploadId: string);
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* Thrown when the daemon rejects an upload because it exceeds the size cap —
|
|
1016
|
+
* either the declared-size early reject at begin, or an incremental reject
|
|
1017
|
+
* mid-stream (story 2.2). Carries the `too_large` code and any daemon detail.
|
|
1018
|
+
*/
|
|
1019
|
+
export declare class UploadCapExceededError extends Error {
|
|
1020
|
+
readonly uploadId: string;
|
|
1021
|
+
readonly code: Extract<FileUploadErrorCode, "too_large">;
|
|
1022
|
+
constructor(uploadId: string, detail?: string);
|
|
1023
|
+
}
|
|
1024
|
+
/**
|
|
1025
|
+
* Thrown for any other upload failure — transport error, `write_failed`,
|
|
1026
|
+
* `checksum_mismatch`, or an unexpected daemon error. The third distinguishable
|
|
1027
|
+
* reject path alongside cancelled and cap-exceeded.
|
|
1028
|
+
*/
|
|
1029
|
+
export declare class UploadFailedError extends Error {
|
|
1030
|
+
readonly uploadId: string;
|
|
1031
|
+
readonly code?: FileUploadErrorCode;
|
|
1032
|
+
constructor(uploadId: string, message: string, code?: FileUploadErrorCode);
|
|
1033
|
+
}
|
|
891
1034
|
export declare class DaemonClient {
|
|
892
1035
|
private config;
|
|
1036
|
+
private readonly providerSnapshotUpdates;
|
|
1037
|
+
private readonly owned;
|
|
893
1038
|
private transport;
|
|
1039
|
+
private helloAuth;
|
|
894
1040
|
private transportCleanup;
|
|
895
1041
|
private rawMessageListeners;
|
|
896
1042
|
private messageHandlers;
|
|
@@ -907,9 +1053,8 @@ export declare class DaemonClient {
|
|
|
907
1053
|
private connectResolve;
|
|
908
1054
|
private connectReject;
|
|
909
1055
|
private lastErrorValue;
|
|
1056
|
+
private authFailureReasonValue;
|
|
910
1057
|
private connectionState;
|
|
911
|
-
private checkoutDiffSubscriptions;
|
|
912
|
-
private terminalDirectorySubscriptions;
|
|
913
1058
|
private readonly terminalStreams;
|
|
914
1059
|
private pendingBinaryFileReads;
|
|
915
1060
|
private activeBinaryFileTransfers;
|
|
@@ -924,21 +1069,27 @@ export declare class DaemonClient {
|
|
|
924
1069
|
private runtimeMetricsInterval;
|
|
925
1070
|
private runtimeMetrics;
|
|
926
1071
|
private pingProbe;
|
|
1072
|
+
private connectionVerification;
|
|
927
1073
|
private livenessHeartbeatTimer;
|
|
928
1074
|
private lastLivenessRttMs;
|
|
929
1075
|
private consecutiveLivenessFailures;
|
|
930
1076
|
constructor(config: DaemonClientConfig);
|
|
931
1077
|
connect(): Promise<void>;
|
|
932
1078
|
private attemptConnect;
|
|
1079
|
+
private assertEncryptedRelayAuth;
|
|
933
1080
|
private resolveConnect;
|
|
934
1081
|
private rejectConnect;
|
|
935
1082
|
close(): Promise<void>;
|
|
936
|
-
ensureConnected(
|
|
1083
|
+
ensureConnected(options?: {
|
|
1084
|
+
verify?: boolean;
|
|
1085
|
+
}): void;
|
|
1086
|
+
private verifyConnection;
|
|
937
1087
|
getConnectionState(): ConnectionState;
|
|
938
1088
|
subscribeConnectionStatus(listener: (status: ConnectionState) => void): () => void;
|
|
939
1089
|
get isConnected(): boolean;
|
|
940
1090
|
get isConnecting(): boolean;
|
|
941
1091
|
get lastError(): string | null;
|
|
1092
|
+
get authFailureReason(): DaemonAuthFailureReason | null;
|
|
942
1093
|
getLastLivenessRttMs(): number | null;
|
|
943
1094
|
subscribe(handler: DaemonEventHandler): () => void;
|
|
944
1095
|
subscribeRawMessages(handler: (message: SessionOutboundMessage) => void): () => void;
|
|
@@ -946,13 +1097,18 @@ export declare class DaemonClient {
|
|
|
946
1097
|
type: TType;
|
|
947
1098
|
}>) => void): () => void;
|
|
948
1099
|
on(handler: DaemonEventHandler): () => void;
|
|
1100
|
+
onAgentAttentionRequired(handler: (notification: AgentAttentionRequiredNotification) => void): () => void;
|
|
1101
|
+
private beginTraceSection;
|
|
1102
|
+
private endTraceSection;
|
|
1103
|
+
private traceInstant;
|
|
1104
|
+
private sendJsonMessage;
|
|
1105
|
+
private sendTransportFrame;
|
|
949
1106
|
/**
|
|
950
1107
|
* Send a session message. For fire-and-forget messages (heartbeats, etc.),
|
|
951
1108
|
* failures are suppressed if `suppressSendErrors` is configured.
|
|
952
1109
|
* For RPC methods that wait for responses, use `sendSessionMessageOrThrow` instead.
|
|
953
1110
|
*/
|
|
954
1111
|
private sendSessionMessage;
|
|
955
|
-
private sendBinaryFrame;
|
|
956
1112
|
/**
|
|
957
1113
|
* Send a session message for RPC methods that create waiters.
|
|
958
1114
|
* If the connection is still being established ("connecting"), the message
|
|
@@ -960,6 +1116,7 @@ export declare class DaemonClient {
|
|
|
960
1116
|
* This prevents waiters from hanging forever when called during connection.
|
|
961
1117
|
*/
|
|
962
1118
|
private sendSessionMessageOrThrow;
|
|
1119
|
+
private sendWhenConnected;
|
|
963
1120
|
/**
|
|
964
1121
|
* Flush pending send queue - called when connection is established.
|
|
965
1122
|
*/
|
|
@@ -968,22 +1125,11 @@ export declare class DaemonClient {
|
|
|
968
1125
|
* Reject all pending sends - called when connection fails or is closed.
|
|
969
1126
|
*/
|
|
970
1127
|
private rejectPendingSendQueue;
|
|
971
|
-
|
|
972
|
-
requestId: string;
|
|
973
|
-
message: SessionInboundMessage;
|
|
974
|
-
timeout?: number;
|
|
975
|
-
select: (msg: SessionOutboundMessage) => T | null;
|
|
976
|
-
options?: {
|
|
977
|
-
skipQueue?: boolean;
|
|
978
|
-
};
|
|
979
|
-
}): Promise<T>;
|
|
980
|
-
private reportRequestCompletion;
|
|
981
|
-
private sendCorrelatedRequest;
|
|
982
|
-
private sendCorrelatedSessionRequest;
|
|
983
|
-
private sendNamespacedCorrelatedSessionRequest;
|
|
1128
|
+
private sendRequest;
|
|
984
1129
|
private sendSessionMessageStrict;
|
|
985
1130
|
clearAgentAttention(agentId: string | string[]): Promise<void>;
|
|
986
1131
|
clearWorkspaceAttention(workspaceId: string | string[]): Promise<void>;
|
|
1132
|
+
markWorkspaceUnread(workspaceId: string, requestId?: string): Promise<void>;
|
|
987
1133
|
sendHeartbeat(params: {
|
|
988
1134
|
deviceType: "web" | "mobile";
|
|
989
1135
|
focusedAgentId: string | null;
|
|
@@ -1000,7 +1146,7 @@ export declare class DaemonClient {
|
|
|
1000
1146
|
* private `sendSessionMessage` path (`{ type: "session", message }`) — never
|
|
1001
1147
|
* an HTTP route, never a response-waiting RPC.
|
|
1002
1148
|
*/
|
|
1003
|
-
|
|
1149
|
+
unregisterPushToken(token: string): Promise<void>;
|
|
1004
1150
|
ping(params?: {
|
|
1005
1151
|
requestId?: string;
|
|
1006
1152
|
timeoutMs?: number;
|
|
@@ -1019,281 +1165,179 @@ export declare class DaemonClient {
|
|
|
1019
1165
|
private startLivenessHeartbeat;
|
|
1020
1166
|
private stopLivenessHeartbeat;
|
|
1021
1167
|
private scheduleNextLivenessHeartbeat;
|
|
1168
|
+
private observe;
|
|
1169
|
+
registerBrowserHost(registration: Omit<Extract<SessionInboundMessage, {
|
|
1170
|
+
type: "browser.host.register.request";
|
|
1171
|
+
}>, "type" | "requestId">, options?: {
|
|
1172
|
+
signal?: AbortSignal;
|
|
1173
|
+
}): OwnedSubscription<CorrelatedResponsePayload<"browser.host.register.response">>;
|
|
1174
|
+
observeEvents(events: SessionEventSubscription[], options?: {
|
|
1175
|
+
signal?: AbortSignal;
|
|
1176
|
+
notifications?: boolean;
|
|
1177
|
+
}): OwnedSubscription<CorrelatedResponsePayload<"session.events.set_subscription.response">>;
|
|
1178
|
+
observeAgents(options?: Omit<FetchAgentsOptions, "subscribe">): OwnedSubscription<FetchAgentsPayload>;
|
|
1179
|
+
observeWorkspaces(options?: Omit<FetchWorkspacesOptions, "subscribe">): OwnedSubscription<FetchWorkspacesPayload>;
|
|
1180
|
+
fetchAgents(options: FetchAgentsOptions & {
|
|
1181
|
+
subscribe: {};
|
|
1182
|
+
}): Promise<FetchAgentsPayload & {
|
|
1183
|
+
subscription: OwnedSubscription<FetchAgentsPayload>;
|
|
1184
|
+
}>;
|
|
1022
1185
|
fetchAgents(options?: FetchAgentsOptions): Promise<FetchAgentsPayload>;
|
|
1023
|
-
/**
|
|
1024
|
-
* Resolve up to 200 agents by id without a list load. Requires
|
|
1025
|
-
* server_info.features.agentDirectoryDelta.
|
|
1026
|
-
*/
|
|
1027
|
-
getAgentsByIds(ids: string[], options?: {
|
|
1028
|
-
requestId?: string;
|
|
1029
|
-
timeout?: number;
|
|
1030
|
-
fields?: FetchAgentsOptions["fields"];
|
|
1031
|
-
scope?: "active";
|
|
1032
|
-
}): Promise<GetAgentsByIdsPayload>;
|
|
1033
1186
|
fetchAgentHistory(options?: FetchAgentHistoryOptions): Promise<FetchAgentHistoryPayload>;
|
|
1034
1187
|
fetchRecentProviderSessions(options?: FetchRecentProviderSessionsOptions): Promise<FetchRecentProviderSessionsPayload>;
|
|
1035
|
-
fetchWorkspaces(options
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
type: "start_workspace_script_response";
|
|
1040
|
-
}>["payload"]>;
|
|
1041
|
-
archiveWorkspace(workspaceId: string, requestId?: string): Promise<ArchiveWorkspacePayload>;
|
|
1042
|
-
/**
|
|
1043
|
-
* Set or clear the user's custom project name override. Pass `null` (or an
|
|
1044
|
-
* empty/whitespace string, which the server normalizes to `null`) to clear
|
|
1045
|
-
* the override and fall back to the derived project name.
|
|
1046
|
-
*/
|
|
1047
|
-
renameProject(projectId: string, customName: string | null, requestId?: string): Promise<ProjectRenameResponse["payload"]>;
|
|
1048
|
-
fetchWorkspaceSetupStatus(workspaceId: string, requestId?: string): Promise<WorkspaceSetupStatusPayload>;
|
|
1049
|
-
fetchAgent(options: FetchAgentOptions): Promise<FetchAgentResult | null>;
|
|
1050
|
-
fetchAgent(agentId: string, requestId?: string): Promise<FetchAgentResult | null>;
|
|
1051
|
-
fetchAgent(agentId: string, options?: LegacyFetchAgentOptions): Promise<FetchAgentResult | null>;
|
|
1052
|
-
private resubscribeCheckoutDiffSubscriptions;
|
|
1053
|
-
private resubscribeTerminalDirectorySubscriptions;
|
|
1054
|
-
createAgent(options: CreateAgentRequestOptions): Promise<AgentSnapshotPayload>;
|
|
1055
|
-
/**
|
|
1056
|
-
* Create an agent and its standing routine in ONE request.
|
|
1057
|
-
*
|
|
1058
|
-
* Split from `createAgent` only because the caller needs the scheduleId back:
|
|
1059
|
-
* `createAgent`'s return type has always been the bare snapshot, and widening
|
|
1060
|
-
* it would ripple through every call site for a field almost none of them
|
|
1061
|
-
* want. Both go through the same request, so there is no second code path for
|
|
1062
|
-
* the daemon to disagree with.
|
|
1063
|
-
*/
|
|
1064
|
-
createAgentWithRoutine(options: CreateAgentRequestOptions & {
|
|
1065
|
-
routine: NonNullable<CreateAgentRequestOptions["routine"]>;
|
|
1066
|
-
}): Promise<{
|
|
1067
|
-
agent: AgentSnapshotPayload;
|
|
1068
|
-
routine: {
|
|
1069
|
-
scheduleId: string;
|
|
1070
|
-
nextRunAt: string | null;
|
|
1071
|
-
};
|
|
1072
|
-
}>;
|
|
1073
|
-
private createAgentRequest;
|
|
1074
|
-
deleteAgent(agentId: string): Promise<void>;
|
|
1075
|
-
archiveAgent(agentId: string): Promise<{
|
|
1076
|
-
archivedAt: string;
|
|
1077
|
-
}>;
|
|
1078
|
-
/**
|
|
1079
|
-
* Dismiss a live background shell. For Claude Code agents this drives the
|
|
1080
|
-
* CLI's own `ctrl+x ctrl+k` kill chord over the PTY (kills it inside Claude
|
|
1081
|
-
* Code). Resolves to whether the dismiss was delivered.
|
|
1082
|
-
*/
|
|
1083
|
-
/**
|
|
1084
|
-
* List background shells -- one agent's, or every agent's when `agentId` is
|
|
1085
|
-
* omitted. These are commands the provider launched with `run_in_background`
|
|
1086
|
-
* so they outlive the turn; the rows carry the command, status and start time
|
|
1087
|
-
* so the client can show what is running and for how long.
|
|
1088
|
-
*/
|
|
1089
|
-
listBackgroundTasks(agentId?: string): Promise<BackgroundTaskPayload[]>;
|
|
1090
|
-
/**
|
|
1091
|
-
* Record session context (links + non-live credentials) onto an agent's
|
|
1092
|
-
* digest. Used by the context hook, which runs beside an agent rather than
|
|
1093
|
-
* inside it and so cannot reach the agent-scoped `set_session_digest` MCP
|
|
1094
|
-
* tool.
|
|
1095
|
-
*
|
|
1096
|
-
* Returns how many secrets the daemon had to mask, so a caller can report
|
|
1097
|
-
* that it handed over something it should not have.
|
|
1098
|
-
*/
|
|
1099
|
-
setAgentContext(input: {
|
|
1100
|
-
agentId: string;
|
|
1101
|
-
links?: {
|
|
1102
|
-
kind: SessionDigestLink["kind"];
|
|
1103
|
-
url: string;
|
|
1104
|
-
label?: string;
|
|
1105
|
-
}[];
|
|
1106
|
-
secrets?: {
|
|
1107
|
-
label: string;
|
|
1108
|
-
value: string;
|
|
1109
|
-
source?: string;
|
|
1110
|
-
}[];
|
|
1111
|
-
}): Promise<{
|
|
1112
|
-
digest: SessionDigest | null;
|
|
1113
|
-
maskedCount: number;
|
|
1114
|
-
error?: string;
|
|
1115
|
-
}>;
|
|
1116
|
-
/**
|
|
1117
|
-
* Ask the daemon what it can see about external reference URLs -- a GitLab
|
|
1118
|
-
* pipeline's status, a merge request's state, a Jira issue's column.
|
|
1119
|
-
*
|
|
1120
|
-
* The provider credentials live on the daemon, so the app never holds one.
|
|
1121
|
-
* An entry the daemon could not look up still comes back, carrying
|
|
1122
|
-
* `unavailableReason`, so a card can say what it could not see instead of
|
|
1123
|
-
* spinning. See docs/session-context-rail.md.
|
|
1124
|
-
*/
|
|
1125
|
-
enrichReferences(urls: string[]): Promise<ReferenceEnrichment[]>;
|
|
1126
|
-
/**
|
|
1127
|
-
* Read a background shell's captured output. Resolves with `text: null` when
|
|
1128
|
-
* the daemon does not know the shell or it captured nothing. The daemon tails
|
|
1129
|
-
* and redacts before sending.
|
|
1130
|
-
*/
|
|
1131
|
-
readBackgroundTaskOutput(agentId: string, taskId: string, options?: {
|
|
1132
|
-
maxBytes?: number;
|
|
1133
|
-
}): Promise<{
|
|
1134
|
-
text: string | null;
|
|
1135
|
-
truncated: boolean;
|
|
1136
|
-
byteSize: number;
|
|
1137
|
-
}>;
|
|
1138
|
-
dismissBackgroundTask(agentId: string, taskId: string): Promise<{
|
|
1139
|
-
dismissed: boolean;
|
|
1140
|
-
}>;
|
|
1141
|
-
detachAgent(agentId: string): Promise<void>;
|
|
1142
|
-
/**
|
|
1143
|
-
* `labels` is a PATCH: a string sets the key, `null` DELETES it, and an absent
|
|
1144
|
-
* key is left untouched. Never pass a rebuilt whole bag - the daemon owns keys
|
|
1145
|
-
* the client does not know about (schedules, loops, workflows, kanban).
|
|
1146
|
-
*
|
|
1147
|
-
* This method is the compat boundary. Callers get one coherent patch; the wire
|
|
1148
|
-
* carries the deletions in a separate additive `labelsRemove` array, so an
|
|
1149
|
-
* older daemon strips them instead of rejecting the whole request. Keeping the
|
|
1150
|
-
* split here means no UI code has to know the encoding.
|
|
1151
|
-
*/
|
|
1152
|
-
updateAgent(agentId: string, updates: {
|
|
1153
|
-
name?: string;
|
|
1154
|
-
labels?: Record<string, string | null>;
|
|
1155
|
-
}): Promise<void>;
|
|
1156
|
-
rewindSession(agentId: string, turnId: string): Promise<{
|
|
1157
|
-
newSessionId: string;
|
|
1158
|
-
}>;
|
|
1159
|
-
editMessage(agentId: string, turnId: string, newContent: string): Promise<{
|
|
1160
|
-
newSessionId: string;
|
|
1161
|
-
adopted: boolean;
|
|
1188
|
+
fetchWorkspaces(options: FetchWorkspacesOptions & {
|
|
1189
|
+
subscribe: {};
|
|
1190
|
+
}): Promise<FetchWorkspacesPayload & {
|
|
1191
|
+
subscription: OwnedSubscription<FetchWorkspacesPayload>;
|
|
1162
1192
|
}>;
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
lastActivity: string;
|
|
1169
|
-
cwd: string;
|
|
1170
|
-
agentName: string | null;
|
|
1171
|
-
}>>;
|
|
1172
|
-
subscribePush(subscription: {
|
|
1173
|
-
type: "expo";
|
|
1174
|
-
token: string;
|
|
1175
|
-
} | {
|
|
1176
|
-
type: "web";
|
|
1177
|
-
subscription: {
|
|
1178
|
-
endpoint: string;
|
|
1179
|
-
keys: {
|
|
1180
|
-
p256dh: string;
|
|
1181
|
-
auth: string;
|
|
1182
|
-
};
|
|
1183
|
-
expirationTime?: number | null;
|
|
1193
|
+
fetchWorkspaces(options?: FetchWorkspacesOptions): Promise<FetchWorkspacesPayload>;
|
|
1194
|
+
listWorkspaceLabels(options?: {
|
|
1195
|
+
sync?: {
|
|
1196
|
+
generation: string;
|
|
1197
|
+
afterSeq: number;
|
|
1184
1198
|
};
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
}>;
|
|
1189
|
-
getVapidPublicKey(): Promise<string | null>;
|
|
1190
|
-
listAllSessions(options?: {
|
|
1199
|
+
requestId?: string;
|
|
1200
|
+
}): Promise<WorkspaceLabelListPayload>;
|
|
1201
|
+
observeWorkspaceLabels(options?: {
|
|
1191
1202
|
signal?: AbortSignal;
|
|
1192
|
-
}):
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1203
|
+
}): OwnedSubscription<WorkspaceLabelListPayload>;
|
|
1204
|
+
setWorkspaceLabel(options: {
|
|
1205
|
+
workspaceId: string;
|
|
1206
|
+
label: Extract<SessionInboundMessage, {
|
|
1207
|
+
type: "workspace.label.assignment.set.request";
|
|
1208
|
+
}>["label"];
|
|
1209
|
+
assigned: boolean;
|
|
1210
|
+
requestId?: string;
|
|
1211
|
+
}): Promise<WorkspaceLabelAssignmentPayload>;
|
|
1212
|
+
updateWorkspaceLabel(options: {
|
|
1213
|
+
name: string;
|
|
1214
|
+
newName?: string;
|
|
1215
|
+
color?: Extract<SessionInboundMessage, {
|
|
1216
|
+
type: "workspace.label.update.request";
|
|
1217
|
+
}>["color"];
|
|
1218
|
+
requestId?: string;
|
|
1219
|
+
}): Promise<WorkspaceLabelUpdatePayload>;
|
|
1220
|
+
deleteWorkspaceLabel(options: {
|
|
1221
|
+
name: string;
|
|
1222
|
+
requestId?: string;
|
|
1223
|
+
}): Promise<WorkspaceLabelDeletePayload>;
|
|
1224
|
+
inspectWorkspaceLabelDelete(options: {
|
|
1225
|
+
name: string;
|
|
1226
|
+
requestId?: string;
|
|
1227
|
+
}): Promise<WorkspaceLabelDeleteInspectPayload>;
|
|
1228
|
+
listProjects(options?: string | ProjectListOptions): Promise<ProjectListPayload>;
|
|
1229
|
+
openProject(cwd: string, requestId?: string): Promise<OpenProjectPayload>;
|
|
1230
|
+
addProject(cwd: string, requestId?: string): Promise<ProjectAddPayload>;
|
|
1231
|
+
createProjectDirectory(input: {
|
|
1232
|
+
parentPath: string;
|
|
1233
|
+
name: string;
|
|
1234
|
+
}, requestId?: string): Promise<ProjectCreateDirectoryPayload>;
|
|
1235
|
+
searchGithubRepositories(input: {
|
|
1218
1236
|
query: string;
|
|
1219
1237
|
limit?: number;
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1238
|
+
}, requestId?: string): Promise<WorkspaceGithubSearchRepositoriesPayload>;
|
|
1239
|
+
cloneGithubProject(input: {
|
|
1240
|
+
repo: string;
|
|
1241
|
+
targetDirectory: string;
|
|
1242
|
+
cloneProtocol?: ProjectGithubCloneProtocol;
|
|
1243
|
+
}, requestId?: string): Promise<ProjectGithubClonePayload>;
|
|
1244
|
+
startWorkspaceScript(workspaceId: string, scriptName: string, requestId?: string): Promise<Extract<SessionOutboundMessage, {
|
|
1245
|
+
type: "start_workspace_script_response";
|
|
1246
|
+
}>["payload"]>;
|
|
1247
|
+
listWorkspaceScripts(workspaceId: string, requestId?: string): Promise<Extract<SessionOutboundMessage, {
|
|
1248
|
+
type: "workspace.script.list.response";
|
|
1249
|
+
}>["payload"]>;
|
|
1250
|
+
startWorkspaceScriptWithStatus(workspaceId: string, scriptName: string, requestId?: string): Promise<Extract<SessionOutboundMessage, {
|
|
1251
|
+
type: "workspace.script.start.response";
|
|
1252
|
+
}>["payload"]>;
|
|
1253
|
+
stopWorkspaceScript(workspaceId: string, scriptName: string, requestId?: string): Promise<Extract<SessionOutboundMessage, {
|
|
1254
|
+
type: "workspace.script.stop.response";
|
|
1255
|
+
}>["payload"]>;
|
|
1256
|
+
archiveWorkspace(workspaceId: string, requestId?: string): Promise<ArchiveWorkspacePayload>;
|
|
1230
1257
|
/**
|
|
1231
|
-
*
|
|
1232
|
-
*
|
|
1233
|
-
*
|
|
1234
|
-
* daemon are not addressable — throws so callers fall back gracefully.
|
|
1258
|
+
* Set or clear the user's custom project name override. Pass `null` (or an
|
|
1259
|
+
* empty/whitespace string, which the server normalizes to `null`) to clear
|
|
1260
|
+
* the override and fall back to the derived project name.
|
|
1235
1261
|
*/
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1262
|
+
fetchWorkspaceSetupStatus(workspaceId: string, requestId?: string): Promise<WorkspaceSetupStatusPayload>;
|
|
1263
|
+
runWorkspaceSetup(workspaceId: string, requestId?: string): Promise<Extract<SessionOutboundMessage, {
|
|
1264
|
+
type: "workspace.setup.run.response";
|
|
1265
|
+
}>["payload"]>;
|
|
1266
|
+
fetchAgent(options: FetchAgentOptions): Promise<FetchAgentResult | null>;
|
|
1267
|
+
fetchAgent(agentId: string, requestId?: string): Promise<FetchAgentResult | null>;
|
|
1268
|
+
fetchAgent(agentId: string, options?: LegacyFetchAgentOptions): Promise<FetchAgentResult | null>;
|
|
1269
|
+
private readonly creations;
|
|
1270
|
+
createAgent(options: CreateAgentRequestOptions): Promise<AgentSnapshotPayload>;
|
|
1271
|
+
private createLegacyAgent;
|
|
1272
|
+
deleteAgent(agentId: string): Promise<void>;
|
|
1273
|
+
archiveAgent(agentId: string): Promise<{
|
|
1274
|
+
archivedAt: string;
|
|
1244
1275
|
}>;
|
|
1245
1276
|
/**
|
|
1246
|
-
*
|
|
1247
|
-
*
|
|
1248
|
-
*
|
|
1249
|
-
* Pass the `revision` of the decision you showed the user. The daemon refuses
|
|
1250
|
-
* the answer if the agent reworded the decision since, instead of recording a
|
|
1251
|
-
* choice against text the user never read. Appended after `requestId` so
|
|
1252
|
-
* existing positional callers keep working.
|
|
1277
|
+
* Dismiss a live background shell. For Claude Code agents this drives the
|
|
1278
|
+
* CLI's own `ctrl+x ctrl+k` kill chord over the PTY (kills it inside Claude
|
|
1279
|
+
* Code). Resolves to whether the dismiss was delivered.
|
|
1253
1280
|
*/
|
|
1254
|
-
answerAgentDecision(agentId: string, decisionId: string, optionId: string | null, note: string | null, requestId?: string, revision?: string | null): Promise<{
|
|
1255
|
-
decision: PendingDecision | null;
|
|
1256
|
-
}>;
|
|
1257
1281
|
/**
|
|
1258
|
-
*
|
|
1259
|
-
*
|
|
1260
|
-
*
|
|
1261
|
-
*
|
|
1262
|
-
* `olderThanMs`. `dryRun` reports without writing.
|
|
1282
|
+
* List background shells -- one agent's, or every agent's when `agentId` is
|
|
1283
|
+
* omitted. These are commands the provider launched with `run_in_background`
|
|
1284
|
+
* so they outlive the turn; the rows carry the command, status and start time
|
|
1285
|
+
* so the client can show what is running and for how long.
|
|
1263
1286
|
*/
|
|
1264
|
-
|
|
1265
|
-
olderThanMs?: number | null;
|
|
1266
|
-
agentId?: string | null;
|
|
1267
|
-
decisionId?: string | null;
|
|
1268
|
-
dryRun?: boolean;
|
|
1269
|
-
note?: string | null;
|
|
1270
|
-
}, requestId?: string): Promise<AgentDecisionsExpireResult>;
|
|
1287
|
+
detachAgent(agentId: string): Promise<void>;
|
|
1271
1288
|
/**
|
|
1272
|
-
*
|
|
1273
|
-
*
|
|
1289
|
+
* `labels` is a PATCH: a string sets the key, `null` DELETES it, and an absent
|
|
1290
|
+
* key is left untouched. Never pass a rebuilt whole bag - the daemon owns keys
|
|
1291
|
+
* the client does not know about (schedules, loops, workflows, kanban).
|
|
1274
1292
|
*
|
|
1275
|
-
*
|
|
1276
|
-
*
|
|
1293
|
+
* This method is the compat boundary. Callers get one coherent patch; the wire
|
|
1294
|
+
* carries the deletions in a separate additive `labelsRemove` array, so an
|
|
1295
|
+
* older daemon strips them instead of rejecting the whole request. Keeping the
|
|
1296
|
+
* split here means no UI code has to know the encoding.
|
|
1277
1297
|
*/
|
|
1278
|
-
|
|
1279
|
-
|
|
1298
|
+
updateAgent(agentId: string, updates: {
|
|
1299
|
+
name?: string;
|
|
1300
|
+
labels?: Record<string, string | null>;
|
|
1301
|
+
}): Promise<void>;
|
|
1302
|
+
renameProject(projectId: string, customName: string | null, requestId?: string): Promise<ProjectRenameResponse["payload"]>;
|
|
1303
|
+
setProjectIcon(projectId: string, source: ProjectIconSource, requestId?: string): Promise<void>;
|
|
1304
|
+
removeProject(projectId: string, requestId?: string): Promise<{
|
|
1305
|
+
removedWorkspaceIds: string[];
|
|
1306
|
+
}>;
|
|
1307
|
+
setWorkspaceTitle(workspaceId: string, title: string | null, requestId?: string): Promise<{
|
|
1308
|
+
title: string | null;
|
|
1280
1309
|
}>;
|
|
1281
1310
|
/**
|
|
1282
|
-
*
|
|
1283
|
-
*
|
|
1284
|
-
*
|
|
1285
|
-
* The three fields are the whole point: a time alone is "later". `untilWhat`
|
|
1286
|
-
* names the event, `why` names what is missing. The daemon accepts a
|
|
1287
|
-
* time-only snooze, because a CLI caller making that call is still deciding;
|
|
1288
|
-
* requiring the other two is a client policy that escalates with the count.
|
|
1311
|
+
* Answer a decision the agent parked on its digest. `optionId: null` with a
|
|
1312
|
+
* note is a free-text answer — an option the agent did not list.
|
|
1289
1313
|
*/
|
|
1290
|
-
|
|
1291
|
-
|
|
1314
|
+
setWorkspacePinned(workspaceId: string, pinned: boolean, requestId?: string): Promise<{
|
|
1315
|
+
pinnedAt: string | null;
|
|
1292
1316
|
}>;
|
|
1317
|
+
inspectWorkspaceRecovery(workspaceId: string, requestId?: string): Promise<WorkspaceRecoveryState>;
|
|
1318
|
+
restoreWorkspace(workspaceId: string, requestId?: string): Promise<void>;
|
|
1293
1319
|
resumeAgent(handle: AgentPersistenceHandle, overrides?: Partial<AgentSessionConfig>): Promise<AgentSnapshotPayload>;
|
|
1294
1320
|
importAgent(input: ImportAgentInput): Promise<AgentSnapshotPayload>;
|
|
1295
1321
|
refreshAgent(agentId: string, requestId?: string): Promise<AgentRefreshedStatusPayload>;
|
|
1296
1322
|
fetchAgentTimeline(agentId: string, options?: FetchAgentTimelineOptions): Promise<FetchAgentTimelinePayload>;
|
|
1323
|
+
appendAgentTimelineItem(agentId: string, item: Omit<import("@hyperdrive.bot/fleet-protocol/agent-types").PluginTimelineItem, "pluginId">): Promise<{
|
|
1324
|
+
seq: number;
|
|
1325
|
+
epoch: string;
|
|
1326
|
+
}>;
|
|
1327
|
+
searchAgentTimeline({ agentId, query, cursor, }: AgentTimelineSearchOptions): Promise<AgentTimelineSearchPayload>;
|
|
1328
|
+
listAgentTimelinePrompts(agentId: string, options?: {
|
|
1329
|
+
requestId?: string;
|
|
1330
|
+
timeout?: number;
|
|
1331
|
+
}): Promise<AgentTimelinePromptIndexPayload>;
|
|
1332
|
+
listProviderSubagents(parentAgentId: string, options?: {
|
|
1333
|
+
requestId?: string;
|
|
1334
|
+
timeout?: number;
|
|
1335
|
+
}): Promise<ProviderSubagentListPayload>;
|
|
1336
|
+
fetchProviderSubagentTimeline(parentAgentId: string, subagentId: string, options?: FetchProviderSubagentTimelineOptions): Promise<ProviderSubagentTimelinePayload>;
|
|
1337
|
+
observeTimeline(agentIds: string[], options?: {
|
|
1338
|
+
signal?: AbortSignal;
|
|
1339
|
+
}): OwnedSubscription<CorrelatedResponsePayload<"agent.timeline.set_subscription.response">>;
|
|
1340
|
+
subscribeAgentTimeline(agentId: string, handler: (message: TimelineMessage) => void): TimelineSubscription;
|
|
1297
1341
|
buildAgentForkContext(agentId: string, options?: AgentForkContextOptions): Promise<AgentForkContextPayload>;
|
|
1298
1342
|
sendAgentMessage(agentId: string, text: string, options?: SendMessageOptions): Promise<void>;
|
|
1299
1343
|
sendMessage(agentId: string, text: string, options?: SendMessageOptions): Promise<void>;
|
|
@@ -1306,13 +1350,19 @@ export declare class DaemonClient {
|
|
|
1306
1350
|
* Claude (Pool)). Throws if the swap is rejected by the daemon (incompatible
|
|
1307
1351
|
* wireFamily, target not in compatibleProviders list, target unavailable).
|
|
1308
1352
|
*/
|
|
1309
|
-
swapAgentProvider(agentId: string, newProviderId: string, overrides?: {
|
|
1310
|
-
model?: string | null;
|
|
1311
|
-
modeId?: string;
|
|
1312
|
-
}): Promise<void>;
|
|
1313
1353
|
setAgentFeature(agentId: string, featureId: string, value: unknown): Promise<void>;
|
|
1314
1354
|
setAgentThinkingOption(agentId: string, thinkingOptionId: string | null): Promise<AgentProviderNotice | null>;
|
|
1315
|
-
|
|
1355
|
+
/**
|
|
1356
|
+
* Applies a whole agent-config bundle in one request. Use this instead of
|
|
1357
|
+
* chaining the single-field setters when the values belong together so client
|
|
1358
|
+
* interruption and other mutations cannot interleave between steps. A
|
|
1359
|
+
* provider rejection can still leave earlier steps applied.
|
|
1360
|
+
* Gated on `server_info.features.agentConfigApply`.
|
|
1361
|
+
*/
|
|
1362
|
+
applyAgentConfig(agentId: string, config: AgentConfigApply): Promise<AgentProviderNotice | null>;
|
|
1363
|
+
restartServer(reason?: string, requestId?: string, options?: {
|
|
1364
|
+
timeout?: number;
|
|
1365
|
+
}): Promise<RestartRequestedStatusPayload>;
|
|
1316
1366
|
shutdownServer(options?: ShutdownServerOptions): Promise<ShutdownRequestedStatusPayload>;
|
|
1317
1367
|
updateDaemon(requestId?: string): Promise<DaemonUpdateResponse["payload"]>;
|
|
1318
1368
|
setVoiceMode(enabled: boolean, agentId?: string, language?: string): Promise<SetVoiceModePayload>;
|
|
@@ -1335,15 +1385,14 @@ export declare class DaemonClient {
|
|
|
1335
1385
|
baseRef?: string;
|
|
1336
1386
|
ignoreWhitespace?: boolean;
|
|
1337
1387
|
}, requestId?: string): Promise<CheckoutDiffPayload>;
|
|
1338
|
-
|
|
1388
|
+
observeCheckoutDiff(cwd: string, compare: {
|
|
1339
1389
|
mode: "uncommitted" | "base";
|
|
1340
1390
|
baseRef?: string;
|
|
1341
1391
|
ignoreWhitespace?: boolean;
|
|
1342
1392
|
}, options?: {
|
|
1343
|
-
subscriptionId?: string;
|
|
1344
1393
|
requestId?: string;
|
|
1345
|
-
|
|
1346
|
-
|
|
1394
|
+
signal?: AbortSignal;
|
|
1395
|
+
}): OwnedSubscription<SubscribeCheckoutDiffPayload>;
|
|
1347
1396
|
checkoutCommit(cwd: string, input: {
|
|
1348
1397
|
message?: string;
|
|
1349
1398
|
addAll?: boolean;
|
|
@@ -1360,6 +1409,13 @@ export declare class DaemonClient {
|
|
|
1360
1409
|
checkoutPull(cwd: string, requestId?: string): Promise<CheckoutPullPayload>;
|
|
1361
1410
|
checkoutPush(cwd: string, requestId?: string): Promise<CheckoutPushPayload>;
|
|
1362
1411
|
checkoutRefresh(cwd: string, requestId?: string): Promise<CheckoutRefreshPayload>;
|
|
1412
|
+
listCheckoutCommits(cwd: string, requestId?: string): Promise<{
|
|
1413
|
+
baseRef: string | null;
|
|
1414
|
+
commits: CheckoutCommit[];
|
|
1415
|
+
}>;
|
|
1416
|
+
getCommitFileDiff(cwd: string, sha: string, path: string, requestId?: string): Promise<{
|
|
1417
|
+
file: ParsedDiffFile | null;
|
|
1418
|
+
}>;
|
|
1363
1419
|
checkoutPrCreate(cwd: string, input: {
|
|
1364
1420
|
title?: string;
|
|
1365
1421
|
body?: string;
|
|
@@ -1368,17 +1424,31 @@ export declare class DaemonClient {
|
|
|
1368
1424
|
checkoutPrMerge(cwd: string, input: {
|
|
1369
1425
|
method: CheckoutPrMergeMethod;
|
|
1370
1426
|
}, requestId?: string): Promise<CheckoutPrMergePayload>;
|
|
1427
|
+
checkoutForgeSetAutoMerge(cwd: string, input: {
|
|
1428
|
+
enabled: true;
|
|
1429
|
+
method: CheckoutPrMergeMethod;
|
|
1430
|
+
} | {
|
|
1431
|
+
enabled: false;
|
|
1432
|
+
}, requestId?: string): Promise<CheckoutForgeSetAutoMergePayload>;
|
|
1371
1433
|
checkoutGithubSetAutoMerge(cwd: string, input: {
|
|
1372
1434
|
enabled: true;
|
|
1373
1435
|
method: CheckoutPrMergeMethod;
|
|
1374
1436
|
} | {
|
|
1375
1437
|
enabled: false;
|
|
1376
1438
|
}, requestId?: string): Promise<CheckoutGithubSetAutoMergePayload>;
|
|
1439
|
+
checkoutForgeGetCheckDetails(input: {
|
|
1440
|
+
cwd: string;
|
|
1441
|
+
repoOwner?: string;
|
|
1442
|
+
repoName?: string;
|
|
1443
|
+
checkRunId?: number;
|
|
1444
|
+
workflowRunId?: number;
|
|
1445
|
+
changeRequestNumber?: number;
|
|
1446
|
+
}, requestId?: string): Promise<CheckoutForgeGetCheckDetailsPayload>;
|
|
1377
1447
|
checkoutGithubGetCheckDetails(input: {
|
|
1378
1448
|
cwd: string;
|
|
1379
|
-
repoOwner
|
|
1380
|
-
repoName
|
|
1381
|
-
checkRunId
|
|
1449
|
+
repoOwner?: string;
|
|
1450
|
+
repoName?: string;
|
|
1451
|
+
checkRunId?: number;
|
|
1382
1452
|
workflowRunId?: number;
|
|
1383
1453
|
}, requestId?: string): Promise<CheckoutGithubGetCheckDetailsPayload>;
|
|
1384
1454
|
checkoutPrStatus(cwd: string, requestId?: string): Promise<CheckoutPrStatusPayload>;
|
|
@@ -1409,11 +1479,8 @@ export declare class DaemonClient {
|
|
|
1409
1479
|
scope?: "workspace" | "worktree";
|
|
1410
1480
|
}, requestId?: string): Promise<PaseoWorktreeArchivePayload>;
|
|
1411
1481
|
createPaseoWorktree(input: CreatePaseoWorktreeInput, requestId?: string): Promise<CreatePaseoWorktreePayload>;
|
|
1412
|
-
createWorkspace(input:
|
|
1413
|
-
|
|
1414
|
-
title?: string;
|
|
1415
|
-
firstAgentContext?: WorkspaceCreateRequest["firstAgentContext"];
|
|
1416
|
-
}, requestId?: string): Promise<WorkspaceCreatePayload>;
|
|
1482
|
+
createWorkspace(input: CreateWorkspaceRequestOptions, requestId?: string): Promise<WorkspaceCreatePayload>;
|
|
1483
|
+
private createLegacyWorkspace;
|
|
1417
1484
|
validateBranch(options: {
|
|
1418
1485
|
cwd: string;
|
|
1419
1486
|
branchName: string;
|
|
@@ -1423,6 +1490,12 @@ export declare class DaemonClient {
|
|
|
1423
1490
|
query?: string;
|
|
1424
1491
|
limit?: number;
|
|
1425
1492
|
}, requestId?: string): Promise<BranchSuggestionsPayload>;
|
|
1493
|
+
searchForge(options: {
|
|
1494
|
+
cwd: string;
|
|
1495
|
+
query: string;
|
|
1496
|
+
limit?: number;
|
|
1497
|
+
kinds?: ForgeSearchRequest["kinds"];
|
|
1498
|
+
}, requestId?: string): Promise<ForgeSearchPayload>;
|
|
1426
1499
|
searchGitHub(options: {
|
|
1427
1500
|
cwd: string;
|
|
1428
1501
|
query: string;
|
|
@@ -1439,9 +1512,68 @@ export declare class DaemonClient {
|
|
|
1439
1512
|
}, requestId?: string): Promise<DirectorySuggestionsPayload>;
|
|
1440
1513
|
private requestFileExplorer;
|
|
1441
1514
|
listDirectory(cwd: string, path: string, requestId?: string): Promise<FileExplorerDirectoryPayload>;
|
|
1442
|
-
readFile(cwd: string, path: string, requestId?: string): Promise<FileReadResult>;
|
|
1515
|
+
readFile(cwd: string, path: string, requestId?: string, maxBytes?: number): Promise<FileReadResult>;
|
|
1516
|
+
observeFile(input: {
|
|
1517
|
+
cwd: string;
|
|
1518
|
+
path: string;
|
|
1519
|
+
signal?: AbortSignal;
|
|
1520
|
+
}): OwnedSubscription<CorrelatedResponsePayload<"fs.file.subscribe.response">>;
|
|
1521
|
+
subscribeFile(input: {
|
|
1522
|
+
cwd: string;
|
|
1523
|
+
path: string;
|
|
1524
|
+
signal?: AbortSignal;
|
|
1525
|
+
}, onUpdate: (version: FileVersion) => void): Promise<{
|
|
1526
|
+
initial: FileVersion;
|
|
1527
|
+
subscription: OwnedSubscription<CorrelatedResponsePayload<"fs.file.subscribe.response">>;
|
|
1528
|
+
unsubscribe: () => Promise<void>;
|
|
1529
|
+
}>;
|
|
1530
|
+
writeFile(input: {
|
|
1531
|
+
cwd: string;
|
|
1532
|
+
path: string;
|
|
1533
|
+
content: string;
|
|
1534
|
+
expectedModifiedAt: string;
|
|
1535
|
+
expectedRevision?: string;
|
|
1536
|
+
}): Promise<FileWriteResult>;
|
|
1537
|
+
createFileEntry(input: {
|
|
1538
|
+
cwd: string;
|
|
1539
|
+
parentPath: string;
|
|
1540
|
+
name: string;
|
|
1541
|
+
kind: "file" | "directory";
|
|
1542
|
+
}): Promise<CorrelatedResponsePayload<"fs.entry.create.response">>;
|
|
1543
|
+
renameFileEntry(input: {
|
|
1544
|
+
cwd: string;
|
|
1545
|
+
path: string;
|
|
1546
|
+
name: string;
|
|
1547
|
+
}): Promise<CorrelatedResponsePayload<"fs.entry.rename.response">>;
|
|
1548
|
+
duplicateFileEntry(input: {
|
|
1549
|
+
cwd: string;
|
|
1550
|
+
path: string;
|
|
1551
|
+
}): Promise<CorrelatedResponsePayload<"fs.entry.duplicate.response">>;
|
|
1552
|
+
deleteFileEntry(input: {
|
|
1553
|
+
cwd: string;
|
|
1554
|
+
path: string;
|
|
1555
|
+
}): Promise<CorrelatedResponsePayload<"fs.entry.delete.response">>;
|
|
1556
|
+
checkoutDiscardChanges(cwd: string, input: {
|
|
1557
|
+
paths: string[];
|
|
1558
|
+
}): Promise<CorrelatedResponsePayload<"checkout.discard_changes.response">>;
|
|
1559
|
+
uploadFile(file: {
|
|
1560
|
+
bytes: Uint8Array;
|
|
1561
|
+
path: string;
|
|
1562
|
+
mime: string;
|
|
1563
|
+
modifiedAt: string;
|
|
1564
|
+
}, opts: {
|
|
1565
|
+
agentId: string;
|
|
1566
|
+
onProgress?: (bytesSent: number, totalBytes: number) => void;
|
|
1567
|
+
signal?: AbortSignal;
|
|
1568
|
+
}): Promise<{
|
|
1569
|
+
fileId: string;
|
|
1570
|
+
path: string;
|
|
1571
|
+
size: number;
|
|
1572
|
+
mimeType: string;
|
|
1573
|
+
}>;
|
|
1443
1574
|
requestDownloadToken(cwd: string, path: string, requestId?: string): Promise<FileDownloadTokenPayload>;
|
|
1444
1575
|
requestProjectIcon(cwd: string, requestId?: string): Promise<ProjectIconResponse["payload"]>;
|
|
1576
|
+
getProjectIcon(projectId: string, requestId?: string): Promise<ProjectIconGetResponse["payload"]>;
|
|
1445
1577
|
listProviderModels(provider: AgentProvider, options?: {
|
|
1446
1578
|
cwd?: string;
|
|
1447
1579
|
requestId?: string;
|
|
@@ -1458,20 +1590,64 @@ export declare class DaemonClient {
|
|
|
1458
1590
|
}): Promise<ListAvailableProvidersPayload>;
|
|
1459
1591
|
getProvidersSnapshot(options?: {
|
|
1460
1592
|
cwd?: string;
|
|
1593
|
+
ifNoneMatch?: string;
|
|
1461
1594
|
requestId?: string;
|
|
1462
1595
|
}): Promise<GetProvidersSnapshotPayload>;
|
|
1463
|
-
|
|
1464
|
-
* Re-read `agents.providers` from the daemon's config.json into its live
|
|
1465
|
-
* provider registry. No restart. Returns the add/update/remove diff.
|
|
1466
|
-
*/
|
|
1467
|
-
reloadProviderConfig(options?: {
|
|
1468
|
-
requestId?: string;
|
|
1469
|
-
}): Promise<ProvidersReloadConfigPayload>;
|
|
1596
|
+
private requestProvidersSnapshot;
|
|
1470
1597
|
getDaemonConfig(requestId?: string): Promise<{
|
|
1471
1598
|
requestId: string;
|
|
1472
1599
|
config: MutableDaemonConfig;
|
|
1473
1600
|
}>;
|
|
1474
1601
|
getDaemonStatus(options?: DaemonStatusOptions): Promise<DaemonStatusPayload>;
|
|
1602
|
+
reloadDaemonConfig(requestId?: string): Promise<DaemonConfigReloadResponse["payload"]>;
|
|
1603
|
+
connectHub(hubUrl: string, token: string, permissions?: readonly string[], requestId?: string): Promise<{
|
|
1604
|
+
requestId: string;
|
|
1605
|
+
status: {
|
|
1606
|
+
state: "connecting" | "revoked" | "not_connected" | "connected" | "reconnecting" | "disconnecting";
|
|
1607
|
+
daemonId: string | null;
|
|
1608
|
+
hubOrigin: string | null;
|
|
1609
|
+
permissions: ("daemon.read" | "daemon.manage" | "tunnel.manage" | "access.manage" | "workspace.read" | "workspace.write" | "workspace.manage" | "automation.manage" | "hub.execute")[];
|
|
1610
|
+
connectedAt: string | null;
|
|
1611
|
+
lastError: string | null;
|
|
1612
|
+
};
|
|
1613
|
+
}>;
|
|
1614
|
+
updateHubPermissions(input: {
|
|
1615
|
+
grant?: readonly string[];
|
|
1616
|
+
revoke?: readonly string[];
|
|
1617
|
+
}, requestId?: string): Promise<{
|
|
1618
|
+
requestId: string;
|
|
1619
|
+
status: {
|
|
1620
|
+
state: "connecting" | "revoked" | "not_connected" | "connected" | "reconnecting" | "disconnecting";
|
|
1621
|
+
daemonId: string | null;
|
|
1622
|
+
hubOrigin: string | null;
|
|
1623
|
+
permissions: ("daemon.read" | "daemon.manage" | "tunnel.manage" | "access.manage" | "workspace.read" | "workspace.write" | "workspace.manage" | "automation.manage" | "hub.execute")[];
|
|
1624
|
+
connectedAt: string | null;
|
|
1625
|
+
lastError: string | null;
|
|
1626
|
+
};
|
|
1627
|
+
}>;
|
|
1628
|
+
getHubStatus(requestId?: string): Promise<{
|
|
1629
|
+
requestId: string;
|
|
1630
|
+
status: {
|
|
1631
|
+
state: "connecting" | "revoked" | "not_connected" | "connected" | "reconnecting" | "disconnecting";
|
|
1632
|
+
daemonId: string | null;
|
|
1633
|
+
hubOrigin: string | null;
|
|
1634
|
+
permissions: ("daemon.read" | "daemon.manage" | "tunnel.manage" | "access.manage" | "workspace.read" | "workspace.write" | "workspace.manage" | "automation.manage" | "hub.execute")[];
|
|
1635
|
+
connectedAt: string | null;
|
|
1636
|
+
lastError: string | null;
|
|
1637
|
+
};
|
|
1638
|
+
}>;
|
|
1639
|
+
disconnectHub(force?: boolean, requestId?: string): Promise<{
|
|
1640
|
+
requestId: string;
|
|
1641
|
+
status: {
|
|
1642
|
+
state: "connecting" | "revoked" | "not_connected" | "connected" | "reconnecting" | "disconnecting";
|
|
1643
|
+
daemonId: string | null;
|
|
1644
|
+
hubOrigin: string | null;
|
|
1645
|
+
permissions: ("daemon.read" | "daemon.manage" | "tunnel.manage" | "access.manage" | "workspace.read" | "workspace.write" | "workspace.manage" | "automation.manage" | "hub.execute")[];
|
|
1646
|
+
connectedAt: string | null;
|
|
1647
|
+
lastError: string | null;
|
|
1648
|
+
};
|
|
1649
|
+
warning?: string | undefined;
|
|
1650
|
+
}>;
|
|
1475
1651
|
getDaemonPairingOffer(options?: DaemonPairingOfferOptions): Promise<DaemonPairingOfferPayload>;
|
|
1476
1652
|
collectDiagnostics(requestId?: string): Promise<DiagnosticsPayload>;
|
|
1477
1653
|
patchDaemonConfig(config: MutableDaemonConfigPatch, requestId?: string): Promise<{
|
|
@@ -1492,21 +1668,63 @@ export declare class DaemonClient {
|
|
|
1492
1668
|
listProviderUsage(options?: {
|
|
1493
1669
|
requestId?: string;
|
|
1494
1670
|
}): Promise<ProviderUsageListPayload>;
|
|
1671
|
+
listUsageReports(options?: {
|
|
1672
|
+
requestId?: string;
|
|
1673
|
+
forceRefresh?: boolean;
|
|
1674
|
+
reportIds?: string[];
|
|
1675
|
+
}): Promise<UsageListReportsPayload>;
|
|
1495
1676
|
listCommands(options: ListCommandsOptions): Promise<ListCommandsPayload>;
|
|
1496
1677
|
listCommands(agentId: string, requestId?: string): Promise<ListCommandsPayload>;
|
|
1497
1678
|
listCommands(agentId: string, options?: LegacyListCommandsOptions): Promise<ListCommandsPayload>;
|
|
1498
1679
|
respondToPermission(agentId: string, requestId: string, response: AgentPermissionResponse): Promise<void>;
|
|
1680
|
+
getPluginCatalog(): Promise<{
|
|
1681
|
+
id: string;
|
|
1682
|
+
clientBundle: string;
|
|
1683
|
+
requirements?: {
|
|
1684
|
+
paseo?: string | undefined;
|
|
1685
|
+
} | undefined;
|
|
1686
|
+
}[]>;
|
|
1687
|
+
listPlugins(): Promise<PluginListItem[]>;
|
|
1688
|
+
getPluginLogs(pluginId: string): Promise<PluginLogEntry[]>;
|
|
1689
|
+
getAgentSkillsStatus(): Promise<AgentSkillsStatus>;
|
|
1690
|
+
reconcileAgentSkills(): Promise<AgentSkillsStatus>;
|
|
1691
|
+
uninstallAgentSkills(): Promise<AgentSkillsStatus>;
|
|
1692
|
+
saveAgentSkillsSelection(selection: AgentSkillSelection, confirmedRemovals?: readonly string[]): Promise<AgentSkillsSaveResult>;
|
|
1693
|
+
importLegacyAgentSkillsSelection(selection: AgentSkillSelection): Promise<{
|
|
1694
|
+
imported: boolean;
|
|
1695
|
+
selection: AgentSkillSelection;
|
|
1696
|
+
}>;
|
|
1697
|
+
installDirectoryPlugin(path: string, id?: string): Promise<PluginListItem>;
|
|
1698
|
+
installPluginSource(input: {
|
|
1699
|
+
source: string;
|
|
1700
|
+
id?: string;
|
|
1701
|
+
ref?: string;
|
|
1702
|
+
}): Promise<PluginListItem>;
|
|
1703
|
+
getPluginSourceStatus(pluginId?: string): Promise<PluginSourceStatusItem[]>;
|
|
1704
|
+
private requirePluginUpdates;
|
|
1705
|
+
previewPluginUpdates(input?: {
|
|
1706
|
+
pluginId?: string;
|
|
1707
|
+
target?: PluginUpdateSelection;
|
|
1708
|
+
}): Promise<PluginUpdatePreview[]>;
|
|
1709
|
+
applyPluginUpdates(proposals: PluginUpdateProposal[]): Promise<PluginUpdateResult[]>;
|
|
1710
|
+
updatePluginSources(pluginId?: string): Promise<PluginSourceUpdateItem[]>;
|
|
1711
|
+
inspectDirectoryPlugin(path: string): Promise<{
|
|
1712
|
+
id: string;
|
|
1713
|
+
}>;
|
|
1714
|
+
reloadPlugin(pluginId: string): Promise<PluginListItem>;
|
|
1715
|
+
enablePlugin(pluginId: string): Promise<PluginListItem>;
|
|
1716
|
+
disablePlugin(pluginId: string): Promise<PluginListItem>;
|
|
1717
|
+
removePlugin(pluginId: string): Promise<void>;
|
|
1718
|
+
private managePlugin;
|
|
1719
|
+
invokePluginRpc(pluginId: string, method: string, input: unknown): Promise<unknown>;
|
|
1499
1720
|
respondToPermissionAndWait(agentId: string, requestId: string, response: AgentPermissionResponse, timeout?: number): Promise<AgentPermissionResolvedPayload>;
|
|
1500
1721
|
waitForAgentUpsert(agentId: string, predicate: (snapshot: AgentSnapshotPayload) => boolean, timeout?: number): Promise<AgentSnapshotPayload>;
|
|
1501
1722
|
waitForFinish(agentId: string, timeout?: number): Promise<WaitForFinishResult>;
|
|
1502
|
-
|
|
1503
|
-
cwd: string;
|
|
1504
|
-
workspaceId?: string;
|
|
1505
|
-
}): void;
|
|
1506
|
-
unsubscribeTerminals(input: {
|
|
1723
|
+
observeTerminals(input: {
|
|
1507
1724
|
cwd: string;
|
|
1508
1725
|
workspaceId?: string;
|
|
1509
|
-
|
|
1726
|
+
signal?: AbortSignal;
|
|
1727
|
+
}): OwnedSubscription<CorrelatedResponsePayload<"terminals_changed">>;
|
|
1510
1728
|
listTerminals(cwd?: string, requestId?: string, options?: {
|
|
1511
1729
|
workspaceId?: string;
|
|
1512
1730
|
}): Promise<ListTerminalsPayload>;
|
|
@@ -1515,13 +1733,29 @@ export declare class DaemonClient {
|
|
|
1515
1733
|
command?: string;
|
|
1516
1734
|
args?: string[];
|
|
1517
1735
|
workspaceId?: string;
|
|
1736
|
+
size?: {
|
|
1737
|
+
rows: number;
|
|
1738
|
+
cols: number;
|
|
1739
|
+
};
|
|
1518
1740
|
}): Promise<CreateTerminalPayload>;
|
|
1519
1741
|
renameTerminal(input: RenameTerminalInput): Promise<RenameTerminalResult>;
|
|
1520
|
-
|
|
1742
|
+
/**
|
|
1743
|
+
* Snapshot/restore and output arrive in receive. Subscribe to the returned handle
|
|
1744
|
+
* for terminal_stream_exit: payload.error means observation failure, not PTY exit.
|
|
1745
|
+
* Either outcome detaches this slot and releases the handle automatically.
|
|
1746
|
+
*/
|
|
1747
|
+
observeTerminal(terminalId: string, receive: (event: TerminalStreamEvent) => void, options?: {
|
|
1748
|
+
restore?: SubscribeTerminalRequest["restore"];
|
|
1749
|
+
signal?: AbortSignal;
|
|
1750
|
+
requestId?: string;
|
|
1751
|
+
}): OwnedSubscription<SubscribeTerminalPayload>;
|
|
1752
|
+
subscribeTerminal(terminalId: string, options?: {
|
|
1521
1753
|
restore?: SubscribeTerminalRequest["restore"];
|
|
1754
|
+
signal?: AbortSignal;
|
|
1522
1755
|
requestId?: string;
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1756
|
+
}): Promise<SubscribeTerminalPayload & {
|
|
1757
|
+
subscription: OwnedSubscription<SubscribeTerminalPayload>;
|
|
1758
|
+
}>;
|
|
1525
1759
|
sendTerminalInput(terminalId: string, message: TerminalInput["message"]): void;
|
|
1526
1760
|
killTerminal(terminalId: string, requestId?: string): Promise<KillTerminalPayload>;
|
|
1527
1761
|
closeItems(input: {
|
|
@@ -1534,33 +1768,196 @@ export declare class DaemonClient {
|
|
|
1534
1768
|
stripAnsi?: boolean;
|
|
1535
1769
|
}, requestId?: string): Promise<CaptureTerminalPayload>;
|
|
1536
1770
|
/**
|
|
1537
|
-
* Read an agent's rendered terminal screen.
|
|
1771
|
+
* Read an agent's rendered terminal screen.
|
|
1772
|
+
*
|
|
1773
|
+
* `payload.screen` is null when the agent has no readable pane (SDK transport, or a PTY
|
|
1774
|
+
* without tmux). That is the normal negative answer, not an error, so callers branch on it
|
|
1775
|
+
* rather than catching.
|
|
1776
|
+
*/
|
|
1777
|
+
scheduleCreate(options: CreateScheduleOptions): Promise<ScheduleCreatePayload>;
|
|
1778
|
+
scheduleList(requestId?: string): Promise<ScheduleListPayload>;
|
|
1779
|
+
/**
|
|
1780
|
+
* Preview what a filter would have matched over a window of its source's
|
|
1781
|
+
* history. A READ: the daemon side of this arms nothing, mints no session and
|
|
1782
|
+
* writes no ledger row.
|
|
1783
|
+
*
|
|
1784
|
+
* `payload.result` and `payload.error` are both nullable and exactly one is
|
|
1785
|
+
* populated, so a caller can tell "the window held nothing" from "the read
|
|
1786
|
+
* failed" - a distinction a bare empty array would destroy.
|
|
1787
|
+
*/
|
|
1788
|
+
scheduleInspect(options: InspectScheduleOptions): Promise<ScheduleInspectPayload>;
|
|
1789
|
+
scheduleLogs(options: InspectScheduleOptions): Promise<ScheduleLogsPayload>;
|
|
1790
|
+
schedulePause(options: InspectScheduleOptions): Promise<SchedulePausePayload>;
|
|
1791
|
+
scheduleResume(options: InspectScheduleOptions): Promise<ScheduleResumePayload>;
|
|
1792
|
+
scheduleDelete(options: InspectScheduleOptions): Promise<ScheduleDeletePayload>;
|
|
1793
|
+
scheduleRunOnce(options: InspectScheduleOptions): Promise<ScheduleRunOncePayload>;
|
|
1794
|
+
scheduleUpdate(options: UpdateScheduleOptions): Promise<ScheduleUpdatePayload>;
|
|
1795
|
+
onTerminalStreamEvent(handler: (event: TerminalStreamEvent) => void): () => void;
|
|
1796
|
+
waitForTerminalStreamEvent(predicate: (event: TerminalStreamEvent) => boolean, timeout?: number): Promise<TerminalStreamEvent>;
|
|
1797
|
+
/**
|
|
1798
|
+
* Upload a file to an agent's workspace as a windowed, cancellable,
|
|
1799
|
+
* progress-reporting stream of {@link UPLOAD_CHUNK_SIZE_BYTES} `FileChunk`
|
|
1800
|
+
* frames with ack-based flow control. Resolves `{ fileId, path, size,
|
|
1801
|
+
* mimeType }` once the daemon finalizes the file.
|
|
1802
|
+
*
|
|
1803
|
+
* Purely additive over the receive path (`activeBinaryFileTransfers`): this
|
|
1804
|
+
* method only sends. It never buffers more than {@link UPLOAD_WINDOW_SIZE}
|
|
1805
|
+
* chunks in flight, so it cannot approach the relay's `MAX_PENDING_SENDS`
|
|
1806
|
+
* ceiling.
|
|
1807
|
+
*
|
|
1808
|
+
* @throws {UploadCancelledError} when `opts.signal` aborts
|
|
1809
|
+
* @throws {UploadCapExceededError} when the daemon rejects on the size cap
|
|
1810
|
+
* @throws {UploadFailedError} for any other transfer failure
|
|
1811
|
+
*/
|
|
1812
|
+
protected createRequestId(requestId?: string): string;
|
|
1813
|
+
getLastServerInfoMessage(): ServerInfoStatusPayload | null;
|
|
1814
|
+
private requireHubRelationshipSupport;
|
|
1815
|
+
private requireDaemonConfigReloadSupport;
|
|
1816
|
+
private resolveTransportUrlForAttempt;
|
|
1817
|
+
private sendHelloMessage;
|
|
1818
|
+
private disposeTransport;
|
|
1819
|
+
private cleanupTransport;
|
|
1820
|
+
private resetConnectTimeout;
|
|
1821
|
+
private handleTransportMessage;
|
|
1822
|
+
private handleJsonPayload;
|
|
1823
|
+
private tryHandleBinaryFrame;
|
|
1824
|
+
private handleFileTransferFrame;
|
|
1825
|
+
private updateConnectionState;
|
|
1826
|
+
setReconnectEnabled(enabled: boolean): void;
|
|
1827
|
+
private scheduleReconnect;
|
|
1828
|
+
private emitDisconnectedStateForReconnect;
|
|
1829
|
+
private armReconnectTimer;
|
|
1830
|
+
private resolvePingProbe;
|
|
1831
|
+
private clearPingProbe;
|
|
1832
|
+
private rejectPingProbe;
|
|
1833
|
+
private recordLivenessFailure;
|
|
1834
|
+
private handleSessionMessage;
|
|
1835
|
+
private deliverSessionMessage;
|
|
1836
|
+
private resolveWaiters;
|
|
1837
|
+
private rejectWaitersForRequestId;
|
|
1838
|
+
private clearWaiters;
|
|
1839
|
+
private toEvent;
|
|
1840
|
+
private waitForWithCancel;
|
|
1841
|
+
/**
|
|
1842
|
+
* Answer a decision the agent parked on its digest. `optionId: null` with a
|
|
1843
|
+
* note is a free-text answer, an option the agent did not list.
|
|
1538
1844
|
*
|
|
1539
|
-
* `
|
|
1540
|
-
*
|
|
1541
|
-
*
|
|
1845
|
+
* Pass the `revision` of the decision you showed the user. The daemon refuses
|
|
1846
|
+
* the answer if the agent reworded the decision since, instead of recording a
|
|
1847
|
+
* choice against text the user never read. Appended after `requestId` so
|
|
1848
|
+
* existing positional callers keep working.
|
|
1849
|
+
*/
|
|
1850
|
+
answerAgentDecision(agentId: string, decisionId: string, optionId: string | null, note: string | null, requestId?: string, revision?: string | null): Promise<{
|
|
1851
|
+
decision: PendingDecision | null;
|
|
1852
|
+
}>;
|
|
1853
|
+
/**
|
|
1854
|
+
* Expire decisions nobody answered, recorded as `answeredBy: "timeout"` with a
|
|
1855
|
+
* note. Unlike `answerAgentDecision` this never records the user as the
|
|
1856
|
+
* writer and never prompts the agent. Pass `agentId` + `decisionId` for one
|
|
1857
|
+
* decision (any age), or neither to sweep every stored agent past
|
|
1858
|
+
* `olderThanMs`. `dryRun` reports without writing.
|
|
1542
1859
|
*/
|
|
1860
|
+
private buildAuthHeader;
|
|
1861
|
+
cancelWorkflow(workflowId: string): Promise<WorkflowSnapshot>;
|
|
1543
1862
|
captureAgentPane(agentId: string, options?: {
|
|
1544
1863
|
ansi?: boolean;
|
|
1545
1864
|
scrollbackLines?: number;
|
|
1546
1865
|
}, requestId?: string): Promise<CaptureAgentPanePayload>;
|
|
1866
|
+
private checkoutDiffSubscriptions;
|
|
1867
|
+
consolidateAgents(winnerId: string, sourceIds: string[], requestId?: string): Promise<{
|
|
1868
|
+
archivedIds: string[];
|
|
1869
|
+
}>;
|
|
1870
|
+
/**
|
|
1871
|
+
* Snooze a session out of the triage ring until a time, or clear it with
|
|
1872
|
+
* `until: null`.
|
|
1873
|
+
*
|
|
1874
|
+
* The three fields are the whole point: a time alone is "later". `untilWhat`
|
|
1875
|
+
* names the event, `why` names what is missing. The daemon accepts a
|
|
1876
|
+
* time-only snooze, because a CLI caller making that call is still deciding;
|
|
1877
|
+
* requiring the other two is a client policy that escalates with the count.
|
|
1878
|
+
*/
|
|
1879
|
+
private createAgentRequest;
|
|
1880
|
+
createAgentWithRoutine(options: CreateAgentRequestOptions & {
|
|
1881
|
+
routine: NonNullable<CreateAgentRequestOptions["routine"]>;
|
|
1882
|
+
}): Promise<{
|
|
1883
|
+
agent: AgentSnapshotPayload;
|
|
1884
|
+
routine: {
|
|
1885
|
+
scheduleId: string;
|
|
1886
|
+
nextRunAt: string | null;
|
|
1887
|
+
};
|
|
1888
|
+
}>;
|
|
1547
1889
|
createChatRoom(options: CreateChatRoomOptions): Promise<ChatCreatePayload>;
|
|
1548
|
-
|
|
1549
|
-
inspectChatRoom(options: InspectChatRoomOptions): Promise<ChatInspectPayload>;
|
|
1890
|
+
private daemonHttpJson;
|
|
1550
1891
|
deleteChatRoom(options: DeleteChatRoomOptions): Promise<ChatDeletePayload>;
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1892
|
+
dismissBackgroundTask(agentId: string, taskId: string): Promise<{
|
|
1893
|
+
dismissed: boolean;
|
|
1894
|
+
}>;
|
|
1895
|
+
editMessage(agentId: string, turnId: string, newContent: string): Promise<{
|
|
1896
|
+
newSessionId: string;
|
|
1897
|
+
adopted: boolean;
|
|
1898
|
+
}>;
|
|
1899
|
+
enrichReferences(urls: string[]): Promise<ReferenceEnrichment[]>;
|
|
1556
1900
|
/**
|
|
1557
|
-
*
|
|
1558
|
-
*
|
|
1559
|
-
*
|
|
1901
|
+
* Read a background shell's captured output. Resolves with `text: null` when
|
|
1902
|
+
* the daemon does not know the shell or it captured nothing. The daemon tails
|
|
1903
|
+
* and redacts before sending.
|
|
1904
|
+
*/
|
|
1905
|
+
executeExtensionCommand(commandId: string, args?: unknown[]): Promise<unknown>;
|
|
1906
|
+
expireAgentDecisions(input: {
|
|
1907
|
+
olderThanMs?: number | null;
|
|
1908
|
+
agentId?: string | null;
|
|
1909
|
+
decisionId?: string | null;
|
|
1910
|
+
dryRun?: boolean;
|
|
1911
|
+
note?: string | null;
|
|
1912
|
+
}, requestId?: string): Promise<AgentDecisionsExpireResult>;
|
|
1913
|
+
/**
|
|
1914
|
+
* Fold sessions into one that already exists: the winner keeps its transcript,
|
|
1915
|
+
* the sources are linked both ways and then archived.
|
|
1560
1916
|
*
|
|
1561
|
-
*
|
|
1562
|
-
*
|
|
1563
|
-
|
|
1917
|
+
* One call rather than a client-side loop, because a half-consolidated fleet
|
|
1918
|
+
* is worse than either end state.
|
|
1919
|
+
*/
|
|
1920
|
+
fleetAsk(options: AskFleetDecisionOptions): Promise<FleetAskPayload>;
|
|
1921
|
+
/** Decisions loops are waiting on a person for, most urgent first. */
|
|
1922
|
+
fleetCreate(options: CreateFleetLoopOptions): Promise<FleetCreatePayload>;
|
|
1923
|
+
fleetDecisions(options?: ListFleetDecisionsOptions): Promise<FleetDecisionsPayload>;
|
|
1924
|
+
/** Answer one decision as the human. */
|
|
1925
|
+
fleetExecutions(options: InspectFleetLoopOptions): Promise<FleetExecutionsPayload>;
|
|
1926
|
+
fleetInspect(options: InspectFleetLoopOptions): Promise<FleetInspectPayload>;
|
|
1927
|
+
fleetList(requestId?: string): Promise<FleetListPayload>;
|
|
1928
|
+
fleetPause(options: InspectFleetLoopOptions): Promise<FleetPausePayload>;
|
|
1929
|
+
/** Raise a typed question from a loop. */
|
|
1930
|
+
fleetResolveDecision(options: ResolveFleetDecisionOptions): Promise<FleetResolveDecisionPayload>;
|
|
1931
|
+
/** Persist a loop's declared parameters. */
|
|
1932
|
+
fleetResume(options: InspectFleetLoopOptions): Promise<FleetResumePayload>;
|
|
1933
|
+
fleetRunNow(options: InspectFleetLoopOptions): Promise<FleetRunNowPayload>;
|
|
1934
|
+
fleetSetMode(options: SetFleetLoopModeOptions): Promise<FleetSetModePayload>;
|
|
1935
|
+
fleetSetParams(options: SetFleetLoopParamsOptions): Promise<FleetSetParamsPayload>;
|
|
1936
|
+
/** Promote a loop to live, or demote it to dry-run. */
|
|
1937
|
+
getAgentsByIds(ids: string[], options?: {
|
|
1938
|
+
requestId?: string;
|
|
1939
|
+
timeout?: number;
|
|
1940
|
+
fields?: FetchAgentsOptions["fields"];
|
|
1941
|
+
scope?: "active";
|
|
1942
|
+
}): Promise<GetAgentsByIdsPayload>;
|
|
1943
|
+
getFileUploadsCapability(): boolean;
|
|
1944
|
+
private getHttpBaseUrl;
|
|
1945
|
+
getVapidPublicKey(): Promise<string | null>;
|
|
1946
|
+
getWorkflow(workflowId: string): Promise<WorkflowSnapshot | null>;
|
|
1947
|
+
ingestionApply(options: {
|
|
1948
|
+
requestId?: string;
|
|
1949
|
+
filterId: string;
|
|
1950
|
+
itemKeys: string[];
|
|
1951
|
+
mode: "dry-run" | "apply";
|
|
1952
|
+
confirmedGroups?: number;
|
|
1953
|
+
}): Promise<IngestionApplyPayload>;
|
|
1954
|
+
/**
|
|
1955
|
+
* Read one cohort's progress. A READ, and the only way to get one.
|
|
1956
|
+
*
|
|
1957
|
+
* `payload.cohort` and `payload.error` are both nullable and their pairing is
|
|
1958
|
+
* the message: a null cohort with a null error means this cohort does not
|
|
1959
|
+
* exist, and a null cohort with an error means the read failed. A caller that
|
|
1960
|
+
* cannot tell those apart renders a broken daemon as a finished batch.
|
|
1564
1961
|
*/
|
|
1565
1962
|
ingestionBackfill(options: {
|
|
1566
1963
|
filterId: string;
|
|
@@ -1577,74 +1974,161 @@ export declare class DaemonClient {
|
|
|
1577
1974
|
* adjusts it - the daemon recomputes on arrival and answers `stale-plan` on any
|
|
1578
1975
|
* mismatch, which is the whole point of sending it.
|
|
1579
1976
|
*/
|
|
1580
|
-
|
|
1977
|
+
ingestionCohortCancel(options: {
|
|
1978
|
+
cohortId: string;
|
|
1581
1979
|
requestId?: string;
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1980
|
+
}): Promise<IngestionCohortCancelPayload>;
|
|
1981
|
+
/**
|
|
1982
|
+
* The STORED verification state of one filter's ingestion runs.
|
|
1983
|
+
*
|
|
1984
|
+
* A read, and only a read: the daemon answers from the ledger and issues no
|
|
1985
|
+
* source round-trip, so this is safe to call on a render. `runs: []` with
|
|
1986
|
+
* `error: null` is a real answer meaning "this filter has no source
|
|
1987
|
+
* schedule"; `[]` beside a non-null error means the read failed. A caller
|
|
1988
|
+
* that collapses the two shows a broken daemon as an idle filter.
|
|
1989
|
+
*/
|
|
1990
|
+
ingestionCohortInspect(options: {
|
|
1991
|
+
cohortId: string;
|
|
1992
|
+
requestId?: string;
|
|
1993
|
+
}): Promise<IngestionCohortInspectPayload>;
|
|
1994
|
+
/**
|
|
1995
|
+
* Cancel a cohort's PENDING groups. Never its running ones.
|
|
1996
|
+
*
|
|
1997
|
+
* There is no field here through which a caller could ask for a live session to
|
|
1998
|
+
* be interrupted, because a running group may be mid-write to Gmail or GitLab
|
|
1999
|
+
* and the half-drafted email is the failure this whole path exists to avoid.
|
|
2000
|
+
* The response's `stillRunning` is the receipt for what was left alone.
|
|
2001
|
+
*/
|
|
2002
|
+
ingestionFilterCreate(options: IngestionFilterCreateOptions): Promise<IngestionFilterCreatePayload>;
|
|
2003
|
+
ingestionFilterDelete(options: IngestionFilterDeleteOptions): Promise<IngestionFilterDeletePayload>;
|
|
2004
|
+
/**
|
|
2005
|
+
* Forget a source locally. The aggregator keeps the grant; `sourceAssign`
|
|
2006
|
+
* can point a later source at it, and a new connect never adopts it alone.
|
|
2007
|
+
*/
|
|
2008
|
+
/** Deploy a trigger so the source actually emits events a filter can match. */
|
|
2009
|
+
ingestionFilterList(options?: IngestionFilterListOptions): Promise<IngestionFilterListPayload>;
|
|
2010
|
+
ingestionFilterUpdate(options: IngestionFilterUpdateOptions): Promise<IngestionFilterUpdatePayload>;
|
|
2011
|
+
ingestionRuns(options: IngestionRunsOptions): Promise<IngestionRunsPayload>;
|
|
2012
|
+
inspectChatRoom(options: InspectChatRoomOptions): Promise<ChatInspectPayload>;
|
|
2013
|
+
listAllSessions(options?: {
|
|
2014
|
+
signal?: AbortSignal;
|
|
2015
|
+
}): Promise<Array<{
|
|
2016
|
+
sid: string;
|
|
2017
|
+
title: string | null;
|
|
2018
|
+
lastActivity: string;
|
|
2019
|
+
cwd: string;
|
|
2020
|
+
agentName: string | null;
|
|
2021
|
+
}>>;
|
|
2022
|
+
listBackgroundTasks(agentId?: string): Promise<BackgroundTaskPayload[]>;
|
|
2023
|
+
/**
|
|
2024
|
+
* Record session context (links + non-live credentials) onto an agent's
|
|
2025
|
+
* digest. Used by the context hook, which runs beside an agent rather than
|
|
2026
|
+
* inside it and so cannot reach the agent-scoped `set_session_digest` MCP
|
|
2027
|
+
* tool.
|
|
2028
|
+
*
|
|
2029
|
+
* Returns how many secrets the daemon had to mask, so a caller can report
|
|
2030
|
+
* that it handed over something it should not have.
|
|
2031
|
+
*/
|
|
2032
|
+
listChatRooms(requestId?: string): Promise<ChatListPayload>;
|
|
2033
|
+
listExtensions(): Promise<InstalledExtension[]>;
|
|
2034
|
+
listWorkflows(): Promise<WorkflowSnapshot[]>;
|
|
2035
|
+
listWorkspaceSessions(workspaceId: string, options?: {
|
|
2036
|
+
signal?: AbortSignal;
|
|
2037
|
+
}): Promise<Array<{
|
|
2038
|
+
sid: string;
|
|
2039
|
+
title: string | null;
|
|
2040
|
+
lastActivity: string;
|
|
2041
|
+
cwd: string;
|
|
2042
|
+
agentName: string | null;
|
|
2043
|
+
}>>;
|
|
2044
|
+
loopInspect(options: string | InspectLoopOptions): Promise<LoopInspectPayload>;
|
|
2045
|
+
loopList(requestId?: string): Promise<LoopListPayload>;
|
|
2046
|
+
loopLogs(options: string | LoopLogsOptions, afterSeq?: number): Promise<LoopLogsPayload>;
|
|
2047
|
+
loopRun(options: RunLoopOptions): Promise<LoopRunPayload>;
|
|
2048
|
+
loopStop(options: string | StopLoopOptions): Promise<LoopStopPayload>;
|
|
2049
|
+
postChatMessage(options: PostChatMessageOptions): Promise<ChatPostPayload>;
|
|
2050
|
+
readBackgroundTaskOutput(agentId: string, taskId: string, options?: {
|
|
2051
|
+
maxBytes?: number;
|
|
2052
|
+
}): Promise<{
|
|
2053
|
+
text: string | null;
|
|
2054
|
+
truncated: boolean;
|
|
2055
|
+
byteSize: number;
|
|
2056
|
+
}>;
|
|
2057
|
+
readChatMessages(options: ReadChatMessagesOptions): Promise<ChatReadPayload>;
|
|
2058
|
+
reloadProviderConfig(options?: {
|
|
2059
|
+
requestId?: string;
|
|
2060
|
+
}): Promise<ProvidersReloadConfigPayload>;
|
|
2061
|
+
private reportRequestCompletion;
|
|
2062
|
+
private sendCorrelatedRequest;
|
|
2063
|
+
private sendCorrelatedSessionRequest;
|
|
2064
|
+
private sendNamespacedCorrelatedSessionRequest;
|
|
2065
|
+
private resubscribeCheckoutDiffSubscriptions;
|
|
2066
|
+
private resubscribeTerminalDirectorySubscriptions;
|
|
2067
|
+
rewindSession(agentId: string, turnId: string): Promise<{
|
|
2068
|
+
newSessionId: string;
|
|
2069
|
+
}>;
|
|
2070
|
+
searchSessions(params: {
|
|
2071
|
+
query: string;
|
|
2072
|
+
limit?: number;
|
|
2073
|
+
sources?: readonly string[];
|
|
2074
|
+
signal?: AbortSignal;
|
|
2075
|
+
}): Promise<Array<{
|
|
2076
|
+
sid: string;
|
|
2077
|
+
source: string;
|
|
2078
|
+
cwd: string;
|
|
2079
|
+
timestamp: string;
|
|
2080
|
+
snippet: string;
|
|
2081
|
+
resumeCommand: string;
|
|
2082
|
+
}>>;
|
|
1587
2083
|
/**
|
|
1588
|
-
*
|
|
1589
|
-
*
|
|
1590
|
-
*
|
|
1591
|
-
*
|
|
1592
|
-
* exist, and a null cohort with an error means the read failed. A caller that
|
|
1593
|
-
* cannot tell those apart renders a broken daemon as a finished batch.
|
|
2084
|
+
* Derive the daemon's HTTP base URL from the WebSocket URL we connected with.
|
|
2085
|
+
* Works for direct (ws://host:port/ws) and same-origin (web served by
|
|
2086
|
+
* daemon). For relay-mode (wss://relay.../ws), HTTP routes against the
|
|
2087
|
+
* daemon are not addressable — throws so callers fall back gracefully.
|
|
1594
2088
|
*/
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
2089
|
+
sendWatchAction(message: WatchNotificationActionMessage | WatchSessionSearchMessage | WatchComposerDictateMessage): void;
|
|
2090
|
+
setAgentContext(input: {
|
|
2091
|
+
agentId: string;
|
|
2092
|
+
links?: {
|
|
2093
|
+
kind: SessionDigestLink["kind"];
|
|
2094
|
+
url: string;
|
|
2095
|
+
label?: string;
|
|
2096
|
+
}[];
|
|
2097
|
+
secrets?: {
|
|
2098
|
+
label: string;
|
|
2099
|
+
value: string;
|
|
2100
|
+
source?: string;
|
|
2101
|
+
}[];
|
|
2102
|
+
}): Promise<{
|
|
2103
|
+
digest: SessionDigest | null;
|
|
2104
|
+
maskedCount: number;
|
|
2105
|
+
error?: string;
|
|
2106
|
+
}>;
|
|
1599
2107
|
/**
|
|
1600
|
-
*
|
|
2108
|
+
* Ask the daemon what it can see about external reference URLs -- a GitLab
|
|
2109
|
+
* pipeline's status, a merge request's state, a Jira issue's column.
|
|
1601
2110
|
*
|
|
1602
|
-
*
|
|
1603
|
-
*
|
|
1604
|
-
*
|
|
1605
|
-
*
|
|
2111
|
+
* The provider credentials live on the daemon, so the app never holds one.
|
|
2112
|
+
* An entry the daemon could not look up still comes back, carrying
|
|
2113
|
+
* `unavailableReason`, so a card can say what it could not see instead of
|
|
2114
|
+
* spinning. See docs/session-context-rail.md.
|
|
1606
2115
|
*/
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
2116
|
+
snoozeAgent(agentId: string, until: string | null, untilWhat?: string | null, why?: string | null, requestId?: string): Promise<{
|
|
2117
|
+
snooze: AgentSnoozeState | null;
|
|
2118
|
+
}>;
|
|
2119
|
+
sourceAccounts(options: SourceAccountsOptions): Promise<SourceAccountsPayload>;
|
|
2120
|
+
/** Point a source at one of those accounts. A refusal comes back as `reason`. */
|
|
2121
|
+
sourceActions(options: SourceActionsOptions): Promise<SourceActionsPayload>;
|
|
2122
|
+
/** Run one action as the source's bound account. Not idempotent: never retry blindly. */
|
|
2123
|
+
sourceAssign(options: SourceAssignOptions): Promise<SourceAssignPayload>;
|
|
1611
2124
|
/**
|
|
1612
|
-
* The
|
|
2125
|
+
* The recent items of one source, payloads included. Read-only: the daemon
|
|
2126
|
+
* side creates, writes, arms and spawns nothing.
|
|
1613
2127
|
*
|
|
1614
|
-
* A
|
|
1615
|
-
*
|
|
1616
|
-
* `error: null` is a real answer meaning "this filter has no source
|
|
1617
|
-
* schedule"; `[]` beside a non-null error means the read failed. A caller
|
|
1618
|
-
* that collapses the two shows a broken daemon as an idle filter.
|
|
2128
|
+
* A failed read resolves with `payload.error` set rather than rejecting, so a
|
|
2129
|
+
* caller can tell an empty window from a read that never happened.
|
|
1619
2130
|
*/
|
|
1620
|
-
ingestionRuns(options: IngestionRunsOptions): Promise<IngestionRunsPayload>;
|
|
1621
|
-
fleetList(requestId?: string): Promise<FleetListPayload>;
|
|
1622
|
-
fleetInspect(options: InspectFleetLoopOptions): Promise<FleetInspectPayload>;
|
|
1623
|
-
fleetRunNow(options: InspectFleetLoopOptions): Promise<FleetRunNowPayload>;
|
|
1624
|
-
fleetPause(options: InspectFleetLoopOptions): Promise<FleetPausePayload>;
|
|
1625
|
-
/** Raise a typed question from a loop. */
|
|
1626
|
-
fleetAsk(options: AskFleetDecisionOptions): Promise<FleetAskPayload>;
|
|
1627
|
-
/** Decisions loops are waiting on a person for, most urgent first. */
|
|
1628
|
-
fleetDecisions(options?: ListFleetDecisionsOptions): Promise<FleetDecisionsPayload>;
|
|
1629
|
-
/** Answer one decision as the human. */
|
|
1630
|
-
fleetResolveDecision(options: ResolveFleetDecisionOptions): Promise<FleetResolveDecisionPayload>;
|
|
1631
|
-
/** Persist a loop's declared parameters. */
|
|
1632
|
-
fleetSetParams(options: SetFleetLoopParamsOptions): Promise<FleetSetParamsPayload>;
|
|
1633
|
-
/** Promote a loop to live, or demote it to dry-run. */
|
|
1634
|
-
fleetSetMode(options: SetFleetLoopModeOptions): Promise<FleetSetModePayload>;
|
|
1635
|
-
fleetResume(options: InspectFleetLoopOptions): Promise<FleetResumePayload>;
|
|
1636
|
-
fleetCreate(options: CreateFleetLoopOptions): Promise<FleetCreatePayload>;
|
|
1637
|
-
fleetExecutions(options: InspectFleetLoopOptions): Promise<FleetExecutionsPayload>;
|
|
1638
|
-
scheduleInspect(options: InspectScheduleOptions): Promise<ScheduleInspectPayload>;
|
|
1639
|
-
scheduleLogs(options: InspectScheduleOptions): Promise<ScheduleLogsPayload>;
|
|
1640
|
-
schedulePause(options: InspectScheduleOptions): Promise<SchedulePausePayload>;
|
|
1641
|
-
scheduleResume(options: InspectScheduleOptions): Promise<ScheduleResumePayload>;
|
|
1642
|
-
scheduleDelete(options: InspectScheduleOptions): Promise<ScheduleDeletePayload>;
|
|
1643
|
-
scheduleRunOnce(options: InspectScheduleOptions): Promise<ScheduleRunOncePayload>;
|
|
1644
|
-
scheduleUpdate(options: UpdateScheduleOptions): Promise<ScheduleUpdatePayload>;
|
|
1645
2131
|
sourceCatalogue(options: SourceCatalogueOptions): Promise<SourceCataloguePayload>;
|
|
1646
|
-
sourceConnect(options: SourceConnectOptions): Promise<SourceConnectPayload>;
|
|
1647
|
-
sourceList(requestId?: string): Promise<SourceListPayload>;
|
|
1648
2132
|
sourceCheck(options: SourceCheckOptions): Promise<SourceCheckPayload>;
|
|
1649
2133
|
/**
|
|
1650
2134
|
* FILTER AUTHORING (Epic 7).
|
|
@@ -1655,31 +2139,8 @@ export declare class DaemonClient {
|
|
|
1655
2139
|
* absent. Every shipped daemon lacked it, so that control has been disabled
|
|
1656
2140
|
* on every host that exists. This is the method it was waiting for.
|
|
1657
2141
|
*/
|
|
1658
|
-
|
|
1659
|
-
ingestionFilterCreate(options: IngestionFilterCreateOptions): Promise<IngestionFilterCreatePayload>;
|
|
1660
|
-
ingestionFilterUpdate(options: IngestionFilterUpdateOptions): Promise<IngestionFilterUpdatePayload>;
|
|
1661
|
-
ingestionFilterDelete(options: IngestionFilterDeleteOptions): Promise<IngestionFilterDeletePayload>;
|
|
1662
|
-
/**
|
|
1663
|
-
* Forget a source locally. The aggregator keeps the grant; `sourceAssign`
|
|
1664
|
-
* can point a later source at it, and a new connect never adopts it alone.
|
|
1665
|
-
*/
|
|
1666
|
-
/** Deploy a trigger so the source actually emits events a filter can match. */
|
|
1667
|
-
sourceTriggers(options: {
|
|
1668
|
-
sourceId: string;
|
|
1669
|
-
requestId?: string;
|
|
1670
|
-
}): Promise<SourceTriggersPayload>;
|
|
1671
|
-
/** The actions this source's app offers. Read-only. */
|
|
1672
|
-
sourceActions(options: SourceActionsOptions): Promise<SourceActionsPayload>;
|
|
1673
|
-
/** Run one action as the source's bound account. Not idempotent: never retry blindly. */
|
|
1674
|
-
sourceRun(options: SourceRunOptions): Promise<SourceRunPayload>;
|
|
1675
|
-
sourceSubscribe(options: SourceSubscribeOptions): Promise<SourceSubscribePayload>;
|
|
2142
|
+
sourceConnect(options: SourceConnectOptions): Promise<SourceConnectPayload>;
|
|
1676
2143
|
sourceDisconnect(options: SourceDisconnectOptions): Promise<SourceDisconnectPayload>;
|
|
1677
|
-
/** Give a source the user's own name, or clear it. Local only. */
|
|
1678
|
-
sourceRename(options: SourceRenameOptions): Promise<SourceRenamePayload>;
|
|
1679
|
-
/** Every account the aggregator holds for this source's app. Read-only. */
|
|
1680
|
-
sourceAccounts(options: SourceAccountsOptions): Promise<SourceAccountsPayload>;
|
|
1681
|
-
/** Point a source at one of those accounts. A refusal comes back as `reason`. */
|
|
1682
|
-
sourceAssign(options: SourceAssignOptions): Promise<SourceAssignPayload>;
|
|
1683
2144
|
/**
|
|
1684
2145
|
* Add an HTTPS API as a custom source. Gated on the daemon's
|
|
1685
2146
|
* `sourceCustomApi` feature by the caller. A refusal comes back as `reason`.
|
|
@@ -1695,76 +2156,70 @@ export declare class DaemonClient {
|
|
|
1695
2156
|
secret: string;
|
|
1696
2157
|
requestId?: string;
|
|
1697
2158
|
}): Promise<SourceSetSecretPayload>;
|
|
1698
|
-
/**
|
|
1699
|
-
* The recent items of one source, payloads included. Read-only: the daemon
|
|
1700
|
-
* side creates, writes, arms and spawns nothing.
|
|
1701
|
-
*
|
|
1702
|
-
* A failed read resolves with `payload.error` set rather than rejecting, so a
|
|
1703
|
-
* caller can tell an empty window from a read that never happened.
|
|
1704
|
-
*/
|
|
1705
2159
|
sourceItems(options: SourceItemsOptions): Promise<SourceItemsPayload>;
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
* @throws {UploadCapExceededError} when the daemon rejects on the size cap
|
|
1726
|
-
* @throws {UploadFailedError} for any other transfer failure
|
|
1727
|
-
*/
|
|
1728
|
-
uploadFile(file: {
|
|
1729
|
-
bytes: Uint8Array;
|
|
1730
|
-
path: string;
|
|
1731
|
-
mime: string;
|
|
1732
|
-
modifiedAt: string;
|
|
1733
|
-
}, opts: {
|
|
1734
|
-
agentId: string;
|
|
1735
|
-
onProgress?: (bytesSent: number, totalBytes: number) => void;
|
|
1736
|
-
signal?: AbortSignal;
|
|
2160
|
+
sourceList(requestId?: string): Promise<SourceListPayload>;
|
|
2161
|
+
/** Give a source the user's own name, or clear it. Local only. */
|
|
2162
|
+
sourceRename(options: SourceRenameOptions): Promise<SourceRenamePayload>;
|
|
2163
|
+
/** Every account the aggregator holds for this source's app. Read-only. */
|
|
2164
|
+
sourceRun(options: SourceRunOptions): Promise<SourceRunPayload>;
|
|
2165
|
+
sourceSubscribe(options: SourceSubscribeOptions): Promise<SourceSubscribePayload>;
|
|
2166
|
+
sourceTriggers(options: {
|
|
2167
|
+
sourceId: string;
|
|
2168
|
+
requestId?: string;
|
|
2169
|
+
}): Promise<SourceTriggersPayload>;
|
|
2170
|
+
/** The actions this source's app offers. Read-only. */
|
|
2171
|
+
startWorkflow(input: {
|
|
2172
|
+
graph: WorkflowTaskGraph;
|
|
2173
|
+
provider: string;
|
|
2174
|
+
cwd: string;
|
|
2175
|
+
model?: string;
|
|
2176
|
+
title?: string;
|
|
2177
|
+
labels?: Record<string, string>;
|
|
2178
|
+
agentPresets?: Record<string, WorkflowAgentPreset>;
|
|
1737
2179
|
}): Promise<{
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
mimeType: string;
|
|
2180
|
+
workflowId: string;
|
|
2181
|
+
childAgentIds: string[];
|
|
2182
|
+
status: WorkflowStatus;
|
|
1742
2183
|
}>;
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
2184
|
+
subscribeCheckoutDiff(cwd: string, compare: {
|
|
2185
|
+
mode: "uncommitted" | "base";
|
|
2186
|
+
baseRef?: string;
|
|
2187
|
+
ignoreWhitespace?: boolean;
|
|
2188
|
+
}, options?: {
|
|
2189
|
+
subscriptionId?: string;
|
|
2190
|
+
requestId?: string;
|
|
2191
|
+
}): Promise<SubscribeCheckoutDiffPayload>;
|
|
2192
|
+
subscribePush(subscription: {
|
|
2193
|
+
type: "expo";
|
|
2194
|
+
token: string;
|
|
2195
|
+
} | {
|
|
2196
|
+
type: "web";
|
|
2197
|
+
subscription: {
|
|
2198
|
+
endpoint: string;
|
|
2199
|
+
keys: {
|
|
2200
|
+
p256dh: string;
|
|
2201
|
+
auth: string;
|
|
2202
|
+
};
|
|
2203
|
+
expirationTime?: number | null;
|
|
2204
|
+
};
|
|
2205
|
+
}): Promise<{
|
|
2206
|
+
ok: boolean;
|
|
2207
|
+
vapidPublicKey?: string;
|
|
2208
|
+
}>;
|
|
2209
|
+
subscribeTerminals(input: {
|
|
2210
|
+
cwd: string;
|
|
2211
|
+
workspaceId?: string;
|
|
2212
|
+
}): void;
|
|
2213
|
+
swapAgentProvider(agentId: string, newProviderId: string, overrides?: {
|
|
2214
|
+
model?: string | null;
|
|
2215
|
+
modeId?: string;
|
|
2216
|
+
}): Promise<void>;
|
|
2217
|
+
private terminalDirectorySubscriptions;
|
|
2218
|
+
unsubscribeCheckoutDiff(subscriptionId: string): void;
|
|
2219
|
+
unsubscribeTerminals(input: {
|
|
2220
|
+
cwd: string;
|
|
2221
|
+
workspaceId?: string;
|
|
2222
|
+
}): void;
|
|
2223
|
+
waitForChatMessages(options: WaitForChatMessagesOptions): Promise<ChatWaitPayload>;
|
|
1769
2224
|
}
|
|
1770
2225
|
//# sourceMappingURL=daemon-client.d.ts.map
|