@arbidocs/sdk 0.5.67 → 0.5.69

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, j as ArbiSessionExpiredError, k as ArbiStructuredOutputError, l as ArbiTransportError, m as ArbiWorkspaceChangedError, n as ArbiWorkspaceSupersededError, o as ArbiWorkspaceUnavailableError, p as AskHandlers, q as AskRequest, r as AttendeeRead, s as AuthContext, t as AuthHeaders, u as AuthMode, v as AuthenticatedClient, B as BookingConfirmation, w as BookingPage, x as BookingPageWriteBody, y as BookingRequestBody, z as BridgeTokensOptions, C as CalDavConnectBody, D as CalDavProfile, E as CalendarAccount, F as CalendarAccountKind, G as CalendarCreateBody, H as CalendarEvent, I as CalendarKeys, J as CalendarRead, K as CalendarSettings, L as CalendarSettingsBody, M as CalendarUpdate, N as CalendarWindow, O as CallApiError, P as Capabilities, Q as ChatAttachmentFile, R as ChatAttachmentInput, S as ChatCryptoContext, T as ChatKeyRing, U as ChatKind, V as ChatMemberKey, W as ChatMemberResponse, X as ChatMessage, Y as ChatMessageResponse, Z as ChatResponse, _ as ChatSession, $ as CitationSummary, a0 as CitationToolSources, a1 as CliConfig, a2 as CliCredentials, a3 as CommandDescriptor, a4 as ConfigStore, a5 as Configuration, a6 as ConfigurationPatch, a7 as ConnectOptions, a8 as ConnectionModel, a9 as ConnectorCatalogEntry, aa as ConnectorFolder, ab as ConnectorSyncProgress, ac as ConnectorSyncStatus, ad as ConnectorVendorKey, ae as ConnectorVisibilitySettings, af as ContextUsage, ag as ConversationResponse, ah as ConversationUsageResponse, ai as CreateFactRequest, aj as CreateFactsRequest, ak as CreateWorkRequest, al as CreateWorkflowRequest, am as DEFAULT_AI_USD_PER_GBP, ao as DRIVE_SYNC_VENDORS, ap as Database, aq as DatabaseAggregateRequest, ar as DatabaseAggregateResult, as as DatabaseColumn, at as DatabaseColumnWrite, au as DatabaseImportResult, av as DatabaseRow, aw as DatabaseRowPage, ax as DatabaseRowsQuery, ay as DateTimeSpec, aA as DecryptedChatMessage, aB as DeploymentHouseTemplate, aC as DirectModelUsage, aD as DocInfo, aE as DocInfoMap, aG as DocumentAutomationAction, aJ as DocumentSelector, aM as DriveSyncProgress, aN as DriveSyncSummary, aO as DuplicateContactError, aP as ENTITY_KINDS, aQ as EditScope, aR as EntityKind, aS as EventCreateBody, aT as EventPatchBody, aU as FLAT_TAG_KINDS, aV as FactResponse, aW as FactSearchRequest, aX as FactSearchResponse, aY as FindTimeParams, a_ as FreeBusyEntry, a$ as FullContextSelection, b0 as GOOGLE_VENDORS, b1 as HolidayCountry, b2 as HouseTemplateCandidate, b3 as IMANAGE_VENDORS, b4 as IdentityErrorCode, b5 as IdentityPurchase, b6 as IdentityState, b7 as IdentityStatus, b8 as ImportResult, b9 as InvitationRead, ba as JsonSchemaOutputFormat, bb as LinkedRun, bd as ListEventsParams, be as ListFactsOptions, bg as MAILBOX_SYNC_VENDORS, bh as MAX_RETRIEVE_DOC_IDS, bi as MICROSOFT_VENDORS, bl as ModelConnection, bm as OAuthAccountKind, bn as OutputItemDone, bo as OverlayItem, bp as OverlayLayerName, bq as PRESENCE_KINDS, br as PROMPT_CONTEXT_CHARS, bs as ParsedResponse, bt as ParsedSlashCommand, bu as ParsedStructuredResponse, bv as PendingAuthResponse, bw as PersonKey, bx as PersonalConnectionInput, by as PlanStepsError, bz as PlanWorkRequest, bA as ProductResponse, bB as ProjectAddonKind, bC as ProjectAddonSettingsRequest, bD as ProjectBudget, bE as ProjectCheckoutRequest, bF as ProjectConversationUsageResponse, bG as ProjectCreateOptions, bH as ProjectDetails, bI as ProjectEventKind, bJ as ProjectEventResponse, bK as ProjectInvoicesResponse, bL as ProjectNextPeriodAddonsRequest, bM as ProjectPlanChangeRequest, bN as ProjectQuoteRequest, bO as ProjectResponse, bP as ProjectUpdateRequest, bQ as ProjectUsageResponse, bR as PublicBookingError, bS as PublicBookingPage, bT as QuotaExceeded, bU as RaisedSignal, bV as RawResponseEvent, bW as ReconnectOptions, bX as ReconnectableWsConnection, bY as ResolvedCitation, b_ as RespondParams, b$ as RespondPartstat, c0 as Response, c1 as ResponseCreateRequest, c2 as ResponseCreateResult, c3 as ResponseHandle, c4 as ResponseSnapshot, c5 as ResponseStart, c6 as ResponseStartOptions, c7 as ResponseStream, c8 as ResponseStreamEvent, c9 as ResponseTools, ca as RoomCreateBody, cb as RoomQuery, cc as RoomRead, cd as RunProgress, ce as RunStats, cf as RunStep, cg as RunWaitingOn, ch as SHAREPOINT_VENDORS, ci as SSEEvent, cj as SSEStreamCallbacks, ck as SSEStreamOutcome, cl as SSEStreamResult, cn as STOP_ID_WAIT_MS, co as STOP_REPEAT_WINDOW_MS, cq as ScopedTarget, cr as SearchChunk, cs as SendBack, ct as ShareRead, cu as ShareRole, cv as SkillSummary, cw as SkippedFile, cx as SlackConnectionStatus, cy as StepActionRequest, cz as StepActivityEvent, cA as StepAssignee, cB as StepDisplay, cC as StepField, cF as StepKind, cG as StepPhase, cH as StepSignal, cI as StepSignalWhen, cJ as StepState, cK as StepStatus, cL as SubagentBranchRecord, cM as SubagentLaneInfo, cN as SubmitBackgroundQueryOptions, cO as SubscribeParams, cP as SyncTriggerResult, cQ as TAG_KINDS, cR as TAG_NESTING_MAX_DEPTH, cS as TagChange, cT as TagFieldDefinition, cU as TagGroup, cV as TagKind, cW as TagKindField, cX as TagKindSchema, cY as TagLinks, cZ as TagListQuery, c_ as TagNode, c$ as TagResponse, d0 as TagScope, d1 as TagTreeRow, d2 as TaskPlan, d3 as TaskPlanStep, d4 as TaxQuoteResponse, d5 as Thread, d6 as ThreadsResponse, d7 as TimeSuggestion, d8 as TurnRequest, d9 as UpdateConversationRequest, da as UpdateFactRequest, db as UpdateWorkflowRequest, df as UploadDocumentsOptions, dg as UploadOptions, dh as UploadProgressListener, di as UploadResult, dj as UsageBreakdown, dk as UserConnectorEntry, dl as UserDailyUsageResponse, dm as UserInfo, dn as WebSocketAuthError, dp as WeeklyHoursSpec, dq as WorkStatus, dr as WorkflowAuthMode, ds as WorkflowResponse, dt as WorkflowRunHistoryResponse, du as WorkflowRunResponse, dv as WorkspaceConflict, dw as WorkspaceContext, dx as WorkspaceOpenResponse, dy as WorkspaceResponse, dz as WsConnection, dA as account, dB as agentconfig, dD as appendTranscriptionHints, dE as assistant, dF as authenticatedFetch, dG as bookPublicSlot, dH as buildCitationChunkData, dJ as buildDocumentTools, dK as buildFactsContextTool, dL as buildRetrievalChunkTool, dM as buildRetrievalFullContextTool, dN as buildRetrievalTocTool, dO as buildTurnRequest, dP as calendar, dQ as calls, dR as canTagHaveParent, dS as cancelPublicBooking, dT as capabilities, dU as chats, dV as composeConfiguration, dW as composeTools, dX as computeRunStats, dY as connectErrorMessage, dZ as connectWebSocket, d_ as connectWithReconnect, d$ as connectors, e0 as contacts, e1 as continuityPrompt, e2 as conversations, e3 as countCitations, e4 as createAuthenticatedClient, e6 as createIndexAssigner, e7 as databases, e8 as defaultKindForFormat, e9 as doctags, ea as documentTools, eb as documents, ec as estimateDraftTokens, ed as extractDocumentIdsFromMessages, ee as extractFactIdsFromMessages, ef as extractSubagentLanes, eg as facts, eh as files, ei as filterDocumentTags, ej as filterSkills, ek as findLeafForTaskMessage, el as findMainSiblingLeaf, em as findReplyTarget, en as findSubagentRunId, eo as flattenTagTree, ep as formatAgentStepLabel, eq as formatFileSize, er as formatGbp, es as formatGbpPerMillionTokens, et as formatItemLabel, ev as formatTokens, ew as formatUserName, ex 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, eJ as getErrorCode, 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 instructions, eZ as isAnnotationTag, e_ as isConnectorVendorVisible, e$ as isDriveSyncVendor, f0 as isEntityTag, f1 as isFlatKind, f2 as isLabelTag, f3 as isMailboxSyncVendor, f4 as isNearAiUsageBudget, f5 as isPresenceTag, f6 as isSharePointVendor, f7 as isSharedSkill, f8 as isTraceItem, f9 as mail, fa as mcpTools, fb as mergeAgentSteps, fc as modelConnections, fd as notifications, fe as parseSSEEvents, ff as parseSlashCommand, fg as parseSlashTokenInProgress, fh as parseStructuredResponse, fi as performPasswordLogin, fl as pickMainThread, fm as profile, fn as progressFetch, fo as projects, fp as quotaExceededFrom, fq as quotaFromStreamError, fr as reduceOutputItem, fs as refusalReason, ft as requireData, fu as requireOk, fv as resolveAuth, fw as resolveCitations, fx as resolveSummary, fy as resolveWorkspace, fz as responses, fA as searchChunks, fB as selectFullContextDocument, fC as selectWorkspace, fD as selectWorkspaceById, fE as sessions, fF as settings, fH as sliceToSubagentThread, fI as streamSSE, fJ as stripCitationMarkdown, fK as subagentJobLabel, fL as summarizeCitations, fM as tagUseCount, fN as tags, fO as tagsForScope, fP as tagsOfGroup, fQ as topLevelAgentSteps, fS as usdToGbp, fT as work, fU as workflowSteps, fV as workflows, fW as workspaceConflictOf, fX as workspaces, fY as wouldCreateTagCycle } from './browser-BsuUurv5.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, j as ArbiSessionExpiredError, k as ArbiStructuredOutputError, l as ArbiTransportError, m as ArbiWorkspaceChangedError, n as ArbiWorkspaceSupersededError, o as ArbiWorkspaceUnavailableError, p as AskHandlers, q as AskRequest, r as AttendeeRead, s as AuthContext, t as AuthHeaders, u as AuthMode, v as AuthenticatedClient, B as BookingConfirmation, w as BookingPage, x as BookingPageWriteBody, y as BookingRequestBody, z as BridgeTokensOptions, C as CalDavConnectBody, D as CalDavProfile, E as CalendarAccount, F as CalendarAccountKind, G as CalendarCreateBody, H as CalendarEvent, I as CalendarKeys, J as CalendarRead, K as CalendarSettings, L as CalendarSettingsBody, M as CalendarUpdate, N as CalendarWindow, O as CallApiError, P as Capabilities, Q as ChatAttachmentFile, R as ChatAttachmentInput, S as ChatCryptoContext, T as ChatKeyRing, U as ChatKind, V as ChatMemberKey, W as ChatMemberResponse, X as ChatMessage, Y as ChatMessageResponse, Z as ChatResponse, _ as ChatSession, $ as CitationSummary, a0 as CitationToolSources, a1 as CliConfig, a2 as CliCredentials, a3 as CommandDescriptor, a4 as ConfigStore, a5 as Configuration, a6 as ConfigurationPatch, a7 as ConnectOptions, a8 as ConnectionModel, a9 as ConnectorCatalogEntry, aa as ConnectorFolder, ab as ConnectorSyncProgress, ac as ConnectorSyncStatus, ad as ConnectorVendorKey, ae as ConnectorVisibilitySettings, af as ContextUsage, ag as ConversationResponse, ah as ConversationUsageResponse, ai as CreateFactRequest, aj as CreateFactsRequest, ak as CreateWorkRequest, al as CreateWorkflowRequest, am as DEFAULT_AI_USD_PER_GBP, ao as DRIVE_SYNC_VENDORS, ap as Database, aq as DatabaseAggregateRequest, ar as DatabaseAggregateResult, as as DatabaseColumn, at as DatabaseColumnWrite, au as DatabaseImportResult, av as DatabaseRow, aw as DatabaseRowPage, ax as DatabaseRowsQuery, ay as DateTimeSpec, aA as DecryptedChatMessage, aB as DeploymentHouseTemplate, aC as DirectModelUsage, aD as DocInfo, aE as DocInfoMap, aG as DocumentAutomationAction, aJ as DocumentSelector, aM as DriveSyncProgress, aN as DriveSyncSummary, aO as DuplicateContactError, aP as ENTITY_KINDS, aQ as EditScope, aR as EntityKind, aS as EventCreateBody, aT as EventPatchBody, aU as FLAT_TAG_KINDS, aV as FactResponse, aW as FactSearchRequest, aX as FactSearchResponse, aY as FindTimeParams, a_ as FreeBusyEntry, a$ as FullContextSelection, b0 as GOOGLE_VENDORS, b1 as HolidayCountry, b2 as HouseTemplateCandidate, b3 as IMANAGE_VENDORS, b4 as IdentityErrorCode, b5 as IdentityPurchase, b6 as IdentityState, b7 as IdentityStatus, b8 as ImportResult, b9 as InvitationRead, ba as JsonSchemaOutputFormat, bb as LinkedRun, bd as ListEventsParams, be as ListFactsOptions, bg as MAILBOX_SYNC_VENDORS, bh as MAX_RETRIEVE_DOC_IDS, bi as MICROSOFT_VENDORS, bl as ModelConnection, bm as OAuthAccountKind, bn as OutputItemDone, bo as OverlayItem, bp as OverlayLayerName, bq as PRESENCE_KINDS, br as PROMPT_CONTEXT_CHARS, bs as ParsedResponse, bt as ParsedSlashCommand, bu as ParsedStructuredResponse, bv as PendingAuthResponse, bw as PersonKey, bx as PersonalConnectionInput, by as PlanStepsError, bz as PlanWorkRequest, bA as ProductResponse, bB as ProjectAddonKind, bC as ProjectAddonSettingsRequest, bD as ProjectBudget, bE as ProjectCheckoutRequest, bF as ProjectConversationUsageResponse, bG as ProjectCreateOptions, bH as ProjectDetails, bI as ProjectEventKind, bJ as ProjectEventResponse, bK as ProjectInvoicesResponse, bL as ProjectNextPeriodAddonsRequest, bM as ProjectPlanChangeRequest, bN as ProjectQuoteRequest, bO as ProjectResponse, bP as ProjectUpdateRequest, bQ as ProjectUsageResponse, bR as PublicBookingError, bS as PublicBookingPage, bT as QuotaExceeded, bU as RaisedSignal, bV as RawResponseEvent, bW as ReconnectOptions, bX as ReconnectableWsConnection, bY as ResolvedCitation, b_ as RespondParams, b$ as RespondPartstat, c0 as Response, c1 as ResponseCreateRequest, c2 as ResponseCreateResult, c3 as ResponseHandle, c4 as ResponseSnapshot, c5 as ResponseStart, c6 as ResponseStartOptions, c7 as ResponseStream, c8 as ResponseStreamEvent, c9 as ResponseTools, ca as RoomCreateBody, cb as RoomQuery, cc as RoomRead, cd as RunProgress, ce as RunStats, cf as RunStep, cg as RunWaitingOn, ch as SHAREPOINT_VENDORS, ci as SSEEvent, cj as SSEStreamCallbacks, ck as SSEStreamOutcome, cl as SSEStreamResult, cn as STOP_ID_WAIT_MS, co as STOP_REPEAT_WINDOW_MS, cq as ScopedTarget, cr as SearchChunk, cs as SendBack, ct as ShareRead, cu as ShareRole, cv as SkillSummary, cw as SkippedFile, cx as SlackConnectionStatus, cy as StepActionRequest, cz as StepActivityEvent, cA as StepAssignee, cB as StepDisplay, cC as StepField, cF as StepKind, cG as StepPhase, cH as StepSignal, cI as StepSignalWhen, cJ as StepState, cK as StepStatus, cL as SubagentBranchRecord, cM as SubagentLaneInfo, cN as SubmitBackgroundQueryOptions, cO as SubscribeParams, cP as SyncTriggerResult, cQ as TAG_KINDS, cR as TAG_NESTING_MAX_DEPTH, cS as TagChange, cT as TagFieldDefinition, cU as TagGroup, cV as TagKind, cW as TagKindField, cX as TagKindSchema, cY as TagLinks, cZ as TagListQuery, c_ as TagNode, c$ as TagResponse, d0 as TagScope, d1 as TagTreeRow, d2 as TaskPlan, d3 as TaskPlanStep, d4 as TaxQuoteResponse, d5 as Thread, d6 as ThreadsResponse, d7 as TimeSuggestion, d8 as TurnRequest, d9 as UpdateConversationRequest, da as UpdateFactRequest, db as UpdateWorkflowRequest, df as UploadDocumentsOptions, dg as UploadOptions, dh as UploadProgressListener, di as UploadResult, dj as UsageBreakdown, dk as UserConnectorEntry, dl as UserDailyUsageResponse, dm as UserInfo, dn as WebSocketAuthError, dp as WeeklyHoursSpec, dq as WorkStatus, dr as WorkflowAuthMode, ds as WorkflowResponse, dt as WorkflowRunHistoryResponse, du as WorkflowRunResponse, dv as WorkspaceConflict, dw as WorkspaceContext, dx as WorkspaceOpenResponse, dy as WorkspaceResponse, dz as WsConnection, dA as account, dB as agentconfig, dD as appendTranscriptionHints, dE as assistant, dF as authenticatedFetch, dG as bookPublicSlot, dH as buildCitationChunkData, dJ as buildDocumentTools, dK as buildFactsContextTool, dL as buildRetrievalChunkTool, dM as buildRetrievalFullContextTool, dN as buildRetrievalTocTool, dO as buildTurnRequest, dP as calendar, dQ as calls, dR as canTagHaveParent, dS as cancelPublicBooking, dT as capabilities, dU as chats, dV as composeConfiguration, dW as composeTools, dX as computeRunStats, dY as connectErrorMessage, dZ as connectWebSocket, d_ as connectWithReconnect, d$ as connectors, e0 as contacts, e1 as continuityPrompt, e2 as conversations, e3 as countCitations, e4 as createAuthenticatedClient, e6 as createIndexAssigner, e7 as databases, e8 as defaultKindForFormat, e9 as doctags, ea as documentTools, eb as documents, ec as estimateDraftTokens, ed as extractDocumentIdsFromMessages, ee as extractFactIdsFromMessages, ef as extractSubagentLanes, eg as facts, eh as files, ei as filterDocumentTags, ej as filterSkills, ek as findLeafForTaskMessage, el as findMainSiblingLeaf, em as findReplyTarget, en as findSubagentRunId, eo as flattenTagTree, ep as formatAgentStepLabel, eq as formatFileSize, er as formatGbp, es as formatGbpPerMillionTokens, et as formatItemLabel, ev as formatTokens, ew as formatUserName, ex 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, eJ as getErrorCode, 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 instructions, eZ as isAnnotationTag, e_ as isConnectorVendorVisible, e$ as isDriveSyncVendor, f0 as isEntityTag, f1 as isFlatKind, f2 as isLabelTag, f3 as isMailboxSyncVendor, f4 as isNearAiUsageBudget, f5 as isPresenceTag, f6 as isSharePointVendor, f7 as isSharedSkill, f8 as isTraceItem, f9 as mail, fa as mcpTools, fb as mergeAgentSteps, fc as modelConnections, fd as notifications, fe as parseSSEEvents, ff as parseSlashCommand, fg as parseSlashTokenInProgress, fh as parseStructuredResponse, fi as performPasswordLogin, fl as pickMainThread, fm as profile, fn as progressFetch, fo as projects, fp as quotaExceededFrom, fq as quotaFromStreamError, fr as reduceOutputItem, fs as refusalReason, ft as requireData, fu as requireOk, fv as resolveAuth, fw as resolveCitations, fx as resolveSummary, fy as resolveWorkspace, fz as responses, fA as searchChunks, fB as selectFullContextDocument, fC as selectWorkspace, fD as selectWorkspaceById, fE as sessions, fF as settings, fH as sliceToSubagentThread, fI as streamSSE, fJ as stripCitationMarkdown, fK as subagentJobLabel, fL as summarizeCitations, fM as tagUseCount, fN as tags, fO as tagsForScope, fP as tagsOfGroup, fQ as topLevelAgentSteps, fS as usdToGbp, fT as work, fU as workflowSteps, fV as workflows, fW as workspaceConflictOf, fX as workspaces, fY as wouldCreateTagCycle } from './browser-CuDnbE8Y.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, HttpErrorInfo, HttpRequestInfo, HttpResponseInfo, HttpTransportOptions, LoginProfile, SessionPersistence } 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, j as ArbiSessionExpiredError, k as ArbiStructuredOutputError, l as ArbiTransportError, m as ArbiWorkspaceChangedError, n as ArbiWorkspaceSupersededError, o as ArbiWorkspaceUnavailableError, p as AskHandlers, q as AskRequest, r as AttendeeRead, s as AuthContext, t as AuthHeaders, u as AuthMode, v as AuthenticatedClient, B as BookingConfirmation, w as BookingPage, x as BookingPageWriteBody, y as BookingRequestBody, z as BridgeTokensOptions, C as CalDavConnectBody, D as CalDavProfile, E as CalendarAccount, F as CalendarAccountKind, G as CalendarCreateBody, H as CalendarEvent, I as CalendarKeys, J as CalendarRead, K as CalendarSettings, L as CalendarSettingsBody, M as CalendarUpdate, N as CalendarWindow, O as CallApiError, P as Capabilities, Q as ChatAttachmentFile, R as ChatAttachmentInput, S as ChatCryptoContext, T as ChatKeyRing, U as ChatKind, V as ChatMemberKey, W as ChatMemberResponse, X as ChatMessage, Y as ChatMessageResponse, Z as ChatResponse, _ as ChatSession, $ as CitationSummary, a0 as CitationToolSources, a1 as CliConfig, a2 as CliCredentials, a3 as CommandDescriptor, a4 as ConfigStore, a5 as Configuration, a6 as ConfigurationPatch, a7 as ConnectOptions, a8 as ConnectionModel, a9 as ConnectorCatalogEntry, aa as ConnectorFolder, ab as ConnectorSyncProgress, ac as ConnectorSyncStatus, ad as ConnectorVendorKey, ae as ConnectorVisibilitySettings, af as ContextUsage, ag as ConversationResponse, ah as ConversationUsageResponse, ai as CreateFactRequest, aj as CreateFactsRequest, ak as CreateWorkRequest, al as CreateWorkflowRequest, am as DEFAULT_AI_USD_PER_GBP, ao as DRIVE_SYNC_VENDORS, ap as Database, aq as DatabaseAggregateRequest, ar as DatabaseAggregateResult, as as DatabaseColumn, at as DatabaseColumnWrite, au as DatabaseImportResult, av as DatabaseRow, aw as DatabaseRowPage, ax as DatabaseRowsQuery, ay as DateTimeSpec, aA as DecryptedChatMessage, aB as DeploymentHouseTemplate, aC as DirectModelUsage, aD as DocInfo, aE as DocInfoMap, aG as DocumentAutomationAction, aJ as DocumentSelector, aM as DriveSyncProgress, aN as DriveSyncSummary, aO as DuplicateContactError, aP as ENTITY_KINDS, aQ as EditScope, aR as EntityKind, aS as EventCreateBody, aT as EventPatchBody, aU as FLAT_TAG_KINDS, aV as FactResponse, aW as FactSearchRequest, aX as FactSearchResponse, aY as FindTimeParams, a_ as FreeBusyEntry, a$ as FullContextSelection, b0 as GOOGLE_VENDORS, b1 as HolidayCountry, b2 as HouseTemplateCandidate, b3 as IMANAGE_VENDORS, b4 as IdentityErrorCode, b5 as IdentityPurchase, b6 as IdentityState, b7 as IdentityStatus, b8 as ImportResult, b9 as InvitationRead, ba as JsonSchemaOutputFormat, bb as LinkedRun, bd as ListEventsParams, be as ListFactsOptions, bg as MAILBOX_SYNC_VENDORS, bh as MAX_RETRIEVE_DOC_IDS, bi as MICROSOFT_VENDORS, bl as ModelConnection, bm as OAuthAccountKind, bn as OutputItemDone, bo as OverlayItem, bp as OverlayLayerName, bq as PRESENCE_KINDS, br as PROMPT_CONTEXT_CHARS, bs as ParsedResponse, bt as ParsedSlashCommand, bu as ParsedStructuredResponse, bv as PendingAuthResponse, bw as PersonKey, bx as PersonalConnectionInput, by as PlanStepsError, bz as PlanWorkRequest, bA as ProductResponse, bB as ProjectAddonKind, bC as ProjectAddonSettingsRequest, bD as ProjectBudget, bE as ProjectCheckoutRequest, bF as ProjectConversationUsageResponse, bG as ProjectCreateOptions, bH as ProjectDetails, bI as ProjectEventKind, bJ as ProjectEventResponse, bK as ProjectInvoicesResponse, bL as ProjectNextPeriodAddonsRequest, bM as ProjectPlanChangeRequest, bN as ProjectQuoteRequest, bO as ProjectResponse, bP as ProjectUpdateRequest, bQ as ProjectUsageResponse, bR as PublicBookingError, bS as PublicBookingPage, bT as QuotaExceeded, bU as RaisedSignal, bV as RawResponseEvent, bW as ReconnectOptions, bX as ReconnectableWsConnection, bY as ResolvedCitation, b_ as RespondParams, b$ as RespondPartstat, c0 as Response, c1 as ResponseCreateRequest, c2 as ResponseCreateResult, c3 as ResponseHandle, c4 as ResponseSnapshot, c5 as ResponseStart, c6 as ResponseStartOptions, c7 as ResponseStream, c8 as ResponseStreamEvent, c9 as ResponseTools, ca as RoomCreateBody, cb as RoomQuery, cc as RoomRead, cd as RunProgress, ce as RunStats, cf as RunStep, cg as RunWaitingOn, ch as SHAREPOINT_VENDORS, ci as SSEEvent, cj as SSEStreamCallbacks, ck as SSEStreamOutcome, cl as SSEStreamResult, cn as STOP_ID_WAIT_MS, co as STOP_REPEAT_WINDOW_MS, cq as ScopedTarget, cr as SearchChunk, cs as SendBack, ct as ShareRead, cu as ShareRole, cv as SkillSummary, cw as SkippedFile, cx as SlackConnectionStatus, cy as StepActionRequest, cz as StepActivityEvent, cA as StepAssignee, cB as StepDisplay, cC as StepField, cF as StepKind, cG as StepPhase, cH as StepSignal, cI as StepSignalWhen, cJ as StepState, cK as StepStatus, cL as SubagentBranchRecord, cM as SubagentLaneInfo, cN as SubmitBackgroundQueryOptions, cO as SubscribeParams, cP as SyncTriggerResult, cQ as TAG_KINDS, cR as TAG_NESTING_MAX_DEPTH, cS as TagChange, cT as TagFieldDefinition, cU as TagGroup, cV as TagKind, cW as TagKindField, cX as TagKindSchema, cY as TagLinks, cZ as TagListQuery, c_ as TagNode, c$ as TagResponse, d0 as TagScope, d1 as TagTreeRow, d2 as TaskPlan, d3 as TaskPlanStep, d4 as TaxQuoteResponse, d5 as Thread, d6 as ThreadsResponse, d7 as TimeSuggestion, d8 as TurnRequest, d9 as UpdateConversationRequest, da as UpdateFactRequest, db as UpdateWorkflowRequest, df as UploadDocumentsOptions, dg as UploadOptions, dh as UploadProgressListener, di as UploadResult, dj as UsageBreakdown, dk as UserConnectorEntry, dl as UserDailyUsageResponse, dm as UserInfo, dn as WebSocketAuthError, dp as WeeklyHoursSpec, dq as WorkStatus, dr as WorkflowAuthMode, ds as WorkflowResponse, dt as WorkflowRunHistoryResponse, du as WorkflowRunResponse, dv as WorkspaceConflict, dw as WorkspaceContext, dx as WorkspaceOpenResponse, dy as WorkspaceResponse, dz as WsConnection, dA as account, dB as agentconfig, dD as appendTranscriptionHints, dE as assistant, dF as authenticatedFetch, dG as bookPublicSlot, dH as buildCitationChunkData, dJ as buildDocumentTools, dK as buildFactsContextTool, dL as buildRetrievalChunkTool, dM as buildRetrievalFullContextTool, dN as buildRetrievalTocTool, dO as buildTurnRequest, dP as calendar, dQ as calls, dR as canTagHaveParent, dS as cancelPublicBooking, dT as capabilities, dU as chats, dV as composeConfiguration, dW as composeTools, dX as computeRunStats, dY as connectErrorMessage, dZ as connectWebSocket, d_ as connectWithReconnect, d$ as connectors, e0 as contacts, e1 as continuityPrompt, e2 as conversations, e3 as countCitations, e4 as createAuthenticatedClient, e6 as createIndexAssigner, e7 as databases, e8 as defaultKindForFormat, e9 as doctags, ea as documentTools, eb as documents, ec as estimateDraftTokens, ed as extractDocumentIdsFromMessages, ee as extractFactIdsFromMessages, ef as extractSubagentLanes, eg as facts, eh as files, ei as filterDocumentTags, ej as filterSkills, ek as findLeafForTaskMessage, el as findMainSiblingLeaf, em as findReplyTarget, en as findSubagentRunId, eo as flattenTagTree, ep as formatAgentStepLabel, eq as formatFileSize, er as formatGbp, es as formatGbpPerMillionTokens, et as formatItemLabel, ev as formatTokens, ew as formatUserName, ex 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, eJ as getErrorCode, 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 instructions, eZ as isAnnotationTag, e_ as isConnectorVendorVisible, e$ as isDriveSyncVendor, f0 as isEntityTag, f1 as isFlatKind, f2 as isLabelTag, f3 as isMailboxSyncVendor, f4 as isNearAiUsageBudget, f5 as isPresenceTag, f6 as isSharePointVendor, f7 as isSharedSkill, f8 as isTraceItem, f9 as mail, fa as mcpTools, fb as mergeAgentSteps, fc as modelConnections, fd as notifications, fe as parseSSEEvents, ff as parseSlashCommand, fg as parseSlashTokenInProgress, fh as parseStructuredResponse, fi as performPasswordLogin, fl as pickMainThread, fm as profile, fn as progressFetch, fo as projects, fp as quotaExceededFrom, fq as quotaFromStreamError, fr as reduceOutputItem, fs as refusalReason, ft as requireData, fu as requireOk, fv as resolveAuth, fw as resolveCitations, fx as resolveSummary, fy as resolveWorkspace, fz as responses, fA as searchChunks, fB as selectFullContextDocument, fC as selectWorkspace, fD as selectWorkspaceById, fE as sessions, fF as settings, fH as sliceToSubagentThread, fI as streamSSE, fJ as stripCitationMarkdown, fK as subagentJobLabel, fL as summarizeCitations, fM as tagUseCount, fN as tags, fO as tagsForScope, fP as tagsOfGroup, fQ as topLevelAgentSteps, fS as usdToGbp, fT as work, fU as workflowSteps, fV as workflows, fW as workspaceConflictOf, fX as workspaces, fY as wouldCreateTagCycle } from './browser-D0iEy5W9.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, j as ArbiSessionExpiredError, k as ArbiStructuredOutputError, l as ArbiTransportError, m as ArbiWorkspaceChangedError, n as ArbiWorkspaceSupersededError, o as ArbiWorkspaceUnavailableError, p as AskHandlers, q as AskRequest, r as AttendeeRead, s as AuthContext, t as AuthHeaders, u as AuthMode, v as AuthenticatedClient, B as BookingConfirmation, w as BookingPage, x as BookingPageWriteBody, y as BookingRequestBody, z as BridgeTokensOptions, C as CalDavConnectBody, D as CalDavProfile, E as CalendarAccount, F as CalendarAccountKind, G as CalendarCreateBody, H as CalendarEvent, I as CalendarKeys, J as CalendarRead, K as CalendarSettings, L as CalendarSettingsBody, M as CalendarUpdate, N as CalendarWindow, O as CallApiError, P as Capabilities, Q as ChatAttachmentFile, R as ChatAttachmentInput, S as ChatCryptoContext, T as ChatKeyRing, U as ChatKind, V as ChatMemberKey, W as ChatMemberResponse, X as ChatMessage, Y as ChatMessageResponse, Z as ChatResponse, _ as ChatSession, $ as CitationSummary, a0 as CitationToolSources, a1 as CliConfig, a2 as CliCredentials, a3 as CommandDescriptor, a4 as ConfigStore, a5 as Configuration, a6 as ConfigurationPatch, a7 as ConnectOptions, a8 as ConnectionModel, a9 as ConnectorCatalogEntry, aa as ConnectorFolder, ab as ConnectorSyncProgress, ac as ConnectorSyncStatus, ad as ConnectorVendorKey, ae as ConnectorVisibilitySettings, af as ContextUsage, ag as ConversationResponse, ah as ConversationUsageResponse, ai as CreateFactRequest, aj as CreateFactsRequest, ak as CreateWorkRequest, al as CreateWorkflowRequest, am as DEFAULT_AI_USD_PER_GBP, ao as DRIVE_SYNC_VENDORS, ap as Database, aq as DatabaseAggregateRequest, ar as DatabaseAggregateResult, as as DatabaseColumn, at as DatabaseColumnWrite, au as DatabaseImportResult, av as DatabaseRow, aw as DatabaseRowPage, ax as DatabaseRowsQuery, ay as DateTimeSpec, aA as DecryptedChatMessage, aB as DeploymentHouseTemplate, aC as DirectModelUsage, aD as DocInfo, aE as DocInfoMap, aG as DocumentAutomationAction, aJ as DocumentSelector, aM as DriveSyncProgress, aN as DriveSyncSummary, aO as DuplicateContactError, aP as ENTITY_KINDS, aQ as EditScope, aR as EntityKind, aS as EventCreateBody, aT as EventPatchBody, aU as FLAT_TAG_KINDS, aV as FactResponse, aW as FactSearchRequest, aX as FactSearchResponse, aY as FindTimeParams, a_ as FreeBusyEntry, a$ as FullContextSelection, b0 as GOOGLE_VENDORS, b1 as HolidayCountry, b2 as HouseTemplateCandidate, b3 as IMANAGE_VENDORS, b4 as IdentityErrorCode, b5 as IdentityPurchase, b6 as IdentityState, b7 as IdentityStatus, b8 as ImportResult, b9 as InvitationRead, ba as JsonSchemaOutputFormat, bb as LinkedRun, bd as ListEventsParams, be as ListFactsOptions, bg as MAILBOX_SYNC_VENDORS, bh as MAX_RETRIEVE_DOC_IDS, bi as MICROSOFT_VENDORS, bl as ModelConnection, bm as OAuthAccountKind, bn as OutputItemDone, bo as OverlayItem, bp as OverlayLayerName, bq as PRESENCE_KINDS, br as PROMPT_CONTEXT_CHARS, bs as ParsedResponse, bt as ParsedSlashCommand, bu as ParsedStructuredResponse, bv as PendingAuthResponse, bw as PersonKey, bx as PersonalConnectionInput, by as PlanStepsError, bz as PlanWorkRequest, bA as ProductResponse, bB as ProjectAddonKind, bC as ProjectAddonSettingsRequest, bD as ProjectBudget, bE as ProjectCheckoutRequest, bF as ProjectConversationUsageResponse, bG as ProjectCreateOptions, bH as ProjectDetails, bI as ProjectEventKind, bJ as ProjectEventResponse, bK as ProjectInvoicesResponse, bL as ProjectNextPeriodAddonsRequest, bM as ProjectPlanChangeRequest, bN as ProjectQuoteRequest, bO as ProjectResponse, bP as ProjectUpdateRequest, bQ as ProjectUsageResponse, bR as PublicBookingError, bS as PublicBookingPage, bT as QuotaExceeded, bU as RaisedSignal, bV as RawResponseEvent, bW as ReconnectOptions, bX as ReconnectableWsConnection, bY as ResolvedCitation, b_ as RespondParams, b$ as RespondPartstat, c0 as Response, c1 as ResponseCreateRequest, c2 as ResponseCreateResult, c3 as ResponseHandle, c4 as ResponseSnapshot, c5 as ResponseStart, c6 as ResponseStartOptions, c7 as ResponseStream, c8 as ResponseStreamEvent, c9 as ResponseTools, ca as RoomCreateBody, cb as RoomQuery, cc as RoomRead, cd as RunProgress, ce as RunStats, cf as RunStep, cg as RunWaitingOn, ch as SHAREPOINT_VENDORS, ci as SSEEvent, cj as SSEStreamCallbacks, ck as SSEStreamOutcome, cl as SSEStreamResult, cn as STOP_ID_WAIT_MS, co as STOP_REPEAT_WINDOW_MS, cq as ScopedTarget, cr as SearchChunk, cs as SendBack, ct as ShareRead, cu as ShareRole, cv as SkillSummary, cw as SkippedFile, cx as SlackConnectionStatus, cy as StepActionRequest, cz as StepActivityEvent, cA as StepAssignee, cB as StepDisplay, cC as StepField, cF as StepKind, cG as StepPhase, cH as StepSignal, cI as StepSignalWhen, cJ as StepState, cK as StepStatus, cL as SubagentBranchRecord, cM as SubagentLaneInfo, cN as SubmitBackgroundQueryOptions, cO as SubscribeParams, cP as SyncTriggerResult, cQ as TAG_KINDS, cR as TAG_NESTING_MAX_DEPTH, cS as TagChange, cT as TagFieldDefinition, cU as TagGroup, cV as TagKind, cW as TagKindField, cX as TagKindSchema, cY as TagLinks, cZ as TagListQuery, c_ as TagNode, c$ as TagResponse, d0 as TagScope, d1 as TagTreeRow, d2 as TaskPlan, d3 as TaskPlanStep, d4 as TaxQuoteResponse, d5 as Thread, d6 as ThreadsResponse, d7 as TimeSuggestion, d8 as TurnRequest, d9 as UpdateConversationRequest, da as UpdateFactRequest, db as UpdateWorkflowRequest, df as UploadDocumentsOptions, dg as UploadOptions, dh as UploadProgressListener, di as UploadResult, dj as UsageBreakdown, dk as UserConnectorEntry, dl as UserDailyUsageResponse, dm as UserInfo, dn as WebSocketAuthError, dp as WeeklyHoursSpec, dq as WorkStatus, dr as WorkflowAuthMode, ds as WorkflowResponse, dt as WorkflowRunHistoryResponse, du as WorkflowRunResponse, dv as WorkspaceConflict, dw as WorkspaceContext, dx as WorkspaceOpenResponse, dy as WorkspaceResponse, dz as WsConnection, dA as account, dB as agentconfig, dD as appendTranscriptionHints, dE as assistant, dF as authenticatedFetch, dG as bookPublicSlot, dH as buildCitationChunkData, dJ as buildDocumentTools, dK as buildFactsContextTool, dL as buildRetrievalChunkTool, dM as buildRetrievalFullContextTool, dN as buildRetrievalTocTool, dO as buildTurnRequest, dP as calendar, dQ as calls, dR as canTagHaveParent, dS as cancelPublicBooking, dT as capabilities, dU as chats, dV as composeConfiguration, dW as composeTools, dX as computeRunStats, dY as connectErrorMessage, dZ as connectWebSocket, d_ as connectWithReconnect, d$ as connectors, e0 as contacts, e1 as continuityPrompt, e2 as conversations, e3 as countCitations, e4 as createAuthenticatedClient, e6 as createIndexAssigner, e7 as databases, e8 as defaultKindForFormat, e9 as doctags, ea as documentTools, eb as documents, ec as estimateDraftTokens, ed as extractDocumentIdsFromMessages, ee as extractFactIdsFromMessages, ef as extractSubagentLanes, eg as facts, eh as files, ei as filterDocumentTags, ej as filterSkills, ek as findLeafForTaskMessage, el as findMainSiblingLeaf, em as findReplyTarget, en as findSubagentRunId, eo as flattenTagTree, ep as formatAgentStepLabel, eq as formatFileSize, er as formatGbp, es as formatGbpPerMillionTokens, et as formatItemLabel, ev as formatTokens, ew as formatUserName, ex 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, eJ as getErrorCode, 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 instructions, eZ as isAnnotationTag, e_ as isConnectorVendorVisible, e$ as isDriveSyncVendor, f0 as isEntityTag, f1 as isFlatKind, f2 as isLabelTag, f3 as isMailboxSyncVendor, f4 as isNearAiUsageBudget, f5 as isPresenceTag, f6 as isSharePointVendor, f7 as isSharedSkill, f8 as isTraceItem, f9 as mail, fa as mcpTools, fb as mergeAgentSteps, fc as modelConnections, fd as notifications, fe as parseSSEEvents, ff as parseSlashCommand, fg as parseSlashTokenInProgress, fh as parseStructuredResponse, fi as performPasswordLogin, fl as pickMainThread, fm as profile, fn as progressFetch, fo as projects, fp as quotaExceededFrom, fq as quotaFromStreamError, fr as reduceOutputItem, fs as refusalReason, ft as requireData, fu as requireOk, fv as resolveAuth, fw as resolveCitations, fx as resolveSummary, fy as resolveWorkspace, fz as responses, fA as searchChunks, fB as selectFullContextDocument, fC as selectWorkspace, fD as selectWorkspaceById, fE as sessions, fF as settings, fH as sliceToSubagentThread, fI as streamSSE, fJ as stripCitationMarkdown, fK as subagentJobLabel, fL as summarizeCitations, fM as tagUseCount, fN as tags, fO as tagsForScope, fP as tagsOfGroup, fQ as topLevelAgentSteps, fS as usdToGbp, fT as work, fU as workflowSteps, fV as workflows, fW as workspaceConflictOf, fX as workspaces, fY as wouldCreateTagCycle } from './browser-BvdQbiFa.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, HttpErrorInfo, HttpRequestInfo, HttpResponseInfo, HttpTransportOptions, LoginProfile, SessionPersistence } from '@arbidocs/client';
package/dist/browser.js CHANGED
@@ -5477,16 +5477,40 @@ async function updateDocuments(arbi, documents) {
5477
5477
  "Failed to update documents"
5478
5478
  );
