@arbidocs/sdk 0.4.168 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 AskHandlers, k as AskRequest, l as AttendeeRead, m as AuthContext, n as AuthHeaders, o as AuthMode, p as AuthenticatedClient, B as BookingConfirmation, q as BookingPage, r as BookingPageWriteBody, s as BookingRequestBody, t as BridgeTokensOptions, C as CalDavConnectBody, u as CalDavProfile, v as CalendarAccount, w as CalendarAccountKind, x as CalendarCreateBody, y as CalendarEvent, z as CalendarKeys, D as CalendarRead, E as CalendarSettings, F as CalendarSettingsBody, G as CalendarUpdate, H as CalendarWindow, I as CallApiError, J as ChatAttachmentFile, K as ChatAttachmentInput, L as ChatCryptoContext, M as ChatKeyRing, N as ChatKind, O as ChatMemberKey, P as ChatMemberResponse, Q as ChatMessage, R as ChatMessageResponse, S as ChatResponse, T as ChatSession, U as CitationSummary, V as CitationToolSources, W as CliConfig, X as CliCredentials, Y as CommandDescriptor, Z as ConfigStore, _ as ConnectOptions, $ as ConnectorCatalogEntry, a0 as ConnectorFolder, a1 as ConnectorSyncProgress, a2 as ConnectorSyncStatus, a3 as ConnectorVendorKey, a4 as ConnectorVisibilitySettings, a5 as ContextUsage, a6 as ConversationResponse, a7 as ConversationUsageResponse, a8 as CreateFactRequest, a9 as CreateFactsRequest, aa as CreateWorkRequest, ab as CreateWorkflowRequest, ac as DEFAULT_AI_USD_PER_GBP, ae as DRIVE_SYNC_VENDORS, af as DateTimeSpec, ah as DecryptedChatMessage, ai as DeploymentHouseTemplate, aj as DocInfo, ak as DocInfoMap, am as DocumentAutomationAction, ap as DocumentSelector, as as DriveSyncProgress, at as DriveSyncSummary, au as DuplicateContactError, av as ENTITY_KINDS, aw as EditScope, ax as EntityKind, ay as EventCreateBody, az as EventPatchBody, aA as FLAT_TAG_KINDS, aB as FactResponse, aC as FactSearchRequest, aD as FactSearchResponse, aE as FindTimeParams, aG as FreeBusyEntry, aH as FullContextSelection, aI as GOOGLE_VENDORS, aJ as HolidayCountry, aK as HouseTemplateCandidate, aL as IMANAGE_VENDORS, aM as IdentityErrorCode, aN as IdentityPurchase, aO as IdentityState, aP as IdentityStatus, aQ as ImportResult, aR as InvitationRead, aS as LinkedRun, aU as ListEventsParams, aV as ListFactsOptions, aX as MAILBOX_SYNC_VENDORS, aY as MAX_RETRIEVE_DOC_IDS, aZ as MICROSOFT_VENDORS, b0 as OAuthAccountKind, b1 as OutputItemDone, b2 as OverlayItem, b3 as OverlayLayerName, b4 as PRESENCE_KINDS, b5 as PROMPT_CONTEXT_CHARS, b6 as ParsedSlashCommand, b7 as PendingAuthResponse, b8 as PersonKey, b9 as PlanStepsError, ba as PlanWorkRequest, bb as ProductResponse, bc as ProjectAddonKind, bd as ProjectAddonSettingsRequest, be as ProjectBudget, bf as ProjectCheckoutRequest, bg as ProjectConversationUsageResponse, bh as ProjectCreateOptions, bi as ProjectDetails, bj as ProjectEventKind, bk as ProjectEventResponse, bl as ProjectInvoicesResponse, bm as ProjectNextPeriodAddonsRequest, bn as ProjectPlanChangeRequest, bo as ProjectQuoteRequest, bp as ProjectResponse, bq as ProjectUpdateRequest, br as ProjectUsageResponse, bs as PublicBookingError, bt as PublicBookingPage, bu as QuotaExceeded, bv as RaisedSignal, bw as ReconnectOptions, bx as ReconnectableWsConnection, by as ResolvedCitation, bA as RespondParams, bB as RespondPartstat, bC as RoomCreateBody, bD as RoomQuery, bE as RoomRead, bF as RunProgress, bG as RunStats, bH as RunStep, bI as RunWaitingOn, bJ as SHAREPOINT_VENDORS, bK as SSEEvent, bL as SSEStreamCallbacks, bM as SSEStreamResult, bO as STOP_ID_WAIT_MS, bP as STOP_REPEAT_WINDOW_MS, bR as ScopedTarget, bS as SearchChunk, bT as SendBack, bU as ShareRead, bV as ShareRole, bW as SkillSummary, bX as SkippedFile, bY as SlackConnectionStatus, bZ as StepActionRequest, b_ as StepActivityEvent, b$ as StepAssignee, c0 as StepDisplay, c1 as StepField, c4 as StepKind, c5 as StepPhase, c6 as StepSignal, c7 as StepSignalWhen, c8 as StepState, c9 as StepStatus, ca as SubagentBranchRecord, cb as SubagentLaneInfo, cc as SubmitBackgroundQueryOptions, cd as SubscribeParams, ce as SyncTriggerResult, cf as TAG_KINDS, cg as TAG_NESTING_MAX_DEPTH, ch as TagChange, ci as TagFieldDefinition, cj as TagGroup, ck as TagKind, cl as TagKindField, cm as TagKindSchema, cn as TagLinks, co as TagListQuery, cp as TagNode, cq as TagResponse, cr as TagScope, cs as TagTreeRow, ct as TaskPlan, cu as TaskPlanStep, cv as TaxQuoteResponse, cw as Thread, cx as ThreadsResponse, cy as TimeSuggestion, cz as TurnRequest, cA as UpdateConversationRequest, cB as UpdateFactRequest, cC as UpdateWorkflowRequest, cG as UploadDocumentsOptions, cH as UploadOptions, cI as UploadProgressListener, cJ as UploadResult, cK as UsageBreakdown, cL as UserConnectorEntry, cM as UserDailyUsageResponse, cN as UserInfo, cO as WebSocketAuthError, cP as WeeklyHoursSpec, cQ as WorkStatus, cR as WorkflowAuthMode, cS as WorkflowResponse, cT as WorkflowRunHistoryResponse, cU as WorkflowRunResponse, cV as WorkspaceContext, cW as WorkspaceOpenResponse, cX as WsConnection, cY as account, cZ as agentconfig, c$ as appendTranscriptionHints, d0 as assistant, d1 as authenticatedFetch, d2 as bookPublicSlot, d3 as buildCitationChunkData, d5 as buildDocumentTools, d6 as buildFactsContextTool, d7 as buildRetrievalChunkTool, d8 as buildRetrievalFullContextTool, d9 as buildRetrievalTocTool, da as buildTurnRequest, db as calendar, dc as calls, dd as canTagHaveParent, de as cancelPublicBooking, df as chats, dg as computeRunStats, dh as connectErrorMessage, di as connectWebSocket, dj as connectWithReconnect, dk as connectors, dl as consumeSSEStream, dm as contacts, dn as continuityPrompt, dp as conversations, dq as countCitations, dr as createAuthenticatedClient, dt as createIndexAssigner, du as defaultKindForFormat, dv as doctags, dw as documents, dx as estimateDraftTokens, dy as extractDocumentIdsFromMessages, dz as extractFactIdsFromMessages, dA as extractSubagentLanes, dB as facts, dC as files, dD as filterDocumentTags, dE as filterSkills, dF as findLeafForTaskMessage, dG as findMainSiblingLeaf, dH as findReplyTarget, dI as findSubagentRunId, dJ as flattenTagTree, dK as formatAgentStepLabel, dL as formatFileSize, dM as formatGbp, dN as formatGbpPerMillionTokens, dO as formatItemLabel, dQ as formatTokens, dR as formatUserName, dS as formatWorkspaceChoices, dW as getAgentStepLabel, dX as getAttachableRunId, dY as getChildTags, dZ as getContextRemainingPercent, d_ as getContextUsedPercent, d$ as getContextUsedTokens, e0 as getCurrentStep, e1 as getEligibleParentTags, e3 as getErrorMessage, e4 as getPublicBookingPage, e5 as getRawWorkspaceKey, e6 as getRunToAttach, e7 as getRunToCancel, e8 as getStepDisplay, e9 as getStepTool, ea as getSubagentBranchRecord, eb as getTagDescendantIds, ec as health, ed as houseTemplates, ee as hydrateAgentSteps, eg as identityErrorCode, ef as identityVerification, eh as isAnnotationTag, ei as isConnectorVendorVisible, ej as isDriveSyncVendor, ek as isEntityTag, el as isFlatKind, em as isLabelTag, en as isMailboxSyncVendor, eo as isNearAiUsageBudget, ep as isPresenceTag, eq as isSharePointVendor, er as isSharedSkill, es as isTraceItem, et as mail, eu as mergeAgentSteps, ev as notifications, ew as parseSSEEvents, ex as parseSlashCommand, ey as parseSlashTokenInProgress, ez as performPasswordLogin, eC as pickMainThread, eD as profile, eE as progressFetch, eF as projects, eG as quotaExceededFrom, eH as quotaFromStreamError, eI as reduceOutputItem, eJ as refusalReason, eK as requireData, eL as requireOk, eM as resolveAuth, eN as resolveCitations, eO as resolveSummary, eP as resolveWorkspace, eQ as responses, eR as searchChunks, eS as selectFullContextDocument, eT as selectWorkspace, eU as selectWorkspaceById, eV as sessions, eW as settings, eY as sliceToSubagentThread, eZ as streamSSE, e_ as stripCitationMarkdown, e$ as subagentJobLabel, f0 as summarizeCitations, f1 as tagUseCount, f2 as tags, f3 as tagsForScope, f4 as tagsOfGroup, f5 as topLevelAgentSteps, f7 as usdToGbp, f8 as work, f9 as workflowSteps, fa as workflows, fb as workspaces, fc as wouldCreateTagCycle } from './browser-3s6asEn1.cjs';
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 DateTimeSpec, aj as DecryptedChatMessage, ak as DeploymentHouseTemplate, al as DocInfo, am as DocInfoMap, ao as DocumentAutomationAction, ar as DocumentSelector, 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, aD as FactResponse, aE as FactSearchRequest, aF as FactSearchResponse, aG as FindTimeParams, 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, aW as ListEventsParams, aX as ListFactsOptions, aZ as MAILBOX_SYNC_VENDORS, a_ as MAX_RETRIEVE_DOC_IDS, a$ as MICROSOFT_VENDORS, 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, 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, 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, bZ as SkippedFile, b_ as SlackConnectionStatus, b$ as StepActionRequest, c0 as StepActivityEvent, c1 as StepAssignee, c2 as StepDisplay, c3 as StepField, 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, cD as UpdateFactRequest, cE as UpdateWorkflowRequest, cI as UploadDocumentsOptions, cJ as UploadOptions, cK as UploadProgressListener, cL as UploadResult, 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, d1 as appendTranscriptionHints, d2 as assistant, d3 as authenticatedFetch, d4 as bookPublicSlot, d5 as buildCitationChunkData, 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, 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, dS as formatTokens, dT as formatUserName, dU as formatWorkspaceChoices, dY as getAgentStepLabel, dZ as getAttachableRunId, d_ as getChildTags, d$ as getContextRemainingPercent, e0 as getContextUsedPercent, e1 as getContextUsedTokens, e2 as getCurrentStep, e3 as getEligibleParentTags, 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, 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, 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, f9 as usdToGbp, fa as work, fb as workflowSteps, fc as workflows, fd as workspaces, fe as wouldCreateTagCycle } from './browser-XUJbRPTm.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 AskHandlers, k as AskRequest, l as AttendeeRead, m as AuthContext, n as AuthHeaders, o as AuthMode, p as AuthenticatedClient, B as BookingConfirmation, q as BookingPage, r as BookingPageWriteBody, s as BookingRequestBody, t as BridgeTokensOptions, C as CalDavConnectBody, u as CalDavProfile, v as CalendarAccount, w as CalendarAccountKind, x as CalendarCreateBody, y as CalendarEvent, z as CalendarKeys, D as CalendarRead, E as CalendarSettings, F as CalendarSettingsBody, G as CalendarUpdate, H as CalendarWindow, I as CallApiError, J as ChatAttachmentFile, K as ChatAttachmentInput, L as ChatCryptoContext, M as ChatKeyRing, N as ChatKind, O as ChatMemberKey, P as ChatMemberResponse, Q as ChatMessage, R as ChatMessageResponse, S as ChatResponse, T as ChatSession, U as CitationSummary, V as CitationToolSources, W as CliConfig, X as CliCredentials, Y as CommandDescriptor, Z as ConfigStore, _ as ConnectOptions, $ as ConnectorCatalogEntry, a0 as ConnectorFolder, a1 as ConnectorSyncProgress, a2 as ConnectorSyncStatus, a3 as ConnectorVendorKey, a4 as ConnectorVisibilitySettings, a5 as ContextUsage, a6 as ConversationResponse, a7 as ConversationUsageResponse, a8 as CreateFactRequest, a9 as CreateFactsRequest, aa as CreateWorkRequest, ab as CreateWorkflowRequest, ac as DEFAULT_AI_USD_PER_GBP, ae as DRIVE_SYNC_VENDORS, af as DateTimeSpec, ah as DecryptedChatMessage, ai as DeploymentHouseTemplate, aj as DocInfo, ak as DocInfoMap, am as DocumentAutomationAction, ap as DocumentSelector, as as DriveSyncProgress, at as DriveSyncSummary, au as DuplicateContactError, av as ENTITY_KINDS, aw as EditScope, ax as EntityKind, ay as EventCreateBody, az as EventPatchBody, aA as FLAT_TAG_KINDS, aB as FactResponse, aC as FactSearchRequest, aD as FactSearchResponse, aE as FindTimeParams, aG as FreeBusyEntry, aH as FullContextSelection, aI as GOOGLE_VENDORS, aJ as HolidayCountry, aK as HouseTemplateCandidate, aL as IMANAGE_VENDORS, aM as IdentityErrorCode, aN as IdentityPurchase, aO as IdentityState, aP as IdentityStatus, aQ as ImportResult, aR as InvitationRead, aS as LinkedRun, aU as ListEventsParams, aV as ListFactsOptions, aX as MAILBOX_SYNC_VENDORS, aY as MAX_RETRIEVE_DOC_IDS, aZ as MICROSOFT_VENDORS, b0 as OAuthAccountKind, b1 as OutputItemDone, b2 as OverlayItem, b3 as OverlayLayerName, b4 as PRESENCE_KINDS, b5 as PROMPT_CONTEXT_CHARS, b6 as ParsedSlashCommand, b7 as PendingAuthResponse, b8 as PersonKey, b9 as PlanStepsError, ba as PlanWorkRequest, bb as ProductResponse, bc as ProjectAddonKind, bd as ProjectAddonSettingsRequest, be as ProjectBudget, bf as ProjectCheckoutRequest, bg as ProjectConversationUsageResponse, bh as ProjectCreateOptions, bi as ProjectDetails, bj as ProjectEventKind, bk as ProjectEventResponse, bl as ProjectInvoicesResponse, bm as ProjectNextPeriodAddonsRequest, bn as ProjectPlanChangeRequest, bo as ProjectQuoteRequest, bp as ProjectResponse, bq as ProjectUpdateRequest, br as ProjectUsageResponse, bs as PublicBookingError, bt as PublicBookingPage, bu as QuotaExceeded, bv as RaisedSignal, bw as ReconnectOptions, bx as ReconnectableWsConnection, by as ResolvedCitation, bA as RespondParams, bB as RespondPartstat, bC as RoomCreateBody, bD as RoomQuery, bE as RoomRead, bF as RunProgress, bG as RunStats, bH as RunStep, bI as RunWaitingOn, bJ as SHAREPOINT_VENDORS, bK as SSEEvent, bL as SSEStreamCallbacks, bM as SSEStreamResult, bO as STOP_ID_WAIT_MS, bP as STOP_REPEAT_WINDOW_MS, bR as ScopedTarget, bS as SearchChunk, bT as SendBack, bU as ShareRead, bV as ShareRole, bW as SkillSummary, bX as SkippedFile, bY as SlackConnectionStatus, bZ as StepActionRequest, b_ as StepActivityEvent, b$ as StepAssignee, c0 as StepDisplay, c1 as StepField, c4 as StepKind, c5 as StepPhase, c6 as StepSignal, c7 as StepSignalWhen, c8 as StepState, c9 as StepStatus, ca as SubagentBranchRecord, cb as SubagentLaneInfo, cc as SubmitBackgroundQueryOptions, cd as SubscribeParams, ce as SyncTriggerResult, cf as TAG_KINDS, cg as TAG_NESTING_MAX_DEPTH, ch as TagChange, ci as TagFieldDefinition, cj as TagGroup, ck as TagKind, cl as TagKindField, cm as TagKindSchema, cn as TagLinks, co as TagListQuery, cp as TagNode, cq as TagResponse, cr as TagScope, cs as TagTreeRow, ct as TaskPlan, cu as TaskPlanStep, cv as TaxQuoteResponse, cw as Thread, cx as ThreadsResponse, cy as TimeSuggestion, cz as TurnRequest, cA as UpdateConversationRequest, cB as UpdateFactRequest, cC as UpdateWorkflowRequest, cG as UploadDocumentsOptions, cH as UploadOptions, cI as UploadProgressListener, cJ as UploadResult, cK as UsageBreakdown, cL as UserConnectorEntry, cM as UserDailyUsageResponse, cN as UserInfo, cO as WebSocketAuthError, cP as WeeklyHoursSpec, cQ as WorkStatus, cR as WorkflowAuthMode, cS as WorkflowResponse, cT as WorkflowRunHistoryResponse, cU as WorkflowRunResponse, cV as WorkspaceContext, cW as WorkspaceOpenResponse, cX as WsConnection, cY as account, cZ as agentconfig, c$ as appendTranscriptionHints, d0 as assistant, d1 as authenticatedFetch, d2 as bookPublicSlot, d3 as buildCitationChunkData, d5 as buildDocumentTools, d6 as buildFactsContextTool, d7 as buildRetrievalChunkTool, d8 as buildRetrievalFullContextTool, d9 as buildRetrievalTocTool, da as buildTurnRequest, db as calendar, dc as calls, dd as canTagHaveParent, de as cancelPublicBooking, df as chats, dg as computeRunStats, dh as connectErrorMessage, di as connectWebSocket, dj as connectWithReconnect, dk as connectors, dl as consumeSSEStream, dm as contacts, dn as continuityPrompt, dp as conversations, dq as countCitations, dr as createAuthenticatedClient, dt as createIndexAssigner, du as defaultKindForFormat, dv as doctags, dw as documents, dx as estimateDraftTokens, dy as extractDocumentIdsFromMessages, dz as extractFactIdsFromMessages, dA as extractSubagentLanes, dB as facts, dC as files, dD as filterDocumentTags, dE as filterSkills, dF as findLeafForTaskMessage, dG as findMainSiblingLeaf, dH as findReplyTarget, dI as findSubagentRunId, dJ as flattenTagTree, dK as formatAgentStepLabel, dL as formatFileSize, dM as formatGbp, dN as formatGbpPerMillionTokens, dO as formatItemLabel, dQ as formatTokens, dR as formatUserName, dS as formatWorkspaceChoices, dW as getAgentStepLabel, dX as getAttachableRunId, dY as getChildTags, dZ as getContextRemainingPercent, d_ as getContextUsedPercent, d$ as getContextUsedTokens, e0 as getCurrentStep, e1 as getEligibleParentTags, e3 as getErrorMessage, e4 as getPublicBookingPage, e5 as getRawWorkspaceKey, e6 as getRunToAttach, e7 as getRunToCancel, e8 as getStepDisplay, e9 as getStepTool, ea as getSubagentBranchRecord, eb as getTagDescendantIds, ec as health, ed as houseTemplates, ee as hydrateAgentSteps, eg as identityErrorCode, ef as identityVerification, eh as isAnnotationTag, ei as isConnectorVendorVisible, ej as isDriveSyncVendor, ek as isEntityTag, el as isFlatKind, em as isLabelTag, en as isMailboxSyncVendor, eo as isNearAiUsageBudget, ep as isPresenceTag, eq as isSharePointVendor, er as isSharedSkill, es as isTraceItem, et as mail, eu as mergeAgentSteps, ev as notifications, ew as parseSSEEvents, ex as parseSlashCommand, ey as parseSlashTokenInProgress, ez as performPasswordLogin, eC as pickMainThread, eD as profile, eE as progressFetch, eF as projects, eG as quotaExceededFrom, eH as quotaFromStreamError, eI as reduceOutputItem, eJ as refusalReason, eK as requireData, eL as requireOk, eM as resolveAuth, eN as resolveCitations, eO as resolveSummary, eP as resolveWorkspace, eQ as responses, eR as searchChunks, eS as selectFullContextDocument, eT as selectWorkspace, eU as selectWorkspaceById, eV as sessions, eW as settings, eY as sliceToSubagentThread, eZ as streamSSE, e_ as stripCitationMarkdown, e$ as subagentJobLabel, f0 as summarizeCitations, f1 as tagUseCount, f2 as tags, f3 as tagsForScope, f4 as tagsOfGroup, f5 as topLevelAgentSteps, f7 as usdToGbp, f8 as work, f9 as workflowSteps, fa as workflows, fb as workspaces, fc as wouldCreateTagCycle } from './browser-jyiyv5Wh.js';
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 DateTimeSpec, aj as DecryptedChatMessage, ak as DeploymentHouseTemplate, al as DocInfo, am as DocInfoMap, ao as DocumentAutomationAction, ar as DocumentSelector, 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, aD as FactResponse, aE as FactSearchRequest, aF as FactSearchResponse, aG as FindTimeParams, 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, aW as ListEventsParams, aX as ListFactsOptions, aZ as MAILBOX_SYNC_VENDORS, a_ as MAX_RETRIEVE_DOC_IDS, a$ as MICROSOFT_VENDORS, 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, 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, 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, bZ as SkippedFile, b_ as SlackConnectionStatus, b$ as StepActionRequest, c0 as StepActivityEvent, c1 as StepAssignee, c2 as StepDisplay, c3 as StepField, 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, cD as UpdateFactRequest, cE as UpdateWorkflowRequest, cI as UploadDocumentsOptions, cJ as UploadOptions, cK as UploadProgressListener, cL as UploadResult, 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, d1 as appendTranscriptionHints, d2 as assistant, d3 as authenticatedFetch, d4 as bookPublicSlot, d5 as buildCitationChunkData, 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, 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, dS as formatTokens, dT as formatUserName, dU as formatWorkspaceChoices, dY as getAgentStepLabel, dZ as getAttachableRunId, d_ as getChildTags, d$ as getContextRemainingPercent, e0 as getContextUsedPercent, e1 as getContextUsedTokens, e2 as getCurrentStep, e3 as getEligibleParentTags, 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, 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, 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, f9 as usdToGbp, fa as work, fb as workflowSteps, fc as workflows, fd as workspaces, fe as wouldCreateTagCycle } from './browser-DDboSTjo.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
@@ -3487,6 +3487,24 @@ var ArbiSessionExpiredError = class extends ArbiError {
3487
3487
  this.name = "ArbiSessionExpiredError";
3488
3488
  }
