Open History to see the last commit
1import type {
2 VcsCreateRefInput,
3 VcsCreateRefResult,
4 VcsCreateWorktreeInput,
5 VcsCreateWorktreeResult,
6 VcsInitInput,
7 VcsListRefsInput,
8 VcsListRefsResult,
9 VcsPullInput,
10 VcsPullResult,
11 VcsRemoveWorktreeInput,
12 VcsSwitchRefInput,
13 VcsSwitchRefResult,
14 GitPreparePullRequestThreadInput,
15 GitPreparePullRequestThreadResult,
16 GitPullRequestRefInput,
17 GitResolvePullRequestResult,
18 VcsStatusInput,
19 VcsStatusResult,
20} from "./git.ts";
21import type { ReviewDiffPreviewInput, ReviewDiffPreviewResult } from "./review.ts";
22import type { FilesystemBrowseInput, FilesystemBrowseResult } from "./filesystem.ts";
23import type {
24 ProjectSearchEntriesInput,
25 ProjectSearchEntriesResult,
26 ProjectWriteFileInput,
27 ProjectWriteFileResult,
28} from "./project.ts";
29import type { ProviderInstanceId } from "./providerInstance.ts";
30import type {
31 ServerConfig,
32 ServerProcessDiagnosticsResult,
33 ServerProcessResourceHistoryInput,
34 ServerProcessResourceHistoryResult,
35 ServerProviderUpdateInput,
36 ServerProviderUpdatedPayload,
37 ServerRemoveKeybindingResult,
38 ServerSignalProcessInput,
39 ServerSignalProcessResult,
40 ServerTraceDiagnosticsResult,
41 ServerUpsertKeybindingResult,
42} from "./server.ts";
43import type {
44 TerminalAttachInput,
45 TerminalAttachStreamEvent,
46 TerminalClearInput,
47 TerminalCloseInput,
48 TerminalMetadataStreamEvent,
49 TerminalOpenInput,
50 TerminalResizeInput,
51 TerminalRestartInput,
52 TerminalSessionSnapshot,
53 TerminalWriteInput,
54} from "./terminal.ts";
55import type { ServerRemoveKeybindingInput, ServerUpsertKeybindingInput } from "./server.ts";
56import * as Schema from "effect/Schema";
57import type {
58 ClientOrchestrationCommand,
59 OrchestrationGetFullThreadDiffInput,
60 OrchestrationGetFullThreadDiffResult,
61 OrchestrationGetTurnDiffInput,
62 OrchestrationGetTurnDiffResult,
63 OrchestrationShellSnapshot,
64 OrchestrationShellStreamItem,
65 OrchestrationSubscribeThreadInput,
66 OrchestrationThreadStreamItem,
67} from "./orchestration.ts";
68import { EnvironmentId } from "./baseSchemas.ts";
69import { AuthAccessTokenResult, AuthSessionState, AuthWebSocketTicketResult } from "./auth.ts";
70import { AdvertisedEndpoint } from "./remoteAccess.ts";
71import { EditorId } from "./editor.ts";
72import { ExecutionEnvironmentDescriptor } from "./environment.ts";
73import type { ClientSettings, ServerSettings, ServerSettingsPatch } from "./settings.ts";
74import type {
75 SourceControlCloneRepositoryInput,
76 SourceControlCloneRepositoryResult,
77 SourceControlDiscoveryResult,
78 SourceControlPublishRepositoryInput,
79 SourceControlPublishRepositoryResult,
80 SourceControlRepositoryInfo,
81 SourceControlRepositoryLookupInput,
82} from "./sourceControl.ts";
83
84export interface ContextMenuItem<T extends string = string> {
85 id: T;
86 label: string;
87 destructive?: boolean;
88 disabled?: boolean;
89 children?: readonly ContextMenuItem<T>[];
90}
91
92export interface ContextMenuItemSchemaType {
93 readonly id: string;
94 readonly label: string;
95 readonly destructive?: boolean;
96 readonly disabled?: boolean;
97 readonly children?: readonly ContextMenuItemSchemaType[];
98}
99
100export const ContextMenuItemSchema: Schema.Codec<ContextMenuItemSchemaType> = Schema.Struct({
101 id: Schema.String,
102 label: Schema.String,
103 destructive: Schema.optionalKey(Schema.Boolean),
104 disabled: Schema.optionalKey(Schema.Boolean),
105 children: Schema.optionalKey(
106 Schema.Array(
107 Schema.suspend((): Schema.Codec<ContextMenuItemSchemaType> => ContextMenuItemSchema),
108 ),
109 ),
110});
111
112export type DesktopUpdateStatus =
113 | "disabled"
114 | "idle"
115 | "checking"
116 | "up-to-date"
117 | "available"
118 | "downloading"
119 | "downloaded"
120 | "error";
121
122export type DesktopRuntimeArch = "arm64" | "x64" | "other";
123export type DesktopTheme = "light" | "dark" | "system";
124export type DesktopUpdateChannel = "latest" | "nightly";
125export type DesktopAppStageLabel = "Alpha" | "Dev" | "Nightly";
126
127export const DesktopUpdateStatusSchema = Schema.Literals([
128 "disabled",
129 "idle",
130 "checking",
131 "up-to-date",
132 "available",
133 "downloading",
134 "downloaded",
135 "error",
136]);
137export const DesktopRuntimeArchSchema = Schema.Literals(["arm64", "x64", "other"]);
138export const DesktopThemeSchema = Schema.Literals(["light", "dark", "system"]);
139export const DesktopUpdateChannelSchema = Schema.Literals(["latest", "nightly"]);
140export const DesktopAppStageLabelSchema = Schema.Literals(["Alpha", "Dev", "Nightly"]);
141
142export interface DesktopAppBranding {
143 baseName: string;
144 stageLabel: DesktopAppStageLabel;
145 displayName: string;
146}
147
148export const DesktopAppBrandingSchema = Schema.Struct({
149 baseName: Schema.String,
150 stageLabel: DesktopAppStageLabelSchema,
151 displayName: Schema.String,
152});
153
154export interface DesktopRuntimeInfo {
155 hostArch: DesktopRuntimeArch;
156 appArch: DesktopRuntimeArch;
157 runningUnderArm64Translation: boolean;
158}
159
160export const DesktopRuntimeInfoSchema = Schema.Struct({
161 hostArch: DesktopRuntimeArchSchema,
162 appArch: DesktopRuntimeArchSchema,
163 runningUnderArm64Translation: Schema.Boolean,
164});
165
166export interface DesktopUpdateState {
167 enabled: boolean;
168 status: DesktopUpdateStatus;
169 channel: DesktopUpdateChannel;
170 currentVersion: string;
171 hostArch: DesktopRuntimeArch;
172 appArch: DesktopRuntimeArch;
173 runningUnderArm64Translation: boolean;
174 availableVersion: string | null;
175 downloadedVersion: string | null;
176 downloadPercent: number | null;
177 checkedAt: string | null;
178 message: string | null;
179 errorContext: "check" | "download" | "install" | null;
180 canRetry: boolean;
181}
182
183export const DesktopUpdateStateSchema = Schema.Struct({
184 enabled: Schema.Boolean,
185 status: DesktopUpdateStatusSchema,
186 channel: DesktopUpdateChannelSchema,
187 currentVersion: Schema.String,
188 hostArch: DesktopRuntimeArchSchema,
189 appArch: DesktopRuntimeArchSchema,
190 runningUnderArm64Translation: Schema.Boolean,
191 availableVersion: Schema.NullOr(Schema.String),
192 downloadedVersion: Schema.NullOr(Schema.String),
193 downloadPercent: Schema.NullOr(Schema.Number),
194 checkedAt: Schema.NullOr(Schema.String),
195 message: Schema.NullOr(Schema.String),
196 errorContext: Schema.NullOr(Schema.Literals(["check", "download", "install"])),
197 canRetry: Schema.Boolean,
198});
199
200export interface DesktopUpdateActionResult {
201 accepted: boolean;
202 completed: boolean;
203 state: DesktopUpdateState;
204}
205
206export const DesktopUpdateActionResultSchema = Schema.Struct({
207 accepted: Schema.Boolean,
208 completed: Schema.Boolean,
209 state: DesktopUpdateStateSchema,
210});
211
212export interface DesktopUpdateCheckResult {
213 checked: boolean;
214 state: DesktopUpdateState;
215}
216
217export const DesktopUpdateCheckResultSchema = Schema.Struct({
218 checked: Schema.Boolean,
219 state: DesktopUpdateStateSchema,
220});
221
222export interface DesktopEnvironmentBootstrap {
223 label: string;
224 httpBaseUrl: string | null;
225 wsBaseUrl: string | null;
226 bootstrapToken?: string;
227}
228
229export const DesktopEnvironmentBootstrapSchema = Schema.Struct({
230 label: Schema.String,
231 httpBaseUrl: Schema.NullOr(Schema.String),
232 wsBaseUrl: Schema.NullOr(Schema.String),
233 bootstrapToken: Schema.optionalKey(Schema.String),
234});
235
236export const DesktopSshEnvironmentTargetSchema = Schema.Struct({
237 alias: Schema.String,
238 hostname: Schema.String,
239 username: Schema.NullOr(Schema.String),
240 port: Schema.NullOr(Schema.Number),
241});
242export type DesktopSshEnvironmentTarget = typeof DesktopSshEnvironmentTargetSchema.Type;
243
244export type DesktopSshHostSource = "ssh-config" | "known-hosts";
245export const DesktopSshHostSourceSchema = Schema.Literals(["ssh-config", "known-hosts"]);
246
247export interface DesktopDiscoveredSshHost extends DesktopSshEnvironmentTarget {
248 source: DesktopSshHostSource;
249}
250
251export const DesktopDiscoveredSshHostSchema = Schema.Struct({
252 alias: Schema.String,
253 hostname: Schema.String,
254 username: Schema.NullOr(Schema.String),
255 port: Schema.NullOr(Schema.Number),
256 source: DesktopSshHostSourceSchema,
257});
258
259export interface DesktopSshEnvironmentBootstrap {
260 target: DesktopSshEnvironmentTarget;
261 httpBaseUrl: string;
262 wsBaseUrl: string;
263 pairingToken: string | null;
264 remotePort?: number;
265 remoteServerKind?: "external" | "managed";
266}
267
268export const DesktopSshEnvironmentBootstrapSchema = Schema.Struct({
269 target: DesktopSshEnvironmentTargetSchema,
270 httpBaseUrl: Schema.String,
271 wsBaseUrl: Schema.String,
272 pairingToken: Schema.NullOr(Schema.String),
273 remotePort: Schema.optionalKey(Schema.Number),
274 remoteServerKind: Schema.optionalKey(Schema.Literals(["external", "managed"])),
275});
276
277export interface DesktopSshPasswordPromptRequest {
278 requestId: string;
279 destination: string;
280 username: string | null;
281 prompt: string;
282 expiresAt: string;
283}
284
285export const DesktopSshPasswordPromptRequestSchema = Schema.Struct({
286 requestId: Schema.String,
287 destination: Schema.String,
288 username: Schema.NullOr(Schema.String),
289 prompt: Schema.String,
290 expiresAt: Schema.String,
291});
292
293export const DesktopSshPasswordPromptCancelledType = "ssh-password-prompt-cancelled" as const;
294
295export const DesktopSshPasswordPromptCancelledResultSchema = Schema.Struct({
296 type: Schema.Literal(DesktopSshPasswordPromptCancelledType),
297 message: Schema.String,
298});
299
300export const DesktopSshEnvironmentEnsureOptionsSchema = Schema.Struct({
301 issuePairingToken: Schema.optionalKey(Schema.Boolean),
302});
303
304export const DesktopSshEnvironmentEnsureInputSchema = Schema.Struct({
305 target: DesktopSshEnvironmentTargetSchema,
306 options: Schema.optionalKey(DesktopSshEnvironmentEnsureOptionsSchema),
307});
308
309export const DesktopSshEnvironmentEnsureResultSchema = Schema.Union([
310 DesktopSshEnvironmentBootstrapSchema,
311 DesktopSshPasswordPromptCancelledResultSchema,
312]);
313
314export const DesktopSshHttpBaseUrlInputSchema = Schema.Struct({
315 httpBaseUrl: Schema.String,
316});
317
318export const DesktopSshBearerRequestInputSchema = Schema.Struct({
319 httpBaseUrl: Schema.String,
320 bearerToken: Schema.String,
321});
322
323export const DesktopSshBearerBootstrapInputSchema = Schema.Struct({
324 httpBaseUrl: Schema.String,
325 credential: Schema.String,
326});
327
328export const DesktopSshPasswordPromptResolutionInputSchema = Schema.Struct({
329 requestId: Schema.String,
330 password: Schema.NullOr(Schema.String),
331});
332
333export const PersistedSavedEnvironmentRecordSchema = Schema.Struct({
334 environmentId: EnvironmentId,
335 label: Schema.String,
336 wsBaseUrl: Schema.String,
337 httpBaseUrl: Schema.String,
338 createdAt: Schema.String,
339 lastConnectedAt: Schema.NullOr(Schema.String),
340 desktopSsh: Schema.optionalKey(DesktopSshEnvironmentTargetSchema),
341});
342export type PersistedSavedEnvironmentRecord = typeof PersistedSavedEnvironmentRecordSchema.Type;
343
344export type DesktopServerExposureMode = "local-only" | "network-accessible";
345
346export const DesktopServerExposureModeSchema = Schema.Literals([
347 "local-only",
348 "network-accessible",
349]);
350
351export interface DesktopServerExposureState {
352 mode: DesktopServerExposureMode;
353 endpointUrl: string | null;
354 advertisedHost: string | null;
355 tailscaleServeEnabled: boolean;
356 tailscaleServePort: number;
357}
358
359export const DesktopServerExposureStateSchema = Schema.Struct({
360 mode: DesktopServerExposureModeSchema,
361 endpointUrl: Schema.NullOr(Schema.String),
362 advertisedHost: Schema.NullOr(Schema.String),
363 tailscaleServeEnabled: Schema.Boolean,
364 tailscaleServePort: Schema.Number,
365});
366
367export interface PickFolderOptions {
368 initialPath?: string | null;
369}
370
371export const PickFolderOptionsSchema = Schema.Struct({
372 initialPath: Schema.optionalKey(Schema.NullOr(Schema.String)),
373});
374
375export interface DesktopBridge {
376 getAppBranding: () => DesktopAppBranding | null;
377 getLocalEnvironmentBootstrap: () => DesktopEnvironmentBootstrap | null;
378 getClientSettings: () => Promise<ClientSettings | null>;
379 setClientSettings: (settings: ClientSettings) => Promise<void>;
380 getSavedEnvironmentRegistry: () => Promise<readonly PersistedSavedEnvironmentRecord[]>;
381 setSavedEnvironmentRegistry: (
382 records: readonly PersistedSavedEnvironmentRecord[],
383 ) => Promise<void>;
384 getSavedEnvironmentSecret: (environmentId: EnvironmentId) => Promise<string | null>;
385 setSavedEnvironmentSecret: (environmentId: EnvironmentId, secret: string) => Promise<boolean>;
386 removeSavedEnvironmentSecret: (environmentId: EnvironmentId) => Promise<void>;
387 discoverSshHosts: () => Promise<readonly DesktopDiscoveredSshHost[]>;
388 ensureSshEnvironment: (
389 target: DesktopSshEnvironmentTarget,
390 options?: { issuePairingToken?: boolean },
391 ) => Promise<DesktopSshEnvironmentBootstrap>;
392 disconnectSshEnvironment: (target: DesktopSshEnvironmentTarget) => Promise<void>;
393 fetchSshEnvironmentDescriptor: (httpBaseUrl: string) => Promise<ExecutionEnvironmentDescriptor>;
394 bootstrapSshBearerSession: (
395 httpBaseUrl: string,
396 credential: string,
397 ) => Promise<AuthAccessTokenResult>;
398 fetchSshSessionState: (httpBaseUrl: string, bearerToken: string) => Promise<AuthSessionState>;
399 issueSshWebSocketTicket: (
400 httpBaseUrl: string,
401 bearerToken: string,
402 ) => Promise<AuthWebSocketTicketResult>;
403 onSshPasswordPrompt: (listener: (request: DesktopSshPasswordPromptRequest) => void) => () => void;
404 resolveSshPasswordPrompt: (requestId: string, password: string | null) => Promise<void>;
405 getServerExposureState: () => Promise<DesktopServerExposureState>;
406 setServerExposureMode: (mode: DesktopServerExposureMode) => Promise<DesktopServerExposureState>;
407 setTailscaleServeEnabled: (input: {
408 readonly enabled: boolean;
409 readonly port?: number;
410 }) => Promise<DesktopServerExposureState>;
411 getAdvertisedEndpoints: () => Promise<readonly AdvertisedEndpoint[]>;
412 pickFolder: (options?: PickFolderOptions) => Promise<string | null>;
413 confirm: (message: string) => Promise<boolean>;
414 setTheme: (theme: DesktopTheme) => Promise<void>;
415 showContextMenu: <T extends string>(
416 items: readonly ContextMenuItem<T>[],
417 position?: { x: number; y: number },
418 ) => Promise<T | null>;
419 openExternal: (url: string) => Promise<boolean>;
420 onMenuAction: (listener: (action: string) => void) => () => void;
421 getUpdateState: () => Promise<DesktopUpdateState>;
422 setUpdateChannel: (channel: DesktopUpdateChannel) => Promise<DesktopUpdateState>;
423 checkForUpdate: () => Promise<DesktopUpdateCheckResult>;
424 downloadUpdate: () => Promise<DesktopUpdateActionResult>;
425 installUpdate: () => Promise<DesktopUpdateActionResult>;
426 onUpdateState: (listener: (state: DesktopUpdateState) => void) => () => void;
427}
428
429/**
430 * APIs bound to the local app shell, not to any particular backend environment.
431 *
432 * These capabilities describe the desktop/browser host that the user is
433 * currently running: dialogs, editor/external-link opening, context menus, and
434 * app-level settings/config access. They must not be used as a proxy for
435 * "whatever environment the user is targeting", because in a multi-environment
436 * world the local shell and a selected backend environment are distinct
437 * concepts.
438 */
439export interface LocalApi {
440 dialogs: {
441 pickFolder: (options?: PickFolderOptions) => Promise<string | null>;
442 confirm: (message: string) => Promise<boolean>;
443 };
444 shell: {
445 openInEditor: (cwd: string, editor: EditorId) => Promise<void>;
446 openExternal: (url: string) => Promise<void>;
447 };
448 contextMenu: {
449 show: <T extends string>(
450 items: readonly ContextMenuItem<T>[],
451 position?: { x: number; y: number },
452 ) => Promise<T | null>;
453 };
454 persistence: {
455 getClientSettings: () => Promise<ClientSettings | null>;
456 setClientSettings: (settings: ClientSettings) => Promise<void>;
457 getSavedEnvironmentRegistry: () => Promise<readonly PersistedSavedEnvironmentRecord[]>;
458 setSavedEnvironmentRegistry: (
459 records: readonly PersistedSavedEnvironmentRecord[],
460 ) => Promise<void>;
461 getSavedEnvironmentSecret: (environmentId: EnvironmentId) => Promise<string | null>;
462 setSavedEnvironmentSecret: (environmentId: EnvironmentId, secret: string) => Promise<boolean>;
463 removeSavedEnvironmentSecret: (environmentId: EnvironmentId) => Promise<void>;
464 };
465 server: {
466 getConfig: () => Promise<ServerConfig>;
467 /**
468 * Refresh provider snapshots. When `input.instanceId` is supplied only that
469 * configured instance is probed; otherwise every configured instance is
470 * refreshed (legacy untargeted refresh).
471 */
472 refreshProviders: (input?: {
473 readonly instanceId?: ProviderInstanceId;
474 }) => Promise<ServerProviderUpdatedPayload>;
475 updateProvider: (input: ServerProviderUpdateInput) => Promise<ServerProviderUpdatedPayload>;
476 upsertKeybinding: (input: ServerUpsertKeybindingInput) => Promise<ServerUpsertKeybindingResult>;
477 removeKeybinding: (input: ServerRemoveKeybindingInput) => Promise<ServerRemoveKeybindingResult>;
478 getSettings: () => Promise<ServerSettings>;
479 updateSettings: (patch: ServerSettingsPatch) => Promise<ServerSettings>;
480 discoverSourceControl: () => Promise<SourceControlDiscoveryResult>;
481 getTraceDiagnostics: () => Promise<ServerTraceDiagnosticsResult>;
482 getProcessDiagnostics: () => Promise<ServerProcessDiagnosticsResult>;
483 getProcessResourceHistory: (
484 input: ServerProcessResourceHistoryInput,
485 ) => Promise<ServerProcessResourceHistoryResult>;
486 signalProcess: (input: ServerSignalProcessInput) => Promise<ServerSignalProcessResult>;
487 };
488}
489
490/**
491 * APIs bound to a specific backend environment connection.
492 *
493 * These operations must always be routed with explicit environment context.
494 * They represent remote stateful capabilities such as orchestration, terminal,
495 * project, VCS, and provider operations. In multi-environment mode, each environment gets
496 * its own instance of this surface, and callers should resolve it by
497 * `environmentId` rather than reaching through the local desktop bridge.
498 */
499export interface EnvironmentApi {
500 terminal: {
501 open: (input: typeof TerminalOpenInput.Encoded) => Promise<TerminalSessionSnapshot>;
502 attach: (
503 input: typeof TerminalAttachInput.Encoded,
504 callback: (event: TerminalAttachStreamEvent) => void,
505 options?: {
506 onResubscribe?: () => void;
507 },
508 ) => () => void;
509 write: (input: typeof TerminalWriteInput.Encoded) => Promise<void>;
510 resize: (input: typeof TerminalResizeInput.Encoded) => Promise<void>;
511 clear: (input: typeof TerminalClearInput.Encoded) => Promise<void>;
512 restart: (input: typeof TerminalRestartInput.Encoded) => Promise<TerminalSessionSnapshot>;
513 close: (input: typeof TerminalCloseInput.Encoded) => Promise<void>;
514 onMetadata: (
515 callback: (event: TerminalMetadataStreamEvent) => void,
516 options?: {
517 onResubscribe?: () => void;
518 },
519 ) => () => void;
520 };
521 projects: {
522 searchEntries: (input: ProjectSearchEntriesInput) => Promise<ProjectSearchEntriesResult>;
523 writeFile: (input: ProjectWriteFileInput) => Promise<ProjectWriteFileResult>;
524 };
525 filesystem: {
526 browse: (input: FilesystemBrowseInput) => Promise<FilesystemBrowseResult>;
527 };
528 sourceControl: {
529 lookupRepository: (
530 input: SourceControlRepositoryLookupInput,
531 ) => Promise<SourceControlRepositoryInfo>;
532 cloneRepository: (
533 input: SourceControlCloneRepositoryInput,
534 ) => Promise<SourceControlCloneRepositoryResult>;
535 publishRepository: (
536 input: SourceControlPublishRepositoryInput,
537 ) => Promise<SourceControlPublishRepositoryResult>;
538 };
539 vcs: {
540 listRefs: (input: VcsListRefsInput) => Promise<VcsListRefsResult>;
541 createWorktree: (input: VcsCreateWorktreeInput) => Promise<VcsCreateWorktreeResult>;
542 removeWorktree: (input: VcsRemoveWorktreeInput) => Promise<void>;
543 createRef: (input: VcsCreateRefInput) => Promise<VcsCreateRefResult>;
544 switchRef: (input: VcsSwitchRefInput) => Promise<VcsSwitchRefResult>;
545 init: (input: VcsInitInput) => Promise<void>;
546 pull: (input: VcsPullInput) => Promise<VcsPullResult>;
547 refreshStatus: (input: VcsStatusInput) => Promise<VcsStatusResult>;
548 onStatus: (
549 input: VcsStatusInput,
550 callback: (status: VcsStatusResult) => void,
551 options?: {
552 onResubscribe?: () => void;
553 },
554 ) => () => void;
555 };
556 git: {
557 resolvePullRequest: (input: GitPullRequestRefInput) => Promise<GitResolvePullRequestResult>;
558 preparePullRequestThread: (
559 input: GitPreparePullRequestThreadInput,
560 ) => Promise<GitPreparePullRequestThreadResult>;
561 };
562 review: {
563 getDiffPreview: (input: ReviewDiffPreviewInput) => Promise<ReviewDiffPreviewResult>;
564 };
565 orchestration: {
566 dispatchCommand: (command: ClientOrchestrationCommand) => Promise<{ sequence: number }>;
567 getTurnDiff: (input: OrchestrationGetTurnDiffInput) => Promise<OrchestrationGetTurnDiffResult>;
568 getFullThreadDiff: (
569 input: OrchestrationGetFullThreadDiffInput,
570 ) => Promise<OrchestrationGetFullThreadDiffResult>;
571 getArchivedShellSnapshot: () => Promise<OrchestrationShellSnapshot>;
572 subscribeShell: (
573 callback: (event: OrchestrationShellStreamItem) => void,
574 options?: {
575 onResubscribe?: () => void;
576 },
577 ) => () => void;
578 subscribeThread: (
579 input: OrchestrationSubscribeThreadInput,
580 callback: (event: OrchestrationThreadStreamItem) => void,
581 options?: {
582 onResubscribe?: () => void;
583 },
584 ) => () => void;
585 };
586}