5479
5479
  }
5480
- async function uploadUrl(arbi, urls, shared = false, configExtId) {
5481
- return requireData(
5480
+ async function uploadUrl(arbi, urls, options) {
5481
+ return requireUploadData(
5482
5482
  await arbi.fetch.POST("/v1/document/upload-url", {
5483
5483
  params: {
5484
- query: { urls, shared, ...configExtId ? { config_ext_id: configExtId } : {} }
5484
+ query: {
5485
+ urls,
5486
+ shared: options.shared ?? false,
5487
+ workspace_ext_id: options.workspaceExtId,
5488
+ ...options.configExtId ? { config_ext_id: options.configExtId } : {}
5489
+ }
5485
5490
  }
5486
5491
  }),
5487
5492
  "Failed to upload from URLs"
5488
5493
  );
5489
5494
  }
5495
+ var UPLOAD_WORKSPACE_CONFLICT_MESSAGES = {
5496
+ workspace_mismatch: "These files were prepared for another workspace, so they were not saved. Upload them again.",
5497
+ workspace_key_required: "The workspace couldn't be unlocked for this upload, so the files were not saved."
5498
+ };
5499
+ function requireUploadData(result, message) {
5500
+ const status = result.response?.status;
5501
+ const conflict = result.error && status === 409 ? workspaceConflictOf(result.error) : null;
5502
+ if (conflict) {
5503
+ throw new ArbiApiError(
5504
+ UPLOAD_WORKSPACE_CONFLICT_MESSAGES[conflict.code],
5505
+ result.error,
5506
+ status,
5507
+ {
5508
+ code: conflict.code
5509
+ }
5510
+ );
5511
+ }
5512
+ return requireData(result, message);
5513
+ }
5490
5514
  async function uploadDocuments(arbi, files, options = {}) {
5491
5515
  const query2 = {};
5492
5516
  if (options.shared !== void 0) query2.shared = options.shared;
@@ -5511,7 +5535,7 @@ async function uploadDocuments(arbi, files, options = {}) {
5511
5535
  return form;
5512
5536
  }
5513
5537
  });
5514
- return requireData(result, "Failed to upload documents");
5538
+ return requireUploadData(result, "Failed to upload documents");
5515
5539
  }
