@arbidocs/sdk 0.5.4 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as ConfigStore, Y as CliConfig, Z as CliCredentials, V as ChatSession, bZ as SkippedFile, cL as UploadResult, p as AuthHeaders, cF as UploadBatchResult, cJ as UploadOptions, cG as UploadDirectOptions, cH as UploadDirectResult, bS as SUPPORTED_EXTENSIONS, b0 as MailAttachment, N as ChatCryptoContext } from './browser-CuA9Q2NR.cjs';
2
- 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, i as ArbiSessionExpiredError, j as ArbiWorkspaceChangedError, k as ArbiWorkspaceSupersededError, l as AskHandlers, m as AskRequest, n as AttendeeRead, o as AuthContext, 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, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessage, T as ChatMessageResponse, U as ChatResponse, W as CitationSummary, X as CitationToolSources, _ as CommandDescriptor, 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, ac as CreateWorkRequest, ad as CreateWorkflowRequest, ae as DEFAULT_AI_USD_PER_GBP, af as DOC_TERMINAL_STATUSES, ag as DRIVE_SYNC_VENDORS, ah as DateTimeSpec, ai as DecryptedChat, aj as DecryptedChatMessage, ak as DeploymentHouseTemplate, al as DocInfo, am as DocInfoMap, an as DocNameMap, ao as DocumentAutomationAction, ap as DocumentListFields, aq as DocumentListOrder, ar as DocumentSelector, as as DocumentWaiter, at as DocumentWaiterOptions, au as DriveSyncProgress, av as DriveSyncSummary, aw as DuplicateContactError, ax as ENTITY_KINDS, ay as EditScope, az as EntityKind, aA as EventCreateBody, aB as EventPatchBody, aC as FLAT_TAG_KINDS, aG as FindTimeParams, aH as FormattedWsMessage, aI as FreeBusyEntry, aJ as FullContextSelection, aK as GOOGLE_VENDORS, aL as HolidayCountry, aM as HouseTemplateCandidate, aN as IMANAGE_VENDORS, aO as IdentityErrorCode, aP as IdentityPurchase, aQ as IdentityState, aR as IdentityStatus, aS as ImportResult, aT as InvitationRead, aU as LinkedRun, aV as ListAllOptions, aW as ListEventsParams, aY as ListPaginatedOptions, aZ as MAILBOX_SYNC_VENDORS, a_ as MAX_RETRIEVE_DOC_IDS, a$ as MICROSOFT_VENDORS, b1 as MessageLevel, b2 as OAuthAccountKind, b3 as OutputItemDone, b4 as OverlayItem, b5 as OverlayLayerName, b6 as PRESENCE_KINDS, b7 as PROMPT_CONTEXT_CHARS, b8 as ParsedSlashCommand, b9 as PendingAuthResponse, ba as PersonKey, bb as PlanStepsError, bc as PlanWorkRequest, bd as ProductResponse, be as ProjectAddonKind, bf as ProjectAddonSettingsRequest, bg as ProjectBudget, bh as ProjectCheckoutRequest, bi as ProjectConversationUsageResponse, bj as ProjectCreateOptions, bk as ProjectDetails, bl as ProjectEventKind, bm as ProjectEventResponse, bn as ProjectInvoicesResponse, bo as ProjectNextPeriodAddonsRequest, bp as ProjectPlanChangeRequest, bq as ProjectQuoteRequest, br as ProjectResponse, bs as ProjectUpdateRequest, bt as ProjectUsageResponse, bu as PublicBookingError, bv as PublicBookingPage, bw as QuotaExceeded, bx as RaisedSignal, by as ReconnectOptions, bz as ReconnectableWsConnection, bA as ResolvedCitation, bB as ResolvedRecipient, bC as RespondParams, bD as RespondPartstat, bE as RoomCreateBody, bF as RoomQuery, bG as RoomRead, bH as RunProgress, bI as RunStats, bJ as RunStep, bK as RunWaitingOn, bL as SHAREPOINT_VENDORS, bM as SSEEvent, bN as SSEStreamCallbacks, bO as SSEStreamResult, bP as STEP_FIELD_OPTION_TONES, bQ as STOP_ID_WAIT_MS, bR as STOP_REPEAT_WINDOW_MS, bT as ScopedTarget, bU as SearchChunk, bV as SendBack, bW as ShareRead, bX as ShareRole, bY as SkillSummary, b_ as SlackConnectionStatus, b$ as StepActionRequest, c0 as StepActivityEvent, c1 as StepAssignee, c2 as StepDisplay, c3 as StepField, c4 as StepFieldOption, c5 as StepFieldOptionTone, c6 as StepKind, c7 as StepPhase, c8 as StepSignal, c9 as StepSignalWhen, ca as StepState, cb as StepStatus, cc as SubagentBranchRecord, cd as SubagentLaneInfo, ce as SubmitBackgroundQueryOptions, cf as SubscribeParams, cg as SyncTriggerResult, ch as TAG_KINDS, ci as TAG_NESTING_MAX_DEPTH, cj as TagChange, ck as TagFieldDefinition, cl as TagGroup, cm as TagKind, cn as TagKindField, co as TagKindSchema, cp as TagLinks, cq as TagListQuery, cr as TagNode, cs as TagResponse, ct as TagScope, cu as TagTreeRow, cv as TaskPlan, cw as TaskPlanStep, cx as TaxQuoteResponse, cy as Thread, cz as ThreadsResponse, cA as TimeSuggestion, cB as TurnRequest, cC as UpdateConversationRequest, cE as UpdateWorkflowRequest, cI as UploadDocumentsOptions, cK as UploadProgressListener, cM as UsageBreakdown, cN as UserConnectorEntry, cO as UserDailyUsageResponse, cP as UserInfo, cQ as WebSocketAuthError, cR as WeeklyHoursSpec, cS as WorkStatus, cT as WorkflowAuthMode, cU as WorkflowResponse, cV as WorkflowRunHistoryResponse, cW as WorkflowRunResponse, cX as WorkspaceContext, cY as WorkspaceOpenResponse, cZ as WsConnection, c_ as account, c$ as agentconfig, d0 as agents, d1 as appendTranscriptionHints, d2 as assistant, d3 as authenticatedFetch, d4 as bookPublicSlot, d5 as buildCitationChunkData, d6 as buildDocNameMap, d7 as buildDocumentTools, d8 as buildFactsContextTool, d9 as buildRetrievalChunkTool, da as buildRetrievalFullContextTool, db as buildRetrievalTocTool, dc as buildTurnRequest, dd as calendar, de as calls, df as canTagHaveParent, dg as cancelPublicBooking, dh as chats, di as computeRunStats, dj as connectErrorMessage, dk as connectWebSocket, dl as connectWithReconnect, dm as connectors, dn as consumeSSEStream, dp as contacts, dq as continuityPrompt, dr as conversations, ds as countCitations, dt as createAuthenticatedClient, du as createDocumentWaiter, dv as createIndexAssigner, dw as defaultKindForFormat, dx as doctags, dy as documents, dz as estimateDraftTokens, dA as extractDocumentIdsFromMessages, dB as extractFactIdsFromMessages, dC as extractSubagentLanes, dD as facts, dE as files, dF as filterDocumentTags, dG as filterSkills, dH as findLeafForTaskMessage, dI as findMainSiblingLeaf, dJ as findReplyTarget, dK as findSubagentRunId, dL as flattenTagTree, dM as formatAgentStepLabel, dN as formatFileSize, dO as formatGbp, dP as formatGbpPerMillionTokens, dQ as formatItemLabel, dR as formatStreamSummary, dS as formatTokens, dT as formatUserName, dU as formatWorkspaceChoices, dV as formatWsMessage, dW as generateEncryptedWorkspaceKey, dX as generateNewWorkspaceKey, dY as getAgentStepLabel, dZ as getAttachableRunId, d_ as getChildTags, d$ as getContextRemainingPercent, e0 as getContextUsedPercent, e1 as getContextUsedTokens, e2 as getCurrentStep, e3 as getEligibleParentTags, e4 as getErrorCode, e5 as getErrorMessage, e6 as getPublicBookingPage, e7 as getRawWorkspaceKey, e8 as getRunToAttach, e9 as getRunToCancel, ea as getStepDisplay, eb as getStepTool, ec as getSubagentBranchRecord, ed as getTagDescendantIds, ee as health, ef as houseTemplates, eg as hydrateAgentSteps, ei as identityErrorCode, eh as identityVerification, ej as isAnnotationTag, ek as isConnectorVendorVisible, el as isDriveSyncVendor, em as isEntityTag, en as isFlatKind, eo as isLabelTag, ep as isMailboxSyncVendor, eq as isNearAiUsageBudget, er as isPresenceTag, es as isSharePointVendor, et as isSharedSkill, eu as isTraceItem, ev as mail, ew as mergeAgentSteps, ex as notifications, ey as parseSSEEvents, ez as parseSlashCommand, eA as parseSlashTokenInProgress, eB as performPasswordLogin, eC as performSigningKeyLogin, eD as performSsoDeviceFlowLogin, eE as pickMainThread, eF as profile, eG as progressFetch, eH as projects, eI as quotaExceededFrom, eJ as quotaFromStreamError, eK as reduceOutputItem, eL as refusalReason, eM as requireData, eN as requireOk, eO as resolveAuth, eP as resolveCitations, eQ as resolveSummary, eR as resolveWorkspace, eS as responses, eT as searchChunks, eU as selectFullContextDocument, eV as selectWorkspace, eW as selectWorkspaceById, eX as sessions, eY as settings, eZ as signatureRequests, e_ as sliceToSubagentThread, e$ as streamSSE, f0 as stripCitationMarkdown, f1 as subagentJobLabel, f2 as summarizeCitations, f3 as tagUseCount, f4 as tags, f5 as tagsForScope, f6 as tagsOfGroup, f7 as topLevelAgentSteps, f8 as uploadSkill, f9 as usdToGbp, fa as work, fb as workflowSteps, fc as workflows, fd as workspaces, fe as wouldCreateTagCycle } from './browser-CuA9Q2NR.cjs';
1
+ import { $ as ConfigStore, Y as CliConfig, Z as CliCredentials, V as ChatSession, bZ as SkippedFile, cL as UploadResult, p as AuthHeaders, cF as UploadBatchResult, cJ as UploadOptions, cG as UploadDirectOptions, cH as UploadDirectResult, bS as SUPPORTED_EXTENSIONS, b0 as MailAttachment, N as ChatCryptoContext } from './browser-DMZ4mU6Z.cjs';
2
+ 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, i as ArbiSessionExpiredError, j as ArbiWorkspaceChangedError, k as ArbiWorkspaceSupersededError, l as AskHandlers, m as AskRequest, n as AttendeeRead, o as AuthContext, 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, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessage, T as ChatMessageResponse, U as ChatResponse, W as CitationSummary, X as CitationToolSources, _ as CommandDescriptor, 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, ac as CreateWorkRequest, ad as CreateWorkflowRequest, ae as DEFAULT_AI_USD_PER_GBP, af as DOC_TERMINAL_STATUSES, ag as DRIVE_SYNC_VENDORS, ah as DateTimeSpec, ai as DecryptedChat, aj as DecryptedChatMessage, ak as DeploymentHouseTemplate, al as DocInfo, am as DocInfoMap, an as DocNameMap, ao as DocumentAutomationAction, ap as DocumentListFields, aq as DocumentListOrder, ar as DocumentSelector, as as DocumentWaiter, at as DocumentWaiterOptions, au as DriveSyncProgress, av as DriveSyncSummary, aw as DuplicateContactError, ax as ENTITY_KINDS, ay as EditScope, az as EntityKind, aA as EventCreateBody, aB as EventPatchBody, aC as FLAT_TAG_KINDS, aG as FindTimeParams, aH as FormattedWsMessage, aI as FreeBusyEntry, aJ as FullContextSelection, aK as GOOGLE_VENDORS, aL as HolidayCountry, aM as HouseTemplateCandidate, aN as IMANAGE_VENDORS, aO as IdentityErrorCode, aP as IdentityPurchase, aQ as IdentityState, aR as IdentityStatus, aS as ImportResult, aT as InvitationRead, aU as LinkedRun, aV as ListAllOptions, aW as ListEventsParams, aY as ListPaginatedOptions, aZ as MAILBOX_SYNC_VENDORS, a_ as MAX_RETRIEVE_DOC_IDS, a$ as MICROSOFT_VENDORS, b1 as MessageLevel, b2 as OAuthAccountKind, b3 as OutputItemDone, b4 as OverlayItem, b5 as OverlayLayerName, b6 as PRESENCE_KINDS, b7 as PROMPT_CONTEXT_CHARS, b8 as ParsedSlashCommand, b9 as PendingAuthResponse, ba as PersonKey, bb as PlanStepsError, bc as PlanWorkRequest, bd as ProductResponse, be as ProjectAddonKind, bf as ProjectAddonSettingsRequest, bg as ProjectBudget, bh as ProjectCheckoutRequest, bi as ProjectConversationUsageResponse, bj as ProjectCreateOptions, bk as ProjectDetails, bl as ProjectEventKind, bm as ProjectEventResponse, bn as ProjectInvoicesResponse, bo as ProjectNextPeriodAddonsRequest, bp as ProjectPlanChangeRequest, bq as ProjectQuoteRequest, br as ProjectResponse, bs as ProjectUpdateRequest, bt as ProjectUsageResponse, bu as PublicBookingError, bv as PublicBookingPage, bw as QuotaExceeded, bx as RaisedSignal, by as ReconnectOptions, bz as ReconnectableWsConnection, bA as ResolvedCitation, bB as ResolvedRecipient, bC as RespondParams, bD as RespondPartstat, bE as RoomCreateBody, bF as RoomQuery, bG as RoomRead, bH as RunProgress, bI as RunStats, bJ as RunStep, bK as RunWaitingOn, bL as SHAREPOINT_VENDORS, bM as SSEEvent, bN as SSEStreamCallbacks, bO as SSEStreamResult, bP as STEP_FIELD_OPTION_TONES, bQ as STOP_ID_WAIT_MS, bR as STOP_REPEAT_WINDOW_MS, bT as ScopedTarget, bU as SearchChunk, bV as SendBack, bW as ShareRead, bX as ShareRole, bY as SkillSummary, b_ as SlackConnectionStatus, b$ as StepActionRequest, c0 as StepActivityEvent, c1 as StepAssignee, c2 as StepDisplay, c3 as StepField, c4 as StepFieldOption, c5 as StepFieldOptionTone, c6 as StepKind, c7 as StepPhase, c8 as StepSignal, c9 as StepSignalWhen, ca as StepState, cb as StepStatus, cc as SubagentBranchRecord, cd as SubagentLaneInfo, ce as SubmitBackgroundQueryOptions, cf as SubscribeParams, cg as SyncTriggerResult, ch as TAG_KINDS, ci as TAG_NESTING_MAX_DEPTH, cj as TagChange, ck as TagFieldDefinition, cl as TagGroup, cm as TagKind, cn as TagKindField, co as TagKindSchema, cp as TagLinks, cq as TagListQuery, cr as TagNode, cs as TagResponse, ct as TagScope, cu as TagTreeRow, cv as TaskPlan, cw as TaskPlanStep, cx as TaxQuoteResponse, cy as Thread, cz as ThreadsResponse, cA as TimeSuggestion, cB as TurnRequest, cC as UpdateConversationRequest, cE as UpdateWorkflowRequest, cI as UploadDocumentsOptions, cK as UploadProgressListener, cM as UsageBreakdown, cN as UserConnectorEntry, cO as UserDailyUsageResponse, cP as UserInfo, cQ as WebSocketAuthError, cR as WeeklyHoursSpec, cS as WorkStatus, cT as WorkflowAuthMode, cU as WorkflowResponse, cV as WorkflowRunHistoryResponse, cW as WorkflowRunResponse, cX as WorkspaceContext, cY as WorkspaceOpenResponse, cZ as WsConnection, c_ as account, c$ as agentconfig, d0 as agents, d1 as appendTranscriptionHints, d2 as assistant, d3 as authenticatedFetch, d4 as bookPublicSlot, d5 as buildCitationChunkData, d6 as buildDocNameMap, d7 as buildDocumentTools, d8 as buildFactsContextTool, d9 as buildRetrievalChunkTool, da as buildRetrievalFullContextTool, db as buildRetrievalTocTool, dc as buildTurnRequest, dd as calendar, de as calls, df as canTagHaveParent, dg as cancelPublicBooking, dh as chats, di as computeRunStats, dj as connectErrorMessage, dk as connectWebSocket, dl as connectWithReconnect, dm as connectors, dn as consumeSSEStream, dp as contacts, dq as continuityPrompt, dr as conversations, ds as countCitations, dt as createAuthenticatedClient, du as createDocumentWaiter, dv as createIndexAssigner, dw as defaultKindForFormat, dx as doctags, dy as documents, dz as estimateDraftTokens, dA as extractDocumentIdsFromMessages, dB as extractFactIdsFromMessages, dC as extractSubagentLanes, dD as facts, dE as files, dF as filterDocumentTags, dG as filterSkills, dH as findLeafForTaskMessage, dI as findMainSiblingLeaf, dJ as findReplyTarget, dK as findSubagentRunId, dL as flattenTagTree, dM as formatAgentStepLabel, dN as formatFileSize, dO as formatGbp, dP as formatGbpPerMillionTokens, dQ as formatItemLabel, dR as formatStreamSummary, dS as formatTokens, dT as formatUserName, dU as formatWorkspaceChoices, dV as formatWsMessage, dW as generateEncryptedWorkspaceKey, dX as generateNewWorkspaceKey, dY as getAgentStepLabel, dZ as getAttachableRunId, d_ as getChildTags, d$ as getContextRemainingPercent, e0 as getContextUsedPercent, e1 as getContextUsedTokens, e2 as getCurrentStep, e3 as getEligibleParentTags, e4 as getErrorCode, e5 as getErrorMessage, e6 as getPublicBookingPage, e7 as getRawWorkspaceKey, e8 as getRunToAttach, e9 as getRunToCancel, ea as getStepDisplay, eb as getStepTool, ec as getSubagentBranchRecord, ed as getTagDescendantIds, ee as health, ef as houseTemplates, eg as hydrateAgentSteps, ei as identityErrorCode, eh as identityVerification, ej as isAnnotationTag, ek as isConnectorVendorVisible, el as isDriveSyncVendor, em as isEntityTag, en as isFlatKind, eo as isLabelTag, ep as isMailboxSyncVendor, eq as isNearAiUsageBudget, er as isPresenceTag, es as isSharePointVendor, et as isSharedSkill, eu as isTraceItem, ev as mail, ew as mergeAgentSteps, ex as notifications, ey as parseSSEEvents, ez as parseSlashCommand, eA as parseSlashTokenInProgress, eB as performPasswordLogin, eC as performSigningKeyLogin, eD as performSsoDeviceFlowLogin, eE as pickMainThread, eF as profile, eG as progressFetch, eH as projects, eI as quotaExceededFrom, eJ as quotaFromStreamError, eK as reduceOutputItem, eL as refusalReason, eM as requireData, eN as requireOk, eO as resolveAuth, eP as resolveCitations, eQ as resolveSummary, eR as resolveWorkspace, eS as responses, eT as searchChunks, eU as selectFullContextDocument, eV as selectWorkspace, eW as selectWorkspaceById, eX as sessions, eY as settings, eZ as signatureRequests, e_ as sliceToSubagentThread, e$ as streamSSE, f0 as stripCitationMarkdown, f1 as subagentJobLabel, f2 as summarizeCitations, f3 as tagUseCount, f4 as tags, f5 as tagsForScope, f6 as tagsOfGroup, f7 as topLevelAgentSteps, f8 as uploadSkill, f9 as usdToGbp, fa as work, fb as workflowSteps, fc as workflows, fd as workspaces, fe as wouldCreateTagCycle } from './browser-DMZ4mU6Z.cjs';
3
3
  import { SessionPersistence, ArbiClient, components } from '@arbidocs/client';
