@omnara/sdk 0.1.5 → 0.1.7
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 +1 -1
- package/dist/browser.d.ts +2 -1
- package/dist/browser.js +5 -5
- package/dist/browser.js.map +1 -1
- package/dist/{chunk-HOCUVFTL.js → chunk-K5YXFYE4.js} +16 -2
- package/dist/chunk-K5YXFYE4.js.map +1 -0
- package/dist/{chunk-CHXCNRDJ.js → chunk-T324MHWD.js} +184 -147
- package/dist/chunk-T324MHWD.js.map +1 -0
- package/dist/{chunk-27OYO4MK.js → chunk-WR57Q743.js} +66 -4
- package/dist/chunk-WR57Q743.js.map +1 -0
- package/dist/index.d.ts +20 -16
- package/dist/index.js +105 -48
- package/dist/index.js.map +1 -1
- package/dist/{sdk.gen-DOEQDUdf.d.ts → sdk.gen-qOnMVktp.d.ts} +331 -146
- package/dist/tanstack.d.ts +36 -2
- package/dist/tanstack.js +33 -3
- package/dist/tanstack.js.map +1 -1
- package/dist/zod.d.ts +1 -1
- package/dist/{zod.gen-CUA_eacr.d.ts → zod.gen-ClvDjqAD.d.ts} +192 -3
- package/dist/zod.js +17 -2
- package/package.json +1 -1
- package/dist/chunk-27OYO4MK.js.map +0 -1
- package/dist/chunk-CHXCNRDJ.js.map +0 -1
- package/dist/chunk-HOCUVFTL.js.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-PZ5AY32C.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { A as AuthStrategy } from './auth-CnOxLjlL.js';
|
|
2
2
|
export { b as bearerToken } from './auth-CnOxLjlL.js';
|
|
3
|
-
import {
|
|
4
|
-
export { A as AcceptInvitationData, b as AcceptInvitationError, fL as AcceptInvitationErrors, a as AcceptInvitationResponse, fM as AcceptInvitationResponses, bE as Actor, fN as ActorId, fO as ActorProvider, fP as Agent, bH as AgentConfig, fQ as AgentConfigId, fR as AgentConfigModel, fS as AgentControlType, fT as AgentCount, fU as AgentCronTriggerTarget, fV as AgentEvent, fW as AgentEventId, fX as AgentId, fY as AgentInput, fZ as AgentInputContentBlock, f_ as AgentInputDeliveryMode, f$ as AgentInputEnvelope, g0 as AgentInputEvent, g1 as AgentInputId, g2 as AgentInputKind, g3 as AgentInteraction, g4 as AgentInteractionId, g5 as AgentInteractionKind, g6 as AgentInteractionState, g7 as AgentMachineBinding, g8 as AgentMachineBindingId, g9 as AgentMachineBindingKind, ga as AgentMachineBindingState, gb as AgentMcpConnection, gc as AgentModel, gd as AgentName, bN as AgentProfile, ge as AgentProfileCronTriggerTarget, gf as AgentProfileId, gg as AgentSequence, gh as AgentSequenceCursor, gi as AgentTurn, gj as AgentTurnId, c as ArchiveAgentData, e as ArchiveAgentError, gk as ArchiveAgentErrors, d as ArchiveAgentResponse, gl as ArchiveAgentResponses, bS as Artifact, gm as ArtifactId, gn as AwsCredentialsSecretMaterial, B as BootstrapDaemonData, g as BootstrapDaemonError, go as BootstrapDaemonErrors, gp as BootstrapDaemonResponse, f as BootstrapDaemonResponse2, gq as BootstrapDaemonResponses, C as CancelAgentData, i as CancelAgentError, gr as CancelAgentErrors, gs as CancelAgentRequest, gt as CancelAgentResponse, h as CancelAgentResponse2, gu as CancelAgentResponses, j as CancelQueuedBacklogInputData, l as CancelQueuedBacklogInputError, gv as CancelQueuedBacklogInputErrors, k as CancelQueuedBacklogInputResponse, gw as CancelQueuedBacklogInputResponses, gx as ClientErrorCode, gy as ClientOptions, gz as ConfiguredModel, gA as ConfiguredModelId, cN as ConfiguredModelList, gB as ConfiguredModelRevisionId, gC as ConfiguredModelSummary, m as ConnectByoMachineData, o as ConnectByoMachineError, gD as ConnectByoMachineErrors, gE as ConnectByoMachineRequest, gF as ConnectByoMachineResponse, n as ConnectByoMachineResponse2, gG as ConnectByoMachineResponses, gH as ContentBlockMetadata, gI as ContextCheckpointEvent, gJ as ContextCheckpointId, p as CreateAgentConfigData, r as CreateAgentConfigError, gK as CreateAgentConfigErrors, gL as CreateAgentConfigRequest, q as CreateAgentConfigResponse, gM as CreateAgentConfigResponses, v as CreateAgentData, x as CreateAgentError, gN as CreateAgentErrors, gO as CreateAgentInputContentBlock, s as CreateAgentInputData, gP as CreateAgentInputDeliveryMode, u as CreateAgentInputError, gQ as CreateAgentInputErrors, gR as CreateAgentInputRequest, t as CreateAgentInputResponse, gS as CreateAgentInputResponses, y as CreateAgentProfileData, D as CreateAgentProfileError, gT as CreateAgentProfileErrors, gU as CreateAgentProfileRequest, z as CreateAgentProfileResponse, gV as CreateAgentProfileResponses, gW as CreateAgentRequest, w as CreateAgentResponse, gX as CreateAgentResponses, E as CreateByoMachineDaemonTokenData, G as CreateByoMachineDaemonTokenError, gY as CreateByoMachineDaemonTokenErrors, F as CreateByoMachineDaemonTokenResponse, gZ as CreateByoMachineDaemonTokenResponses, H as CreateConfiguredModelData, J as CreateConfiguredModelError, g_ as CreateConfiguredModelErrors, g$ as CreateConfiguredModelRequest, I as CreateConfiguredModelResponse, h0 as CreateConfiguredModelResponses, K as CreateCronTriggerData, M as CreateCronTriggerError, h1 as CreateCronTriggerErrors, h2 as CreateCronTriggerRequest, L as CreateCronTriggerResponse, h3 as CreateCronTriggerResponses, N as CreateIntegrationOAuthSetupData, Q as CreateIntegrationOAuthSetupError, h4 as CreateIntegrationOAuthSetupErrors, h5 as CreateIntegrationOAuthSetupRequest, P as CreateIntegrationOAuthSetupResponse, h6 as CreateIntegrationOAuthSetupResponses, h7 as CreateMachineDaemonTokenRequest, h8 as CreateMachineDaemonTokenResponse, R as CreateMachineData, T as CreateMachineError, h9 as CreateMachineErrors, U as CreateMachinePoolData, W as CreateMachinePoolError, ha as CreateMachinePoolErrors, hb as CreateMachinePoolRequest, hc as CreateMachinePoolRequestBase, V as CreateMachinePoolResponse, hd as CreateMachinePoolResponses, he as CreateMachineRequest, S as CreateMachineResponse, hf as CreateMachineResponses, X as CreateModelProviderConfigData, Z as CreateModelProviderConfigError, hg as CreateModelProviderConfigErrors, hh as CreateModelProviderConfigRequest, hi as CreateModelProviderConfigResponse, Y as CreateModelProviderConfigResponse2, hj as CreateModelProviderConfigResponses, _ as CreateOrgApiKeyData, a0 as CreateOrgApiKeyError, hk as CreateOrgApiKeyErrors, hl as CreateOrgApiKeyRequest, hm as CreateOrgApiKeyResponse, $ as CreateOrgApiKeyResponse2, hn as CreateOrgApiKeyResponses, a1 as CreateOrgInvitationData, a3 as CreateOrgInvitationError, ho as CreateOrgInvitationErrors, hp as CreateOrgInvitationRequest, a2 as CreateOrgInvitationResponse, hq as CreateOrgInvitationResponses, a4 as CreateOrganizationData, a6 as CreateOrganizationError, hr as CreateOrganizationErrors, hs as CreateOrganizationRequest, ht as CreateOrganizationResponse, a5 as CreateOrganizationResponse2, hu as CreateOrganizationResponses, a7 as CreatePersonalAccessTokenData, a9 as CreatePersonalAccessTokenError, hv as CreatePersonalAccessTokenErrors, hw as CreatePersonalAccessTokenRequest, hx as CreatePersonalAccessTokenResponse, a8 as CreatePersonalAccessTokenResponse2, hy as CreatePersonalAccessTokenResponses, aj as CreateProjectData, al as CreateProjectError, hz as CreateProjectErrors, aa as CreateProjectMachineGrantData, ac as CreateProjectMachineGrantError, hA as CreateProjectMachineGrantErrors, hB as CreateProjectMachineGrantRequest, hC as CreateProjectMachineGrantResponse, ab as CreateProjectMachineGrantResponse2, hD as CreateProjectMachineGrantResponses, ad as CreateProjectMachinePoolGrantData, af as CreateProjectMachinePoolGrantError, hE as CreateProjectMachinePoolGrantErrors, hF as CreateProjectMachinePoolGrantRequest, ae as CreateProjectMachinePoolGrantResponse, hG as CreateProjectMachinePoolGrantResponses, ag as CreateProjectModelGrantData, ai as CreateProjectModelGrantError, hH as CreateProjectModelGrantErrors, hI as CreateProjectModelGrantRequest, ah as CreateProjectModelGrantResponse, hJ as CreateProjectModelGrantResponses, hK as CreateProjectRequest, ak as CreateProjectResponse, hL as CreateProjectResponses, ap as CreateSecretData, ar as CreateSecretError, hM as CreateSecretErrors, am as CreateSecretGrantData, ao as CreateSecretGrantError, hN as CreateSecretGrantErrors, an as CreateSecretGrantResponse, hO as CreateSecretGrantResponses, hP as CreateSecretRequest, aq as CreateSecretResponse, hQ as CreateSecretResponses, as as CreateSecretVersionData, au as CreateSecretVersionError, hR as CreateSecretVersionErrors, at as CreateSecretVersionResponse, hS as CreateSecretVersionResponses, ay as CreateSkillData, aA as CreateSkillError, hT as CreateSkillErrors, av as CreateSkillGrantData, ax as CreateSkillGrantError, hU as CreateSkillGrantErrors, aw as CreateSkillGrantResponse, hV as CreateSkillGrantResponses, hW as CreateSkillRequest, az as CreateSkillResponse, hX as CreateSkillResponses, aB as CreateSlackSetupData, aD as CreateSlackSetupError, hY as CreateSlackSetupErrors, hZ as CreateSlackSetupRequest, aC as CreateSlackSetupResponse, h_ as CreateSlackSetupResponses, h$ as CreatedResourceListSort, i0 as CronExpression, i1 as CronMessageTemplate, i2 as CronTimezone, bV as CronTrigger, i3 as CronTriggerFailureReport, i4 as CronTriggerId, i5 as CronTriggerTarget, i6 as CurrentAgentResponse, bY as CurrentUser, i7 as CurrentUserIdentity, i8 as CurrentUserOrg, i9 as DaemonRuntime, ia as DaemonRuntimeId, ib as DaemonRuntimeReconciliation, ic as DaemonRuntimeState, aE as DeclineInvitationData, aG as DeclineInvitationError, id as DeclineInvitationErrors, aF as DeclineInvitationResponse, ie as DeclineInvitationResponses, aH as DeleteAgentProfileData, aJ as DeleteAgentProfileError, ig as DeleteAgentProfileErrors, aI as DeleteAgentProfileResponse, ih as DeleteAgentProfileResponses, aK as DeleteConfiguredModelData, aM as DeleteConfiguredModelError, ii as DeleteConfiguredModelErrors, aL as DeleteConfiguredModelResponse, ij as DeleteConfiguredModelResponses, aN as DeleteCronTriggerData, aP as DeleteCronTriggerError, ik as DeleteCronTriggerErrors, aO as DeleteCronTriggerResponse, il as DeleteCronTriggerResponses, aQ as DeleteCurrentUserData, aS as DeleteCurrentUserError, im as DeleteCurrentUserErrors, aR as DeleteCurrentUserResponse, io as DeleteCurrentUserResponses, aT as DeleteIntegrationInstallData, aV as DeleteIntegrationInstallError, ip as DeleteIntegrationInstallErrors, aU as DeleteIntegrationInstallResponse, iq as DeleteIntegrationInstallResponses, aW as DeleteMachineData, aY as DeleteMachineError, ir as DeleteMachineErrors, aZ as DeleteMachinePoolData, a$ as DeleteMachinePoolError, is as DeleteMachinePoolErrors, a_ as DeleteMachinePoolResponse, it as DeleteMachinePoolResponses, aX as DeleteMachineResponse, iu as DeleteMachineResponses, b0 as DeleteModelProviderConfigData, b2 as DeleteModelProviderConfigError, iv as DeleteModelProviderConfigErrors, b1 as DeleteModelProviderConfigResponse, iw as DeleteModelProviderConfigResponses, b3 as DeleteOrgInvitationData, b5 as DeleteOrgInvitationError, ix as DeleteOrgInvitationErrors, b4 as DeleteOrgInvitationResponse, iy as DeleteOrgInvitationResponses, b6 as DeleteOrganizationData, b8 as DeleteOrganizationError, iz as DeleteOrganizationErrors, b7 as DeleteOrganizationResponse, iA as DeleteOrganizationResponses, bi as DeleteProjectData, bk as DeleteProjectError, iB as DeleteProjectErrors, b9 as DeleteProjectMachineGrantData, bb as DeleteProjectMachineGrantError, iC as DeleteProjectMachineGrantErrors, ba as DeleteProjectMachineGrantResponse, iD as DeleteProjectMachineGrantResponses, bc as DeleteProjectMachinePoolGrantData, be as DeleteProjectMachinePoolGrantError, iE as DeleteProjectMachinePoolGrantErrors, bd as DeleteProjectMachinePoolGrantResponse, iF as DeleteProjectMachinePoolGrantResponses, bf as DeleteProjectModelGrantData, bh as DeleteProjectModelGrantError, iG as DeleteProjectModelGrantErrors, bg as DeleteProjectModelGrantResponse, iH as DeleteProjectModelGrantResponses, bj as DeleteProjectResponse, iI as DeleteProjectResponses, bo as DeleteSecretData, bq as DeleteSecretError, iJ as DeleteSecretErrors, bl as DeleteSecretGrantData, bn as DeleteSecretGrantError, iK as DeleteSecretGrantErrors, bm as DeleteSecretGrantResponse, iL as DeleteSecretGrantResponses, bp as DeleteSecretResponse, iM as DeleteSecretResponses, bu as DeleteSkillData, bw as DeleteSkillError, iN as DeleteSkillErrors, br as DeleteSkillGrantData, bt as DeleteSkillGrantError, iO as DeleteSkillGrantErrors, bs as DeleteSkillGrantResponse, iP as DeleteSkillGrantResponses, bv as DeleteSkillResponse, iQ as DeleteSkillResponses, bx as DemoteSteeringInputToQueuedData, bz as DemoteSteeringInputToQueuedError, iR as DemoteSteeringInputToQueuedErrors, by as DemoteSteeringInputToQueuedResponse, iS as DemoteSteeringInputToQueuedResponses, iT as DirectSecretAvailability, iU as DirectSkillAvailability, iV as DiscoveredProviderModel, bA as EndMachineDaemonRuntimeData, bC as EndMachineDaemonRuntimeError, iW as EndMachineDaemonRuntimeErrors, bB as EndMachineDaemonRuntimeResponse, iX as EndMachineDaemonRuntimeResponses, iY as ErrorContentBlock, iZ as ExternalActorParams, i_ as GenericSecretMaterial, bD as GetActorData, bF as GetActorError, i$ as GetActorErrors, j0 as GetActorResponse, j1 as GetActorResponses, bG as GetAgentConfigData, bI as GetAgentConfigError, j2 as GetAgentConfigErrors, j3 as GetAgentConfigResponse, j4 as GetAgentConfigResponses, bJ as GetAgentData, bL as GetAgentError, j5 as GetAgentErrors, bM as GetAgentProfileData, bO as GetAgentProfileError, j6 as GetAgentProfileErrors, j7 as GetAgentProfileResponse, j8 as GetAgentProfileResponses, bK as GetAgentResponse, j9 as GetAgentResponse2, ja as GetAgentResponses, bP as GetArtifactContentData, bQ as GetArtifactContentError, jb as GetArtifactContentErrors, jc as GetArtifactContentResponse, jd as GetArtifactContentResponses, bR as GetArtifactData, bT as GetArtifactError, je as GetArtifactErrors, jf as GetArtifactResponse, jg as GetArtifactResponses, bU as GetCronTriggerData, bW as GetCronTriggerError, jh as GetCronTriggerErrors, ji as GetCronTriggerResponse, jj as GetCronTriggerResponses, bX as GetCurrentUserData, bZ as GetCurrentUserError, jk as GetCurrentUserErrors, jl as GetCurrentUserResponse, jm as GetCurrentUserResponses, b_ as GetDaemonSkillArchiveData, b$ as GetDaemonSkillArchiveError, jn as GetDaemonSkillArchiveErrors, jo as GetDaemonSkillArchiveResponse, jp as GetDaemonSkillArchiveResponses, c0 as GetMachineData, c2 as GetMachineError, jq as GetMachineErrors, c3 as GetMachinePoolData, c5 as GetMachinePoolError, jr as GetMachinePoolErrors, js as GetMachinePoolResponse, jt as GetMachinePoolResponses, ju as GetMachineResponse, jv as GetMachineResponses, c6 as GetModelCatalogData, c8 as GetModelCatalogError, jw as GetModelCatalogErrors, jx as GetModelCatalogResponse, jy as GetModelCatalogResponses, c9 as GetModelProviderConfigData, cb as GetModelProviderConfigError, jz as GetModelProviderConfigErrors, jA as GetModelProviderConfigResponse, jB as GetModelProviderConfigResponses, cc as GetOrgApiKeyData, ce as GetOrgApiKeyError, jC as GetOrgApiKeyErrors, jD as GetOrgApiKeyResponse, jE as GetOrgApiKeyResponses, cf as GetOrgOverviewData, ch as GetOrgOverviewError, jF as GetOrgOverviewErrors, jG as GetOrgOverviewResponse, jH as GetOrgOverviewResponses, ci as GetProjectAvailableSecretData, ck as GetProjectAvailableSecretError, jI as GetProjectAvailableSecretErrors, jJ as GetProjectAvailableSecretResponse, jK as GetProjectAvailableSecretResponses, cl as GetProjectMachinePoolGrantData, cn as GetProjectMachinePoolGrantError, jL as GetProjectMachinePoolGrantErrors, jM as GetProjectMachinePoolGrantResponse, jN as GetProjectMachinePoolGrantResponses, co as GetSecretData, cq as GetSecretError, jO as GetSecretErrors, jP as GetSecretResponse, jQ as GetSecretResponses, cr as GetSkillData, ct as GetSkillError, jR as GetSkillErrors, jS as GetSkillResponse, jT as GetSkillResponses, cu as GetToolCatalogData, cw as GetToolCatalogError, jU as GetToolCatalogErrors, jV as GetToolCatalogResponse, jW as GetToolCatalogResponses, jX as GrantedSecretAvailability, jY as GrantedSkillAvailability, jZ as IdempotencyKey, j_ as InlineMediaContentBlock, j$ as InstallationId, k0 as IntegrationInstall, k1 as IntegrationInstallAgentProfileFilter, k2 as IntegrationInstallId, k3 as IntegrationInstallOAuthFlowIdFilter, k4 as IntegrationOAuthFlowId, k5 as IntegrationOAuthSetup, k6 as IntegrationTarget, k7 as InteractionAnswer, k8 as InteractionForm, k9 as InteractionFormContextItem, ka as InteractionFormOption, kb as InteractionFormQuestion, kc as InteractionResolution, kd as JsonBlob, ke as LaunchAgentResponse, cx as ListActorsData, cz as ListActorsError, kf as ListActorsErrors, cy as ListActorsResponse, kg as ListActorsResponse2, kh as ListActorsResponses, cT as ListAgentEventsResponse, dI as ListAgentInputsResponse, cA as ListAgentInteractionsData, cC as ListAgentInteractionsError, ki as ListAgentInteractionsErrors, cB as ListAgentInteractionsResponse, kj as ListAgentInteractionsResponse2, kk as ListAgentInteractionsResponses, cD as ListAgentProfilesData, cF as ListAgentProfilesError, kl as ListAgentProfilesErrors, cE as ListAgentProfilesResponse, km as ListAgentProfilesResponse2, kn as ListAgentProfilesResponses, e1 as ListAgentTurnsResponse, cG as ListAgentsData, cI as ListAgentsError, ko as ListAgentsErrors, cH as ListAgentsResponse, kp as ListAgentsResponse2, kq as ListAgentsResponses, cJ as ListByoMachineDaemonTokensData, cL as ListByoMachineDaemonTokensError, kr as ListByoMachineDaemonTokensErrors, ks as ListByoMachineDaemonTokensResponse, kt as ListByoMachineDaemonTokensResponses, cM as ListConfiguredModelsData, cO as ListConfiguredModelsError, ku as ListConfiguredModelsErrors, kv as ListConfiguredModelsResponse, kw as ListConfiguredModelsResponses, cP as ListCronTriggersData, cR as ListCronTriggersError, kx as ListCronTriggersErrors, cQ as ListCronTriggersResponse, ky as ListCronTriggersResponse2, kz as ListCronTriggersResponses, cS as ListEventsData, cU as ListEventsError, kA as ListEventsErrors, kB as ListEventsResponse, kC as ListEventsResponses, cV as ListIntegrationInstallsData, cX as ListIntegrationInstallsError, kD as ListIntegrationInstallsErrors, cW as ListIntegrationInstallsResponse, kE as ListIntegrationInstallsResponse2, kF as ListIntegrationInstallsResponses, cK as ListMachineDaemonTokensResponse, cY as ListMachinePoolsData, c_ as ListMachinePoolsError, kG as ListMachinePoolsErrors, cZ as ListMachinePoolsResponse, kH as ListMachinePoolsResponse2, kI as ListMachinePoolsResponses, c$ as ListMcpServerToolsData, d1 as ListMcpServerToolsError, kJ as ListMcpServerToolsErrors, d0 as ListMcpServerToolsResponse, kK as ListMcpServerToolsResponses, d2 as ListMcpServersData, d4 as ListMcpServersError, kL as ListMcpServersErrors, d3 as ListMcpServersResponse, kM as ListMcpServersResponse2, kN as ListMcpServersResponses, d5 as ListMemberProjectAccessData, d7 as ListMemberProjectAccessError, kO as ListMemberProjectAccessErrors, kP as ListMemberProjectAccessResponse, kQ as ListMemberProjectAccessResponses, d8 as ListModelProviderConfigsData, da as ListModelProviderConfigsError, kR as ListModelProviderConfigsErrors, kS as ListModelProviderConfigsResponse, kT as ListModelProviderConfigsResponses, db as ListOrgApiKeyProjectAccessData, dc as ListOrgApiKeyProjectAccessError, kU as ListOrgApiKeyProjectAccessErrors, kV as ListOrgApiKeyProjectAccessResponse, kW as ListOrgApiKeyProjectAccessResponses, dd as ListOrgApiKeysData, df as ListOrgApiKeysError, kX as ListOrgApiKeysErrors, de as ListOrgApiKeysResponse, kY as ListOrgApiKeysResponse2, kZ as ListOrgApiKeysResponses, dg as ListOrgInvitationsData, di as ListOrgInvitationsError, k_ as ListOrgInvitationsErrors, dh as ListOrgInvitationsResponse, k$ as ListOrgInvitationsResponse2, l0 as ListOrgInvitationsResponses, dj as ListOrgMembersData, dl as ListOrgMembersError, l1 as ListOrgMembersErrors, dk as ListOrgMembersResponse, l2 as ListOrgMembersResponse2, l3 as ListOrgMembersResponses, dm as ListPendingInvitationsData, dn as ListPendingInvitationsError, l4 as ListPendingInvitationsErrors, l5 as ListPendingInvitationsResponse, l6 as ListPendingInvitationsResponses, dp as ListPersonalAccessTokensData, dr as ListPersonalAccessTokensError, l7 as ListPersonalAccessTokensErrors, dq as ListPersonalAccessTokensResponse, l8 as ListPersonalAccessTokensResponse2, l9 as ListPersonalAccessTokensResponses, ds as ListProjectAvailableSecretsData, du as ListProjectAvailableSecretsError, la as ListProjectAvailableSecretsErrors, lb as ListProjectAvailableSecretsResponse, lc as ListProjectAvailableSecretsResponses, dv as ListProjectAvailableSkillsData, dx as ListProjectAvailableSkillsError, ld as ListProjectAvailableSkillsErrors, le as ListProjectAvailableSkillsResponse, lf as ListProjectAvailableSkillsResponses, dy as ListProjectMachineGrantsData, dA as ListProjectMachineGrantsError, lg as ListProjectMachineGrantsErrors, dz as ListProjectMachineGrantsResponse, lh as ListProjectMachineGrantsResponse2, li as ListProjectMachineGrantsResponses, dB as ListProjectMachinePoolGrantsData, dD as ListProjectMachinePoolGrantsError, lj as ListProjectMachinePoolGrantsErrors, dC as ListProjectMachinePoolGrantsResponse, lk as ListProjectMachinePoolGrantsResponse2, ll as ListProjectMachinePoolGrantsResponses, d6 as ListProjectMembershipGrantsResponse, dE as ListProjectModelGrantsData, dG as ListProjectModelGrantsError, lm as ListProjectModelGrantsErrors, dF as ListProjectModelGrantsResponse, ln as ListProjectModelGrantsResponse2, lo as ListProjectModelGrantsResponses, dt as ListProjectSecretAccessesResponse, dw as ListProjectSkillAccessesResponse, e9 as ListProjectsResponse, dH as ListQueuedBacklogInputsData, dJ as ListQueuedBacklogInputsError, lp as ListQueuedBacklogInputsErrors, lq as ListQueuedBacklogInputsResponse, lr as ListQueuedBacklogInputsResponses, dK as ListSecretGrantsData, dM as ListSecretGrantsError, ls as ListSecretGrantsErrors, dL as ListSecretGrantsResponse, lt as ListSecretGrantsResponse2, lu as ListSecretGrantsResponses, dN as ListSecretsData, dP as ListSecretsError, lv as ListSecretsErrors, dO as ListSecretsResponse, lw as ListSecretsResponse2, lx as ListSecretsResponses, dQ as ListSkillGrantsData, dS as ListSkillGrantsError, ly as ListSkillGrantsErrors, dR as ListSkillGrantsResponse, lz as ListSkillGrantsResponse2, lA as ListSkillGrantsResponses, dT as ListSkillsData, dV as ListSkillsError, lB as ListSkillsErrors, dU as ListSkillsResponse, lC as ListSkillsResponse2, lD as ListSkillsResponses, dW as ListToolCallsData, dY as ListToolCallsError, lE as ListToolCallsErrors, dX as ListToolCallsResponse, lF as ListToolCallsResponse2, lG as ListToolCallsResponses, dZ as ListTurnEventsData, d$ as ListTurnEventsError, lH as ListTurnEventsErrors, d_ as ListTurnEventsResponse, lI as ListTurnEventsResponse2, lJ as ListTurnEventsResponses, e0 as ListTurnsData, e2 as ListTurnsError, lK as ListTurnsErrors, lL as ListTurnsResponse, lM as ListTurnsResponses, e3 as ListVisibleMachinesData, e5 as ListVisibleMachinesError, lN as ListVisibleMachinesErrors, e4 as ListVisibleMachinesResponse, lO as ListVisibleMachinesResponse2, lP as ListVisibleMachinesResponses, e6 as ListVisibleProjectMachinesData, e7 as ListVisibleProjectMachinesError, lQ as ListVisibleProjectMachinesErrors, lR as ListVisibleProjectMachinesResponse, lS as ListVisibleProjectMachinesResponses, e8 as ListVisibleProjectsData, ea as ListVisibleProjectsError, lT as ListVisibleProjectsErrors, lU as ListVisibleProjectsResponse, lV as ListVisibleProjectsResponses, c1 as Machine, lW as MachineAccess, lX as MachineAccessSource, lY as MachineAccessSourceKind, lZ as MachineConnectionState, l_ as MachineDaemonToken, l$ as MachineDaemonTokenId, m0 as MachineFailureReport, m1 as MachineId, m2 as MachineLifecycleState, m3 as MachineMetadata, c4 as MachinePool, m4 as MachinePoolId, m5 as MachinePoolSummary, m6 as MachinePoolUsage, m7 as MachineSourceKind, m8 as MachineSourceKindFilter, m9 as MachineSummary, ma as MachineSummaryFields, mb as ManagementKind, mc as McpRegistryHeader, md as McpRegistryIcon, me as McpRegistryRemote, mf as McpRegistryServer, mg as McpServerAuth, mh as McpServerAuthBearer, mi as McpServerAuthHint, mj as McpServerAuthNone, mk as McpServerAuthOAuth, ml as McpServerAuthRequiredError, mm as McpServerAuthSigV4, mn as McpServerInfo, mo as McpServerTool, mp as McpServerToolAnnotations, mq as McpServerToolsRequest, mr as McpServerToolsResponse, ms as McpoAuthFlowId, mt as McpoAuthStartMetadata, mu as McpoAuthStartRequest, mv as McpoAuthStartResponse, mw as MediaRefContentBlock, mx as Metadata, my as ModelApiFormat, mz as ModelApiVariantOptions, mA as ModelCacheRetention, mB as ModelCallContextId, c7 as ModelCatalog, mC as ModelOutputBlockStartDelta, mD as ModelOutputBlockStopDelta, mE as ModelOutputContentBlock, mF as ModelOutputDelta, mG as ModelOutputErrorDelta, mH as ModelOutputEvent, mI as ModelOutputMessageStopDelta, mJ as ModelOutputStopReason, mK as ModelOutputStreamBlock, mL as ModelOutputStreamDelta, mM as ModelOutputTextDelta, mN as ModelOutputTextStreamBlock, mO as ModelOutputThinkingDelta, mP as ModelOutputThinkingStreamBlock, mQ as ModelOutputToolArgumentsDelta, mR as ModelOutputToolUseStreamBlock, mS as ModelProviderApiVariant, mT as ModelProviderApiVariantResponse, mU as ModelProviderAuthKind, ca as ModelProviderConfig, mV as ModelProviderConfigId, d9 as ModelProviderConfigList, mW as ModelStopReason, mX as ModelToolCallContentBlock, mY as ModelUsage, eb as MoveQueuedBacklogInputData, ed as MoveQueuedBacklogInputError, mZ as MoveQueuedBacklogInputErrors, m_ as MoveQueuedBacklogInputRequest, ec as MoveQueuedBacklogInputResponse, m$ as MoveQueuedBacklogInputResponses, n0 as OAuthRefreshSecretMaterial, n1 as OAuthTokenSetSecretMaterial, n2 as OkResponse, cd as OrgApiKey, n3 as OrgApiKeyId, n4 as OrgApiKeyRole, n5 as OrgInvitation, n6 as OrgInvitationId, n7 as OrgMember, cg as OrgOverviewResponse, n8 as OrgSecretOwner, n9 as OrgSecretOwnerInput, na as OrgSkillOwner, nb as OrgSkillOwnerInput, nc as Organization, nd as OrganizationId, ne as OrganizationMembership, nf as PageCursor, ng as PageLimit, nh as PersonalAccessToken, ni as PersonalAccessTokenId, nj as ProcessActionId, nk as ProcessActionReconciliationClaim, nl as ProcessActionReconciliationDirective, nm as ProcessId, nn as ProcessReconciliationClaim, no as ProcessReconciliationDirective, np as Project, nq as ProjectAccess, nr as ProjectFields, ns as ProjectId, nt as ProjectMachineGrant, nu as ProjectMachineGrantId, nv as ProjectMachineGrantListItem, nw as ProjectMachineGrantSourceKind, cm as ProjectMachinePoolGrant, nx as ProjectMachinePoolGrantId, ny as ProjectMachinePoolGrantListItem, nz as ProjectMembershipGrant, nA as ProjectModelGrant, nB as ProjectModelGrantEnvelope, nC as ProjectModelGrantId, nD as ProjectModelGrantListItem, cj as ProjectSecretAccess, nE as ProjectSecretOwner, nF as ProjectSecretOwnerInput, nG as ProjectSkillAccess, nH as ProjectSkillOwner, nI as ProjectSkillOwnerInput, ee as PromoteQueuedInputToSteeringData, eg as PromoteQueuedInputToSteeringError, nJ as PromoteQueuedInputToSteeringErrors, nK as PromoteQueuedInputToSteeringRequest, ef as PromoteQueuedInputToSteeringResponse, nL as PromoteQueuedInputToSteeringResponses, eh as PutActorData, ej as PutActorError, nM as PutActorErrors, ei as PutActorResponse, nN as PutActorResponses, nO as ReasoningContentBlock, ek as RecordMachineFailureData, em as RecordMachineFailureError, nP as RecordMachineFailureErrors, el as RecordMachineFailureResponse, nQ as RecordMachineFailureResponses, nR as RegisterDaemonRuntimeRequest, nS as RegisterDaemonRuntimeResponse, en as RegisterMachineDaemonRuntimeData, ep as RegisterMachineDaemonRuntimeError, nT as RegisterMachineDaemonRuntimeErrors, eo as RegisterMachineDaemonRuntimeResponse, nU as RegisterMachineDaemonRuntimeResponses, eq as RemoveMemberProjectAccessData, es as RemoveMemberProjectAccessError, nV as RemoveMemberProjectAccessErrors, er as RemoveMemberProjectAccessResponse, nW as RemoveMemberProjectAccessResponses, et as RemoveOrgApiKeyProjectRoleData, ev as RemoveOrgApiKeyProjectRoleError, nX as RemoveOrgApiKeyProjectRoleErrors, eu as RemoveOrgApiKeyProjectRoleResponse, nY as RemoveOrgApiKeyProjectRoleResponses, ew as RemoveOrgMemberData, ey as RemoveOrgMemberError, nZ as RemoveOrgMemberErrors, ex as RemoveOrgMemberResponse, n_ as RemoveOrgMemberResponses, ez as RenameAgentProfileData, eB as RenameAgentProfileError, n$ as RenameAgentProfileErrors, o0 as RenameAgentProfileRequest, eA as RenameAgentProfileResponse, o1 as RenameAgentProfileResponses, eC as ResolveAgentInteractionData, eE as ResolveAgentInteractionError, o2 as ResolveAgentInteractionErrors, o3 as ResolveAgentInteractionRequest, eD as ResolveAgentInteractionResponse, o4 as ResolveAgentInteractionResponses, o5 as ResourceListSort, o6 as ResourceName, o7 as ResourceNameFilter, eF as RevokeMachineDaemonTokenData, eH as RevokeMachineDaemonTokenError, o8 as RevokeMachineDaemonTokenErrors, eG as RevokeMachineDaemonTokenResponse, o9 as RevokeMachineDaemonTokenResponses, eI as RevokeOrgApiKeyData, eK as RevokeOrgApiKeyError, oa as RevokeOrgApiKeyErrors, eJ as RevokeOrgApiKeyResponse, ob as RevokeOrgApiKeyResponses, eL as RevokePersonalAccessTokenData, eN as RevokePersonalAccessTokenError, oc as RevokePersonalAccessTokenErrors, eM as RevokePersonalAccessTokenResponse, od as RevokePersonalAccessTokenResponses, cp as Secret, oe as SecretAvailability, of as SecretAvailabilitySourceFilter, og as SecretGrant, oh as SecretGrantCreateRequest, oi as SecretGrantId, oj as SecretGrantListItem, ok as SecretId, ol as SecretKind, om as SecretKindFilter, on as SecretMaterial, oo as SecretMcpoAuthFlowIdFilter, op as SecretMetadataFilter, oq as SecretOwner, or as SecretOwnerInput, os as SecretOwnerKindFilter, ot as SecretOwnerProjectIdFilter, ou as SecretVersionRequest, ov as ServerErrorCode, eO as SetMemberProjectAccessData, eQ as SetMemberProjectAccessError, ow as SetMemberProjectAccessErrors, eP as SetMemberProjectAccessResponse, ox as SetMemberProjectAccessResponses, eR as SetOrgApiKeyProjectRoleData, eT as SetOrgApiKeyProjectRoleError, oy as SetOrgApiKeyProjectRoleErrors, eS as SetOrgApiKeyProjectRoleResponse, oz as SetOrgApiKeyProjectRoleResponses, oA as SetProjectMembershipRequest, cs as Skill, oB as SkillAvailability, oC as SkillAvailabilitySourceFilter, oD as SkillGrant, oE as SkillGrantCreateRequest, oF as SkillGrantId, oG as SkillGrantListItem, oH as SkillId, oI as SkillName, oJ as SkillOwner, oK as SkillOwnerInput, oL as SkillOwnerKindFilter, oM as SkillOwnerProjectIdFilter, oN as SkillRevisionId, oO as SlackSetup, oP as SlackSetupIcon, eU as SleepMachineDaemonRuntimeData, eW as SleepMachineDaemonRuntimeError, oQ as SleepMachineDaemonRuntimeErrors, eV as SleepMachineDaemonRuntimeResponse, oR as SleepMachineDaemonRuntimeResponses, eX as SocketMachineDaemonRuntimeData, eY as SocketMachineDaemonRuntimeError, oS as SocketMachineDaemonRuntimeErrors, eZ as StartSecretMcpoAuthData, e$ as StartSecretMcpoAuthError, oT as StartSecretMcpoAuthErrors, e_ as StartSecretMcpoAuthResponse, oU as StartSecretMcpoAuthResponses, oV as StreamEventsError, oW as StreamEventsErrors, oX as StreamEventsResponse, oY as StreamEventsResponses, oZ as StructuredDataContentBlock, f0 as SubmitToolCallResultData, f2 as SubmitToolCallResultError, o_ as SubmitToolCallResultErrors, o$ as SubmitToolCallResultRequest, p0 as SubmitToolCallResultResponse, f1 as SubmitToolCallResultResponse2, p1 as SubmitToolCallResultResponses, p2 as SubmitToolResultContentBlock, p3 as TextContentBlock, p4 as Timestamp, p5 as ToolCall, p6 as ToolCallId, p7 as ToolCallOutcome, p8 as ToolCallState, p9 as ToolCallType, pa as ToolCallUpdate, cv as ToolCatalog, pb as ToolCatalogEntry, pc as ToolInput, pd as ToolPermissionMode, pe as ToolPermissionProfile, pf as ToolPermissionSelection, pg as ToolResult, ph as ToolResultContentBlock, pi as ToolResultEvent, f3 as UpdateAgentConfigData, f5 as UpdateAgentConfigError, pj as UpdateAgentConfigErrors, pk as UpdateAgentConfigRequest, pl as UpdateAgentConfigResponse, f4 as UpdateAgentConfigResponse2, pm as UpdateAgentConfigResponses, f6 as UpdateAgentProfileData, f8 as UpdateAgentProfileError, pn as UpdateAgentProfileErrors, po as UpdateAgentProfileRequest, f7 as UpdateAgentProfileResponse, pp as UpdateAgentProfileResponses, f9 as UpdateConfiguredModelData, fb as UpdateConfiguredModelError, pq as UpdateConfiguredModelErrors, pr as UpdateConfiguredModelRequest, fa as UpdateConfiguredModelResponse, ps as UpdateConfiguredModelResponses, fc as UpdateCronTriggerData, fe as UpdateCronTriggerError, pt as UpdateCronTriggerErrors, pu as UpdateCronTriggerRequest, fd as UpdateCronTriggerResponse, pv as UpdateCronTriggerResponses, ff as UpdateMachineData, fh as UpdateMachineError, pw as UpdateMachineErrors, fi as UpdateMachinePoolData, fk as UpdateMachinePoolError, px as UpdateMachinePoolErrors, py as UpdateMachinePoolRequest, fj as UpdateMachinePoolResponse, pz as UpdateMachinePoolResponses, pA as UpdateMachineRequest, fg as UpdateMachineResponse, pB as UpdateMachineResponses, fl as UpdateModelProviderConfigData, fn as UpdateModelProviderConfigError, pC as UpdateModelProviderConfigErrors, pD as UpdateModelProviderConfigRequest, fm as UpdateModelProviderConfigResponse, pE as UpdateModelProviderConfigResponses, fo as UpdateOrgApiKeyData, fq as UpdateOrgApiKeyError, pF as UpdateOrgApiKeyErrors, pG as UpdateOrgApiKeyRequest, fp as UpdateOrgApiKeyResponse, pH as UpdateOrgApiKeyResponses, fr as UpdateOrgMemberData, ft as UpdateOrgMemberError, pI as UpdateOrgMemberErrors, pJ as UpdateOrgMemberRequest, fs as UpdateOrgMemberResponse, pK as UpdateOrgMemberResponses, fu as UpdateProjectMachinePoolGrantData, fw as UpdateProjectMachinePoolGrantError, pL as UpdateProjectMachinePoolGrantErrors, pM as UpdateProjectMachinePoolGrantRequest, fv as UpdateProjectMachinePoolGrantResponse, pN as UpdateProjectMachinePoolGrantResponses, fx as UpdateProjectModelGrantData, fz as UpdateProjectModelGrantError, pO as UpdateProjectModelGrantErrors, pP as UpdateProjectModelGrantRequest, fy as UpdateProjectModelGrantResponse, pQ as UpdateProjectModelGrantResponses, fA as UpdateSecretData, fC as UpdateSecretError, pR as UpdateSecretErrors, pS as UpdateSecretRequest, fB as UpdateSecretResponse, pT as UpdateSecretResponses, pU as UploadArtifactResponse, fD as UploadDaemonArtifactData, fF as UploadDaemonArtifactError, pV as UploadDaemonArtifactErrors, fE as UploadDaemonArtifactResponse, pW as UploadDaemonArtifactResponses, pX as UserId, pY as UserSecretOwner, pZ as UserSecretOwnerInput, p_ as UserSkillOwner, p$ as UserSkillOwnerInput, q0 as VisibleMachine, q1 as VisibleProject, q2 as Warning, q3 as sdk } from './sdk.gen-DOEQDUdf.js';
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { fL as Config, fM as Client, fN as StreamEventsData, fO as AgentEventStreamData, fP as PersonalAccessToken, fQ as Error$1, fR as AgentConfigErrorIssue } from './sdk.gen-qOnMVktp.js';
|
|
4
|
+
export { A as AcceptInvitationData, b as AcceptInvitationError, fS as AcceptInvitationErrors, a as AcceptInvitationResponse, fT as AcceptInvitationResponses, bG as Actor, fU as ActorId, fV as ActorProvider, fW as Agent, bJ as AgentConfig, fX as AgentConfigId, fY as AgentConfigModel, fZ as AgentControlType, f_ as AgentCount, f$ as AgentCronTriggerTarget, g0 as AgentEvent, g1 as AgentEventId, g2 as AgentId, g3 as AgentInput, g4 as AgentInputContentBlock, g5 as AgentInputDeliveryMode, g6 as AgentInputEnvelope, g7 as AgentInputEvent, g8 as AgentInputId, g9 as AgentInputKind, ga as AgentInteraction, gb as AgentInteractionId, gc as AgentInteractionKind, gd as AgentInteractionState, ge as AgentMachineBinding, gf as AgentMachineBindingId, gg as AgentMachineBindingKind, gh as AgentMachineBindingState, gi as AgentMcpConnection, gj as AgentModel, gk as AgentName, bP as AgentProfile, gl as AgentProfileCronTriggerTarget, gm as AgentProfileId, gn as AgentSequence, go as AgentSequenceCursor, gp as AgentTurn, gq as AgentTurnId, c as ArchiveAgentData, e as ArchiveAgentError, gr as ArchiveAgentErrors, d as ArchiveAgentResponse, gs as ArchiveAgentResponses, bU as Artifact, gt as ArtifactId, gu as AwsCredentialsSecretMaterial, B as BootstrapDaemonData, g as BootstrapDaemonError, gv as BootstrapDaemonErrors, gw as BootstrapDaemonResponse, f as BootstrapDaemonResponse2, gx as BootstrapDaemonResponses, C as CancelAgentData, i as CancelAgentError, gy as CancelAgentErrors, gz as CancelAgentRequest, gA as CancelAgentResponse, h as CancelAgentResponse2, gB as CancelAgentResponses, j as CancelQueuedBacklogInputData, l as CancelQueuedBacklogInputError, gC as CancelQueuedBacklogInputErrors, k as CancelQueuedBacklogInputResponse, gD as CancelQueuedBacklogInputResponses, gE as ClientErrorCode, gF as ClientOptions, gG as ConfiguredModel, gH as ConfiguredModelId, cP as ConfiguredModelList, gI as ConfiguredModelRevisionId, gJ as ConfiguredModelSummary, m as ConnectByoMachineData, o as ConnectByoMachineError, gK as ConnectByoMachineErrors, gL as ConnectByoMachineRequest, gM as ConnectByoMachineResponse, n as ConnectByoMachineResponse2, gN as ConnectByoMachineResponses, gO as ContentBlockMetadata, gP as ContextCheckpointEvent, gQ as ContextCheckpointId, p as CreateAgentConfigData, r as CreateAgentConfigError, gR as CreateAgentConfigErrors, gS as CreateAgentConfigRequest, q as CreateAgentConfigResponse, gT as CreateAgentConfigResponses, v as CreateAgentData, x as CreateAgentError, gU as CreateAgentErrors, gV as CreateAgentInputContentBlock, s as CreateAgentInputData, gW as CreateAgentInputDeliveryMode, u as CreateAgentInputError, gX as CreateAgentInputErrors, gY as CreateAgentInputRequest, t as CreateAgentInputResponse, gZ as CreateAgentInputResponses, y as CreateAgentProfileData, D as CreateAgentProfileError, g_ as CreateAgentProfileErrors, g$ as CreateAgentProfileRequest, z as CreateAgentProfileResponse, h0 as CreateAgentProfileResponses, h1 as CreateAgentRequest, w as CreateAgentResponse, h2 as CreateAgentResponses, E as CreateByoMachineDaemonTokenData, G as CreateByoMachineDaemonTokenError, h3 as CreateByoMachineDaemonTokenErrors, F as CreateByoMachineDaemonTokenResponse, h4 as CreateByoMachineDaemonTokenResponses, H as CreateConfiguredModelData, J as CreateConfiguredModelError, h5 as CreateConfiguredModelErrors, h6 as CreateConfiguredModelRequest, I as CreateConfiguredModelResponse, h7 as CreateConfiguredModelResponses, K as CreateCronTriggerData, M as CreateCronTriggerError, h8 as CreateCronTriggerErrors, h9 as CreateCronTriggerRequest, L as CreateCronTriggerResponse, ha as CreateCronTriggerResponses, N as CreateIntegrationOAuthSetupData, Q as CreateIntegrationOAuthSetupError, hb as CreateIntegrationOAuthSetupErrors, hc as CreateIntegrationOAuthSetupRequest, P as CreateIntegrationOAuthSetupResponse, hd as CreateIntegrationOAuthSetupResponses, he as CreateMachineDaemonTokenRequest, hf as CreateMachineDaemonTokenResponse, R as CreateMachineData, T as CreateMachineError, hg as CreateMachineErrors, U as CreateMachinePoolData, W as CreateMachinePoolError, hh as CreateMachinePoolErrors, hi as CreateMachinePoolRequest, hj as CreateMachinePoolRequestBase, V as CreateMachinePoolResponse, hk as CreateMachinePoolResponses, hl as CreateMachineRequest, S as CreateMachineResponse, hm as CreateMachineResponses, X as CreateModelProviderConfigData, Z as CreateModelProviderConfigError, hn as CreateModelProviderConfigErrors, ho as CreateModelProviderConfigRequest, hp as CreateModelProviderConfigResponse, Y as CreateModelProviderConfigResponse2, hq as CreateModelProviderConfigResponses, _ as CreateOrgApiKeyData, a0 as CreateOrgApiKeyError, hr as CreateOrgApiKeyErrors, hs as CreateOrgApiKeyRequest, ht as CreateOrgApiKeyResponse, $ as CreateOrgApiKeyResponse2, hu as CreateOrgApiKeyResponses, a1 as CreateOrgInvitationData, a3 as CreateOrgInvitationError, hv as CreateOrgInvitationErrors, hw as CreateOrgInvitationRequest, a2 as CreateOrgInvitationResponse, hx as CreateOrgInvitationResponses, a4 as CreateOrganizationData, a6 as CreateOrganizationError, hy as CreateOrganizationErrors, hz as CreateOrganizationRequest, hA as CreateOrganizationResponse, a5 as CreateOrganizationResponse2, hB as CreateOrganizationResponses, a7 as CreatePersonalAccessTokenData, a9 as CreatePersonalAccessTokenError, hC as CreatePersonalAccessTokenErrors, hD as CreatePersonalAccessTokenRequest, hE as CreatePersonalAccessTokenResponse, a8 as CreatePersonalAccessTokenResponse2, hF as CreatePersonalAccessTokenResponses, aj as CreateProjectData, al as CreateProjectError, hG as CreateProjectErrors, aa as CreateProjectMachineGrantData, ac as CreateProjectMachineGrantError, hH as CreateProjectMachineGrantErrors, hI as CreateProjectMachineGrantRequest, hJ as CreateProjectMachineGrantResponse, ab as CreateProjectMachineGrantResponse2, hK as CreateProjectMachineGrantResponses, ad as CreateProjectMachinePoolGrantData, af as CreateProjectMachinePoolGrantError, hL as CreateProjectMachinePoolGrantErrors, hM as CreateProjectMachinePoolGrantRequest, ae as CreateProjectMachinePoolGrantResponse, hN as CreateProjectMachinePoolGrantResponses, ag as CreateProjectModelGrantData, ai as CreateProjectModelGrantError, hO as CreateProjectModelGrantErrors, hP as CreateProjectModelGrantRequest, ah as CreateProjectModelGrantResponse, hQ as CreateProjectModelGrantResponses, hR as CreateProjectRequest, ak as CreateProjectResponse, hS as CreateProjectResponses, ap as CreateSecretData, ar as CreateSecretError, hT as CreateSecretErrors, am as CreateSecretGrantData, ao as CreateSecretGrantError, hU as CreateSecretGrantErrors, an as CreateSecretGrantResponse, hV as CreateSecretGrantResponses, hW as CreateSecretRequest, aq as CreateSecretResponse, hX as CreateSecretResponses, as as CreateSecretVersionData, au as CreateSecretVersionError, hY as CreateSecretVersionErrors, at as CreateSecretVersionResponse, hZ as CreateSecretVersionResponses, ay as CreateSkillData, aA as CreateSkillError, h_ as CreateSkillErrors, av as CreateSkillGrantData, ax as CreateSkillGrantError, h$ as CreateSkillGrantErrors, aw as CreateSkillGrantResponse, i0 as CreateSkillGrantResponses, i1 as CreateSkillRequest, az as CreateSkillResponse, i2 as CreateSkillResponses, aB as CreateSlackSetupData, aD as CreateSlackSetupError, i3 as CreateSlackSetupErrors, i4 as CreateSlackSetupRequest, aC as CreateSlackSetupResponse, i5 as CreateSlackSetupResponses, i6 as CreatedResourceListSort, i7 as CronExpression, i8 as CronMessageTemplate, i9 as CronTimezone, bX as CronTrigger, ia as CronTriggerFailureReport, ib as CronTriggerId, ic as CronTriggerTarget, id as CurrentAgentResponse, b_ as CurrentUser, ie as CurrentUserIdentity, ig as CurrentUserOrg, ih as DaemonRuntime, ii as DaemonRuntimeId, ij as DaemonRuntimeReconciliation, ik as DaemonRuntimeState, aE as DeclineInvitationData, aG as DeclineInvitationError, il as DeclineInvitationErrors, aF as DeclineInvitationResponse, im as DeclineInvitationResponses, aH as DeleteAgentProfileData, aJ as DeleteAgentProfileError, io as DeleteAgentProfileErrors, aI as DeleteAgentProfileResponse, ip as DeleteAgentProfileResponses, aK as DeleteConfiguredModelData, aM as DeleteConfiguredModelError, iq as DeleteConfiguredModelErrors, aL as DeleteConfiguredModelResponse, ir as DeleteConfiguredModelResponses, aN as DeleteCronTriggerData, aP as DeleteCronTriggerError, is as DeleteCronTriggerErrors, aO as DeleteCronTriggerResponse, it as DeleteCronTriggerResponses, aQ as DeleteCurrentUserData, aS as DeleteCurrentUserError, iu as DeleteCurrentUserErrors, aR as DeleteCurrentUserResponse, iv as DeleteCurrentUserResponses, aT as DeleteIntegrationInstallData, aV as DeleteIntegrationInstallError, iw as DeleteIntegrationInstallErrors, aU as DeleteIntegrationInstallResponse, ix as DeleteIntegrationInstallResponses, aW as DeleteMachineData, aY as DeleteMachineError, iy as DeleteMachineErrors, aZ as DeleteMachinePoolData, a$ as DeleteMachinePoolError, iz as DeleteMachinePoolErrors, a_ as DeleteMachinePoolResponse, iA as DeleteMachinePoolResponses, aX as DeleteMachineResponse, iB as DeleteMachineResponses, b0 as DeleteModelProviderConfigData, b2 as DeleteModelProviderConfigError, iC as DeleteModelProviderConfigErrors, b1 as DeleteModelProviderConfigResponse, iD as DeleteModelProviderConfigResponses, b3 as DeleteOrgInvitationData, b5 as DeleteOrgInvitationError, iE as DeleteOrgInvitationErrors, b4 as DeleteOrgInvitationResponse, iF as DeleteOrgInvitationResponses, b6 as DeleteOrganizationData, b8 as DeleteOrganizationError, iG as DeleteOrganizationErrors, b7 as DeleteOrganizationResponse, iH as DeleteOrganizationResponses, bi as DeleteProjectData, bk as DeleteProjectError, iI as DeleteProjectErrors, b9 as DeleteProjectMachineGrantData, bb as DeleteProjectMachineGrantError, iJ as DeleteProjectMachineGrantErrors, ba as DeleteProjectMachineGrantResponse, iK as DeleteProjectMachineGrantResponses, bc as DeleteProjectMachinePoolGrantData, be as DeleteProjectMachinePoolGrantError, iL as DeleteProjectMachinePoolGrantErrors, bd as DeleteProjectMachinePoolGrantResponse, iM as DeleteProjectMachinePoolGrantResponses, bf as DeleteProjectModelGrantData, bh as DeleteProjectModelGrantError, iN as DeleteProjectModelGrantErrors, bg as DeleteProjectModelGrantResponse, iO as DeleteProjectModelGrantResponses, bj as DeleteProjectResponse, iP as DeleteProjectResponses, bo as DeleteSecretData, bq as DeleteSecretError, iQ as DeleteSecretErrors, bl as DeleteSecretGrantData, bn as DeleteSecretGrantError, iR as DeleteSecretGrantErrors, bm as DeleteSecretGrantResponse, iS as DeleteSecretGrantResponses, bp as DeleteSecretResponse, iT as DeleteSecretResponses, bu as DeleteSkillData, bw as DeleteSkillError, iU as DeleteSkillErrors, br as DeleteSkillGrantData, bt as DeleteSkillGrantError, iV as DeleteSkillGrantErrors, bs as DeleteSkillGrantResponse, iW as DeleteSkillGrantResponses, bv as DeleteSkillResponse, iX as DeleteSkillResponses, bx as DemoteSteeringInputToQueuedData, bz as DemoteSteeringInputToQueuedError, iY as DemoteSteeringInputToQueuedErrors, by as DemoteSteeringInputToQueuedResponse, iZ as DemoteSteeringInputToQueuedResponses, i_ as DirectSecretAvailability, i$ as DirectSkillAvailability, j0 as DiscoveredProviderModel, bA as DownloadDaemonArtifactData, bB as DownloadDaemonArtifactError, j1 as DownloadDaemonArtifactErrors, j2 as DownloadDaemonArtifactResponse, j3 as DownloadDaemonArtifactResponses, bC as EndMachineDaemonRuntimeData, bE as EndMachineDaemonRuntimeError, j4 as EndMachineDaemonRuntimeErrors, bD as EndMachineDaemonRuntimeResponse, j5 as EndMachineDaemonRuntimeResponses, j6 as ErrorContentBlock, j7 as ExternalActorParams, j8 as GenericSecretMaterial, bF as GetActorData, bH as GetActorError, j9 as GetActorErrors, ja as GetActorResponse, jb as GetActorResponses, bI as GetAgentConfigData, bK as GetAgentConfigError, jc as GetAgentConfigErrors, jd as GetAgentConfigResponse, je as GetAgentConfigResponses, bL as GetAgentData, bN as GetAgentError, jf as GetAgentErrors, bO as GetAgentProfileData, bQ as GetAgentProfileError, jg as GetAgentProfileErrors, jh as GetAgentProfileResponse, ji as GetAgentProfileResponses, bM as GetAgentResponse, jj as GetAgentResponse2, jk as GetAgentResponses, bR as GetArtifactContentData, bS as GetArtifactContentError, jl as GetArtifactContentErrors, jm as GetArtifactContentResponse, jn as GetArtifactContentResponses, bT as GetArtifactData, bV as GetArtifactError, jo as GetArtifactErrors, jp as GetArtifactResponse, jq as GetArtifactResponses, bW as GetCronTriggerData, bY as GetCronTriggerError, jr as GetCronTriggerErrors, js as GetCronTriggerResponse, jt as GetCronTriggerResponses, bZ as GetCurrentUserData, b$ as GetCurrentUserError, ju as GetCurrentUserErrors, jv as GetCurrentUserResponse, jw as GetCurrentUserResponses, c0 as GetDaemonSkillArchiveData, c1 as GetDaemonSkillArchiveError, jx as GetDaemonSkillArchiveErrors, jy as GetDaemonSkillArchiveResponse, jz as GetDaemonSkillArchiveResponses, c2 as GetMachineData, c4 as GetMachineError, jA as GetMachineErrors, c5 as GetMachinePoolData, c7 as GetMachinePoolError, jB as GetMachinePoolErrors, jC as GetMachinePoolResponse, jD as GetMachinePoolResponses, jE as GetMachineResponse, jF as GetMachineResponses, c8 as GetModelCatalogData, ca as GetModelCatalogError, jG as GetModelCatalogErrors, jH as GetModelCatalogResponse, jI as GetModelCatalogResponses, cb as GetModelProviderConfigData, cd as GetModelProviderConfigError, jJ as GetModelProviderConfigErrors, jK as GetModelProviderConfigResponse, jL as GetModelProviderConfigResponses, ce as GetOrgApiKeyData, cg as GetOrgApiKeyError, jM as GetOrgApiKeyErrors, jN as GetOrgApiKeyResponse, jO as GetOrgApiKeyResponses, ch as GetOrgOverviewData, cj as GetOrgOverviewError, jP as GetOrgOverviewErrors, jQ as GetOrgOverviewResponse, jR as GetOrgOverviewResponses, ck as GetProjectAvailableSecretData, cm as GetProjectAvailableSecretError, jS as GetProjectAvailableSecretErrors, jT as GetProjectAvailableSecretResponse, jU as GetProjectAvailableSecretResponses, cn as GetProjectMachinePoolGrantData, cp as GetProjectMachinePoolGrantError, jV as GetProjectMachinePoolGrantErrors, jW as GetProjectMachinePoolGrantResponse, jX as GetProjectMachinePoolGrantResponses, cq as GetSecretData, cs as GetSecretError, jY as GetSecretErrors, jZ as GetSecretResponse, j_ as GetSecretResponses, ct as GetSkillData, cv as GetSkillError, j$ as GetSkillErrors, k0 as GetSkillResponse, k1 as GetSkillResponses, cw as GetToolCatalogData, cy as GetToolCatalogError, k2 as GetToolCatalogErrors, k3 as GetToolCatalogResponse, k4 as GetToolCatalogResponses, k5 as GrantedSecretAvailability, k6 as GrantedSkillAvailability, k7 as IdempotencyKey, k8 as InlineMediaContentBlock, k9 as InstallationId, ka as IntegrationInstall, kb as IntegrationInstallAgentProfileFilter, kc as IntegrationInstallId, kd as IntegrationInstallOAuthFlowIdFilter, ke as IntegrationOAuthFlowId, kf as IntegrationOAuthSetup, kg as IntegrationTarget, kh as InteractionAnswer, ki as InteractionForm, kj as InteractionFormContextItem, kk as InteractionFormOption, kl as InteractionFormQuestion, km as InteractionResolution, kn as JsonBlob, ko as LaunchAgentResponse, cz as ListActorsData, cB as ListActorsError, kp as ListActorsErrors, cA as ListActorsResponse, kq as ListActorsResponse2, kr as ListActorsResponses, cV as ListAgentEventsResponse, dK as ListAgentInputsResponse, cC as ListAgentInteractionsData, cE as ListAgentInteractionsError, ks as ListAgentInteractionsErrors, cD as ListAgentInteractionsResponse, kt as ListAgentInteractionsResponse2, ku as ListAgentInteractionsResponses, cF as ListAgentProfilesData, cH as ListAgentProfilesError, kv as ListAgentProfilesErrors, cG as ListAgentProfilesResponse, kw as ListAgentProfilesResponse2, kx as ListAgentProfilesResponses, e3 as ListAgentTurnsResponse, cI as ListAgentsData, cK as ListAgentsError, ky as ListAgentsErrors, cJ as ListAgentsResponse, kz as ListAgentsResponse2, kA as ListAgentsResponses, cL as ListByoMachineDaemonTokensData, cN as ListByoMachineDaemonTokensError, kB as ListByoMachineDaemonTokensErrors, kC as ListByoMachineDaemonTokensResponse, kD as ListByoMachineDaemonTokensResponses, cO as ListConfiguredModelsData, cQ as ListConfiguredModelsError, kE as ListConfiguredModelsErrors, kF as ListConfiguredModelsResponse, kG as ListConfiguredModelsResponses, cR as ListCronTriggersData, cT as ListCronTriggersError, kH as ListCronTriggersErrors, cS as ListCronTriggersResponse, kI as ListCronTriggersResponse2, kJ as ListCronTriggersResponses, cU as ListEventsData, cW as ListEventsError, kK as ListEventsErrors, kL as ListEventsResponse, kM as ListEventsResponses, cX as ListIntegrationInstallsData, cZ as ListIntegrationInstallsError, kN as ListIntegrationInstallsErrors, cY as ListIntegrationInstallsResponse, kO as ListIntegrationInstallsResponse2, kP as ListIntegrationInstallsResponses, cM as ListMachineDaemonTokensResponse, c_ as ListMachinePoolsData, d0 as ListMachinePoolsError, kQ as ListMachinePoolsErrors, c$ as ListMachinePoolsResponse, kR as ListMachinePoolsResponse2, kS as ListMachinePoolsResponses, d1 as ListMcpServerToolsData, d3 as ListMcpServerToolsError, kT as ListMcpServerToolsErrors, d2 as ListMcpServerToolsResponse, kU as ListMcpServerToolsResponses, d4 as ListMcpServersData, d6 as ListMcpServersError, kV as ListMcpServersErrors, d5 as ListMcpServersResponse, kW as ListMcpServersResponse2, kX as ListMcpServersResponses, d7 as ListMemberProjectAccessData, d9 as ListMemberProjectAccessError, kY as ListMemberProjectAccessErrors, kZ as ListMemberProjectAccessResponse, k_ as ListMemberProjectAccessResponses, da as ListModelProviderConfigsData, dc as ListModelProviderConfigsError, k$ as ListModelProviderConfigsErrors, l0 as ListModelProviderConfigsResponse, l1 as ListModelProviderConfigsResponses, dd as ListOrgApiKeyProjectAccessData, de as ListOrgApiKeyProjectAccessError, l2 as ListOrgApiKeyProjectAccessErrors, l3 as ListOrgApiKeyProjectAccessResponse, l4 as ListOrgApiKeyProjectAccessResponses, df as ListOrgApiKeysData, dh as ListOrgApiKeysError, l5 as ListOrgApiKeysErrors, dg as ListOrgApiKeysResponse, l6 as ListOrgApiKeysResponse2, l7 as ListOrgApiKeysResponses, di as ListOrgInvitationsData, dk as ListOrgInvitationsError, l8 as ListOrgInvitationsErrors, dj as ListOrgInvitationsResponse, l9 as ListOrgInvitationsResponse2, la as ListOrgInvitationsResponses, dl as ListOrgMembersData, dn as ListOrgMembersError, lb as ListOrgMembersErrors, dm as ListOrgMembersResponse, lc as ListOrgMembersResponse2, ld as ListOrgMembersResponses, dp as ListPendingInvitationsData, dq as ListPendingInvitationsError, le as ListPendingInvitationsErrors, lf as ListPendingInvitationsResponse, lg as ListPendingInvitationsResponses, dr as ListPersonalAccessTokensData, dt as ListPersonalAccessTokensError, lh as ListPersonalAccessTokensErrors, ds as ListPersonalAccessTokensResponse, li as ListPersonalAccessTokensResponse2, lj as ListPersonalAccessTokensResponses, du as ListProjectAvailableSecretsData, dw as ListProjectAvailableSecretsError, lk as ListProjectAvailableSecretsErrors, ll as ListProjectAvailableSecretsResponse, lm as ListProjectAvailableSecretsResponses, dx as ListProjectAvailableSkillsData, dz as ListProjectAvailableSkillsError, ln as ListProjectAvailableSkillsErrors, lo as ListProjectAvailableSkillsResponse, lp as ListProjectAvailableSkillsResponses, dA as ListProjectMachineGrantsData, dC as ListProjectMachineGrantsError, lq as ListProjectMachineGrantsErrors, dB as ListProjectMachineGrantsResponse, lr as ListProjectMachineGrantsResponse2, ls as ListProjectMachineGrantsResponses, dD as ListProjectMachinePoolGrantsData, dF as ListProjectMachinePoolGrantsError, lt as ListProjectMachinePoolGrantsErrors, dE as ListProjectMachinePoolGrantsResponse, lu as ListProjectMachinePoolGrantsResponse2, lv as ListProjectMachinePoolGrantsResponses, d8 as ListProjectMembershipGrantsResponse, dG as ListProjectModelGrantsData, dI as ListProjectModelGrantsError, lw as ListProjectModelGrantsErrors, dH as ListProjectModelGrantsResponse, lx as ListProjectModelGrantsResponse2, ly as ListProjectModelGrantsResponses, dv as ListProjectSecretAccessesResponse, dy as ListProjectSkillAccessesResponse, eb as ListProjectsResponse, dJ as ListQueuedBacklogInputsData, dL as ListQueuedBacklogInputsError, lz as ListQueuedBacklogInputsErrors, lA as ListQueuedBacklogInputsResponse, lB as ListQueuedBacklogInputsResponses, dM as ListSecretGrantsData, dO as ListSecretGrantsError, lC as ListSecretGrantsErrors, dN as ListSecretGrantsResponse, lD as ListSecretGrantsResponse2, lE as ListSecretGrantsResponses, dP as ListSecretsData, dR as ListSecretsError, lF as ListSecretsErrors, dQ as ListSecretsResponse, lG as ListSecretsResponse2, lH as ListSecretsResponses, dS as ListSkillGrantsData, dU as ListSkillGrantsError, lI as ListSkillGrantsErrors, dT as ListSkillGrantsResponse, lJ as ListSkillGrantsResponse2, lK as ListSkillGrantsResponses, dV as ListSkillsData, dX as ListSkillsError, lL as ListSkillsErrors, dW as ListSkillsResponse, lM as ListSkillsResponse2, lN as ListSkillsResponses, dY as ListToolCallsData, d_ as ListToolCallsError, lO as ListToolCallsErrors, dZ as ListToolCallsResponse, lP as ListToolCallsResponse2, lQ as ListToolCallsResponses, d$ as ListTurnEventsData, e1 as ListTurnEventsError, lR as ListTurnEventsErrors, e0 as ListTurnEventsResponse, lS as ListTurnEventsResponse2, lT as ListTurnEventsResponses, e2 as ListTurnsData, e4 as ListTurnsError, lU as ListTurnsErrors, lV as ListTurnsResponse, lW as ListTurnsResponses, e5 as ListVisibleMachinesData, e7 as ListVisibleMachinesError, lX as ListVisibleMachinesErrors, e6 as ListVisibleMachinesResponse, lY as ListVisibleMachinesResponse2, lZ as ListVisibleMachinesResponses, e8 as ListVisibleProjectMachinesData, e9 as ListVisibleProjectMachinesError, l_ as ListVisibleProjectMachinesErrors, l$ as ListVisibleProjectMachinesResponse, m0 as ListVisibleProjectMachinesResponses, ea as ListVisibleProjectsData, ec as ListVisibleProjectsError, m1 as ListVisibleProjectsErrors, m2 as ListVisibleProjectsResponse, m3 as ListVisibleProjectsResponses, c3 as Machine, m4 as MachineAccess, m5 as MachineAccessSource, m6 as MachineAccessSourceKind, m7 as MachineConnectionState, m8 as MachineDaemonToken, m9 as MachineDaemonTokenId, ma as MachineFailureReport, mb as MachineId, mc as MachineLifecycleState, md as MachineMetadata, c6 as MachinePool, me as MachinePoolId, mf as MachinePoolSummary, mg as MachinePoolUsage, mh as MachineSourceKind, mi as MachineSourceKindFilter, mj as MachineSummary, mk as MachineSummaryFields, ml as ManagementKind, mm as McpRegistryHeader, mn as McpRegistryIcon, mo as McpRegistryRemote, mp as McpRegistryServer, mq as McpServerAuth, mr as McpServerAuthBearer, ms as McpServerAuthHint, mt as McpServerAuthNone, mu as McpServerAuthOAuth, mv as McpServerAuthRequiredError, mw as McpServerAuthSigV4, mx as McpServerInfo, my as McpServerTool, mz as McpServerToolAnnotations, mA as McpServerToolsRequest, mB as McpServerToolsResponse, mC as McpoAuthFlowId, mD as McpoAuthStartMetadata, mE as McpoAuthStartRequest, mF as McpoAuthStartResponse, mG as MediaRefContentBlock, mH as Metadata, mI as ModelApiFormat, mJ as ModelApiVariantOptions, mK as ModelCacheRetention, mL as ModelCallContextId, c9 as ModelCatalog, mM as ModelOutputBlockStartDelta, mN as ModelOutputBlockStopDelta, mO as ModelOutputContentBlock, mP as ModelOutputDelta, mQ as ModelOutputErrorDelta, mR as ModelOutputEvent, mS as ModelOutputMessageStopDelta, mT as ModelOutputStopReason, mU as ModelOutputStreamBlock, mV as ModelOutputStreamDelta, mW as ModelOutputTextDelta, mX as ModelOutputTextStreamBlock, mY as ModelOutputThinkingDelta, mZ as ModelOutputThinkingStreamBlock, m_ as ModelOutputToolArgumentsDelta, m$ as ModelOutputToolUseStreamBlock, n0 as ModelProviderApiVariant, n1 as ModelProviderApiVariantResponse, n2 as ModelProviderAuthKind, cc as ModelProviderConfig, n3 as ModelProviderConfigId, db as ModelProviderConfigList, n4 as ModelStopReason, n5 as ModelToolCallContentBlock, n6 as ModelUsage, ed as MoveQueuedBacklogInputData, ef as MoveQueuedBacklogInputError, n7 as MoveQueuedBacklogInputErrors, n8 as MoveQueuedBacklogInputRequest, ee as MoveQueuedBacklogInputResponse, n9 as MoveQueuedBacklogInputResponses, na as OAuthRefreshSecretMaterial, nb as OAuthTokenSetSecretMaterial, nc as OkResponse, cf as OrgApiKey, nd as OrgApiKeyId, ne as OrgApiKeyRole, nf as OrgInvitation, ng as OrgInvitationId, nh as OrgMember, ci as OrgOverviewResponse, ni as OrgSecretOwner, nj as OrgSecretOwnerInput, nk as OrgSkillOwner, nl as OrgSkillOwnerInput, nm as Organization, nn as OrganizationId, no as OrganizationMembership, np as PageCursor, nq as PageLimit, nr as PersonalAccessTokenId, ns as ProcessActionId, nt as ProcessActionReconciliationClaim, nu as ProcessActionReconciliationDirective, nv as ProcessId, nw as ProcessReconciliationClaim, nx as ProcessReconciliationDirective, ny as Project, nz as ProjectAccess, nA as ProjectFields, nB as ProjectId, nC as ProjectMachineGrant, nD as ProjectMachineGrantId, nE as ProjectMachineGrantListItem, nF as ProjectMachineGrantSourceKind, co as ProjectMachinePoolGrant, nG as ProjectMachinePoolGrantId, nH as ProjectMachinePoolGrantListItem, nI as ProjectMembershipGrant, nJ as ProjectModelGrant, nK as ProjectModelGrantEnvelope, nL as ProjectModelGrantId, nM as ProjectModelGrantListItem, cl as ProjectSecretAccess, nN as ProjectSecretOwner, nO as ProjectSecretOwnerInput, nP as ProjectSkillAccess, nQ as ProjectSkillOwner, nR as ProjectSkillOwnerInput, eg as PromoteQueuedInputToSteeringData, ei as PromoteQueuedInputToSteeringError, nS as PromoteQueuedInputToSteeringErrors, nT as PromoteQueuedInputToSteeringRequest, eh as PromoteQueuedInputToSteeringResponse, nU as PromoteQueuedInputToSteeringResponses, ej as PutActorData, el as PutActorError, nV as PutActorErrors, ek as PutActorResponse, nW as PutActorResponses, nX as ReasoningContentBlock, em as RecordMachineFailureData, eo as RecordMachineFailureError, nY as RecordMachineFailureErrors, en as RecordMachineFailureResponse, nZ as RecordMachineFailureResponses, n_ as RegisterDaemonRuntimeRequest, n$ as RegisterDaemonRuntimeResponse, ep as RegisterMachineDaemonRuntimeData, er as RegisterMachineDaemonRuntimeError, o0 as RegisterMachineDaemonRuntimeErrors, eq as RegisterMachineDaemonRuntimeResponse, o1 as RegisterMachineDaemonRuntimeResponses, es as RemoveMemberProjectAccessData, eu as RemoveMemberProjectAccessError, o2 as RemoveMemberProjectAccessErrors, et as RemoveMemberProjectAccessResponse, o3 as RemoveMemberProjectAccessResponses, ev as RemoveOrgApiKeyProjectRoleData, ex as RemoveOrgApiKeyProjectRoleError, o4 as RemoveOrgApiKeyProjectRoleErrors, ew as RemoveOrgApiKeyProjectRoleResponse, o5 as RemoveOrgApiKeyProjectRoleResponses, ey as RemoveOrgMemberData, eA as RemoveOrgMemberError, o6 as RemoveOrgMemberErrors, ez as RemoveOrgMemberResponse, o7 as RemoveOrgMemberResponses, eB as RenameAgentProfileData, eD as RenameAgentProfileError, o8 as RenameAgentProfileErrors, o9 as RenameAgentProfileRequest, eC as RenameAgentProfileResponse, oa as RenameAgentProfileResponses, eE as ResolveAgentInteractionData, eG as ResolveAgentInteractionError, ob as ResolveAgentInteractionErrors, oc as ResolveAgentInteractionRequest, eF as ResolveAgentInteractionResponse, od as ResolveAgentInteractionResponses, oe as ResourceListSort, of as ResourceName, og as ResourceNameFilter, eH as RevokeMachineDaemonTokenData, eJ as RevokeMachineDaemonTokenError, oh as RevokeMachineDaemonTokenErrors, eI as RevokeMachineDaemonTokenResponse, oi as RevokeMachineDaemonTokenResponses, eK as RevokeOrgApiKeyData, eM as RevokeOrgApiKeyError, oj as RevokeOrgApiKeyErrors, eL as RevokeOrgApiKeyResponse, ok as RevokeOrgApiKeyResponses, eN as RevokePersonalAccessTokenData, eP as RevokePersonalAccessTokenError, ol as RevokePersonalAccessTokenErrors, eO as RevokePersonalAccessTokenResponse, om as RevokePersonalAccessTokenResponses, cr as Secret, on as SecretAvailability, oo as SecretAvailabilitySourceFilter, op as SecretGrant, oq as SecretGrantCreateRequest, or as SecretGrantId, os as SecretGrantListItem, ot as SecretId, ou as SecretKind, ov as SecretKindFilter, ow as SecretMaterial, ox as SecretMcpoAuthFlowIdFilter, oy as SecretMetadataFilter, oz as SecretOwner, oA as SecretOwnerInput, oB as SecretOwnerKindFilter, oC as SecretOwnerProjectIdFilter, oD as SecretVersionRequest, oE as ServerErrorCode, eQ as SetMemberProjectAccessData, eS as SetMemberProjectAccessError, oF as SetMemberProjectAccessErrors, eR as SetMemberProjectAccessResponse, oG as SetMemberProjectAccessResponses, eT as SetOrgApiKeyProjectRoleData, eV as SetOrgApiKeyProjectRoleError, oH as SetOrgApiKeyProjectRoleErrors, eU as SetOrgApiKeyProjectRoleResponse, oI as SetOrgApiKeyProjectRoleResponses, oJ as SetProjectMembershipRequest, cu as Skill, oK as SkillAvailability, oL as SkillAvailabilitySourceFilter, oM as SkillFile, oN as SkillGrant, oO as SkillGrantCreateRequest, oP as SkillGrantId, oQ as SkillGrantListItem, oR as SkillId, oS as SkillName, oT as SkillOwner, oU as SkillOwnerInput, oV as SkillOwnerKindFilter, oW as SkillOwnerProjectIdFilter, oX as SkillRevisionId, oY as SlackSetup, oZ as SlackSetupIcon, eW as SleepMachineDaemonRuntimeData, eY as SleepMachineDaemonRuntimeError, o_ as SleepMachineDaemonRuntimeErrors, eX as SleepMachineDaemonRuntimeResponse, o$ as SleepMachineDaemonRuntimeResponses, eZ as SocketMachineDaemonRuntimeData, e_ as SocketMachineDaemonRuntimeError, p0 as SocketMachineDaemonRuntimeErrors, e$ as StartSecretMcpoAuthData, f1 as StartSecretMcpoAuthError, p1 as StartSecretMcpoAuthErrors, f0 as StartSecretMcpoAuthResponse, p2 as StartSecretMcpoAuthResponses, p3 as StreamEventsError, p4 as StreamEventsErrors, p5 as StreamEventsResponse, p6 as StreamEventsResponses, p7 as StructuredDataContentBlock, f2 as SubmitToolCallResultData, f4 as SubmitToolCallResultError, p8 as SubmitToolCallResultErrors, p9 as SubmitToolCallResultRequest, pa as SubmitToolCallResultResponse, f3 as SubmitToolCallResultResponse2, pb as SubmitToolCallResultResponses, pc as SubmitToolResultContentBlock, pd as TextContentBlock, pe as Timestamp, pf as ToolCall, pg as ToolCallId, ph as ToolCallOutcome, pi as ToolCallState, pj as ToolCallType, pk as ToolCallUpdate, cx as ToolCatalog, pl as ToolCatalogEntry, pm as ToolInput, pn as ToolPermissionMode, po as ToolPermissionProfile, pp as ToolPermissionSelection, pq as ToolResult, pr as ToolResultContentBlock, ps as ToolResultEvent, f5 as UpdateAgentConfigData, f7 as UpdateAgentConfigError, pt as UpdateAgentConfigErrors, pu as UpdateAgentConfigRequest, pv as UpdateAgentConfigResponse, f6 as UpdateAgentConfigResponse2, pw as UpdateAgentConfigResponses, f8 as UpdateAgentProfileData, fa as UpdateAgentProfileError, px as UpdateAgentProfileErrors, py as UpdateAgentProfileRequest, f9 as UpdateAgentProfileResponse, pz as UpdateAgentProfileResponses, fb as UpdateConfiguredModelData, fd as UpdateConfiguredModelError, pA as UpdateConfiguredModelErrors, pB as UpdateConfiguredModelRequest, fc as UpdateConfiguredModelResponse, pC as UpdateConfiguredModelResponses, fe as UpdateCronTriggerData, fg as UpdateCronTriggerError, pD as UpdateCronTriggerErrors, pE as UpdateCronTriggerRequest, ff as UpdateCronTriggerResponse, pF as UpdateCronTriggerResponses, fh as UpdateMachineData, fj as UpdateMachineError, pG as UpdateMachineErrors, fk as UpdateMachinePoolData, fm as UpdateMachinePoolError, pH as UpdateMachinePoolErrors, pI as UpdateMachinePoolRequest, fl as UpdateMachinePoolResponse, pJ as UpdateMachinePoolResponses, pK as UpdateMachineRequest, fi as UpdateMachineResponse, pL as UpdateMachineResponses, fn as UpdateModelProviderConfigData, fp as UpdateModelProviderConfigError, pM as UpdateModelProviderConfigErrors, pN as UpdateModelProviderConfigRequest, fo as UpdateModelProviderConfigResponse, pO as UpdateModelProviderConfigResponses, fq as UpdateOrgApiKeyData, fs as UpdateOrgApiKeyError, pP as UpdateOrgApiKeyErrors, pQ as UpdateOrgApiKeyRequest, fr as UpdateOrgApiKeyResponse, pR as UpdateOrgApiKeyResponses, ft as UpdateOrgMemberData, fv as UpdateOrgMemberError, pS as UpdateOrgMemberErrors, pT as UpdateOrgMemberRequest, fu as UpdateOrgMemberResponse, pU as UpdateOrgMemberResponses, fw as UpdateProjectMachinePoolGrantData, fy as UpdateProjectMachinePoolGrantError, pV as UpdateProjectMachinePoolGrantErrors, pW as UpdateProjectMachinePoolGrantRequest, fx as UpdateProjectMachinePoolGrantResponse, pX as UpdateProjectMachinePoolGrantResponses, fz as UpdateProjectModelGrantData, fB as UpdateProjectModelGrantError, pY as UpdateProjectModelGrantErrors, pZ as UpdateProjectModelGrantRequest, fA as UpdateProjectModelGrantResponse, p_ as UpdateProjectModelGrantResponses, fC as UpdateSecretData, fE as UpdateSecretError, p$ as UpdateSecretErrors, q0 as UpdateSecretRequest, fD as UpdateSecretResponse, q1 as UpdateSecretResponses, fF as UpdateSkillData, fH as UpdateSkillError, q2 as UpdateSkillErrors, q3 as UpdateSkillRequest, fG as UpdateSkillResponse, q4 as UpdateSkillResponses, q5 as UploadArtifactResponse, fI as UploadDaemonArtifactData, fK as UploadDaemonArtifactError, q6 as UploadDaemonArtifactErrors, fJ as UploadDaemonArtifactResponse, q7 as UploadDaemonArtifactResponses, q8 as UserId, q9 as UserSecretOwner, qa as UserSecretOwnerInput, qb as UserSkillOwner, qc as UserSkillOwnerInput, qd as VisibleMachine, qe as VisibleProject, qf as Warning, qg as sdk } from './sdk.gen-qOnMVktp.js';
|
|
5
|
+
export { z as schemas } from './zod.gen-ClvDjqAD.js';
|
|
6
|
+
import 'zod';
|
|
7
7
|
|
|
8
8
|
declare const createClient: (config?: Config) => Client;
|
|
9
9
|
|
|
@@ -41,13 +41,13 @@ interface AgentEventStream {
|
|
|
41
41
|
}
|
|
42
42
|
declare function openAgentEventStream({ client, path, query, headers, signal, }: OpenAgentEventStreamOptions): Promise<AgentEventStream>;
|
|
43
43
|
|
|
44
|
-
declare
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
type DeviceAuthFailureCode =
|
|
44
|
+
declare function cliLoginTokenName(hostName?: string): string;
|
|
45
|
+
declare function isCliLoginToken(token: PersonalAccessToken): boolean;
|
|
46
|
+
declare function cliLoginTokenHost(token: PersonalAccessToken): string;
|
|
47
|
+
|
|
48
|
+
declare const OMNARA_CLI_OAUTH_CLIENT_ID = "omnara-cli";
|
|
49
|
+
declare const OAUTH_DEVICE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|
|
50
|
+
type DeviceAuthFailureCode = 'access_denied' | 'expired_token';
|
|
51
51
|
declare class DeviceAuthError extends Error {
|
|
52
52
|
readonly code: DeviceAuthFailureCode;
|
|
53
53
|
constructor(code: DeviceAuthFailureCode);
|
|
@@ -59,16 +59,19 @@ interface DeviceAuthStart {
|
|
|
59
59
|
verificationUriComplete: string;
|
|
60
60
|
expiresInSeconds: number;
|
|
61
61
|
intervalSeconds: number;
|
|
62
|
+
tokenEndpoint: string;
|
|
63
|
+
clientId: string;
|
|
62
64
|
}
|
|
63
65
|
interface StartDeviceAuthOptions {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
tokenName
|
|
66
|
+
issuerUrl: string;
|
|
67
|
+
clientId: string;
|
|
68
|
+
tokenName?: string;
|
|
67
69
|
fetch?: typeof fetch;
|
|
68
70
|
}
|
|
69
71
|
declare function startDeviceAuth(options: StartDeviceAuthOptions): Promise<DeviceAuthStart>;
|
|
70
72
|
interface PollDeviceAuthTokenOptions {
|
|
71
|
-
|
|
73
|
+
tokenEndpoint: string;
|
|
74
|
+
clientId: string;
|
|
72
75
|
deviceCode: string;
|
|
73
76
|
intervalSeconds: number;
|
|
74
77
|
fetch?: typeof fetch;
|
|
@@ -81,8 +84,9 @@ declare class ApiError extends Error {
|
|
|
81
84
|
readonly status: number;
|
|
82
85
|
readonly code: ApiErrorCode | undefined;
|
|
83
86
|
readonly body: unknown;
|
|
87
|
+
readonly issues: AgentConfigErrorIssue[];
|
|
84
88
|
constructor(status: number, message: string, code?: ApiErrorCode, body?: unknown);
|
|
85
89
|
static fromResponse(response: Response): Promise<ApiError>;
|
|
86
90
|
}
|
|
87
91
|
|
|
88
|
-
export { AgentEventStreamData, AgentEventStreamError, type AgentEventStreamErrorKind, ApiError, type ApiErrorCode, AuthStrategy, DeviceAuthError, type DeviceAuthFailureCode, type DeviceAuthStart, Error$1 as Error, type OmnaraClient, type OmnaraClientOptions, type OpenAgentEventStreamOptions, type PollDeviceAuthTokenOptions, type StartDeviceAuthOptions, StreamEventsData, createOmnaraClient, openAgentEventStream, pollDeviceAuthToken, startDeviceAuth };
|
|
92
|
+
export { AgentConfigErrorIssue, AgentEventStreamData, AgentEventStreamError, type AgentEventStreamErrorKind, ApiError, type ApiErrorCode, AuthStrategy, DeviceAuthError, type DeviceAuthFailureCode, type DeviceAuthStart, Error$1 as Error, OAUTH_DEVICE_GRANT_TYPE, OMNARA_CLI_OAUTH_CLIENT_ID, type OmnaraClient, type OmnaraClientOptions, type OpenAgentEventStreamOptions, PersonalAccessToken, type PollDeviceAuthTokenOptions, type StartDeviceAuthOptions, StreamEventsData, cliLoginTokenHost, cliLoginTokenName, createOmnaraClient, isCliLoginToken, openAgentEventStream, pollDeviceAuthToken, startDeviceAuth };
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ApiError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-K5YXFYE4.js";
|
|
4
4
|
import {
|
|
5
|
+
client,
|
|
5
6
|
createClient,
|
|
6
7
|
createConfig,
|
|
7
8
|
isUnknownEnumError,
|
|
8
9
|
sdk_gen_exports,
|
|
9
10
|
streamEvents
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-T324MHWD.js";
|
|
11
12
|
import {
|
|
12
13
|
zStreamEventsResponse,
|
|
13
14
|
zod_gen_exports
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-PZ5AY32C.js";
|
|
15
|
+
} from "./chunk-WR57Q743.js";
|
|
16
16
|
|
|
17
17
|
// src/agent-event-stream.ts
|
|
18
18
|
var AgentEventStreamError = class extends Error {
|
|
@@ -86,7 +86,7 @@ async function* validatedFrames(source, sourceError, signal) {
|
|
|
86
86
|
if (error != null) throw error;
|
|
87
87
|
}
|
|
88
88
|
async function openAgentEventStream({
|
|
89
|
-
client,
|
|
89
|
+
client: client2,
|
|
90
90
|
path,
|
|
91
91
|
query,
|
|
92
92
|
headers,
|
|
@@ -95,7 +95,7 @@ async function openAgentEventStream({
|
|
|
95
95
|
let connectionError;
|
|
96
96
|
try {
|
|
97
97
|
const result = await streamEvents({
|
|
98
|
-
client,
|
|
98
|
+
client: client2,
|
|
99
99
|
path,
|
|
100
100
|
query,
|
|
101
101
|
headers,
|
|
@@ -125,8 +125,25 @@ function bearerToken(token) {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
// src/cli-login-token.ts
|
|
129
|
+
var cliLoginTokenPrefix = "Omnara CLI";
|
|
130
|
+
var cliLoginTokenHostSeparator = " on ";
|
|
131
|
+
function cliLoginTokenName(hostName) {
|
|
132
|
+
if (hostName === void 0) return cliLoginTokenPrefix;
|
|
133
|
+
return `${cliLoginTokenPrefix}${cliLoginTokenHostSeparator}${hostName}`;
|
|
134
|
+
}
|
|
135
|
+
function isCliLoginToken(token) {
|
|
136
|
+
return token.revoked_at == null && token.name.startsWith(cliLoginTokenPrefix);
|
|
137
|
+
}
|
|
138
|
+
function cliLoginTokenHost(token) {
|
|
139
|
+
const rest = token.name.slice(cliLoginTokenPrefix.length);
|
|
140
|
+
if (!rest.startsWith(cliLoginTokenHostSeparator)) return token.name;
|
|
141
|
+
const host = rest.slice(cliLoginTokenHostSeparator.length).trim();
|
|
142
|
+
return host === "" ? token.name : host;
|
|
143
|
+
}
|
|
144
|
+
|
|
128
145
|
// src/client.ts
|
|
129
|
-
function stripClientSelector(
|
|
146
|
+
function stripClientSelector(client2) {
|
|
130
147
|
const strip = (dispatch) => (options) => {
|
|
131
148
|
if (options == null || !("client" in options)) return dispatch(options);
|
|
132
149
|
const rest = { ...options };
|
|
@@ -149,37 +166,46 @@ function stripClientSelector(client) {
|
|
|
149
166
|
const dispatches = target;
|
|
150
167
|
for (const method of methods) dispatches[method] &&= strip(dispatches[method]);
|
|
151
168
|
};
|
|
152
|
-
wrap(
|
|
153
|
-
wrap(
|
|
169
|
+
wrap(client2);
|
|
170
|
+
wrap(client2.sse);
|
|
154
171
|
}
|
|
155
172
|
function createOmnaraClient(options = {}) {
|
|
156
|
-
const
|
|
173
|
+
const client2 = createClient(
|
|
157
174
|
createConfig({
|
|
158
175
|
throwOnError: true
|
|
159
176
|
})
|
|
160
177
|
);
|
|
161
|
-
|
|
162
|
-
baseUrl: options.baseUrl ??
|
|
178
|
+
client2.setConfig({
|
|
179
|
+
baseUrl: options.baseUrl ?? client.getConfig().baseUrl,
|
|
163
180
|
credentials: options.credentials,
|
|
164
181
|
headers: options.headers
|
|
165
182
|
});
|
|
166
183
|
const { auth } = options;
|
|
167
184
|
if (auth) {
|
|
168
|
-
|
|
185
|
+
client2.interceptors.request.use(async (request) => {
|
|
169
186
|
await auth.authenticate(request);
|
|
170
187
|
return request;
|
|
171
188
|
});
|
|
172
189
|
}
|
|
173
|
-
|
|
190
|
+
client2.interceptors.response.use(async (response) => {
|
|
174
191
|
if (!response.ok) throw await ApiError.fromResponse(response);
|
|
175
192
|
return response;
|
|
176
193
|
});
|
|
177
|
-
stripClientSelector(
|
|
178
|
-
return
|
|
194
|
+
stripClientSelector(client2);
|
|
195
|
+
return client2;
|
|
179
196
|
}
|
|
180
197
|
|
|
181
198
|
// src/device.ts
|
|
182
199
|
import * as z from "zod";
|
|
200
|
+
var OMNARA_CLI_OAUTH_CLIENT_ID = "omnara-cli";
|
|
201
|
+
var OAUTH_DEVICE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|
|
202
|
+
var zAuthorizationServerMetadata = z.object({
|
|
203
|
+
issuer: z.url(),
|
|
204
|
+
device_authorization_endpoint: z.url(),
|
|
205
|
+
token_endpoint: z.url(),
|
|
206
|
+
grant_types_supported: z.array(z.string()),
|
|
207
|
+
token_endpoint_auth_methods_supported: z.array(z.string())
|
|
208
|
+
});
|
|
183
209
|
var zDeviceAuthStartResponse = z.object({
|
|
184
210
|
device_code: z.string().min(1),
|
|
185
211
|
user_code: z.string().min(1),
|
|
@@ -188,11 +214,9 @@ var zDeviceAuthStartResponse = z.object({
|
|
|
188
214
|
expires_in: z.number().int().positive(),
|
|
189
215
|
interval: z.number().int().positive()
|
|
190
216
|
});
|
|
191
|
-
var
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
var zDeviceAuthFailureResponse = z.object({
|
|
195
|
-
error: z.enum(["access_denied", "expired_token"])
|
|
217
|
+
var zDeviceAuthErrorResponse = z.object({
|
|
218
|
+
error: z.string().min(1),
|
|
219
|
+
error_description: z.string().optional()
|
|
196
220
|
});
|
|
197
221
|
var zDeviceAuthApprovedResponse = z.object({
|
|
198
222
|
access_token: z.string().min(1),
|
|
@@ -210,29 +234,55 @@ var DeviceAuthError = class extends Error {
|
|
|
210
234
|
this.code = code;
|
|
211
235
|
}
|
|
212
236
|
};
|
|
213
|
-
async function
|
|
214
|
-
return fetchImpl(
|
|
237
|
+
async function postOAuthForm(fetchImpl, endpoint, body) {
|
|
238
|
+
return fetchImpl(endpoint, {
|
|
215
239
|
method: "POST",
|
|
216
|
-
headers: {
|
|
217
|
-
|
|
240
|
+
headers: {
|
|
241
|
+
Accept: "application/json",
|
|
242
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
243
|
+
},
|
|
244
|
+
body: new URLSearchParams(body).toString()
|
|
218
245
|
});
|
|
219
246
|
}
|
|
247
|
+
function normalizeIssuer(raw) {
|
|
248
|
+
const issuer = new URL(raw);
|
|
249
|
+
if (issuer.username !== "" || issuer.password !== "" || issuer.pathname !== "/" || issuer.search !== "" || issuer.hash !== "") {
|
|
250
|
+
throw new Error("authorization server issuer must be an origin");
|
|
251
|
+
}
|
|
252
|
+
return issuer.origin;
|
|
253
|
+
}
|
|
220
254
|
async function startDeviceAuth(options) {
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
);
|
|
255
|
+
const fetchImpl = options.fetch ?? fetch;
|
|
256
|
+
const expectedIssuer = normalizeIssuer(options.issuerUrl);
|
|
257
|
+
const metadataUrl = new URL("/.well-known/oauth-authorization-server", `${expectedIssuer}/`);
|
|
258
|
+
const metadataResponse = await fetchImpl(metadataUrl, { headers: { Accept: "application/json" } });
|
|
259
|
+
if (!metadataResponse.ok) throw await ApiError.fromResponse(metadataResponse);
|
|
260
|
+
const metadata = zAuthorizationServerMetadata.parse(await metadataResponse.json());
|
|
261
|
+
if (normalizeIssuer(metadata.issuer) !== expectedIssuer) {
|
|
262
|
+
throw new Error(
|
|
263
|
+
`authorization server issuer mismatch: expected ${expectedIssuer}, received ${metadata.issuer}`
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
if (!metadata.grant_types_supported.includes(OAUTH_DEVICE_GRANT_TYPE)) {
|
|
267
|
+
throw new Error("authorization server does not support the OAuth device grant");
|
|
268
|
+
}
|
|
269
|
+
if (!metadata.token_endpoint_auth_methods_supported.includes("none")) {
|
|
270
|
+
throw new Error("authorization server does not support public OAuth clients");
|
|
271
|
+
}
|
|
272
|
+
const body = { client_id: options.clientId };
|
|
273
|
+
if (options.tokenName !== void 0) body.token_name = options.tokenName;
|
|
274
|
+
const response = await postOAuthForm(fetchImpl, metadata.device_authorization_endpoint, body);
|
|
227
275
|
if (!response.ok) throw await ApiError.fromResponse(response);
|
|
228
276
|
const data = zDeviceAuthStartResponse.parse(await response.json());
|
|
229
277
|
return {
|
|
230
278
|
deviceCode: data.device_code,
|
|
231
279
|
userCode: data.user_code,
|
|
232
|
-
verificationUri: new URL(data.verification_uri,
|
|
233
|
-
verificationUriComplete: new URL(data.verification_uri_complete,
|
|
280
|
+
verificationUri: new URL(data.verification_uri, metadata.issuer).toString(),
|
|
281
|
+
verificationUriComplete: new URL(data.verification_uri_complete, metadata.issuer).toString(),
|
|
234
282
|
expiresInSeconds: data.expires_in,
|
|
235
|
-
intervalSeconds: data.interval
|
|
283
|
+
intervalSeconds: data.interval,
|
|
284
|
+
tokenEndpoint: metadata.token_endpoint,
|
|
285
|
+
clientId: options.clientId
|
|
236
286
|
};
|
|
237
287
|
}
|
|
238
288
|
function defaultSleep(seconds) {
|
|
@@ -244,26 +294,28 @@ async function pollDeviceAuthToken(options) {
|
|
|
244
294
|
let interval = options.intervalSeconds;
|
|
245
295
|
while (true) {
|
|
246
296
|
await sleep(interval);
|
|
247
|
-
const response = await
|
|
248
|
-
|
|
249
|
-
options.
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
device_code: options.deviceCode
|
|
253
|
-
}
|
|
254
|
-
);
|
|
297
|
+
const response = await postOAuthForm(fetchImpl, options.tokenEndpoint, {
|
|
298
|
+
grant_type: OAUTH_DEVICE_GRANT_TYPE,
|
|
299
|
+
device_code: options.deviceCode,
|
|
300
|
+
client_id: options.clientId
|
|
301
|
+
});
|
|
255
302
|
if (response.status === 200) {
|
|
256
303
|
return zDeviceAuthApprovedResponse.parse(await response.json()).access_token;
|
|
257
304
|
}
|
|
258
|
-
if (response.status === 202) {
|
|
259
|
-
interval = zDeviceAuthWaitingResponse.parse(await response.json()).interval;
|
|
260
|
-
continue;
|
|
261
|
-
}
|
|
262
305
|
if (response.status === 400) {
|
|
263
|
-
const failure =
|
|
306
|
+
const failure = zDeviceAuthErrorResponse.safeParse(
|
|
264
307
|
await response.clone().json().catch(() => void 0)
|
|
265
308
|
);
|
|
266
|
-
if (failure.success)
|
|
309
|
+
if (failure.success) {
|
|
310
|
+
if (failure.data.error === "authorization_pending") continue;
|
|
311
|
+
if (failure.data.error === "slow_down") {
|
|
312
|
+
interval += 5;
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
if (failure.data.error === "access_denied" || failure.data.error === "expired_token") {
|
|
316
|
+
throw new DeviceAuthError(failure.data.error);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
267
319
|
}
|
|
268
320
|
throw await ApiError.fromResponse(response);
|
|
269
321
|
}
|
|
@@ -272,8 +324,13 @@ export {
|
|
|
272
324
|
AgentEventStreamError,
|
|
273
325
|
ApiError,
|
|
274
326
|
DeviceAuthError,
|
|
327
|
+
OAUTH_DEVICE_GRANT_TYPE,
|
|
328
|
+
OMNARA_CLI_OAUTH_CLIENT_ID,
|
|
275
329
|
bearerToken,
|
|
330
|
+
cliLoginTokenHost,
|
|
331
|
+
cliLoginTokenName,
|
|
276
332
|
createOmnaraClient,
|
|
333
|
+
isCliLoginToken,
|
|
277
334
|
openAgentEventStream,
|
|
278
335
|
pollDeviceAuthToken,
|
|
279
336
|
zod_gen_exports as schemas,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/agent-event-stream.ts","../src/auth.ts","../src/client.ts","../src/device.ts"],"sourcesContent":["import type { OmnaraClient } from './client'\nimport { streamEvents } from './generated/sdk.gen'\nimport type { AgentEventStreamData, StreamEventsData } from './generated/types.gen'\nimport { zStreamEventsResponse } from './generated/zod.gen'\nimport { isUnknownEnumError } from './validate-response'\n\nexport type AgentEventStreamErrorKind = 'aborted' | 'contract' | 'http' | 'transport'\n\nexport class AgentEventStreamError extends Error {\n readonly kind: AgentEventStreamErrorKind\n readonly retryable: boolean\n readonly status: number | undefined\n\n constructor({\n kind,\n message,\n retryable,\n status,\n cause,\n }: {\n kind: AgentEventStreamErrorKind\n message: string\n retryable: boolean\n status?: number\n cause?: unknown\n }) {\n super(message, { cause })\n this.name = 'AgentEventStreamError'\n this.kind = kind\n this.retryable = retryable\n this.status = status\n }\n}\n\nexport interface OpenAgentEventStreamOptions {\n client: OmnaraClient\n path: StreamEventsData['path']\n query?: StreamEventsData['query']\n headers?: StreamEventsData['headers']\n signal?: AbortSignal\n}\n\nexport interface AgentEventStream {\n stream: AsyncGenerator<AgentEventStreamData>\n}\n\nconst generatedHTTPError = /^SSE failed: (\\d{3})(?:\\s|$)/\n\nfunction classifyStreamError(error: unknown, signal?: AbortSignal): AgentEventStreamError {\n if (error instanceof AgentEventStreamError) return error\n if (signal?.aborted === true || (error instanceof Error && error.name === 'AbortError')) {\n return new AgentEventStreamError({\n kind: 'aborted',\n message: 'Agent event stream canceled',\n retryable: false,\n cause: error,\n })\n }\n const match = error instanceof Error ? generatedHTTPError.exec(error.message) : null\n const status = match?.[1] == null ? undefined : Number.parseInt(match[1], 10)\n if (status != null) {\n return new AgentEventStreamError({\n kind: 'http',\n message: `Agent event stream request failed with HTTP ${status}`,\n retryable: status === 408 || status === 429 || status >= 500,\n status,\n cause: error,\n })\n }\n return new AgentEventStreamError({\n kind: 'transport',\n message: 'Agent event stream disconnected',\n retryable: true,\n cause: error,\n })\n}\n\nasync function* validatedFrames(\n source: AsyncIterable<unknown>,\n sourceError: () => AgentEventStreamError | undefined,\n signal?: AbortSignal,\n): AsyncGenerator<AgentEventStreamData> {\n try {\n for await (const data of source) {\n const parsed = await zStreamEventsResponse.safeParseAsync(data)\n if (parsed.success) {\n yield parsed.data\n } else if (isUnknownEnumError(parsed.error, data)) {\n yield data as AgentEventStreamData\n } else {\n throw new AgentEventStreamError({\n kind: 'contract',\n message: 'Agent event stream received data that does not match the API contract',\n retryable: false,\n cause: parsed.error,\n })\n }\n }\n } catch (error) {\n throw classifyStreamError(error, signal)\n }\n const error = sourceError()\n if (error != null) throw error\n}\n\nexport async function openAgentEventStream({\n client,\n path,\n query,\n headers,\n signal,\n}: OpenAgentEventStreamOptions): Promise<AgentEventStream> {\n let connectionError: AgentEventStreamError | undefined\n try {\n const result = await streamEvents({\n client,\n path,\n query,\n headers,\n signal,\n responseValidator: undefined,\n sseMaxRetryAttempts: 1,\n onSseError: (error) => {\n connectionError = classifyStreamError(error, signal)\n },\n })\n return {\n stream: validatedFrames(result.stream, () => connectionError, signal),\n }\n } catch (error) {\n throw classifyStreamError(error, signal)\n }\n}\n","export interface AuthStrategy {\n authenticate(request: Request): void | Promise<void>\n}\n\nexport function bearerToken(token: string | (() => string | Promise<string>)): AuthStrategy {\n const resolve = typeof token === 'function' ? token : () => token\n return {\n async authenticate(request) {\n const value = await resolve()\n if (value) request.headers.set('Authorization', `Bearer ${value}`)\n },\n }\n}\n","import type { AuthStrategy } from './auth'\nimport { ApiError } from './errors'\nimport { createClient, createConfig } from './generated/client'\n\nexport type OmnaraClient = ReturnType<typeof createClient>\n\nexport interface OmnaraClientOptions {\n baseUrl?: string\n credentials?: RequestCredentials\n auth?: AuthStrategy\n headers?: Record<string, string>\n}\n\ntype Dispatch = (options?: Record<string, unknown>) => unknown\n\n// The generated client leaks per-call options — including the `client`\n// selector — into the Request init, which throws on Deno and Bun (they\n// reserve the `client` init key). Drop the key before dispatch.\n// TODO: remove once hey-api/hey-api#4177 is fixed and regenerated.\nfunction stripClientSelector(client: OmnaraClient): void {\n const strip =\n (dispatch: Dispatch): Dispatch =>\n (options) => {\n if (options == null || !('client' in options)) return dispatch(options)\n const rest = { ...options }\n delete rest.client\n return dispatch(rest)\n }\n const methods = [\n 'connect',\n 'delete',\n 'get',\n 'head',\n 'options',\n 'patch',\n 'post',\n 'put',\n 'request',\n 'trace',\n ] as const\n const wrap = (target: object) => {\n const dispatches = target as Partial<Record<(typeof methods)[number], Dispatch>>\n for (const method of methods) dispatches[method] &&= strip(dispatches[method])\n }\n wrap(client)\n wrap(client.sse)\n}\n\nexport function createOmnaraClient(options: OmnaraClientOptions = {}): OmnaraClient {\n const client = createClient(\n createConfig({\n throwOnError: true,\n }),\n )\n client.setConfig({\n baseUrl: options.baseUrl ?? '',\n credentials: options.credentials,\n headers: options.headers,\n })\n const { auth } = options\n if (auth) {\n client.interceptors.request.use(async (request) => {\n await auth.authenticate(request)\n return request\n })\n }\n client.interceptors.response.use(async (response) => {\n if (!response.ok) throw await ApiError.fromResponse(response)\n return response\n })\n stripClientSelector(client)\n return client\n}\n","import * as z from 'zod'\n\nimport { ApiError } from './errors'\n\nconst zDeviceAuthStartResponse = z.object({\n device_code: z.string().min(1),\n user_code: z.string().min(1),\n verification_uri: z.string().min(1),\n verification_uri_complete: z.string().min(1),\n expires_in: z.number().int().positive(),\n interval: z.number().int().positive(),\n})\n\nconst zDeviceAuthWaitingResponse = z.object({\n interval: z.number().int().positive(),\n})\n\nconst zDeviceAuthFailureResponse = z.object({\n error: z.enum(['access_denied', 'expired_token']),\n})\n\nconst zDeviceAuthApprovedResponse = z.object({\n access_token: z.string().min(1),\n token_type: z.string(),\n})\n\nexport type DeviceAuthFailureCode = z.infer<typeof zDeviceAuthFailureResponse>['error']\n\nconst DEVICE_AUTH_FAILURE_MESSAGES: Record<DeviceAuthFailureCode, string> = {\n access_denied: 'the login request was denied',\n expired_token: 'the login request expired before it was approved',\n}\n\nexport class DeviceAuthError extends Error {\n readonly code: DeviceAuthFailureCode\n\n constructor(code: DeviceAuthFailureCode) {\n super(DEVICE_AUTH_FAILURE_MESSAGES[code])\n this.name = 'DeviceAuthError'\n this.code = code\n }\n}\n\nexport interface DeviceAuthStart {\n deviceCode: string\n userCode: string\n verificationUri: string\n verificationUriComplete: string\n expiresInSeconds: number\n intervalSeconds: number\n}\n\nasync function postDeviceAuthJSON(\n fetchImpl: typeof fetch,\n baseUrl: string,\n path: string,\n body: unknown,\n): Promise<Response> {\n return fetchImpl(`${baseUrl.replace(/\\/+$/, '')}${path}`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body),\n })\n}\n\nexport interface StartDeviceAuthOptions {\n baseUrl: string\n clientName: string\n tokenName: string\n fetch?: typeof fetch\n}\n\nexport async function startDeviceAuth(options: StartDeviceAuthOptions): Promise<DeviceAuthStart> {\n const response = await postDeviceAuthJSON(\n options.fetch ?? fetch,\n options.baseUrl,\n '/api/auth/device/code',\n { client_name: options.clientName, token_name: options.tokenName },\n )\n if (!response.ok) throw await ApiError.fromResponse(response)\n const data = zDeviceAuthStartResponse.parse(await response.json())\n return {\n deviceCode: data.device_code,\n userCode: data.user_code,\n verificationUri: new URL(data.verification_uri, options.baseUrl).toString(),\n verificationUriComplete: new URL(data.verification_uri_complete, options.baseUrl).toString(),\n expiresInSeconds: data.expires_in,\n intervalSeconds: data.interval,\n }\n}\n\nfunction defaultSleep(seconds: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1000))\n}\n\nexport interface PollDeviceAuthTokenOptions {\n baseUrl: string\n deviceCode: string\n intervalSeconds: number\n fetch?: typeof fetch\n sleep?: (seconds: number) => Promise<void>\n}\n\nexport async function pollDeviceAuthToken(options: PollDeviceAuthTokenOptions): Promise<string> {\n const fetchImpl = options.fetch ?? fetch\n const sleep = options.sleep ?? defaultSleep\n let interval = options.intervalSeconds\n while (true) {\n await sleep(interval)\n const response = await postDeviceAuthJSON(\n fetchImpl,\n options.baseUrl,\n '/api/auth/device/token',\n {\n device_code: options.deviceCode,\n },\n )\n if (response.status === 200) {\n return zDeviceAuthApprovedResponse.parse(await response.json()).access_token\n }\n if (response.status === 202) {\n interval = zDeviceAuthWaitingResponse.parse(await response.json()).interval\n continue\n }\n if (response.status === 400) {\n const failure = zDeviceAuthFailureResponse.safeParse(\n await response\n .clone()\n .json()\n .catch((): unknown => undefined),\n )\n if (failure.success) throw new DeviceAuthError(failure.data.error)\n }\n throw await ApiError.fromResponse(response)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAQO,IAAM,wBAAN,cAAoC,MAAM;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,GAMG;AACD,UAAM,SAAS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AI,CAAC;AACrE;AAUA,eAAsB,oBAAoB,SAAsD;AAC9F,QAAM,YAAY,QAAQ,SAAS;AACnC,QAAM,QAAQ,QAAQ,SAAS;AAC/B,MAAI,WAAW,QAAQ;AACvB,SAAO,MAAM;AACX,UAAM,MAAM,QAAQ;AACpB,UAAM,WAAW,MAAM;AAAA,MACrB;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,QACE,aAAa,QAAQ;AAAA,MACvB;AAAA,IACF;AACA,QAAI,SAAS,WAAW,KAAK;AAC3B,aAAO,4BAA4B,MAAM,MAAM,SAAS,KAAK,CAAC,EAAE;AAAA,IAClE;AACA,QAAI,SAAS,WAAW,KAAK;AAC3B,iBAAW,2BAA2B,MAAM,MAAM,SAAS,KAAK,CAAC,EAAE;AACnE;AAAA,IACF;AACA,QAAI,SAAS,WAAW,KAAK;AAC3B,YAAM,UAAU,2BAA2B;AAAA,QACzC,MAAM,SACH,MAAM,EACN,KAAK,EACL,MAAM,MAAe,MAAS;AAAA,MACnC;AACA,UAAI,QAAQ,QAAS,OAAM,IAAI,gBAAgB,QAAQ,KAAK,KAAK;AAAA,IACnE;AACA,UAAM,MAAM,SAAS,aAAa,QAAQ;AAAA,EAC5C;AACF;","names":["error"]}
|
|
1
|
+
{"version":3,"sources":["../src/agent-event-stream.ts","../src/auth.ts","../src/cli-login-token.ts","../src/client.ts","../src/device.ts"],"sourcesContent":["import type { OmnaraClient } from './client'\nimport { streamEvents } from './generated/sdk.gen'\nimport type { AgentEventStreamData, StreamEventsData } from './generated/types.gen'\nimport { zStreamEventsResponse } from './generated/zod.gen'\nimport { isUnknownEnumError } from './validate-response'\n\nexport type AgentEventStreamErrorKind = 'aborted' | 'contract' | 'http' | 'transport'\n\nexport class AgentEventStreamError extends Error {\n readonly kind: AgentEventStreamErrorKind\n readonly retryable: boolean\n readonly status: number | undefined\n\n constructor({\n kind,\n message,\n retryable,\n status,\n cause,\n }: {\n kind: AgentEventStreamErrorKind\n message: string\n retryable: boolean\n status?: number\n cause?: unknown\n }) {\n super(message, { cause })\n this.name = 'AgentEventStreamError'\n this.kind = kind\n this.retryable = retryable\n this.status = status\n }\n}\n\nexport interface OpenAgentEventStreamOptions {\n client: OmnaraClient\n path: StreamEventsData['path']\n query?: StreamEventsData['query']\n headers?: StreamEventsData['headers']\n signal?: AbortSignal\n}\n\nexport interface AgentEventStream {\n stream: AsyncGenerator<AgentEventStreamData>\n}\n\nconst generatedHTTPError = /^SSE failed: (\\d{3})(?:\\s|$)/\n\nfunction classifyStreamError(error: unknown, signal?: AbortSignal): AgentEventStreamError {\n if (error instanceof AgentEventStreamError) return error\n if (signal?.aborted === true || (error instanceof Error && error.name === 'AbortError')) {\n return new AgentEventStreamError({\n kind: 'aborted',\n message: 'Agent event stream canceled',\n retryable: false,\n cause: error,\n })\n }\n const match = error instanceof Error ? generatedHTTPError.exec(error.message) : null\n const status = match?.[1] == null ? undefined : Number.parseInt(match[1], 10)\n if (status != null) {\n return new AgentEventStreamError({\n kind: 'http',\n message: `Agent event stream request failed with HTTP ${status}`,\n retryable: status === 408 || status === 429 || status >= 500,\n status,\n cause: error,\n })\n }\n return new AgentEventStreamError({\n kind: 'transport',\n message: 'Agent event stream disconnected',\n retryable: true,\n cause: error,\n })\n}\n\nasync function* validatedFrames(\n source: AsyncIterable<unknown>,\n sourceError: () => AgentEventStreamError | undefined,\n signal?: AbortSignal,\n): AsyncGenerator<AgentEventStreamData> {\n try {\n for await (const data of source) {\n const parsed = await zStreamEventsResponse.safeParseAsync(data)\n if (parsed.success) {\n yield parsed.data\n } else if (isUnknownEnumError(parsed.error, data)) {\n yield data as AgentEventStreamData\n } else {\n throw new AgentEventStreamError({\n kind: 'contract',\n message: 'Agent event stream received data that does not match the API contract',\n retryable: false,\n cause: parsed.error,\n })\n }\n }\n } catch (error) {\n throw classifyStreamError(error, signal)\n }\n const error = sourceError()\n if (error != null) throw error\n}\n\nexport async function openAgentEventStream({\n client,\n path,\n query,\n headers,\n signal,\n}: OpenAgentEventStreamOptions): Promise<AgentEventStream> {\n let connectionError: AgentEventStreamError | undefined\n try {\n const result = await streamEvents({\n client,\n path,\n query,\n headers,\n signal,\n responseValidator: undefined,\n sseMaxRetryAttempts: 1,\n onSseError: (error) => {\n connectionError = classifyStreamError(error, signal)\n },\n })\n return {\n stream: validatedFrames(result.stream, () => connectionError, signal),\n }\n } catch (error) {\n throw classifyStreamError(error, signal)\n }\n}\n","export interface AuthStrategy {\n authenticate(request: Request): void | Promise<void>\n}\n\nexport function bearerToken(token: string | (() => string | Promise<string>)): AuthStrategy {\n const resolve = typeof token === 'function' ? token : () => token\n return {\n async authenticate(request) {\n const value = await resolve()\n if (value) request.headers.set('Authorization', `Bearer ${value}`)\n },\n }\n}\n","import type { PersonalAccessToken } from './generated/types.gen'\n\nconst cliLoginTokenPrefix = 'Omnara CLI'\nconst cliLoginTokenHostSeparator = ' on '\n\nexport function cliLoginTokenName(hostName?: string): string {\n if (hostName === undefined) return cliLoginTokenPrefix\n return `${cliLoginTokenPrefix}${cliLoginTokenHostSeparator}${hostName}`\n}\n\nexport function isCliLoginToken(token: PersonalAccessToken): boolean {\n return token.revoked_at == null && token.name.startsWith(cliLoginTokenPrefix)\n}\n\nexport function cliLoginTokenHost(token: PersonalAccessToken): string {\n const rest = token.name.slice(cliLoginTokenPrefix.length)\n if (!rest.startsWith(cliLoginTokenHostSeparator)) return token.name\n const host = rest.slice(cliLoginTokenHostSeparator.length).trim()\n return host === '' ? token.name : host\n}\n","import type { AuthStrategy } from './auth'\nimport { ApiError } from './errors'\nimport { createClient, createConfig } from './generated/client'\nimport { client as specDefaultClient } from './generated/client.gen'\n\nexport type OmnaraClient = ReturnType<typeof createClient>\n\nexport interface OmnaraClientOptions {\n baseUrl?: string\n credentials?: RequestCredentials\n auth?: AuthStrategy\n headers?: Record<string, string>\n}\n\ntype Dispatch = (options?: Record<string, unknown>) => unknown\n\n// The generated client leaks per-call options — including the `client`\n// selector — into the Request init, which throws on Deno and Bun (they\n// reserve the `client` init key). Drop the key before dispatch.\n// TODO: remove once hey-api/hey-api#4177 is fixed and regenerated.\nfunction stripClientSelector(client: OmnaraClient): void {\n const strip =\n (dispatch: Dispatch): Dispatch =>\n (options) => {\n if (options == null || !('client' in options)) return dispatch(options)\n const rest = { ...options }\n delete rest.client\n return dispatch(rest)\n }\n const methods = [\n 'connect',\n 'delete',\n 'get',\n 'head',\n 'options',\n 'patch',\n 'post',\n 'put',\n 'request',\n 'trace',\n ] as const\n const wrap = (target: object) => {\n const dispatches = target as Partial<Record<(typeof methods)[number], Dispatch>>\n for (const method of methods) dispatches[method] &&= strip(dispatches[method])\n }\n wrap(client)\n wrap(client.sse)\n}\n\nexport function createOmnaraClient(options: OmnaraClientOptions = {}): OmnaraClient {\n const client = createClient(\n createConfig({\n throwOnError: true,\n }),\n )\n client.setConfig({\n baseUrl: options.baseUrl ?? specDefaultClient.getConfig().baseUrl,\n credentials: options.credentials,\n headers: options.headers,\n })\n const { auth } = options\n if (auth) {\n client.interceptors.request.use(async (request) => {\n await auth.authenticate(request)\n return request\n })\n }\n client.interceptors.response.use(async (response) => {\n if (!response.ok) throw await ApiError.fromResponse(response)\n return response\n })\n stripClientSelector(client)\n return client\n}\n","import * as z from 'zod'\n\nimport { ApiError } from './errors'\n\nexport const OMNARA_CLI_OAUTH_CLIENT_ID = 'omnara-cli'\nexport const OAUTH_DEVICE_GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:device_code'\n\nconst zAuthorizationServerMetadata = z.object({\n issuer: z.url(),\n device_authorization_endpoint: z.url(),\n token_endpoint: z.url(),\n grant_types_supported: z.array(z.string()),\n token_endpoint_auth_methods_supported: z.array(z.string()),\n})\n\nconst zDeviceAuthStartResponse = z.object({\n device_code: z.string().min(1),\n user_code: z.string().min(1),\n verification_uri: z.string().min(1),\n verification_uri_complete: z.string().min(1),\n expires_in: z.number().int().positive(),\n interval: z.number().int().positive(),\n})\n\nconst zDeviceAuthErrorResponse = z.object({\n error: z.string().min(1),\n error_description: z.string().optional(),\n})\n\nconst zDeviceAuthApprovedResponse = z.object({\n access_token: z.string().min(1),\n token_type: z.string(),\n})\n\nexport type DeviceAuthFailureCode = 'access_denied' | 'expired_token'\n\nconst DEVICE_AUTH_FAILURE_MESSAGES: Record<DeviceAuthFailureCode, string> = {\n access_denied: 'the login request was denied',\n expired_token: 'the login request expired before it was approved',\n}\n\nexport class DeviceAuthError extends Error {\n readonly code: DeviceAuthFailureCode\n\n constructor(code: DeviceAuthFailureCode) {\n super(DEVICE_AUTH_FAILURE_MESSAGES[code])\n this.name = 'DeviceAuthError'\n this.code = code\n }\n}\n\nexport interface DeviceAuthStart {\n deviceCode: string\n userCode: string\n verificationUri: string\n verificationUriComplete: string\n expiresInSeconds: number\n intervalSeconds: number\n tokenEndpoint: string\n clientId: string\n}\n\nasync function postOAuthForm(\n fetchImpl: typeof fetch,\n endpoint: string,\n body: Record<string, string>,\n): Promise<Response> {\n return fetchImpl(endpoint, {\n method: 'POST',\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n body: new URLSearchParams(body).toString(),\n })\n}\n\nexport interface StartDeviceAuthOptions {\n issuerUrl: string\n clientId: string\n tokenName?: string\n fetch?: typeof fetch\n}\n\nfunction normalizeIssuer(raw: string): string {\n const issuer = new URL(raw)\n if (\n issuer.username !== '' ||\n issuer.password !== '' ||\n issuer.pathname !== '/' ||\n issuer.search !== '' ||\n issuer.hash !== ''\n ) {\n throw new Error('authorization server issuer must be an origin')\n }\n return issuer.origin\n}\n\nexport async function startDeviceAuth(options: StartDeviceAuthOptions): Promise<DeviceAuthStart> {\n const fetchImpl = options.fetch ?? fetch\n const expectedIssuer = normalizeIssuer(options.issuerUrl)\n const metadataUrl = new URL('/.well-known/oauth-authorization-server', `${expectedIssuer}/`)\n const metadataResponse = await fetchImpl(metadataUrl, { headers: { Accept: 'application/json' } })\n if (!metadataResponse.ok) throw await ApiError.fromResponse(metadataResponse)\n const metadata = zAuthorizationServerMetadata.parse(await metadataResponse.json())\n if (normalizeIssuer(metadata.issuer) !== expectedIssuer) {\n throw new Error(\n `authorization server issuer mismatch: expected ${expectedIssuer}, received ${metadata.issuer}`,\n )\n }\n if (!metadata.grant_types_supported.includes(OAUTH_DEVICE_GRANT_TYPE)) {\n throw new Error('authorization server does not support the OAuth device grant')\n }\n if (!metadata.token_endpoint_auth_methods_supported.includes('none')) {\n throw new Error('authorization server does not support public OAuth clients')\n }\n const body: Record<string, string> = { client_id: options.clientId }\n if (options.tokenName !== undefined) body.token_name = options.tokenName\n const response = await postOAuthForm(fetchImpl, metadata.device_authorization_endpoint, body)\n if (!response.ok) throw await ApiError.fromResponse(response)\n const data = zDeviceAuthStartResponse.parse(await response.json())\n return {\n deviceCode: data.device_code,\n userCode: data.user_code,\n verificationUri: new URL(data.verification_uri, metadata.issuer).toString(),\n verificationUriComplete: new URL(data.verification_uri_complete, metadata.issuer).toString(),\n expiresInSeconds: data.expires_in,\n intervalSeconds: data.interval,\n tokenEndpoint: metadata.token_endpoint,\n clientId: options.clientId,\n }\n}\n\nfunction defaultSleep(seconds: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1000))\n}\n\nexport interface PollDeviceAuthTokenOptions {\n tokenEndpoint: string\n clientId: string\n deviceCode: string\n intervalSeconds: number\n fetch?: typeof fetch\n sleep?: (seconds: number) => Promise<void>\n}\n\nexport async function pollDeviceAuthToken(options: PollDeviceAuthTokenOptions): Promise<string> {\n const fetchImpl = options.fetch ?? fetch\n const sleep = options.sleep ?? defaultSleep\n let interval = options.intervalSeconds\n while (true) {\n await sleep(interval)\n const response = await postOAuthForm(fetchImpl, options.tokenEndpoint, {\n grant_type: OAUTH_DEVICE_GRANT_TYPE,\n device_code: options.deviceCode,\n client_id: options.clientId,\n })\n if (response.status === 200) {\n return zDeviceAuthApprovedResponse.parse(await response.json()).access_token\n }\n if (response.status === 400) {\n const failure = zDeviceAuthErrorResponse.safeParse(\n await response\n .clone()\n .json()\n .catch((): unknown => undefined),\n )\n if (failure.success) {\n if (failure.data.error === 'authorization_pending') continue\n if (failure.data.error === 'slow_down') {\n interval += 5\n continue\n }\n if (failure.data.error === 'access_denied' || failure.data.error === 'expired_token') {\n throw new DeviceAuthError(failure.data.error)\n }\n }\n }\n throw await ApiError.fromResponse(response)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAQO,IAAM,wBAAN,cAAoC,MAAM;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,GAMG;AACD,UAAM,SAAS,EAAE,MAAM,CAAC;AACxB,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,YAAY;AACjB,SAAK,SAAS;AAAA,EAChB;AACF;AAcA,IAAM,qBAAqB;AAE3B,SAAS,oBAAoB,OAAgB,QAA6C;AACxF,MAAI,iBAAiB,sBAAuB,QAAO;AACnD,MAAI,QAAQ,YAAY,QAAS,iBAAiB,SAAS,MAAM,SAAS,cAAe;AACvF,WAAO,IAAI,sBAAsB;AAAA,MAC/B,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW;AAAA,MACX,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AACA,QAAM,QAAQ,iBAAiB,QAAQ,mBAAmB,KAAK,MAAM,OAAO,IAAI;AAChF,QAAM,SAAS,QAAQ,CAAC,KAAK,OAAO,SAAY,OAAO,SAAS,MAAM,CAAC,GAAG,EAAE;AAC5E,MAAI,UAAU,MAAM;AAClB,WAAO,IAAI,sBAAsB;AAAA,MAC/B,MAAM;AAAA,MACN,SAAS,+CAA+C,MAAM;AAAA,MAC9D,WAAW,WAAW,OAAO,WAAW,OAAO,UAAU;AAAA,MACzD;AAAA,MACA,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AACA,SAAO,IAAI,sBAAsB;AAAA,IAC/B,MAAM;AAAA,IACN,SAAS;AAAA,IACT,WAAW;AAAA,IAC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