@arbidocs/sdk 0.5.24 → 0.5.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{browser-6pFZ1KEo.d.cts → browser-DJz2t6eb.d.cts} +24 -4
- package/dist/{browser-BTAy2lP0.d.ts → browser-DXMOExjT.d.ts} +24 -4
- package/dist/browser.cjs +61 -22
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +62 -23
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +61 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +62 -23
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/browser.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as Arbi, e as ArbiApiError, f as ArbiError, g as ArbiHostSession, h as ArbiOptions, j as ArbiWorkspaceChangedError, k as ArbiWorkspaceSupersededError, l as AskHandlers, m as AskRequest, n as AttendeeRead, o as AuthContext, p as AuthHeaders, q as AuthMode, r as AuthenticatedClient, B as BookingConfirmation, s as BookingPage, t as BookingPageWriteBody, u as BookingRequestBody, v as BridgeTokensOptions, C as CalDavConnectBody, w as CalDavProfile, x as CalendarAccount, y as CalendarAccountKind, z as CalendarCreateBody, D as CalendarEvent, E as CalendarKeys, F as CalendarRead, G as CalendarSettings, H as CalendarSettingsBody, I as CalendarUpdate, J as CalendarWindow, K as CallApiError, L as ChatAttachmentFile, M as ChatAttachmentInput, N as ChatCryptoContext, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessage, T as ChatMessageResponse, U as ChatResponse, V as ChatSession, W as CitationSummary, X as CitationToolSources, Y as CliConfig, Z as CliCredentials, _ as CommandDescriptor, $ as ConfigStore, a0 as ConnectOptions, a1 as ConnectorCatalogEntry, a2 as ConnectorFolder, a3 as ConnectorSyncProgress, a4 as ConnectorSyncStatus, a5 as ConnectorVendorKey, a6 as ConnectorVisibilitySettings, a7 as ContextUsage, a8 as ConversationResponse, a9 as ConversationUsageResponse, aa as CreateFactRequest, ab as CreateFactsRequest, ac as CreateWorkRequest, ad as CreateWorkflowRequest, ae as DEFAULT_AI_USD_PER_GBP, ag as DRIVE_SYNC_VENDORS, ah as Database, ai as DatabaseColumn, aj as DatabaseColumnWrite, ak as DatabaseImportResult, al as DatabaseRow, am as DatabaseRowPage, an as DatabaseRowsQuery, ao as DateTimeSpec, aq as DecryptedChatMessage, ar as DeploymentHouseTemplate, as as DocInfo, at as DocInfoMap, av as DocumentAutomationAction, ay as DocumentSelector, aB as DriveSyncProgress, aC as DriveSyncSummary, aD as DuplicateContactError, aE as ENTITY_KINDS, aF as EditScope, aG as EntityKind, aH as EventCreateBody, aI as EventPatchBody, aJ as FLAT_TAG_KINDS, aK as FactResponse, aL as FactSearchRequest, aM as FactSearchResponse, aN as FindTimeParams, aP as FreeBusyEntry, aQ as FullContextSelection, aR as GOOGLE_VENDORS, aS as HolidayCountry, aT as HouseTemplateCandidate, aU as IMANAGE_VENDORS, aV as IdentityErrorCode, aW as IdentityPurchase, aX as IdentityState, aY as IdentityStatus, aZ as ImportResult, a_ as InvitationRead, a$ as LinkedRun, b1 as ListEventsParams, b2 as ListFactsOptions, b4 as MAILBOX_SYNC_VENDORS, b5 as MAX_RETRIEVE_DOC_IDS, b6 as MICROSOFT_VENDORS, b9 as OAuthAccountKind, ba as OutputItemDone, bb as OverlayItem, bc as OverlayLayerName, bd as PRESENCE_KINDS, be as PROMPT_CONTEXT_CHARS, bf as ParsedSlashCommand, bg as PendingAuthResponse, bh as PersonKey, bi as PlanStepsError, bj as PlanWorkRequest, bk as ProductResponse, bl as ProjectAddonKind, bm as ProjectAddonSettingsRequest, bn as ProjectBudget, bo as ProjectCheckoutRequest, bp as ProjectConversationUsageResponse, bq as ProjectCreateOptions, br as ProjectDetails, bs as ProjectEventKind, bt as ProjectEventResponse, bu as ProjectInvoicesResponse, bv as ProjectNextPeriodAddonsRequest, bw as ProjectPlanChangeRequest, bx as ProjectQuoteRequest, by as ProjectResponse, bz as ProjectUpdateRequest, bA as ProjectUsageResponse, bB as PublicBookingError, bC as PublicBookingPage, bD as QuotaExceeded, bE as RaisedSignal, bF as ReconnectOptions, bG as ReconnectableWsConnection, bH as ResolvedCitation, bJ as RespondParams, bK as RespondPartstat, bL as RoomCreateBody, bM as RoomQuery, bN as RoomRead, bO as RunProgress, bP as RunStats, bQ as RunStep, bR as RunWaitingOn, bS as SHAREPOINT_VENDORS, bT as SSEEvent, bU as SSEStreamCallbacks, bV as SSEStreamResult, bX as STOP_ID_WAIT_MS, bY as STOP_REPEAT_WINDOW_MS, b_ as ScopedTarget, b$ as SearchChunk, c0 as SendBack, c1 as ShareRead, c2 as ShareRole, c3 as SkillSummary, c4 as SkippedFile, c5 as SlackConnectionStatus, c6 as StepActionRequest, c7 as StepActivityEvent, c8 as StepAssignee, c9 as StepDisplay, ca as StepField, cd as StepKind, ce as StepPhase, cf as StepSignal, cg as StepSignalWhen, ch as StepState, ci as StepStatus, cj as SubagentBranchRecord, ck as SubagentLaneInfo, cl as SubmitBackgroundQueryOptions, cm as SubscribeParams, cn as SyncTriggerResult, co as TAG_KINDS, cp as TAG_NESTING_MAX_DEPTH, cq as TagChange, cr as TagFieldDefinition, cs as TagGroup, ct as TagKind, cu as TagKindField, cv as TagKindSchema, cw as TagLinks, cx as TagListQuery, cy as TagNode, cz as TagResponse, cA as TagScope, cB as TagTreeRow, cC as TaskPlan, cD as TaskPlanStep, cE as TaxQuoteResponse, cF as Thread, cG as ThreadsResponse, cH as TimeSuggestion, cI as TurnRequest, cJ as UpdateConversationRequest, cK as UpdateFactRequest, cL as UpdateWorkflowRequest, cP as UploadDocumentsOptions, cQ as UploadOptions, cR as UploadProgressListener, cS as UploadResult, cT as UsageBreakdown, cU as UserConnectorEntry, cV as UserDailyUsageResponse, cW as UserInfo, cX as WebSocketAuthError, cY as WeeklyHoursSpec, cZ as WorkStatus, c_ as WorkflowAuthMode, c$ as WorkflowResponse, d0 as WorkflowRunHistoryResponse, d1 as WorkflowRunResponse, d2 as WorkspaceContext, d3 as WorkspaceOpenResponse, d4 as WsConnection, d5 as account, d6 as agentconfig, d8 as appendTranscriptionHints, d9 as assistant, da as authenticatedFetch, db as bookPublicSlot, dc as buildCitationChunkData, de as buildDocumentTools, df as buildFactsContextTool, dg as buildRetrievalChunkTool, dh as buildRetrievalFullContextTool, di as buildRetrievalTocTool, dj as buildTurnRequest, dk as calendar, dl as calls, dm as canTagHaveParent, dn as cancelPublicBooking, dp as chats, dq as computeRunStats, dr as connectErrorMessage, ds as connectWebSocket, dt as connectWithReconnect, du as connectors, dv as contacts, dw as continuityPrompt, dx as conversations, dy as countCitations, dz as createAuthenticatedClient, dB as createIndexAssigner, dC as databases, dD as defaultKindForFormat, dE as doctags, dF as documents, dG as estimateDraftTokens, dH as extractDocumentIdsFromMessages, dI as extractFactIdsFromMessages, dJ as extractSubagentLanes, dK as facts, dL as files, dM as filterDocumentTags, dN as filterSkills, dO as findLeafForTaskMessage, dP as findMainSiblingLeaf, dQ as findReplyTarget, dR as findSubagentRunId, dS as flattenTagTree, dT as formatAgentStepLabel, dU as formatFileSize, dV as formatGbp, dW as formatGbpPerMillionTokens, dX as formatItemLabel, dZ as formatTokens, d_ as formatUserName, d$ as formatWorkspaceChoices, e3 as getAgentStepLabel, e4 as getAttachableRunId, e5 as getChildTags, e6 as getContextRemainingPercent, e7 as getContextUsedPercent, e8 as getContextUsedTokens, e9 as getCurrentStep, ea as getEligibleParentTags, ec as getErrorMessage, ed as getPublicBookingPage, ee as getRawWorkspaceKey, ef as getRunToAttach, eg as getRunToCancel, eh as getStepDisplay, ei as getStepTool, ej as getSubagentBranchRecord, ek as getTagDescendantIds, el as health, em as houseTemplates, en as hydrateAgentSteps, ep as identityErrorCode, eo as identityVerification, eq as isAnnotationTag, er as isConnectorVendorVisible, es as isDriveSyncVendor, et as isEntityTag, eu as isFlatKind, ev as isLabelTag, ew as isMailboxSyncVendor, ex as isNearAiUsageBudget, ey as isPresenceTag, ez as isSharePointVendor, eA as isSharedSkill, eB as isTraceItem, eC as mail, eD as mergeAgentSteps, eE as notifications, eF as parseSSEEvents, eG as parseSlashCommand, eH as parseSlashTokenInProgress, eI as performPasswordLogin, eL as pickMainThread, eM as profile, eN as progressFetch, eO as projects, eP as quotaExceededFrom, eQ as quotaFromStreamError, eR as reduceOutputItem, eS as refusalReason, eT as requireData, eU as requireOk, eV as resolveAuth, eW as resolveCitations, eX as resolveSummary, eY as resolveWorkspace, eZ as responses, e_ as searchChunks, e$ as selectFullContextDocument, f0 as selectWorkspace, f1 as selectWorkspaceById, f2 as sessions, f3 as settings, f5 as sliceToSubagentThread, f6 as streamSSE, f7 as stripCitationMarkdown, f8 as subagentJobLabel, f9 as summarizeCitations, fa as tagUseCount, fb as tags, fc as tagsForScope, fd as tagsOfGroup, fe as topLevelAgentSteps, fg as usdToGbp, fh as work, fi as workflowSteps, fj as workflows, fk as workspaces, fl as wouldCreateTagCycle } from './browser-
|
|
1
|
+
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as Arbi, e as ArbiApiError, f as ArbiError, g as ArbiHostSession, h as ArbiOptions, j as ArbiWorkspaceChangedError, k as ArbiWorkspaceSupersededError, l as AskHandlers, m as AskRequest, n as AttendeeRead, o as AuthContext, p as AuthHeaders, q as AuthMode, r as AuthenticatedClient, B as BookingConfirmation, s as BookingPage, t as BookingPageWriteBody, u as BookingRequestBody, v as BridgeTokensOptions, C as CalDavConnectBody, w as CalDavProfile, x as CalendarAccount, y as CalendarAccountKind, z as CalendarCreateBody, D as CalendarEvent, E as CalendarKeys, F as CalendarRead, G as CalendarSettings, H as CalendarSettingsBody, I as CalendarUpdate, J as CalendarWindow, K as CallApiError, L as ChatAttachmentFile, M as ChatAttachmentInput, N as ChatCryptoContext, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessage, T as ChatMessageResponse, U as ChatResponse, V as ChatSession, W as CitationSummary, X as CitationToolSources, Y as CliConfig, Z as CliCredentials, _ as CommandDescriptor, $ as ConfigStore, a0 as ConnectOptions, a1 as ConnectorCatalogEntry, a2 as ConnectorFolder, a3 as ConnectorSyncProgress, a4 as ConnectorSyncStatus, a5 as ConnectorVendorKey, a6 as ConnectorVisibilitySettings, a7 as ContextUsage, a8 as ConversationResponse, a9 as ConversationUsageResponse, aa as CreateFactRequest, ab as CreateFactsRequest, ac as CreateWorkRequest, ad as CreateWorkflowRequest, ae as DEFAULT_AI_USD_PER_GBP, ag as DRIVE_SYNC_VENDORS, ah as Database, ai as DatabaseColumn, aj as DatabaseColumnWrite, ak as DatabaseImportResult, al as DatabaseRow, am as DatabaseRowPage, an as DatabaseRowsQuery, ao as DateTimeSpec, aq as DecryptedChatMessage, ar as DeploymentHouseTemplate, as as DocInfo, at as DocInfoMap, av as DocumentAutomationAction, ay as DocumentSelector, aB as DriveSyncProgress, aC as DriveSyncSummary, aD as DuplicateContactError, aE as ENTITY_KINDS, aF as EditScope, aG as EntityKind, aH as EventCreateBody, aI as EventPatchBody, aJ as FLAT_TAG_KINDS, aK as FactResponse, aL as FactSearchRequest, aM as FactSearchResponse, aN as FindTimeParams, aP as FreeBusyEntry, aQ as FullContextSelection, aR as GOOGLE_VENDORS, aS as HolidayCountry, aT as HouseTemplateCandidate, aU as IMANAGE_VENDORS, aV as IdentityErrorCode, aW as IdentityPurchase, aX as IdentityState, aY as IdentityStatus, aZ as ImportResult, a_ as InvitationRead, a$ as LinkedRun, b1 as ListEventsParams, b2 as ListFactsOptions, b4 as MAILBOX_SYNC_VENDORS, b5 as MAX_RETRIEVE_DOC_IDS, b6 as MICROSOFT_VENDORS, b9 as OAuthAccountKind, ba as OutputItemDone, bb as OverlayItem, bc as OverlayLayerName, bd as PRESENCE_KINDS, be as PROMPT_CONTEXT_CHARS, bf as ParsedSlashCommand, bg as PendingAuthResponse, bh as PersonKey, bi as PlanStepsError, bj as PlanWorkRequest, bk as ProductResponse, bl as ProjectAddonKind, bm as ProjectAddonSettingsRequest, bn as ProjectBudget, bo as ProjectCheckoutRequest, bp as ProjectConversationUsageResponse, bq as ProjectCreateOptions, br as ProjectDetails, bs as ProjectEventKind, bt as ProjectEventResponse, bu as ProjectInvoicesResponse, bv as ProjectNextPeriodAddonsRequest, bw as ProjectPlanChangeRequest, bx as ProjectQuoteRequest, by as ProjectResponse, bz as ProjectUpdateRequest, bA as ProjectUsageResponse, bB as PublicBookingError, bC as PublicBookingPage, bD as QuotaExceeded, bE as RaisedSignal, bF as ReconnectOptions, bG as ReconnectableWsConnection, bH as ResolvedCitation, bJ as RespondParams, bK as RespondPartstat, bL as RoomCreateBody, bM as RoomQuery, bN as RoomRead, bO as RunProgress, bP as RunStats, bQ as RunStep, bR as RunWaitingOn, bS as SHAREPOINT_VENDORS, bT as SSEEvent, bU as SSEStreamCallbacks, bV as SSEStreamResult, bX as STOP_ID_WAIT_MS, bY as STOP_REPEAT_WINDOW_MS, b_ as ScopedTarget, b$ as SearchChunk, c0 as SendBack, c1 as ShareRead, c2 as ShareRole, c3 as SkillSummary, c4 as SkippedFile, c5 as SlackConnectionStatus, c6 as StepActionRequest, c7 as StepActivityEvent, c8 as StepAssignee, c9 as StepDisplay, ca as StepField, cd as StepKind, ce as StepPhase, cf as StepSignal, cg as StepSignalWhen, ch as StepState, ci as StepStatus, cj as SubagentBranchRecord, ck as SubagentLaneInfo, cl as SubmitBackgroundQueryOptions, cm as SubscribeParams, cn as SyncTriggerResult, co as TAG_KINDS, cp as TAG_NESTING_MAX_DEPTH, cq as TagChange, cr as TagFieldDefinition, cs as TagGroup, ct as TagKind, cu as TagKindField, cv as TagKindSchema, cw as TagLinks, cx as TagListQuery, cy as TagNode, cz as TagResponse, cA as TagScope, cB as TagTreeRow, cC as TaskPlan, cD as TaskPlanStep, cE as TaxQuoteResponse, cF as Thread, cG as ThreadsResponse, cH as TimeSuggestion, cI as TurnRequest, cJ as UpdateConversationRequest, cK as UpdateFactRequest, cL as UpdateWorkflowRequest, cP as UploadDocumentsOptions, cQ as UploadOptions, cR as UploadProgressListener, cS as UploadResult, cT as UsageBreakdown, cU as UserConnectorEntry, cV as UserDailyUsageResponse, cW as UserInfo, cX as WebSocketAuthError, cY as WeeklyHoursSpec, cZ as WorkStatus, c_ as WorkflowAuthMode, c$ as WorkflowResponse, d0 as WorkflowRunHistoryResponse, d1 as WorkflowRunResponse, d2 as WorkspaceContext, d3 as WorkspaceOpenResponse, d4 as WsConnection, d5 as account, d6 as agentconfig, d8 as appendTranscriptionHints, d9 as assistant, da as authenticatedFetch, db as bookPublicSlot, dc as buildCitationChunkData, de as buildDocumentTools, df as buildFactsContextTool, dg as buildRetrievalChunkTool, dh as buildRetrievalFullContextTool, di as buildRetrievalTocTool, dj as buildTurnRequest, dk as calendar, dl as calls, dm as canTagHaveParent, dn as cancelPublicBooking, dp as chats, dq as computeRunStats, dr as connectErrorMessage, ds as connectWebSocket, dt as connectWithReconnect, du as connectors, dv as contacts, dw as continuityPrompt, dx as conversations, dy as countCitations, dz as createAuthenticatedClient, dB as createIndexAssigner, dC as databases, dD as defaultKindForFormat, dE as doctags, dF as documents, dG as estimateDraftTokens, dH as extractDocumentIdsFromMessages, dI as extractFactIdsFromMessages, dJ as extractSubagentLanes, dK as facts, dL as files, dM as filterDocumentTags, dN as filterSkills, dO as findLeafForTaskMessage, dP as findMainSiblingLeaf, dQ as findReplyTarget, dR as findSubagentRunId, dS as flattenTagTree, dT as formatAgentStepLabel, dU as formatFileSize, dV as formatGbp, dW as formatGbpPerMillionTokens, dX as formatItemLabel, dZ as formatTokens, d_ as formatUserName, d$ as formatWorkspaceChoices, e3 as getAgentStepLabel, e4 as getAttachableRunId, e5 as getChildTags, e6 as getContextRemainingPercent, e7 as getContextUsedPercent, e8 as getContextUsedTokens, e9 as getCurrentStep, ea as getEligibleParentTags, ec as getErrorMessage, ed as getPublicBookingPage, ee as getRawWorkspaceKey, ef as getRunToAttach, eg as getRunToCancel, eh as getStepDisplay, ei as getStepTool, ej as getSubagentBranchRecord, ek as getTagDescendantIds, el as health, em as houseTemplates, en as hydrateAgentSteps, ep as identityErrorCode, eo as identityVerification, eq as isAnnotationTag, er as isConnectorVendorVisible, es as isDriveSyncVendor, et as isEntityTag, eu as isFlatKind, ev as isLabelTag, ew as isMailboxSyncVendor, ex as isNearAiUsageBudget, ey as isPresenceTag, ez as isSharePointVendor, eA as isSharedSkill, eB as isTraceItem, eC as mail, eD as mergeAgentSteps, eE as notifications, eF as parseSSEEvents, eG as parseSlashCommand, eH as parseSlashTokenInProgress, eI as performPasswordLogin, eL as pickMainThread, eM as profile, eN as progressFetch, eO as projects, eP as quotaExceededFrom, eQ as quotaFromStreamError, eR as reduceOutputItem, eS as refusalReason, eT as requireData, eU as requireOk, eV as resolveAuth, eW as resolveCitations, eX as resolveSummary, eY as resolveWorkspace, eZ as responses, e_ as searchChunks, e$ as selectFullContextDocument, f0 as selectWorkspace, f1 as selectWorkspaceById, f2 as sessions, f3 as settings, f5 as sliceToSubagentThread, f6 as streamSSE, f7 as stripCitationMarkdown, f8 as subagentJobLabel, f9 as summarizeCitations, fa as tagUseCount, fb as tags, fc as tagsForScope, fd as tagsOfGroup, fe as topLevelAgentSteps, fg as usdToGbp, fh as work, fi as workflowSteps, fj as workflows, fk as workspaces, fl as wouldCreateTagCycle } from './browser-DJz2t6eb.cjs';
|
|
2
2
|
export { A as AgentControlStateEvent, a as AgentStepDeltaEvent, b as AgentStepEvent, c as ArbiErrorEvent, d as ArtifactEvent, D as DeferredInterjectionEvent, M as MailDraftSSEEvent, e as MessageMetadataPayload, f as MessageQueuedEvent, O as OutputTokensDetails, P as ProbeAnswerEvent, R as ResponseCompletedEvent, g as ResponseContentPartAddedEvent, h as ResponseCreatedEvent, i as ResponseFailedEvent, j as ResponseOutputItemAddedEvent, k as ResponseOutputItemDoneEvent, l as ResponseOutputTextDeltaEvent, m as ResponseOutputTextDoneEvent, n as ResponseUsage, S as SSEStreamStartData, T as TokenBudgetContext, U as UserInputRequestEvent, o as UserMessageEvent } from './sse-types-BbR7JG5o.cjs';
|
|
3
3
|
export { CallPeer, LoginProfile } from '@arbidocs/client';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as Arbi, e as ArbiApiError, f as ArbiError, g as ArbiHostSession, h as ArbiOptions, j as ArbiWorkspaceChangedError, k as ArbiWorkspaceSupersededError, l as AskHandlers, m as AskRequest, n as AttendeeRead, o as AuthContext, p as AuthHeaders, q as AuthMode, r as AuthenticatedClient, B as BookingConfirmation, s as BookingPage, t as BookingPageWriteBody, u as BookingRequestBody, v as BridgeTokensOptions, C as CalDavConnectBody, w as CalDavProfile, x as CalendarAccount, y as CalendarAccountKind, z as CalendarCreateBody, D as CalendarEvent, E as CalendarKeys, F as CalendarRead, G as CalendarSettings, H as CalendarSettingsBody, I as CalendarUpdate, J as CalendarWindow, K as CallApiError, L as ChatAttachmentFile, M as ChatAttachmentInput, N as ChatCryptoContext, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessage, T as ChatMessageResponse, U as ChatResponse, V as ChatSession, W as CitationSummary, X as CitationToolSources, Y as CliConfig, Z as CliCredentials, _ as CommandDescriptor, $ as ConfigStore, a0 as ConnectOptions, a1 as ConnectorCatalogEntry, a2 as ConnectorFolder, a3 as ConnectorSyncProgress, a4 as ConnectorSyncStatus, a5 as ConnectorVendorKey, a6 as ConnectorVisibilitySettings, a7 as ContextUsage, a8 as ConversationResponse, a9 as ConversationUsageResponse, aa as CreateFactRequest, ab as CreateFactsRequest, ac as CreateWorkRequest, ad as CreateWorkflowRequest, ae as DEFAULT_AI_USD_PER_GBP, ag as DRIVE_SYNC_VENDORS, ah as Database, ai as DatabaseColumn, aj as DatabaseColumnWrite, ak as DatabaseImportResult, al as DatabaseRow, am as DatabaseRowPage, an as DatabaseRowsQuery, ao as DateTimeSpec, aq as DecryptedChatMessage, ar as DeploymentHouseTemplate, as as DocInfo, at as DocInfoMap, av as DocumentAutomationAction, ay as DocumentSelector, aB as DriveSyncProgress, aC as DriveSyncSummary, aD as DuplicateContactError, aE as ENTITY_KINDS, aF as EditScope, aG as EntityKind, aH as EventCreateBody, aI as EventPatchBody, aJ as FLAT_TAG_KINDS, aK as FactResponse, aL as FactSearchRequest, aM as FactSearchResponse, aN as FindTimeParams, aP as FreeBusyEntry, aQ as FullContextSelection, aR as GOOGLE_VENDORS, aS as HolidayCountry, aT as HouseTemplateCandidate, aU as IMANAGE_VENDORS, aV as IdentityErrorCode, aW as IdentityPurchase, aX as IdentityState, aY as IdentityStatus, aZ as ImportResult, a_ as InvitationRead, a$ as LinkedRun, b1 as ListEventsParams, b2 as ListFactsOptions, b4 as MAILBOX_SYNC_VENDORS, b5 as MAX_RETRIEVE_DOC_IDS, b6 as MICROSOFT_VENDORS, b9 as OAuthAccountKind, ba as OutputItemDone, bb as OverlayItem, bc as OverlayLayerName, bd as PRESENCE_KINDS, be as PROMPT_CONTEXT_CHARS, bf as ParsedSlashCommand, bg as PendingAuthResponse, bh as PersonKey, bi as PlanStepsError, bj as PlanWorkRequest, bk as ProductResponse, bl as ProjectAddonKind, bm as ProjectAddonSettingsRequest, bn as ProjectBudget, bo as ProjectCheckoutRequest, bp as ProjectConversationUsageResponse, bq as ProjectCreateOptions, br as ProjectDetails, bs as ProjectEventKind, bt as ProjectEventResponse, bu as ProjectInvoicesResponse, bv as ProjectNextPeriodAddonsRequest, bw as ProjectPlanChangeRequest, bx as ProjectQuoteRequest, by as ProjectResponse, bz as ProjectUpdateRequest, bA as ProjectUsageResponse, bB as PublicBookingError, bC as PublicBookingPage, bD as QuotaExceeded, bE as RaisedSignal, bF as ReconnectOptions, bG as ReconnectableWsConnection, bH as ResolvedCitation, bJ as RespondParams, bK as RespondPartstat, bL as RoomCreateBody, bM as RoomQuery, bN as RoomRead, bO as RunProgress, bP as RunStats, bQ as RunStep, bR as RunWaitingOn, bS as SHAREPOINT_VENDORS, bT as SSEEvent, bU as SSEStreamCallbacks, bV as SSEStreamResult, bX as STOP_ID_WAIT_MS, bY as STOP_REPEAT_WINDOW_MS, b_ as ScopedTarget, b$ as SearchChunk, c0 as SendBack, c1 as ShareRead, c2 as ShareRole, c3 as SkillSummary, c4 as SkippedFile, c5 as SlackConnectionStatus, c6 as StepActionRequest, c7 as StepActivityEvent, c8 as StepAssignee, c9 as StepDisplay, ca as StepField, cd as StepKind, ce as StepPhase, cf as StepSignal, cg as StepSignalWhen, ch as StepState, ci as StepStatus, cj as SubagentBranchRecord, ck as SubagentLaneInfo, cl as SubmitBackgroundQueryOptions, cm as SubscribeParams, cn as SyncTriggerResult, co as TAG_KINDS, cp as TAG_NESTING_MAX_DEPTH, cq as TagChange, cr as TagFieldDefinition, cs as TagGroup, ct as TagKind, cu as TagKindField, cv as TagKindSchema, cw as TagLinks, cx as TagListQuery, cy as TagNode, cz as TagResponse, cA as TagScope, cB as TagTreeRow, cC as TaskPlan, cD as TaskPlanStep, cE as TaxQuoteResponse, cF as Thread, cG as ThreadsResponse, cH as TimeSuggestion, cI as TurnRequest, cJ as UpdateConversationRequest, cK as UpdateFactRequest, cL as UpdateWorkflowRequest, cP as UploadDocumentsOptions, cQ as UploadOptions, cR as UploadProgressListener, cS as UploadResult, cT as UsageBreakdown, cU as UserConnectorEntry, cV as UserDailyUsageResponse, cW as UserInfo, cX as WebSocketAuthError, cY as WeeklyHoursSpec, cZ as WorkStatus, c_ as WorkflowAuthMode, c$ as WorkflowResponse, d0 as WorkflowRunHistoryResponse, d1 as WorkflowRunResponse, d2 as WorkspaceContext, d3 as WorkspaceOpenResponse, d4 as WsConnection, d5 as account, d6 as agentconfig, d8 as appendTranscriptionHints, d9 as assistant, da as authenticatedFetch, db as bookPublicSlot, dc as buildCitationChunkData, de as buildDocumentTools, df as buildFactsContextTool, dg as buildRetrievalChunkTool, dh as buildRetrievalFullContextTool, di as buildRetrievalTocTool, dj as buildTurnRequest, dk as calendar, dl as calls, dm as canTagHaveParent, dn as cancelPublicBooking, dp as chats, dq as computeRunStats, dr as connectErrorMessage, ds as connectWebSocket, dt as connectWithReconnect, du as connectors, dv as contacts, dw as continuityPrompt, dx as conversations, dy as countCitations, dz as createAuthenticatedClient, dB as createIndexAssigner, dC as databases, dD as defaultKindForFormat, dE as doctags, dF as documents, dG as estimateDraftTokens, dH as extractDocumentIdsFromMessages, dI as extractFactIdsFromMessages, dJ as extractSubagentLanes, dK as facts, dL as files, dM as filterDocumentTags, dN as filterSkills, dO as findLeafForTaskMessage, dP as findMainSiblingLeaf, dQ as findReplyTarget, dR as findSubagentRunId, dS as flattenTagTree, dT as formatAgentStepLabel, dU as formatFileSize, dV as formatGbp, dW as formatGbpPerMillionTokens, dX as formatItemLabel, dZ as formatTokens, d_ as formatUserName, d$ as formatWorkspaceChoices, e3 as getAgentStepLabel, e4 as getAttachableRunId, e5 as getChildTags, e6 as getContextRemainingPercent, e7 as getContextUsedPercent, e8 as getContextUsedTokens, e9 as getCurrentStep, ea as getEligibleParentTags, ec as getErrorMessage, ed as getPublicBookingPage, ee as getRawWorkspaceKey, ef as getRunToAttach, eg as getRunToCancel, eh as getStepDisplay, ei as getStepTool, ej as getSubagentBranchRecord, ek as getTagDescendantIds, el as health, em as houseTemplates, en as hydrateAgentSteps, ep as identityErrorCode, eo as identityVerification, eq as isAnnotationTag, er as isConnectorVendorVisible, es as isDriveSyncVendor, et as isEntityTag, eu as isFlatKind, ev as isLabelTag, ew as isMailboxSyncVendor, ex as isNearAiUsageBudget, ey as isPresenceTag, ez as isSharePointVendor, eA as isSharedSkill, eB as isTraceItem, eC as mail, eD as mergeAgentSteps, eE as notifications, eF as parseSSEEvents, eG as parseSlashCommand, eH as parseSlashTokenInProgress, eI as performPasswordLogin, eL as pickMainThread, eM as profile, eN as progressFetch, eO as projects, eP as quotaExceededFrom, eQ as quotaFromStreamError, eR as reduceOutputItem, eS as refusalReason, eT as requireData, eU as requireOk, eV as resolveAuth, eW as resolveCitations, eX as resolveSummary, eY as resolveWorkspace, eZ as responses, e_ as searchChunks, e$ as selectFullContextDocument, f0 as selectWorkspace, f1 as selectWorkspaceById, f2 as sessions, f3 as settings, f5 as sliceToSubagentThread, f6 as streamSSE, f7 as stripCitationMarkdown, f8 as subagentJobLabel, f9 as summarizeCitations, fa as tagUseCount, fb as tags, fc as tagsForScope, fd as tagsOfGroup, fe as topLevelAgentSteps, fg as usdToGbp, fh as work, fi as workflowSteps, fj as workflows, fk as workspaces, fl as wouldCreateTagCycle } from './browser-
|
|
1
|
+
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as Arbi, e as ArbiApiError, f as ArbiError, g as ArbiHostSession, h as ArbiOptions, j as ArbiWorkspaceChangedError, k as ArbiWorkspaceSupersededError, l as AskHandlers, m as AskRequest, n as AttendeeRead, o as AuthContext, p as AuthHeaders, q as AuthMode, r as AuthenticatedClient, B as BookingConfirmation, s as BookingPage, t as BookingPageWriteBody, u as BookingRequestBody, v as BridgeTokensOptions, C as CalDavConnectBody, w as CalDavProfile, x as CalendarAccount, y as CalendarAccountKind, z as CalendarCreateBody, D as CalendarEvent, E as CalendarKeys, F as CalendarRead, G as CalendarSettings, H as CalendarSettingsBody, I as CalendarUpdate, J as CalendarWindow, K as CallApiError, L as ChatAttachmentFile, M as ChatAttachmentInput, N as ChatCryptoContext, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessage, T as ChatMessageResponse, U as ChatResponse, V as ChatSession, W as CitationSummary, X as CitationToolSources, Y as CliConfig, Z as CliCredentials, _ as CommandDescriptor, $ as ConfigStore, a0 as ConnectOptions, a1 as ConnectorCatalogEntry, a2 as ConnectorFolder, a3 as ConnectorSyncProgress, a4 as ConnectorSyncStatus, a5 as ConnectorVendorKey, a6 as ConnectorVisibilitySettings, a7 as ContextUsage, a8 as ConversationResponse, a9 as ConversationUsageResponse, aa as CreateFactRequest, ab as CreateFactsRequest, ac as CreateWorkRequest, ad as CreateWorkflowRequest, ae as DEFAULT_AI_USD_PER_GBP, ag as DRIVE_SYNC_VENDORS, ah as Database, ai as DatabaseColumn, aj as DatabaseColumnWrite, ak as DatabaseImportResult, al as DatabaseRow, am as DatabaseRowPage, an as DatabaseRowsQuery, ao as DateTimeSpec, aq as DecryptedChatMessage, ar as DeploymentHouseTemplate, as as DocInfo, at as DocInfoMap, av as DocumentAutomationAction, ay as DocumentSelector, aB as DriveSyncProgress, aC as DriveSyncSummary, aD as DuplicateContactError, aE as ENTITY_KINDS, aF as EditScope, aG as EntityKind, aH as EventCreateBody, aI as EventPatchBody, aJ as FLAT_TAG_KINDS, aK as FactResponse, aL as FactSearchRequest, aM as FactSearchResponse, aN as FindTimeParams, aP as FreeBusyEntry, aQ as FullContextSelection, aR as GOOGLE_VENDORS, aS as HolidayCountry, aT as HouseTemplateCandidate, aU as IMANAGE_VENDORS, aV as IdentityErrorCode, aW as IdentityPurchase, aX as IdentityState, aY as IdentityStatus, aZ as ImportResult, a_ as InvitationRead, a$ as LinkedRun, b1 as ListEventsParams, b2 as ListFactsOptions, b4 as MAILBOX_SYNC_VENDORS, b5 as MAX_RETRIEVE_DOC_IDS, b6 as MICROSOFT_VENDORS, b9 as OAuthAccountKind, ba as OutputItemDone, bb as OverlayItem, bc as OverlayLayerName, bd as PRESENCE_KINDS, be as PROMPT_CONTEXT_CHARS, bf as ParsedSlashCommand, bg as PendingAuthResponse, bh as PersonKey, bi as PlanStepsError, bj as PlanWorkRequest, bk as ProductResponse, bl as ProjectAddonKind, bm as ProjectAddonSettingsRequest, bn as ProjectBudget, bo as ProjectCheckoutRequest, bp as ProjectConversationUsageResponse, bq as ProjectCreateOptions, br as ProjectDetails, bs as ProjectEventKind, bt as ProjectEventResponse, bu as ProjectInvoicesResponse, bv as ProjectNextPeriodAddonsRequest, bw as ProjectPlanChangeRequest, bx as ProjectQuoteRequest, by as ProjectResponse, bz as ProjectUpdateRequest, bA as ProjectUsageResponse, bB as PublicBookingError, bC as PublicBookingPage, bD as QuotaExceeded, bE as RaisedSignal, bF as ReconnectOptions, bG as ReconnectableWsConnection, bH as ResolvedCitation, bJ as RespondParams, bK as RespondPartstat, bL as RoomCreateBody, bM as RoomQuery, bN as RoomRead, bO as RunProgress, bP as RunStats, bQ as RunStep, bR as RunWaitingOn, bS as SHAREPOINT_VENDORS, bT as SSEEvent, bU as SSEStreamCallbacks, bV as SSEStreamResult, bX as STOP_ID_WAIT_MS, bY as STOP_REPEAT_WINDOW_MS, b_ as ScopedTarget, b$ as SearchChunk, c0 as SendBack, c1 as ShareRead, c2 as ShareRole, c3 as SkillSummary, c4 as SkippedFile, c5 as SlackConnectionStatus, c6 as StepActionRequest, c7 as StepActivityEvent, c8 as StepAssignee, c9 as StepDisplay, ca as StepField, cd as StepKind, ce as StepPhase, cf as StepSignal, cg as StepSignalWhen, ch as StepState, ci as StepStatus, cj as SubagentBranchRecord, ck as SubagentLaneInfo, cl as SubmitBackgroundQueryOptions, cm as SubscribeParams, cn as SyncTriggerResult, co as TAG_KINDS, cp as TAG_NESTING_MAX_DEPTH, cq as TagChange, cr as TagFieldDefinition, cs as TagGroup, ct as TagKind, cu as TagKindField, cv as TagKindSchema, cw as TagLinks, cx as TagListQuery, cy as TagNode, cz as TagResponse, cA as TagScope, cB as TagTreeRow, cC as TaskPlan, cD as TaskPlanStep, cE as TaxQuoteResponse, cF as Thread, cG as ThreadsResponse, cH as TimeSuggestion, cI as TurnRequest, cJ as UpdateConversationRequest, cK as UpdateFactRequest, cL as UpdateWorkflowRequest, cP as UploadDocumentsOptions, cQ as UploadOptions, cR as UploadProgressListener, cS as UploadResult, cT as UsageBreakdown, cU as UserConnectorEntry, cV as UserDailyUsageResponse, cW as UserInfo, cX as WebSocketAuthError, cY as WeeklyHoursSpec, cZ as WorkStatus, c_ as WorkflowAuthMode, c$ as WorkflowResponse, d0 as WorkflowRunHistoryResponse, d1 as WorkflowRunResponse, d2 as WorkspaceContext, d3 as WorkspaceOpenResponse, d4 as WsConnection, d5 as account, d6 as agentconfig, d8 as appendTranscriptionHints, d9 as assistant, da as authenticatedFetch, db as bookPublicSlot, dc as buildCitationChunkData, de as buildDocumentTools, df as buildFactsContextTool, dg as buildRetrievalChunkTool, dh as buildRetrievalFullContextTool, di as buildRetrievalTocTool, dj as buildTurnRequest, dk as calendar, dl as calls, dm as canTagHaveParent, dn as cancelPublicBooking, dp as chats, dq as computeRunStats, dr as connectErrorMessage, ds as connectWebSocket, dt as connectWithReconnect, du as connectors, dv as contacts, dw as continuityPrompt, dx as conversations, dy as countCitations, dz as createAuthenticatedClient, dB as createIndexAssigner, dC as databases, dD as defaultKindForFormat, dE as doctags, dF as documents, dG as estimateDraftTokens, dH as extractDocumentIdsFromMessages, dI as extractFactIdsFromMessages, dJ as extractSubagentLanes, dK as facts, dL as files, dM as filterDocumentTags, dN as filterSkills, dO as findLeafForTaskMessage, dP as findMainSiblingLeaf, dQ as findReplyTarget, dR as findSubagentRunId, dS as flattenTagTree, dT as formatAgentStepLabel, dU as formatFileSize, dV as formatGbp, dW as formatGbpPerMillionTokens, dX as formatItemLabel, dZ as formatTokens, d_ as formatUserName, d$ as formatWorkspaceChoices, e3 as getAgentStepLabel, e4 as getAttachableRunId, e5 as getChildTags, e6 as getContextRemainingPercent, e7 as getContextUsedPercent, e8 as getContextUsedTokens, e9 as getCurrentStep, ea as getEligibleParentTags, ec as getErrorMessage, ed as getPublicBookingPage, ee as getRawWorkspaceKey, ef as getRunToAttach, eg as getRunToCancel, eh as getStepDisplay, ei as getStepTool, ej as getSubagentBranchRecord, ek as getTagDescendantIds, el as health, em as houseTemplates, en as hydrateAgentSteps, ep as identityErrorCode, eo as identityVerification, eq as isAnnotationTag, er as isConnectorVendorVisible, es as isDriveSyncVendor, et as isEntityTag, eu as isFlatKind, ev as isLabelTag, ew as isMailboxSyncVendor, ex as isNearAiUsageBudget, ey as isPresenceTag, ez as isSharePointVendor, eA as isSharedSkill, eB as isTraceItem, eC as mail, eD as mergeAgentSteps, eE as notifications, eF as parseSSEEvents, eG as parseSlashCommand, eH as parseSlashTokenInProgress, eI as performPasswordLogin, eL as pickMainThread, eM as profile, eN as progressFetch, eO as projects, eP as quotaExceededFrom, eQ as quotaFromStreamError, eR as reduceOutputItem, eS as refusalReason, eT as requireData, eU as requireOk, eV as resolveAuth, eW as resolveCitations, eX as resolveSummary, eY as resolveWorkspace, eZ as responses, e_ as searchChunks, e$ as selectFullContextDocument, f0 as selectWorkspace, f1 as selectWorkspaceById, f2 as sessions, f3 as settings, f5 as sliceToSubagentThread, f6 as streamSSE, f7 as stripCitationMarkdown, f8 as subagentJobLabel, f9 as summarizeCitations, fa as tagUseCount, fb as tags, fc as tagsForScope, fd as tagsOfGroup, fe as topLevelAgentSteps, fg as usdToGbp, fh as work, fi as workflowSteps, fj as workflows, fk as workspaces, fl as wouldCreateTagCycle } from './browser-DXMOExjT.js';
|
|
2
2
|
export { A as AgentControlStateEvent, a as AgentStepDeltaEvent, b as AgentStepEvent, c as ArbiErrorEvent, d as ArtifactEvent, D as DeferredInterjectionEvent, M as MailDraftSSEEvent, e as MessageMetadataPayload, f as MessageQueuedEvent, O as OutputTokensDetails, P as ProbeAnswerEvent, R as ResponseCompletedEvent, g as ResponseContentPartAddedEvent, h as ResponseCreatedEvent, i as ResponseFailedEvent, j as ResponseOutputItemAddedEvent, k as ResponseOutputItemDoneEvent, l as ResponseOutputTextDeltaEvent, m as ResponseOutputTextDoneEvent, n as ResponseUsage, S as SSEStreamStartData, T as TokenBudgetContext, U as UserInputRequestEvent, o as UserMessageEvent } from './sse-types-BbR7JG5o.js';
|
|
3
3
|
export { CallPeer, LoginProfile } from '@arbidocs/client';
|
package/dist/browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createArbiClient, base64ToBytes, unwrapWorkspaceKey, sealKeyForSession, buildWebSocketUrl, createAuthMessage, parseServerMessage, isMessageType, createContentHash, encryptFile, initSodium, encryptionKeypairFromSigningKey, sealedBoxDecrypt, bytesToBase64, encryptWithChatKey, decryptWithChatKey, decryptFile, deriveDirectChatKey, openSealedChatKey, generateChatKey, sealChatKey, sealCallKey, encryptMessage, decodeSecureMailKey, openSecureMail, secureMailClaim, createSessionManager, authRequestError, changePassword, openCallKeyOf, decryptCallTitle, generateCallKey, encryptCallTitle, sealCallKeyForPeers, openSealedCallKey, readSessionClaims } from '@arbidocs/client';
|
|
1
|
+
import { createArbiClient, base64ToBytes, unwrapWorkspaceKey, sealKeyForSession, buildWebSocketUrl, createAuthMessage, parseServerMessage, isMessageType, createContentHash, encryptFile, initSodium, encryptionKeypairFromSigningKey, sealedBoxDecrypt, bytesToBase64, encryptWithChatKey, decryptWithChatKey, decryptFile, deriveDirectChatKey, openSealedChatKey, generateChatKey, sealChatKey, sealCallKey, encryptMessage, decodeSecureMailKey, openSecureMail, secureMailClaim, createSessionManager, authRequestError, changePassword, openCallKeyOf, decryptCallTitle, generateCallKey, encryptCallTitle, sealCallKeyForPeers, openSealedCallKey, readSessionClaims, isAbortError } from '@arbidocs/client';
|
|
2
2
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -4216,9 +4216,11 @@ var WebSocketAuthError = class extends Error {
|
|
|
4216
4216
|
this.name = "WebSocketAuthError";
|
|
4217
4217
|
}
|
|
4218
4218
|
};
|
|
4219
|
+
var wsAborted = () => new DOMException("The connection was aborted.", "AbortError");
|
|
4219
4220
|
function connectWebSocket(options) {
|
|
4220
|
-
const { baseUrl, accessToken, onMessage, onClose, onAuthenticated } = options;
|
|
4221
|
+
const { baseUrl, accessToken, onMessage, onClose, onAuthenticated, signal } = options;
|
|
4221
4222
|
const url = buildWebSocketUrl(baseUrl);
|
|
4223
|
+
if (signal?.aborted) return Promise.reject(wsAborted());
|
|
4222
4224
|
return new Promise((resolve, reject) => {
|
|
4223
4225
|
const ws = new WebSocket(url);
|
|
4224
4226
|
let authenticated = false;
|
|
@@ -4228,6 +4230,15 @@ function connectWebSocket(options) {
|
|
|
4228
4230
|
reject(new Error("WebSocket auth timed out"));
|
|
4229
4231
|
}
|
|
4230
4232
|
}, AUTH_TIMEOUT_MS);
|
|
4233
|
+
signal?.addEventListener(
|
|
4234
|
+
"abort",
|
|
4235
|
+
() => {
|
|
4236
|
+
clearTimeout(timeout);
|
|
4237
|
+
ws.close();
|
|
4238
|
+
reject(wsAborted());
|
|
4239
|
+
},
|
|
4240
|
+
{ once: true }
|
|
4241
|
+
);
|
|
4231
4242
|
ws.addEventListener("open", () => {
|
|
4232
4243
|
ws.send(createAuthMessage(accessToken));
|
|
4233
4244
|
});
|
|
@@ -4277,7 +4288,8 @@ async function connectWithReconnect(options) {
|
|
|
4277
4288
|
onAuthenticated,
|
|
4278
4289
|
shouldReconnect,
|
|
4279
4290
|
baseUrl,
|
|
4280
|
-
accessToken
|
|
4291
|
+
accessToken,
|
|
4292
|
+
signal
|
|
4281
4293
|
} = options;
|
|
4282
4294
|
const resolveToken = getAccessToken ?? (() => accessToken);
|
|
4283
4295
|
let closed = false;
|
|
@@ -4289,6 +4301,7 @@ async function connectWithReconnect(options) {
|
|
|
4289
4301
|
return connectWebSocket({
|
|
4290
4302
|
baseUrl,
|
|
4291
4303
|
accessToken: token,
|
|
4304
|
+
signal,
|
|
4292
4305
|
onMessage,
|
|
4293
4306
|
onAuthenticated,
|
|
4294
4307
|
onClose: (code, reason) => {
|
|
@@ -4325,22 +4338,28 @@ async function connectWithReconnect(options) {
|
|
|
4325
4338
|
}
|
|
4326
4339
|
if (!closed) onReconnectFailed?.();
|
|
4327
4340
|
};
|
|
4341
|
+
const close = () => {
|
|
4342
|
+
closed = true;
|
|
4343
|
+
cancelDelay?.();
|
|
4344
|
+
currentConnection?.close();
|
|
4345
|
+
currentConnection = null;
|
|
4346
|
+
};
|
|
4347
|
+
if (signal?.aborted) throw wsAborted();
|
|
4348
|
+
signal?.addEventListener("abort", close, { once: true });
|
|
4328
4349
|
try {
|
|
4329
4350
|
currentConnection = await connectOnce();
|
|
4330
4351
|
} catch (err) {
|
|
4352
|
+
if (closed) throw wsAborted();
|
|
4331
4353
|
if (!(err instanceof WebSocketAuthError) || !refreshAuth) throw err;
|
|
4332
4354
|
await refreshAuth().catch(() => {
|
|
4333
4355
|
});
|
|
4334
4356
|
currentConnection = await connectOnce();
|
|
4335
4357
|
}
|
|
4336
|
-
|
|
4337
|
-
close
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
currentConnection = null;
|
|
4342
|
-
}
|
|
4343
|
-
};
|
|
4358
|
+
if (closed) {
|
|
4359
|
+
close();
|
|
4360
|
+
throw wsAborted();
|
|
4361
|
+
}
|
|
4362
|
+
return { close };
|
|
4344
4363
|
}
|
|
4345
4364
|
|
|
4346
4365
|
// src/citations.ts
|
|
@@ -10030,6 +10049,10 @@ var WorkspaceOpenIntent = class {
|
|
|
10030
10049
|
workspaceId;
|
|
10031
10050
|
result = null;
|
|
10032
10051
|
};
|
|
10052
|
+
function keyLookupFailed(error) {
|
|
10053
|
+
if (isAbortError(error)) throw error;
|
|
10054
|
+
throw new ArbiError(error instanceof Error ? error.message : String(error));
|
|
10055
|
+
}
|
|
10033
10056
|
var Arbi = class {
|
|
10034
10057
|
client = null;
|
|
10035
10058
|
loginResult = null;
|
|
@@ -10042,6 +10065,7 @@ var Arbi = class {
|
|
|
10042
10065
|
/** The chat keys I hold, opened once per set of epochs (`chatRingSignature`). */
|
|
10043
10066
|
chatRings = /* @__PURE__ */ new Map();
|
|
10044
10067
|
sessionExpiredListeners = /* @__PURE__ */ new Set();
|
|
10068
|
+
signingOutListeners = /* @__PURE__ */ new Set();
|
|
10045
10069
|
signedInListeners = /* @__PURE__ */ new Set();
|
|
10046
10070
|
/** The client is this instance's own (`init`), not a host's (`options.session`). */
|
|
10047
10071
|
ownsClient = false;
|
|
@@ -10081,6 +10105,9 @@ var Arbi = class {
|
|
|
10081
10105
|
});
|
|
10082
10106
|
this.ownsClient = true;
|
|
10083
10107
|
this.client.auth.onSessionExpired(() => this.expireSession());
|
|
10108
|
+
this.client.auth.onSigningOut(() => {
|
|
10109
|
+
for (const listener of [...this.signingOutListeners]) listener();
|
|
10110
|
+
});
|
|
10084
10111
|
await this.client.crypto.initSodium();
|
|
10085
10112
|
return this.client;
|
|
10086
10113
|
}
|
|
@@ -10222,9 +10249,7 @@ var Arbi = class {
|
|
|
10222
10249
|
if (!key) throw new ArbiError(`Workspace ${workspaceId} not found or has no encryption key`);
|
|
10223
10250
|
return key;
|
|
10224
10251
|
};
|
|
10225
|
-
const { wrappedKey, fromCache } = await keys.wrappedKey(workspaceId).catch(
|
|
10226
|
-
throw new ArbiError(error instanceof Error ? error.message : String(error));
|
|
10227
|
-
});
|
|
10252
|
+
const { wrappedKey, fromCache } = await keys.wrappedKey(workspaceId).catch(keyLookupFailed);
|
|
10228
10253
|
try {
|
|
10229
10254
|
return await withKey(required(wrappedKey));
|
|
10230
10255
|
} catch (error) {
|
|
@@ -10314,9 +10339,7 @@ var Arbi = class {
|
|
|
10314
10339
|
}),
|
|
10315
10340
|
`Failed to open workspace ${workspaceId}`
|
|
10316
10341
|
);
|
|
10317
|
-
const listed = await client.workspaceKeys.wrappedKey(workspaceId).catch(
|
|
10318
|
-
throw new ArbiError(error instanceof Error ? error.message : String(error));
|
|
10319
|
-
});
|
|
10342
|
+
const listed = await client.workspaceKeys.wrappedKey(workspaceId).catch(keyLookupFailed);
|
|
10320
10343
|
if (!listed.wrappedKey) return open("");
|
|
10321
10344
|
return this.withWrappedKey(
|
|
10322
10345
|
workspaceId,
|
|
@@ -10364,6 +10387,18 @@ var Arbi = class {
|
|
|
10364
10387
|
this.sessionExpiredListeners.add(listener);
|
|
10365
10388
|
return () => this.sessionExpiredListeners.delete(listener);
|
|
10366
10389
|
}
|
|
10390
|
+
/**
|
|
10391
|
+
* Subscribe to "the session is ending": `logout` has begun. Called once nothing new can start on
|
|
10392
|
+
* the session (no request, no re-login, no workspace open) and before what is in flight is
|
|
10393
|
+
* aborted and the server revokes the token: stop the host's own work on it there (cancel its
|
|
10394
|
+
* queries, close its socket). Returns an unsubscribe. On a host's session it is the host
|
|
10395
|
+
* client's.
|
|
10396
|
+
*/
|
|
10397
|
+
onSigningOut(listener) {
|
|
10398
|
+
if (this.client && !this.ownsClient) return this.client.auth.onSigningOut(listener);
|
|
10399
|
+
this.signingOutListeners.add(listener);
|
|
10400
|
+
return () => this.signingOutListeners.delete(listener);
|
|
10401
|
+
}
|
|
10367
10402
|
expireSession() {
|
|
10368
10403
|
if (this.loginResult) {
|
|
10369
10404
|
this.loginResult.signingPrivateKey.fill(0);
|
|
@@ -10395,6 +10430,7 @@ var Arbi = class {
|
|
|
10395
10430
|
const unauthorised = /\b401\b|token has expired/i.test(message);
|
|
10396
10431
|
if (!(error instanceof ArbiApiError) || !(noWorkspace || unauthorised)) throw error;
|
|
10397
10432
|
const client = this.requireClient();
|
|
10433
|
+
if (client.auth.isSigningOut()) throw error;
|
|
10398
10434
|
const recovered = noWorkspace && await client.auth.reopenWorkspace() || await client.auth.relogin() !== null;
|
|
10399
10435
|
if (!recovered) throw new ArbiSessionExpiredError();
|
|
10400
10436
|
return run();
|
|
@@ -10405,9 +10441,11 @@ var Arbi = class {
|
|
|
10405
10441
|
for (const listener of [...this.profileListeners]) listener(profile);
|
|
10406
10442
|
}
|
|
10407
10443
|
/**
|
|
10408
|
-
* Sign out: the
|
|
10409
|
-
*
|
|
10410
|
-
*
|
|
10444
|
+
* Sign out: first the session's work stops (nothing new starts, `onSigningOut` listeners run,
|
|
10445
|
+
* requests in flight are aborted), then the server session ends (every session of the user with
|
|
10446
|
+
* `everywhere`), the session state is cleared and, with `everywhere`, so are the keys kept on this
|
|
10447
|
+
* device (a single sign-out keeps them for an offline unlock). Then this instance's own state is
|
|
10448
|
+
* cleared.
|
|
10411
10449
|
*/
|
|
10412
10450
|
async logout(options = {}) {
|
|
10413
10451
|
if (this.client) {
|
|
@@ -10454,12 +10492,13 @@ var Arbi = class {
|
|
|
10454
10492
|
* Reads the access token from the session on each call, so a token refreshed
|
|
10455
10493
|
* elsewhere is reflected on the next (re)connect. Returns `null` when there is
|
|
10456
10494
|
* no client/token yet (not logged in) rather than throwing, so callers can
|
|
10457
|
-
* poll for readiness instead of guarding against exceptions.
|
|
10495
|
+
* poll for readiness instead of guarding against exceptions. `signal` is the
|
|
10496
|
+
* session's: aborted when a sign-out begins, so the transport closes with it.
|
|
10458
10497
|
*/
|
|
10459
10498
|
getConnectionInfo() {
|
|
10460
10499
|
const accessToken = this.client?.session.getState().accessToken;
|
|
10461
|
-
if (!accessToken) return null;
|
|
10462
|
-
return { baseUrl: this.options.url, accessToken };
|
|
10500
|
+
if (!this.client || !accessToken) return null;
|
|
10501
|
+
return { baseUrl: this.options.url, accessToken, signal: this.client.auth.sessionSignal() };
|
|
10463
10502
|
}
|
|
10464
10503
|
/**
|
|
10465
10504
|
* Re-login silently and resolve the fresh access token (`null` when the session could not be
|