4
4
  export { CallPeer, LoginProfile } from '@arbidocs/client';
5
5
  export { b as AgentStepEvent, d as ArtifactEvent, M as MailDraftSSEEvent, e as MessageMetadataPayload, f as MessageQueuedEvent, O as OutputTokensDetails, 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';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as ConfigStore, Y as CliConfig, Z as CliCredentials, V as ChatSession, bZ as SkippedFile, cL as UploadResult, p as AuthHeaders, cF as UploadBatchResult, cJ as UploadOptions, cG as UploadDirectOptions, cH as UploadDirectResult, bS as SUPPORTED_EXTENSIONS, b0 as MailAttachment, N as ChatCryptoContext } from './browser-D2XBFIcc.js';
2
- 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, i as ArbiSessionExpiredError, j as ArbiWorkspaceChangedError, k as ArbiWorkspaceSupersededError, l as AskHandlers, m as AskRequest, n as AttendeeRead, o as AuthContext, 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, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessage, T as ChatMessageResponse, U as ChatResponse, W as CitationSummary, X as CitationToolSources, _ as CommandDescriptor, 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, ac as CreateWorkRequest, ad as CreateWorkflowRequest, ae as DEFAULT_AI_USD_PER_GBP, af as DOC_TERMINAL_STATUSES, ag as DRIVE_SYNC_VENDORS, ah as DateTimeSpec, ai as DecryptedChat, aj as DecryptedChatMessage, ak as DeploymentHouseTemplate, al as DocInfo, am as DocInfoMap, an as DocNameMap, ao as DocumentAutomationAction, ap as DocumentListFields, aq as DocumentListOrder, ar as DocumentSelector, as as DocumentWaiter, at as DocumentWaiterOptions, au as DriveSyncProgress, av as DriveSyncSummary, aw as DuplicateContactError, ax as ENTITY_KINDS, ay as EditScope, az as EntityKind, aA as EventCreateBody, aB as EventPatchBody, aC as FLAT_TAG_KINDS, aG as FindTimeParams, aH as FormattedWsMessage, aI as FreeBusyEntry, aJ as FullContextSelection, aK as GOOGLE_VENDORS, aL as HolidayCountry, aM as HouseTemplateCandidate, aN as IMANAGE_VENDORS, aO as IdentityErrorCode, aP as IdentityPurchase, aQ as IdentityState, aR as IdentityStatus, aS as ImportResult, aT as InvitationRead, aU as LinkedRun, aV as ListAllOptions, aW as ListEventsParams, aY as ListPaginatedOptions, aZ as MAILBOX_SYNC_VENDORS, a_ as MAX_RETRIEVE_DOC_IDS, a$ as MICROSOFT_VENDORS, b1 as MessageLevel, b2 as OAuthAccountKind, b3 as OutputItemDone, b4 as OverlayItem, b5 as OverlayLayerName, b6 as PRESENCE_KINDS, b7 as PROMPT_CONTEXT_CHARS, b8 as ParsedSlashCommand, b9 as PendingAuthResponse, ba as PersonKey, bb as PlanStepsError, bc as PlanWorkRequest, bd as ProductResponse, be as ProjectAddonKind, bf as ProjectAddonSettingsRequest, bg as ProjectBudget, bh as ProjectCheckoutRequest, bi as ProjectConversationUsageResponse, bj as ProjectCreateOptions, bk as ProjectDetails, bl as ProjectEventKind, bm as ProjectEventResponse, bn as ProjectInvoicesResponse, bo as ProjectNextPeriodAddonsRequest, bp as ProjectPlanChangeRequest, bq as ProjectQuoteRequest, br as ProjectResponse, bs as ProjectUpdateRequest, bt as ProjectUsageResponse, bu as PublicBookingError, bv as PublicBookingPage, bw as QuotaExceeded, bx as RaisedSignal, by as ReconnectOptions, bz as ReconnectableWsConnection, bA as ResolvedCitation, bB as ResolvedRecipient, bC as RespondParams, bD as RespondPartstat, bE as RoomCreateBody, bF as RoomQuery, bG as RoomRead, bH as RunProgress, bI as RunStats, bJ as RunStep, bK as RunWaitingOn, bL as SHAREPOINT_VENDORS, bM as SSEEvent, bN as SSEStreamCallbacks, bO as SSEStreamResult, bP as STEP_FIELD_OPTION_TONES, bQ as STOP_ID_WAIT_MS, bR as STOP_REPEAT_WINDOW_MS, bT as ScopedTarget, bU as SearchChunk, bV as SendBack, bW as ShareRead, bX as ShareRole, bY as SkillSummary, b_ as SlackConnectionStatus, b$ as StepActionRequest, c0 as StepActivityEvent, c1 as StepAssignee, c2 as StepDisplay, c3 as StepField, c4 as StepFieldOption, c5 as StepFieldOptionTone, c6 as StepKind, c7 as StepPhase, c8 as StepSignal, c9 as StepSignalWhen, ca as StepState, cb as StepStatus, cc as SubagentBranchRecord, cd as SubagentLaneInfo, ce as SubmitBackgroundQueryOptions, cf as SubscribeParams, cg as SyncTriggerResult, ch as TAG_KINDS, ci as TAG_NESTING_MAX_DEPTH, cj as TagChange, ck as TagFieldDefinition, cl as TagGroup, cm as TagKind, cn as TagKindField, co as TagKindSchema, cp as TagLinks, cq as TagListQuery, cr as TagNode, cs as TagResponse, ct as TagScope, cu as TagTreeRow, cv as TaskPlan, cw as TaskPlanStep, cx as TaxQuoteResponse, cy as Thread, cz as ThreadsResponse, cA as TimeSuggestion, cB as TurnRequest, cC as UpdateConversationRequest, cE as UpdateWorkflowRequest, cI as UploadDocumentsOptions, cK as UploadProgressListener, cM as UsageBreakdown, cN as UserConnectorEntry, cO as UserDailyUsageResponse, cP as UserInfo, cQ as WebSocketAuthError, cR as WeeklyHoursSpec, cS as WorkStatus, cT as WorkflowAuthMode, cU as WorkflowResponse, cV as WorkflowRunHistoryResponse, cW as WorkflowRunResponse, cX as WorkspaceContext, cY as WorkspaceOpenResponse, cZ as WsConnection, c_ as account, c$ as agentconfig, d0 as agents, d1 as appendTranscriptionHints, d2 as assistant, d3 as authenticatedFetch, d4 as bookPublicSlot, d5 as buildCitationChunkData, d6 as buildDocNameMap, d7 as buildDocumentTools, d8 as buildFactsContextTool, d9 as buildRetrievalChunkTool, da as buildRetrievalFullContextTool, db as buildRetrievalTocTool, dc as buildTurnRequest, dd as calendar, de as calls, df as canTagHaveParent, dg as cancelPublicBooking, dh as chats, di as computeRunStats, dj as connectErrorMessage, dk as connectWebSocket, dl as connectWithReconnect, dm as connectors, dn as consumeSSEStream, dp as contacts, dq as continuityPrompt, dr as conversations, ds as countCitations, dt as createAuthenticatedClient, du as createDocumentWaiter, dv as createIndexAssigner, dw as defaultKindForFormat, dx as doctags, dy as documents, dz as estimateDraftTokens, dA as extractDocumentIdsFromMessages, dB as extractFactIdsFromMessages, dC as extractSubagentLanes, dD as facts, dE as files, dF as filterDocumentTags, dG as filterSkills, dH as findLeafForTaskMessage, dI as findMainSiblingLeaf, dJ as findReplyTarget, dK as findSubagentRunId, dL as flattenTagTree, dM as formatAgentStepLabel, dN as formatFileSize, dO as formatGbp, dP as formatGbpPerMillionTokens, dQ as formatItemLabel, dR as formatStreamSummary, dS as formatTokens, dT as formatUserName, dU as formatWorkspaceChoices, dV as formatWsMessage, dW as generateEncryptedWorkspaceKey, dX as generateNewWorkspaceKey, dY as getAgentStepLabel, dZ as getAttachableRunId, d_ as getChildTags, d$ as getContextRemainingPercent, e0 as getContextUsedPercent, e1 as getContextUsedTokens, e2 as getCurrentStep, e3 as getEligibleParentTags, e4 as getErrorCode, e5 as getErrorMessage, e6 as getPublicBookingPage, e7 as getRawWorkspaceKey, e8 as getRunToAttach, e9 as getRunToCancel, ea as getStepDisplay, eb as getStepTool, ec as getSubagentBranchRecord, ed as getTagDescendantIds, ee as health, ef as houseTemplates, eg as hydrateAgentSteps, ei as identityErrorCode, eh as identityVerification, ej as isAnnotationTag, ek as isConnectorVendorVisible, el as isDriveSyncVendor, em as isEntityTag, en as isFlatKind, eo as isLabelTag, ep as isMailboxSyncVendor, eq as isNearAiUsageBudget, er as isPresenceTag, es as isSharePointVendor, et as isSharedSkill, eu as isTraceItem, ev as mail, ew as mergeAgentSteps, ex as notifications, ey as parseSSEEvents, ez as parseSlashCommand, eA as parseSlashTokenInProgress, eB as performPasswordLogin, eC as performSigningKeyLogin, eD as performSsoDeviceFlowLogin, eE as pickMainThread, eF as profile, eG as progressFetch, eH as projects, eI as quotaExceededFrom, eJ as quotaFromStreamError, eK as reduceOutputItem, eL as refusalReason, eM as requireData, eN as requireOk, eO as resolveAuth, eP as resolveCitations, eQ as resolveSummary, eR as resolveWorkspace, eS as responses, eT as searchChunks, eU as selectFullContextDocument, eV as selectWorkspace, eW as selectWorkspaceById, eX as sessions, eY as settings, eZ as signatureRequests, e_ as sliceToSubagentThread, e$ as streamSSE, f0 as stripCitationMarkdown, f1 as subagentJobLabel, f2 as summarizeCitations, f3 as tagUseCount, f4 as tags, f5 as tagsForScope, f6 as tagsOfGroup, f7 as topLevelAgentSteps, f8 as uploadSkill, f9 as usdToGbp, fa as work, fb as workflowSteps, fc as workflows, fd as workspaces, fe as wouldCreateTagCycle } from './browser-D2XBFIcc.js';
1
+ import { $ as ConfigStore, Y as CliConfig, Z as CliCredentials, V as ChatSession, bZ as SkippedFile, cL as UploadResult, p as AuthHeaders, cF as UploadBatchResult, cJ as UploadOptions, cG as UploadDirectOptions, cH as UploadDirectResult, bS as SUPPORTED_EXTENSIONS, b0 as MailAttachment, N as ChatCryptoContext } from './browser-CvcDcKbH.js';
2
+ 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, i as ArbiSessionExpiredError, j as ArbiWorkspaceChangedError, k as ArbiWorkspaceSupersededError, l as AskHandlers, m as AskRequest, n as AttendeeRead, o as AuthContext, 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, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessage, T as ChatMessageResponse, U as ChatResponse, W as CitationSummary, X as CitationToolSources, _ as CommandDescriptor, 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, ac as CreateWorkRequest, ad as CreateWorkflowRequest, ae as DEFAULT_AI_USD_PER_GBP, af as DOC_TERMINAL_STATUSES, ag as DRIVE_SYNC_VENDORS, ah as DateTimeSpec, ai as DecryptedChat, aj as DecryptedChatMessage, ak as DeploymentHouseTemplate, al as DocInfo, am as DocInfoMap, an as DocNameMap, ao as DocumentAutomationAction, ap as DocumentListFields, aq as DocumentListOrder, ar as DocumentSelector, as as DocumentWaiter, at as DocumentWaiterOptions, au as DriveSyncProgress, av as DriveSyncSummary, aw as DuplicateContactError, ax as ENTITY_KINDS, ay as EditScope, az as EntityKind, aA as EventCreateBody, aB as EventPatchBody, aC as FLAT_TAG_KINDS, aG as FindTimeParams, aH as FormattedWsMessage, aI as FreeBusyEntry, aJ as FullContextSelection, aK as GOOGLE_VENDORS, aL as HolidayCountry, aM as HouseTemplateCandidate, aN as IMANAGE_VENDORS, aO as IdentityErrorCode, aP as IdentityPurchase, aQ as IdentityState, aR as IdentityStatus, aS as ImportResult, aT as InvitationRead, aU as LinkedRun, aV as ListAllOptions, aW as ListEventsParams, aY as ListPaginatedOptions, aZ as MAILBOX_SYNC_VENDORS, a_ as MAX_RETRIEVE_DOC_IDS, a$ as MICROSOFT_VENDORS, b1 as MessageLevel, b2 as OAuthAccountKind, b3 as OutputItemDone, b4 as OverlayItem, b5 as OverlayLayerName, b6 as PRESENCE_KINDS, b7 as PROMPT_CONTEXT_CHARS, b8 as ParsedSlashCommand, b9 as PendingAuthResponse, ba as PersonKey, bb as PlanStepsError, bc as PlanWorkRequest, bd as ProductResponse, be as ProjectAddonKind, bf as ProjectAddonSettingsRequest, bg as ProjectBudget, bh as ProjectCheckoutRequest, bi as ProjectConversationUsageResponse, bj as ProjectCreateOptions, bk as ProjectDetails, bl as ProjectEventKind, bm as ProjectEventResponse, bn as ProjectInvoicesResponse, bo as ProjectNextPeriodAddonsRequest, bp as ProjectPlanChangeRequest, bq as ProjectQuoteRequest, br as ProjectResponse, bs as ProjectUpdateRequest, bt as ProjectUsageResponse, bu as PublicBookingError, bv as PublicBookingPage, bw as QuotaExceeded, bx as RaisedSignal, by as ReconnectOptions, bz as ReconnectableWsConnection, bA as ResolvedCitation, bB as ResolvedRecipient, bC as RespondParams, bD as RespondPartstat, bE as RoomCreateBody, bF as RoomQuery, bG as RoomRead, bH as RunProgress, bI as RunStats, bJ as RunStep, bK as RunWaitingOn, bL as SHAREPOINT_VENDORS, bM as SSEEvent, bN as SSEStreamCallbacks, bO as SSEStreamResult, bP as STEP_FIELD_OPTION_TONES, bQ as STOP_ID_WAIT_MS, bR as STOP_REPEAT_WINDOW_MS, bT as ScopedTarget, bU as SearchChunk, bV as SendBack, bW as ShareRead, bX as ShareRole, bY as SkillSummary, b_ as SlackConnectionStatus, b$ as StepActionRequest, c0 as StepActivityEvent, c1 as StepAssignee, c2 as StepDisplay, c3 as StepField, c4 as StepFieldOption, c5 as StepFieldOptionTone, c6 as StepKind, c7 as StepPhase, c8 as StepSignal, c9 as StepSignalWhen, ca as StepState, cb as StepStatus, cc as SubagentBranchRecord, cd as SubagentLaneInfo, ce as SubmitBackgroundQueryOptions, cf as SubscribeParams, cg as SyncTriggerResult, ch as TAG_KINDS, ci as TAG_NESTING_MAX_DEPTH, cj as TagChange, ck as TagFieldDefinition, cl as TagGroup, cm as TagKind, cn as TagKindField, co as TagKindSchema, cp as TagLinks, cq as TagListQuery, cr as TagNode, cs as TagResponse, ct as TagScope, cu as TagTreeRow, cv as TaskPlan, cw as TaskPlanStep, cx as TaxQuoteResponse, cy as Thread, cz as ThreadsResponse, cA as TimeSuggestion, cB as TurnRequest, cC as UpdateConversationRequest, cE as UpdateWorkflowRequest, cI as UploadDocumentsOptions, cK as UploadProgressListener, cM as UsageBreakdown, cN as UserConnectorEntry, cO as UserDailyUsageResponse, cP as UserInfo, cQ as WebSocketAuthError, cR as WeeklyHoursSpec, cS as WorkStatus, cT as WorkflowAuthMode, cU as WorkflowResponse, cV as WorkflowRunHistoryResponse, cW as WorkflowRunResponse, cX as WorkspaceContext, cY as WorkspaceOpenResponse, cZ as WsConnection, c_ as account, c$ as agentconfig, d0 as agents, d1 as appendTranscriptionHints, d2 as assistant, d3 as authenticatedFetch, d4 as bookPublicSlot, d5 as buildCitationChunkData, d6 as buildDocNameMap, d7 as buildDocumentTools, d8 as buildFactsContextTool, d9 as buildRetrievalChunkTool, da as buildRetrievalFullContextTool, db as buildRetrievalTocTool, dc as buildTurnRequest, dd as calendar, de as calls, df as canTagHaveParent, dg as cancelPublicBooking, dh as chats, di as computeRunStats, dj as connectErrorMessage, dk as connectWebSocket, dl as connectWithReconnect, dm as connectors, dn as consumeSSEStream, dp as contacts, dq as continuityPrompt, dr as conversations, ds as countCitations, dt as createAuthenticatedClient, du as createDocumentWaiter, dv as createIndexAssigner, dw as defaultKindForFormat, dx as doctags, dy as documents, dz as estimateDraftTokens, dA as extractDocumentIdsFromMessages, dB as extractFactIdsFromMessages, dC as extractSubagentLanes, dD as facts, dE as files, dF as filterDocumentTags, dG as filterSkills, dH as findLeafForTaskMessage, dI as findMainSiblingLeaf, dJ as findReplyTarget, dK as findSubagentRunId, dL as flattenTagTree, dM as formatAgentStepLabel, dN as formatFileSize, dO as formatGbp, dP as formatGbpPerMillionTokens, dQ as formatItemLabel, dR as formatStreamSummary, dS as formatTokens, dT as formatUserName, dU as formatWorkspaceChoices, dV as formatWsMessage, dW as generateEncryptedWorkspaceKey, dX as generateNewWorkspaceKey, dY as getAgentStepLabel, dZ as getAttachableRunId, d_ as getChildTags, d$ as getContextRemainingPercent, e0 as getContextUsedPercent, e1 as getContextUsedTokens, e2 as getCurrentStep, e3 as getEligibleParentTags, e4 as getErrorCode, e5 as getErrorMessage, e6 as getPublicBookingPage, e7 as getRawWorkspaceKey, e8 as getRunToAttach, e9 as getRunToCancel, ea as getStepDisplay, eb as getStepTool, ec as getSubagentBranchRecord, ed as getTagDescendantIds, ee as health, ef as houseTemplates, eg as hydrateAgentSteps, ei as identityErrorCode, eh as identityVerification, ej as isAnnotationTag, ek as isConnectorVendorVisible, el as isDriveSyncVendor, em as isEntityTag, en as isFlatKind, eo as isLabelTag, ep as isMailboxSyncVendor, eq as isNearAiUsageBudget, er as isPresenceTag, es as isSharePointVendor, et as isSharedSkill, eu as isTraceItem, ev as mail, ew as mergeAgentSteps, ex as notifications, ey as parseSSEEvents, ez as parseSlashCommand, eA as parseSlashTokenInProgress, eB as performPasswordLogin, eC as performSigningKeyLogin, eD as performSsoDeviceFlowLogin, eE as pickMainThread, eF as profile, eG as progressFetch, eH as projects, eI as quotaExceededFrom, eJ as quotaFromStreamError, eK as reduceOutputItem, eL as refusalReason, eM as requireData, eN as requireOk, eO as resolveAuth, eP as resolveCitations, eQ as resolveSummary, eR as resolveWorkspace, eS as responses, eT as searchChunks, eU as selectFullContextDocument, eV as selectWorkspace, eW as selectWorkspaceById, eX as sessions, eY as settings, eZ as signatureRequests, e_ as sliceToSubagentThread, e$ as streamSSE, f0 as stripCitationMarkdown, f1 as subagentJobLabel, f2 as summarizeCitations, f3 as tagUseCount, f4 as tags, f5 as tagsForScope, f6 as tagsOfGroup, f7 as topLevelAgentSteps, f8 as uploadSkill, f9 as usdToGbp, fa as work, fb as workflowSteps, fc as workflows, fd as workspaces, fe as wouldCreateTagCycle } from './browser-CvcDcKbH.js';
3
3
  import { SessionPersistence, ArbiClient, components } from '@arbidocs/client';
