@factory/droid-sdk 0.9.1 → 0.11.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/README.md +53 -0
- package/dist/api.d.mts +15058 -0
- package/dist/api.d.ts +15058 -0
- package/dist/api.js +253 -0
- package/dist/api.js.map +1 -0
- package/dist/api.mjs +253 -0
- package/dist/api.mjs.map +1 -0
- package/dist/chunk-7ZD7MMNA.mjs +2268 -0
- package/dist/chunk-7ZD7MMNA.mjs.map +1 -0
- package/dist/{chunk-YSKO6SPT.js → chunk-KAAWCHO4.js} +32033 -17088
- package/dist/chunk-KAAWCHO4.js.map +1 -0
- package/dist/chunk-NWFX4MPJ.mjs +41630 -0
- package/dist/chunk-NWFX4MPJ.mjs.map +1 -0
- package/dist/chunk-ZQ7TS73S.js +2268 -0
- package/dist/chunk-ZQ7TS73S.js.map +1 -0
- package/dist/{index-C06W9tbN.d.mts → index-Cf2WtJqJ.d.mts} +134169 -84330
- package/dist/{index-C06W9tbN.d.ts → index-Cf2WtJqJ.d.ts} +134169 -84330
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +91 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +99 -10
- package/dist/node.d.mts +223 -43
- package/dist/node.d.ts +223 -43
- package/dist/node.js +2033 -776
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +1756 -499
- package/dist/node.mjs.map +1 -1
- package/examples/browser/daemon-lifecycle.ts +4 -6
- package/examples/node/custom-model-editing-disposable.sh +88 -0
- package/examples/node/custom-model-editing-disposable.ts +171 -0
- package/examples/node/custom-model-editing.ts +55 -0
- package/examples/node/hook-execution.ts +3 -2
- package/examples/node/rest-api.ts +55 -0
- package/examples/node/sdk-mcp-tool.ts +5 -3
- package/examples/node/start-workstream.ts +76 -0
- package/examples/node/tool-controls.ts +7 -5
- package/package.json +14 -3
- package/dist/chunk-TWSTJMV7.mjs +0 -26685
- package/dist/chunk-TWSTJMV7.mjs.map +0 -1
- package/dist/chunk-YSKO6SPT.js.map +0 -1
package/dist/node.d.mts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { D as DaemonClientTransport, a as DaemonIpcMessageChannel, b as DaemonClientTransportKind, c as DaemonClientTransportEvents, I as InProcessDaemonClientTransportOptions, S as SessionNotificationEvent, R as RequestPermissionEvent, A as AskUserEvent, L as LogMetadata, d as
|
|
2
|
-
export { aZ as AbortError, kM as AddMcpServerRequest, a_ as AddMcpServerRequestParamsSchema, a$ as AddMcpServerRequestSchema, kN as AddMcpServerResponse, b0 as AddMcpServerResultSchema, jX as AddMessageResult, kO as AddUserMessageRequest, kP as AddUserMessageRequestParams, b1 as AddUserMessageRequestParamsSchema, b2 as AddUserMessageRequestSchema, kQ as AddUserMessageResponse, b3 as AddUserMessageResponseSchema, kR as AddUserMessageResult, b4 as AddUserMessageResultSchema, mJ as ApplyPatchToolConfirmationDetails, b5 as ApplyPatchToolConfirmationDetailsSchema, io as ArchiveSessionOptions, mY as AskUserCollectedAnswer, b6 as AskUserCollectedAnswerSchema, mF as AskUserConfirmationDetails, b7 as AskUserConfirmationDetailsSchema, mV as AskUserQuestion, b8 as AskUserQuestionSchema, mW as AskUserRequest, k8 as AskUserRequestHandlerEvents, mX as AskUserRequestParams, b9 as AskUserRequestParamsSchema, ba as AskUserRequestSchema, m_ as AskUserResponse, bb as AskUserResponseSchema, mZ as AskUserResult, bc as AskUserResultSchema, hI as AssistantMessageRetracted, mm as AssistantMessageRetractedNotification, bd as AssistantMessageRetractedNotificationSchema, hK as AssistantTextComplete, ml as AssistantTextCompleteNotification, be as AssistantTextCompleteNotificationSchema, hJ as AssistantTextDelta, mk as AssistantTextDeltaNotification, bf as AssistantTextDeltaNotificationSchema, jp as Attribute, jq as Attributes, kS as AuthenticateMcpServerRequest, bg as AuthenticateMcpServerRequestParamsSchema, bh as AuthenticateMcpServerRequestSchema, kT as AuthenticateMcpServerResponse, bi as AuthenticateMcpServerResultSchema, ip as AutomationsResource, kB as AvailableModelConfig, bj as AvailableModelConfigSchema, nD as Base64ImageSource, bk as Base64ImageSourceSchema, hq as BaseDroidHookInput, kp as BaseNotification, bl as BaseNotificationSchema, km as BaseRequest, bm as BaseRequestSchema, ko as BaseResponseFailure, bn as BaseResponseFailureSchema, kn as BaseResponseSuccess, bo as BaseResponseSuccessSchema, bp as COMPACTION_TIMEOUT, kU as CancelMcpAuthRequest, kV as CancelMcpAuthRequestParams, bq as CancelMcpAuthRequestParamsSchema, br as CancelMcpAuthRequestSchema, kW as CancelMcpAuthResponse, kX as CancelMcpAuthResult, bs as CancelMcpAuthResultSchema, kY as ChangeWorkingDirectoryRequest, kZ as ChangeWorkingDirectoryRequestParams, bt as ChangeWorkingDirectoryRequestParamsSchema, bu as ChangeWorkingDirectoryRequestSchema, k_ as ChangeWorkingDirectoryResponse, bv as ChangeWorkingDirectoryResponseSchema, k$ as ChangeWorkingDirectoryResult, bw as ChangeWorkingDirectoryResultSchema, l0 as ClearMcpAuthRequest, l1 as ClearMcpAuthRequestParams, bx as ClearMcpAuthRequestParamsSchema, by as ClearMcpAuthRequestSchema, l2 as ClearMcpAuthResponse, l3 as ClearMcpAuthResult, bz as ClearMcpAuthResultSchema, mU as CliRequestOrNotification, bA as CliRequestOrNotificationSchema, h9 as ClientAskUserHandler, bB as ClientDestroyedError, ha as ClientPermissionHandler, l4 as ClientRequest, bC as ClientRequestSchema, bD as ClientUiSurface, l5 as CloseSessionRequest, l6 as CloseSessionRequestParams, bE as CloseSessionRequestParamsSchema, bF as CloseSessionRequestSchema, l7 as CloseSessionResponse, bG as CloseSessionResponseSchema, l8 as CloseSessionResult, bH as CloseSessionResultSchema, iq as CommandsResource, l9 as CompactSessionRequest, bI as CompactSessionRequestParamsSchema, bJ as CompactSessionRequestSchema, la as CompactSessionResponse, lb as CompactSessionResult, bK as CompactSessionResultSchema, bL as ComputeLimitExceededError, j2 as Computer, j1 as ComputerApiOptions, jy as ComputerConnectAttemptContext, bM as ComputerConnectAttemptTrigger, jz as ComputerConnectSliOptions, jA as ComputerConnectSliRunContext, bN as ComputerConnectStartType, j3 as ComputerListResponse, bO as ComputerListResponseSchema, j4 as ComputerMetric, bP as ComputerMetricSchema, j5 as ComputerMetricsResponse, bQ as ComputerMetricsResponseSchema, bR as ComputerSchema, bS as ConcurrentStreamError, ic as ConnectToDaemonOptions, ia as ConnectedDroid, ib as ConnectedDroidSession, bT as ConnectionClosedError, h1 as ConnectionError, bU as ConnectionFailureReason, nL as ContentBlock, bV as ContentBlockSchema, bW as ContextBreakdownCategorySchema, kA as ContextBreakdownResult, bX as ContextBreakdownResultSchema, kC as ContextStats, bY as ContextStatsAccuracy, bZ as ContextStatsSchema, j6 as CreateComputerOptions, ir as CreateCronOptions, id as CreateDaemonSessionOptions, hT as CreateMessage, md as CreateMessageNotification, b_ as CreateMessageNotificationSchema, mE as CreateToolConfirmationDetails, b$ as CreateToolConfirmationDetailsSchema, is as CronOperationsResource, it as CronsResource, iu as CustomModelsResource, c0 as DEFAULT_LOCAL_DAEMON_WS_URL, c1 as DEFAULT_REQUEST_TIMEOUT, ie as DaemonAuth, jG as DaemonAuthenticationCredential, c2 as DaemonAuthenticationMode, c3 as DaemonClient, jC as DaemonClientConfig, c4 as DaemonClientMetaError, jr as DaemonCoreDeps, c5 as DaemonDroidEvent, k0 as DaemonRequest, c6 as DaemonRequestPermissionSchema, iv as DaemonResources, c7 as DaemonSessionController, ig as DaemonSessionSummary, js as DaemonSpan, c8 as DecompSessionType, jc as DeleteComputerOptions, nf as DiscoveredIssue, c9 as DiscoveredIssueSchema, np as DismissalRecord, ca as DismissalRecordSchema, cb as DismissalType, nJ as DocumentBlock, cc as DocumentBlockSchema, nI as DocumentSource, cd as DocumentSourceSchema, hD as DroidAssistantMessage, hh as DroidAttributeValue, hi as DroidAttributes, h2 as DroidClientError, ce as DroidClientMethod, hH as DroidErrorMessage, cf as DroidErrorType, cg as DroidEvent, hr as DroidHookEvent, ch as DroidHookEventSchema, hg as DroidHookExecutionResult, ci as DroidHookExecutionResultSchema, hs as DroidHookInput, ht as DroidHookOutput, cj as DroidHookOutputSchema, ck as DroidHookSpecificOutputSchema, hj as DroidLogEvent, hk as DroidLogger, i9 as DroidMessage, cl as DroidMessageType, hl as DroidMetricEvent, hm as DroidMetricSink, hu as DroidPermissionMode, hn as DroidSerializedError, cm as DroidServerMethod, hF as DroidToolCallMessage, hG as DroidToolResultMessage, ho as DroidTraceContextCarrier, hp as DroidTraceContextProvider, hE as DroidUserMessage, cn as DroidWorkingState, mf as DroidWorkingStateChangedNotification, co as DroidWorkingStateChangedNotificationSchema, mC as EditToolConfirmationDetails, cp as EditToolConfirmationDetailsSchema, ki as EmptyResult, cq as EmptyResultSchema, mO as ErrorDetail, cr as ErrorDetailSchema, i8 as ErrorEvent, me as ErrorNotification, cs as ErrorNotificationSchema, ct as ExecToolInfoSchema, lc as ExecuteRewindRequest, cu as ExecuteRewindRequestParamsSchema, cv as ExecuteRewindRequestSchema, ld as ExecuteRewindResponse, le as ExecuteRewindResult, cw as ExecuteRewindResultSchema, mD as ExecuteToolConfirmationDetails, cx as ExecuteToolConfirmationDetailsSchema, mG as ExitSpecModeConfirmationDetails, cy as ExitSpecModeConfirmationDetailsSchema, cz as FACTORY_CLIENT_HEADER, cA as FACTORY_CLIENT_VERSION, cB as FACTORY_PROTOCOL_VERSION, j0 as FactoryApiOptions, jH as FactoryDaemonConfig, cC as FactoryDaemonTransport, jI as FactoryDroidEvents, nM as FactoryDroidMessage, cD as FactoryDroidMessageRole, cE as FactoryDroidMessageSchema, cF as FeatureStatus, cG as FeatureSuccessState, cH as FeatureSuccessStateSchema, iw as FeedbackResource, ix as FileTransfersResource, ih as ForkSessionOptions, lf as ForkSessionRequest, cI as ForkSessionRequestSchema, lg as ForkSessionResponse, lh as ForkSessionResult, cJ as ForkSessionResultSchema, j9 as GetComputerByNameOptions, ja as GetComputerMetricsOptions, j8 as GetComputerOptions, li as GetContextStatsRequest, lj as GetContextStatsRequestParams, cK as GetContextStatsRequestParamsSchema, cL as GetContextStatsRequestSchema, lk as GetContextStatsResponse, bZ as GetContextStatsResultSchema, jk as GetMachineTemplateOptions, ll as GetRewindInfoRequest, cM as GetRewindInfoRequestParamsSchema, cN as GetRewindInfoRequestSchema, lm as GetRewindInfoResponse, cO as GetRewindInfoResultSchema, iy as GetSessionMessagesOptions, kD as GitRepoInfo, cP as GitRepoInfoSchema, iz as GitResource, no as Handoff, nz as HandoffItemsDismissedEntry, cQ as HandoffItemsDismissedEntrySchema, cR as HandoffSchema, m$ as HookCommand, cS as HookCommandSchema, i5 as HookExecution, mt as HookExecutionCompletedNotification, cT as HookExecutionCompletedNotificationSchema, ms as HookExecutionStartedNotification, cU as HookExecutionStartedNotificationSchema, n0 as HookResult, cV as HookResultSchema, kE as HttpHeader, cW as HttpHeaderSchema, cX as HttpMcpConfigSchema, jD as IDaemonClient, g$ as IPC_DAEMON_URL, jQ as IToolProgressStore, nE as ImageBlock, cY as ImageBlockSchema, h0 as InProcessMessageHandler, jV as InitializeResult, ln as InitializeSessionRequest, cZ as InitializeSessionRequestParamsSchema, c_ as InitializeSessionRequestSchema, c$ as InitializeSessionResponseSchema, lo as InitializeSessionResult, d0 as InitializeSessionResultSchema, nh as InteractiveCheck, d1 as InteractiveCheckSchema, jY as InterruptResult, lp as InterruptSessionRequest, lq as InterruptSessionRequestParams, d2 as InterruptSessionRequestParamsSchema, d3 as InterruptSessionRequestSchema, lr as InterruptSessionResponse, d4 as InterruptSessionResponseSchema, ls as InterruptSessionResult, d5 as InterruptSessionResultSchema, h3 as InvalidSessionCwdError, d6 as IssueSeverity, d7 as JSONRPC_VERSION, kf as JsonArray, d8 as JsonArraySchema, ke as JsonObject, d9 as JsonObjectSchema, kd as JsonPrimitive, kk as JsonRpcEnvelope, da as JsonRpcEnvelopeSchema, kl as JsonRpcError, db as JsonRpcErrorCode, dc as JsonRpcErrorSchema, kv as JsonRpcMessage, dd as JsonRpcMessageSchema, de as JsonRpcMessageType, kt as JsonRpcNotification, df as JsonRpcNotificationSchema, kq as JsonRpcRequest, dg as JsonRpcRequestError, dh as JsonRpcRequestSchema, ku as JsonRpcResponse, ks as JsonRpcResponseFailure, di as JsonRpcResponseFailureSchema, dj as JsonRpcResponseSchema, kr as JsonRpcResponseSuccess, dk as JsonRpcResponseSuccessSchema, kg as JsonValue, dl as JsonValueSchema, lt as KillWorkerSessionRequest, lu as KillWorkerSessionRequestParams, dm as KillWorkerSessionRequestParamsSchema, dn as KillWorkerSessionRequestSchema, lv as KillWorkerSessionResponse, dp as KillWorkerSessionResponseSchema, lw as KillWorkerSessionResult, dq as KillWorkerSessionResultSchema, dr as LEGACY_FACTORY_API_VERSION, ds as LOCAL_MACHINE_ID, j7 as ListComputersOptions, ii as ListDaemonSessionsOptions, jj as ListMachineTemplatesOptions, lx as ListMcpRegistryRequest, ly as ListMcpRegistryRequestParams, dt as ListMcpRegistryRequestParamsSchema, du as ListMcpRegistryRequestSchema, lz as ListMcpRegistryResponse, lA as ListMcpRegistryResult, dv as ListMcpRegistryResultSchema, lB as ListMcpServersRequest, lC as ListMcpServersRequestParams, dw as ListMcpServersRequestParamsSchema, dx as ListMcpServersRequestSchema, lD as ListMcpServersResponse, dy as ListMcpServersResultSchema, lE as ListMcpToolsRequest, lF as ListMcpToolsRequestParams, dz as ListMcpToolsRequestParamsSchema, dA as ListMcpToolsRequestSchema, lG as ListMcpToolsResponse, lH as ListMcpToolsResult, dB as ListMcpToolsResultSchema, dC as ListModelsOptionsSchema, hb as ListModelsResult, dD as ListModelsResultSchema, jo as ListRemoteSessionsOptions, lL as ListSkillsRequest, lM as ListSkillsRequestParams, dE as ListSkillsRequestParamsSchema, dF as ListSkillsRequestSchema, lN as ListSkillsResponse, dG as ListSkillsResultSchema, lI as ListToolsRequest, dH as ListToolsRequestParamsSchema, dI as ListToolsRequestSchema, lJ as ListToolsResponse, lK as ListToolsResult, dJ as ListToolsResultSchema, jW as LoadResult, lQ as LoadSessionRequest, dK as LoadSessionRequestParamsSchema, dL as LoadSessionRequestSchema, dM as LoadSessionResponseSchema, lR as LoadSessionResult, dN as LoadSessionResultSchema, jt as LogMetadata, dO as MACHINE_TYPE_WEBSOCKET_OVERRIDES, dP as MANAGED_COMPUTER_MAX_RETRIES, dQ as MCP_AUTH_TIMEOUT, jM as MachineConnectionConfig, jL as MachineInfo, jh as MachineTemplate, ji as MachineTemplateBuildStatus, dR as MachineTemplateBuildStatusSchema, jl as MachineTemplateListResponse, dS as MachineTemplateListResponseSchema, dT as MachineTemplateSchema, dU as MachineType, iA as MarketplacesResource, i4 as McpAuthCompleted, mr as McpAuthCompletedNotification, dV as McpAuthCompletedNotificationSchema, dW as McpAuthOutcome, i3 as McpAuthRequired, mq as McpAuthRequiredNotification, dX as McpAuthRequiredNotificationSchema, n6 as McpHttpServerConfigFields, dY as McpHttpServerConfigFieldsSchema, na as McpRegistryServer, dZ as McpRegistryServerSchema, iB as McpResource, d_ as McpServerConfigSchema, d$ as McpServerStatus, n8 as McpServerStatusInfo, e0 as McpServerStatusInfoSchema, e1 as McpServerType, nc as McpSseServerConfigFields, e2 as McpSseServerConfigFieldsSchema, e3 as McpStatus, hY as McpStatusChanged, mj as McpStatusChangedNotification, e4 as McpStatusChangedNotificationSchema, n9 as McpStatusSummary, e5 as McpStatusSummarySchema, n7 as McpStdioServerConfigFields, e6 as McpStdioServerConfigFieldsSchema, mK as McpToolConfirmationDetails, e7 as McpToolConfirmationDetailsSchema, e8 as McpToolInfoSchema, nd as McpToolInputSchema, e9 as McpToolInputSchemaSchema, j_ as MessageRouterEvents, ea as MessageVisibility, eb as Metric, ju as MetricLabels, nA as MilestoneValidationTriggeredEntry, ec as MilestoneValidationTriggeredEntrySchema, nq as MissionAcceptedEntry, ed as MissionAcceptedEntrySchema, ne as MissionFeature, ee as MissionFeatureSchema, h_ as MissionFeaturesChanged, mx as MissionFeaturesChangedNotification, ef as MissionFeaturesChangedNotificationSchema, i0 as MissionHeartbeat, mz as MissionHeartbeatNotification, eg as MissionHeartbeatNotificationSchema, nr as MissionPausedEntry, eh as MissionPausedEntrySchema, h$ as MissionProgressEntry, my as MissionProgressEntryNotification, ei as MissionProgressEntryNotificationSchema, ns as MissionResumedEntry, ej as MissionResumedEntrySchema, nt as MissionRunStartedEntry, ek as MissionRunStartedEntrySchema, kz as MissionSnapshot, el as MissionSnapshotSchema, jT as MissionSnapshotStore, em as MissionState, hZ as MissionStateChanged, mw as MissionStateChangedNotification, en as MissionStateChangedNotificationSchema, jR as MissionStoreInterface, i2 as MissionWorkerCompleted, mB as MissionWorkerCompletedNotification, eo as MissionWorkerCompletedNotificationSchema, i1 as MissionWorkerStarted, mA as MissionWorkerStartedNotification, ep as MissionWorkerStartedNotificationSchema, iC as MissionsResource, eq as ModelInfoSchema, hc as ModelMetadata, er as ModelMetadataSchema, es as ModelProvider, iD as ModelsResource, et as MultiMissionStateManager, eu as MultiSessionStateManager, k4 as NotificationDispatcherEvents, hv as NotificationHookInput, iF as OpenedSessionSummary, ev as OtelTracing, k1 as OutgoingMessage, kF as OutputFormat, ew as OutputFormatSchema, ex as OutputFormatType, k7 as PendingAskUserRequest, k5 as PendingPermission, jE as PendingRequest, k9 as PendingUserAction, k6 as PermissionRequestHandlerEvents, hU as PermissionResolved, mg as PermissionResolvedNotification, ey as PermissionResolvedNotificationSchema, iE as PluginsResource, hw as PreCompactHookInput, h4 as ProcessExitError, nB as ProgressLogEntry, ez as ProgressLogEntrySchema, eA as ProgressLogEntryType, mH as ProposeMissionConfirmationDetails, eB as ProposeMissionConfirmationDetailsSchema, h5 as ProtocolError, iG as ProxyResource, eC as QueuedUserMessageDisplayGroup, eD as QueuedUserMessageKind, k3 as QueuedUserMessageState, eE as REWIND_TIMEOUT, nG as RedactedThinkingBlock, eF as RedactedThinkingBlockSchema, je as RefreshComputerOptions, jf as RefreshComputerResponse, eG as RefreshComputerResponseSchema, eH as RelayConnectionError, iH as RelayResource, jm as RemoteSession, jn as RemoteSessionListResponse, eI as RemoteSessionListResponseSchema, eJ as RemoteSessionSchema, lS as RemoveMcpServerRequest, eK as RemoveMcpServerRequestParamsSchema, eL as RemoveMcpServerRequestSchema, lT as RemoveMcpServerResponse, eM as RemoveMcpServerResultSchema, lU as RenameSessionRequest, eN as RenameSessionRequestParamsSchema, eO as RenameSessionRequestSchema, lV as RenameSessionResponse, lW as RenameSessionResult, eP as RenameSessionResultSchema, k2 as RequestManagerEvents, n1 as RequestPermissionRequest, n2 as RequestPermissionRequestParams, eQ as RequestPermissionRequestParamsSchema, eR as RequestPermissionRequestSchema, n4 as RequestPermissionResponse, eS as RequestPermissionResponseSchema, n3 as RequestPermissionResult, eT as RequestPermissionResultSchema, n5 as RequestPermissionSelection, jd as RestartComputerOptions, ij as ResumeDaemonSessionOptions, jg as RetryInstallDepsOptions, jw as RetryOptions, jx as RetryWarnLogger, kG as RewindEvictedFile, eU as RewindEvictedFileSchema, kH as RewindFileCreation, eV as RewindFileCreationSchema, kI as RewindFileSnapshot, eW as RewindFileSnapshotSchema, ik as RewindSessionParams, il as RewindSessionResult, eX as SDK_TAG, eY as SDK_VERSION, eZ as SESSION_INIT_TIMEOUT, e_ as SLACK_DELEGATION_MAX_RETRIES, iK as SearchSessionSummary, iJ as SearchSessionsResult, iI as SemanticDiffResource, e$ as ServerRequestHandlerType, jJ as Session, hx as SessionEndHookInput, h6 as SessionError, jN as SessionInitializedOutcome, jK as SessionManagerConfig, iL as SessionMessage, f0 as SessionMetadataSchema, h7 as SessionNotFoundError, mT as SessionNotification, mS as SessionNotificationParams, f1 as SessionNotificationParamsSchema, mR as SessionNotificationPayload, f2 as SessionNotificationPayloadSchema, f3 as SessionNotificationSchema, f4 as SessionNotificationSchemaList, f5 as SessionNotificationType, iM as SessionOperationsResource, j$ as SessionPendingRequest, f6 as SessionPlatform, f7 as SessionReplacedError, f8 as SessionReplacementError, he as SessionSettingsFile, f9 as SessionSettingsFileSchema, fa as SessionSettingsSchema, fb as SessionSourceSchema, hf as SessionStartEvent, fc as SessionStartEventSchema, hy as SessionStartHookInput, hd as SessionSummary, fd as SessionTagSchema, hW as SessionTitleUpdated, mi as SessionTitleUpdatedNotification, fe as SessionTitleUpdatedNotificationSchema, mv as SessionTokenUsageChangedNotification, ff as SessionTokenUsageChangedNotificationSchema, jZ as SessionWebSocketConnectionEvents, hX as SessionWorkingDirectoryChanged, im as SessionsResource, lO as SetSkillDisabledRequest, fg as SetSkillDisabledRequestParamsSchema, fh as SetSkillDisabledRequestSchema, lP as SetSkillDisabledResponse, fi as SetSkillDisabledResultSchema, iN as SettingsResource, hV as SettingsUpdated, mh as SettingsUpdatedNotification, fj as SettingsUpdatedNotificationSchema, mP as SettingsUpdatedPayload, fk as SettingsUpdatedPayloadSchema, nm as SkillDeviation, fl as SkillDeviationSchema, nn as SkillFeedback, fm as SkillFeedbackSchema, kJ as SkillInfo, fn as SkillInfoSchema, fo as SkillLocation, kK as SkillResource, fp as SkillResourceSchema, iO as SkillsResource, iP as SoftwareFactoryActivitiesResource, iQ as SoftwareFactoryChangesResource, iR as SoftwareFactoryEventsResource, iS as SoftwareFactoryResource, iT as SoftwareFactorySignalsResource, iU as SoftwareFactoryWorkstreamsResource, fq as SpanAttribute, fr as SpanEvent, fs as SpanName, ky as SseMcpConfig, ft as SseMcpConfigSchema, iV as SshResource, mI as StartMissionRunConfirmationDetails, fu as StartMissionRunConfirmationDetailsSchema, kx as StdioMcpConfig, fv as StdioMcpConfigSchema, hz as StopHookInput, kb as StoredAskUserAction, ka as StoredPermissionAction, fw as StreamStateTracker, i6 as StructuredOutput, mQ as StructuredOutputError, fx as StructuredOutputErrorSchema, i7 as StructuredOutputFields, mn as StructuredOutputNotification, fy as StructuredOutputNotificationSchema, hA as SubagentStopHookInput, lX as SubmitBugReportRequest, lY as SubmitBugReportRequestParams, fz as SubmitBugReportRequestParamsSchema, fA as SubmitBugReportRequestSchema, lZ as SubmitBugReportResponse, l_ as SubmitBugReportResult, fB as SubmitBugReportResultSchema, l$ as SubmitMcpAuthCodeRequest, m0 as SubmitMcpAuthCodeRequestParams, fC as SubmitMcpAuthCodeRequestSchema, m1 as SubmitMcpAuthCodeResponse, m2 as SubmitMcpAuthCodeResult, fD as SubmitMcpAuthCodeResultSchema, kj as SuccessResult, fE as SuccessResultSchema, jP as TerminalMetadata, jO as TerminalSerializedState, iW as TerminalsResource, nj as TestCase, fF as TestCaseSchema, nk as TestFile, fG as TestFileSchema, nl as Tests, fH as TestsSchema, nC as TextBlock, fI as TextBlockSchema, nF as ThinkingBlock, fJ as ThinkingBlockSchema, hM as ThinkingTextComplete, mp as ThinkingTextCompleteNotification, fK as ThinkingTextCompleteNotificationSchema, hL as ThinkingTextDelta, mo as ThinkingTextDeltaNotification, fL as ThinkingTextDeltaNotificationSchema, h8 as TimeoutError, m3 as ToggleMcpServerRequest, fM as ToggleMcpServerRequestParamsSchema, fN as ToggleMcpServerRequestSchema, m4 as ToggleMcpServerResponse, fO as ToggleMcpServerResultSchema, m5 as ToggleMcpToolRequest, m6 as ToggleMcpToolRequestParams, fP as ToggleMcpToolRequestParamsSchema, fQ as ToggleMcpToolRequestSchema, m7 as ToggleMcpToolResponse, m8 as ToggleMcpToolResult, fR as ToggleMcpToolResultSchema, kw as TokenUsage, fS as TokenUsageSchema, hS as TokenUsageUpdate, hN as ToolCallDelta, mu as ToolCallNotification, fT as ToolCallNotificationSchema, mL as ToolConfirmationDetails, fU as ToolConfirmationDetailsSchema, mM as ToolConfirmationInfo, fV as ToolConfirmationInfoSchema, nb as ToolConfirmationListItem, fW as ToolConfirmationListItemSchema, fX as ToolConfirmationType, hB as ToolHookInput, hQ as ToolProgress, jS as ToolProgressNotifier, mN as ToolProgressUpdate, mc as ToolProgressUpdateNotification, fY as ToolProgressUpdateNotificationSchema, fZ as ToolProgressUpdateSchema, hP as ToolResult, nK as ToolResultBlock, f_ as ToolResultBlockSchema, mb as ToolResultNotification, f$ as ToolResultNotificationSchema, g0 as ToolSelectionOverridesSchema, hO as ToolUse, nH as ToolUseBlock, g1 as ToolUseBlockSchema, g2 as ToolUseSchema, jv as TraceContext, kh as TraceContextMeta, g3 as TraceContextMetaSchema, g4 as TunnelConnection, jB as TunnelConnectionOptions, iX as UnstableResource, jb as UpdateComputerOptions, iY as UpdateCronOptions, iZ as UpdateSessionSettingsOptions, m9 as UpdateSessionSettingsRequest, g5 as UpdateSessionSettingsRequestParamsSchema, g6 as UpdateSessionSettingsRequestSchema, ma as UpdateSessionSettingsResponse, g7 as UpdateSessionSettingsResponseSchema, g8 as UpdateSessionSettingsResultSchema, i_ as UpdatesResource, jU as UseMissionStoreSnapshotParams, hC as UserPromptSubmitHookInput, ni as Verification, ng as VerificationCommand, g9 as VerificationCommandSchema, ga as VerificationSchema, jF as WebSocketConnectionConfig, gb as WebSocketConnectionError, jZ as WebSocketConnectionEvents, gc as WebSocketDaemonTransport, kc as WebSocketDaemonTransportConfig, nw as WorkerCompletedEntry, gd as WorkerCompletedEntrySchema, nx as WorkerFailedEntry, ge as WorkerFailedEntrySchema, ny as WorkerPausedEntry, gf as WorkerPausedEntrySchema, nv as WorkerSelectedFeatureEntry, gg as WorkerSelectedFeatureEntrySchema, nu as WorkerStartedEntry, gh as WorkerStartedEntrySchema, kL as WorkerStateInfo, gi as WorkerStateInfoSchema, hR as WorkingStateChanged, i$ as WorkspaceResource, gj as buildUserMessageContentBlocks, gk as configureDaemonCoreDeps, gl as connectAndAuthenticate, gm as connectToDaemon, gn as connectWithRetry, go as convertNotificationToStreamMessage, gp as createComputer, gq as createResponseSchema, gr as createWebSocketDaemonClient, gs as defaultDaemonCoreDeps, gt as deleteComputer, gu as filterMessagesForUI, gv as getComputer, gw as getComputerByName, gx as getComputerMetrics, gy as getMachineTemplate, gz as getPermissionToolInputForDisplay, gA as getQueuedUserMessageDisplayGroup, gB as getQueuedUserMessageReviewPriority, gC as getSubagentCallingMetadata, gD as getToolResultBlocks, gE as getToolResultToolUseId, gF as hasDecoupledInteractionSettings, gG as hasSubagentSessionTag, gH as inspectJsonRpcEnvelope, gI as isDaemonQueuedMessageKind, gJ as isPendingToolResultMarker, gK as isPersistedHookMessage, gL as isReviewableQueuedMessageKind, gM as listComputers, gN as listMachineTemplates, gO as listRemoteSessions, gP as machineTypeToMachineConnectionType, gQ as orderMessagesByParentChain, gR as recordComputerConnectSli, gS as refreshComputer, gT as repairParentChainCorruption, gU as restartComputer, gV as retryInstallDeps, gW as retryWithLogger, gX as sumTokenUsage, gY as summarizeSessionToolUsage, gZ as toError, g_ as updateComputer } from './index-C06W9tbN.mjs';
|
|
1
|
+
import { D as DaemonClientTransport, a as DaemonIpcMessageChannel, b as DaemonClientTransportKind, J as JsonRpcMessage, c as DaemonClientTransportEvents, I as InProcessDaemonClientTransportOptions, S as SessionNotificationEvent, R as RequestPermissionEvent, A as AskUserEvent, P as PickOptionsEvent, L as LogMetadata, d as ProcessTransportOptions, e as DroidObservability, f as DroidClientOptions, g as InitializeSessionRequestParams, h as InitializeSessionResponse, i as LoadSessionRequestParams, j as LoadSessionResponse, k as AddUserMessageParams, l as AddUserMessageResponse, m as AppendMessagesParams, n as AppendMessagesResponse, o as ResolveQueuedUserMessageParams, p as ResolveQueuedUserMessageResponse, q as InterruptSessionParams, r as InterruptSessionResponse, C as CloseSessionParams, s as CloseSessionResponse, K as KillWorkerSessionParams, t as KillWorkerSessionResponse, U as UpdateSessionSettingsRequestParams, u as SessionTagsUpdate, v as UpdateSessionSettingsResponse, w as ChangeWorkingDirectoryParams, x as ChangeWorkingDirectoryResponse, y as SettingsLevel, T as ToggleMcpServerResponseSchema, z as AuthenticateMcpServerResponseSchema, B as CancelMcpAuthResponseSchema, E as ClearMcpAuthResponseSchema, F as AddMcpServerRequest, G as AddMcpServerResponseSchema, H as RemoveMcpServerResponseSchema, M as ListModelsOptions, N as ListModelsResponseSchema, O as ListMcpRegistryResponseSchema, Q as RefreshConnectorToolCatalogRequest, V as RefreshConnectorToolCatalogResponseSchema, W as ListMcpToolsResponseSchema, X as ListToolsRequestParams, Y as ListToolsResponse, Z as ListMcpServersResponseSchema, _ as ToggleMcpToolResponseSchema, $ as SubmitMcpAuthCodeRequestParamsSchema, a0 as SubmitMcpAuthCodeResponseSchema, a1 as SubmitMcpAuthErrorRequestParamsSchema, a2 as SubmitMcpAuthErrorResponseSchema, a3 as ListSkillsRequest, a4 as ListSkillsResponseSchema, a5 as SetSkillDisabledRequest, a6 as SetSkillDisabledResponseSchema, a7 as ListCommandsResponseSchema, a8 as GetContextStatsResponseSchema, a9 as GetContextBreakdownResponseSchema, aa as KillBackgroundProcessResponseSchema, ab as SubmitBugReportRequest, ac as SubmitBugReportResponseSchema, ad as GetRewindInfoResponseSchema, ae as ExecuteRewindResponseSchema, af as CompactSessionResponseSchema, ag as GetHandoffSummaryResponseSchema, ah as SummarizeForMembersResponseSchema, ai as ForkSessionRequestParamsSchema, aj as ForkSessionResponseSchema, ak as RenameSessionRequestParams, al as RenameSessionResponseSchema, am as WarmupCacheResponseSchema, an as TraceContextMeta, ao as RequestPermissionHandlerResult, ap as ToolConfirmationOutcome, aq as RequestPermissionResult, ar as AskUserResult, as as PickOptionsResult, at as StringFramedDroidClientTransport, au as DroidClientTransport, av as McpServerConfig, aw as HttpMcpConfig, ax as ToolSelectionOverrides, ay as AutonomyLevel, az as DroidInteractionMode, aA as ReasoningEffort, aB as SystemPromptConfig, aC as SessionSource, aD as SessionTag, aE as HandlerOptions, aF as DroidResultMessage, aG as SessionSettings, aH as MessageOptions, aI as DroidStreamMessage, aJ as DroidStreamEvent, aK as UpdateSessionSettingsResult, aL as AddMcpServerRequestParams, aM as AddMcpServerResult, aN as RemoveMcpServerRequestParams, aO as RemoveMcpServerResult, aP as ToggleMcpServerRequestParams, aQ as ToggleMcpServerResult, aR as ListMcpServersResult, aS as McpToolInfo, aT as ExecToolInfo, aU as AuthenticateMcpServerRequestParams, aV as AuthenticateMcpServerResult, aW as ListSkillsRequestParams, aX as ListSkillsResult, aY as SetSkillDisabledRequestParams, aZ as SetSkillDisabledResult, a_ as GetRewindInfoRequestParams, a$ as GetRewindInfoResult, b0 as ExecuteRewindRequestParams, b1 as SessionRewindOutcome, b2 as CompactSessionRequestParams, b3 as SessionCompactionOutcome, b4 as ForkSessionRequestParams, b5 as GetContextStatsResult, b6 as RenameSessionRequestParams$1, b7 as ListSessionsOptions, b8 as SessionMetadata, b9 as ModelInfo } from './index-Cf2WtJqJ.mjs';
|
|
2
|
+
export { ba as AbortError, bb as AddMcpServerRequest, bc as AddMcpServerRequestParamsSchema, bd as AddMcpServerRequestSchema, be as AddMcpServerResponse, bf as AddMcpServerResultSchema, bg as AddMessageResult, bh as AddUserMessageRequest, bi as AddUserMessageRequestParams, bj as AddUserMessageRequestParamsSchema, bk as AddUserMessageRequestSchema, bl as AddUserMessageResponse, bm as AddUserMessageResponseSchema, bn as AddUserMessageResult, bo as AddUserMessageResultSchema, bp as AnswerRemoteSessionElicitationOptions, bq as AnswerSessionElicitationRequest, br as AnswerSessionElicitationResponse, bs as AnswerSessionElicitationResponseSchema, bt as AppendContextSessionOptions, bu as AppendContextSessionResponse, bv as ApplyPatchToolConfirmationDetails, bw as ApplyPatchToolConfirmationDetailsSchema, bx as ArchiveSessionOptions, by as AskUserCollectedAnswer, bz as AskUserCollectedAnswerSchema, bA as AskUserConfirmationDetails, bB as AskUserConfirmationDetailsSchema, bC as AskUserQuestion, bD as AskUserQuestionSchema, bE as AskUserRequest, bF as AskUserRequestHandlerEvents, bG as AskUserRequestParams, bH as AskUserRequestParamsSchema, bI as AskUserRequestSchema, bJ as AskUserResponse, bK as AskUserResponseSchema, bL as AskUserResult, bM as AskUserResultSchema, bN as AssistantMessageRetracted, bO as AssistantMessageRetractedNotification, bP as AssistantMessageRetractedNotificationSchema, bQ as AssistantTextComplete, bR as AssistantTextCompleteNotification, bS as AssistantTextCompleteNotificationSchema, bT as AssistantTextDelta, bU as AssistantTextDeltaNotification, bV as AssistantTextDeltaNotificationSchema, bW as Attribute, bX as Attributes, bY as AuthenticateMcpServerRequest, bZ as AuthenticateMcpServerRequestParamsSchema, b_ as AuthenticateMcpServerRequestSchema, b$ as AuthenticateMcpServerResponse, c0 as AuthenticateMcpServerResultSchema, c1 as AutomationsResource, c2 as AvailableModelConfig, c3 as AvailableModelConfigSchema, c4 as Base64ImageSource, c5 as Base64ImageSourceSchema, c6 as BaseDroidHookInput, c7 as BaseNotification, c8 as BaseNotificationSchema, c9 as BaseRequest, ca as BaseRequestSchema, cb as BaseResponseFailure, cc as BaseResponseFailureSchema, cd as BaseResponseSuccess, ce as BaseResponseSuccessSchema, cf as COMPACTION_TIMEOUT, cg as CancelMcpAuthRequest, ch as CancelMcpAuthRequestParams, ci as CancelMcpAuthRequestParamsSchema, cj as CancelMcpAuthRequestSchema, ck as CancelMcpAuthResponse, cl as CancelMcpAuthResult, cm as CancelMcpAuthResultSchema, cn as ChangeWorkingDirectoryRequest, co as ChangeWorkingDirectoryRequestParams, cp as ChangeWorkingDirectoryRequestParamsSchema, cq as ChangeWorkingDirectoryRequestSchema, cr as ChangeWorkingDirectoryResponse, cs as ChangeWorkingDirectoryResponseSchema, ct as ChangeWorkingDirectoryResult, cu as ChangeWorkingDirectoryResultSchema, cv as ClearMcpAuthRequest, cw as ClearMcpAuthRequestParams, cx as ClearMcpAuthRequestParamsSchema, cy as ClearMcpAuthRequestSchema, cz as ClearMcpAuthResponse, cA as ClearMcpAuthResult, cB as ClearMcpAuthResultSchema, cC as CliRequestOrNotification, cD as CliRequestOrNotificationSchema, cE as ClientAskUserHandler, cF as ClientDestroyedError, cG as ClientPermissionHandler, cH as ClientRequest, cI as ClientRequestSchema, cJ as ClientUiSurface, cK as CloseSessionRequest, cL as CloseSessionRequestParams, cM as CloseSessionRequestParamsSchema, cN as CloseSessionRequestSchema, cO as CloseSessionResponse, cP as CloseSessionResponseSchema, cQ as CloseSessionResult, cR as CloseSessionResultSchema, cS as CommandsResource, cT as CompactSessionRequest, cU as CompactSessionRequestParamsSchema, cV as CompactSessionRequestSchema, cW as CompactSessionResponse, cX as CompactSessionResult, cY as CompactSessionResultSchema, cZ as ComputeLimitExceededError, c_ as Computer, c$ as ComputerApiOptions, d0 as ComputerConnectAttemptContext, d1 as ComputerConnectAttemptTrigger, d2 as ComputerConnectSliOptions, d3 as ComputerConnectSliRunContext, d4 as ComputerConnectStartType, d5 as ComputerListResponse, d6 as ComputerListResponseSchema, d7 as ComputerMetric, d8 as ComputerMetricSchema, d9 as ComputerMetricsResponse, da as ComputerMetricsResponseSchema, db as ComputerSchema, dc as ConcurrentStreamError, dd as ConnectToDaemonOptions, de as ConnectedDroid, df as ConnectedDroidSession, dg as ConnectionClosedError, dh as ConnectionError, di as ConnectionFailureReason, dj as ContentBlock, dk as ContentBlockSchema, dl as ContextApiError, dm as ContextApiOptions, dn as ContextBreakdownCategorySchema, dp as ContextBreakdownResult, dq as ContextBreakdownResultSchema, dr as ContextDocument, ds as ContextDocumentMetadata, dt as ContextFileApiOptions, du as ContextFileMetadata, dv as ContextFilePartApiOptions, dw as ContextFileUpload, dx as ContextSession, dy as ContextSessionApiOptions, dz as ContextSpace, dA as ContextSpaceApiOptions, dB as ContextStats, dC as ContextStatsAccuracy, dD as ContextStatsSchema, dE as CreateComputerOptions, dF as CreateContextDocumentOptions, dG as CreateContextFileOptions, dH as CreateContextSpaceOptions, dI as CreateCronOptions, dJ as CreateDaemonSessionOptions, dK as CreateMessage, dL as CreateMessageNotification, dM as CreateMessageNotificationSchema, dN as CreateToolConfirmationDetails, dO as CreateToolConfirmationDetailsSchema, dP as CronsResource, dQ as CustomModelsResource, dR as DEFAULT_LOCAL_DAEMON_WS_URL, dS as DEFAULT_REQUEST_TIMEOUT, dT as DaemonAuth, dU as DaemonAuthenticationCredential, dV as DaemonAuthenticationMode, dW as DaemonClient, dX as DaemonClientConfig, dY as DaemonClientMetaError, dZ as DaemonCoreDeps, d_ as DaemonDroidEvent, d$ as DaemonRequest, e0 as DaemonRequestPermissionSchema, e1 as DaemonResources, e2 as DaemonSessionController, e3 as DaemonSessionSummary, e4 as DaemonSpan, e5 as DecompSessionType, e6 as DeleteComputerOptions, e7 as DeleteContextDocumentOptions, e8 as DiscoveredIssue, e9 as DiscoveredIssueSchema, ea as DismissalRecord, eb as DismissalRecordSchema, ec as DismissalType, ed as DocumentBlock, ee as DocumentBlockSchema, ef as DocumentSource, eg as DocumentSourceSchema, eh as DroidAssistantMessage, ei as DroidAttributeValue, ej as DroidAttributes, ek as DroidClientError, el as DroidClientMethod, em as DroidConnectionEndedError, en as DroidErrorMessage, eo as DroidErrorType, ep as DroidEvent, eq as DroidHookEvent, er as DroidHookEventSchema, es as DroidHookExecutionResult, et as DroidHookExecutionResultSchema, eu as DroidHookInput, ev as DroidHookOutput, ew as DroidHookOutputSchema, ex as DroidHookSpecificOutputSchema, ey as DroidLogEvent, ez as DroidLogger, eA as DroidMessage, eB as DroidMessageType, eC as DroidMetricEvent, eD as DroidMetricSink, eE as DroidPermissionMode, eF as DroidSerializedError, eG as DroidServerMethod, eH as DroidToolCallMessage, eI as DroidToolResultMessage, eJ as DroidTraceContextCarrier, eK as DroidTraceContextProvider, eL as DroidUserMessage, eM as DroidWorkingState, eN as DroidWorkingStateChangedNotification, eO as DroidWorkingStateChangedNotificationSchema, eP as EditToolConfirmationDetails, eQ as EditToolConfirmationDetailsSchema, eR as EmptyResult, eS as EmptyResultSchema, eT as Environment, eU as EnvironmentListResponse, eV as EnvironmentListResponseSchema, eW as EnvironmentSchema, eX as ErrorDetail, eY as ErrorDetailSchema, eZ as ErrorEvent, e_ as ErrorNotification, e$ as ErrorNotificationSchema, f0 as ExecToolInfoSchema, f1 as ExecToolInfoWithSchemas, f2 as ExecToolInfoWithSchemasSchema, f3 as ExecuteRewindRequest, f4 as ExecuteRewindRequestParamsSchema, f5 as ExecuteRewindRequestSchema, f6 as ExecuteRewindResponse, f7 as ExecuteRewindResult, f8 as ExecuteRewindResultSchema, f9 as ExecuteToolConfirmationDetails, fa as ExecuteToolConfirmationDetailsSchema, fb as ExitSpecModeConfirmationDetails, fc as ExitSpecModeConfirmationDetailsSchema, fd as FACTORY_CLIENT_HEADER, fe as FACTORY_CLIENT_VERSION, ff as FACTORY_PROTOCOL_VERSION, fg as FactoryApiOptions, fh as FactoryDaemonConfig, fi as FactoryDaemonTransport, fj as FactoryDroidEvents, fk as FactoryDroidMessage, fl as FactoryDroidMessageRole, fm as FactoryDroidMessageSchema, fn as FeatureStatus, fo as FeatureSuccessState, fp as FeatureSuccessStateSchema, fq as FeedbackResource, fr as FileTransfersResource, fs as ForkSessionOptions, ft as ForkSessionRequest, fu as ForkSessionRequestSchema, fv as ForkSessionResponse, fw as ForkSessionResult, fx as ForkSessionResultSchema, fy as GetComputerByNameOptions, fz as GetComputerMetricsOptions, fA as GetComputerOptions, fB as GetContextDocumentByPathOptions, fC as GetContextDocumentOptions, fD as GetContextSessionOptions, fE as GetContextSpaceOptions, fF as GetContextStatsRequest, fG as GetContextStatsRequestParams, fH as GetContextStatsRequestParamsSchema, fI as GetContextStatsRequestSchema, fJ as GetContextStatsResponse, dD as GetContextStatsResultSchema, fK as GetMachineTemplateOptions, fL as GetRewindInfoRequest, fM as GetRewindInfoRequestParamsSchema, fN as GetRewindInfoRequestSchema, fO as GetRewindInfoResponse, fP as GetRewindInfoResultSchema, fQ as GetSessionMessagesOptions, fR as GitRepoInfo, fS as GitRepoInfoSchema, fT as GitResource, fU as Handoff, fV as HandoffItemsDismissedEntry, fW as HandoffItemsDismissedEntrySchema, fX as HandoffSchema, fY as HookCommand, fZ as HookCommandSchema, f_ as HookExecution, f$ as HookExecutionCompletedNotification, g0 as HookExecutionCompletedNotificationSchema, g1 as HookExecutionStartedNotification, g2 as HookExecutionStartedNotificationSchema, g3 as HookResult, g4 as HookResultSchema, g5 as HttpHeader, g6 as HttpHeaderSchema, g7 as HttpMcpConfigSchema, g8 as IDaemonClient, g9 as IPC_DAEMON_URL, ga as IToolProgressStore, gb as ImageBlock, gc as ImageBlockSchema, gd as InProcessMessageHandler, ge as InitializeResult, gf as InitializeSessionRequest, gg as InitializeSessionRequestParamsSchema, gh as InitializeSessionRequestSchema, gi as InitializeSessionResponseSchema, gj as InitializeSessionResult, gk as InitializeSessionResultSchema, gl as InteractiveCheck, gm as InteractiveCheckSchema, gn as InterruptResult, go as InterruptSessionRequest, gp as InterruptSessionRequestParams, gq as InterruptSessionRequestParamsSchema, gr as InterruptSessionRequestSchema, gs as InterruptSessionResponse, gt as InterruptSessionResponseSchema, gu as InterruptSessionResult, gv as InterruptSessionResultSchema, gw as InvalidSessionCwdError, gx as IssueSeverity, gy as JSONRPC_VERSION, gz as JsonArray, gA as JsonArraySchema, gB as JsonObject, gC as JsonObjectSchema, gD as JsonPrimitive, gE as JsonRpcEnvelope, gF as JsonRpcEnvelopeSchema, gG as JsonRpcError, gH as JsonRpcErrorCode, gI as JsonRpcErrorSchema, gJ as JsonRpcMessage, gK as JsonRpcMessageSchema, gL as JsonRpcMessageType, gM as JsonRpcNotification, gN as JsonRpcNotificationSchema, gO as JsonRpcRequest, gP as JsonRpcRequestError, gQ as JsonRpcRequestSchema, gR as JsonRpcResponse, gS as JsonRpcResponseFailure, gT as JsonRpcResponseFailureSchema, gU as JsonRpcResponseSchema, gV as JsonRpcResponseSuccess, gW as JsonRpcResponseSuccessSchema, gX as JsonValue, gY as JsonValueSchema, gZ as KillWorkerSessionRequest, g_ as KillWorkerSessionRequestParams, g$ as KillWorkerSessionRequestParamsSchema, h0 as KillWorkerSessionRequestSchema, h1 as KillWorkerSessionResponse, h2 as KillWorkerSessionResponseSchema, h3 as KillWorkerSessionResult, h4 as KillWorkerSessionResultSchema, h5 as LEGACY_FACTORY_API_VERSION, h6 as LOCAL_MACHINE_ID, h7 as ListComputersOptions, h8 as ListContextDocumentsOptions, h9 as ListContextDocumentsResponse, ha as ListContextDocumentsResult, hb as ListContextSessionsOptions, hc as ListContextSessionsResponse, hd as ListContextSessionsResult, he as ListContextSpacesOptions, hf as ListContextSpacesResponse, hg as ListDaemonSessionsOptions, hh as ListEnvironmentsOptions, hi as ListMachineTemplatesOptions, hj as ListMcpRegistryRequest, hk as ListMcpRegistryRequestParams, hl as ListMcpRegistryRequestParamsSchema, hm as ListMcpRegistryRequestSchema, hn as ListMcpRegistryResponse, ho as ListMcpRegistryResult, hp as ListMcpRegistryResultSchema, hq as ListMcpServersRequest, hr as ListMcpServersRequestParams, hs as ListMcpServersRequestParamsSchema, ht as ListMcpServersRequestSchema, hu as ListMcpServersResponse, hv as ListMcpServersResultSchema, hw as ListMcpToolsRequest, hx as ListMcpToolsRequestParams, hy as ListMcpToolsRequestParamsSchema, hz as ListMcpToolsRequestSchema, hA as ListMcpToolsResponse, hB as ListMcpToolsResult, hC as ListMcpToolsResultSchema, hD as ListModelsOptionsSchema, hE as ListModelsResult, hF as ListModelsResultSchema, hG as ListRemoteSessionElicitationsOptions, hH as ListRemoteSessionsOptions, hI as ListSessionElicitationsResponse, hJ as ListSessionElicitationsResponseSchema, hK as ListSkillsRequest, hL as ListSkillsRequestParamsSchema, hM as ListSkillsRequestSchema, hN as ListSkillsResponse, hO as ListSkillsResultSchema, hP as ListToolsRequest, hQ as ListToolsRequestParamsSchema, hR as ListToolsRequestSchema, hS as ListToolsResponseSchema, hT as ListToolsResponseWithSchemas, hU as ListToolsResponseWithSchemasSchema, hV as ListToolsResult, hW as ListToolsResultSchema, hX as ListToolsResultWithSchemas, hY as ListToolsResultWithSchemasSchema, hZ as LoadResult, h_ as LoadSessionRequest, h$ as LoadSessionRequestParamsSchema, i0 as LoadSessionRequestSchema, i1 as LoadSessionResponseSchema, i2 as LoadSessionResult, i3 as LoadSessionResultSchema, i4 as LogMetadata, i5 as MACHINE_TYPE_WEBSOCKET_OVERRIDES, i6 as MANAGED_COMPUTER_MAX_RETRIES, i7 as MCP_AUTH_TIMEOUT, i8 as MachineConnectionConfig, i9 as MachineInfo, ia as MachineTemplate, ib as MachineTemplateBuildStatus, ic as MachineTemplateBuildStatusSchema, id as MachineTemplateListResponse, ie as MachineTemplateListResponseSchema, ig as MachineTemplateSchema, ih as MachineType, ii as MarketplacesResource, ij as McpAuthCompleted, ik as McpAuthCompletedNotification, il as McpAuthCompletedNotificationSchema, im as McpAuthOutcome, io as McpAuthRequired, ip as McpAuthRequiredNotification, iq as McpAuthRequiredNotificationSchema, ir as McpHttpServerConfigFields, is as McpHttpServerConfigFieldsSchema, it as McpRegistryServer, iu as McpRegistryServerSchema, iv as McpResource, iw as McpServerConfigSchema, ix as McpServerStatus, iy as McpServerStatusInfo, iz as McpServerStatusInfoSchema, iA as McpServerType, iB as McpSseServerConfigFields, iC as McpSseServerConfigFieldsSchema, iD as McpStatus, iE as McpStatusChanged, iF as McpStatusChangedNotification, iG as McpStatusChangedNotificationSchema, iH as McpStatusSummary, iI as McpStatusSummarySchema, iJ as McpStdioServerConfigFields, iK as McpStdioServerConfigFieldsSchema, iL as McpToolConfirmationDetails, iM as McpToolConfirmationDetailsSchema, iN as McpToolInfoSchema, iO as McpToolInputSchema, iP as McpToolInputSchemaSchema, iQ as MessageRouterEvents, iR as MessageVisibility, iS as Metric, iT as MetricLabels, iU as MilestoneValidationTriggeredEntry, iV as MilestoneValidationTriggeredEntrySchema, iW as MissionAcceptedEntry, iX as MissionAcceptedEntrySchema, iY as MissionFeature, iZ as MissionFeatureSchema, i_ as MissionFeaturesChanged, i$ as MissionFeaturesChangedNotification, j0 as MissionFeaturesChangedNotificationSchema, j1 as MissionHeartbeat, j2 as MissionHeartbeatNotification, j3 as MissionHeartbeatNotificationSchema, j4 as MissionPausedEntry, j5 as MissionPausedEntrySchema, j6 as MissionProgressEntry, j7 as MissionProgressEntryNotification, j8 as MissionProgressEntryNotificationSchema, j9 as MissionResumedEntry, ja as MissionResumedEntrySchema, jb as MissionRunStartedEntry, jc as MissionRunStartedEntrySchema, jd as MissionSnapshot, je as MissionSnapshotSchema, jf as MissionSnapshotStore, jg as MissionState, jh as MissionStateChanged, ji as MissionStateChangedNotification, jj as MissionStateChangedNotificationSchema, jk as MissionStoreInterface, jl as MissionWorkerCompleted, jm as MissionWorkerCompletedNotification, jn as MissionWorkerCompletedNotificationSchema, jo as MissionWorkerStarted, jp as MissionWorkerStartedNotification, jq as MissionWorkerStartedNotificationSchema, jr as MissionsResource, js as ModelInfoSchema, jt as ModelMetadata, ju as ModelMetadataSchema, jv as ModelProvider, jw as ModelsResource, jx as MultiMissionStateManager, jy as MultiSessionStateManager, jz as NotificationDispatcherEvents, jA as NotificationHookInput, jB as OpenedSessionSummary, jC as OtelTracing, jD as OutgoingMessage, jE as OutputFormat, jF as OutputFormatSchema, jG as OutputFormatType, jH as PendingAskUserRequest, jI as PendingPermission, jJ as PendingRequest, jK as PendingUserAction, jL as PermissionRequestHandlerEvents, jM as PermissionResolved, jN as PermissionResolvedNotification, jO as PermissionResolvedNotificationSchema, jP as PickOptionsRequest, jQ as PickOptionsRequestParams, jR as PickOptionsRequestParamsSchema, jS as PickOptionsRequestSchema, jT as PickOptionsResponse, jU as PickOptionsResponseSchema, jV as PickOptionsResult, jW as PickOptionsResultSchema, jX as PickOptionsRow, jY as PickOptionsRowSchema, jZ as PickOptionsUnavailableError, j_ as PluginsResource, j$ as PreCompactHookInput, k0 as ProcessExitError, k1 as ProgressLogEntry, k2 as ProgressLogEntrySchema, k3 as ProgressLogEntryType, k4 as ProposeMissionConfirmationDetails, k5 as ProposeMissionConfirmationDetailsSchema, k6 as ProtocolError, k7 as ProxyResource, k8 as QueuedUserMessageDisplayGroup, k9 as QueuedUserMessageKind, ka as QueuedUserMessageState, kb as REWIND_TIMEOUT, kc as ReadContextSessionRecordsOptions, kd as ReadContextSessionRecordsResponse, ke as RedactedThinkingBlock, kf as RedactedThinkingBlockSchema, kg as RefreshComputerOptions, kh as RefreshComputerResponse, ki as RefreshComputerResponseSchema, kj as RegisterContextSessionOptions, kk as RelayConnectionError, kl as RelayResource, km as RemoteSession, kn as RemoteSessionListResponse, ko as RemoteSessionListResponseSchema, kp as RemoteSessionSchema, kq as RemoveMcpServerRequest, kr as RemoveMcpServerRequestParamsSchema, ks as RemoveMcpServerRequestSchema, kt as RemoveMcpServerResponse, ku as RemoveMcpServerResultSchema, kv as RenameSessionRequest, kw as RenameSessionRequestParamsSchema, kx as RenameSessionRequestSchema, ky as RenameSessionResponse, kz as RenameSessionResult, kA as RenameSessionResultSchema, kB as RequestCancelledError, kC as RequestManagerEvents, kD as RequestPermissionRequest, kE as RequestPermissionRequestParams, kF as RequestPermissionRequestParamsSchema, kG as RequestPermissionRequestSchema, kH as RequestPermissionResponse, kI as RequestPermissionResponseSchema, kJ as RequestPermissionResult, kK as RequestPermissionResultSchema, kL as RequestPermissionSelection, kM as RestartComputerOptions, kN as ResumeDaemonSessionOptions, kO as RetryInstallDepsOptions, kP as RetryOptions, kQ as RetryWarnLogger, kR as RewindEvictedFile, kS as RewindEvictedFileSchema, kT as RewindFileCreation, kU as RewindFileCreationSchema, kV as RewindFileSnapshot, kW as RewindFileSnapshotSchema, kX as RewindSessionParams, kY as RewindSessionResult, kZ as SDK_TAG, k_ as SDK_VERSION, k$ as SESSION_INIT_TIMEOUT, l0 as SLACK_DELEGATION_MAX_RETRIES, l1 as SearchSessionSummary, l2 as SearchSessionsResult, l3 as SemanticDiffResource, l4 as ServerRequestHandlerType, l5 as Session, l6 as SessionArtifact, l7 as SessionArtifactAction, l8 as SessionArtifactKind, l9 as SessionArtifactProvider, la as SessionArtifactSchema, lb as SessionArtifactSource, lc as SessionArtifactsSchema, ld as SessionElicitation, le as SessionElicitationSchema, lf as SessionEndHookInput, lg as SessionError, lh as SessionInitializedOutcome, li as SessionManagerConfig, lj as SessionMessage, lk as SessionMetadataSchema, ll as SessionNotFoundError, lm as SessionNotification, ln as SessionNotificationParams, lo as SessionNotificationParamsSchema, lp as SessionNotificationPayload, lq as SessionNotificationPayloadSchema, lr as SessionNotificationSchema, ls as SessionNotificationSchemaList, lt as SessionNotificationType, lu as SessionOperationsResource, lv as SessionPendingRequest, lw as SessionPlatform, lx as SessionReplacedError, ly as SessionReplacementError, lz as SessionSettingsFile, lA as SessionSettingsFileSchema, lB as SessionSettingsSchema, lC as SessionSourceSchema, lD as SessionStartEvent, lE as SessionStartEventSchema, lF as SessionStartHookInput, lG as SessionSummary, lH as SessionTagSchema, lI as SessionTitleUpdated, lJ as SessionTitleUpdatedNotification, lK as SessionTitleUpdatedNotificationSchema, lL as SessionTokenUsageChangedNotification, lM as SessionTokenUsageChangedNotificationSchema, lN as SessionWebSocketConnectionEvents, lO as SessionWorkingDirectoryChanged, lP as SessionsResource, lQ as SetSkillDisabledRequest, lR as SetSkillDisabledRequestParamsSchema, lS as SetSkillDisabledRequestSchema, lT as SetSkillDisabledResponse, lU as SetSkillDisabledResultSchema, lV as SettingsResource, lW as SettingsUpdated, lX as SettingsUpdatedNotification, lY as SettingsUpdatedNotificationSchema, lZ as SettingsUpdatedPayload, l_ as SettingsUpdatedPayloadSchema, l$ as SkillDeviation, m0 as SkillDeviationSchema, m1 as SkillFeedback, m2 as SkillFeedbackSchema, m3 as SkillInfo, m4 as SkillInfoSchema, m5 as SkillLocation, m6 as SkillResource, m7 as SkillResourceSchema, m8 as SkillsResource, m9 as SpanAttribute, ma as SpanEvent, mb as SpanName, mc as SseMcpConfig, md as SseMcpConfigSchema, me as SshResource, mf as StartMissionRunConfirmationDetails, mg as StartMissionRunConfirmationDetailsSchema, mh as StartWorkstreamOptions, mi as StdioMcpConfig, mj as StdioMcpConfigSchema, mk as StopHookInput, ml as StoredAskUserAction, mm as StoredPermissionAction, mn as StreamStateTracker, mo as StructuredOutput, mp as StructuredOutputError, mq as StructuredOutputErrorSchema, mr as StructuredOutputFields, ms as StructuredOutputNotification, mt as StructuredOutputNotificationSchema, mu as SubagentStopHookInput, mv as SubmitBugReportRequest, mw as SubmitBugReportRequestParams, mx as SubmitBugReportRequestParamsSchema, my as SubmitBugReportRequestSchema, mz as SubmitBugReportResponse, mA as SubmitBugReportResult, mB as SubmitBugReportResultSchema, mC as SubmitMcpAuthCodeRequest, mD as SubmitMcpAuthCodeRequestParams, mE as SubmitMcpAuthCodeRequestSchema, mF as SubmitMcpAuthCodeResponse, mG as SubmitMcpAuthCodeResult, mH as SubmitMcpAuthCodeResultSchema, mI as SuccessResult, mJ as SuccessResultSchema, mK as TerminalMetadata, mL as TerminalSerializedState, mM as TerminalsResource, mN as TestCase, mO as TestCaseSchema, mP as TestFile, mQ as TestFileSchema, mR as Tests, mS as TestsSchema, mT as TextBlock, mU as TextBlockSchema, mV as ThinkingBlock, mW as ThinkingBlockSchema, mX as ThinkingTextComplete, mY as ThinkingTextCompleteNotification, mZ as ThinkingTextCompleteNotificationSchema, m_ as ThinkingTextDelta, m$ as ThinkingTextDeltaNotification, n0 as ThinkingTextDeltaNotificationSchema, n1 as TimeoutError, n2 as ToggleMcpServerRequest, n3 as ToggleMcpServerRequestParamsSchema, n4 as ToggleMcpServerRequestSchema, n5 as ToggleMcpServerResponse, n6 as ToggleMcpServerResultSchema, n7 as ToggleMcpToolRequest, n8 as ToggleMcpToolRequestParams, n9 as ToggleMcpToolRequestParamsSchema, na as ToggleMcpToolRequestSchema, nb as ToggleMcpToolResponse, nc as ToggleMcpToolResult, nd as ToggleMcpToolResultSchema, ne as TokenUsage, nf as TokenUsageSchema, ng as TokenUsageUpdate, nh as ToolCallDelta, ni as ToolCallNotification, nj as ToolCallNotificationSchema, nk as ToolConfirmationDetails, nl as ToolConfirmationDetailsSchema, nm as ToolConfirmationInfo, nn as ToolConfirmationInfoSchema, no as ToolConfirmationListItem, np as ToolConfirmationListItemSchema, nq as ToolConfirmationType, nr as ToolHookInput, ns as ToolJsonSchema, nt as ToolJsonSchemaSchema, nu as ToolProgress, nv as ToolProgressNotifier, nw as ToolProgressUpdate, nx as ToolProgressUpdateNotification, ny as ToolProgressUpdateNotificationSchema, nz as ToolProgressUpdateSchema, nA as ToolResult, nB as ToolResultBlock, nC as ToolResultBlockSchema, nD as ToolResultNotification, nE as ToolResultNotificationSchema, nF as ToolResultSchemaDescriptor, nG as ToolResultSchemaDescriptorSchema, nH as ToolSchemas, nI as ToolSchemasSchema, nJ as ToolSelectionOverridesSchema, nK as ToolSource, nL as ToolSourceSchema, nM as ToolUse, nN as ToolUseBlock, nO as ToolUseBlockSchema, nP as ToolUseSchema, nQ as TraceContext, nR as TraceContextMeta, nS as TraceContextMetaSchema, nT as TunnelConnection, nU as TunnelConnectionOptions, nV as UnstableResource, nW as UpdateComputerOptions, nX as UpdateContextDocumentOptions, nY as UpdateCronOptions, nZ as UpdateSessionSettingsOptions, n_ as UpdateSessionSettingsRequest, n$ as UpdateSessionSettingsRequestParamsSchema, o0 as UpdateSessionSettingsRequestSchema, o1 as UpdateSessionSettingsResponse, o2 as UpdateSessionSettingsResponseSchema, o3 as UpdateSessionSettingsResultSchema, o4 as UpdatesResource, o5 as UploadContextFilePartOptions, o6 as UseMissionStoreSnapshotParams, o7 as UserPromptSubmitHookInput, o8 as Verification, o9 as VerificationCommand, oa as VerificationCommandSchema, ob as VerificationSchema, oc as WebSocketConnectionConfig, od as WebSocketConnectionError, lN as WebSocketConnectionEvents, oe as WebSocketDaemonTransport, of as WebSocketDaemonTransportConfig, og as WorkerCompletedEntry, oh as WorkerCompletedEntrySchema, oi as WorkerFailedEntry, oj as WorkerFailedEntrySchema, ok as WorkerPausedEntry, ol as WorkerPausedEntrySchema, om as WorkerSelectedFeatureEntry, on as WorkerSelectedFeatureEntrySchema, oo as WorkerStartedEntry, op as WorkerStartedEntrySchema, oq as WorkerStateInfo, or as WorkerStateInfoSchema, os as WorkingStateChanged, ot as WorkspaceResource, ou as WorkstreamMachine, ov as WorkstreamMachineTargetKind, ow as WorkstreamSettings, ox as WorkstreamSettingsUpdate, oy as WorkstreamSummary, oz as WorkstreamsResource, oA as answerRemoteSessionElicitation, oB as appendContextSession, oC as buildUserMessageContentBlocks, oD as configureDaemonCoreDeps, oE as connectAndAuthenticate, oF as connectToDaemon, oG as connectWithRetry, oH as convertNotificationToStreamMessage, oI as createComputer, oJ as createContextDocument, oK as createContextFile, oL as createContextSpace, oM as createResponseSchema, oN as createWebSocketDaemonClient, oO as defaultDaemonCoreDeps, oP as deleteComputer, oQ as deleteContextDocument, oR as deleteContextFile, oS as filterMessagesForUI, oT as getComputer, oU as getComputerByName, oV as getComputerMetrics, oW as getContextDocument, oX as getContextDocumentByPath, oY as getContextSession, oZ as getContextSpace, o_ as getMachineTemplate, o$ as getPermissionToolInputForDisplay, p0 as getQueuedUserMessageDisplayGroup, p1 as getQueuedUserMessageReviewPriority, p2 as getSubagentCallingMetadata, p3 as getToolResultBlocks, p4 as getToolResultToolUseId, p5 as hasDecoupledInteractionSettings, p6 as hasSubagentSessionTag, p7 as inspectJsonRpcEnvelope, p8 as isDaemonQueuedMessageKind, p9 as isPendingToolResultMarker, pa as isPersistedHookMessage, pb as isReviewableQueuedMessageKind, pc as listComputers, pd as listContextDocuments, pe as listContextSessions, pf as listContextSpaces, pg as listEnvironments, ph as listMachineTemplates, pi as listRemoteSessionElicitations, pj as listRemoteSessions, pk as machineTypeToMachineConnectionType, pl as readContextFilePart, pm as readContextSessionRecords, pn as recordComputerConnectSli, po as refreshComputer, pp as registerContextSession, pq as restartComputer, pr as retryInstallDeps, ps as retryWithLogger, pt as sumTokenUsage, pu as summarizeSessionToolUsage, pv as toError, pw as updateComputer, px as updateContextDocument, py as uploadContextFilePart } from './index-Cf2WtJqJ.mjs';
|
|
3
3
|
import EventEmitter from 'events';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import {
|
|
6
|
-
import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
5
|
+
import { StdioOptions, ChildProcess } from 'child_process';
|
|
6
|
+
import { ToolAnnotations, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import '@opentelemetry/api';
|
|
8
8
|
import 'eventemitter3';
|
|
9
9
|
|
|
10
10
|
declare class IpcDaemonClientTransport implements DaemonClientTransport {
|
|
11
|
-
private
|
|
12
|
-
private connected;
|
|
11
|
+
private connectionId;
|
|
13
12
|
private readonly channel;
|
|
14
13
|
private unsubscribeMessage;
|
|
15
14
|
private unsubscribeDisconnect;
|
|
@@ -22,8 +21,9 @@ declare class IpcDaemonClientTransport implements DaemonClientTransport {
|
|
|
22
21
|
isConnected(): boolean;
|
|
23
22
|
getConnectionId(): string | null;
|
|
24
23
|
isRelayConnection(): boolean;
|
|
24
|
+
isSecureChannel(): boolean;
|
|
25
25
|
getTransportKind(): DaemonClientTransportKind.Ipc;
|
|
26
|
-
send(data:
|
|
26
|
+
send(data: JsonRpcMessage): void;
|
|
27
27
|
on<T extends keyof DaemonClientTransportEvents>(event: T, handler: DaemonClientTransportEvents[T]): void;
|
|
28
28
|
off<T extends keyof DaemonClientTransportEvents>(event: T, handler: DaemonClientTransportEvents[T]): void;
|
|
29
29
|
private cleanupSubscriptions;
|
|
@@ -47,9 +47,8 @@ declare class IpcDaemonClientTransport implements DaemonClientTransport {
|
|
|
47
47
|
* propagation live in exactly one place; the runtime handles frames.
|
|
48
48
|
*/
|
|
49
49
|
declare class InProcessDaemonClientTransport implements DaemonClientTransport {
|
|
50
|
-
private
|
|
50
|
+
private connectionId;
|
|
51
51
|
private readonly options;
|
|
52
|
-
private connected;
|
|
53
52
|
private readonly unsubscribeFns;
|
|
54
53
|
private readonly handlers;
|
|
55
54
|
constructor(options: InProcessDaemonClientTransportOptions);
|
|
@@ -58,8 +57,9 @@ declare class InProcessDaemonClientTransport implements DaemonClientTransport {
|
|
|
58
57
|
isConnected(): boolean;
|
|
59
58
|
getConnectionId(): string | null;
|
|
60
59
|
isRelayConnection(): boolean;
|
|
60
|
+
isSecureChannel(): boolean;
|
|
61
61
|
getTransportKind(): DaemonClientTransportKind.InProcess;
|
|
62
|
-
send(data:
|
|
62
|
+
send(data: JsonRpcMessage): Promise<void>;
|
|
63
63
|
on<T extends keyof DaemonClientTransportEvents>(event: T, handler: DaemonClientTransportEvents[T]): void;
|
|
64
64
|
off<T extends keyof DaemonClientTransportEvents>(event: T, handler: DaemonClientTransportEvents[T]): void;
|
|
65
65
|
/**
|
|
@@ -82,6 +82,7 @@ declare enum DroidClientEvent {
|
|
|
82
82
|
SESSION_NOTIFICATION = "session_notification",
|
|
83
83
|
REQUEST_PERMISSION = "request_permission",
|
|
84
84
|
ASK_USER = "ask_user",
|
|
85
|
+
PICK_OPTIONS = "pick_options",
|
|
85
86
|
ERROR = "error"
|
|
86
87
|
}
|
|
87
88
|
/**
|
|
@@ -145,6 +146,8 @@ interface FactoryPathResolver {
|
|
|
145
146
|
getFactoryHome(): string;
|
|
146
147
|
getFactoryDirName(): string;
|
|
147
148
|
}
|
|
149
|
+
/** Daemon-approved Runtime overlay authority carried into a spawned child. */
|
|
150
|
+
type RuntimeSettingsAuthority = NonNullable<ProcessTransportOptions['runtimeSettingsAuthority']>;
|
|
148
151
|
/** Resolves environment values used by the exec core. */
|
|
149
152
|
interface EnvironmentResolver {
|
|
150
153
|
resolveTransportLogEnvValue(): string | undefined;
|
|
@@ -154,6 +157,14 @@ interface EnvironmentResolver {
|
|
|
154
157
|
* whole-process sandbox bridge material so it never crosses into a child.
|
|
155
158
|
*/
|
|
156
159
|
sanitizeSpawnEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
160
|
+
/**
|
|
161
|
+
* Build the env block that carries a Runtime overlay authority into a
|
|
162
|
+
* spawned droid child. It is merged after {@link sanitizeSpawnEnv}, so it
|
|
163
|
+
* must use the same marker names the sanitizer strips from inherited env.
|
|
164
|
+
* The default implementation emits nothing: without Factory wiring the
|
|
165
|
+
* sanitizer is identity, so there is no trust boundary for markers to cross.
|
|
166
|
+
*/
|
|
167
|
+
buildRuntimeSettingsAuthorityEnv(authority: RuntimeSettingsAuthority): Record<string, string>;
|
|
157
168
|
}
|
|
158
169
|
/** Bundle of injectable dependencies for the exec core. */
|
|
159
170
|
interface ExecCoreDeps {
|
|
@@ -171,6 +182,7 @@ type DroidEventMap = {
|
|
|
171
182
|
[DroidClientEvent.SESSION_NOTIFICATION]: [SessionNotificationEvent];
|
|
172
183
|
[DroidClientEvent.REQUEST_PERMISSION]: [RequestPermissionEvent];
|
|
173
184
|
[DroidClientEvent.ASK_USER]: [AskUserEvent];
|
|
185
|
+
[DroidClientEvent.PICK_OPTIONS]: [PickOptionsEvent];
|
|
174
186
|
[DroidClientEvent.ERROR]: [Error];
|
|
175
187
|
};
|
|
176
188
|
type DroidEventType = keyof DroidEventMap;
|
|
@@ -197,6 +209,25 @@ interface DroidProcessConfig {
|
|
|
197
209
|
/** Override stdio for trusted process topologies. */
|
|
198
210
|
stdio?: StdioOptions;
|
|
199
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* Node-only spawn extensions for trusted process topologies, such as a
|
|
214
|
+
* sandboxed host launching a child that must stay inside the same sandbox.
|
|
215
|
+
* Kept out of the universal {@link ProcessTransportOptions} because they
|
|
216
|
+
* reference `child_process` types.
|
|
217
|
+
*/
|
|
218
|
+
interface ProcessTransportSpawnExtensions {
|
|
219
|
+
/** Trusted env merged after the sanitizer, alongside the Runtime authority. */
|
|
220
|
+
trustedEnv?: Record<string, string>;
|
|
221
|
+
/** Override stdio for trusted process topologies. */
|
|
222
|
+
stdio?: StdioOptions;
|
|
223
|
+
/**
|
|
224
|
+
* Observes the spawned child before any message flows. A throw closes the
|
|
225
|
+
* child and fails `connect()`, so a missing trusted descriptor never leaves
|
|
226
|
+
* an unattested child running.
|
|
227
|
+
*/
|
|
228
|
+
onSpawned?: (childProcess: ChildProcess) => void;
|
|
229
|
+
}
|
|
230
|
+
type ProcessTransportSpawnOptions = ProcessTransportOptions & ProcessTransportSpawnExtensions;
|
|
200
231
|
/**
|
|
201
232
|
* Represents a managed droid child process
|
|
202
233
|
*/
|
|
@@ -218,6 +249,9 @@ interface ManagedProcess {
|
|
|
218
249
|
* Options controlling the Windows Job Object spawn retry wrapper.
|
|
219
250
|
*/
|
|
220
251
|
interface SpawnWithRetryOptions {
|
|
252
|
+
/** Working directory and executable used to describe an observed spawn failure. */
|
|
253
|
+
cwd?: string;
|
|
254
|
+
execPath?: string;
|
|
221
255
|
/** Max number of retries after the initial spawn. */
|
|
222
256
|
maxRetries?: number;
|
|
223
257
|
/** Backoff schedule in ms between attempts. */
|
|
@@ -246,7 +280,21 @@ interface SpawnWithRetryOptions {
|
|
|
246
280
|
logger?: Logger;
|
|
247
281
|
}
|
|
248
282
|
|
|
283
|
+
/**
|
|
284
|
+
* True for a DroidConnectionEndedError or a ProcessExitError, directly or as
|
|
285
|
+
* the cause of a ProtocolError (a failed send wraps the transport's error):
|
|
286
|
+
* the droid's spawn failed, its process exited, or its transport was closed,
|
|
287
|
+
* never connected, or could not write to the droid. False for every other
|
|
288
|
+
* error, including a plain ConnectionError such as a failed Factory API
|
|
289
|
+
* request.
|
|
290
|
+
*/
|
|
291
|
+
declare function isDroidConnectionEnded(error: unknown): boolean;
|
|
249
292
|
type McpSettingsLevel = SettingsLevel.User;
|
|
293
|
+
/**
|
|
294
|
+
* A host answering on behalf of another client names the answer's provenance
|
|
295
|
+
* itself; once it has, this client's own supplier never labels that answer.
|
|
296
|
+
*/
|
|
297
|
+
type ResponseMetadataSetter = (meta: TraceContextMeta) => void;
|
|
250
298
|
type PermissionHandlerResult = RequestPermissionHandlerResult | ToolConfirmationOutcome | RequestPermissionResult;
|
|
251
299
|
/**
|
|
252
300
|
* Derive the JSON-RPC error code for an outgoing failure response. An error can
|
|
@@ -261,10 +309,21 @@ declare class DroidClient extends EventEmitter<DroidEventMap> {
|
|
|
261
309
|
private pendingRequests;
|
|
262
310
|
private permissionHandlers;
|
|
263
311
|
private askUserHandlers;
|
|
312
|
+
private pickOptionsHandlers;
|
|
264
313
|
private pendingPermissionRequests;
|
|
265
314
|
private pendingAskUserRequests;
|
|
315
|
+
/**
|
|
316
|
+
* Queued (non-blocking) AskUser requests that arrived before an AskUser
|
|
317
|
+
* handler was set, as when a reloaded session asks its pending queued sets
|
|
318
|
+
* again during the load. Answering one without a handler would record it
|
|
319
|
+
* as dismissed, and the agent never waits on it, so it waits for the
|
|
320
|
+
* handler instead.
|
|
321
|
+
*/
|
|
322
|
+
private heldQueuedAskUserRequests;
|
|
323
|
+
private pendingPickOptionsRequests;
|
|
266
324
|
private currentSessionId;
|
|
267
325
|
private peerProtocolVersion;
|
|
326
|
+
private peerEnforcesQueueOwnership;
|
|
268
327
|
/**
|
|
269
328
|
* Sticky error from a transport failure. Once set, all subsequent
|
|
270
329
|
* `sendRequest()` calls throw this error immediately, preventing
|
|
@@ -272,13 +331,40 @@ declare class DroidClient extends EventEmitter<DroidEventMap> {
|
|
|
272
331
|
*/
|
|
273
332
|
private transportError;
|
|
274
333
|
private completedTurnObserved;
|
|
334
|
+
/**
|
|
335
|
+
* Set once the droid sends `droid.disconnect`. It reads no further
|
|
336
|
+
* requests from then on, so it no longer counts as connected even while its
|
|
337
|
+
* transport stays open.
|
|
338
|
+
*/
|
|
339
|
+
private disconnected;
|
|
275
340
|
private readonly logger;
|
|
276
341
|
private readonly tracing;
|
|
277
342
|
private readonly onRequestSettled;
|
|
278
343
|
private readonly getRequestAttribution;
|
|
279
344
|
constructor(options: DroidClientOptions, deps?: ExecCoreDeps);
|
|
280
345
|
get sessionId(): string | null;
|
|
346
|
+
/**
|
|
347
|
+
* The session that an inbound prompt or transport fault belongs to. A
|
|
348
|
+
* session start or load in flight owns it, because the CLI replays a loaded
|
|
349
|
+
* session's pending prompts before it answers the load; otherwise the
|
|
350
|
+
* current session does. Undefined when that is ambiguous: a start with no
|
|
351
|
+
* session id yet, or several starts and loads in flight.
|
|
352
|
+
*
|
|
353
|
+
* @internal
|
|
354
|
+
*/
|
|
355
|
+
get addressedSessionId(): string | undefined;
|
|
281
356
|
get isConnected(): boolean;
|
|
357
|
+
/**
|
|
358
|
+
* Whether the worker runs in a child process. A daemon's shutdown cuts such
|
|
359
|
+
* a worker off from its owner before closing it, and from then on it reads
|
|
360
|
+
* no request; a worker hosted in this process still answers.
|
|
361
|
+
*/
|
|
362
|
+
get runsInChildProcess(): boolean;
|
|
363
|
+
/**
|
|
364
|
+
* Whether the runner refuses a queue change from someone other than the
|
|
365
|
+
* prompt's author. Older runners ignore the author on such a change.
|
|
366
|
+
*/
|
|
367
|
+
get enforcesQueueOwnership(): boolean;
|
|
282
368
|
private requireMcpOAuthOptOutSupport;
|
|
283
369
|
private validateMcpServersProtocolSupport;
|
|
284
370
|
initializeSession(params: InitializeSessionRequestParams): Promise<InitializeSessionResponse>;
|
|
@@ -295,7 +381,7 @@ declare class DroidClient extends EventEmitter<DroidEventMap> {
|
|
|
295
381
|
interruptSession(params?: InterruptSessionParams): Promise<InterruptSessionResponse>;
|
|
296
382
|
closeSession(params?: CloseSessionParams): Promise<CloseSessionResponse>;
|
|
297
383
|
killWorkerSession(params: KillWorkerSessionParams): Promise<KillWorkerSessionResponse>;
|
|
298
|
-
updateSessionSettings(params: UpdateSessionSettingsRequestParams, requestId?: string): Promise<UpdateSessionSettingsResponse>;
|
|
384
|
+
updateSessionSettings(params: Omit<UpdateSessionSettingsRequestParams, 'tags' | 'tagPatch'> & SessionTagsUpdate, requestId?: string): Promise<UpdateSessionSettingsResponse>;
|
|
299
385
|
changeWorkingDirectory(params: ChangeWorkingDirectoryParams): Promise<ChangeWorkingDirectoryResponse>;
|
|
300
386
|
toggleMcpServer(params: {
|
|
301
387
|
serverName: string;
|
|
@@ -318,18 +404,20 @@ declare class DroidClient extends EventEmitter<DroidEventMap> {
|
|
|
318
404
|
}): Promise<z.infer<typeof RemoveMcpServerResponseSchema>>;
|
|
319
405
|
listModels(params?: ListModelsOptions): Promise<z.infer<typeof ListModelsResponseSchema>>;
|
|
320
406
|
listMcpRegistry(): Promise<z.infer<typeof ListMcpRegistryResponseSchema>>;
|
|
407
|
+
refreshConnectorToolCatalog(params?: RefreshConnectorToolCatalogRequest['params']): Promise<z.infer<typeof RefreshConnectorToolCatalogResponseSchema>>;
|
|
321
408
|
listMcpTools(): Promise<z.infer<typeof ListMcpToolsResponseSchema>>;
|
|
322
|
-
listTools(params?: ListToolsRequestParams): Promise<
|
|
409
|
+
listTools(params?: ListToolsRequestParams): Promise<ListToolsResponse>;
|
|
323
410
|
listMcpServers(): Promise<z.infer<typeof ListMcpServersResponseSchema>>;
|
|
324
411
|
toggleMcpTool(serverName: string, toolName: string, enabled: boolean): Promise<z.infer<typeof ToggleMcpToolResponseSchema>>;
|
|
325
412
|
submitMcpAuthCode(params: z.infer<typeof SubmitMcpAuthCodeRequestParamsSchema>): Promise<z.infer<typeof SubmitMcpAuthCodeResponseSchema>>;
|
|
326
413
|
submitMcpAuthError(params: z.infer<typeof SubmitMcpAuthErrorRequestParamsSchema>): Promise<z.infer<typeof SubmitMcpAuthErrorResponseSchema>>;
|
|
327
|
-
listSkills(): Promise<z.infer<typeof ListSkillsResponseSchema>>;
|
|
414
|
+
listSkills(params?: ListSkillsRequest['params']): Promise<z.infer<typeof ListSkillsResponseSchema>>;
|
|
328
415
|
setSkillDisabled(skillName: string, disabled: boolean, settingsLevel?: SetSkillDisabledRequest['params']['settingsLevel']): Promise<z.infer<typeof SetSkillDisabledResponseSchema>>;
|
|
329
416
|
listCommands(): Promise<z.infer<typeof ListCommandsResponseSchema>>;
|
|
330
417
|
getContextStats(): Promise<z.infer<typeof GetContextStatsResponseSchema>>;
|
|
331
418
|
getContextBreakdown(): Promise<z.infer<typeof GetContextBreakdownResponseSchema>>;
|
|
332
|
-
|
|
419
|
+
killBackgroundProcess(processId: string): Promise<z.infer<typeof KillBackgroundProcessResponseSchema>>;
|
|
420
|
+
submitBugReport(userComment: string, clientLogs?: string, source?: SubmitBugReportRequest['params']['source'], tuiLogs?: string): Promise<z.infer<typeof SubmitBugReportResponseSchema>>;
|
|
333
421
|
getRewindInfo(params: {
|
|
334
422
|
messageId: string;
|
|
335
423
|
}, timeout?: number): Promise<z.infer<typeof GetRewindInfoResponseSchema>>;
|
|
@@ -347,7 +435,14 @@ declare class DroidClient extends EventEmitter<DroidEventMap> {
|
|
|
347
435
|
}): Promise<z.infer<typeof ExecuteRewindResponseSchema>>;
|
|
348
436
|
compactSession(params: {
|
|
349
437
|
customInstructions?: string;
|
|
438
|
+
mode?: 'handoff';
|
|
350
439
|
}): Promise<z.infer<typeof CompactSessionResponseSchema>>;
|
|
440
|
+
/** Summarizes the session the way `/handoff` does, without writing anything. */
|
|
441
|
+
getHandoffSummary(): Promise<z.infer<typeof GetHandoffSummaryResponseSchema>>;
|
|
442
|
+
/** Writes the short summary people joining a shared copy read first. */
|
|
443
|
+
summarizeForMembers(params: {
|
|
444
|
+
handoffSummary: string;
|
|
445
|
+
}): Promise<z.infer<typeof SummarizeForMembersResponseSchema>>;
|
|
351
446
|
forkSession(params?: z.infer<typeof ForkSessionRequestParamsSchema>): Promise<z.infer<typeof ForkSessionResponseSchema>>;
|
|
352
447
|
renameSession(params: RenameSessionRequestParams, requestId?: string): Promise<z.infer<typeof RenameSessionResponseSchema>>;
|
|
353
448
|
warmupCache(): Promise<z.infer<typeof WarmupCacheResponseSchema>>;
|
|
@@ -355,15 +450,23 @@ declare class DroidClient extends EventEmitter<DroidEventMap> {
|
|
|
355
450
|
type?: string;
|
|
356
451
|
}): () => void;
|
|
357
452
|
onError(callback: (error: Error) => void): () => void;
|
|
358
|
-
setPermissionHandler(handler: (event: RequestPermissionEvent) => Promise<PermissionHandlerResult> | PermissionHandlerResult): void;
|
|
453
|
+
setPermissionHandler(handler: (event: RequestPermissionEvent, setResponseMetadata?: ResponseMetadataSetter) => Promise<PermissionHandlerResult> | PermissionHandlerResult): void;
|
|
359
454
|
clearPermissionHandler(): void;
|
|
360
|
-
setAskUserHandler(handler: (event: AskUserEvent) => Promise<AskUserResult> | AskUserResult): void;
|
|
455
|
+
setAskUserHandler(handler: (event: AskUserEvent, setResponseMetadata?: ResponseMetadataSetter) => Promise<AskUserResult> | AskUserResult): void;
|
|
361
456
|
clearAskUserHandler(): void;
|
|
362
|
-
|
|
457
|
+
setPickOptionsHandler(handler: (event: PickOptionsEvent, setResponseMetadata?: ResponseMetadataSetter) => Promise<PickOptionsResult> | PickOptionsResult): void;
|
|
458
|
+
clearPickOptionsHandler(): void;
|
|
459
|
+
close(options?: {
|
|
460
|
+
closeTransportFirst?: boolean;
|
|
461
|
+
}): Promise<void>;
|
|
363
462
|
private rejectAllPending;
|
|
364
463
|
private settleRequest;
|
|
365
464
|
private notifyRequestSettled;
|
|
465
|
+
/** `_meta` for an answer this client gives itself: its caller and the current trace context. */
|
|
466
|
+
private responseMetadata;
|
|
467
|
+
private sendResponse;
|
|
366
468
|
private sendRequest;
|
|
469
|
+
private writeRequest;
|
|
367
470
|
private handleMessage;
|
|
368
471
|
private handleResponse;
|
|
369
472
|
private handleEvent;
|
|
@@ -383,8 +486,18 @@ declare class DroidClient extends EventEmitter<DroidEventMap> {
|
|
|
383
486
|
* every
|
|
384
487
|
*/
|
|
385
488
|
private logDroppedEventParseError;
|
|
489
|
+
private reportHandlerFailure;
|
|
386
490
|
private handlePermissionRequest;
|
|
387
491
|
private handleAskUserRequest;
|
|
492
|
+
private answerAskUserRequest;
|
|
493
|
+
/**
|
|
494
|
+
* Same shape as the ask-user round trip: the handler (a UI) resolves with
|
|
495
|
+
* the user's selection, and any failure or missing handler answers the CLI
|
|
496
|
+
* with a cancellation so its tool call never hangs. A handler that rejects
|
|
497
|
+
* with {@link PickOptionsUnavailableError} is relayed as that JSON-RPC
|
|
498
|
+
* error instead, which the CLI does not read as the user's cancel.
|
|
499
|
+
*/
|
|
500
|
+
private handlePickOptionsRequest;
|
|
388
501
|
private static getErrorType;
|
|
389
502
|
private static createErrorNotification;
|
|
390
503
|
private static getNestedString;
|
|
@@ -396,6 +509,16 @@ declare class DroidClient extends EventEmitter<DroidEventMap> {
|
|
|
396
509
|
private static createNotificationEvent;
|
|
397
510
|
}
|
|
398
511
|
|
|
512
|
+
/**
|
|
513
|
+
* Adapt a serialized boundary to the typed client contract. Typed transports
|
|
514
|
+
* are passed directly to DroidClient and do not use this adapter.
|
|
515
|
+
*/
|
|
516
|
+
declare function withJsonRpcCodec(transport: StringFramedDroidClientTransport, deps?: ExecCoreDeps): DroidClientTransport;
|
|
517
|
+
|
|
518
|
+
type SpawnContext = {
|
|
519
|
+
cwd?: string;
|
|
520
|
+
execPath?: string;
|
|
521
|
+
};
|
|
399
522
|
/**
|
|
400
523
|
* Internal implementation of ManagedProcess
|
|
401
524
|
*/
|
|
@@ -406,7 +529,8 @@ declare class ManagedProcessImpl implements ManagedProcess {
|
|
|
406
529
|
private _childProcess;
|
|
407
530
|
private messageHandler;
|
|
408
531
|
private errorHandler;
|
|
409
|
-
private
|
|
532
|
+
private readonly stdoutDecoder;
|
|
533
|
+
private readonly stdoutDataHandler;
|
|
410
534
|
private isClosing;
|
|
411
535
|
/** Latch so exit teardown/classification runs exactly once per process. */
|
|
412
536
|
private exitFinalized;
|
|
@@ -419,12 +543,12 @@ declare class ManagedProcessImpl implements ManagedProcess {
|
|
|
419
543
|
private processError;
|
|
420
544
|
private queuedSendPromise;
|
|
421
545
|
private readonly logger;
|
|
422
|
-
constructor(childProcess: ChildProcess, logPrefix: string, spawnContext:
|
|
423
|
-
cwd?: string;
|
|
424
|
-
execPath?: string;
|
|
425
|
-
} | undefined, deps: ExecCoreDeps, transportLoggerDeps?: ExecCoreDeps);
|
|
546
|
+
constructor(childProcess: ChildProcess, logPrefix: string, spawnContext: SpawnContext | undefined, deps: ExecCoreDeps, transportLoggerDeps?: ExecCoreDeps);
|
|
426
547
|
get childProcess(): ChildProcess;
|
|
548
|
+
/** Wait for the runtime's spawn result without replacing the transport's error handler. */
|
|
549
|
+
waitForSpawn(): Promise<void>;
|
|
427
550
|
private setupHandlers;
|
|
551
|
+
private handleStdoutLine;
|
|
428
552
|
private finalizeExit;
|
|
429
553
|
send(message: string): Promise<void>;
|
|
430
554
|
onMessage(handler: (message: string) => void): void;
|
|
@@ -435,23 +559,23 @@ declare class ManagedProcessImpl implements ManagedProcess {
|
|
|
435
559
|
}
|
|
436
560
|
|
|
437
561
|
/**
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
* This is a thin wrapper that maintains the existing API while delegating to
|
|
442
|
-
* the more general-purpose DroidProcessManager.
|
|
562
|
+
* Exchanges typed client messages over a spawned Droid process, owning the
|
|
563
|
+
* stdio JSON codec and delegating process lifecycle to DroidProcessManager.
|
|
443
564
|
*/
|
|
444
|
-
declare class ProcessTransport implements
|
|
565
|
+
declare class ProcessTransport implements DroidClientTransport {
|
|
445
566
|
private managedProcess;
|
|
446
567
|
private processManager;
|
|
447
568
|
private options;
|
|
448
569
|
private messageHandler;
|
|
570
|
+
private readonly logger;
|
|
571
|
+
private readonly handleMessage;
|
|
449
572
|
private errorHandler;
|
|
450
573
|
private metrics;
|
|
451
|
-
|
|
574
|
+
private environmentResolver;
|
|
575
|
+
constructor(options?: ProcessTransportSpawnOptions, deps?: ExecCoreDeps);
|
|
452
576
|
connect(): Promise<void>;
|
|
453
|
-
send(message:
|
|
454
|
-
onMessage(handler: (message:
|
|
577
|
+
send(message: JsonRpcMessage): Promise<void>;
|
|
578
|
+
onMessage(handler: (message: JsonRpcMessage) => void): void;
|
|
455
579
|
onError(handler: (error: Error) => void): void;
|
|
456
580
|
close(): Promise<void>;
|
|
457
581
|
get isConnected(): boolean;
|
|
@@ -477,7 +601,7 @@ declare class DroidProcessManager {
|
|
|
477
601
|
* as spawned. This does not retry Windows Job Object spawn failures — use
|
|
478
602
|
* {@link DroidProcessManager#spawnWithWindowsRetry} for that.
|
|
479
603
|
*/
|
|
480
|
-
spawn(config: DroidProcessConfig):
|
|
604
|
+
spawn(config: DroidProcessConfig): ManagedProcessImpl;
|
|
481
605
|
/**
|
|
482
606
|
* Spawn a droid process with automatic retry for the Windows Job Object
|
|
483
607
|
* spawn error class (FAC-19070). On non-Windows platforms this behaves
|
|
@@ -491,6 +615,12 @@ declare class DroidProcessManager {
|
|
|
491
615
|
spawnWithWindowsRetry(config: DroidProcessConfig, retryOptions?: SpawnWithRetryOptions): Promise<ManagedProcess>;
|
|
492
616
|
private prepareSpawn;
|
|
493
617
|
private invokeNodeSpawn;
|
|
618
|
+
/**
|
|
619
|
+
* Emits the content-free native process record consumed by lifecycle
|
|
620
|
+
* measurement harnesses. `createdAt` is the wall-clock lower bound captured
|
|
621
|
+
* immediately before spawn; `eventDate` is the wall-clock observation time.
|
|
622
|
+
*/
|
|
623
|
+
private logNativeProcessLifecycle;
|
|
494
624
|
private spawnChildProcess;
|
|
495
625
|
}
|
|
496
626
|
|
|
@@ -531,7 +661,10 @@ declare function resolveExecCoreDeps(observability: DroidObservability | undefin
|
|
|
531
661
|
* `gracePeriodMs`. If the child exits early AND the exit looks like a Job
|
|
532
662
|
* Object failure (stderr marker, or non-zero exit without an explicit
|
|
533
663
|
* permanent-failure 'error' event), we dispose the dead child and respawn
|
|
534
|
-
* up to `maxRetries`.
|
|
664
|
+
* up to `maxRetries`. Only a child that survives the window is returned.
|
|
665
|
+
* Observed child failures reject with a DroidConnectionEndedError. A
|
|
666
|
+
* synchronous throw from spawnFactory passes through unchanged and is never
|
|
667
|
+
* retried.
|
|
535
668
|
*/
|
|
536
669
|
declare function spawnWithWindowsJobObjectRetry(spawnFactory: () => ChildProcess, options?: SpawnWithRetryOptions): Promise<ChildProcess>;
|
|
537
670
|
|
|
@@ -557,7 +690,15 @@ declare const noopLogger: Logger;
|
|
|
557
690
|
|
|
558
691
|
type ToolInputShape = Record<string, z.ZodTypeAny>;
|
|
559
692
|
type DroidToolResult = string | CallToolResult;
|
|
560
|
-
interface
|
|
693
|
+
interface DroidToolOptions {
|
|
694
|
+
/**
|
|
695
|
+
* MCP tool annotations. Droid treats a tool with `readOnlyHint: true` as
|
|
696
|
+
* low impact, so it runs without a permission prompt at Low autonomy or
|
|
697
|
+
* above. Tools without it are treated as high impact.
|
|
698
|
+
*/
|
|
699
|
+
annotations?: ToolAnnotations;
|
|
700
|
+
}
|
|
701
|
+
interface DroidTool extends DroidToolOptions {
|
|
561
702
|
name: string;
|
|
562
703
|
description?: string;
|
|
563
704
|
inputSchema?: ToolInputShape;
|
|
@@ -569,8 +710,8 @@ interface SdkMcpServerOptions {
|
|
|
569
710
|
tools: DroidTool[];
|
|
570
711
|
}
|
|
571
712
|
type DroidMcpServerConfig = McpServerConfig | SdkMcpServer;
|
|
572
|
-
declare function tool<InputShape extends ToolInputShape>(name: string, description: string, inputSchema: InputShape, handler: (input: z.infer<z.ZodObject<InputShape>>) => DroidToolResult | Promise<DroidToolResult
|
|
573
|
-
declare function tool(name: string, description: string, handler: DroidTool['handler']): DroidTool;
|
|
713
|
+
declare function tool<InputShape extends ToolInputShape>(name: string, description: string, inputSchema: InputShape, handler: (input: z.infer<z.ZodObject<InputShape>>) => DroidToolResult | Promise<DroidToolResult>, options?: DroidToolOptions): DroidTool;
|
|
714
|
+
declare function tool(name: string, description: string, handler: DroidTool['handler'], options?: DroidToolOptions): DroidTool;
|
|
574
715
|
declare class SdkMcpServer {
|
|
575
716
|
readonly name: string;
|
|
576
717
|
readonly version: string;
|
|
@@ -595,7 +736,7 @@ interface TransportCreationOptions {
|
|
|
595
736
|
cwd?: string;
|
|
596
737
|
env?: Record<string, string>;
|
|
597
738
|
observability?: DroidObservability;
|
|
598
|
-
transport?:
|
|
739
|
+
transport?: DroidClientTransport;
|
|
599
740
|
}
|
|
600
741
|
interface SessionInitOptions extends ToolSelectionOverrides {
|
|
601
742
|
/** Defaults to `process.cwd()`. */
|
|
@@ -616,29 +757,52 @@ interface SessionInitOptions extends ToolSelectionOverrides {
|
|
|
616
757
|
disableBuiltinSkills?: boolean;
|
|
617
758
|
}
|
|
618
759
|
|
|
760
|
+
type EnvironmentSelector = {
|
|
761
|
+
id: string;
|
|
762
|
+
} | {
|
|
763
|
+
name: string;
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
/** Private local-exec contract. DroidClient itself is the unchanged local adapter. */
|
|
767
|
+
type SessionOperations = Pick<DroidClient, 'onNotification' | 'onError' | 'addUserMessage' | 'interruptSession' | 'closeSession' | 'close' | 'loadSession' | 'updateSessionSettings' | 'addMcpServer' | 'removeMcpServer' | 'toggleMcpServer' | 'listMcpServers' | 'listMcpTools' | 'refreshConnectorToolCatalog' | 'listTools' | 'authenticateMcpServer' | 'listSkills' | 'setSkillDisabled' | 'getRewindInfo' | 'executeRewind' | 'compactSession' | 'forkSession' | 'getContextStats' | 'renameSession'>;
|
|
768
|
+
interface SessionLifecycle {
|
|
769
|
+
shutdown: () => Promise<void>;
|
|
770
|
+
abort: (close: () => Promise<void>) => void;
|
|
771
|
+
}
|
|
772
|
+
|
|
619
773
|
type NotificationCallback = (notification: Record<string, unknown>) => void;
|
|
620
774
|
interface NotificationFilter {
|
|
621
775
|
type?: string;
|
|
622
776
|
}
|
|
623
777
|
/** Aggregated result from a one-shot {@link run} call. */
|
|
624
|
-
type DroidResult = DroidResultMessage
|
|
778
|
+
type DroidResult = DroidResultMessage & {
|
|
779
|
+
readonly computerId?: string;
|
|
780
|
+
};
|
|
625
781
|
interface CreateSessionOptions extends SessionInitOptions, HandlerOptions, TransportCreationOptions {
|
|
626
782
|
abortSignal?: AbortSignal;
|
|
783
|
+
/** Launch a new unlisted Computer from an accessible Factory Environment. */
|
|
784
|
+
environment?: EnvironmentSelector;
|
|
785
|
+
/** Factory REST API origin for Environment launches. */
|
|
786
|
+
baseUrl?: string;
|
|
627
787
|
}
|
|
628
788
|
interface ResumeSessionOptions extends Pick<CreateSessionOptions, 'apiKey' | 'execPath' | 'execArgs' | 'env' | 'permissionHandler' | 'askUserHandler' | 'transport' | 'abortSignal' | 'observability' | 'disabledToolIds' | 'autoRejectPermissionRequests' | 'disableBuiltinSkills' | 'sessionSource'> {
|
|
629
789
|
mcpServers?: DroidMcpServerConfig[];
|
|
630
790
|
}
|
|
631
|
-
|
|
632
791
|
type ToolInfo = Omit<ExecToolInfo, 'id' | 'llmId' | 'currentlyAllowed'> & {
|
|
633
792
|
id: ExecToolInfo['llmId'];
|
|
634
793
|
allowed: ExecToolInfo['currentlyAllowed'];
|
|
635
794
|
};
|
|
795
|
+
type ToolInfoWithSchemas = Omit<ToolInfo, 'schemas'> & {
|
|
796
|
+
schemas: NonNullable<ToolInfo['schemas']>;
|
|
797
|
+
};
|
|
636
798
|
type ListToolsOptions = ListToolsRequestParams;
|
|
637
799
|
type DroidSessionUpdateSettingsOptions = UpdateSessionSettingsRequestParams;
|
|
638
800
|
type ReplacementLoadParams = Omit<LoadSessionRequestParams, 'sessionId'>;
|
|
639
801
|
interface SessionRuntime {
|
|
802
|
+
readonly computerId?: string;
|
|
640
803
|
abortSignal?: AbortSignal;
|
|
641
804
|
loadParams: ReplacementLoadParams;
|
|
805
|
+
lifecycle?: SessionLifecycle;
|
|
642
806
|
}
|
|
643
807
|
interface SessionMetadataSnapshot {
|
|
644
808
|
settings: SessionSettings;
|
|
@@ -648,6 +812,7 @@ interface SessionMetadataSnapshot {
|
|
|
648
812
|
declare class DroidSession {
|
|
649
813
|
private readonly _runtime;
|
|
650
814
|
private readonly _client;
|
|
815
|
+
private readonly _lifecycle;
|
|
651
816
|
private readonly _sessionId;
|
|
652
817
|
private _settings;
|
|
653
818
|
private _cwd;
|
|
@@ -659,8 +824,9 @@ declare class DroidSession {
|
|
|
659
824
|
private readonly _activeBridges;
|
|
660
825
|
private readonly _notificationCleanups;
|
|
661
826
|
/** @internal */
|
|
662
|
-
constructor(client:
|
|
827
|
+
constructor(client: SessionOperations, sessionId: string, metadata: SessionMetadataSnapshot, _runtime: SessionRuntime, cleanupCallbacks?: Array<() => Promise<void> | void>);
|
|
663
828
|
get id(): string;
|
|
829
|
+
get computerId(): string | undefined;
|
|
664
830
|
get settings(): Readonly<SessionSettings>;
|
|
665
831
|
get cwd(): string | undefined;
|
|
666
832
|
/** Yields message-level events until the final `result` message. */
|
|
@@ -681,13 +847,27 @@ declare class DroidSession {
|
|
|
681
847
|
toggleMcpServer(params: ToggleMcpServerRequestParams): Promise<ToggleMcpServerResult>;
|
|
682
848
|
listMcpServers(): Promise<ListMcpServersResult>;
|
|
683
849
|
listMcpTools(): Promise<McpToolInfo[]>;
|
|
850
|
+
/** Refresh connector discovery. MCP configuration has its own lifecycle. */
|
|
851
|
+
refreshConnectorToolCatalog(): Promise<void>;
|
|
852
|
+
/**
|
|
853
|
+
* Lists available tools under optional hypothetical settings.
|
|
854
|
+
*
|
|
855
|
+
* `includeSchemas: true` requires input schemas for every returned tool.
|
|
856
|
+
* Older Droid versions that omit requested schemas throw `ProtocolError`.
|
|
857
|
+
* Result and progress schemas remain optional because tools only include
|
|
858
|
+
* payloads they declare.
|
|
859
|
+
*/
|
|
860
|
+
listTools(params: ListToolsOptions & {
|
|
861
|
+
includeSchemas: true;
|
|
862
|
+
}): Promise<ToolInfoWithSchemas[]>;
|
|
684
863
|
listTools(params?: ListToolsOptions): Promise<ToolInfo[]>;
|
|
685
864
|
authenticateMcpServer(params: AuthenticateMcpServerRequestParams): Promise<AuthenticateMcpServerResult>;
|
|
686
|
-
listSkills(): Promise<ListSkillsResult>;
|
|
865
|
+
listSkills(params?: ListSkillsRequestParams): Promise<ListSkillsResult>;
|
|
687
866
|
setSkillDisabled(params: SetSkillDisabledRequestParams): Promise<SetSkillDisabledResult>;
|
|
688
867
|
getRewindInfo(params: Omit<GetRewindInfoRequestParams, 'sessionId'>): Promise<GetRewindInfoResult>;
|
|
689
868
|
rewind(params: Omit<ExecuteRewindRequestParams, 'sessionId'>): Promise<SessionRewindOutcome<DroidSession>>;
|
|
690
|
-
compact(params?: CompactSessionRequestParams): Promise<SessionCompactionOutcome<DroidSession>>;
|
|
869
|
+
compact(params?: Omit<CompactSessionRequestParams, 'mode'>): Promise<SessionCompactionOutcome<DroidSession>>;
|
|
870
|
+
handoff(params?: Omit<CompactSessionRequestParams, 'mode'>): Promise<SessionCompactionOutcome<DroidSession>>;
|
|
691
871
|
fork(params?: ForkSessionRequestParams): Promise<DroidSession>;
|
|
692
872
|
getContextStats(): Promise<GetContextStatsResult>;
|
|
693
873
|
rename(params: RenameSessionRequestParams$1): Promise<void>;
|
|
@@ -755,4 +935,4 @@ declare function listSessions(options?: ListSessionsOptions): Promise<SessionMet
|
|
|
755
935
|
*/
|
|
756
936
|
declare function listModels(options?: ListModelsOptions & TransportCreationOptions): Promise<ModelInfo[]>;
|
|
757
937
|
|
|
758
|
-
export { AddMcpServerRequestParams, AddMcpServerResponseSchema, AddMcpServerResult, AuthenticateMcpServerRequestParams, AuthenticateMcpServerResponseSchema, AuthenticateMcpServerResult, AutonomyLevel, CLI_JSONRPC_CHILD_SPAWN_LATENCY_METRIC, CancelMcpAuthResponseSchema, ClearMcpAuthResponseSchema, type CommandResolver, CompactSessionRequestParams, CompactSessionResponseSchema, type CreateSessionOptions, DaemonClientTransport, DaemonClientTransportEvents, DaemonIpcMessageChannel, DroidClient, DroidClientEvent, DroidClientOptions, type DroidEventMap, type DroidEventType, DroidInteractionMode, type DroidMcpServerConfig, DroidObservability, type DroidProcessConfig, DroidProcessManager, type DroidProcessManagerOptions, DroidProcessMode, type DroidResult, DroidResultMessage, DroidSession, type DroidSessionUpdateSettingsOptions, DroidStreamEvent, DroidStreamMessage, type DroidTool, type DroidToolResult, type EnvironmentResolver, type ExecCoreDeps, ExecToolInfo, ExecuteRewindRequestParams, ExecuteRewindResponseSchema, type FactoryPathResolver, ForkSessionRequestParams, ForkSessionRequestParamsSchema, ForkSessionResponseSchema, GetContextStatsResponseSchema, GetContextStatsResult, GetRewindInfoRequestParams, GetRewindInfoResponseSchema, GetRewindInfoResult, HttpMcpConfig, InProcessDaemonClientTransport, InProcessDaemonClientTransportOptions, InitializeSessionRequestParams, InitializeSessionResponse, IpcDaemonClientTransport, ListMcpRegistryResponseSchema, ListMcpServersResponseSchema, ListMcpServersResult, ListMcpToolsResponseSchema, ListModelsOptions, ListSessionsOptions, ListSkillsResponseSchema, ListSkillsResult, type ListToolsOptions, ListToolsRequestParams,
|
|
938
|
+
export { AddMcpServerRequestParams, AddMcpServerResponseSchema, AddMcpServerResult, AuthenticateMcpServerRequestParams, AuthenticateMcpServerResponseSchema, AuthenticateMcpServerResult, AutonomyLevel, CLI_JSONRPC_CHILD_SPAWN_LATENCY_METRIC, CancelMcpAuthResponseSchema, ClearMcpAuthResponseSchema, type CommandResolver, CompactSessionRequestParams, CompactSessionResponseSchema, type CreateSessionOptions, DaemonClientTransport, DaemonClientTransportEvents, DaemonIpcMessageChannel, DroidClient, DroidClientEvent, DroidClientOptions, DroidClientTransport, type DroidEventMap, type DroidEventType, DroidInteractionMode, type DroidMcpServerConfig, DroidObservability, type DroidProcessConfig, DroidProcessManager, type DroidProcessManagerOptions, DroidProcessMode, type DroidResult, DroidResultMessage, DroidSession, type DroidSessionUpdateSettingsOptions, DroidStreamEvent, DroidStreamMessage, type DroidTool, type DroidToolOptions, type DroidToolResult, type EnvironmentResolver, type ExecCoreDeps, ExecToolInfo, ExecuteRewindRequestParams, ExecuteRewindResponseSchema, type FactoryPathResolver, ForkSessionRequestParams, ForkSessionRequestParamsSchema, ForkSessionResponseSchema, GetContextStatsResponseSchema, GetContextStatsResult, GetRewindInfoRequestParams, GetRewindInfoResponseSchema, GetRewindInfoResult, HttpMcpConfig, InProcessDaemonClientTransport, InProcessDaemonClientTransportOptions, InitializeSessionRequestParams, InitializeSessionResponse, IpcDaemonClientTransport, ListMcpRegistryResponseSchema, ListMcpServersResponseSchema, ListMcpServersResult, ListMcpToolsResponseSchema, ListModelsOptions, ListSessionsOptions, ListSkillsRequestParams, ListSkillsResponseSchema, ListSkillsResult, type ListToolsOptions, ListToolsRequestParams, ListToolsResponse, LoadSessionRequestParams, LoadSessionResponse, type Logger, type ManagedProcess, ManagedProcessImpl, McpServerConfig, McpToolInfo, MessageOptions, type Metrics, ModelInfo, ProcessTransport, ProcessTransportOptions, type ProcessTransportSpawnExtensions, type ProcessTransportSpawnOptions, ReasoningEffort, RemoveMcpServerRequestParams, RemoveMcpServerResponseSchema, RemoveMcpServerResult, RenameSessionRequestParams$1 as RenameSessionRequestParams, RenameSessionResponseSchema, RequestPermissionHandlerResult, type ResolvedDroidCommand, type ResumeSessionOptions, type RunOptions, type RuntimeSettingsAuthority, SdkMcpServer, type SdkMcpServerOptions, SessionCompactionOutcome, SessionMetadata, SessionRewindOutcome, SessionSettings, SessionSource, SessionTag, SetSkillDisabledRequestParams, SetSkillDisabledResponseSchema, SetSkillDisabledResult, SettingsLevel, type SpawnWithRetryOptions, StringFramedDroidClientTransport, SubmitBugReportResponseSchema, SubmitMcpAuthCodeRequestParamsSchema, SubmitMcpAuthCodeResponseSchema, SystemPromptConfig, ToggleMcpServerRequestParams, ToggleMcpServerResponseSchema, ToggleMcpServerResult, ToggleMcpToolResponseSchema, ToolConfirmationOutcome, type ToolInfo, type ToolInfoWithSchemas, ToolSelectionOverrides, type Tracing, TransportDirection, UpdateSessionSettingsRequestParams, UpdateSessionSettingsResult, WINDOWS_JOB_OBJECT_ERROR_MARKER, __resetTransportLoggerForTests, createSdkMcpServer, createSession, isDroidConnectionEnded, isTransportLoggingEnabled, listModels, listSessions, logTransportMessage, noopLogger, resolveExecCoreDeps, resumeSession, run, spawnWithWindowsJobObjectRetry, tool, withJsonRpcCodec };
|