5516
5540
  async function similarDocuments(arbi, options = {}) {
5517
5541
  return requireData(
@@ -5668,6 +5692,9 @@ async function presignedPut(url, body, onProgress, headers) {
5668
5692
  }
5669
5693
  }
5670
5694
  async function uploadDocumentsDirect(arbi, workspaceKey, files, options) {
5695
+ if (!options?.workspaceExtId) {
5696
+ throw new ArbiError("uploadDocumentsDirect needs options.workspaceExtId (the key's workspace)");
5697
+ }
5671
5698
  if (files.length === 0) return { doc_ext_ids: [], skipped: [] };
5672
5699
  const SECRETBOX_ENVELOPE_OVERHEAD = 40;
5673
5700
  const declared = files.map((f2) => ({
@@ -5679,21 +5706,19 @@ async function uploadDocumentsDirect(arbi, workspaceKey, files, options) {
5679
5706
  }));
5680
5707
  const initBody = {
5681
5708
  files: declared,
5682
- shared: options?.shared !== false,
5683
- config_ext_id: options?.configExtId ?? null,
5709
+ shared: options.shared !== false,
5710
+ config_ext_id: options.configExtId ?? null,
5684
5711
  // Only sent when set, so a plain upload is accepted by any server version.
5685
- ...options?.versionOf ? { version_of: options.versionOf } : {},
5686
- wp_type: options?.wpType ?? null,
5687
- tag_ext_id: options?.tagExtId ?? null,
5688
- folder: options?.folder ? sanitizeFolderPath(options.folder) : null,
5689
- presign_expires_in: options?.presignExpiresIn ?? 3600
5712
+ ...options.versionOf ? { version_of: options.versionOf } : {},
5713
+ wp_type: options.wpType ?? null,
5714
+ tag_ext_id: options.tagExtId ?? null,
5715
+ folder: options.folder ? sanitizeFolderPath(options.folder) : null,
5716
+ presign_expires_in: options.presignExpiresIn ?? 3600
5690
5717
  };
5691
- const guarded = options?.inWorkspace ?? ((send) => send());
5692
- const initResult = await guarded(
5693
- async () => requireData(
5694
- await arbi.fetch.POST("/v1/document/upload-init", { body: initBody }),
5695
- "Failed to initialize direct upload"
5696
- )
5718
+ const query2 = { workspace_ext_id: options.workspaceExtId };
5719
+ const initResult = requireUploadData(
5720
+ await arbi.fetch.POST("/v1/document/upload-init", { params: { query: query2 }, body: initBody }),
5721
+ "Failed to initialize direct upload"
5697
5722
  );
5698
5723
  const items = initResult.items ?? [];
5699
5724
  const bytesByName = /* @__PURE__ */ new Map();
@@ -5727,7 +5752,7 @@ async function uploadDocumentsDirect(arbi, workspaceKey, files, options) {
5727
5752
  const total = ciphertext.length;
5728
5753
  try {
5729
5754
  await presignedPut(item.upload_url, ciphertext, (loaded, putTotal) => {
5730
- options?.onBytesProgress?.({
5755
+ options.onBytesProgress?.({
5731
5756
  fileIndex,
5732
5757
  fileName: item.file_name,
5733
5758
  loaded,
@@ -5739,7 +5764,7 @@ async function uploadDocumentsDirect(arbi, workspaceKey, files, options) {
5739
5764
  `Presigned PUT for ${item.doc_ext_id} failed: ${err instanceof Error ? err.message : String(err)}`
5740
5765
  );
5741
5766
  }
5742
- options?.onBytesProgress?.({
5767
+ options.onBytesProgress?.({
5743
5768
  fileIndex,
5744
5769
  fileName: item.file_name,
5745
5770
  loaded: total,
@@ -5750,16 +5775,15 @@ async function uploadDocumentsDirect(arbi, workspaceKey, files, options) {
5750
5775
  if (toCommit.length === 0) {
5751
5776
  return { doc_ext_ids: [], skipped };
5752
5777
  }
5753
- const commitResult = await guarded(
5754
- async () => requireData(
5755
- await arbi.fetch.POST("/v1/document/upload-commit", {
5756
- body: {
5757
- doc_ext_ids: toCommit,
5758
- tag_ext_id: options?.tagExtId ?? null
5759
- }
5760
- }),
5761
- "Failed to commit direct upload"
5762
- )
5778
+ const commitResult = requireUploadData(
5779
+ await arbi.fetch.POST("/v1/document/upload-commit", {
5780
+ params: { query: query2 },
5781
+ body: {
5782
+ doc_ext_ids: toCommit,
5783
+ tag_ext_id: options.tagExtId ?? null
5784
+ }
5785
+ }),
5786
+ "Failed to commit direct upload"
5763
5787
  );
5764
5788
  return {
5765
5789
  doc_ext_ids: commitResult.doc_ext_ids ?? [],
@@ -11210,6 +11234,10 @@ var Arbi = class {
11210
11234
  if (target) await this.openWorkspace(target);
11211
11235
  return target;
11212
11236
  }
11237
+ /** {@link targetWorkspace} for a call that cannot go without one: throws when none is known. */
11238
+ async requireTargetWorkspace(workspaceId) {
11239
+ return await this.targetWorkspace(workspaceId) ?? this.requireWorkspace();
11240
+ }
11213
11241
  /**
11214
11242
  * Make a workspace the CURRENT one: decrypt its key, open it on the server (which makes it the
11215
11243
  * session's active workspace) and record it in the session. This is navigation: only the host's
@@ -11823,20 +11851,23 @@ var Arbi = class {
11823
11851
  finaliseTranslation: (docId) => finaliseTranslation(this.requireClient(), docId),
11824
11852
  delete: (externalIds) => deleteDocuments(this.requireClient(), externalIds),
11825
11853
  update: (documents) => updateDocuments(this.requireClient(), documents),
11826
- uploadUrl: (urls, options) => {
11827
- this.requireWorkspace();
11828
- return uploadUrl(
11829
- this.requireClient(),
11830
- urls,
11831
- options?.shared,
11832
- options?.configExtId
11833
- );
11854
+ /** Make documents from web addresses in the current workspace, or `options.workspaceId`. */
11855
+ uploadUrl: async (urls, options) => {
11856
+ const { workspaceId, ...rest } = options ?? {};
11857
+ return uploadUrl(this.requireClient(), urls, {
11858
+ workspaceExtId: await this.requireTargetWorkspace(workspaceId),
11859
+ ...rest
11860
+ });
11834
11861
  },
11835
11862
  /**
11836
- * Upload files in one request (the open workspace, or `options.workspaceExtId`): folder, tag,
11837
- * sharing, config, a new version of a document.
11863
+ * Upload files in one request into the current workspace, or `options.workspaceExtId`: folder,
11864
+ * tag, sharing, config, a new version of a document. The request names the workspace either
11865
+ * way, so a switch while it is in flight cannot move it.
11838
11866
  */
11839
- upload: (files, options) => uploadDocuments(this.requireClient(), files, options),
11867
+ upload: async (files, options) => uploadDocuments(this.requireClient(), files, {
11868
+ ...options,
11869
+ workspaceExtId: await this.requireTargetWorkspace(options?.workspaceExtId ?? void 0)
11870
+ }),
11840
11871
  /** Near-duplicate pairs at or above `threshold` (or one document's, `docId`). */
11841
11872
  similar: (options) => similarDocuments(this.requireClient(), options),
11842
11873
  /**
@@ -11861,19 +11892,15 @@ var Arbi = class {
11861
11892
  },
11862
11893
  /**
11863
11894
  * Upload files straight to storage, encrypted here with `workspaceKey` (`uploadDocumentsDirect`),
11864
- * into `workspaceId`, which must be the workspace open NOW. `upload-init` and `upload-commit`
11865
- * name no workspace yet (they act on the session's open one), so each runs under
11866
- * `readInWorkspace`: it is not sent, or its answer not kept, unless `workspaceId` is open when
11867
- * it is sent and still when it returns. A switch refuses the upload
11868
- * (`ArbiWorkspaceChangedError`) instead of storing files encrypted with one workspace's key in
11869
- * another. For any other workspace use `upload` with `workspaceExtId`, which names it.
11895
+ * into `workspaceId`, whose key it must be. `upload-init` and `upload-commit` name that
11896
+ * workspace (made usable for this session first, not switched to), so a switch while the
11897
+ * upload runs cannot move the files into another workspace.
11870
11898
  */
11871
- uploadDirect: (workspaceId, workspaceKey, files, options) => {
11872
- if (this.currentWorkspaceId !== workspaceId)
11873
- return Promise.reject(new ArbiWorkspaceChangedError(workspaceId, "uploading to"));
11899
+ uploadDirect: async (workspaceId, workspaceKey, files, options) => {
11900
+ const workspaceExtId = await this.requireTargetWorkspace(workspaceId);
11874
11901
  return uploadDocumentsDirect(this.requireClient(), workspaceKey, files, {
11875
11902
  ...options,
11876
- inWorkspace: (send) => this.readInWorkspace(workspaceId, send)
11903
+ workspaceExtId
11877
11904
  });
11878
11905
  },
11879
11906
  /** Download a document's original file — its current version, or `version`. */