@factory/droid-sdk 0.3.0 → 0.4.0
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/dist/index.cjs +1601 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +908 -13
- package/dist/index.d.ts +908 -13
- package/dist/index.js +1566 -70
- package/dist/index.js.map +1 -1
- package/docs/daemon-usage-guide.md +544 -0
- package/docs/sdk-usage-guide.md +103 -33
- package/examples/abort-session-stream.ts +4 -1
- package/examples/daemon-multi-session.ts +67 -0
- package/examples/droid-dev-structured-output.ts +1 -0
- package/examples/fork-session.ts +10 -3
- package/examples/hook-execution.ts +7 -1
- package/examples/init-metadata.ts +7 -2
- package/examples/interrupt-session.ts +7 -4
- package/examples/multi-turn-session.ts +7 -2
- package/examples/permission-handler.ts +1 -0
- package/examples/readme-structured-output.ts +1 -0
- package/examples/result-metadata.ts +1 -0
- package/examples/run.ts +1 -0
- package/examples/sdk-mcp-tool.ts +3 -1
- package/examples/session-stream.ts +4 -1
- package/examples/spec-mode-new-session.ts +1 -0
- package/examples/spec-mode-same-session.ts +1 -0
- package/examples/structured-output.ts +1 -0
- package/examples/test-compact.ts +4 -1
- package/examples/tool-controls.ts +1 -0
- package/package.json +3 -1
package/dist/index.d.cts
CHANGED
|
@@ -260,6 +260,10 @@ declare enum JsonRpcMessageType {
|
|
|
260
260
|
Response = "response",
|
|
261
261
|
Notification = "notification"
|
|
262
262
|
}
|
|
263
|
+
declare enum ServerRequestHandlerType {
|
|
264
|
+
Permission = "permission",
|
|
265
|
+
AskUser = "askUser"
|
|
266
|
+
}
|
|
263
267
|
/**
|
|
264
268
|
* Settings hierarchy level enum.
|
|
265
269
|
* Precedence order (highest to lowest): Org → Runtime → Folder → Project → User
|
|
@@ -288,7 +292,7 @@ declare const JSONRPC_VERSION: "2.0";
|
|
|
288
292
|
*/
|
|
289
293
|
declare const LEGACY_FACTORY_API_VERSION: "1.0.0";
|
|
290
294
|
/** Current Factory protocol version. */
|
|
291
|
-
declare const FACTORY_PROTOCOL_VERSION: "1.
|
|
295
|
+
declare const FACTORY_PROTOCOL_VERSION: "1.51.0";
|
|
292
296
|
/** HTTP header identifying the Factory client type. */
|
|
293
297
|
declare const FACTORY_CLIENT_HEADER: "X-Factory-Client";
|
|
294
298
|
/** HTTP header identifying the Factory client version. */
|
|
@@ -48680,6 +48684,78 @@ declare const GetContextStatsResultSchema: z.ZodObject<{
|
|
|
48680
48684
|
updatedAt: z.ZodString;
|
|
48681
48685
|
}, z.ZodTypeAny, "passthrough">>;
|
|
48682
48686
|
type GetContextStatsResult = z.infer<typeof GetContextStatsResultSchema>;
|
|
48687
|
+
declare const ContextBreakdownCategorySchema: z.ZodObject<{
|
|
48688
|
+
name: z.ZodString;
|
|
48689
|
+
tokens: z.ZodNumber;
|
|
48690
|
+
colorKey: z.ZodString;
|
|
48691
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
48692
|
+
name: z.ZodString;
|
|
48693
|
+
tokens: z.ZodNumber;
|
|
48694
|
+
colorKey: z.ZodString;
|
|
48695
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
48696
|
+
name: z.ZodString;
|
|
48697
|
+
tokens: z.ZodNumber;
|
|
48698
|
+
colorKey: z.ZodString;
|
|
48699
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
48700
|
+
declare const ContextBreakdownResultSchema: z.ZodObject<{
|
|
48701
|
+
modelId: z.ZodString;
|
|
48702
|
+
modelDisplayName: z.ZodString;
|
|
48703
|
+
contextBudget: z.ZodNumber;
|
|
48704
|
+
usedTokens: z.ZodNumber;
|
|
48705
|
+
freeTokens: z.ZodNumber;
|
|
48706
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
48707
|
+
name: z.ZodString;
|
|
48708
|
+
tokens: z.ZodNumber;
|
|
48709
|
+
colorKey: z.ZodString;
|
|
48710
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
48711
|
+
name: z.ZodString;
|
|
48712
|
+
tokens: z.ZodNumber;
|
|
48713
|
+
colorKey: z.ZodString;
|
|
48714
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
48715
|
+
name: z.ZodString;
|
|
48716
|
+
tokens: z.ZodNumber;
|
|
48717
|
+
colorKey: z.ZodString;
|
|
48718
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
48719
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
48720
|
+
modelId: z.ZodString;
|
|
48721
|
+
modelDisplayName: z.ZodString;
|
|
48722
|
+
contextBudget: z.ZodNumber;
|
|
48723
|
+
usedTokens: z.ZodNumber;
|
|
48724
|
+
freeTokens: z.ZodNumber;
|
|
48725
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
48726
|
+
name: z.ZodString;
|
|
48727
|
+
tokens: z.ZodNumber;
|
|
48728
|
+
colorKey: z.ZodString;
|
|
48729
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
48730
|
+
name: z.ZodString;
|
|
48731
|
+
tokens: z.ZodNumber;
|
|
48732
|
+
colorKey: z.ZodString;
|
|
48733
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
48734
|
+
name: z.ZodString;
|
|
48735
|
+
tokens: z.ZodNumber;
|
|
48736
|
+
colorKey: z.ZodString;
|
|
48737
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
48738
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
48739
|
+
modelId: z.ZodString;
|
|
48740
|
+
modelDisplayName: z.ZodString;
|
|
48741
|
+
contextBudget: z.ZodNumber;
|
|
48742
|
+
usedTokens: z.ZodNumber;
|
|
48743
|
+
freeTokens: z.ZodNumber;
|
|
48744
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
48745
|
+
name: z.ZodString;
|
|
48746
|
+
tokens: z.ZodNumber;
|
|
48747
|
+
colorKey: z.ZodString;
|
|
48748
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
48749
|
+
name: z.ZodString;
|
|
48750
|
+
tokens: z.ZodNumber;
|
|
48751
|
+
colorKey: z.ZodString;
|
|
48752
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
48753
|
+
name: z.ZodString;
|
|
48754
|
+
tokens: z.ZodNumber;
|
|
48755
|
+
colorKey: z.ZodString;
|
|
48756
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
48757
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
48758
|
+
type ContextBreakdownResult = z.infer<typeof ContextBreakdownResultSchema>;
|
|
48683
48759
|
declare const RenameSessionResultSchema: z.ZodObject<{
|
|
48684
48760
|
success: z.ZodBoolean;
|
|
48685
48761
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -91624,6 +91700,7 @@ declare function dispatchNotification(notification: Record<string, unknown>, lis
|
|
|
91624
91700
|
declare class ProtocolEngine {
|
|
91625
91701
|
private readonly _transport;
|
|
91626
91702
|
private readonly _defaultTimeout;
|
|
91703
|
+
private readonly _serverRequestMethodMap;
|
|
91627
91704
|
private readonly _pendingRequests;
|
|
91628
91705
|
private readonly _notificationListeners;
|
|
91629
91706
|
private _permissionHandler;
|
|
@@ -91633,6 +91710,12 @@ declare class ProtocolEngine {
|
|
|
91633
91710
|
constructor(options: {
|
|
91634
91711
|
transport: DroidClientTransport;
|
|
91635
91712
|
defaultTimeout?: number;
|
|
91713
|
+
/**
|
|
91714
|
+
* Maps incoming server-to-client request method strings to handler types.
|
|
91715
|
+
* Defaults to `{ 'droid.request_permission': 'permission', 'droid.ask_user': 'askUser' }`.
|
|
91716
|
+
* Override for daemon mode: `{ 'daemon.request_permission': 'permission', ... }`.
|
|
91717
|
+
*/
|
|
91718
|
+
serverRequestMethodMap?: Record<string, ServerRequestHandlerType>;
|
|
91636
91719
|
});
|
|
91637
91720
|
sendRequest(method: string, params: Record<string, unknown>, timeout?: number): Promise<unknown>;
|
|
91638
91721
|
onNotification(callback: NotificationCallback, filter?: NotificationFilter): () => void;
|
|
@@ -92077,7 +92160,15 @@ declare class SdkMcpServer {
|
|
|
92077
92160
|
}
|
|
92078
92161
|
declare function createSdkMcpServer(options: SdkMcpServerOptions): SdkMcpServer;
|
|
92079
92162
|
|
|
92163
|
+
interface MessageOptions {
|
|
92164
|
+
images?: Base64ImageSource[];
|
|
92165
|
+
files?: DocumentSource[];
|
|
92166
|
+
outputFormat?: OutputFormat;
|
|
92167
|
+
includePartialMessages?: boolean;
|
|
92168
|
+
abortSignal?: AbortSignal;
|
|
92169
|
+
}
|
|
92080
92170
|
interface TransportCreationOptions extends Pick<ProcessTransportOptions, 'execPath' | 'execArgs' | 'cwd' | 'env'> {
|
|
92171
|
+
apiKey: string;
|
|
92081
92172
|
transport?: DroidClientTransport;
|
|
92082
92173
|
}
|
|
92083
92174
|
interface HandlerOptions {
|
|
@@ -92085,6 +92176,7 @@ interface HandlerOptions {
|
|
|
92085
92176
|
askUserHandler?: ClientAskUserHandler;
|
|
92086
92177
|
}
|
|
92087
92178
|
interface SessionInitOptions extends ToolSelectionOverrides {
|
|
92179
|
+
apiKey: string;
|
|
92088
92180
|
cwd?: string;
|
|
92089
92181
|
machineId?: string;
|
|
92090
92182
|
modelId?: string;
|
|
@@ -92094,6 +92186,7 @@ interface SessionInitOptions extends ToolSelectionOverrides {
|
|
|
92094
92186
|
specModeModelId?: string;
|
|
92095
92187
|
specModeReasoningEffort?: ReasoningEffort;
|
|
92096
92188
|
mcpServers?: DroidMcpServerConfig[];
|
|
92189
|
+
sessionSource?: SessionSource;
|
|
92097
92190
|
tags?: SessionTag[];
|
|
92098
92191
|
}
|
|
92099
92192
|
|
|
@@ -92102,16 +92195,10 @@ type DroidResult = DroidResultMessage;
|
|
|
92102
92195
|
interface CreateSessionOptions extends SessionInitOptions, HandlerOptions, TransportCreationOptions {
|
|
92103
92196
|
abortSignal?: AbortSignal;
|
|
92104
92197
|
}
|
|
92105
|
-
interface ResumeSessionOptions extends Pick<CreateSessionOptions, 'execPath' | 'execArgs' | 'env' | 'permissionHandler' | 'askUserHandler' | 'transport' | 'abortSignal'> {
|
|
92198
|
+
interface ResumeSessionOptions extends Pick<CreateSessionOptions, 'apiKey' | 'execPath' | 'execArgs' | 'env' | 'permissionHandler' | 'askUserHandler' | 'transport' | 'abortSignal'> {
|
|
92106
92199
|
mcpServers?: DroidMcpServerConfig[];
|
|
92107
92200
|
}
|
|
92108
|
-
|
|
92109
|
-
images?: Base64ImageSource[];
|
|
92110
|
-
files?: DocumentSource[];
|
|
92111
|
-
outputFormat?: OutputFormat;
|
|
92112
|
-
includePartialMessages?: boolean;
|
|
92113
|
-
abortSignal?: AbortSignal;
|
|
92114
|
-
}
|
|
92201
|
+
|
|
92115
92202
|
/** Create instances via {@link createSession} or {@link resumeSession}. */
|
|
92116
92203
|
declare class DroidSession {
|
|
92117
92204
|
private _client;
|
|
@@ -92158,7 +92245,7 @@ declare class DroidSession {
|
|
|
92158
92245
|
onNotification(callback: NotificationCallback, filter?: NotificationFilter): () => void;
|
|
92159
92246
|
private _ensureNotClosed;
|
|
92160
92247
|
}
|
|
92161
|
-
declare function createSession(options
|
|
92248
|
+
declare function createSession(options: CreateSessionOptions): Promise<DroidSession>;
|
|
92162
92249
|
/**
|
|
92163
92250
|
* Resumes an existing Droid session.
|
|
92164
92251
|
*
|
|
@@ -92172,11 +92259,11 @@ declare function createSession(options?: CreateSessionOptions): Promise<DroidSes
|
|
|
92172
92259
|
*
|
|
92173
92260
|
* @throws {SessionNotFoundError} If the session ID does not exist.
|
|
92174
92261
|
*/
|
|
92175
|
-
declare function resumeSession(sessionId: string, options
|
|
92262
|
+
declare function resumeSession(sessionId: string, options: ResumeSessionOptions): Promise<DroidSession>;
|
|
92176
92263
|
|
|
92177
92264
|
interface RunOptions extends CreateSessionOptions, Omit<MessageOptions, 'includePartialMessages'> {
|
|
92178
92265
|
}
|
|
92179
|
-
declare function run(prompt: string, options
|
|
92266
|
+
declare function run(prompt: string, options: RunOptions): Promise<DroidResult>;
|
|
92180
92267
|
|
|
92181
92268
|
/**
|
|
92182
92269
|
* List droid sessions stored on disk.
|
|
@@ -92204,4 +92291,812 @@ declare function run(prompt: string, options?: RunOptions): Promise<DroidResult>
|
|
|
92204
92291
|
*/
|
|
92205
92292
|
declare function listSessions(options?: ListSessionsOptions): Promise<SessionMetadata[]>;
|
|
92206
92293
|
|
|
92207
|
-
export { type AddMcpServerRequest, type AddMcpServerRequestParams, AddMcpServerRequestParamsSchema, AddMcpServerRequestSchema, type AddMcpServerResponse, AddMcpServerResponseSchema, type AddMcpServerResult, AddMcpServerResultSchema, type AddUserMessageRequest, type AddUserMessageRequestParams, AddUserMessageRequestParamsSchema, AddUserMessageRequestSchema, type AddUserMessageResponse, AddUserMessageResponseSchema, type AddUserMessageResult, AddUserMessageResultSchema, type ApplyPatchToolConfirmationDetails, ApplyPatchToolConfirmationDetailsSchema, type AskUserCollectedAnswer, AskUserCollectedAnswerSchema, type AskUserConfirmationDetails, AskUserConfirmationDetailsSchema, type AskUserHandler, type AskUserQuestion, AskUserQuestionSchema, type AskUserRequest, type AskUserRequestParams, AskUserRequestParamsSchema, AskUserRequestSchema, type AskUserResponse, AskUserResponseSchema, type AskUserResult, AskUserResultSchema, type AssistantTextComplete, type AssistantTextCompleteNotification, AssistantTextCompleteNotificationSchema, type AssistantTextDelta, type AssistantTextDeltaNotification, AssistantTextDeltaNotificationSchema, type AuthenticateMcpServerRequest, type AuthenticateMcpServerRequestParams, AuthenticateMcpServerRequestParamsSchema, AuthenticateMcpServerRequestSchema, type AuthenticateMcpServerResponse, AuthenticateMcpServerResponseSchema, type AuthenticateMcpServerResult, AuthenticateMcpServerResultSchema, AutonomyLevel, AutonomyMode, type AvailableModelConfig, AvailableModelConfigSchema, type Base64ImageSource, Base64ImageSourceSchema, type BaseDroidHookInput, type BaseNotification, BaseNotificationSchema, type BaseRequest, BaseRequestSchema, type BaseResponseFailure, BaseResponseFailureSchema, type BaseResponseSuccess, BaseResponseSuccessSchema, COMPACTION_TIMEOUT, type CancelMcpAuthRequest, type CancelMcpAuthRequestParams, CancelMcpAuthRequestParamsSchema, CancelMcpAuthRequestSchema, type CancelMcpAuthResponse, CancelMcpAuthResponseSchema, type CancelMcpAuthResult, CancelMcpAuthResultSchema, type ClearMcpAuthRequest, type ClearMcpAuthRequestParams, ClearMcpAuthRequestParamsSchema, ClearMcpAuthRequestSchema, type ClearMcpAuthResponse, ClearMcpAuthResponseSchema, type ClearMcpAuthResult, ClearMcpAuthResultSchema, type CliRequestOrNotification, CliRequestOrNotificationSchema, type ClientAskUserHandler, type ClientPermissionHandler, type ClientRequest, ClientRequestSchema, type CloseSessionRequest, type CloseSessionRequestParams, CloseSessionRequestParamsSchema, CloseSessionRequestSchema, type CloseSessionResponse, CloseSessionResponseSchema, type CloseSessionResult, CloseSessionResultSchema, type CompactSessionRequest, type CompactSessionRequestParams, CompactSessionRequestParamsSchema, CompactSessionRequestSchema, type CompactSessionResponse, CompactSessionResponseSchema, type CompactSessionResult, CompactSessionResultSchema, ConnectionError, type ContentBlock, ContentBlockSchema, type ContextStats, ContextStatsAccuracy, ContextStatsSchema, type CreateMessage, type CreateMessageNotification, CreateMessageNotificationSchema, type CreateSessionOptions, type CreateToolConfirmationDetails, CreateToolConfirmationDetailsSchema, DEFAULT_REQUEST_TIMEOUT, DecompSessionType, type DiscoveredIssue, DiscoveredIssueSchema, type DismissalRecord, DismissalRecordSchema, DismissalType, type DocumentBlock, DocumentBlockSchema, type DocumentSource, DocumentSourceSchema, type DroidAssistantMessage, DroidClient, DroidClientMethod, type DroidClientOptions, type DroidClientTransport, type DroidErrorMessage, DroidErrorType, type DroidHookEvent, DroidHookEventSchema, type DroidHookExecutionResult, DroidHookExecutionResultSchema, type DroidHookInput, type DroidHookOutput, DroidHookOutputSchema, DroidHookSpecificOutputSchema, DroidInteractionMode, type DroidMcpServerConfig, type DroidMessage, DroidMessageType, type DroidPermissionMode, type DroidResult, type DroidResultMessage, DroidServerMethod, DroidSession, type DroidStreamEvent, type DroidStreamMessage, type DroidTool, type DroidToolCallMessage, type DroidToolResult, type DroidToolResultMessage, type DroidUserMessage, DroidWorkingState, type DroidWorkingStateChangedNotification, DroidWorkingStateChangedNotificationSchema, type EditToolConfirmationDetails, EditToolConfirmationDetailsSchema, type EmptyResult, EmptyResultSchema, type ErrorCallback, type ErrorDetail, ErrorDetailSchema, type ErrorEvent, type ErrorNotification, ErrorNotificationSchema, type ExecToolInfo, ExecToolInfoSchema, type ExecuteRewindRequest, type ExecuteRewindRequestParams, ExecuteRewindRequestParamsSchema, ExecuteRewindRequestSchema, type ExecuteRewindResponse, ExecuteRewindResponseSchema, type ExecuteRewindResult, ExecuteRewindResultSchema, type ExecuteToolConfirmationDetails, ExecuteToolConfirmationDetailsSchema, type ExitSpecModeConfirmationDetails, ExitSpecModeConfirmationDetailsSchema, FACTORY_CLIENT_HEADER, FACTORY_CLIENT_VERSION, FACTORY_PROTOCOL_VERSION, type FactoryDroidMessage, FactoryDroidMessageRole, FactoryDroidMessageSchema, FeatureStatus, FeatureSuccessState, FeatureSuccessStateSchema, type ForkSessionRequest, type ForkSessionRequestParams, ForkSessionRequestParamsSchema, ForkSessionRequestSchema, type ForkSessionResponse, ForkSessionResponseSchema, type ForkSessionResult, ForkSessionResultSchema, type GetContextStatsRequest, type GetContextStatsRequestParams, GetContextStatsRequestParamsSchema, GetContextStatsRequestSchema, type GetContextStatsResponse, GetContextStatsResponseSchema, type GetContextStatsResult, GetContextStatsResultSchema, type GetRewindInfoRequest, type GetRewindInfoRequestParams, GetRewindInfoRequestParamsSchema, GetRewindInfoRequestSchema, type GetRewindInfoResponse, GetRewindInfoResponseSchema, type GetRewindInfoResult, GetRewindInfoResultSchema, type GitRepoInfo, GitRepoInfoSchema, type Handoff, type HandoffItemsDismissedEntry, HandoffItemsDismissedEntrySchema, HandoffSchema, type HookCommand, HookCommandSchema, type HookExecution, type HookExecutionCompletedNotification, HookExecutionCompletedNotificationSchema, type HookExecutionStartedNotification, HookExecutionStartedNotificationSchema, type HookResult, HookResultSchema, type HttpHeader, HttpHeaderSchema, type HttpMcpConfig, HttpMcpConfigSchema, type ImageBlock, ImageBlockSchema, type InitializeSessionRequest, type InitializeSessionRequestParams, InitializeSessionRequestParamsSchema, InitializeSessionRequestSchema, type InitializeSessionResponse, InitializeSessionResponseSchema, type InitializeSessionResult, InitializeSessionResultSchema, type InteractiveCheck, InteractiveCheckSchema, type InterruptSessionRequest, type InterruptSessionRequestParams, InterruptSessionRequestParamsSchema, InterruptSessionRequestSchema, type InterruptSessionResponse, InterruptSessionResponseSchema, type InterruptSessionResult, InterruptSessionResultSchema, IssueSeverity, JSONRPC_VERSION, type JsonArray, JsonArraySchema, type JsonObject, JsonObjectSchema, type JsonPrimitive, type JsonRpcEnvelope, JsonRpcEnvelopeSchema, type JsonRpcError, JsonRpcErrorCode, JsonRpcErrorSchema, type JsonRpcMessage, JsonRpcMessageSchema, JsonRpcMessageType, type JsonRpcNotification, JsonRpcNotificationSchema, type JsonRpcRequest, JsonRpcRequestSchema, type JsonRpcResponse, type JsonRpcResponseFailure, JsonRpcResponseFailureSchema, JsonRpcResponseSchema, type JsonRpcResponseSuccess, JsonRpcResponseSuccessSchema, type JsonValue, JsonValueSchema, type KillWorkerSessionRequest, type KillWorkerSessionRequestParams, KillWorkerSessionRequestParamsSchema, KillWorkerSessionRequestSchema, type KillWorkerSessionResponse, KillWorkerSessionResponseSchema, type KillWorkerSessionResult, KillWorkerSessionResultSchema, LEGACY_FACTORY_API_VERSION, type ListMcpRegistryRequest, type ListMcpRegistryRequestParams, ListMcpRegistryRequestParamsSchema, ListMcpRegistryRequestSchema, type ListMcpRegistryResponse, ListMcpRegistryResponseSchema, type ListMcpRegistryResult, ListMcpRegistryResultSchema, type ListMcpServersRequest, type ListMcpServersRequestParams, ListMcpServersRequestParamsSchema, ListMcpServersRequestSchema, type ListMcpServersResponse, ListMcpServersResponseSchema, type ListMcpServersResult, ListMcpServersResultSchema, type ListMcpToolsRequest, type ListMcpToolsRequestParams, ListMcpToolsRequestParamsSchema, ListMcpToolsRequestSchema, type ListMcpToolsResponse, ListMcpToolsResponseSchema, type ListMcpToolsResult, ListMcpToolsResultSchema, type ListSessionsOptions, type ListSkillsRequest, type ListSkillsRequestParams, ListSkillsRequestParamsSchema, ListSkillsRequestSchema, type ListSkillsResponse, ListSkillsResponseSchema, type ListSkillsResult, ListSkillsResultSchema, type ListToolsRequest, type ListToolsRequestParams, ListToolsRequestParamsSchema, ListToolsRequestSchema, type ListToolsResponse, ListToolsResponseSchema, type ListToolsResult, ListToolsResultSchema, type LoadSessionRequest, type LoadSessionRequestParams, LoadSessionRequestParamsSchema, LoadSessionRequestSchema, type LoadSessionResponse, LoadSessionResponseSchema, type LoadSessionResult, LoadSessionResultSchema, MCP_AUTH_TIMEOUT, type McpAuthCompleted, type McpAuthCompletedNotification, McpAuthCompletedNotificationSchema, McpAuthOutcome, type McpAuthRequired, type McpAuthRequiredNotification, McpAuthRequiredNotificationSchema, type McpHttpServerConfigFields, McpHttpServerConfigFieldsSchema, type McpRegistryServer, McpRegistryServerSchema, type McpServerConfig, McpServerConfigSchema, McpServerStatus, type McpServerStatusInfo, McpServerStatusInfoSchema, McpServerType, type McpSseServerConfigFields, McpSseServerConfigFieldsSchema, McpStatus, type McpStatusChanged, type McpStatusChangedNotification, McpStatusChangedNotificationSchema, type McpStatusSummary, McpStatusSummarySchema, type McpStdioServerConfigFields, McpStdioServerConfigFieldsSchema, type McpToolConfirmationDetails, McpToolConfirmationDetailsSchema, type McpToolInfo, McpToolInfoSchema, type McpToolInputSchema, McpToolInputSchemaSchema, type MessageCallback, type MessageOptions, type MilestoneValidationTriggeredEntry, MilestoneValidationTriggeredEntrySchema, type MissionAcceptedEntry, MissionAcceptedEntrySchema, type MissionFeature, MissionFeatureSchema, type MissionFeaturesChanged, type MissionFeaturesChangedNotification, MissionFeaturesChangedNotificationSchema, type MissionHeartbeat, type MissionHeartbeatNotification, MissionHeartbeatNotificationSchema, type MissionPausedEntry, MissionPausedEntrySchema, type MissionProgressEntry, type MissionProgressEntryNotification, MissionProgressEntryNotificationSchema, type MissionResumedEntry, MissionResumedEntrySchema, type MissionRunStartedEntry, MissionRunStartedEntrySchema, type MissionSnapshot, MissionSnapshotSchema, MissionState, type MissionStateChanged, type MissionStateChangedNotification, MissionStateChangedNotificationSchema, type MissionWorkerCompleted, type MissionWorkerCompletedNotification, MissionWorkerCompletedNotificationSchema, type MissionWorkerStarted, type MissionWorkerStartedNotification, MissionWorkerStartedNotificationSchema, ModelProvider, type NotificationCallback, type NotificationFilter, type NotificationHookInput, type NotificationListener, type OutputFormat, OutputFormatSchema, OutputFormatType, type PermissionHandler, type PermissionResolved, type PermissionResolvedNotification, PermissionResolvedNotificationSchema, type PreCompactHookInput, ProcessExitError, ProcessTransport, type ProcessTransportOptions, type ProgressLogEntry, ProgressLogEntrySchema, ProgressLogEntryType, type ProposeMissionConfirmationDetails, ProposeMissionConfirmationDetailsSchema, ProtocolEngine, ProtocolError, REWIND_TIMEOUT, ReasoningEffort, type RedactedThinkingBlock, RedactedThinkingBlockSchema, type RemoveMcpServerRequest, type RemoveMcpServerRequestParams, RemoveMcpServerRequestParamsSchema, RemoveMcpServerRequestSchema, type RemoveMcpServerResponse, RemoveMcpServerResponseSchema, type RemoveMcpServerResult, RemoveMcpServerResultSchema, type RenameSessionRequest, type RenameSessionRequestParams, RenameSessionRequestParamsSchema, RenameSessionRequestSchema, type RenameSessionResponse, RenameSessionResponseSchema, type RenameSessionResult, RenameSessionResultSchema, type RequestPermissionHandlerResult, type RequestPermissionRequest, type RequestPermissionRequestParams, RequestPermissionRequestParamsSchema, RequestPermissionRequestSchema, type RequestPermissionResponse, RequestPermissionResponseSchema, type RequestPermissionResult, RequestPermissionResultSchema, type RequestPermissionSelection, type ResumeSessionOptions, type RewindEvictedFile, RewindEvictedFileSchema, type RewindFileCreation, RewindFileCreationSchema, type RewindFileSnapshot, RewindFileSnapshotSchema, type RunOptions, SDK_TAG, SDK_VERSION, SESSION_INIT_TIMEOUT, SdkMcpServer, type SdkMcpServerOptions, type SessionEndHookInput, SessionError, type SessionMetadata, SessionMetadataSchema, SessionNotFoundError, type SessionNotification, type SessionNotificationParams, SessionNotificationParamsSchema, type SessionNotificationPayload, SessionNotificationPayloadSchema, SessionNotificationSchema, SessionNotificationSchemaList, SessionNotificationType, type SessionSettings, type SessionSettingsFile, SessionSettingsFileSchema, SessionSettingsSchema, type SessionSource, SessionSourceSchema, type SessionStartEvent, SessionStartEventSchema, type SessionStartHookInput, type SessionTag, SessionTagSchema, type SessionTitleUpdated, type SessionTitleUpdatedNotification, SessionTitleUpdatedNotificationSchema, type SessionTokenUsageChangedNotification, SessionTokenUsageChangedNotificationSchema, SettingsLevel, type SettingsUpdated, type SettingsUpdatedNotification, SettingsUpdatedNotificationSchema, type SettingsUpdatedPayload, SettingsUpdatedPayloadSchema, type SkillDeviation, SkillDeviationSchema, type SkillFeedback, SkillFeedbackSchema, type SkillInfo, SkillInfoSchema, SkillLocation, type SkillResource, SkillResourceSchema, type SseMcpConfig, SseMcpConfigSchema, type StartMissionRunConfirmationDetails, StartMissionRunConfirmationDetailsSchema, type StdioMcpConfig, StdioMcpConfigSchema, type StopHookInput, StreamStateTracker, type StructuredOutput, type StructuredOutputError, StructuredOutputErrorSchema, type StructuredOutputFields, type StructuredOutputNotification, StructuredOutputNotificationSchema, type SubagentStopHookInput, type SubmitBugReportRequest, type SubmitBugReportRequestParams, SubmitBugReportRequestParamsSchema, SubmitBugReportRequestSchema, type SubmitBugReportResponse, SubmitBugReportResponseSchema, type SubmitBugReportResult, SubmitBugReportResultSchema, type SubmitMcpAuthCodeRequest, type SubmitMcpAuthCodeRequestParams, SubmitMcpAuthCodeRequestParamsSchema, SubmitMcpAuthCodeRequestSchema, type SubmitMcpAuthCodeResponse, SubmitMcpAuthCodeResponseSchema, type SubmitMcpAuthCodeResult, SubmitMcpAuthCodeResultSchema, type SuccessResult, SuccessResultSchema, type TestCase, TestCaseSchema, type TestFile, TestFileSchema, type Tests, TestsSchema, type TextBlock, TextBlockSchema, type ThinkingBlock, ThinkingBlockSchema, type ThinkingTextComplete, type ThinkingTextCompleteNotification, ThinkingTextCompleteNotificationSchema, type ThinkingTextDelta, type ThinkingTextDeltaNotification, ThinkingTextDeltaNotificationSchema, TimeoutError, type ToggleMcpServerRequest, type ToggleMcpServerRequestParams, ToggleMcpServerRequestParamsSchema, ToggleMcpServerRequestSchema, type ToggleMcpServerResponse, ToggleMcpServerResponseSchema, type ToggleMcpServerResult, ToggleMcpServerResultSchema, type ToggleMcpToolRequest, type ToggleMcpToolRequestParams, ToggleMcpToolRequestParamsSchema, ToggleMcpToolRequestSchema, type ToggleMcpToolResponse, ToggleMcpToolResponseSchema, type ToggleMcpToolResult, ToggleMcpToolResultSchema, type TokenUsage, TokenUsageSchema, type TokenUsageUpdate, type ToolCallDelta, type ToolCallNotification, ToolCallNotificationSchema, type ToolConfirmationDetails, ToolConfirmationDetailsSchema, type ToolConfirmationInfo, ToolConfirmationInfoSchema, type ToolConfirmationListItem, ToolConfirmationListItemSchema, ToolConfirmationOutcome, ToolConfirmationType, type ToolHookInput, type ToolProgress, type ToolProgressUpdate, type ToolProgressUpdateNotification, ToolProgressUpdateNotificationSchema, ToolProgressUpdateSchema, type ToolResult, type ToolResultBlock, ToolResultBlockSchema, type ToolResultNotification, ToolResultNotificationSchema, type ToolSelectionOverrides, ToolSelectionOverridesSchema, type ToolUse, type ToolUseBlock, ToolUseBlockSchema, ToolUseSchema, type TraceContextMeta, TraceContextMetaSchema, type UpdateSessionSettingsRequest, type UpdateSessionSettingsRequestParams, UpdateSessionSettingsRequestParamsSchema, UpdateSessionSettingsRequestSchema, type UpdateSessionSettingsResponse, UpdateSessionSettingsResponseSchema, type UpdateSessionSettingsResult, UpdateSessionSettingsResultSchema, type UserPromptSubmitHookInput, type Verification, type VerificationCommand, VerificationCommandSchema, VerificationSchema, type WorkerCompletedEntry, WorkerCompletedEntrySchema, type WorkerFailedEntry, WorkerFailedEntrySchema, type WorkerPausedEntry, WorkerPausedEntrySchema, type WorkerSelectedFeatureEntry, WorkerSelectedFeatureEntrySchema, type WorkerStartedEntry, WorkerStartedEntrySchema, type WorkerStateInfo, WorkerStateInfoSchema, type WorkingStateChanged, convertNotificationToStreamMessage, createResponseSchema, createSdkMcpServer, createSession, dispatchNotification, listSessions, resumeSession, run, tool };
|
|
92294
|
+
declare const MachineTemplateBuildStatusSchema: z.ZodObject<{
|
|
92295
|
+
status: z.ZodEnum<["building", "success", "failed"]>;
|
|
92296
|
+
failureReason: z.ZodOptional<z.ZodEnum<["setup_script_error", "system_error"]>>;
|
|
92297
|
+
buildStartedAt: z.ZodOptional<z.ZodNumber>;
|
|
92298
|
+
builtAt: z.ZodOptional<z.ZodNumber>;
|
|
92299
|
+
logs: z.ZodOptional<z.ZodString>;
|
|
92300
|
+
}, "strip", z.ZodTypeAny, {
|
|
92301
|
+
status: "failed" | "success" | "building";
|
|
92302
|
+
failureReason?: "setup_script_error" | "system_error" | undefined;
|
|
92303
|
+
buildStartedAt?: number | undefined;
|
|
92304
|
+
builtAt?: number | undefined;
|
|
92305
|
+
logs?: string | undefined;
|
|
92306
|
+
}, {
|
|
92307
|
+
status: "failed" | "success" | "building";
|
|
92308
|
+
failureReason?: "setup_script_error" | "system_error" | undefined;
|
|
92309
|
+
buildStartedAt?: number | undefined;
|
|
92310
|
+
builtAt?: number | undefined;
|
|
92311
|
+
logs?: string | undefined;
|
|
92312
|
+
}>;
|
|
92313
|
+
type MachineTemplateBuildStatus = z.infer<typeof MachineTemplateBuildStatusSchema>;
|
|
92314
|
+
declare const MachineTemplateSchema: z.ZodObject<{
|
|
92315
|
+
templateId: z.ZodString;
|
|
92316
|
+
repoUrl: z.ZodString;
|
|
92317
|
+
templateName: z.ZodString;
|
|
92318
|
+
defaultBranch: z.ZodString;
|
|
92319
|
+
createdBy: z.ZodString;
|
|
92320
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
92321
|
+
buildStatus: z.ZodOptional<z.ZodObject<{
|
|
92322
|
+
status: z.ZodEnum<["building", "success", "failed"]>;
|
|
92323
|
+
failureReason: z.ZodOptional<z.ZodEnum<["setup_script_error", "system_error"]>>;
|
|
92324
|
+
buildStartedAt: z.ZodOptional<z.ZodNumber>;
|
|
92325
|
+
builtAt: z.ZodOptional<z.ZodNumber>;
|
|
92326
|
+
logs: z.ZodOptional<z.ZodString>;
|
|
92327
|
+
}, "strip", z.ZodTypeAny, {
|
|
92328
|
+
status: "failed" | "success" | "building";
|
|
92329
|
+
failureReason?: "setup_script_error" | "system_error" | undefined;
|
|
92330
|
+
buildStartedAt?: number | undefined;
|
|
92331
|
+
builtAt?: number | undefined;
|
|
92332
|
+
logs?: string | undefined;
|
|
92333
|
+
}, {
|
|
92334
|
+
status: "failed" | "success" | "building";
|
|
92335
|
+
failureReason?: "setup_script_error" | "system_error" | undefined;
|
|
92336
|
+
buildStartedAt?: number | undefined;
|
|
92337
|
+
builtAt?: number | undefined;
|
|
92338
|
+
logs?: string | undefined;
|
|
92339
|
+
}>>;
|
|
92340
|
+
lastUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
92341
|
+
environmentVariables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
92342
|
+
key: z.ZodString;
|
|
92343
|
+
value: z.ZodString;
|
|
92344
|
+
}, "strip", z.ZodTypeAny, {
|
|
92345
|
+
value: string;
|
|
92346
|
+
key: string;
|
|
92347
|
+
}, {
|
|
92348
|
+
value: string;
|
|
92349
|
+
key: string;
|
|
92350
|
+
}>, "many">>;
|
|
92351
|
+
userEnvironmentVariablesByUser: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
92352
|
+
key: z.ZodString;
|
|
92353
|
+
value: z.ZodString;
|
|
92354
|
+
}, "strip", z.ZodTypeAny, {
|
|
92355
|
+
value: string;
|
|
92356
|
+
key: string;
|
|
92357
|
+
}, {
|
|
92358
|
+
value: string;
|
|
92359
|
+
key: string;
|
|
92360
|
+
}>, "many">>;
|
|
92361
|
+
setupScript: z.ZodOptional<z.ZodString>;
|
|
92362
|
+
}, "strip", z.ZodTypeAny, {
|
|
92363
|
+
templateId: string;
|
|
92364
|
+
repoUrl: string;
|
|
92365
|
+
templateName: string;
|
|
92366
|
+
defaultBranch: string;
|
|
92367
|
+
createdBy: string;
|
|
92368
|
+
createdAt?: number | undefined;
|
|
92369
|
+
buildStatus?: {
|
|
92370
|
+
status: "failed" | "success" | "building";
|
|
92371
|
+
failureReason?: "setup_script_error" | "system_error" | undefined;
|
|
92372
|
+
buildStartedAt?: number | undefined;
|
|
92373
|
+
builtAt?: number | undefined;
|
|
92374
|
+
logs?: string | undefined;
|
|
92375
|
+
} | undefined;
|
|
92376
|
+
lastUpdatedAt?: number | null | undefined;
|
|
92377
|
+
environmentVariables?: {
|
|
92378
|
+
value: string;
|
|
92379
|
+
key: string;
|
|
92380
|
+
}[] | undefined;
|
|
92381
|
+
userEnvironmentVariablesByUser?: {
|
|
92382
|
+
value: string;
|
|
92383
|
+
key: string;
|
|
92384
|
+
}[] | undefined;
|
|
92385
|
+
setupScript?: string | undefined;
|
|
92386
|
+
}, {
|
|
92387
|
+
templateId: string;
|
|
92388
|
+
repoUrl: string;
|
|
92389
|
+
templateName: string;
|
|
92390
|
+
defaultBranch: string;
|
|
92391
|
+
createdBy: string;
|
|
92392
|
+
createdAt?: number | undefined;
|
|
92393
|
+
buildStatus?: {
|
|
92394
|
+
status: "failed" | "success" | "building";
|
|
92395
|
+
failureReason?: "setup_script_error" | "system_error" | undefined;
|
|
92396
|
+
buildStartedAt?: number | undefined;
|
|
92397
|
+
builtAt?: number | undefined;
|
|
92398
|
+
logs?: string | undefined;
|
|
92399
|
+
} | undefined;
|
|
92400
|
+
lastUpdatedAt?: number | null | undefined;
|
|
92401
|
+
environmentVariables?: {
|
|
92402
|
+
value: string;
|
|
92403
|
+
key: string;
|
|
92404
|
+
}[] | undefined;
|
|
92405
|
+
userEnvironmentVariablesByUser?: {
|
|
92406
|
+
value: string;
|
|
92407
|
+
key: string;
|
|
92408
|
+
}[] | undefined;
|
|
92409
|
+
setupScript?: string | undefined;
|
|
92410
|
+
}>;
|
|
92411
|
+
type MachineTemplate = z.infer<typeof MachineTemplateSchema>;
|
|
92412
|
+
declare const MachineTemplateListResponseSchema: z.ZodObject<{
|
|
92413
|
+
templates: z.ZodArray<z.ZodObject<{
|
|
92414
|
+
templateId: z.ZodString;
|
|
92415
|
+
repoUrl: z.ZodString;
|
|
92416
|
+
templateName: z.ZodString;
|
|
92417
|
+
defaultBranch: z.ZodString;
|
|
92418
|
+
createdBy: z.ZodString;
|
|
92419
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
92420
|
+
buildStatus: z.ZodOptional<z.ZodObject<{
|
|
92421
|
+
status: z.ZodEnum<["building", "success", "failed"]>;
|
|
92422
|
+
failureReason: z.ZodOptional<z.ZodEnum<["setup_script_error", "system_error"]>>;
|
|
92423
|
+
buildStartedAt: z.ZodOptional<z.ZodNumber>;
|
|
92424
|
+
builtAt: z.ZodOptional<z.ZodNumber>;
|
|
92425
|
+
logs: z.ZodOptional<z.ZodString>;
|
|
92426
|
+
}, "strip", z.ZodTypeAny, {
|
|
92427
|
+
status: "failed" | "success" | "building";
|
|
92428
|
+
failureReason?: "setup_script_error" | "system_error" | undefined;
|
|
92429
|
+
buildStartedAt?: number | undefined;
|
|
92430
|
+
builtAt?: number | undefined;
|
|
92431
|
+
logs?: string | undefined;
|
|
92432
|
+
}, {
|
|
92433
|
+
status: "failed" | "success" | "building";
|
|
92434
|
+
failureReason?: "setup_script_error" | "system_error" | undefined;
|
|
92435
|
+
buildStartedAt?: number | undefined;
|
|
92436
|
+
builtAt?: number | undefined;
|
|
92437
|
+
logs?: string | undefined;
|
|
92438
|
+
}>>;
|
|
92439
|
+
lastUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
92440
|
+
environmentVariables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
92441
|
+
key: z.ZodString;
|
|
92442
|
+
value: z.ZodString;
|
|
92443
|
+
}, "strip", z.ZodTypeAny, {
|
|
92444
|
+
value: string;
|
|
92445
|
+
key: string;
|
|
92446
|
+
}, {
|
|
92447
|
+
value: string;
|
|
92448
|
+
key: string;
|
|
92449
|
+
}>, "many">>;
|
|
92450
|
+
userEnvironmentVariablesByUser: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
92451
|
+
key: z.ZodString;
|
|
92452
|
+
value: z.ZodString;
|
|
92453
|
+
}, "strip", z.ZodTypeAny, {
|
|
92454
|
+
value: string;
|
|
92455
|
+
key: string;
|
|
92456
|
+
}, {
|
|
92457
|
+
value: string;
|
|
92458
|
+
key: string;
|
|
92459
|
+
}>, "many">>;
|
|
92460
|
+
setupScript: z.ZodOptional<z.ZodString>;
|
|
92461
|
+
}, "strip", z.ZodTypeAny, {
|
|
92462
|
+
templateId: string;
|
|
92463
|
+
repoUrl: string;
|
|
92464
|
+
templateName: string;
|
|
92465
|
+
defaultBranch: string;
|
|
92466
|
+
createdBy: string;
|
|
92467
|
+
createdAt?: number | undefined;
|
|
92468
|
+
buildStatus?: {
|
|
92469
|
+
status: "failed" | "success" | "building";
|
|
92470
|
+
failureReason?: "setup_script_error" | "system_error" | undefined;
|
|
92471
|
+
buildStartedAt?: number | undefined;
|
|
92472
|
+
builtAt?: number | undefined;
|
|
92473
|
+
logs?: string | undefined;
|
|
92474
|
+
} | undefined;
|
|
92475
|
+
lastUpdatedAt?: number | null | undefined;
|
|
92476
|
+
environmentVariables?: {
|
|
92477
|
+
value: string;
|
|
92478
|
+
key: string;
|
|
92479
|
+
}[] | undefined;
|
|
92480
|
+
userEnvironmentVariablesByUser?: {
|
|
92481
|
+
value: string;
|
|
92482
|
+
key: string;
|
|
92483
|
+
}[] | undefined;
|
|
92484
|
+
setupScript?: string | undefined;
|
|
92485
|
+
}, {
|
|
92486
|
+
templateId: string;
|
|
92487
|
+
repoUrl: string;
|
|
92488
|
+
templateName: string;
|
|
92489
|
+
defaultBranch: string;
|
|
92490
|
+
createdBy: string;
|
|
92491
|
+
createdAt?: number | undefined;
|
|
92492
|
+
buildStatus?: {
|
|
92493
|
+
status: "failed" | "success" | "building";
|
|
92494
|
+
failureReason?: "setup_script_error" | "system_error" | undefined;
|
|
92495
|
+
buildStartedAt?: number | undefined;
|
|
92496
|
+
builtAt?: number | undefined;
|
|
92497
|
+
logs?: string | undefined;
|
|
92498
|
+
} | undefined;
|
|
92499
|
+
lastUpdatedAt?: number | null | undefined;
|
|
92500
|
+
environmentVariables?: {
|
|
92501
|
+
value: string;
|
|
92502
|
+
key: string;
|
|
92503
|
+
}[] | undefined;
|
|
92504
|
+
userEnvironmentVariablesByUser?: {
|
|
92505
|
+
value: string;
|
|
92506
|
+
key: string;
|
|
92507
|
+
}[] | undefined;
|
|
92508
|
+
setupScript?: string | undefined;
|
|
92509
|
+
}>, "many">;
|
|
92510
|
+
pagination: z.ZodObject<{
|
|
92511
|
+
hasMore: z.ZodBoolean;
|
|
92512
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
92513
|
+
}, "strip", z.ZodTypeAny, {
|
|
92514
|
+
hasMore: boolean;
|
|
92515
|
+
nextCursor: string | null;
|
|
92516
|
+
}, {
|
|
92517
|
+
hasMore: boolean;
|
|
92518
|
+
nextCursor: string | null;
|
|
92519
|
+
}>;
|
|
92520
|
+
}, "strip", z.ZodTypeAny, {
|
|
92521
|
+
templates: {
|
|
92522
|
+
templateId: string;
|
|
92523
|
+
repoUrl: string;
|
|
92524
|
+
templateName: string;
|
|
92525
|
+
defaultBranch: string;
|
|
92526
|
+
createdBy: string;
|
|
92527
|
+
createdAt?: number | undefined;
|
|
92528
|
+
buildStatus?: {
|
|
92529
|
+
status: "failed" | "success" | "building";
|
|
92530
|
+
failureReason?: "setup_script_error" | "system_error" | undefined;
|
|
92531
|
+
buildStartedAt?: number | undefined;
|
|
92532
|
+
builtAt?: number | undefined;
|
|
92533
|
+
logs?: string | undefined;
|
|
92534
|
+
} | undefined;
|
|
92535
|
+
lastUpdatedAt?: number | null | undefined;
|
|
92536
|
+
environmentVariables?: {
|
|
92537
|
+
value: string;
|
|
92538
|
+
key: string;
|
|
92539
|
+
}[] | undefined;
|
|
92540
|
+
userEnvironmentVariablesByUser?: {
|
|
92541
|
+
value: string;
|
|
92542
|
+
key: string;
|
|
92543
|
+
}[] | undefined;
|
|
92544
|
+
setupScript?: string | undefined;
|
|
92545
|
+
}[];
|
|
92546
|
+
pagination: {
|
|
92547
|
+
hasMore: boolean;
|
|
92548
|
+
nextCursor: string | null;
|
|
92549
|
+
};
|
|
92550
|
+
}, {
|
|
92551
|
+
templates: {
|
|
92552
|
+
templateId: string;
|
|
92553
|
+
repoUrl: string;
|
|
92554
|
+
templateName: string;
|
|
92555
|
+
defaultBranch: string;
|
|
92556
|
+
createdBy: string;
|
|
92557
|
+
createdAt?: number | undefined;
|
|
92558
|
+
buildStatus?: {
|
|
92559
|
+
status: "failed" | "success" | "building";
|
|
92560
|
+
failureReason?: "setup_script_error" | "system_error" | undefined;
|
|
92561
|
+
buildStartedAt?: number | undefined;
|
|
92562
|
+
builtAt?: number | undefined;
|
|
92563
|
+
logs?: string | undefined;
|
|
92564
|
+
} | undefined;
|
|
92565
|
+
lastUpdatedAt?: number | null | undefined;
|
|
92566
|
+
environmentVariables?: {
|
|
92567
|
+
value: string;
|
|
92568
|
+
key: string;
|
|
92569
|
+
}[] | undefined;
|
|
92570
|
+
userEnvironmentVariablesByUser?: {
|
|
92571
|
+
value: string;
|
|
92572
|
+
key: string;
|
|
92573
|
+
}[] | undefined;
|
|
92574
|
+
setupScript?: string | undefined;
|
|
92575
|
+
}[];
|
|
92576
|
+
pagination: {
|
|
92577
|
+
hasMore: boolean;
|
|
92578
|
+
nextCursor: string | null;
|
|
92579
|
+
};
|
|
92580
|
+
}>;
|
|
92581
|
+
type MachineTemplateListResponse = z.infer<typeof MachineTemplateListResponseSchema>;
|
|
92582
|
+
interface FactoryApiOptions {
|
|
92583
|
+
apiKey: string;
|
|
92584
|
+
baseUrl?: string;
|
|
92585
|
+
}
|
|
92586
|
+
interface ComputerApiOptions extends FactoryApiOptions {
|
|
92587
|
+
computerId: string;
|
|
92588
|
+
}
|
|
92589
|
+
interface ListMachineTemplatesOptions extends FactoryApiOptions {
|
|
92590
|
+
limit?: number;
|
|
92591
|
+
cursor?: string;
|
|
92592
|
+
}
|
|
92593
|
+
interface GetMachineTemplateOptions extends FactoryApiOptions {
|
|
92594
|
+
templateId: string;
|
|
92595
|
+
}
|
|
92596
|
+
declare const ComputerSchema: z.ZodObject<{
|
|
92597
|
+
id: z.ZodString;
|
|
92598
|
+
name: z.ZodString;
|
|
92599
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
92600
|
+
providerType: z.ZodEnum<["byom", "e2b"]>;
|
|
92601
|
+
status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
|
|
92602
|
+
createdAt: z.ZodNumber;
|
|
92603
|
+
relayClientUrl: z.ZodOptional<z.ZodString>;
|
|
92604
|
+
remoteUser: z.ZodOptional<z.ZodString>;
|
|
92605
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
92606
|
+
id: z.ZodString;
|
|
92607
|
+
name: z.ZodString;
|
|
92608
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
92609
|
+
providerType: z.ZodEnum<["byom", "e2b"]>;
|
|
92610
|
+
status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
|
|
92611
|
+
createdAt: z.ZodNumber;
|
|
92612
|
+
relayClientUrl: z.ZodOptional<z.ZodString>;
|
|
92613
|
+
remoteUser: z.ZodOptional<z.ZodString>;
|
|
92614
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
92615
|
+
id: z.ZodString;
|
|
92616
|
+
name: z.ZodString;
|
|
92617
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
92618
|
+
providerType: z.ZodEnum<["byom", "e2b"]>;
|
|
92619
|
+
status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
|
|
92620
|
+
createdAt: z.ZodNumber;
|
|
92621
|
+
relayClientUrl: z.ZodOptional<z.ZodString>;
|
|
92622
|
+
remoteUser: z.ZodOptional<z.ZodString>;
|
|
92623
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
92624
|
+
type Computer = z.infer<typeof ComputerSchema>;
|
|
92625
|
+
declare const ComputerListResponseSchema: z.ZodObject<{
|
|
92626
|
+
computers: z.ZodArray<z.ZodObject<{
|
|
92627
|
+
id: z.ZodString;
|
|
92628
|
+
name: z.ZodString;
|
|
92629
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
92630
|
+
providerType: z.ZodEnum<["byom", "e2b"]>;
|
|
92631
|
+
status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
|
|
92632
|
+
createdAt: z.ZodNumber;
|
|
92633
|
+
relayClientUrl: z.ZodOptional<z.ZodString>;
|
|
92634
|
+
remoteUser: z.ZodOptional<z.ZodString>;
|
|
92635
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
92636
|
+
id: z.ZodString;
|
|
92637
|
+
name: z.ZodString;
|
|
92638
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
92639
|
+
providerType: z.ZodEnum<["byom", "e2b"]>;
|
|
92640
|
+
status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
|
|
92641
|
+
createdAt: z.ZodNumber;
|
|
92642
|
+
relayClientUrl: z.ZodOptional<z.ZodString>;
|
|
92643
|
+
remoteUser: z.ZodOptional<z.ZodString>;
|
|
92644
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
92645
|
+
id: z.ZodString;
|
|
92646
|
+
name: z.ZodString;
|
|
92647
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
92648
|
+
providerType: z.ZodEnum<["byom", "e2b"]>;
|
|
92649
|
+
status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
|
|
92650
|
+
createdAt: z.ZodNumber;
|
|
92651
|
+
relayClientUrl: z.ZodOptional<z.ZodString>;
|
|
92652
|
+
remoteUser: z.ZodOptional<z.ZodString>;
|
|
92653
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
92654
|
+
}, "strip", z.ZodTypeAny, {
|
|
92655
|
+
computers: z.objectOutputType<{
|
|
92656
|
+
id: z.ZodString;
|
|
92657
|
+
name: z.ZodString;
|
|
92658
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
92659
|
+
providerType: z.ZodEnum<["byom", "e2b"]>;
|
|
92660
|
+
status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
|
|
92661
|
+
createdAt: z.ZodNumber;
|
|
92662
|
+
relayClientUrl: z.ZodOptional<z.ZodString>;
|
|
92663
|
+
remoteUser: z.ZodOptional<z.ZodString>;
|
|
92664
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
92665
|
+
}, {
|
|
92666
|
+
computers: z.objectInputType<{
|
|
92667
|
+
id: z.ZodString;
|
|
92668
|
+
name: z.ZodString;
|
|
92669
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
92670
|
+
providerType: z.ZodEnum<["byom", "e2b"]>;
|
|
92671
|
+
status: z.ZodOptional<z.ZodEnum<["provisioning", "active", "error"]>>;
|
|
92672
|
+
createdAt: z.ZodNumber;
|
|
92673
|
+
relayClientUrl: z.ZodOptional<z.ZodString>;
|
|
92674
|
+
remoteUser: z.ZodOptional<z.ZodString>;
|
|
92675
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
92676
|
+
}>;
|
|
92677
|
+
type ComputerListResponse = z.infer<typeof ComputerListResponseSchema>;
|
|
92678
|
+
interface ListComputersOptions extends FactoryApiOptions {
|
|
92679
|
+
}
|
|
92680
|
+
interface GetComputerOptions extends ComputerApiOptions {
|
|
92681
|
+
}
|
|
92682
|
+
interface CreateComputerOptions extends FactoryApiOptions {
|
|
92683
|
+
name: string;
|
|
92684
|
+
remoteUser: string;
|
|
92685
|
+
provider?: 'byom' | 'e2b';
|
|
92686
|
+
hostId?: string;
|
|
92687
|
+
repos?: string[];
|
|
92688
|
+
autoInstallDeps?: boolean;
|
|
92689
|
+
serviceAccountId?: string;
|
|
92690
|
+
}
|
|
92691
|
+
interface GetComputerByNameOptions extends FactoryApiOptions {
|
|
92692
|
+
name: string;
|
|
92693
|
+
}
|
|
92694
|
+
interface UpdateComputerOptions extends ComputerApiOptions {
|
|
92695
|
+
name?: string;
|
|
92696
|
+
remoteUser?: string;
|
|
92697
|
+
hostId?: string;
|
|
92698
|
+
}
|
|
92699
|
+
interface DeleteComputerOptions extends ComputerApiOptions {
|
|
92700
|
+
}
|
|
92701
|
+
interface RestartComputerOptions extends ComputerApiOptions {
|
|
92702
|
+
}
|
|
92703
|
+
interface RefreshComputerOptions extends ComputerApiOptions {
|
|
92704
|
+
}
|
|
92705
|
+
declare const RefreshComputerResponseSchema: z.ZodObject<{
|
|
92706
|
+
configured: z.ZodNumber;
|
|
92707
|
+
}, "strip", z.ZodTypeAny, {
|
|
92708
|
+
configured: number;
|
|
92709
|
+
}, {
|
|
92710
|
+
configured: number;
|
|
92711
|
+
}>;
|
|
92712
|
+
type RefreshComputerResponse = z.infer<typeof RefreshComputerResponseSchema>;
|
|
92713
|
+
declare const ComputerMetricSchema: z.ZodObject<{
|
|
92714
|
+
timestamp: z.ZodString;
|
|
92715
|
+
cpuUsedPct: z.ZodNumber;
|
|
92716
|
+
cpuCount: z.ZodNumber;
|
|
92717
|
+
memUsed: z.ZodNumber;
|
|
92718
|
+
memTotal: z.ZodNumber;
|
|
92719
|
+
diskUsed: z.ZodNumber;
|
|
92720
|
+
diskTotal: z.ZodNumber;
|
|
92721
|
+
}, "strip", z.ZodTypeAny, {
|
|
92722
|
+
timestamp: string;
|
|
92723
|
+
cpuUsedPct: number;
|
|
92724
|
+
cpuCount: number;
|
|
92725
|
+
memUsed: number;
|
|
92726
|
+
memTotal: number;
|
|
92727
|
+
diskUsed: number;
|
|
92728
|
+
diskTotal: number;
|
|
92729
|
+
}, {
|
|
92730
|
+
timestamp: string;
|
|
92731
|
+
cpuUsedPct: number;
|
|
92732
|
+
cpuCount: number;
|
|
92733
|
+
memUsed: number;
|
|
92734
|
+
memTotal: number;
|
|
92735
|
+
diskUsed: number;
|
|
92736
|
+
diskTotal: number;
|
|
92737
|
+
}>;
|
|
92738
|
+
type ComputerMetric = z.infer<typeof ComputerMetricSchema>;
|
|
92739
|
+
declare const ComputerMetricsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
92740
|
+
timestamp: z.ZodString;
|
|
92741
|
+
cpuUsedPct: z.ZodNumber;
|
|
92742
|
+
cpuCount: z.ZodNumber;
|
|
92743
|
+
memUsed: z.ZodNumber;
|
|
92744
|
+
memTotal: z.ZodNumber;
|
|
92745
|
+
diskUsed: z.ZodNumber;
|
|
92746
|
+
diskTotal: z.ZodNumber;
|
|
92747
|
+
}, "strip", z.ZodTypeAny, {
|
|
92748
|
+
timestamp: string;
|
|
92749
|
+
cpuUsedPct: number;
|
|
92750
|
+
cpuCount: number;
|
|
92751
|
+
memUsed: number;
|
|
92752
|
+
memTotal: number;
|
|
92753
|
+
diskUsed: number;
|
|
92754
|
+
diskTotal: number;
|
|
92755
|
+
}, {
|
|
92756
|
+
timestamp: string;
|
|
92757
|
+
cpuUsedPct: number;
|
|
92758
|
+
cpuCount: number;
|
|
92759
|
+
memUsed: number;
|
|
92760
|
+
memTotal: number;
|
|
92761
|
+
diskUsed: number;
|
|
92762
|
+
diskTotal: number;
|
|
92763
|
+
}>, "many">;
|
|
92764
|
+
type ComputerMetricsResponse = z.infer<typeof ComputerMetricsResponseSchema>;
|
|
92765
|
+
interface GetComputerMetricsOptions extends ComputerApiOptions {
|
|
92766
|
+
start?: string;
|
|
92767
|
+
}
|
|
92768
|
+
interface RetryInstallDepsOptions extends ComputerApiOptions {
|
|
92769
|
+
}
|
|
92770
|
+
declare const RemoteSessionSchema: z.ZodObject<{
|
|
92771
|
+
sessionId: z.ZodString;
|
|
92772
|
+
title: z.ZodOptional<z.ZodString>;
|
|
92773
|
+
status: z.ZodEnum<["idle", "pending", "running"]>;
|
|
92774
|
+
messageCount: z.ZodNumber;
|
|
92775
|
+
createdAt: z.ZodNumber;
|
|
92776
|
+
updatedAt: z.ZodNumber;
|
|
92777
|
+
completedAt: z.ZodOptional<z.ZodNumber>;
|
|
92778
|
+
computerId: z.ZodOptional<z.ZodString>;
|
|
92779
|
+
}, "strip", z.ZodTypeAny, {
|
|
92780
|
+
status: "idle" | "running" | "pending";
|
|
92781
|
+
createdAt: number;
|
|
92782
|
+
updatedAt: number;
|
|
92783
|
+
sessionId: string;
|
|
92784
|
+
messageCount: number;
|
|
92785
|
+
title?: string | undefined;
|
|
92786
|
+
completedAt?: number | undefined;
|
|
92787
|
+
computerId?: string | undefined;
|
|
92788
|
+
}, {
|
|
92789
|
+
status: "idle" | "running" | "pending";
|
|
92790
|
+
createdAt: number;
|
|
92791
|
+
updatedAt: number;
|
|
92792
|
+
sessionId: string;
|
|
92793
|
+
messageCount: number;
|
|
92794
|
+
title?: string | undefined;
|
|
92795
|
+
completedAt?: number | undefined;
|
|
92796
|
+
computerId?: string | undefined;
|
|
92797
|
+
}>;
|
|
92798
|
+
type RemoteSession = z.infer<typeof RemoteSessionSchema>;
|
|
92799
|
+
declare const RemoteSessionListResponseSchema: z.ZodObject<{
|
|
92800
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
92801
|
+
sessionId: z.ZodString;
|
|
92802
|
+
title: z.ZodOptional<z.ZodString>;
|
|
92803
|
+
status: z.ZodEnum<["idle", "pending", "running"]>;
|
|
92804
|
+
messageCount: z.ZodNumber;
|
|
92805
|
+
createdAt: z.ZodNumber;
|
|
92806
|
+
updatedAt: z.ZodNumber;
|
|
92807
|
+
completedAt: z.ZodOptional<z.ZodNumber>;
|
|
92808
|
+
computerId: z.ZodOptional<z.ZodString>;
|
|
92809
|
+
}, "strip", z.ZodTypeAny, {
|
|
92810
|
+
status: "idle" | "running" | "pending";
|
|
92811
|
+
createdAt: number;
|
|
92812
|
+
updatedAt: number;
|
|
92813
|
+
sessionId: string;
|
|
92814
|
+
messageCount: number;
|
|
92815
|
+
title?: string | undefined;
|
|
92816
|
+
completedAt?: number | undefined;
|
|
92817
|
+
computerId?: string | undefined;
|
|
92818
|
+
}, {
|
|
92819
|
+
status: "idle" | "running" | "pending";
|
|
92820
|
+
createdAt: number;
|
|
92821
|
+
updatedAt: number;
|
|
92822
|
+
sessionId: string;
|
|
92823
|
+
messageCount: number;
|
|
92824
|
+
title?: string | undefined;
|
|
92825
|
+
completedAt?: number | undefined;
|
|
92826
|
+
computerId?: string | undefined;
|
|
92827
|
+
}>, "many">;
|
|
92828
|
+
pagination: z.ZodObject<{
|
|
92829
|
+
hasMore: z.ZodBoolean;
|
|
92830
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
92831
|
+
}, "strip", z.ZodTypeAny, {
|
|
92832
|
+
hasMore: boolean;
|
|
92833
|
+
nextCursor: string | null;
|
|
92834
|
+
}, {
|
|
92835
|
+
hasMore: boolean;
|
|
92836
|
+
nextCursor: string | null;
|
|
92837
|
+
}>;
|
|
92838
|
+
}, "strip", z.ZodTypeAny, {
|
|
92839
|
+
sessions: {
|
|
92840
|
+
status: "idle" | "running" | "pending";
|
|
92841
|
+
createdAt: number;
|
|
92842
|
+
updatedAt: number;
|
|
92843
|
+
sessionId: string;
|
|
92844
|
+
messageCount: number;
|
|
92845
|
+
title?: string | undefined;
|
|
92846
|
+
completedAt?: number | undefined;
|
|
92847
|
+
computerId?: string | undefined;
|
|
92848
|
+
}[];
|
|
92849
|
+
pagination: {
|
|
92850
|
+
hasMore: boolean;
|
|
92851
|
+
nextCursor: string | null;
|
|
92852
|
+
};
|
|
92853
|
+
}, {
|
|
92854
|
+
sessions: {
|
|
92855
|
+
status: "idle" | "running" | "pending";
|
|
92856
|
+
createdAt: number;
|
|
92857
|
+
updatedAt: number;
|
|
92858
|
+
sessionId: string;
|
|
92859
|
+
messageCount: number;
|
|
92860
|
+
title?: string | undefined;
|
|
92861
|
+
completedAt?: number | undefined;
|
|
92862
|
+
computerId?: string | undefined;
|
|
92863
|
+
}[];
|
|
92864
|
+
pagination: {
|
|
92865
|
+
hasMore: boolean;
|
|
92866
|
+
nextCursor: string | null;
|
|
92867
|
+
};
|
|
92868
|
+
}>;
|
|
92869
|
+
type RemoteSessionListResponse = z.infer<typeof RemoteSessionListResponseSchema>;
|
|
92870
|
+
interface ListRemoteSessionsOptions extends FactoryApiOptions {
|
|
92871
|
+
computerId?: string;
|
|
92872
|
+
limit?: number;
|
|
92873
|
+
cursor?: string;
|
|
92874
|
+
}
|
|
92875
|
+
|
|
92876
|
+
declare function listMachineTemplates(options: ListMachineTemplatesOptions): Promise<MachineTemplateListResponse>;
|
|
92877
|
+
declare function getMachineTemplate(options: GetMachineTemplateOptions): Promise<MachineTemplate>;
|
|
92878
|
+
declare function listComputers(options: ListComputersOptions): Promise<ComputerListResponse>;
|
|
92879
|
+
declare function getComputer(options: GetComputerOptions): Promise<Computer>;
|
|
92880
|
+
declare function createComputer(options: CreateComputerOptions): Promise<Computer>;
|
|
92881
|
+
declare function getComputerByName(options: GetComputerByNameOptions): Promise<Computer>;
|
|
92882
|
+
declare function updateComputer(options: UpdateComputerOptions): Promise<Computer>;
|
|
92883
|
+
declare function deleteComputer(options: DeleteComputerOptions): Promise<void>;
|
|
92884
|
+
declare function restartComputer(options: RestartComputerOptions): Promise<void>;
|
|
92885
|
+
declare function refreshComputer(options: RefreshComputerOptions): Promise<RefreshComputerResponse>;
|
|
92886
|
+
declare function getComputerMetrics(options: GetComputerMetricsOptions): Promise<ComputerMetricsResponse>;
|
|
92887
|
+
declare function retryInstallDeps(options: RetryInstallDepsOptions): Promise<Computer>;
|
|
92888
|
+
declare function listRemoteSessions(options: ListRemoteSessionsOptions): Promise<RemoteSessionListResponse>;
|
|
92889
|
+
|
|
92890
|
+
type DaemonClientPermissionHandler = PermissionHandler;
|
|
92891
|
+
type DaemonClientAskUserHandler = AskUserHandler;
|
|
92892
|
+
interface DaemonClientOptions {
|
|
92893
|
+
transport: DroidClientTransport;
|
|
92894
|
+
apiKey: string;
|
|
92895
|
+
}
|
|
92896
|
+
declare class DaemonClient {
|
|
92897
|
+
private readonly _engine;
|
|
92898
|
+
private readonly _apiKey;
|
|
92899
|
+
private _sessionId;
|
|
92900
|
+
private _closed;
|
|
92901
|
+
private readonly _notificationListeners;
|
|
92902
|
+
private _permissionHandler;
|
|
92903
|
+
private _askUserHandler;
|
|
92904
|
+
constructor(options: DaemonClientOptions);
|
|
92905
|
+
get sessionId(): string | null;
|
|
92906
|
+
get isConnected(): boolean;
|
|
92907
|
+
initializeSession(params: InitializeSessionRequestParams): Promise<InitializeSessionResult>;
|
|
92908
|
+
loadSession(params: LoadSessionRequestParams): Promise<LoadSessionResult>;
|
|
92909
|
+
addUserMessage(params: Pick<AddUserMessageRequestParams, 'text'> & Partial<Pick<AddUserMessageRequestParams, 'images' | 'files' | 'messageId' | 'outputFormat'>>): Promise<AddUserMessageResult>;
|
|
92910
|
+
interruptSession(): Promise<InterruptSessionResult>;
|
|
92911
|
+
closeSession(params?: CloseSessionRequestParams): Promise<CloseSessionResult>;
|
|
92912
|
+
updateSessionSettings(params: Partial<UpdateSessionSettingsRequestParams>): Promise<UpdateSessionSettingsResult>;
|
|
92913
|
+
compactSession(params?: CompactSessionRequestParams): Promise<CompactSessionResult>;
|
|
92914
|
+
forkSession(): Promise<ForkSessionResult>;
|
|
92915
|
+
getContextBreakdown(): Promise<ContextBreakdownResult>;
|
|
92916
|
+
renameSession(params: RenameSessionRequestParams): Promise<RenameSessionResult>;
|
|
92917
|
+
getRewindInfo(params: GetRewindInfoRequestParams): Promise<GetRewindInfoResult>;
|
|
92918
|
+
executeRewind(params: ExecuteRewindRequestParams): Promise<ExecuteRewindResult>;
|
|
92919
|
+
addMcpServer(params: AddMcpServerRequestParams): Promise<AddMcpServerResult>;
|
|
92920
|
+
removeMcpServer(params: RemoveMcpServerRequestParams): Promise<RemoveMcpServerResult>;
|
|
92921
|
+
toggleMcpServer(params: ToggleMcpServerRequestParams): Promise<ToggleMcpServerResult>;
|
|
92922
|
+
listMcpServers(): Promise<ListMcpServersResult>;
|
|
92923
|
+
listMcpTools(): Promise<ListMcpToolsResult>;
|
|
92924
|
+
authenticateMcpServer(params: AuthenticateMcpServerRequestParams): Promise<AuthenticateMcpServerResult>;
|
|
92925
|
+
listSkills(): Promise<ListSkillsResult>;
|
|
92926
|
+
onNotification(callback: NotificationCallback, filter?: NotificationFilter): () => void;
|
|
92927
|
+
setPermissionHandler(handler: DaemonClientPermissionHandler): void;
|
|
92928
|
+
setAskUserHandler(handler: DaemonClientAskUserHandler): void;
|
|
92929
|
+
close(): Promise<void>;
|
|
92930
|
+
private _rpc;
|
|
92931
|
+
private _sessionRpc;
|
|
92932
|
+
private _dispatchPermissionRequest;
|
|
92933
|
+
private _dispatchAskUserRequest;
|
|
92934
|
+
private _ensureNotClosed;
|
|
92935
|
+
private _ensureSession;
|
|
92936
|
+
}
|
|
92937
|
+
|
|
92938
|
+
declare enum MachineType {
|
|
92939
|
+
Local = "local",
|
|
92940
|
+
Computer = "computer"
|
|
92941
|
+
}
|
|
92942
|
+
type SDKMachineConfig = {
|
|
92943
|
+
type: MachineType.Local;
|
|
92944
|
+
} | {
|
|
92945
|
+
type: MachineType.Computer;
|
|
92946
|
+
computerId: string;
|
|
92947
|
+
};
|
|
92948
|
+
interface ConnectDaemonOptions {
|
|
92949
|
+
/** Factory API key for authentication. */
|
|
92950
|
+
apiKey: string;
|
|
92951
|
+
/** Machine to connect to. Defaults to local daemon if omitted. */
|
|
92952
|
+
machine?: SDKMachineConfig;
|
|
92953
|
+
/** Direct WebSocket URL. Overrides machine-based URL resolution. */
|
|
92954
|
+
url?: string;
|
|
92955
|
+
/** Connection retry budget for the connect+authenticate cycle. */
|
|
92956
|
+
maxRetries?: number;
|
|
92957
|
+
/** Local daemon WebSocket port. Default: 37643. */
|
|
92958
|
+
daemonPort?: number;
|
|
92959
|
+
/** Factory relay base URL for computer connections. Default: wss://relay.factory.ai */
|
|
92960
|
+
relayBaseUrl?: string;
|
|
92961
|
+
/** Factory API base URL. Default: https://api.factory.ai */
|
|
92962
|
+
baseUrl?: string;
|
|
92963
|
+
}
|
|
92964
|
+
interface DaemonSessionOptions extends ToolSelectionOverrides {
|
|
92965
|
+
cwd?: string;
|
|
92966
|
+
modelId?: string;
|
|
92967
|
+
autonomyLevel?: AutonomyLevel;
|
|
92968
|
+
interactionMode?: DroidInteractionMode;
|
|
92969
|
+
reasoningEffort?: ReasoningEffort;
|
|
92970
|
+
specModeModelId?: string;
|
|
92971
|
+
specModeReasoningEffort?: ReasoningEffort;
|
|
92972
|
+
mcpServers?: DroidMcpServerConfig[];
|
|
92973
|
+
tags?: SessionTag[];
|
|
92974
|
+
/** Permission handler for tool confirmations. */
|
|
92975
|
+
permissionHandler?: ClientPermissionHandler;
|
|
92976
|
+
/** Handler for ask-user requests from the agent. */
|
|
92977
|
+
askUserHandler?: ClientAskUserHandler;
|
|
92978
|
+
/** Where this session was created from. Used for attribution. */
|
|
92979
|
+
sessionSource?: SessionSource;
|
|
92980
|
+
}
|
|
92981
|
+
interface DaemonResumeOptions {
|
|
92982
|
+
/** Permission handler for tool confirmations. */
|
|
92983
|
+
permissionHandler?: ClientPermissionHandler;
|
|
92984
|
+
/** Handler for ask-user requests from the agent. */
|
|
92985
|
+
askUserHandler?: ClientAskUserHandler;
|
|
92986
|
+
/** MCP servers to attach to the resumed session. */
|
|
92987
|
+
mcpServers?: DroidMcpServerConfig[];
|
|
92988
|
+
}
|
|
92989
|
+
interface SendOptions {
|
|
92990
|
+
/** Base64-encoded image attachments. */
|
|
92991
|
+
images?: Base64ImageSource[];
|
|
92992
|
+
/** Document/file attachments. */
|
|
92993
|
+
files?: DocumentSource[];
|
|
92994
|
+
/** Structured output request. */
|
|
92995
|
+
outputFormat?: OutputFormat;
|
|
92996
|
+
}
|
|
92997
|
+
interface WebSocketTransportOptions {
|
|
92998
|
+
/** Max connection retries. Default: 5. */
|
|
92999
|
+
maxConnectRetries?: number;
|
|
93000
|
+
/** Initial retry delay in ms. Default: 500. */
|
|
93001
|
+
initialRetryDelayMs?: number;
|
|
93002
|
+
/** Max retry delay in ms. Default: 5000. */
|
|
93003
|
+
maxRetryDelayMs?: number;
|
|
93004
|
+
/** Connection timeout in ms. Default: 5000. */
|
|
93005
|
+
connectionTimeoutMs?: number;
|
|
93006
|
+
}
|
|
93007
|
+
|
|
93008
|
+
declare class DaemonSession {
|
|
93009
|
+
private _client;
|
|
93010
|
+
private _sessionId;
|
|
93011
|
+
private _closed;
|
|
93012
|
+
private readonly _activeBridges;
|
|
93013
|
+
private readonly _cleanupCallbacks;
|
|
93014
|
+
/** @internal */
|
|
93015
|
+
constructor(client: DaemonClient, sessionId: string);
|
|
93016
|
+
/** @internal */
|
|
93017
|
+
addCleanup(cleanup: () => Promise<void> | void): void;
|
|
93018
|
+
get sessionId(): string;
|
|
93019
|
+
stream(prompt: string, options?: MessageOptions & {
|
|
93020
|
+
includePartialMessages?: false;
|
|
93021
|
+
}): AsyncGenerator<DroidStreamMessage, void, undefined>;
|
|
93022
|
+
stream(prompt: string, options: MessageOptions & {
|
|
93023
|
+
includePartialMessages: true;
|
|
93024
|
+
}): AsyncGenerator<DroidStreamEvent, void, undefined>;
|
|
93025
|
+
send(prompt: string, options?: SendOptions): Promise<void>;
|
|
93026
|
+
interrupt(): Promise<void>;
|
|
93027
|
+
close(): Promise<void>;
|
|
93028
|
+
updateSettings(params: Partial<UpdateSessionSettingsRequestParams>): Promise<UpdateSessionSettingsResult>;
|
|
93029
|
+
enterSpecMode(params?: Pick<UpdateSessionSettingsRequestParams, 'specModeModelId' | 'specModeReasoningEffort'>): Promise<UpdateSessionSettingsResult>;
|
|
93030
|
+
compactSession(params?: CompactSessionRequestParams): Promise<CompactSessionResult>;
|
|
93031
|
+
forkSession(): Promise<ForkSessionResult>;
|
|
93032
|
+
getContextBreakdown(): Promise<ContextBreakdownResult>;
|
|
93033
|
+
renameSession(params: RenameSessionRequestParams): Promise<RenameSessionResult>;
|
|
93034
|
+
getRewindInfo(params: GetRewindInfoRequestParams): Promise<GetRewindInfoResult>;
|
|
93035
|
+
executeRewind(params: ExecuteRewindRequestParams): Promise<ExecuteRewindResult>;
|
|
93036
|
+
addMcpServer(params: AddMcpServerRequestParams): Promise<AddMcpServerResult>;
|
|
93037
|
+
removeMcpServer(params: RemoveMcpServerRequestParams): Promise<RemoveMcpServerResult>;
|
|
93038
|
+
toggleMcpServer(params: ToggleMcpServerRequestParams): Promise<ToggleMcpServerResult>;
|
|
93039
|
+
listMcpServers(): Promise<ListMcpServersResult>;
|
|
93040
|
+
listMcpTools(): Promise<ListMcpToolsResult>;
|
|
93041
|
+
authenticateMcpServer(params: AuthenticateMcpServerRequestParams): Promise<AuthenticateMcpServerResult>;
|
|
93042
|
+
listSkills(): Promise<ListSkillsResult>;
|
|
93043
|
+
onNotification(callback: NotificationCallback, filter?: NotificationFilter): () => void;
|
|
93044
|
+
private _ensureNotClosed;
|
|
93045
|
+
}
|
|
93046
|
+
|
|
93047
|
+
declare class WebSocketTransport implements DroidClientTransport {
|
|
93048
|
+
private readonly maxConnectRetries;
|
|
93049
|
+
private readonly initialRetryDelayMs;
|
|
93050
|
+
private readonly maxRetryDelayMs;
|
|
93051
|
+
private readonly connectionTimeoutMs;
|
|
93052
|
+
private ws;
|
|
93053
|
+
private messageHandler;
|
|
93054
|
+
private errorHandler;
|
|
93055
|
+
private _isConnected;
|
|
93056
|
+
private isClosing;
|
|
93057
|
+
constructor(options?: WebSocketTransportOptions);
|
|
93058
|
+
get isConnected(): boolean;
|
|
93059
|
+
connect(url?: string): Promise<void>;
|
|
93060
|
+
send(message: Record<string, unknown>): void;
|
|
93061
|
+
onMessage(callback: MessageCallback): void;
|
|
93062
|
+
onError(callback: ErrorCallback): void;
|
|
93063
|
+
close(): Promise<void>;
|
|
93064
|
+
private _doConnect;
|
|
93065
|
+
private _setupOngoingHandlers;
|
|
93066
|
+
}
|
|
93067
|
+
|
|
93068
|
+
declare function resolveWebSocketUrl(options: ConnectDaemonOptions & {
|
|
93069
|
+
_localPort?: number;
|
|
93070
|
+
}): string;
|
|
93071
|
+
declare class DaemonConnection {
|
|
93072
|
+
private readonly _transport;
|
|
93073
|
+
private readonly _multiplexer;
|
|
93074
|
+
private readonly _apiKey;
|
|
93075
|
+
private _closed;
|
|
93076
|
+
/** @internal */
|
|
93077
|
+
constructor(transport: WebSocketTransport, apiKey: string);
|
|
93078
|
+
createSession(options?: DaemonSessionOptions): Promise<DaemonSession>;
|
|
93079
|
+
resumeSession(sessionId: string, options?: DaemonResumeOptions): Promise<DaemonSession>;
|
|
93080
|
+
interruptSession(sessionId: string): Promise<void>;
|
|
93081
|
+
close(): Promise<void>;
|
|
93082
|
+
private _ensureNotClosed;
|
|
93083
|
+
}
|
|
93084
|
+
declare function connectDaemon(options: ConnectDaemonOptions): Promise<DaemonConnection>;
|
|
93085
|
+
|
|
93086
|
+
/**
|
|
93087
|
+
* Ensure a local `droid daemon` process is running and reachable.
|
|
93088
|
+
*
|
|
93089
|
+
* Discovery order:
|
|
93090
|
+
* 1. Cached target from a previous call in this process
|
|
93091
|
+
* 2. Well-known port (37643)
|
|
93092
|
+
* 3. Port file (`~/.factory/sdk/daemon.port`)
|
|
93093
|
+
* 4. Spawn new daemon (prefer well-known port, fallback to random)
|
|
93094
|
+
*
|
|
93095
|
+
* Concurrent calls are deduplicated — all callers join the same
|
|
93096
|
+
* spawn attempt.
|
|
93097
|
+
*/
|
|
93098
|
+
declare function ensureLocalDaemon(): Promise<{
|
|
93099
|
+
port: number;
|
|
93100
|
+
}>;
|
|
93101
|
+
|
|
93102
|
+
export { type AddMcpServerRequest, type AddMcpServerRequestParams, AddMcpServerRequestParamsSchema, AddMcpServerRequestSchema, type AddMcpServerResponse, AddMcpServerResponseSchema, type AddMcpServerResult, AddMcpServerResultSchema, type AddUserMessageRequest, type AddUserMessageRequestParams, AddUserMessageRequestParamsSchema, AddUserMessageRequestSchema, type AddUserMessageResponse, AddUserMessageResponseSchema, type AddUserMessageResult, AddUserMessageResultSchema, type ApplyPatchToolConfirmationDetails, ApplyPatchToolConfirmationDetailsSchema, type AskUserCollectedAnswer, AskUserCollectedAnswerSchema, type AskUserConfirmationDetails, AskUserConfirmationDetailsSchema, type AskUserHandler, type AskUserQuestion, AskUserQuestionSchema, type AskUserRequest, type AskUserRequestParams, AskUserRequestParamsSchema, AskUserRequestSchema, type AskUserResponse, AskUserResponseSchema, type AskUserResult, AskUserResultSchema, type AssistantTextComplete, type AssistantTextCompleteNotification, AssistantTextCompleteNotificationSchema, type AssistantTextDelta, type AssistantTextDeltaNotification, AssistantTextDeltaNotificationSchema, type AuthenticateMcpServerRequest, type AuthenticateMcpServerRequestParams, AuthenticateMcpServerRequestParamsSchema, AuthenticateMcpServerRequestSchema, type AuthenticateMcpServerResponse, AuthenticateMcpServerResponseSchema, type AuthenticateMcpServerResult, AuthenticateMcpServerResultSchema, AutonomyLevel, AutonomyMode, type AvailableModelConfig, AvailableModelConfigSchema, type Base64ImageSource, Base64ImageSourceSchema, type BaseDroidHookInput, type BaseNotification, BaseNotificationSchema, type BaseRequest, BaseRequestSchema, type BaseResponseFailure, BaseResponseFailureSchema, type BaseResponseSuccess, BaseResponseSuccessSchema, COMPACTION_TIMEOUT, type CancelMcpAuthRequest, type CancelMcpAuthRequestParams, CancelMcpAuthRequestParamsSchema, CancelMcpAuthRequestSchema, type CancelMcpAuthResponse, CancelMcpAuthResponseSchema, type CancelMcpAuthResult, CancelMcpAuthResultSchema, type ClearMcpAuthRequest, type ClearMcpAuthRequestParams, ClearMcpAuthRequestParamsSchema, ClearMcpAuthRequestSchema, type ClearMcpAuthResponse, ClearMcpAuthResponseSchema, type ClearMcpAuthResult, ClearMcpAuthResultSchema, type CliRequestOrNotification, CliRequestOrNotificationSchema, type ClientAskUserHandler, type ClientPermissionHandler, type ClientRequest, ClientRequestSchema, type CloseSessionRequest, type CloseSessionRequestParams, CloseSessionRequestParamsSchema, CloseSessionRequestSchema, type CloseSessionResponse, CloseSessionResponseSchema, type CloseSessionResult, CloseSessionResultSchema, type CompactSessionRequest, type CompactSessionRequestParams, CompactSessionRequestParamsSchema, CompactSessionRequestSchema, type CompactSessionResponse, CompactSessionResponseSchema, type CompactSessionResult, CompactSessionResultSchema, type Computer, type ComputerApiOptions, type ComputerListResponse, ComputerListResponseSchema, type ComputerMetric, ComputerMetricSchema, type ComputerMetricsResponse, ComputerMetricsResponseSchema, ComputerSchema, type ConnectDaemonOptions, ConnectionError, type ContentBlock, ContentBlockSchema, ContextBreakdownCategorySchema, type ContextBreakdownResult, ContextBreakdownResultSchema, type ContextStats, ContextStatsAccuracy, ContextStatsSchema, type CreateComputerOptions, type CreateMessage, type CreateMessageNotification, CreateMessageNotificationSchema, type CreateSessionOptions, type CreateToolConfirmationDetails, CreateToolConfirmationDetailsSchema, DEFAULT_REQUEST_TIMEOUT, DaemonClient, type DaemonClientOptions, DaemonConnection, type DaemonResumeOptions, DaemonSession, type DaemonSessionOptions, DecompSessionType, type DeleteComputerOptions, type DiscoveredIssue, DiscoveredIssueSchema, type DismissalRecord, DismissalRecordSchema, DismissalType, type DocumentBlock, DocumentBlockSchema, type DocumentSource, DocumentSourceSchema, type DroidAssistantMessage, DroidClient, DroidClientMethod, type DroidClientOptions, type DroidClientTransport, type DroidErrorMessage, DroidErrorType, type DroidHookEvent, DroidHookEventSchema, type DroidHookExecutionResult, DroidHookExecutionResultSchema, type DroidHookInput, type DroidHookOutput, DroidHookOutputSchema, DroidHookSpecificOutputSchema, DroidInteractionMode, type DroidMcpServerConfig, type DroidMessage, DroidMessageType, type DroidPermissionMode, type DroidResult, type DroidResultMessage, DroidServerMethod, DroidSession, type DroidStreamEvent, type DroidStreamMessage, type DroidTool, type DroidToolCallMessage, type DroidToolResult, type DroidToolResultMessage, type DroidUserMessage, DroidWorkingState, type DroidWorkingStateChangedNotification, DroidWorkingStateChangedNotificationSchema, type EditToolConfirmationDetails, EditToolConfirmationDetailsSchema, type EmptyResult, EmptyResultSchema, type ErrorCallback, type ErrorDetail, ErrorDetailSchema, type ErrorEvent, type ErrorNotification, ErrorNotificationSchema, type ExecToolInfo, ExecToolInfoSchema, type ExecuteRewindRequest, type ExecuteRewindRequestParams, ExecuteRewindRequestParamsSchema, ExecuteRewindRequestSchema, type ExecuteRewindResponse, ExecuteRewindResponseSchema, type ExecuteRewindResult, ExecuteRewindResultSchema, type ExecuteToolConfirmationDetails, ExecuteToolConfirmationDetailsSchema, type ExitSpecModeConfirmationDetails, ExitSpecModeConfirmationDetailsSchema, FACTORY_CLIENT_HEADER, FACTORY_CLIENT_VERSION, FACTORY_PROTOCOL_VERSION, type FactoryApiOptions, type FactoryDroidMessage, FactoryDroidMessageRole, FactoryDroidMessageSchema, FeatureStatus, FeatureSuccessState, FeatureSuccessStateSchema, type ForkSessionRequest, type ForkSessionRequestParams, ForkSessionRequestParamsSchema, ForkSessionRequestSchema, type ForkSessionResponse, ForkSessionResponseSchema, type ForkSessionResult, ForkSessionResultSchema, type GetComputerByNameOptions, type GetComputerMetricsOptions, type GetComputerOptions, type GetContextStatsRequest, type GetContextStatsRequestParams, GetContextStatsRequestParamsSchema, GetContextStatsRequestSchema, type GetContextStatsResponse, GetContextStatsResponseSchema, type GetContextStatsResult, GetContextStatsResultSchema, type GetMachineTemplateOptions, type GetRewindInfoRequest, type GetRewindInfoRequestParams, GetRewindInfoRequestParamsSchema, GetRewindInfoRequestSchema, type GetRewindInfoResponse, GetRewindInfoResponseSchema, type GetRewindInfoResult, GetRewindInfoResultSchema, type GitRepoInfo, GitRepoInfoSchema, type Handoff, type HandoffItemsDismissedEntry, HandoffItemsDismissedEntrySchema, HandoffSchema, type HookCommand, HookCommandSchema, type HookExecution, type HookExecutionCompletedNotification, HookExecutionCompletedNotificationSchema, type HookExecutionStartedNotification, HookExecutionStartedNotificationSchema, type HookResult, HookResultSchema, type HttpHeader, HttpHeaderSchema, type HttpMcpConfig, HttpMcpConfigSchema, type ImageBlock, ImageBlockSchema, type InitializeSessionRequest, type InitializeSessionRequestParams, InitializeSessionRequestParamsSchema, InitializeSessionRequestSchema, type InitializeSessionResponse, InitializeSessionResponseSchema, type InitializeSessionResult, InitializeSessionResultSchema, type InteractiveCheck, InteractiveCheckSchema, type InterruptSessionRequest, type InterruptSessionRequestParams, InterruptSessionRequestParamsSchema, InterruptSessionRequestSchema, type InterruptSessionResponse, InterruptSessionResponseSchema, type InterruptSessionResult, InterruptSessionResultSchema, IssueSeverity, JSONRPC_VERSION, type JsonArray, JsonArraySchema, type JsonObject, JsonObjectSchema, type JsonPrimitive, type JsonRpcEnvelope, JsonRpcEnvelopeSchema, type JsonRpcError, JsonRpcErrorCode, JsonRpcErrorSchema, type JsonRpcMessage, JsonRpcMessageSchema, JsonRpcMessageType, type JsonRpcNotification, JsonRpcNotificationSchema, type JsonRpcRequest, JsonRpcRequestSchema, type JsonRpcResponse, type JsonRpcResponseFailure, JsonRpcResponseFailureSchema, JsonRpcResponseSchema, type JsonRpcResponseSuccess, JsonRpcResponseSuccessSchema, type JsonValue, JsonValueSchema, type KillWorkerSessionRequest, type KillWorkerSessionRequestParams, KillWorkerSessionRequestParamsSchema, KillWorkerSessionRequestSchema, type KillWorkerSessionResponse, KillWorkerSessionResponseSchema, type KillWorkerSessionResult, KillWorkerSessionResultSchema, LEGACY_FACTORY_API_VERSION, type ListComputersOptions, type ListMachineTemplatesOptions, type ListMcpRegistryRequest, type ListMcpRegistryRequestParams, ListMcpRegistryRequestParamsSchema, ListMcpRegistryRequestSchema, type ListMcpRegistryResponse, ListMcpRegistryResponseSchema, type ListMcpRegistryResult, ListMcpRegistryResultSchema, type ListMcpServersRequest, type ListMcpServersRequestParams, ListMcpServersRequestParamsSchema, ListMcpServersRequestSchema, type ListMcpServersResponse, ListMcpServersResponseSchema, type ListMcpServersResult, ListMcpServersResultSchema, type ListMcpToolsRequest, type ListMcpToolsRequestParams, ListMcpToolsRequestParamsSchema, ListMcpToolsRequestSchema, type ListMcpToolsResponse, ListMcpToolsResponseSchema, type ListMcpToolsResult, ListMcpToolsResultSchema, type ListRemoteSessionsOptions, type ListSessionsOptions, type ListSkillsRequest, type ListSkillsRequestParams, ListSkillsRequestParamsSchema, ListSkillsRequestSchema, type ListSkillsResponse, ListSkillsResponseSchema, type ListSkillsResult, ListSkillsResultSchema, type ListToolsRequest, type ListToolsRequestParams, ListToolsRequestParamsSchema, ListToolsRequestSchema, type ListToolsResponse, ListToolsResponseSchema, type ListToolsResult, ListToolsResultSchema, type LoadSessionRequest, type LoadSessionRequestParams, LoadSessionRequestParamsSchema, LoadSessionRequestSchema, type LoadSessionResponse, LoadSessionResponseSchema, type LoadSessionResult, LoadSessionResultSchema, MCP_AUTH_TIMEOUT, type MachineTemplate, type MachineTemplateBuildStatus, MachineTemplateBuildStatusSchema, type MachineTemplateListResponse, MachineTemplateListResponseSchema, MachineTemplateSchema, MachineType, type McpAuthCompleted, type McpAuthCompletedNotification, McpAuthCompletedNotificationSchema, McpAuthOutcome, type McpAuthRequired, type McpAuthRequiredNotification, McpAuthRequiredNotificationSchema, type McpHttpServerConfigFields, McpHttpServerConfigFieldsSchema, type McpRegistryServer, McpRegistryServerSchema, type McpServerConfig, McpServerConfigSchema, McpServerStatus, type McpServerStatusInfo, McpServerStatusInfoSchema, McpServerType, type McpSseServerConfigFields, McpSseServerConfigFieldsSchema, McpStatus, type McpStatusChanged, type McpStatusChangedNotification, McpStatusChangedNotificationSchema, type McpStatusSummary, McpStatusSummarySchema, type McpStdioServerConfigFields, McpStdioServerConfigFieldsSchema, type McpToolConfirmationDetails, McpToolConfirmationDetailsSchema, type McpToolInfo, McpToolInfoSchema, type McpToolInputSchema, McpToolInputSchemaSchema, type MessageCallback, type MessageOptions, type MilestoneValidationTriggeredEntry, MilestoneValidationTriggeredEntrySchema, type MissionAcceptedEntry, MissionAcceptedEntrySchema, type MissionFeature, MissionFeatureSchema, type MissionFeaturesChanged, type MissionFeaturesChangedNotification, MissionFeaturesChangedNotificationSchema, type MissionHeartbeat, type MissionHeartbeatNotification, MissionHeartbeatNotificationSchema, type MissionPausedEntry, MissionPausedEntrySchema, type MissionProgressEntry, type MissionProgressEntryNotification, MissionProgressEntryNotificationSchema, type MissionResumedEntry, MissionResumedEntrySchema, type MissionRunStartedEntry, MissionRunStartedEntrySchema, type MissionSnapshot, MissionSnapshotSchema, MissionState, type MissionStateChanged, type MissionStateChangedNotification, MissionStateChangedNotificationSchema, type MissionWorkerCompleted, type MissionWorkerCompletedNotification, MissionWorkerCompletedNotificationSchema, type MissionWorkerStarted, type MissionWorkerStartedNotification, MissionWorkerStartedNotificationSchema, ModelProvider, type NotificationCallback, type NotificationFilter, type NotificationHookInput, type NotificationListener, type OutputFormat, OutputFormatSchema, OutputFormatType, type PermissionHandler, type PermissionResolved, type PermissionResolvedNotification, PermissionResolvedNotificationSchema, type PreCompactHookInput, ProcessExitError, ProcessTransport, type ProcessTransportOptions, type ProgressLogEntry, ProgressLogEntrySchema, ProgressLogEntryType, type ProposeMissionConfirmationDetails, ProposeMissionConfirmationDetailsSchema, ProtocolEngine, ProtocolError, REWIND_TIMEOUT, ReasoningEffort, type RedactedThinkingBlock, RedactedThinkingBlockSchema, type RefreshComputerOptions, type RefreshComputerResponse, RefreshComputerResponseSchema, type RemoteSession, type RemoteSessionListResponse, RemoteSessionListResponseSchema, RemoteSessionSchema, type RemoveMcpServerRequest, type RemoveMcpServerRequestParams, RemoveMcpServerRequestParamsSchema, RemoveMcpServerRequestSchema, type RemoveMcpServerResponse, RemoveMcpServerResponseSchema, type RemoveMcpServerResult, RemoveMcpServerResultSchema, type RenameSessionRequest, type RenameSessionRequestParams, RenameSessionRequestParamsSchema, RenameSessionRequestSchema, type RenameSessionResponse, RenameSessionResponseSchema, type RenameSessionResult, RenameSessionResultSchema, type RequestPermissionHandlerResult, type RequestPermissionRequest, type RequestPermissionRequestParams, RequestPermissionRequestParamsSchema, RequestPermissionRequestSchema, type RequestPermissionResponse, RequestPermissionResponseSchema, type RequestPermissionResult, RequestPermissionResultSchema, type RequestPermissionSelection, type RestartComputerOptions, type ResumeSessionOptions, type RetryInstallDepsOptions, type RewindEvictedFile, RewindEvictedFileSchema, type RewindFileCreation, RewindFileCreationSchema, type RewindFileSnapshot, RewindFileSnapshotSchema, type RunOptions, type SDKMachineConfig, SDK_TAG, SDK_VERSION, SESSION_INIT_TIMEOUT, SdkMcpServer, type SdkMcpServerOptions, type SendOptions, ServerRequestHandlerType, type SessionEndHookInput, SessionError, type SessionMetadata, SessionMetadataSchema, SessionNotFoundError, type SessionNotification, type SessionNotificationParams, SessionNotificationParamsSchema, type SessionNotificationPayload, SessionNotificationPayloadSchema, SessionNotificationSchema, SessionNotificationSchemaList, SessionNotificationType, type SessionSettings, type SessionSettingsFile, SessionSettingsFileSchema, SessionSettingsSchema, type SessionSource, SessionSourceSchema, type SessionStartEvent, SessionStartEventSchema, type SessionStartHookInput, type SessionTag, SessionTagSchema, type SessionTitleUpdated, type SessionTitleUpdatedNotification, SessionTitleUpdatedNotificationSchema, type SessionTokenUsageChangedNotification, SessionTokenUsageChangedNotificationSchema, SettingsLevel, type SettingsUpdated, type SettingsUpdatedNotification, SettingsUpdatedNotificationSchema, type SettingsUpdatedPayload, SettingsUpdatedPayloadSchema, type SkillDeviation, SkillDeviationSchema, type SkillFeedback, SkillFeedbackSchema, type SkillInfo, SkillInfoSchema, SkillLocation, type SkillResource, SkillResourceSchema, type SseMcpConfig, SseMcpConfigSchema, type StartMissionRunConfirmationDetails, StartMissionRunConfirmationDetailsSchema, type StdioMcpConfig, StdioMcpConfigSchema, type StopHookInput, StreamStateTracker, type StructuredOutput, type StructuredOutputError, StructuredOutputErrorSchema, type StructuredOutputFields, type StructuredOutputNotification, StructuredOutputNotificationSchema, type SubagentStopHookInput, type SubmitBugReportRequest, type SubmitBugReportRequestParams, SubmitBugReportRequestParamsSchema, SubmitBugReportRequestSchema, type SubmitBugReportResponse, SubmitBugReportResponseSchema, type SubmitBugReportResult, SubmitBugReportResultSchema, type SubmitMcpAuthCodeRequest, type SubmitMcpAuthCodeRequestParams, SubmitMcpAuthCodeRequestParamsSchema, SubmitMcpAuthCodeRequestSchema, type SubmitMcpAuthCodeResponse, SubmitMcpAuthCodeResponseSchema, type SubmitMcpAuthCodeResult, SubmitMcpAuthCodeResultSchema, type SuccessResult, SuccessResultSchema, type TestCase, TestCaseSchema, type TestFile, TestFileSchema, type Tests, TestsSchema, type TextBlock, TextBlockSchema, type ThinkingBlock, ThinkingBlockSchema, type ThinkingTextComplete, type ThinkingTextCompleteNotification, ThinkingTextCompleteNotificationSchema, type ThinkingTextDelta, type ThinkingTextDeltaNotification, ThinkingTextDeltaNotificationSchema, TimeoutError, type ToggleMcpServerRequest, type ToggleMcpServerRequestParams, ToggleMcpServerRequestParamsSchema, ToggleMcpServerRequestSchema, type ToggleMcpServerResponse, ToggleMcpServerResponseSchema, type ToggleMcpServerResult, ToggleMcpServerResultSchema, type ToggleMcpToolRequest, type ToggleMcpToolRequestParams, ToggleMcpToolRequestParamsSchema, ToggleMcpToolRequestSchema, type ToggleMcpToolResponse, ToggleMcpToolResponseSchema, type ToggleMcpToolResult, ToggleMcpToolResultSchema, type TokenUsage, TokenUsageSchema, type TokenUsageUpdate, type ToolCallDelta, type ToolCallNotification, ToolCallNotificationSchema, type ToolConfirmationDetails, ToolConfirmationDetailsSchema, type ToolConfirmationInfo, ToolConfirmationInfoSchema, type ToolConfirmationListItem, ToolConfirmationListItemSchema, ToolConfirmationOutcome, ToolConfirmationType, type ToolHookInput, type ToolProgress, type ToolProgressUpdate, type ToolProgressUpdateNotification, ToolProgressUpdateNotificationSchema, ToolProgressUpdateSchema, type ToolResult, type ToolResultBlock, ToolResultBlockSchema, type ToolResultNotification, ToolResultNotificationSchema, type ToolSelectionOverrides, ToolSelectionOverridesSchema, type ToolUse, type ToolUseBlock, ToolUseBlockSchema, ToolUseSchema, type TraceContextMeta, TraceContextMetaSchema, type UpdateComputerOptions, type UpdateSessionSettingsRequest, type UpdateSessionSettingsRequestParams, UpdateSessionSettingsRequestParamsSchema, UpdateSessionSettingsRequestSchema, type UpdateSessionSettingsResponse, UpdateSessionSettingsResponseSchema, type UpdateSessionSettingsResult, UpdateSessionSettingsResultSchema, type UserPromptSubmitHookInput, type Verification, type VerificationCommand, VerificationCommandSchema, VerificationSchema, WebSocketTransport, type WebSocketTransportOptions, type WorkerCompletedEntry, WorkerCompletedEntrySchema, type WorkerFailedEntry, WorkerFailedEntrySchema, type WorkerPausedEntry, WorkerPausedEntrySchema, type WorkerSelectedFeatureEntry, WorkerSelectedFeatureEntrySchema, type WorkerStartedEntry, WorkerStartedEntrySchema, type WorkerStateInfo, WorkerStateInfoSchema, type WorkingStateChanged, connectDaemon, convertNotificationToStreamMessage, createComputer, createResponseSchema, createSdkMcpServer, createSession, deleteComputer, dispatchNotification, ensureLocalDaemon, getComputer, getComputerByName, getComputerMetrics, getMachineTemplate, listComputers, listMachineTemplates, listRemoteSessions, listSessions, refreshComputer, resolveWebSocketUrl, restartComputer, resumeSession, retryInstallDeps, run, tool, updateComputer };
|