@arbidocs/sdk 0.5.56 → 0.5.58

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 ArbiErrorOptions, h as ArbiHostSession, i as ArbiOptions, k as ArbiTransportError, l as ArbiWorkspaceChangedError, m as ArbiWorkspaceSupersededError, n as AskHandlers, o as AskRequest, p as AttendeeRead, q as AuthContext, r as AuthHeaders, s as AuthMode, t as AuthenticatedClient, B as BookingConfirmation, u as BookingPage, v as BookingPageWriteBody, w as BookingRequestBody, x as BridgeTokensOptions, C as CalDavConnectBody, y as CalDavProfile, z as CalendarAccount, D as CalendarAccountKind, E as CalendarCreateBody, F as CalendarEvent, G as CalendarKeys, H as CalendarRead, I as CalendarSettings, J as CalendarSettingsBody, K as CalendarUpdate, L as CalendarWindow, M as CallApiError, N as ChatAttachmentFile, O as ChatAttachmentInput, P as ChatCryptoContext, Q as ChatKeyRing, R as ChatKind, S as ChatMemberKey, T as ChatMemberResponse, U as ChatMessage, V as ChatMessageResponse, W as ChatResponse, X as ChatSession, Y as CitationSummary, Z as CitationToolSources, _ as CliConfig, $ as CliCredentials, a0 as CommandDescriptor, a1 as ConfigStore, a2 as ConnectOptions, a3 as ConnectorCatalogEntry, a4 as ConnectorFolder, a5 as ConnectorSyncProgress, a6 as ConnectorSyncStatus, a7 as ConnectorVendorKey, a8 as ConnectorVisibilitySettings, a9 as ContextUsage, aa as ConversationResponse, ab as ConversationUsageResponse, ac as CreateFactRequest, ad as CreateFactsRequest, ae as CreateWorkRequest, af as CreateWorkflowRequest, ag as DEFAULT_AI_USD_PER_GBP, ai as DRIVE_SYNC_VENDORS, aj as Database, ak as DatabaseColumn, al as DatabaseColumnWrite, am as DatabaseImportResult, an as DatabaseRow, ao as DatabaseRowPage, ap as DatabaseRowsQuery, aq as DateTimeSpec, as as DecryptedChatMessage, at as DeploymentHouseTemplate, au as DocInfo, av as DocInfoMap, ax as DocumentAutomationAction, aA as DocumentSelector, aD as DriveSyncProgress, aE as DriveSyncSummary, aF as DuplicateContactError, aG as ENTITY_KINDS, aH as EditScope, aI as EntityKind, aJ as EventCreateBody, aK as EventPatchBody, aL as FLAT_TAG_KINDS, aM as FactResponse, aN as FactSearchRequest, aO as FactSearchResponse, aP as FindTimeParams, aR as FreeBusyEntry, aS as FullContextSelection, aT as GOOGLE_VENDORS, aU as HolidayCountry, aV as HouseTemplateCandidate, aW as IMANAGE_VENDORS, aX as IdentityErrorCode, aY as IdentityPurchase, aZ as IdentityState, a_ as IdentityStatus, a$ as ImportResult, b0 as InvitationRead, b1 as LinkedRun, b3 as ListEventsParams, b4 as ListFactsOptions, b6 as MAILBOX_SYNC_VENDORS, b7 as MAX_RETRIEVE_DOC_IDS, b8 as MICROSOFT_VENDORS, bb as OAuthAccountKind, bc as OutputItemDone, bd as OverlayItem, be as OverlayLayerName, bf as PRESENCE_KINDS, bg as PROMPT_CONTEXT_CHARS, bh as ParsedSlashCommand, bi as PendingAuthResponse, bj as PersonKey, bk as PlanStepsError, bl as PlanWorkRequest, bm as ProductResponse, bn as ProjectAddonKind, bo as ProjectAddonSettingsRequest, bp as ProjectBudget, bq as ProjectCheckoutRequest, br as ProjectConversationUsageResponse, bs as ProjectCreateOptions, bt as ProjectDetails, bu as ProjectEventKind, bv as ProjectEventResponse, bw as ProjectInvoicesResponse, bx as ProjectNextPeriodAddonsRequest, by as ProjectPlanChangeRequest, bz as ProjectQuoteRequest, bA as ProjectResponse, bB as ProjectUpdateRequest, bC as ProjectUsageResponse, bD as PublicBookingError, bE as PublicBookingPage, bF as QuotaExceeded, bG as RaisedSignal, bH as RawResponseEvent, bI as ReconnectOptions, bJ as ReconnectableWsConnection, bK as ResolvedCitation, bM as RespondParams, bN as RespondPartstat, bO as ResponseHandle, bP as ResponseSnapshot, bQ as ResponseStart, bR as ResponseStartOptions, bS as RoomCreateBody, bT as RoomQuery, bU as RoomRead, bV as RunProgress, bW as RunStats, bX as RunStep, bY as RunWaitingOn, bZ as SHAREPOINT_VENDORS, b_ as SSEEvent, b$ as SSEStreamCallbacks, c0 as SSEStreamOutcome, c1 as SSEStreamResult, c3 as STOP_ID_WAIT_MS, c4 as STOP_REPEAT_WINDOW_MS, c6 as ScopedTarget, c7 as SearchChunk, c8 as SendBack, c9 as ShareRead, ca as ShareRole, cb as SkillSummary, cc as SkippedFile, cd as SlackConnectionStatus, ce as StepActionRequest, cf as StepActivityEvent, cg as StepAssignee, ch as StepDisplay, ci as StepField, cl as StepKind, cm as StepPhase, cn as StepSignal, co as StepSignalWhen, cp as StepState, cq as StepStatus, cr as SubagentBranchRecord, cs as SubagentLaneInfo, ct as SubmitBackgroundQueryOptions, cu as SubscribeParams, cv as SyncTriggerResult, cw as TAG_KINDS, cx as TAG_NESTING_MAX_DEPTH, cy as TagChange, cz as TagFieldDefinition, cA as TagGroup, cB as TagKind, cC as TagKindField, cD as TagKindSchema, cE as TagLinks, cF as TagListQuery, cG as TagNode, cH as TagResponse, cI as TagScope, cJ as TagTreeRow, cK as TaskPlan, cL as TaskPlanStep, cM as TaxQuoteResponse, cN as Thread, cO as ThreadsResponse, cP as TimeSuggestion, cQ as TurnRequest, cR as UpdateConversationRequest, cS as UpdateFactRequest, cT as UpdateWorkflowRequest, cX as UploadDocumentsOptions, cY as UploadOptions, cZ as UploadProgressListener, c_ as UploadResult, c$ as UsageBreakdown, d0 as UserConnectorEntry, d1 as UserDailyUsageResponse, d2 as UserInfo, d3 as WebSocketAuthError, d4 as WeeklyHoursSpec, d5 as WorkStatus, d6 as WorkflowAuthMode, d7 as WorkflowResponse, d8 as WorkflowRunHistoryResponse, d9 as WorkflowRunResponse, da as WorkspaceContext, db as WorkspaceOpenResponse, dc as WsConnection, dd as account, de as agentconfig, dg as appendTranscriptionHints, dh as assistant, di as authenticatedFetch, dj as bookPublicSlot, dk as buildCitationChunkData, dm as buildDocumentTools, dn as buildFactsContextTool, dp as buildRetrievalChunkTool, dq as buildRetrievalFullContextTool, dr as buildRetrievalTocTool, ds as buildTurnRequest, dt as calendar, du as calls, dv as canTagHaveParent, dw as cancelPublicBooking, dx as chats, dy as computeRunStats, dz as connectErrorMessage, dA as connectWebSocket, dB as connectWithReconnect, dC as connectors, dD as contacts, dE as continuityPrompt, dF as conversations, dG as countCitations, dH as createAuthenticatedClient, dJ as createIndexAssigner, dK as databases, dL as defaultKindForFormat, dM as doctags, dN as documents, dO as estimateDraftTokens, dP as extractDocumentIdsFromMessages, dQ as extractFactIdsFromMessages, dR as extractSubagentLanes, dS as facts, dT as files, dU as filterDocumentTags, dV as filterSkills, dW as findLeafForTaskMessage, dX as findMainSiblingLeaf, dY as findReplyTarget, dZ as findSubagentRunId, d_ as flattenTagTree, d$ as formatAgentStepLabel, e0 as formatFileSize, e1 as formatGbp, e2 as formatGbpPerMillionTokens, e3 as formatItemLabel, e5 as formatTokens, e6 as formatUserName, e7 as formatWorkspaceChoices, eb as getAgentStepLabel, ec as getAttachableRunId, ed as getChildTags, ee as getContextRemainingPercent, ef as getContextUsedPercent, eg as getContextUsedTokens, eh as getCurrentStep, ei as getEligibleParentTags, ek as getErrorMessage, el as getPublicBookingPage, em as getRawWorkspaceKey, en as getRunToAttach, eo as getRunToCancel, ep as getStepDisplay, eq as getStepTool, er as getSubagentBranchRecord, es as getTagDescendantIds, et as health, eu as houseTemplates, ev as hydrateAgentSteps, ex as identityErrorCode, ew as identityVerification, ey as isAnnotationTag, ez as isConnectorVendorVisible, eA as isDriveSyncVendor, eB as isEntityTag, eC as isFlatKind, eD as isLabelTag, eE as isMailboxSyncVendor, eF as isNearAiUsageBudget, eG as isPresenceTag, eH as isSharePointVendor, eI as isSharedSkill, eJ as isTraceItem, eK as mail, eL as mergeAgentSteps, eM as notifications, eN as parseSSEEvents, eO as parseSlashCommand, eP as parseSlashTokenInProgress, eQ as performPasswordLogin, eT as pickMainThread, eU as profile, eV as progressFetch, eW as projects, eX as quotaExceededFrom, eY as quotaFromStreamError, eZ as reduceOutputItem, e_ as refusalReason, e$ as requireData, f0 as requireOk, f1 as resolveAuth, f2 as resolveCitations, f3 as resolveSummary, f4 as resolveWorkspace, f5 as responses, f6 as searchChunks, f7 as selectFullContextDocument, f8 as selectWorkspace, f9 as selectWorkspaceById, fa as sessions, fb as settings, fd as sliceToSubagentThread, fe as streamSSE, ff as stripCitationMarkdown, fg as subagentJobLabel, fh as summarizeCitations, fi as tagUseCount, fj as tags, fk as tagsForScope, fl as tagsOfGroup, fm as topLevelAgentSteps, fo as usdToGbp, fp as work, fq as workflowSteps, fr as workflows, fs as workspaces, ft as wouldCreateTagCycle } from './browser-DvpIH-Qk.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 ArbiErrorOptions, h as ArbiHostSession, i as ArbiOptions, k as ArbiTransportError, l as ArbiWorkspaceChangedError, m as ArbiWorkspaceSupersededError, n as AskHandlers, o as AskRequest, p as AttendeeRead, q as AuthContext, r as AuthHeaders, s as AuthMode, t as AuthenticatedClient, B as BookingConfirmation, u as BookingPage, v as BookingPageWriteBody, w as BookingRequestBody, x as BridgeTokensOptions, C as CalDavConnectBody, y as CalDavProfile, z as CalendarAccount, D as CalendarAccountKind, E as CalendarCreateBody, F as CalendarEvent, G as CalendarKeys, H as CalendarRead, I as CalendarSettings, J as CalendarSettingsBody, K as CalendarUpdate, L as CalendarWindow, M as CallApiError, N as ChatAttachmentFile, O as ChatAttachmentInput, P as ChatCryptoContext, Q as ChatKeyRing, R as ChatKind, S as ChatMemberKey, T as ChatMemberResponse, U as ChatMessage, V as ChatMessageResponse, W as ChatResponse, X as ChatSession, Y as CitationSummary, Z as CitationToolSources, _ as CliConfig, $ as CliCredentials, a0 as CommandDescriptor, a1 as ConfigStore, a2 as ConnectOptions, a3 as ConnectorCatalogEntry, a4 as ConnectorFolder, a5 as ConnectorSyncProgress, a6 as ConnectorSyncStatus, a7 as ConnectorVendorKey, a8 as ConnectorVisibilitySettings, a9 as ContextUsage, aa as ConversationResponse, ab as ConversationUsageResponse, ac as CreateFactRequest, ad as CreateFactsRequest, ae as CreateWorkRequest, af as CreateWorkflowRequest, ag as DEFAULT_AI_USD_PER_GBP, ai as DRIVE_SYNC_VENDORS, aj as Database, ak as DatabaseAggregateRequest, al as DatabaseAggregateResult, am as DatabaseColumn, an as DatabaseColumnWrite, ao as DatabaseImportResult, ap as DatabaseRow, aq as DatabaseRowPage, ar as DatabaseRowsQuery, as as DateTimeSpec, au as DecryptedChatMessage, av as DeploymentHouseTemplate, aw as DocInfo, ax as DocInfoMap, az as DocumentAutomationAction, aC as DocumentSelector, aF as DriveSyncProgress, aG as DriveSyncSummary, aH as DuplicateContactError, aI as ENTITY_KINDS, aJ as EditScope, aK as EntityKind, aL as EventCreateBody, aM as EventPatchBody, aN as FLAT_TAG_KINDS, aO as FactResponse, aP as FactSearchRequest, aQ as FactSearchResponse, aR as FindTimeParams, aT as FreeBusyEntry, aU as FullContextSelection, aV as GOOGLE_VENDORS, aW as HolidayCountry, aX as HouseTemplateCandidate, aY as IMANAGE_VENDORS, aZ as IdentityErrorCode, a_ as IdentityPurchase, a$ as IdentityState, b0 as IdentityStatus, b1 as ImportResult, b2 as InvitationRead, b3 as LinkedRun, b5 as ListEventsParams, b6 as ListFactsOptions, b8 as MAILBOX_SYNC_VENDORS, b9 as MAX_RETRIEVE_DOC_IDS, ba as MICROSOFT_VENDORS, bd as OAuthAccountKind, be as OutputItemDone, bf as OverlayItem, bg as OverlayLayerName, bh as PRESENCE_KINDS, bi as PROMPT_CONTEXT_CHARS, bj as ParsedSlashCommand, bk as PendingAuthResponse, bl as PersonKey, bm as PlanStepsError, bn as PlanWorkRequest, bo as ProductResponse, bp as ProjectAddonKind, bq as ProjectAddonSettingsRequest, br as ProjectBudget, bs as ProjectCheckoutRequest, bt as ProjectConversationUsageResponse, bu as ProjectCreateOptions, bv as ProjectDetails, bw as ProjectEventKind, bx as ProjectEventResponse, by as ProjectInvoicesResponse, bz as ProjectNextPeriodAddonsRequest, bA as ProjectPlanChangeRequest, bB as ProjectQuoteRequest, bC as ProjectResponse, bD as ProjectUpdateRequest, bE as ProjectUsageResponse, bF as PublicBookingError, bG as PublicBookingPage, bH as QuotaExceeded, bI as RaisedSignal, bJ as RawResponseEvent, bK as ReconnectOptions, bL as ReconnectableWsConnection, bM as ResolvedCitation, bO as RespondParams, bP as RespondPartstat, bQ as ResponseHandle, bR as ResponseSnapshot, bS as ResponseStart, bT as ResponseStartOptions, bU as RoomCreateBody, bV as RoomQuery, bW as RoomRead, bX as RunProgress, bY as RunStats, bZ as RunStep, b_ as RunWaitingOn, b$ as SHAREPOINT_VENDORS, c0 as SSEEvent, c1 as SSEStreamCallbacks, c2 as SSEStreamOutcome, c3 as SSEStreamResult, c5 as STOP_ID_WAIT_MS, c6 as STOP_REPEAT_WINDOW_MS, c8 as ScopedTarget, c9 as SearchChunk, ca as SendBack, cb as ShareRead, cc as ShareRole, cd as SkillSummary, ce as SkippedFile, cf as SlackConnectionStatus, cg as StepActionRequest, ch as StepActivityEvent, ci as StepAssignee, cj as StepDisplay, ck as StepField, cn as StepKind, co as StepPhase, cp as StepSignal, cq as StepSignalWhen, cr as StepState, cs as StepStatus, ct as SubagentBranchRecord, cu as SubagentLaneInfo, cv as SubmitBackgroundQueryOptions, cw as SubscribeParams, cx as SyncTriggerResult, cy as TAG_KINDS, cz as TAG_NESTING_MAX_DEPTH, cA as TagChange, cB as TagFieldDefinition, cC as TagGroup, cD as TagKind, cE as TagKindField, cF as TagKindSchema, cG as TagLinks, cH as TagListQuery, cI as TagNode, cJ as TagResponse, cK as TagScope, cL as TagTreeRow, cM as TaskPlan, cN as TaskPlanStep, cO as TaxQuoteResponse, cP as Thread, cQ as ThreadsResponse, cR as TimeSuggestion, cS as TurnRequest, cT as UpdateConversationRequest, cU as UpdateFactRequest, cV as UpdateWorkflowRequest, cZ as UploadDocumentsOptions, c_ as UploadOptions, c$ as UploadProgressListener, d0 as UploadResult, d1 as UsageBreakdown, d2 as UserConnectorEntry, d3 as UserDailyUsageResponse, d4 as UserInfo, d5 as WebSocketAuthError, d6 as WeeklyHoursSpec, d7 as WorkStatus, d8 as WorkflowAuthMode, d9 as WorkflowResponse, da as WorkflowRunHistoryResponse, db as WorkflowRunResponse, dc as WorkspaceContext, dd as WorkspaceOpenResponse, de as WsConnection, df as account, dg as agentconfig, di as appendTranscriptionHints, dj as assistant, dk as authenticatedFetch, dl as bookPublicSlot, dm as buildCitationChunkData, dp as buildDocumentTools, dq as buildFactsContextTool, dr as buildRetrievalChunkTool, ds as buildRetrievalFullContextTool, dt as buildRetrievalTocTool, du as buildTurnRequest, dv as calendar, dw as calls, dx as canTagHaveParent, dy as cancelPublicBooking, dz as chats, dA as computeRunStats, dB as connectErrorMessage, dC as connectWebSocket, dD as connectWithReconnect, dE as connectors, dF as contacts, dG as continuityPrompt, dH as conversations, dI as countCitations, dJ as createAuthenticatedClient, dL as createIndexAssigner, dM as databases, dN as defaultKindForFormat, dO as doctags, dP as documents, dQ as estimateDraftTokens, dR as extractDocumentIdsFromMessages, dS as extractFactIdsFromMessages, dT as extractSubagentLanes, dU as facts, dV as files, dW as filterDocumentTags, dX as filterSkills, dY as findLeafForTaskMessage, dZ as findMainSiblingLeaf, d_ as findReplyTarget, d$ as findSubagentRunId, e0 as flattenTagTree, e1 as formatAgentStepLabel, e2 as formatFileSize, e3 as formatGbp, e4 as formatGbpPerMillionTokens, e5 as formatItemLabel, e7 as formatTokens, e8 as formatUserName, e9 as formatWorkspaceChoices, ed as getAgentStepLabel, ee as getAttachableRunId, ef as getChildTags, eg as getContextRemainingPercent, eh as getContextUsedPercent, ei as getContextUsedTokens, ej as getCurrentStep, ek as getEligibleParentTags, em as getErrorMessage, en as getPublicBookingPage, eo as getRawWorkspaceKey, ep as getRunToAttach, eq as getRunToCancel, er as getStepDisplay, es as getStepTool, et as getSubagentBranchRecord, eu as getTagDescendantIds, ev as health, ew as houseTemplates, ex as hydrateAgentSteps, ez as identityErrorCode, ey as identityVerification, eA as isAnnotationTag, eB as isConnectorVendorVisible, eC as isDriveSyncVendor, eD as isEntityTag, eE as isFlatKind, eF as isLabelTag, eG as isMailboxSyncVendor, eH as isNearAiUsageBudget, eI as isPresenceTag, eJ as isSharePointVendor, eK as isSharedSkill, eL as isTraceItem, eM as mail, eN as mergeAgentSteps, eO as notifications, eP as parseSSEEvents, eQ as parseSlashCommand, eR as parseSlashTokenInProgress, eS as performPasswordLogin, eV as pickMainThread, eW as profile, eX as progressFetch, eY as projects, eZ as quotaExceededFrom, e_ as quotaFromStreamError, e$ as reduceOutputItem, f0 as refusalReason, f1 as requireData, f2 as requireOk, f3 as resolveAuth, f4 as resolveCitations, f5 as resolveSummary, f6 as resolveWorkspace, f7 as responses, f8 as searchChunks, f9 as selectFullContextDocument, fa as selectWorkspace, fb as selectWorkspaceById, fc as sessions, fd as settings, ff as sliceToSubagentThread, fg as streamSSE, fh as stripCitationMarkdown, fi as subagentJobLabel, fj as summarizeCitations, fk as tagUseCount, fl as tags, fm as tagsForScope, fn as tagsOfGroup, fo as topLevelAgentSteps, fq as usdToGbp, fr as work, fs as workflowSteps, ft as workflows, fu as workspaces, fv as wouldCreateTagCycle } from './browser-ENBx11nT.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
- export { CallPeer, LoginProfile } from '@arbidocs/client';
3
+ export { CallPeer, HttpErrorInfo, HttpRequestInfo, HttpResponseInfo, HttpTransportOptions, 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 ArbiErrorOptions, h as ArbiHostSession, i as ArbiOptions, k as ArbiTransportError, l as ArbiWorkspaceChangedError, m as ArbiWorkspaceSupersededError, n as AskHandlers, o as AskRequest, p as AttendeeRead, q as AuthContext, r as AuthHeaders, s as AuthMode, t as AuthenticatedClient, B as BookingConfirmation, u as BookingPage, v as BookingPageWriteBody, w as BookingRequestBody, x as BridgeTokensOptions, C as CalDavConnectBody, y as CalDavProfile, z as CalendarAccount, D as CalendarAccountKind, E as CalendarCreateBody, F as CalendarEvent, G as CalendarKeys, H as CalendarRead, I as CalendarSettings, J as CalendarSettingsBody, K as CalendarUpdate, L as CalendarWindow, M as CallApiError, N as ChatAttachmentFile, O as ChatAttachmentInput, P as ChatCryptoContext, Q as ChatKeyRing, R as ChatKind, S as ChatMemberKey, T as ChatMemberResponse, U as ChatMessage, V as ChatMessageResponse, W as ChatResponse, X as ChatSession, Y as CitationSummary, Z as CitationToolSources, _ as CliConfig, $ as CliCredentials, a0 as CommandDescriptor, a1 as ConfigStore, a2 as ConnectOptions, a3 as ConnectorCatalogEntry, a4 as ConnectorFolder, a5 as ConnectorSyncProgress, a6 as ConnectorSyncStatus, a7 as ConnectorVendorKey, a8 as ConnectorVisibilitySettings, a9 as ContextUsage, aa as ConversationResponse, ab as ConversationUsageResponse, ac as CreateFactRequest, ad as CreateFactsRequest, ae as CreateWorkRequest, af as CreateWorkflowRequest, ag as DEFAULT_AI_USD_PER_GBP, ai as DRIVE_SYNC_VENDORS, aj as Database, ak as DatabaseColumn, al as DatabaseColumnWrite, am as DatabaseImportResult, an as DatabaseRow, ao as DatabaseRowPage, ap as DatabaseRowsQuery, aq as DateTimeSpec, as as DecryptedChatMessage, at as DeploymentHouseTemplate, au as DocInfo, av as DocInfoMap, ax as DocumentAutomationAction, aA as DocumentSelector, aD as DriveSyncProgress, aE as DriveSyncSummary, aF as DuplicateContactError, aG as ENTITY_KINDS, aH as EditScope, aI as EntityKind, aJ as EventCreateBody, aK as EventPatchBody, aL as FLAT_TAG_KINDS, aM as FactResponse, aN as FactSearchRequest, aO as FactSearchResponse, aP as FindTimeParams, aR as FreeBusyEntry, aS as FullContextSelection, aT as GOOGLE_VENDORS, aU as HolidayCountry, aV as HouseTemplateCandidate, aW as IMANAGE_VENDORS, aX as IdentityErrorCode, aY as IdentityPurchase, aZ as IdentityState, a_ as IdentityStatus, a$ as ImportResult, b0 as InvitationRead, b1 as LinkedRun, b3 as ListEventsParams, b4 as ListFactsOptions, b6 as MAILBOX_SYNC_VENDORS, b7 as MAX_RETRIEVE_DOC_IDS, b8 as MICROSOFT_VENDORS, bb as OAuthAccountKind, bc as OutputItemDone, bd as OverlayItem, be as OverlayLayerName, bf as PRESENCE_KINDS, bg as PROMPT_CONTEXT_CHARS, bh as ParsedSlashCommand, bi as PendingAuthResponse, bj as PersonKey, bk as PlanStepsError, bl as PlanWorkRequest, bm as ProductResponse, bn as ProjectAddonKind, bo as ProjectAddonSettingsRequest, bp as ProjectBudget, bq as ProjectCheckoutRequest, br as ProjectConversationUsageResponse, bs as ProjectCreateOptions, bt as ProjectDetails, bu as ProjectEventKind, bv as ProjectEventResponse, bw as ProjectInvoicesResponse, bx as ProjectNextPeriodAddonsRequest, by as ProjectPlanChangeRequest, bz as ProjectQuoteRequest, bA as ProjectResponse, bB as ProjectUpdateRequest, bC as ProjectUsageResponse, bD as PublicBookingError, bE as PublicBookingPage, bF as QuotaExceeded, bG as RaisedSignal, bH as RawResponseEvent, bI as ReconnectOptions, bJ as ReconnectableWsConnection, bK as ResolvedCitation, bM as RespondParams, bN as RespondPartstat, bO as ResponseHandle, bP as ResponseSnapshot, bQ as ResponseStart, bR as ResponseStartOptions, bS as RoomCreateBody, bT as RoomQuery, bU as RoomRead, bV as RunProgress, bW as RunStats, bX as RunStep, bY as RunWaitingOn, bZ as SHAREPOINT_VENDORS, b_ as SSEEvent, b$ as SSEStreamCallbacks, c0 as SSEStreamOutcome, c1 as SSEStreamResult, c3 as STOP_ID_WAIT_MS, c4 as STOP_REPEAT_WINDOW_MS, c6 as ScopedTarget, c7 as SearchChunk, c8 as SendBack, c9 as ShareRead, ca as ShareRole, cb as SkillSummary, cc as SkippedFile, cd as SlackConnectionStatus, ce as StepActionRequest, cf as StepActivityEvent, cg as StepAssignee, ch as StepDisplay, ci as StepField, cl as StepKind, cm as StepPhase, cn as StepSignal, co as StepSignalWhen, cp as StepState, cq as StepStatus, cr as SubagentBranchRecord, cs as SubagentLaneInfo, ct as SubmitBackgroundQueryOptions, cu as SubscribeParams, cv as SyncTriggerResult, cw as TAG_KINDS, cx as TAG_NESTING_MAX_DEPTH, cy as TagChange, cz as TagFieldDefinition, cA as TagGroup, cB as TagKind, cC as TagKindField, cD as TagKindSchema, cE as TagLinks, cF as TagListQuery, cG as TagNode, cH as TagResponse, cI as TagScope, cJ as TagTreeRow, cK as TaskPlan, cL as TaskPlanStep, cM as TaxQuoteResponse, cN as Thread, cO as ThreadsResponse, cP as TimeSuggestion, cQ as TurnRequest, cR as UpdateConversationRequest, cS as UpdateFactRequest, cT as UpdateWorkflowRequest, cX as UploadDocumentsOptions, cY as UploadOptions, cZ as UploadProgressListener, c_ as UploadResult, c$ as UsageBreakdown, d0 as UserConnectorEntry, d1 as UserDailyUsageResponse, d2 as UserInfo, d3 as WebSocketAuthError, d4 as WeeklyHoursSpec, d5 as WorkStatus, d6 as WorkflowAuthMode, d7 as WorkflowResponse, d8 as WorkflowRunHistoryResponse, d9 as WorkflowRunResponse, da as WorkspaceContext, db as WorkspaceOpenResponse, dc as WsConnection, dd as account, de as agentconfig, dg as appendTranscriptionHints, dh as assistant, di as authenticatedFetch, dj as bookPublicSlot, dk as buildCitationChunkData, dm as buildDocumentTools, dn as buildFactsContextTool, dp as buildRetrievalChunkTool, dq as buildRetrievalFullContextTool, dr as buildRetrievalTocTool, ds as buildTurnRequest, dt as calendar, du as calls, dv as canTagHaveParent, dw as cancelPublicBooking, dx as chats, dy as computeRunStats, dz as connectErrorMessage, dA as connectWebSocket, dB as connectWithReconnect, dC as connectors, dD as contacts, dE as continuityPrompt, dF as conversations, dG as countCitations, dH as createAuthenticatedClient, dJ as createIndexAssigner, dK as databases, dL as defaultKindForFormat, dM as doctags, dN as documents, dO as estimateDraftTokens, dP as extractDocumentIdsFromMessages, dQ as extractFactIdsFromMessages, dR as extractSubagentLanes, dS as facts, dT as files, dU as filterDocumentTags, dV as filterSkills, dW as findLeafForTaskMessage, dX as findMainSiblingLeaf, dY as findReplyTarget, dZ as findSubagentRunId, d_ as flattenTagTree, d$ as formatAgentStepLabel, e0 as formatFileSize, e1 as formatGbp, e2 as formatGbpPerMillionTokens, e3 as formatItemLabel, e5 as formatTokens, e6 as formatUserName, e7 as formatWorkspaceChoices, eb as getAgentStepLabel, ec as getAttachableRunId, ed as getChildTags, ee as getContextRemainingPercent, ef as getContextUsedPercent, eg as getContextUsedTokens, eh as getCurrentStep, ei as getEligibleParentTags, ek as getErrorMessage, el as getPublicBookingPage, em as getRawWorkspaceKey, en as getRunToAttach, eo as getRunToCancel, ep as getStepDisplay, eq as getStepTool, er as getSubagentBranchRecord, es as getTagDescendantIds, et as health, eu as houseTemplates, ev as hydrateAgentSteps, ex as identityErrorCode, ew as identityVerification, ey as isAnnotationTag, ez as isConnectorVendorVisible, eA as isDriveSyncVendor, eB as isEntityTag, eC as isFlatKind, eD as isLabelTag, eE as isMailboxSyncVendor, eF as isNearAiUsageBudget, eG as isPresenceTag, eH as isSharePointVendor, eI as isSharedSkill, eJ as isTraceItem, eK as mail, eL as mergeAgentSteps, eM as notifications, eN as parseSSEEvents, eO as parseSlashCommand, eP as parseSlashTokenInProgress, eQ as performPasswordLogin, eT as pickMainThread, eU as profile, eV as progressFetch, eW as projects, eX as quotaExceededFrom, eY as quotaFromStreamError, eZ as reduceOutputItem, e_ as refusalReason, e$ as requireData, f0 as requireOk, f1 as resolveAuth, f2 as resolveCitations, f3 as resolveSummary, f4 as resolveWorkspace, f5 as responses, f6 as searchChunks, f7 as selectFullContextDocument, f8 as selectWorkspace, f9 as selectWorkspaceById, fa as sessions, fb as settings, fd as sliceToSubagentThread, fe as streamSSE, ff as stripCitationMarkdown, fg as subagentJobLabel, fh as summarizeCitations, fi as tagUseCount, fj as tags, fk as tagsForScope, fl as tagsOfGroup, fm as topLevelAgentSteps, fo as usdToGbp, fp as work, fq as workflowSteps, fr as workflows, fs as workspaces, ft as wouldCreateTagCycle } from './browser-DEZ7kJKE.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 ArbiErrorOptions, h as ArbiHostSession, i as ArbiOptions, k as ArbiTransportError, l as ArbiWorkspaceChangedError, m as ArbiWorkspaceSupersededError, n as AskHandlers, o as AskRequest, p as AttendeeRead, q as AuthContext, r as AuthHeaders, s as AuthMode, t as AuthenticatedClient, B as BookingConfirmation, u as BookingPage, v as BookingPageWriteBody, w as BookingRequestBody, x as BridgeTokensOptions, C as CalDavConnectBody, y as CalDavProfile, z as CalendarAccount, D as CalendarAccountKind, E as CalendarCreateBody, F as CalendarEvent, G as CalendarKeys, H as CalendarRead, I as CalendarSettings, J as CalendarSettingsBody, K as CalendarUpdate, L as CalendarWindow, M as CallApiError, N as ChatAttachmentFile, O as ChatAttachmentInput, P as ChatCryptoContext, Q as ChatKeyRing, R as ChatKind, S as ChatMemberKey, T as ChatMemberResponse, U as ChatMessage, V as ChatMessageResponse, W as ChatResponse, X as ChatSession, Y as CitationSummary, Z as CitationToolSources, _ as CliConfig, $ as CliCredentials, a0 as CommandDescriptor, a1 as ConfigStore, a2 as ConnectOptions, a3 as ConnectorCatalogEntry, a4 as ConnectorFolder, a5 as ConnectorSyncProgress, a6 as ConnectorSyncStatus, a7 as ConnectorVendorKey, a8 as ConnectorVisibilitySettings, a9 as ContextUsage, aa as ConversationResponse, ab as ConversationUsageResponse, ac as CreateFactRequest, ad as CreateFactsRequest, ae as CreateWorkRequest, af as CreateWorkflowRequest, ag as DEFAULT_AI_USD_PER_GBP, ai as DRIVE_SYNC_VENDORS, aj as Database, ak as DatabaseAggregateRequest, al as DatabaseAggregateResult, am as DatabaseColumn, an as DatabaseColumnWrite, ao as DatabaseImportResult, ap as DatabaseRow, aq as DatabaseRowPage, ar as DatabaseRowsQuery, as as DateTimeSpec, au as DecryptedChatMessage, av as DeploymentHouseTemplate, aw as DocInfo, ax as DocInfoMap, az as DocumentAutomationAction, aC as DocumentSelector, aF as DriveSyncProgress, aG as DriveSyncSummary, aH as DuplicateContactError, aI as ENTITY_KINDS, aJ as EditScope, aK as EntityKind, aL as EventCreateBody, aM as EventPatchBody, aN as FLAT_TAG_KINDS, aO as FactResponse, aP as FactSearchRequest, aQ as FactSearchResponse, aR as FindTimeParams, aT as FreeBusyEntry, aU as FullContextSelection, aV as GOOGLE_VENDORS, aW as HolidayCountry, aX as HouseTemplateCandidate, aY as IMANAGE_VENDORS, aZ as IdentityErrorCode, a_ as IdentityPurchase, a$ as IdentityState, b0 as IdentityStatus, b1 as ImportResult, b2 as InvitationRead, b3 as LinkedRun, b5 as ListEventsParams, b6 as ListFactsOptions, b8 as MAILBOX_SYNC_VENDORS, b9 as MAX_RETRIEVE_DOC_IDS, ba as MICROSOFT_VENDORS, bd as OAuthAccountKind, be as OutputItemDone, bf as OverlayItem, bg as OverlayLayerName, bh as PRESENCE_KINDS, bi as PROMPT_CONTEXT_CHARS, bj as ParsedSlashCommand, bk as PendingAuthResponse, bl as PersonKey, bm as PlanStepsError, bn as PlanWorkRequest, bo as ProductResponse, bp as ProjectAddonKind, bq as ProjectAddonSettingsRequest, br as ProjectBudget, bs as ProjectCheckoutRequest, bt as ProjectConversationUsageResponse, bu as ProjectCreateOptions, bv as ProjectDetails, bw as ProjectEventKind, bx as ProjectEventResponse, by as ProjectInvoicesResponse, bz as ProjectNextPeriodAddonsRequest, bA as ProjectPlanChangeRequest, bB as ProjectQuoteRequest, bC as ProjectResponse, bD as ProjectUpdateRequest, bE as ProjectUsageResponse, bF as PublicBookingError, bG as PublicBookingPage, bH as QuotaExceeded, bI as RaisedSignal, bJ as RawResponseEvent, bK as ReconnectOptions, bL as ReconnectableWsConnection, bM as ResolvedCitation, bO as RespondParams, bP as RespondPartstat, bQ as ResponseHandle, bR as ResponseSnapshot, bS as ResponseStart, bT as ResponseStartOptions, bU as RoomCreateBody, bV as RoomQuery, bW as RoomRead, bX as RunProgress, bY as RunStats, bZ as RunStep, b_ as RunWaitingOn, b$ as SHAREPOINT_VENDORS, c0 as SSEEvent, c1 as SSEStreamCallbacks, c2 as SSEStreamOutcome, c3 as SSEStreamResult, c5 as STOP_ID_WAIT_MS, c6 as STOP_REPEAT_WINDOW_MS, c8 as ScopedTarget, c9 as SearchChunk, ca as SendBack, cb as ShareRead, cc as ShareRole, cd as SkillSummary, ce as SkippedFile, cf as SlackConnectionStatus, cg as StepActionRequest, ch as StepActivityEvent, ci as StepAssignee, cj as StepDisplay, ck as StepField, cn as StepKind, co as StepPhase, cp as StepSignal, cq as StepSignalWhen, cr as StepState, cs as StepStatus, ct as SubagentBranchRecord, cu as SubagentLaneInfo, cv as SubmitBackgroundQueryOptions, cw as SubscribeParams, cx as SyncTriggerResult, cy as TAG_KINDS, cz as TAG_NESTING_MAX_DEPTH, cA as TagChange, cB as TagFieldDefinition, cC as TagGroup, cD as TagKind, cE as TagKindField, cF as TagKindSchema, cG as TagLinks, cH as TagListQuery, cI as TagNode, cJ as TagResponse, cK as TagScope, cL as TagTreeRow, cM as TaskPlan, cN as TaskPlanStep, cO as TaxQuoteResponse, cP as Thread, cQ as ThreadsResponse, cR as TimeSuggestion, cS as TurnRequest, cT as UpdateConversationRequest, cU as UpdateFactRequest, cV as UpdateWorkflowRequest, cZ as UploadDocumentsOptions, c_ as UploadOptions, c$ as UploadProgressListener, d0 as UploadResult, d1 as UsageBreakdown, d2 as UserConnectorEntry, d3 as UserDailyUsageResponse, d4 as UserInfo, d5 as WebSocketAuthError, d6 as WeeklyHoursSpec, d7 as WorkStatus, d8 as WorkflowAuthMode, d9 as WorkflowResponse, da as WorkflowRunHistoryResponse, db as WorkflowRunResponse, dc as WorkspaceContext, dd as WorkspaceOpenResponse, de as WsConnection, df as account, dg as agentconfig, di as appendTranscriptionHints, dj as assistant, dk as authenticatedFetch, dl as bookPublicSlot, dm as buildCitationChunkData, dp as buildDocumentTools, dq as buildFactsContextTool, dr as buildRetrievalChunkTool, ds as buildRetrievalFullContextTool, dt as buildRetrievalTocTool, du as buildTurnRequest, dv as calendar, dw as calls, dx as canTagHaveParent, dy as cancelPublicBooking, dz as chats, dA as computeRunStats, dB as connectErrorMessage, dC as connectWebSocket, dD as connectWithReconnect, dE as connectors, dF as contacts, dG as continuityPrompt, dH as conversations, dI as countCitations, dJ as createAuthenticatedClient, dL as createIndexAssigner, dM as databases, dN as defaultKindForFormat, dO as doctags, dP as documents, dQ as estimateDraftTokens, dR as extractDocumentIdsFromMessages, dS as extractFactIdsFromMessages, dT as extractSubagentLanes, dU as facts, dV as files, dW as filterDocumentTags, dX as filterSkills, dY as findLeafForTaskMessage, dZ as findMainSiblingLeaf, d_ as findReplyTarget, d$ as findSubagentRunId, e0 as flattenTagTree, e1 as formatAgentStepLabel, e2 as formatFileSize, e3 as formatGbp, e4 as formatGbpPerMillionTokens, e5 as formatItemLabel, e7 as formatTokens, e8 as formatUserName, e9 as formatWorkspaceChoices, ed as getAgentStepLabel, ee as getAttachableRunId, ef as getChildTags, eg as getContextRemainingPercent, eh as getContextUsedPercent, ei as getContextUsedTokens, ej as getCurrentStep, ek as getEligibleParentTags, em as getErrorMessage, en as getPublicBookingPage, eo as getRawWorkspaceKey, ep as getRunToAttach, eq as getRunToCancel, er as getStepDisplay, es as getStepTool, et as getSubagentBranchRecord, eu as getTagDescendantIds, ev as health, ew as houseTemplates, ex as hydrateAgentSteps, ez as identityErrorCode, ey as identityVerification, eA as isAnnotationTag, eB as isConnectorVendorVisible, eC as isDriveSyncVendor, eD as isEntityTag, eE as isFlatKind, eF as isLabelTag, eG as isMailboxSyncVendor, eH as isNearAiUsageBudget, eI as isPresenceTag, eJ as isSharePointVendor, eK as isSharedSkill, eL as isTraceItem, eM as mail, eN as mergeAgentSteps, eO as notifications, eP as parseSSEEvents, eQ as parseSlashCommand, eR as parseSlashTokenInProgress, eS as performPasswordLogin, eV as pickMainThread, eW as profile, eX as progressFetch, eY as projects, eZ as quotaExceededFrom, e_ as quotaFromStreamError, e$ as reduceOutputItem, f0 as refusalReason, f1 as requireData, f2 as requireOk, f3 as resolveAuth, f4 as resolveCitations, f5 as resolveSummary, f6 as resolveWorkspace, f7 as responses, f8 as searchChunks, f9 as selectFullContextDocument, fa as selectWorkspace, fb as selectWorkspaceById, fc as sessions, fd as settings, ff as sliceToSubagentThread, fg as streamSSE, fh as stripCitationMarkdown, fi as subagentJobLabel, fj as summarizeCitations, fk as tagUseCount, fl as tags, fm as tagsForScope, fn as tagsOfGroup, fo as topLevelAgentSteps, fq as usdToGbp, fr as work, fs as workflowSteps, ft as workflows, fu as workspaces, fv as wouldCreateTagCycle } from './browser-BX1E63gK.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
- export { CallPeer, LoginProfile } from '@arbidocs/client';
3
+ export { CallPeer, HttpErrorInfo, HttpRequestInfo, HttpResponseInfo, HttpTransportOptions, LoginProfile } from '@arbidocs/client';
package/dist/browser.js CHANGED
@@ -3657,10 +3657,19 @@ var STATUS_FALLBACKS = {
3657
3657
  503: "The selected LLM is not responding. Please retry or select another model."
3658
3658
  };