4
4
  export { CallPeer, LoginProfile } from '@arbidocs/client';
5
5
  export { b as AgentStepEvent, d as ArtifactEvent, M as MailDraftSSEEvent, e as MessageMetadataPayload, f as MessageQueuedEvent, O as OutputTokensDetails, 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';
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import fs2, { readFileSync } from 'fs';
2
2
  import path2, { dirname, resolve } from 'path';
3
3
  import os2 from 'os';
4
- import { createArbiClient, base64ToBytes, unwrapWorkspaceKey, sealKeyForSession, buildWebSocketUrl, createAuthMessage, parseServerMessage, isMessageType, createContentHash, encryptFile, initSodium, bytesToBase64, encryptWithChatKey, decryptWithChatKey, decryptFile, encryptionKeypairFromSigningKey, deriveDirectChatKey, openSealedChatKey, generateChatKey, sealChatKey, sealCallKey, encryptMessage, sealedBoxDecrypt, decodeSecureMailKey, openSecureMail, secureMailClaim, createSessionManager, authRequestError, changePassword, openCallKeyOf, decryptCallTitle, generateCallKey, encryptCallTitle, sealCallKeyForPeers, openSealedCallKey, readSessionClaims } from '@arbidocs/client';
4
+ 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';
5
5
  import { execSync, spawn } from 'child_process';
6
6
  import { createHash } from 'crypto';
7
7
  import { fileURLToPath } from 'url';
@@ -5636,6 +5636,7 @@ __export(workspaces_exports, {
5636
5636
  createWorkspace: () => createWorkspace,
5637
5637
  deleteWorkspaces: () => deleteWorkspaces,
5638
5638
  exportWorkspaceData: () => exportWorkspaceData,
5639
+ getWorkspaceAccessStatus: () => getWorkspaceAccessStatus,
5639
5640
  getWorkspaceActivity: () => getWorkspaceActivity,
5640
5641
  getWorkspaceTransfer: () => getWorkspaceTransfer,
5641
5642
  grantTemporaryWorkspaceAccess: () => grantTemporaryWorkspaceAccess,
@@ -5836,6 +5837,14 @@ async function exportWorkspaceData(arbi, scope) {
5836
5837
  "Failed to export the workspace"
5837
5838
  );
5838
5839
  }
5840
+ async function getWorkspaceAccessStatus(arbi, workspaceId) {
5841
+ return requireData(
5842
+ await arbi.fetch.GET("/v1/workspace/{workspace_ext_id}/access-status", {
5843
+ params: { path: { workspace_ext_id: workspaceId } }
5844
+ }),
5845
+ "Could not read workspace access"
5846
+ );
5847
+ }
5839
5848
 
5840
5849
  // src/operations/conversations.ts
5841
5850
  var conversations_exports = {};
@@ -6522,6 +6531,7 @@ var contacts_exports = {};
6522
6531
  __export(contacts_exports, {
6523
6532
  createContact: () => createContact,
6524
6533
  deleteContact: () => deleteContact,
6534
+ ensureContactsUnlocked: () => ensureContactsUnlocked,
6525
6535
  groupContactsByStatus: () => groupContactsByStatus,
6526
6536
  importContacts: () => importContacts,
6527
6537
  inviteContacts: () => inviteContacts,
@@ -6530,6 +6540,42 @@ __export(contacts_exports, {
6530
6540
  searchContacts: () => searchContacts,
6531
6541
  updateContact: () => updateContact
6532
6542
  });
6543
+ var contactUnlocks = /* @__PURE__ */ new WeakMap();
6544
+ async function ensureContactsUnlocked(client, keys) {
6545
+ if (!keys) return;
6546
+ let pending = contactUnlocks.get(keys.serverSessionKey);
6547
+ if (!pending) {
6548
+ pending = unlockContacts(client, keys).catch((error) => {
6549
+ contactUnlocks.delete(keys.serverSessionKey);
6550
+ throw error;
6551
+ });
6552
+ contactUnlocks.set(keys.serverSessionKey, pending);
6553
+ }
6554
+ await pending;
6555
+ }
6556
+ async function unlockContacts(client, keys) {
6557
+ await initSodium();
6558
+ const keypair = encryptionKeypairFromSigningKey(keys.signingPrivateKey);
6559
+ try {
6560
+ const page = requireData(await client.fetch.GET("/v1/contacts/keys"), "Reading contact keys");
6561
+ const sealed = {};
6562
+ for (const [id, wrapped] of Object.entries(page.keys)) {
6563
+ const key = sealedBoxDecrypt(wrapped, keypair.secretKey);
6564
+ try {
6565
+ sealed[id] = await sealKeyForSession(key, keys.serverSessionKey);
6566
+ } finally {
6567
+ key.fill(0);
6568
+ }
6569
+ }
6570
+ if (Object.keys(sealed).length)
6571
+ requireOk(
6572
+ await client.fetch.POST("/v1/contacts/session-keys", { body: { keys: sealed } }),
6573
+ "Unlocking contacts"
6574
+ );
6575
+ } finally {
6576
+ keypair.secretKey.fill(0);
6577
+ }
6578
+ }
6533
6579
  function requireContact(result, message) {
6534
6580
  const error = result.error;
6535
6581
  if (result.response?.status === 409 && error && typeof error === "object" && "contact_id" in error)
@@ -11042,6 +11088,7 @@ var Arbi = class {
11042
11088
  }
11043
11089
  // ── Workspaces ────────────────────────────────────────────────────────
11044
11090
  workspaces = {
11091
+ accessStatus: (workspaceId) => getWorkspaceAccessStatus(this.requireClient(), workspaceId),
11045
11092
  /**
11046
11093
  * Make a workspace usable for requests that name it, WITHOUT changing the current workspace
11047
11094
  * (on the server or in the host). `removeUsers` and `documents.list` open the workspace they
@@ -11549,22 +11596,27 @@ var Arbi = class {
11549
11596
  generate: (tagIds, docIds, options) => generateDocTags(this.requireClient(), tagIds, docIds, options)
11550
11597
  };
11551
11598
  // ── Contacts ──────────────────────────────────────────────────────────
11552
- // A card is sealed under its address book's key, which the calendar key bridge carries: without
11599
+ // A card is sealed under its address book's key, which the contacts key bridge carries: without
11553
11600
  // it the server returns `card: null` and refuses card writes.
11554
11601
  contacts = {
11555
- list: () => this.withCalendarKeys((c2) => listContacts(c2)),
11602
+ list: () => this.withContactKeys((c2) => listContacts(c2)),
11556
11603
  invite: (emails) => inviteContacts(this.requireClient(), emails),
11557
- create: (body) => this.withCalendarKeys((c2) => createContact(c2, body)),
11558
- update: (contactId, card) => this.withCalendarKeys((c2) => updateContact(c2, contactId, card)),
11604
+ create: (body) => this.withContactKeys((c2) => createContact(c2, body)),
11605
+ update: (contactId, card) => this.withContactKeys((c2) => updateContact(c2, contactId, card)),
11559
11606
  /** Link a card-only contact to `email` (invites it, or links the account at once). */
11560
- link: (contactId, email, card) => this.withCalendarKeys((c2) => linkContact(c2, contactId, email, card)),
11561
- delete: (contactId) => this.withCalendarKeys((c2) => deleteContact(c2, contactId)),
11607
+ link: (contactId, email, card) => this.withContactKeys((c2) => linkContact(c2, contactId, email, card)),
11608
+ delete: (contactId) => this.withContactKeys((c2) => deleteContact(c2, contactId)),
11562
11609
  /** Import one .vcf file (Pro). */
11563
- import: (file) => this.withCalendarKeys((c2) => importContacts(c2, file)),
11564
- search: (q2) => this.withCalendarKeys((c2) => searchContacts(c2, q2)),
11610
+ import: (file) => this.withContactKeys((c2) => importContacts(c2, file)),
11611
+ search: (q2) => this.withContactKeys((c2) => searchContacts(c2, q2)),
11565
11612
  groupByStatus: groupContactsByStatus
11566
11613
  };
11567
11614
  // ── Calendar ──────────────────────────────────────────────────────────
11615
+ async withContactKeys(op) {
11616
+ const client = this.requireClient();
11617
+ await ensureContactsUnlocked(client, this.calendarKeys());
11618
+ return op(client);
11619
+ }
11568
11620
  /** The keys the calendar unlock needs; `null` before login (calendars then read as locked). */
11569
11621
  calendarKeys() {
11570
11622
  const login = this.loginResult;