3489
3489
  };
3490
+ var ArbiWorkspaceSupersededError = class extends ArbiError {
3491
+ constructor(workspaceId, supersededBy) {
3492
+ super(`Opening ${workspaceId} was superseded by opening ${supersededBy}`);
3493
+ this.workspaceId = workspaceId;
3494
+ this.supersededBy = supersededBy;
3495
+ this.name = "ArbiWorkspaceSupersededError";
3496
+ }
3497
+ workspaceId;
3498
+ supersededBy;
3499
+ };
3500
+ var ArbiWorkspaceChangedError = class extends ArbiError {
3501
+ constructor(workspaceId) {
3502
+ super(`The workspace changed while reading ${workspaceId}`);
3503
+ this.workspaceId = workspaceId;
3504
+ this.name = "ArbiWorkspaceChangedError";
3505
+ }
3506
+ workspaceId;
3507
+ };
3490
3508
  function detailText(detail) {
3491
3509
  if (typeof detail === "string") return detail || void 0;
3492
3510
  if (Array.isArray(detail)) {
@@ -4500,7 +4518,8 @@ async function* listPaginated(arbi, options = {}) {
4500
4518
  order = "id_asc",
4501
4519
  fields,
4502
4520
  signal,
4503
- lookahead = 1
4521
+ lookahead = 1,
4522
+ workspaceExtId
4504
4523
  } = options;
4505
4524
  const fetchPage = async (pageOffset, limit) => {
4506
4525
  const query2 = {
@@ -4509,6 +4528,7 @@ async function* listPaginated(arbi, options = {}) {
4509
4528
  order
4510
4529
  };
4511
4530
  if (fields) query2.fields = fields;
4531
+ if (workspaceExtId) query2.workspace_ext_id = workspaceExtId;
4512
4532
  const { data, error } = await arbi.fetch.GET("/v1/document/list", {
4513
4533
  params: { query: query2 },
4514
4534
  signal
@@ -4516,7 +4536,11 @@ async function* listPaginated(arbi, options = {}) {
4516
4536
  if (error) {
4517
4537
  throw new Error(typeof error === "string" ? error : JSON.stringify(error));
4518
4538
  }
4519
- return data ?? [];
4539
+ const page = data ?? [];
4540
+ if (workspaceExtId && page.some((doc) => doc.workspace_ext_id !== workspaceExtId)) {
4541
+ throw new ArbiError(`The server returned another workspace's documents for ${workspaceExtId}`);
4542
+ }
4543
+ return page;
4520
4544
  };
4521
4545
  if (signal?.aborted) return;
4522
4546
  const depth = Math.max(1, Math.min(lookahead, MAX_PAGES));
@@ -9797,12 +9821,21 @@ function tokenExpiresWithin(token, seconds) {
9797
9821
  const expiresAt = readSessionClaims(token)?.expiresAt;
9798
9822
  return expiresAt != null && expiresAt - Date.now() < seconds * 1e3;
9799
9823
  }
9824
+ var WorkspaceOpenIntent = class {
9825
+ constructor(workspaceId) {
9826
+ this.workspaceId = workspaceId;
9827
+ }
9828
+ workspaceId;
9829
+ result = null;
9830
+ };
9800
9831
  var Arbi = class {
9801
9832
  client = null;
9802
9833
  loginResult = null;
9803
9834
  userProfile = null;
9804
9835
  profileListeners = /* @__PURE__ */ new Set();
9805
9836
  currentWorkspaceId = null;
9837
+ /** The latest `selectWorkspace` asked for: only it may open when its turn comes. */
9838
+ openIntent = null;
9806
9839
  chatCryptoContext = null;
9807
9840
  /** The chat keys I hold, opened once per set of epochs (`chatRingSignature`). */
9808
9841
  chatRings = /* @__PURE__ */ new Map();
@@ -10038,6 +10071,38 @@ var Arbi = class {
10038
10071
  * documents, which are listed page by page). A public workspace has no key and opens without one.
10039
10072
  */
10040
10073
  async selectWorkspace(workspaceId) {
10074
+ const client = this.requireClient();
10075
+ this.requireLogin();
10076
+ const intent = new WorkspaceOpenIntent(workspaceId);
10077
+ this.openIntent = intent;
10078
+ client.session.setSelectedWorkspace(workspaceId);
10079
+ const result = client.workspaceOpens.run(
10080
+ () => workspaceId,
10081
+ async () => {
10082
+ const latest = this.openIntent;
10083
+ if (latest && latest !== intent) return latest;
10084
+ const opened = await this.openOnServer(workspaceId);
10085
+ this.currentWorkspaceId = workspaceId;
10086
+ return opened;
10087
+ }
10088
+ ).then(
10089
+ (outcome) => {
10090
+ if (!(outcome instanceof WorkspaceOpenIntent)) return outcome;
10091
+ if (outcome.workspaceId === workspaceId && outcome.result) return outcome.result;
10092
+ throw new ArbiWorkspaceSupersededError(workspaceId, outcome.workspaceId);
10093
+ },
10094
+ (error) => {
10095
+ if (this.openIntent === intent) {
10096
+ client.session.setSelectedWorkspace(this.currentWorkspaceId);
10097
+ }
10098
+ throw error;
10099
+ }
10100
+ );
10101
+ intent.result = result;
10102
+ return result;
10103
+ }
10104
+ /** `POST /open` with the workspace's key sealed to this session (none for a public workspace). */
10105
+ async openOnServer(workspaceId) {
10041
10106
  const client = this.requireClient();
10042
10107
  const lr2 = this.requireLogin();
10043
10108
  const open = async (workspaceKey) => requireData(
@@ -10050,21 +10115,40 @@ var Arbi = class {
10050
10115
  const listed = await client.workspaceKeys.wrappedKey(workspaceId).catch((error) => {
10051
10116
  throw new ArbiError(error instanceof Error ? error.message : String(error));
10052
10117
  });
10053
- const opened = !listed.wrappedKey ? await open("") : await this.withWrappedKey(
10118
+ if (!listed.wrappedKey) return open("");
10119
+ return this.withWrappedKey(
10054
10120
  workspaceId,
10055
10121
  async (wrappedKey) => open(
10056
- await selectWorkspace(
10122
+ await generateEncryptedWorkspaceKey(
10057
10123
  client,
10058
- workspaceId,
10059
10124
  wrappedKey,
10060
10125
  lr2.serverSessionKey,
10061
10126
  client.crypto.bytesToBase64(lr2.signingPrivateKey)
10062
10127
  )
10063
10128
  )
10064
10129
  );
10065
- client.session.setSelectedWorkspace(workspaceId);
10066
- this.currentWorkspaceId = workspaceId;
10067
- return opened;
10130
+ }
10131
+ /** Resolves once no workspace open is running or waiting (a switch has landed on the server). */
10132
+ workspaceSettled() {
10133
+ return this.client ? this.client.workspaceOpens.idle() : Promise.resolve();
10134
+ }
10135
+ /**
10136
+ * Run `read` — a request answered from the session's open workspace — for `workspaceId`, and
10137
+ * keep its answer only if it can only be that workspace's: once no open is pending, the open
10138
+ * workspace must be `workspaceId` when it is sent and still be when it returns, with no open
10139
+ * started in between. Otherwise it throws `ArbiWorkspaceChangedError` and nothing it returned
10140
+ * is kept, so a list read across a switch can never be cached as another workspace's.
10141
+ */
10142
+ async readInWorkspace(workspaceId, read) {
10143
+ const opens = this.requireClient().workspaceOpens;
10144
+ await opens.idle();
10145
+ const generation = opens.generation;
10146
+ if (this.currentWorkspaceId !== workspaceId) throw new ArbiWorkspaceChangedError(workspaceId);
10147
+ const result = await read();
10148
+ if (opens.generation !== generation || this.currentWorkspaceId !== workspaceId) {
10149
+ throw new ArbiWorkspaceChangedError(workspaceId);
10150
+ }
10151
+ return result;
10068
10152
  }
10069
10153
  /**
10070
10154
  * Subscribe to "the session cannot be recovered". Fires when a request failed with 401 or
@@ -10086,6 +10170,7 @@ var Arbi = class {
10086
10170
  this.loginResult = null;
10087
10171
  this.userProfile = null;
10088
10172
  this.currentWorkspaceId = null;
10173
+ this.openIntent = null;
10089
10174
  this.chatCryptoContext = null;
10090
10175
  this.chatRings.clear();
10091
10176
  for (const listener of [...this.sessionExpiredListeners]) listener();
@@ -10133,6 +10218,7 @@ var Arbi = class {
10133
10218
  this.loginResult = null;
10134
10219
  this.userProfile = null;
10135
10220
  this.currentWorkspaceId = null;
10221
+ this.openIntent = null;
10136
10222
  this.chatCryptoContext = null;
10137
10223
  this.chatRings.clear();
10138
10224
  }
@@ -10527,7 +10613,16 @@ var Arbi = class {
10527
10613
  * }
10528
10614
  * ```
10529
10615
  */
10530
- listPaginated: (options) => listPaginated(this.requireClient(), options),
10616
+ listPaginated: (options) => {
10617
+ const { workspaceId, ...rest } = options ?? {};
10618
+ if (!workspaceId) return listPaginated(this.requireClient(), rest);
10619
+ const client = this.requireClient();
10620
+ const open = () => this.openWorkspace(workspaceId);
10621
+ return (async function* () {
10622
+ await open();
10623
+ yield* listPaginated(client, { ...rest, workspaceExtId: workspaceId });
10624
+ })();
10625
+ },
10531
10626
  /**
10532
10627
  * Collect all workspace documents into a single array using sequential pagination.
10533
10628
  *
@@ -12220,6 +12315,6 @@ function getRunToAttach(localGeneration, messages) {
12220
12315
  return getAttachableRunId(messages);
12221
12316
  }
12222
12317
 
12223
- export { ACCOUNT_VENDOR, Arbi, ArbiApiError, ArbiError, CallApiError, DEFAULT_AI_USD_PER_GBP, DRIVE_SYNC_VENDORS, DuplicateContactError, ENTITY_KINDS, FLAT_TAG_KINDS, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MAX_RETRIEVE_DOC_IDS, MICROSOFT_VENDORS, PRESENCE_KINDS, PROMPT_CONTEXT_CHARS, PlanStepsError, PublicBookingError, SHAREPOINT_VENDORS, STOP_ID_WAIT_MS, STOP_REPEAT_WINDOW_MS, TAG_KINDS, TAG_NESTING_MAX_DEPTH, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, appendTranscriptionHints, assistant_exports as assistant, authenticatedFetch, bookPublicSlot, buildCitationChunkData, buildDocumentTools, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, buildTurnRequest, calendar_exports as calendar, calls_exports as calls, canTagHaveParent, cancelPublicBooking, chats_exports as chats, computeRunStats, connectErrorMessage, connectWebSocket, connectWithReconnect, connectors_exports as connectors, consumeSSEStream, contacts_exports as contacts, continuityPrompt, conversations_exports as conversations, countCitations, createAuthenticatedClient, createIndexAssigner, defaultKindForFormat, doctags_exports as doctags, documents_exports as documents, estimateDraftTokens, extractDocumentIdsFromMessages, extractFactIdsFromMessages, extractSubagentLanes, facts_exports as facts, files_exports as files, filterDocumentTags, filterSkills, findLeafForTaskMessage, findMainSiblingLeaf, findReplyTarget, findSubagentRunId, flattenTagTree, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatTokens, formatUserName, formatWorkspaceChoices, getAgentStepLabel, getAttachableRunId, getChildTags, getContextRemainingPercent, getContextUsedPercent, getContextUsedTokens, getCurrentStep, getEligibleParentTags, getErrorMessage, getPublicBookingPage, getRawWorkspaceKey, getRunToAttach, getRunToCancel, getStepDisplay, getStepTool, getSubagentBranchRecord, getTagDescendantIds, health_exports as health, house_template_exports as houseTemplates, hydrateAgentSteps, identityErrorCode, identity_exports as identityVerification, isAnnotationTag, isConnectorVendorVisible, isDriveSyncVendor, isEntityTag, isFlatKind, isLabelTag, isMailboxSyncVendor, isNearAiUsageBudget, isPresenceTag, isSharePointVendor, isSharedSkill, isTraceItem, mail_exports as mail, mergeAgentSteps, notifications_exports as notifications, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, pickMainThread, profile_exports as profile, progressFetch, projects_exports as projects, quotaExceededFrom, quotaFromStreamError, reduceOutputItem, refusalReason, requireData, requireOk, resolveAuth, resolveCitations, resolveSummary, resolveWorkspace, responses_exports as responses, searchChunks, selectFullContextDocument, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings, sliceToSubagentThread, streamSSE, stripCitationMarkdown, subagentJobLabel, summarizeCitations, tagUseCount, tags_exports as tags, tagsForScope, tagsOfGroup, topLevelAgentSteps, usdToGbp, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaces_exports as workspaces, wouldCreateTagCycle };
12318
+ export { ACCOUNT_VENDOR, Arbi, ArbiApiError, ArbiError, ArbiWorkspaceChangedError, ArbiWorkspaceSupersededError, CallApiError, DEFAULT_AI_USD_PER_GBP, DRIVE_SYNC_VENDORS, DuplicateContactError, ENTITY_KINDS, FLAT_TAG_KINDS, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MAX_RETRIEVE_DOC_IDS, MICROSOFT_VENDORS, PRESENCE_KINDS, PROMPT_CONTEXT_CHARS, PlanStepsError, PublicBookingError, SHAREPOINT_VENDORS, STOP_ID_WAIT_MS, STOP_REPEAT_WINDOW_MS, TAG_KINDS, TAG_NESTING_MAX_DEPTH, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, appendTranscriptionHints, assistant_exports as assistant, authenticatedFetch, bookPublicSlot, buildCitationChunkData, buildDocumentTools, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, buildTurnRequest, calendar_exports as calendar, calls_exports as calls, canTagHaveParent, cancelPublicBooking, chats_exports as chats, computeRunStats, connectErrorMessage, connectWebSocket, connectWithReconnect, connectors_exports as connectors, consumeSSEStream, contacts_exports as contacts, continuityPrompt, conversations_exports as conversations, countCitations, createAuthenticatedClient, createIndexAssigner, defaultKindForFormat, doctags_exports as doctags, documents_exports as documents, estimateDraftTokens, extractDocumentIdsFromMessages, extractFactIdsFromMessages, extractSubagentLanes, facts_exports as facts, files_exports as files, filterDocumentTags, filterSkills, findLeafForTaskMessage, findMainSiblingLeaf, findReplyTarget, findSubagentRunId, flattenTagTree, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatTokens, formatUserName, formatWorkspaceChoices, getAgentStepLabel, getAttachableRunId, getChildTags, getContextRemainingPercent, getContextUsedPercent, getContextUsedTokens, getCurrentStep, getEligibleParentTags, getErrorMessage, getPublicBookingPage, getRawWorkspaceKey, getRunToAttach, getRunToCancel, getStepDisplay, getStepTool, getSubagentBranchRecord, getTagDescendantIds, health_exports as health, house_template_exports as houseTemplates, hydrateAgentSteps, identityErrorCode, identity_exports as identityVerification, isAnnotationTag, isConnectorVendorVisible, isDriveSyncVendor, isEntityTag, isFlatKind, isLabelTag, isMailboxSyncVendor, isNearAiUsageBudget, isPresenceTag, isSharePointVendor, isSharedSkill, isTraceItem, mail_exports as mail, mergeAgentSteps, notifications_exports as notifications, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, pickMainThread, profile_exports as profile, progressFetch, projects_exports as projects, quotaExceededFrom, quotaFromStreamError, reduceOutputItem, refusalReason, requireData, requireOk, resolveAuth, resolveCitations, resolveSummary, resolveWorkspace, responses_exports as responses, searchChunks, selectFullContextDocument, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings, sliceToSubagentThread, streamSSE, stripCitationMarkdown, subagentJobLabel, summarizeCitations, tagUseCount, tags_exports as tags, tagsForScope, tagsOfGroup, topLevelAgentSteps, usdToGbp, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaces_exports as workspaces, wouldCreateTagCycle };
12224
12319
  //# sourceMappingURL=browser.js.map
12225
12320
  //# sourceMappingURL=browser.js.map