3659
3659
  async function authenticatedFetch(options) {
3660
- const { baseUrl, accessToken, path: path2, method, body, headers, signal } = options;
3660
+ const {
3661
+ baseUrl,
3662
+ accessToken,
3663
+ path: path2,
3664
+ method,
3665
+ body,
3666
+ headers,
3667
+ signal,
3668
+ fetch: send = globalThis.fetch
3669
+ } = options;
3661
3670
  let res;
3662
3671
  try {
3663
- res = await fetch(`${baseUrl}${path2}`, {
3672
+ res = await send(`${baseUrl}${path2}`, {
3664
3673
  method: method ?? (body ? "POST" : "GET"),
3665
3674
  headers: {
3666
3675
  Authorization: `Bearer ${accessToken}`,
@@ -3694,11 +3703,11 @@ function parseHeaders(raw) {
3694
3703
  }
3695
3704
  return headers;
3696
3705
  }
3697
- function progressFetch(onProgress) {
3706
+ function progressFetch(onProgress, transport) {
3698
3707
  const Xhr = globalThis.XMLHttpRequest;
3699
- return async (request) => {
3700
- if (!Xhr) {
3701
- const response = await fetch(request);
3708
+ const adapter = async (request) => {
3709
+ if (!Xhr || transport?.customFetch) {
3710
+ const response = await (transport?.customFetch ? transport.fetch : globalThis.fetch)(request);
3702
3711
  const size = Number(request.headers.get("content-length") ?? 0);
3703
3712
  onProgress(size, size);
3704
3713
  return response;
@@ -3712,7 +3721,10 @@ function progressFetch(onProgress) {
3712
3721
  xhr.upload.onprogress = (event) => {
3713
3722
  if (event.lengthComputable) onProgress(event.loaded, event.total);
3714
3723
  };
3724
+ const cleanup = () => request.signal.removeEventListener("abort", abort);
3725
+ const abort = () => xhr.abort();
3715
3726
  xhr.onload = () => {
3727
+ cleanup();
3716
3728
  onProgress(body.size, body.size);
3717
3729
  resolve(
3718
3730
  new Response(NULL_BODY_STATUSES.has(xhr.status) ? null : xhr.responseText, {
@@ -3722,12 +3734,30 @@ function progressFetch(onProgress) {
3722
3734
  })
3723
3735
  );
3724
3736
  };
3725
- xhr.onerror = () => reject(new TypeError("Network error during upload"));
3726
- xhr.onabort = () => reject(new DOMException("Upload aborted", "AbortError"));
3727
- request.signal?.addEventListener("abort", () => xhr.abort(), { once: true });
3728
- xhr.send(body);
3737
+ xhr.onerror = () => {
3738
+ cleanup();
3739
+ reject(new TypeError("Network error during upload"));
3740
+ };
3741
+ xhr.onabort = () => {
3742
+ cleanup();
3743
+ reject(request.signal.reason ?? new DOMException("Upload aborted", "AbortError"));
3744
+ };
3745
+ if (request.signal.aborted) {
3746
+ reject(request.signal.reason ?? new DOMException("Upload aborted", "AbortError"));
3747
+ return;
3748
+ }
3749
+ request.signal.addEventListener("abort", abort, { once: true });
3750
+ try {
3751
+ xhr.send(body);
3752
+ } catch (error) {
3753
+ cleanup();
3754
+ reject(error);
3755
+ }
3729
3756
  });
3730
3757
  };
3758
+ if (transport?.customFetch) return adapter;
3759
+ const send = transport?.withFetch((input, init) => adapter(new Request(input, init)));
3760
+ return send ? (request) => send(request) : adapter;
3731
3761
  }
3732
3762
  var TOKEN_MAX_AGE_MS = 50 * 60 * 1e3;
3733
3763
  function formatWorkspaceChoices(wsList) {
@@ -5205,7 +5235,7 @@ async function uploadDocuments(arbi, files, options = {}) {
5205
5235
  }
5206
5236
  const result = await arbi.fetch.POST("/v1/document/upload", {
5207
5237
  params: { query: query2 },
5208
- ...options.onProgress ? { fetch: progressFetch(options.onProgress) } : {},
5238
+ ...options.onProgress ? { fetch: progressFetch(options.onProgress, arbi.http) } : {},
5209
5239
  // The schema types the files as strings; they go as multipart parts.
5210
5240
  body: { files },
5211
5241
  bodySerializer: () => {
@@ -6140,10 +6170,11 @@ function searchChunks(result) {
6140
6170
  return Array.from(byId3.values()).sort((a2, b2) => b2.score - a2.score);
6141
6171
  }
6142
6172
  async function queryAssistant(options) {
6143
- const { baseUrl, accessToken, signal, ...request } = options;
6173
+ const { baseUrl, accessToken, signal, fetch: fetch2, ...request } = options;
6144
6174
  return authenticatedFetch({
6145
6175
  baseUrl,
6146
6176
  accessToken,
6177
+ fetch: fetch2,
6147
6178
  path: "/v1/responses",
6148
6179
  method: "POST",
6149
6180
  body: JSON.stringify(buildTurnRequest(request)),
@@ -6198,7 +6229,7 @@ async function refusal(response) {
6198
6229
  );
6199
6230
  }
6200
6231
  async function openTurnStream(auth, body, signal) {
6201
- const response = await fetch(`${auth.baseUrl}/v1/responses`, {
6232
+ const response = await (auth.fetch ?? globalThis.fetch)(`${auth.baseUrl}/v1/responses`, {
6202
6233
  method: "POST",
6203
6234
  headers: { "Content-Type": "application/json", Authorization: `Bearer ${auth.accessToken}` },
6204
6235
  body: JSON.stringify(body),
@@ -6216,7 +6247,7 @@ async function openTurnStream(auth, body, signal) {
6216
6247
  return response;
6217
6248
  }
6218
6249
  async function openRunStream(auth, responseId, signal) {
6219
- const response = await fetch(
6250
+ const response = await (auth.fetch ?? globalThis.fetch)(
6220
6251
  `${auth.baseUrl}/v1/assistant/run/${encodeURIComponent(responseId)}/stream`,
6221
6252
  {
6222
6253
  method: "GET",
@@ -9178,6 +9209,7 @@ async function remindFact(arbi, factId, options = {}) {
9178
9209
  var databases_exports = {};
9179
9210
  __export(databases_exports, {
9180
9211
  addDatabaseRows: () => addDatabaseRows,
9212
+ aggregateDatabase: () => aggregateDatabase,
9181
9213
  createDatabase: () => createDatabase,
9182
9214
  deleteDatabase: () => deleteDatabase,
9183
9215
  deleteDatabaseRows: () => deleteDatabaseRows,
@@ -9213,6 +9245,15 @@ async function listDatabaseRows(arbi, databaseId, query2 = {}) {
9213
9245
  "Failed to read the rows"
9214
9246
  );
9215
9247
  }
9248
+ async function aggregateDatabase(arbi, databaseId, body) {
9249
+ return requireData(
9250
+ await arbi.fetch.POST("/v1/databases/{database_id}/aggregate", {
9251
+ params: path(databaseId),
9252
+ body: { time_bucket: "month", limit: 50, ...body }
9253
+ }),
9254
+ "Failed to aggregate the database"
9255
+ );
9256
+ }
9216
9257
  async function createDatabase(arbi, body) {
9217
9258
  return requireData(
9218
9259
  await arbi.fetch.POST("/v1/databases", { body }),
@@ -10601,6 +10642,10 @@ var Arbi = class {
10601
10642
  options;
10602
10643
  constructor(options) {
10603
10644
  this.options = options;
10645
+ if (options.session && options.transport)
10646
+ throw new ArbiError(
10647
+ "Configure transport on the host session client, not on its Arbi wrapper."
10648
+ );
10604
10649
  if (options.session) {
10605
10650
  this.client = options.session.client;
10606
10651
  this.loginResult = options.session.login;
@@ -10625,6 +10670,7 @@ var Arbi = class {
10625
10670
  baseUrl: this.options.url,
10626
10671
  deploymentDomain: domain,
10627
10672
  credentials: this.options.credentials ?? "omit",
10673
+ transport: this.options.transport,
10628
10674
  session: createSessionManager({ storage: this.options.sessionStorage }),
10629
10675
  // A silent re-login rotates the server session key: keep ours in step, or the next
10630
10676
  // workspace open would seal the key for a session the server no longer has.
@@ -10819,11 +10865,15 @@ var Arbi = class {
10819
10865
  await this.targetWorkspace(workspaceId);
10820
10866
  return createTag(this.requireClient(), { ...options, workspaceId });
10821
10867
  }
10822
- /** The workspace a call names, opened for this session; `undefined` for the current one. */
10868
+ /**
10869
+ * The workspace a call acts on, captured when it is called: the one it names (opened for this session, not
10870
+ * switched to), else the current one. The request names it, so a switch while it is in flight cannot move it.
10871
+ * `undefined` only when no workspace is known here (the server's open one then applies, as before).
10872
+ */
10823
10873
  async targetWorkspace(workspaceId) {
10824
- if (!workspaceId || workspaceId === this.currentWorkspaceId) return void 0;
10825
- await this.openWorkspace(workspaceId);
10826
- return workspaceId;
10874
+ const target = workspaceId ?? this.currentWorkspaceId ?? void 0;
10875
+ if (target) await this.openWorkspace(target);
10876
+ return target;
10827
10877
  }
10828
10878
  /**
10829
10879
  * Make a workspace the CURRENT one: decrypt its key, open it on the server (which makes it the
@@ -11053,7 +11103,8 @@ var Arbi = class {
11053
11103
  }
11054
11104
  return {
11055
11105
  baseUrl: this.options.url,
11056
- accessToken
11106
+ accessToken,
11107
+ ...client.http ? { fetch: client.http.fetch } : {}
11057
11108
  };
11058
11109
  }
11059
11110
  // ── Projects ──────────────────────────────────────────────────────────
@@ -11570,10 +11621,10 @@ var Arbi = class {
11570
11621
  /** Authenticated native Word transport, with normal session recovery. */
11571
11622
  editor = {
11572
11623
  request: (path2, options = {}) => this.recovering(async () => {
11573
- const { baseUrl, accessToken } = this.getAuthHeaders();
11624
+ const { baseUrl, accessToken, fetch: send = globalThis.fetch } = this.getAuthHeaders();
11574
11625
  const headers = new Headers(options.headers);
11575
11626
  headers.set("Authorization", `Bearer ${accessToken}`);
11576
- const response = await fetch(`${baseUrl}/v1/editor${path2}`, { ...options, headers });
11627
+ const response = await send(`${baseUrl}/v1/editor${path2}`, { ...options, headers });
11577
11628
  if (!response.ok) {
11578
11629
  const body = await response.json().catch(() => null);
11579
11630
  throw new ArbiApiError(body?.detail || `Document request failed (${response.status})`, {
@@ -11591,12 +11642,12 @@ var Arbi = class {
11591
11642
  mail = {
11592
11643
  /** Fetch a path under `/v1/mail`; rejects a non-2xx response with an `ArbiApiError` (`status`). */
11593
11644
  fetch: (path2, init = {}) => this.recovering(async () => {
11594
- const { baseUrl, accessToken } = this.getAuthHeaders();
11645
+ const { baseUrl, accessToken, fetch: send = globalThis.fetch } = this.getAuthHeaders();
11595
11646
  const headers = new Headers(init.headers);
11596
11647
  headers.set("Authorization", `Bearer ${accessToken}`);
11597
11648
  if (init.body && !headers.has("Content-Type"))
11598
11649
  headers.set("Content-Type", "application/json");
11599
- const response = await fetch(`${baseUrl}/v1/mail${path2}`, { ...init, headers });
11650
+ const response = await send(`${baseUrl}/v1/mail${path2}`, { ...init, headers });
11600
11651
  if (!response.ok) {
11601
11652
  const body = await response.json().catch(() => null);
11602
11653
  throw new ArbiApiError(
@@ -11792,8 +11843,8 @@ var Arbi = class {
11792
11843
  */
11793
11844
  /** The open workspace's tags, or `query.workspaceId`'s (opened for this session, not switched to). */
11794
11845
  list: async (query2) => {
11795
- await this.targetWorkspace(query2?.workspaceId);
11796
- return listTags(this.requireClient(), query2);
11846
+ const workspaceId = await this.targetWorkspace(query2?.workspaceId);
11847
+ return listTags(this.requireClient(), { ...query2, workspaceId });
11797
11848
  },
11798
11849
  create: (options) => this.createTagIn(options.workspaceId ?? this.requireWorkspace(), options),
11799
11850
  delete: (tagId) => deleteTag(this.requireClient(), tagId),
@@ -12469,6 +12520,8 @@ var Arbi = class {
12469
12520
  get: (databaseId) => getDatabase(this.requireClient(), databaseId),
12470
12521
  /** A search of the rows (any cell), sorted and paged on the server. */
12471
12522
  rows: (databaseId, query2) => listDatabaseRows(this.requireClient(), databaseId, query2),
12523
+ /** Group and measure the rows on the server (a chart's labels and series). */
12524
+ aggregate: (databaseId, body) => aggregateDatabase(this.requireClient(), databaseId, body),
12472
12525
  create: (body) => createDatabase(this.requireClient(), body),
12473
12526
  update: (databaseId, body) => updateDatabase(this.requireClient(), databaseId, body),
12474
12527
  delete: (databaseId) => deleteDatabase(this.requireClient(), databaseId),