@arbidocs/sdk 0.4.147 → 0.4.150

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { a1 as ConfigStore, _ as CliConfig, $ as CliCredentials, X as ChatSession, bW as SkippedFile, cw as UploadResult, t as AuthHeaders, cr as UploadBatchResult, cv as UploadOptions, cs as UploadDirectOptions, ct as UploadDirectResult, bQ as SUPPORTED_EXTENSIONS, aZ as MailAttachment, Q as ChatCryptoContext } from './browser-DK6CvDoH.cjs';
2
- export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, f as AgentStepEvent, g as AppPassword, h as AppPasswordCreateBody, i as AppPasswordCreated, j as Arbi, k as ArbiApiError, l as ArbiError, n as ArbiHostSession, o as ArbiOptions, p as ArbiSessionExpiredError, q as ArtifactEvent, r as AttendeeRead, s as AuthContext, 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 ChatAttachmentFile, P as ChatAttachmentInput, R as ChatKeyRing, S as ChatKind, T as ChatMemberKey, U as ChatMemberResponse, V as ChatMessageResponse, W as ChatResponse, Y as CitationSummary, Z as CitationToolSources, a0 as CommandDescriptor, a2 as ConnectOptions, a3 as ConnectorCatalogEntry, a4 as ConnectorFolder, a5 as ConnectorSyncProgress, a6 as ConnectorSyncStatus, a7 as ConnectorVendorKey, a8 as ConnectorVisibilitySettings, a9 as ConversationResponse, aa as ConversationUsageResponse, ad as CreateWorkRequest, ae as CreateWorkflowRequest, af as DEFAULT_AI_USD_PER_GBP, ag as DOC_TERMINAL_STATUSES, ah as DRIVE_SYNC_VENDORS, ai as DateTimeSpec, aj as DecryptedChat, ak as DecryptedChatMessage, am as DeploymentHouseTemplate, an as DocNameMap, ao as DocumentAutomationAction, ap as DocumentListFields, aq as DocumentListOrder, ar as DocumentSelector, as as DocumentWaiter, at as DocumentWaiterOptions, au as DriveSyncProgress, av as DriveSyncSummary, aw as EditScope, ax as EventCreateBody, ay as EventPatchBody, az as FLAT_TAG_KINDS, aD as FeedCreateBody, aE as FeedLevel, aF as FindTimeParams, aG as FormattedWsMessage, aH as FreeBusyEntry, aI as GOOGLE_VENDORS, aJ as HolidayCountry, aK as HouseTemplateCandidate, aL as IMANAGE_VENDORS, aM as IdentityErrorCode, aN as IdentityPurchase, aO as IdentityState, aP as IdentityStatus, aQ as ImportResult, aR as InvitationRead, aS as LinkedRun, aT as ListAllOptions, aU as ListEventsParams, aW as ListPaginatedOptions, aX as MAILBOX_SYNC_VENDORS, aY as MICROSOFT_VENDORS, a_ as MailDraftSSEEvent, a$ as MessageLevel, b0 as MessageMetadataPayload, b1 as MessageQueuedEvent, b2 as OAuthAccountKind, b3 as OutputTokensDetails, b4 as OverlayItem, b5 as OverlayLayerName, b6 as ParsedSlashCommand, b7 as PendingAuthResponse, b8 as PersonKey, b9 as PlanStepsError, ba as PlanWorkRequest, bc as ProjectBudget, bd as ProjectConversationUsageResponse, be as ProjectDetails, bf as ProjectEventKind, bg as ProjectEventResponse, bh as ProjectInvoicesResponse, bi as ProjectResponse, bj as ProjectUpdateRequest, bk as ProjectUsageResponse, bl as PublicBookingError, bm as PublicBookingPage, bn as QueryOptions, bo as RaisedSignal, bp as ReconnectOptions, bq as ReconnectableWsConnection, br as ResolvedCitation, bs as ResolvedRecipient, bt as RespondParams, bu as RespondPartstat, bv as ResponseCompletedEvent, bw as ResponseContentPartAddedEvent, bx as ResponseCreatedEvent, by as ResponseFailedEvent, bz as ResponseOutputItemAddedEvent, bA as ResponseOutputItemDoneEvent, bB as ResponseOutputTextDeltaEvent, bC as ResponseOutputTextDoneEvent, bD as ResponseUsage, bE as RoomCreateBody, bF as RoomQuery, bG as RoomRead, bH as RunProgress, bI as RunStep, bJ as RunWaitingOn, bK as SHAREPOINT_VENDORS, bL as SSEEvent, bM as SSEStreamCallbacks, bN as SSEStreamResult, bO as SSEStreamStartData, bP as STEP_FIELD_OPTION_TONES, bR as ScopedTarget, bS as SendBack, bT as ShareRead, bU as ShareRole, bV as SkillSummary, bX as SlackConnectionStatus, bY as StepActionRequest, bZ as StepActivityEvent, b_ as StepAssignee, b$ as StepField, c0 as StepFieldOption, c1 as StepFieldOptionTone, c2 as StepKind, c3 as StepPhase, c4 as StepSignal, c5 as StepSignalWhen, c6 as StepState, c7 as StepStatus, c8 as SubmitBackgroundQueryOptions, c9 as SubscribeParams, ca as SyncTriggerResult, cb as TAG_KINDS, cc as TagChange, cd as TagFieldDefinition, ce as TagKind, cf as TagKindField, cg as TagKindSchema, ch as TagLinks, ci as TagListQuery, cj as TagResponse, ck as TaskPlan, cl as TaskPlanStep, cm as TimeSuggestion, cn as TokenBudgetContext, co as UpdateConversationRequest, cq as UpdateWorkflowRequest, cu as UploadDocumentsOptions, cx as UsageBreakdown, cy as UserConnectorEntry, cz as UserDailyUsageResponse, cA as UserInfo, cB as UserInputRequestEvent, cC as UserMessageEvent, cD as WebSocketAuthError, cE as WeeklyHoursSpec, cF as WorkStatus, cG as WorkflowAuthMode, cH as WorkflowResponse, cI as WorkflowRunHistoryResponse, cJ as WorkflowRunResponse, cK as WorkspaceContext, cL as WsConnection, cM as account, cN as agentconfig, cO as agents, cP as assistant, cQ as authenticatedFetch, cR as bookPublicSlot, cS as buildCitationChunkData, cT as buildDocNameMap, cU as buildFactsContextTool, cV as buildRetrievalChunkTool, cW as buildRetrievalFullContextTool, cX as buildRetrievalTocTool, cY as calendar, cZ as cancelPublicBooking, c_ as chats, c$ as connectErrorMessage, d0 as connectWebSocket, d1 as connectWithReconnect, d2 as connectors, d3 as consumeSSEStream, d4 as contacts, d5 as conversations, d6 as countCitations, d7 as createAuthenticatedClient, d8 as createDocumentWaiter, d9 as doctags, da as documents, db as facts, dc as files, dd as filterSkills, de as formatAgentStepLabel, df as formatFileSize, dg as formatGbp, dh as formatGbpPerMillionTokens, di as formatItemLabel, dj as formatStreamSummary, dk as formatUserName, dl as formatWorkspaceChoices, dm as formatWsMessage, dn as generateEncryptedWorkspaceKey, dp as generateNewWorkspaceKey, dq as getErrorCode, dr as getErrorMessage, ds as getPublicBookingPage, dt as getRawWorkspaceKey, du as health, dv as houseTemplates, dx as identityErrorCode, dw as identityVerification, dy as isConnectorVendorVisible, dz as isDriveSyncVendor, dA as isMailboxSyncVendor, dB as isSharePointVendor, dC as isSharedSkill, dD as mail, dE as notifications, dF as parseSSEEvents, dG as parseSlashCommand, dH as parseSlashTokenInProgress, dI as performPasswordLogin, dJ as performSigningKeyLogin, dK as performSsoDeviceFlowLogin, dL as profile, dM as projects, dN as requireData, dO as requireOk, dP as resolveAuth, dQ as resolveCitations, dR as resolveWorkspace, dS as responses, dT as selectWorkspace, dU as selectWorkspaceById, dV as sessions, dW as settings, dX as signatureRequests, dY as splitAppPasswords, dZ as streamSSE, d_ as stripCitationMarkdown, d$ as summarizeCitations, e0 as tags, e1 as uploadSkill, e2 as usdToGbp, e3 as work, e4 as workflowSteps, e5 as workflows, e6 as workspaces } from './browser-DK6CvDoH.cjs';
1
+ import { _ as ConfigStore, X as CliConfig, Y as CliCredentials, U as ChatSession, c2 as SkippedFile, cK as UploadResult, q as AuthHeaders, cF as UploadBatchResult, cJ as UploadOptions, cG as UploadDirectOptions, cH as UploadDirectResult, bX as SUPPORTED_EXTENSIONS, aX as MailAttachment, N as ChatCryptoContext } from './browser-CYDtwz9K.cjs';
2
+ export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, f as AgentStepEvent, g as Arbi, h as ArbiApiError, i as ArbiError, k as ArbiHostSession, l as ArbiOptions, m as ArbiSessionExpiredError, n as ArtifactEvent, o as AttendeeRead, p as AuthContext, r as AuthMode, s as AuthenticatedClient, B as BookingConfirmation, t as BookingPage, u as BookingPageWriteBody, v as BookingRequestBody, w as BridgeTokensOptions, C as CalDavConnectBody, x as CalDavProfile, y as CalendarAccount, z as CalendarAccountKind, D as CalendarCreateBody, E as CalendarEvent, F as CalendarKeys, G as CalendarRead, H as CalendarSettings, I as CalendarSettingsBody, J as CalendarUpdate, K as CalendarWindow, L as ChatAttachmentFile, M as ChatAttachmentInput, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessageResponse, T as ChatResponse, V as CitationSummary, W as CitationToolSources, Z as CommandDescriptor, $ as ConnectOptions, a0 as ConnectorCatalogEntry, a1 as ConnectorFolder, a2 as ConnectorSyncProgress, a3 as ConnectorSyncStatus, a4 as ConnectorVendorKey, a5 as ConnectorVisibilitySettings, a6 as ConversationResponse, a7 as ConversationUsageResponse, aa as CreateWorkRequest, ab as CreateWorkflowRequest, ac as DEFAULT_AI_USD_PER_GBP, ad as DOC_TERMINAL_STATUSES, ae as DRIVE_SYNC_VENDORS, af as DateTimeSpec, ag as DecryptedChat, ah as DecryptedChatMessage, aj as DeploymentHouseTemplate, ak as DocNameMap, al as DocumentAutomationAction, am as DocumentListFields, an as DocumentListOrder, ao as DocumentSelector, ap as DocumentWaiter, aq as DocumentWaiterOptions, ar as DriveSyncProgress, as as DriveSyncSummary, at as ENTITY_KINDS, au as EditScope, av as EntityKind, aw as EventCreateBody, ax as EventPatchBody, ay as FLAT_TAG_KINDS, aC as FindTimeParams, aD as FormattedWsMessage, aE as FreeBusyEntry, aF as GOOGLE_VENDORS, aG as HolidayCountry, aH as HouseTemplateCandidate, aI as IMANAGE_VENDORS, aJ as IdentityErrorCode, aK as IdentityPurchase, aL as IdentityState, aM as IdentityStatus, aN as ImportResult, aO as InvitationRead, aP as LinkedRun, aQ as ListAllOptions, aR as ListEventsParams, aT as ListPaginatedOptions, aU as MAILBOX_SYNC_VENDORS, aV as MAX_RETRIEVE_DOC_IDS, aW as MICROSOFT_VENDORS, aY as MailDraftSSEEvent, aZ as MessageLevel, a_ as MessageMetadataPayload, a$ as MessageQueuedEvent, b0 as OAuthAccountKind, b1 as OutputTokensDetails, b2 as OverlayItem, b3 as OverlayLayerName, b4 as PRESENCE_KINDS, b5 as ParsedSlashCommand, b6 as PendingAuthResponse, b7 as PersonKey, b8 as PlanStepsError, b9 as PlanWorkRequest, bb as ProductResponse, bc as ProjectAddonKind, bd as ProjectAddonSettingsRequest, be as ProjectBudget, bf as ProjectCheckoutRequest, bg as ProjectConversationUsageResponse, bh as ProjectCreateOptions, bi as ProjectDetails, bj as ProjectEventKind, bk as ProjectEventResponse, bl as ProjectInvoicesResponse, bm as ProjectNextPeriodAddonsRequest, bn as ProjectPlanChangeRequest, bo as ProjectQuoteRequest, bp as ProjectResponse, bq as ProjectUpdateRequest, br as ProjectUsageResponse, bs as PublicBookingError, bt as PublicBookingPage, bu as QueryOptions, bv as RaisedSignal, bw as ReconnectOptions, bx as ReconnectableWsConnection, by as ResolvedCitation, bz as ResolvedRecipient, bA as RespondParams, bB as RespondPartstat, bC as ResponseCompletedEvent, bD as ResponseContentPartAddedEvent, bE as ResponseCreatedEvent, bF as ResponseFailedEvent, bG as ResponseOutputItemAddedEvent, bH as ResponseOutputItemDoneEvent, bI as ResponseOutputTextDeltaEvent, bJ as ResponseOutputTextDoneEvent, bK as ResponseUsage, bL as RoomCreateBody, bM as RoomQuery, bN as RoomRead, bO as RunProgress, bP as RunStep, bQ as RunWaitingOn, bR as SHAREPOINT_VENDORS, bS as SSEEvent, bT as SSEStreamCallbacks, bU as SSEStreamResult, bV as SSEStreamStartData, bW as STEP_FIELD_OPTION_TONES, bY as ScopedTarget, bZ as SearchChunk, b_ as SendBack, b$ as ShareRead, c0 as ShareRole, c1 as SkillSummary, c3 as SlackConnectionStatus, c4 as StepActionRequest, c5 as StepActivityEvent, c6 as StepAssignee, c7 as StepField, c8 as StepFieldOption, c9 as StepFieldOptionTone, ca as StepKind, cb as StepPhase, cc as StepSignal, cd as StepSignalWhen, ce as StepState, cf as StepStatus, cg as SubmitBackgroundQueryOptions, ch as SubscribeParams, ci as SyncTriggerResult, cj as TAG_KINDS, ck as TAG_NESTING_MAX_DEPTH, cl as TagChange, cm as TagFieldDefinition, cn as TagGroup, co as TagKind, cp as TagKindField, cq as TagKindSchema, cr as TagLinks, cs as TagListQuery, ct as TagNode, cu as TagResponse, cv as TagScope, cw as TagTreeRow, cx as TaskPlan, cy as TaskPlanStep, cz as TaxQuoteResponse, cA as TimeSuggestion, cB as TokenBudgetContext, cC as UpdateConversationRequest, cE as UpdateWorkflowRequest, cI as UploadDocumentsOptions, cL as UsageBreakdown, cM as UserConnectorEntry, cN as UserDailyUsageResponse, cO as UserInfo, cP as UserInputRequestEvent, cQ as UserMessageEvent, cR as WebSocketAuthError, cS as WeeklyHoursSpec, cT as WorkStatus, cU as WorkflowAuthMode, cV as WorkflowResponse, cW as WorkflowRunHistoryResponse, cX as WorkflowRunResponse, cY as WorkspaceContext, cZ as WsConnection, c_ as account, c$ as agentconfig, d0 as agents, d1 as assistant, d2 as authenticatedFetch, d3 as bookPublicSlot, d4 as buildCitationChunkData, d5 as buildDocNameMap, d6 as buildFactsContextTool, d7 as buildRetrievalChunkTool, d8 as buildRetrievalFullContextTool, d9 as buildRetrievalTocTool, da as calendar, db as canTagHaveParent, dc as cancelPublicBooking, dd as chats, de as connectErrorMessage, df as connectWebSocket, dg as connectWithReconnect, dh as connectors, di as consumeSSEStream, dj as contacts, dk as conversations, dl as countCitations, dm as createAuthenticatedClient, dn as createDocumentWaiter, dp as defaultKindForFormat, dq as doctags, dr as documents, ds as facts, dt as files, du as filterDocumentTags, dv as filterSkills, dw as flattenTagTree, dx as formatAgentStepLabel, dy as formatFileSize, dz as formatGbp, dA as formatGbpPerMillionTokens, dB as formatItemLabel, dC as formatStreamSummary, dD as formatUserName, dE as formatWorkspaceChoices, dF as formatWsMessage, dG as generateEncryptedWorkspaceKey, dH as generateNewWorkspaceKey, dI as getChildTags, dJ as getEligibleParentTags, dK as getErrorCode, dL as getErrorMessage, dM as getPublicBookingPage, dN as getRawWorkspaceKey, dO as getTagDescendantIds, dP as health, dQ as houseTemplates, dS as identityErrorCode, dR as identityVerification, dT as isAnnotationTag, dU as isConnectorVendorVisible, dV as isDriveSyncVendor, dW as isEntityTag, dX as isFlatKind, dY as isLabelTag, dZ as isMailboxSyncVendor, d_ as isPresenceTag, d$ as isSharePointVendor, e0 as isSharedSkill, e1 as mail, e2 as notifications, e3 as parseSSEEvents, e4 as parseSlashCommand, e5 as parseSlashTokenInProgress, e6 as performPasswordLogin, e7 as performSigningKeyLogin, e8 as performSsoDeviceFlowLogin, e9 as profile, ea as projects, eb as refusalReason, ec as requireData, ed as requireOk, ee as resolveAuth, ef as resolveCitations, eg as resolveWorkspace, eh as responses, ei as searchChunks, ej as selectWorkspace, ek as selectWorkspaceById, el as sessions, em as settings, en as signatureRequests, eo as streamSSE, ep as stripCitationMarkdown, eq as summarizeCitations, er as tagUseCount, es as tags, et as tagsForScope, eu as tagsOfGroup, ev as uploadSkill, ew as usdToGbp, ex as work, ey as workflowSteps, ez as workflows, eA as workspaces, eB as wouldCreateTagCycle } from './browser-CYDtwz9K.cjs';
3
3
  import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
4
4
  export { LoginProfile } from '@arbidocs/client';
5
5
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a1 as ConfigStore, _ as CliConfig, $ as CliCredentials, X as ChatSession, bW as SkippedFile, cw as UploadResult, t as AuthHeaders, cr as UploadBatchResult, cv as UploadOptions, cs as UploadDirectOptions, ct as UploadDirectResult, bQ as SUPPORTED_EXTENSIONS, aZ as MailAttachment, Q as ChatCryptoContext } from './browser-DK6CvDoH.js';
2
- export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, f as AgentStepEvent, g as AppPassword, h as AppPasswordCreateBody, i as AppPasswordCreated, j as Arbi, k as ArbiApiError, l as ArbiError, n as ArbiHostSession, o as ArbiOptions, p as ArbiSessionExpiredError, q as ArtifactEvent, r as AttendeeRead, s as AuthContext, 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 ChatAttachmentFile, P as ChatAttachmentInput, R as ChatKeyRing, S as ChatKind, T as ChatMemberKey, U as ChatMemberResponse, V as ChatMessageResponse, W as ChatResponse, Y as CitationSummary, Z as CitationToolSources, a0 as CommandDescriptor, a2 as ConnectOptions, a3 as ConnectorCatalogEntry, a4 as ConnectorFolder, a5 as ConnectorSyncProgress, a6 as ConnectorSyncStatus, a7 as ConnectorVendorKey, a8 as ConnectorVisibilitySettings, a9 as ConversationResponse, aa as ConversationUsageResponse, ad as CreateWorkRequest, ae as CreateWorkflowRequest, af as DEFAULT_AI_USD_PER_GBP, ag as DOC_TERMINAL_STATUSES, ah as DRIVE_SYNC_VENDORS, ai as DateTimeSpec, aj as DecryptedChat, ak as DecryptedChatMessage, am as DeploymentHouseTemplate, an as DocNameMap, ao as DocumentAutomationAction, ap as DocumentListFields, aq as DocumentListOrder, ar as DocumentSelector, as as DocumentWaiter, at as DocumentWaiterOptions, au as DriveSyncProgress, av as DriveSyncSummary, aw as EditScope, ax as EventCreateBody, ay as EventPatchBody, az as FLAT_TAG_KINDS, aD as FeedCreateBody, aE as FeedLevel, aF as FindTimeParams, aG as FormattedWsMessage, aH as FreeBusyEntry, aI as GOOGLE_VENDORS, aJ as HolidayCountry, aK as HouseTemplateCandidate, aL as IMANAGE_VENDORS, aM as IdentityErrorCode, aN as IdentityPurchase, aO as IdentityState, aP as IdentityStatus, aQ as ImportResult, aR as InvitationRead, aS as LinkedRun, aT as ListAllOptions, aU as ListEventsParams, aW as ListPaginatedOptions, aX as MAILBOX_SYNC_VENDORS, aY as MICROSOFT_VENDORS, a_ as MailDraftSSEEvent, a$ as MessageLevel, b0 as MessageMetadataPayload, b1 as MessageQueuedEvent, b2 as OAuthAccountKind, b3 as OutputTokensDetails, b4 as OverlayItem, b5 as OverlayLayerName, b6 as ParsedSlashCommand, b7 as PendingAuthResponse, b8 as PersonKey, b9 as PlanStepsError, ba as PlanWorkRequest, bc as ProjectBudget, bd as ProjectConversationUsageResponse, be as ProjectDetails, bf as ProjectEventKind, bg as ProjectEventResponse, bh as ProjectInvoicesResponse, bi as ProjectResponse, bj as ProjectUpdateRequest, bk as ProjectUsageResponse, bl as PublicBookingError, bm as PublicBookingPage, bn as QueryOptions, bo as RaisedSignal, bp as ReconnectOptions, bq as ReconnectableWsConnection, br as ResolvedCitation, bs as ResolvedRecipient, bt as RespondParams, bu as RespondPartstat, bv as ResponseCompletedEvent, bw as ResponseContentPartAddedEvent, bx as ResponseCreatedEvent, by as ResponseFailedEvent, bz as ResponseOutputItemAddedEvent, bA as ResponseOutputItemDoneEvent, bB as ResponseOutputTextDeltaEvent, bC as ResponseOutputTextDoneEvent, bD as ResponseUsage, bE as RoomCreateBody, bF as RoomQuery, bG as RoomRead, bH as RunProgress, bI as RunStep, bJ as RunWaitingOn, bK as SHAREPOINT_VENDORS, bL as SSEEvent, bM as SSEStreamCallbacks, bN as SSEStreamResult, bO as SSEStreamStartData, bP as STEP_FIELD_OPTION_TONES, bR as ScopedTarget, bS as SendBack, bT as ShareRead, bU as ShareRole, bV as SkillSummary, bX as SlackConnectionStatus, bY as StepActionRequest, bZ as StepActivityEvent, b_ as StepAssignee, b$ as StepField, c0 as StepFieldOption, c1 as StepFieldOptionTone, c2 as StepKind, c3 as StepPhase, c4 as StepSignal, c5 as StepSignalWhen, c6 as StepState, c7 as StepStatus, c8 as SubmitBackgroundQueryOptions, c9 as SubscribeParams, ca as SyncTriggerResult, cb as TAG_KINDS, cc as TagChange, cd as TagFieldDefinition, ce as TagKind, cf as TagKindField, cg as TagKindSchema, ch as TagLinks, ci as TagListQuery, cj as TagResponse, ck as TaskPlan, cl as TaskPlanStep, cm as TimeSuggestion, cn as TokenBudgetContext, co as UpdateConversationRequest, cq as UpdateWorkflowRequest, cu as UploadDocumentsOptions, cx as UsageBreakdown, cy as UserConnectorEntry, cz as UserDailyUsageResponse, cA as UserInfo, cB as UserInputRequestEvent, cC as UserMessageEvent, cD as WebSocketAuthError, cE as WeeklyHoursSpec, cF as WorkStatus, cG as WorkflowAuthMode, cH as WorkflowResponse, cI as WorkflowRunHistoryResponse, cJ as WorkflowRunResponse, cK as WorkspaceContext, cL as WsConnection, cM as account, cN as agentconfig, cO as agents, cP as assistant, cQ as authenticatedFetch, cR as bookPublicSlot, cS as buildCitationChunkData, cT as buildDocNameMap, cU as buildFactsContextTool, cV as buildRetrievalChunkTool, cW as buildRetrievalFullContextTool, cX as buildRetrievalTocTool, cY as calendar, cZ as cancelPublicBooking, c_ as chats, c$ as connectErrorMessage, d0 as connectWebSocket, d1 as connectWithReconnect, d2 as connectors, d3 as consumeSSEStream, d4 as contacts, d5 as conversations, d6 as countCitations, d7 as createAuthenticatedClient, d8 as createDocumentWaiter, d9 as doctags, da as documents, db as facts, dc as files, dd as filterSkills, de as formatAgentStepLabel, df as formatFileSize, dg as formatGbp, dh as formatGbpPerMillionTokens, di as formatItemLabel, dj as formatStreamSummary, dk as formatUserName, dl as formatWorkspaceChoices, dm as formatWsMessage, dn as generateEncryptedWorkspaceKey, dp as generateNewWorkspaceKey, dq as getErrorCode, dr as getErrorMessage, ds as getPublicBookingPage, dt as getRawWorkspaceKey, du as health, dv as houseTemplates, dx as identityErrorCode, dw as identityVerification, dy as isConnectorVendorVisible, dz as isDriveSyncVendor, dA as isMailboxSyncVendor, dB as isSharePointVendor, dC as isSharedSkill, dD as mail, dE as notifications, dF as parseSSEEvents, dG as parseSlashCommand, dH as parseSlashTokenInProgress, dI as performPasswordLogin, dJ as performSigningKeyLogin, dK as performSsoDeviceFlowLogin, dL as profile, dM as projects, dN as requireData, dO as requireOk, dP as resolveAuth, dQ as resolveCitations, dR as resolveWorkspace, dS as responses, dT as selectWorkspace, dU as selectWorkspaceById, dV as sessions, dW as settings, dX as signatureRequests, dY as splitAppPasswords, dZ as streamSSE, d_ as stripCitationMarkdown, d$ as summarizeCitations, e0 as tags, e1 as uploadSkill, e2 as usdToGbp, e3 as work, e4 as workflowSteps, e5 as workflows, e6 as workspaces } from './browser-DK6CvDoH.js';
1
+ import { _ as ConfigStore, X as CliConfig, Y as CliCredentials, U as ChatSession, c2 as SkippedFile, cK as UploadResult, q as AuthHeaders, cF as UploadBatchResult, cJ as UploadOptions, cG as UploadDirectOptions, cH as UploadDirectResult, bX as SUPPORTED_EXTENSIONS, aX as MailAttachment, N as ChatCryptoContext } from './browser-CYDtwz9K.js';
2
+ export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, f as AgentStepEvent, g as Arbi, h as ArbiApiError, i as ArbiError, k as ArbiHostSession, l as ArbiOptions, m as ArbiSessionExpiredError, n as ArtifactEvent, o as AttendeeRead, p as AuthContext, r as AuthMode, s as AuthenticatedClient, B as BookingConfirmation, t as BookingPage, u as BookingPageWriteBody, v as BookingRequestBody, w as BridgeTokensOptions, C as CalDavConnectBody, x as CalDavProfile, y as CalendarAccount, z as CalendarAccountKind, D as CalendarCreateBody, E as CalendarEvent, F as CalendarKeys, G as CalendarRead, H as CalendarSettings, I as CalendarSettingsBody, J as CalendarUpdate, K as CalendarWindow, L as ChatAttachmentFile, M as ChatAttachmentInput, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessageResponse, T as ChatResponse, V as CitationSummary, W as CitationToolSources, Z as CommandDescriptor, $ as ConnectOptions, a0 as ConnectorCatalogEntry, a1 as ConnectorFolder, a2 as ConnectorSyncProgress, a3 as ConnectorSyncStatus, a4 as ConnectorVendorKey, a5 as ConnectorVisibilitySettings, a6 as ConversationResponse, a7 as ConversationUsageResponse, aa as CreateWorkRequest, ab as CreateWorkflowRequest, ac as DEFAULT_AI_USD_PER_GBP, ad as DOC_TERMINAL_STATUSES, ae as DRIVE_SYNC_VENDORS, af as DateTimeSpec, ag as DecryptedChat, ah as DecryptedChatMessage, aj as DeploymentHouseTemplate, ak as DocNameMap, al as DocumentAutomationAction, am as DocumentListFields, an as DocumentListOrder, ao as DocumentSelector, ap as DocumentWaiter, aq as DocumentWaiterOptions, ar as DriveSyncProgress, as as DriveSyncSummary, at as ENTITY_KINDS, au as EditScope, av as EntityKind, aw as EventCreateBody, ax as EventPatchBody, ay as FLAT_TAG_KINDS, aC as FindTimeParams, aD as FormattedWsMessage, aE as FreeBusyEntry, aF as GOOGLE_VENDORS, aG as HolidayCountry, aH as HouseTemplateCandidate, aI as IMANAGE_VENDORS, aJ as IdentityErrorCode, aK as IdentityPurchase, aL as IdentityState, aM as IdentityStatus, aN as ImportResult, aO as InvitationRead, aP as LinkedRun, aQ as ListAllOptions, aR as ListEventsParams, aT as ListPaginatedOptions, aU as MAILBOX_SYNC_VENDORS, aV as MAX_RETRIEVE_DOC_IDS, aW as MICROSOFT_VENDORS, aY as MailDraftSSEEvent, aZ as MessageLevel, a_ as MessageMetadataPayload, a$ as MessageQueuedEvent, b0 as OAuthAccountKind, b1 as OutputTokensDetails, b2 as OverlayItem, b3 as OverlayLayerName, b4 as PRESENCE_KINDS, b5 as ParsedSlashCommand, b6 as PendingAuthResponse, b7 as PersonKey, b8 as PlanStepsError, b9 as PlanWorkRequest, bb as ProductResponse, bc as ProjectAddonKind, bd as ProjectAddonSettingsRequest, be as ProjectBudget, bf as ProjectCheckoutRequest, bg as ProjectConversationUsageResponse, bh as ProjectCreateOptions, bi as ProjectDetails, bj as ProjectEventKind, bk as ProjectEventResponse, bl as ProjectInvoicesResponse, bm as ProjectNextPeriodAddonsRequest, bn as ProjectPlanChangeRequest, bo as ProjectQuoteRequest, bp as ProjectResponse, bq as ProjectUpdateRequest, br as ProjectUsageResponse, bs as PublicBookingError, bt as PublicBookingPage, bu as QueryOptions, bv as RaisedSignal, bw as ReconnectOptions, bx as ReconnectableWsConnection, by as ResolvedCitation, bz as ResolvedRecipient, bA as RespondParams, bB as RespondPartstat, bC as ResponseCompletedEvent, bD as ResponseContentPartAddedEvent, bE as ResponseCreatedEvent, bF as ResponseFailedEvent, bG as ResponseOutputItemAddedEvent, bH as ResponseOutputItemDoneEvent, bI as ResponseOutputTextDeltaEvent, bJ as ResponseOutputTextDoneEvent, bK as ResponseUsage, bL as RoomCreateBody, bM as RoomQuery, bN as RoomRead, bO as RunProgress, bP as RunStep, bQ as RunWaitingOn, bR as SHAREPOINT_VENDORS, bS as SSEEvent, bT as SSEStreamCallbacks, bU as SSEStreamResult, bV as SSEStreamStartData, bW as STEP_FIELD_OPTION_TONES, bY as ScopedTarget, bZ as SearchChunk, b_ as SendBack, b$ as ShareRead, c0 as ShareRole, c1 as SkillSummary, c3 as SlackConnectionStatus, c4 as StepActionRequest, c5 as StepActivityEvent, c6 as StepAssignee, c7 as StepField, c8 as StepFieldOption, c9 as StepFieldOptionTone, ca as StepKind, cb as StepPhase, cc as StepSignal, cd as StepSignalWhen, ce as StepState, cf as StepStatus, cg as SubmitBackgroundQueryOptions, ch as SubscribeParams, ci as SyncTriggerResult, cj as TAG_KINDS, ck as TAG_NESTING_MAX_DEPTH, cl as TagChange, cm as TagFieldDefinition, cn as TagGroup, co as TagKind, cp as TagKindField, cq as TagKindSchema, cr as TagLinks, cs as TagListQuery, ct as TagNode, cu as TagResponse, cv as TagScope, cw as TagTreeRow, cx as TaskPlan, cy as TaskPlanStep, cz as TaxQuoteResponse, cA as TimeSuggestion, cB as TokenBudgetContext, cC as UpdateConversationRequest, cE as UpdateWorkflowRequest, cI as UploadDocumentsOptions, cL as UsageBreakdown, cM as UserConnectorEntry, cN as UserDailyUsageResponse, cO as UserInfo, cP as UserInputRequestEvent, cQ as UserMessageEvent, cR as WebSocketAuthError, cS as WeeklyHoursSpec, cT as WorkStatus, cU as WorkflowAuthMode, cV as WorkflowResponse, cW as WorkflowRunHistoryResponse, cX as WorkflowRunResponse, cY as WorkspaceContext, cZ as WsConnection, c_ as account, c$ as agentconfig, d0 as agents, d1 as assistant, d2 as authenticatedFetch, d3 as bookPublicSlot, d4 as buildCitationChunkData, d5 as buildDocNameMap, d6 as buildFactsContextTool, d7 as buildRetrievalChunkTool, d8 as buildRetrievalFullContextTool, d9 as buildRetrievalTocTool, da as calendar, db as canTagHaveParent, dc as cancelPublicBooking, dd as chats, de as connectErrorMessage, df as connectWebSocket, dg as connectWithReconnect, dh as connectors, di as consumeSSEStream, dj as contacts, dk as conversations, dl as countCitations, dm as createAuthenticatedClient, dn as createDocumentWaiter, dp as defaultKindForFormat, dq as doctags, dr as documents, ds as facts, dt as files, du as filterDocumentTags, dv as filterSkills, dw as flattenTagTree, dx as formatAgentStepLabel, dy as formatFileSize, dz as formatGbp, dA as formatGbpPerMillionTokens, dB as formatItemLabel, dC as formatStreamSummary, dD as formatUserName, dE as formatWorkspaceChoices, dF as formatWsMessage, dG as generateEncryptedWorkspaceKey, dH as generateNewWorkspaceKey, dI as getChildTags, dJ as getEligibleParentTags, dK as getErrorCode, dL as getErrorMessage, dM as getPublicBookingPage, dN as getRawWorkspaceKey, dO as getTagDescendantIds, dP as health, dQ as houseTemplates, dS as identityErrorCode, dR as identityVerification, dT as isAnnotationTag, dU as isConnectorVendorVisible, dV as isDriveSyncVendor, dW as isEntityTag, dX as isFlatKind, dY as isLabelTag, dZ as isMailboxSyncVendor, d_ as isPresenceTag, d$ as isSharePointVendor, e0 as isSharedSkill, e1 as mail, e2 as notifications, e3 as parseSSEEvents, e4 as parseSlashCommand, e5 as parseSlashTokenInProgress, e6 as performPasswordLogin, e7 as performSigningKeyLogin, e8 as performSsoDeviceFlowLogin, e9 as profile, ea as projects, eb as refusalReason, ec as requireData, ed as requireOk, ee as resolveAuth, ef as resolveCitations, eg as resolveWorkspace, eh as responses, ei as searchChunks, ej as selectWorkspace, ek as selectWorkspaceById, el as sessions, em as settings, en as signatureRequests, eo as streamSSE, ep as stripCitationMarkdown, eq as summarizeCitations, er as tagUseCount, es as tags, et as tagsForScope, eu as tagsOfGroup, ev as uploadSkill, ew as usdToGbp, ex as work, ey as workflowSteps, ez as workflows, eA as workspaces, eB as wouldCreateTagCycle } from './browser-CYDtwz9K.js';
3
3
  import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
4
4
  export { LoginProfile } from '@arbidocs/client';
5
5
 
package/dist/index.js CHANGED
@@ -3524,6 +3524,10 @@ var ArbiApiError = class extends ArbiError {
3524
3524
  this.detail = apiErrorDetail(apiError);
3525
3525
  }
3526
3526
  };
3527
+ function refusalReason(err, fallback) {
3528
+ if (err instanceof ArbiApiError) return err.detail || fallback;
3529
+ return apiErrorDetail(err) || fallback;
3530
+ }
3527
3531
  function requireData(result, message) {
3528
3532
  if (result.error || !result.data) {
3529
3533
  throw new ArbiApiError(message, result.error, result.response?.status);
@@ -5530,6 +5534,7 @@ async function listHouseTemplateCandidates(arbi) {
5530
5534
  // src/operations/workspaces.ts
5531
5535
  var workspaces_exports = {};
5532
5536
  __export(workspaces_exports, {
5537
+ addWorkspaceMembers: () => addWorkspaceMembers,
5533
5538
  addWorkspaceUsers: () => addWorkspaceUsers,
5534
5539
  copyDocuments: () => copyDocuments,
5535
5540
  createWorkspace: () => createWorkspace,
@@ -5577,6 +5582,12 @@ async function updateWorkspace(arbi, body) {
5577
5582
  async function listWorkspaceUsers(arbi) {
5578
5583
  return requireData(await arbi.fetch.GET("/v1/workspace/users"), "Failed to fetch workspace users");
5579
5584
  }
5585
+ async function addWorkspaceMembers(arbi, request) {
5586
+ return requireData(
5587
+ await arbi.fetch.POST("/v1/workspace/users", { body: request }),
5588
+ "Failed to add users"
5589
+ );
5590
+ }
5580
5591
  async function addWorkspaceUsers(arbi, emails, role = "collaborator", target, confirmInvite = false) {
5581
5592
  const invite = confirmInvite ? { confirm_invite: true } : {};
5582
5593
  return requireData(
@@ -5732,6 +5743,7 @@ async function updateConversationAssistantMode(arbi, conversationId, assistantMo
5732
5743
  // src/operations/assistant.ts
5733
5744
  var assistant_exports = {};
5734
5745
  __export(assistant_exports, {
5746
+ MAX_RETRIEVE_DOC_IDS: () => MAX_RETRIEVE_DOC_IDS,
5735
5747
  buildFactsContextTool: () => buildFactsContextTool,
5736
5748
  buildRetrievalChunkTool: () => buildRetrievalChunkTool,
5737
5749
  buildRetrievalFullContextTool: () => buildRetrievalFullContextTool,
@@ -5746,6 +5758,7 @@ __export(assistant_exports, {
5746
5758
  queryAssistant: () => queryAssistant,
5747
5759
  respondToAgent: () => respondToAgent,
5748
5760
  retrieve: () => retrieve,
5761
+ searchChunks: () => searchChunks,
5749
5762
  uploadSkill: () => uploadSkill
5750
5763
  });
5751
5764
  function buildRetrievalChunkTool(docIds, searchMode) {
@@ -5779,8 +5792,19 @@ function buildRetrievalTocTool(docIds) {
5779
5792
  tool_responses: {}
5780
5793
  };
5781
5794
  }
5795
+ var MAX_RETRIEVE_DOC_IDS = 5e3;
5782
5796
  async function retrieve(options) {
5783
- const { arbi, workspaceId, query, docIds, searchMode, fullContextDocIds, tocDocIds, model } = options;
5797
+ const {
5798
+ arbi,
5799
+ workspaceId,
5800
+ query,
5801
+ docIds,
5802
+ searchMode,
5803
+ fullContextDocIds,
5804
+ tocDocIds,
5805
+ model,
5806
+ store = true
5807
+ } = options;
5784
5808
  const tools = {
5785
5809
  retrieval_chunk: buildRetrievalChunkTool(docIds, searchMode)
5786
5810
  };
@@ -5795,7 +5819,7 @@ async function retrieve(options) {
5795
5819
  workspace_ext_id: workspaceId,
5796
5820
  stream: false,
5797
5821
  background: false,
5798
- store: true,
5822
+ store,
5799
5823
  tools,
5800
5824
  ...model ? { model } : {}
5801
5825
  };
@@ -5815,6 +5839,34 @@ async function retrieve(options) {
5815
5839
  }
5816
5840
  return data;
5817
5841
  }
5842
+ function isReadablePassage(content) {
5843
+ return content.length > 10 && content !== "-" && !/^[|\-\s]+$/.test(content);
5844
+ }
5845
+ function searchChunks(result) {
5846
+ const byId3 = /* @__PURE__ */ new Map();
5847
+ for (const [title, chunks] of Object.entries(result?.retrieval_chunk?.tool_responses ?? {})) {
5848
+ if (!Array.isArray(chunks)) continue;
5849
+ chunks.forEach((chunk2, index) => {
5850
+ if (!chunk2 || typeof chunk2 !== "object") return;
5851
+ const content = chunk2.content?.trim() ?? "";
5852
+ if (!isReadablePassage(content)) return;
5853
+ const meta = chunk2.metadata ?? {};
5854
+ const docId = meta.doc_ext_id || title;
5855
+ const rerank = meta.rerank_score;
5856
+ byId3.set(meta.chunk_ext_id || `${docId}_${index}`, {
5857
+ id: meta.chunk_ext_id || `${docId}_${index}`,
5858
+ ...meta.chunk_ext_id ? { chunkExtId: meta.chunk_ext_id } : {},
5859
+ docId,
5860
+ docTitle: meta.doc_title || title,
5861
+ ...meta.page_number != null ? { page: meta.page_number } : {},
5862
+ score: rerank && rerank > 0 ? rerank : meta.score ?? 0,
5863
+ index,
5864
+ content
5865
+ });
5866
+ });
5867
+ }
5868
+ return Array.from(byId3.values()).sort((a2, b2) => b2.score - a2.score);
5869
+ }
5818
5870
  async function queryAssistant(options) {
5819
5871
  const {
5820
5872
  workspaceId,
@@ -7506,6 +7558,11 @@ async function remove(arbi) {
7506
7558
  // src/operations/projects.ts
7507
7559
  var projects_exports = {};
7508
7560
  __export(projects_exports, {
7561
+ addAddonBlock: () => addAddonBlock,
7562
+ billingPortal: () => billingPortal,
7563
+ cancelSubscription: () => cancelSubscription,
7564
+ changePlan: () => changePlan,
7565
+ createCheckout: () => createCheckout,
7509
7566
  createProject: () => createProject,
7510
7567
  deleteProject: () => deleteProject,
7511
7568
  formatBudget: () => formatBudget,
@@ -7513,11 +7570,17 @@ __export(projects_exports, {
7513
7570
  getProjectInvoices: () => getProjectInvoices,
7514
7571
  getProjectUsage: () => getProjectUsage,
7515
7572
  getUserUsageToday: () => getUserUsageToday,
7573
+ listProducts: () => listProducts,
7516
7574
  listProjectEvents: () => listProjectEvents,
7517
7575
  listProjects: () => listProjects,
7518
7576
  parseBudget: () => parseBudget,
7577
+ previewPlanChange: () => previewPlanChange,
7578
+ quoteAddon: () => quoteAddon,
7579
+ quotePlan: () => quotePlan,
7519
7580
  refreshProject: () => refreshProject,
7520
7581
  renameProject: () => renameProject,
7582
+ setNextPeriodAddons: () => setNextPeriodAddons,
7583
+ updateAddonSettings: () => updateAddonSettings,
7521
7584
  updateProject: () => updateProject
7522
7585
  });
7523
7586
  async function listProjects(arbi, filters = {}) {
@@ -7640,6 +7703,95 @@ async function getProjectInvoices(arbi, projectExtId) {
7640
7703
  async function getUserUsageToday(arbi) {
7641
7704
  return requireData(await arbi.fetch.GET("/v1/user/me/usage/today"), "Failed to fetch today usage");
7642
7705
  }
7706
+ var projectPath = (projectExtId) => ({ path: { project_ext_id: projectExtId } });
7707
+ async function listProducts(arbi) {
7708
+ return requireData(await arbi.fetch.GET("/v1/user/products"), "Failed to load the plans");
7709
+ }
7710
+ async function quotePlan(arbi, projectExtId, body) {
7711
+ return requireData(
7712
+ projectExtId ? await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/checkout/quote", {
7713
+ params: projectPath(projectExtId),
7714
+ body
7715
+ }) : await arbi.fetch.POST("/v1/user/projects/quote", { body }),
7716
+ "Failed to price the plan"
7717
+ );
7718
+ }
7719
+ async function createCheckout(arbi, projectExtId, body) {
7720
+ return requireData(
7721
+ await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/checkout", {
7722
+ params: projectPath(projectExtId),
7723
+ body
7724
+ }),
7725
+ "Failed to start the checkout"
7726
+ );
7727
+ }
7728
+ async function changePlan(arbi, projectExtId, body) {
7729
+ return requireData(
7730
+ await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/change-plan", {
7731
+ params: projectPath(projectExtId),
7732
+ body
7733
+ }),
7734
+ "Failed to change the plan"
7735
+ );
7736
+ }
7737
+ async function previewPlanChange(arbi, projectExtId, body) {
7738
+ return requireData(
7739
+ await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/plan/preview", {
7740
+ params: projectPath(projectExtId),
7741
+ body
7742
+ }),
7743
+ "Failed to price the plan change"
7744
+ );
7745
+ }
7746
+ async function quoteAddon(arbi, projectExtId, kind) {
7747
+ return requireData(
7748
+ await arbi.fetch.GET("/v1/user/projects/{project_ext_id}/addons/quote", {
7749
+ params: { ...projectPath(projectExtId), query: { kind } }
7750
+ }),
7751
+ "Failed to price the add-on"
7752
+ );
7753
+ }
7754
+ async function billingPortal(arbi, projectExtId) {
7755
+ return requireData(
7756
+ await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/billing-portal", {
7757
+ params: projectPath(projectExtId)
7758
+ }),
7759
+ "Failed to open the billing portal"
7760
+ );
7761
+ }
7762
+ async function addAddonBlock(arbi, projectExtId, kind) {
7763
+ const params = projectPath(projectExtId);
7764
+ return requireData(
7765
+ kind === "ai_usage" ? await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/addons/ai-usage", { params }) : await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/addons/storage", { params }),
7766
+ "Failed to add the add-on"
7767
+ );
7768
+ }
7769
+ async function setNextPeriodAddons(arbi, projectExtId, body) {
7770
+ return requireData(
7771
+ await arbi.fetch.PUT("/v1/user/projects/{project_ext_id}/addons/next-period", {
7772
+ params: projectPath(projectExtId),
7773
+ body
7774
+ }),
7775
+ "Failed to change the add-ons"
7776
+ );
7777
+ }
7778
+ async function updateAddonSettings(arbi, projectExtId, body) {
7779
+ return requireData(
7780
+ await arbi.fetch.PUT("/v1/user/projects/{project_ext_id}/addons/settings", {
7781
+ params: projectPath(projectExtId),
7782
+ body
7783
+ }),
7784
+ "Failed to save the add-on settings"
7785
+ );
7786
+ }
7787
+ async function cancelSubscription(arbi, projectExtId) {
7788
+ return requireData(
7789
+ await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/cancel", {
7790
+ params: projectPath(projectExtId)
7791
+ }),
7792
+ "Failed to cancel the subscription"
7793
+ );
7794
+ }
7643
7795
 
7644
7796
  // src/operations/work.ts
7645
7797
  var work_exports = {};
@@ -8731,10 +8883,8 @@ __export(calendar_exports, {
8731
8883
  cancelPublicBooking: () => cancelPublicBooking,
8732
8884
  connectCalDavAccount: () => connectCalDavAccount,
8733
8885
  connectOAuthAccount: () => connectOAuthAccount,
8734
- createAppPassword: () => createAppPassword,
8735
8886
  createCalendar: () => createCalendar,
8736
8887
  createEvent: () => createEvent,
8737
- createFeed: () => createFeed,
8738
8888
  createRoom: () => createRoom,
8739
8889
  decideCounter: () => decideCounter,
8740
8890
  deleteBookingPage: () => deleteBookingPage,
@@ -8751,7 +8901,6 @@ __export(calendar_exports, {
8751
8901
  getPublicBookingPage: () => getPublicBookingPage,
8752
8902
  importCalendarIcs: () => importCalendarIcs,
8753
8903
  listAccounts: () => listAccounts,
8754
- listAppPasswords: () => listAppPasswords,
8755
8904
  listBookingPages: () => listBookingPages,
8756
8905
  listCalDavProfiles: () => listCalDavProfiles,
8757
8906
  listCalendars: () => listCalendars,
@@ -8769,9 +8918,7 @@ __export(calendar_exports, {
8769
8918
  putCalendarSettings: () => putCalendarSettings,
8770
8919
  refreshCalendar: () => refreshCalendar,
8771
8920
  respondToEvent: () => respondToEvent,
8772
- revokeAppPassword: () => revokeAppPassword,
8773
8921
  shareCalendar: () => shareCalendar,
8774
- splitAppPasswords: () => splitAppPasswords,
8775
8922
  subscribeCalendar: () => subscribeCalendar,
8776
8923
  syncAccount: () => syncAccount,
8777
8924
  unlockCalendarKeys: () => unlockCalendarKeys,
@@ -9159,46 +9306,6 @@ async function publishCalendarToAccount(client, accId, calendarId) {
9159
9306
  "Publishing the calendar"
9160
9307
  );
9161
9308
  }
9162
- async function listAppPasswords(client) {
9163
- return take(await client.fetch.GET("/v1/calendar/app-passwords"), "Loading app passwords");
9164
- }
9165
- async function createAppPassword(client, body) {
9166
- return take(
9167
- await client.fetch.POST("/v1/calendar/app-passwords", {
9168
- body: {
9169
- label: body.label.trim(),
9170
- calendar_ids: body.calendar_ids?.length ? body.calendar_ids : null
9171
- }
9172
- }),
9173
- "Creating the app password"
9174
- );
9175
- }
9176
- async function createFeed(client, body) {
9177
- return take(
9178
- await client.fetch.POST("/v1/calendar/feeds", {
9179
- body: {
9180
- calendar_id: body.calendar_id,
9181
- level: body.level,
9182
- label: body.label?.trim() || (body.level === "full" ? "Feed" : "Free/busy feed")
9183
- }
9184
- }),
9185
- "Creating the feed"
9186
- );
9187
- }
9188
- async function revokeAppPassword(client, apwId) {
9189
- take(
9190
- await client.fetch.DELETE("/v1/calendar/app-passwords/{apw_id}", {
9191
- params: { path: { apw_id: apwId } }
9192
- }),
9193
- "Revoking"
9194
- );
9195
- }
9196
- function splitAppPasswords(rows) {
9197
- return {
9198
- devices: rows.filter((r2) => r2.kind === "dav"),
9199
- feeds: rows.filter((r2) => r2.kind === "feed" || r2.kind === "freebusy")
9200
- };
9201
- }
9202
9309
  async function listBookingPages(client) {
9203
9310
  return take(await client.fetch.GET("/v1/calendar/booking-pages"), "Loading booking pages");
9204
9311
  }
@@ -9567,7 +9674,23 @@ var Arbi = class {
9567
9674
  /** AI usage + spend breakdown for a project's billing period. */
9568
9675
  usage: (projectExtId, monthsBack) => getProjectUsage(this.requireClient(), projectExtId, monthsBack),
9569
9676
  /** Stripe invoices for a project's subscription. */
9570
- invoices: (projectExtId) => getProjectInvoices(this.requireClient(), projectExtId)
9677
+ invoices: (projectExtId) => getProjectInvoices(this.requireClient(), projectExtId),
9678
+ /** Delete a project (only when empty: no workspaces, no subscription). */
9679
+ delete: (projectExtId) => deleteProject(this.requireClient(), projectExtId),
9680
+ /** The plans and add-ons on sale. */
9681
+ products: () => listProducts(this.requireClient()),
9682
+ /** The taxed total of a Pro purchase (a new project when `projectExtId` is null). */
9683
+ quotePlan: (projectExtId, body) => quotePlan(this.requireClient(), projectExtId, body),
9684
+ /** Start an embedded Stripe checkout; returns its `client_secret`. */
9685
+ checkout: (projectExtId, body) => createCheckout(this.requireClient(), projectExtId, body),
9686
+ changePlan: (projectExtId, body) => changePlan(this.requireClient(), projectExtId, body),
9687
+ previewPlanChange: (projectExtId, body) => previewPlanChange(this.requireClient(), projectExtId, body),
9688
+ quoteAddon: (projectExtId, kind) => quoteAddon(this.requireClient(), projectExtId, kind),
9689
+ billingPortal: (projectExtId) => billingPortal(this.requireClient(), projectExtId),
9690
+ addAddonBlock: (projectExtId, kind) => addAddonBlock(this.requireClient(), projectExtId, kind),
9691
+ setNextPeriodAddons: (projectExtId, body) => setNextPeriodAddons(this.requireClient(), projectExtId, body),
9692
+ updateAddonSettings: (projectExtId, body) => updateAddonSettings(this.requireClient(), projectExtId, body),
9693
+ cancelSubscription: (projectExtId) => cancelSubscription(this.requireClient(), projectExtId)
9571
9694
  };
9572
9695
  // ── User (account-scoped usage) ───────────────────────────────────────
9573
9696
  user = {
@@ -9751,6 +9874,11 @@ var Arbi = class {
9751
9874
  void 0,
9752
9875
  options?.confirmInvite
9753
9876
  ),
9877
+ /**
9878
+ * `POST /v1/workspace/users` with the whole request (another workspace with its sealed key, a
9879
+ * session-scoped grant, an invitation, a resource share): see `addWorkspaceMembers`.
9880
+ */
9881
+ addMembers: (request) => addWorkspaceMembers(this.requireClient(), request),
9754
9882
  /**
9755
9883
  * Grant users a temporary key scoped to ONE session (identified by its public key), for
9756
9884
  * example an agent's run session minted by `agents.authorize()`. Nothing standing is created:
@@ -10059,7 +10187,8 @@ var Arbi = class {
10059
10187
  /** The skills the caller can run (own + shared marketplace), metadata only. */
10060
10188
  listSkills: (options) => listSkills(this.requireClient(), options),
10061
10189
  /**
10062
- * Search documents without LLM generation (retrieval only).
10190
+ * Search documents without LLM generation (retrieval only). No `docIds` searches the whole
10191
+ * workspace; `searchChunks(result)` ranks the passages found.
10063
10192
  */
10064
10193
  retrieve: (query, docIds, options) => retrieve({
10065
10194
  arbi: this.requireClient(),
@@ -10189,10 +10318,6 @@ var Arbi = class {
10189
10318
  syncAccount: (accId) => this.withCalendarKeys((c2) => syncAccount(c2, accId)),
10190
10319
  disconnectAccount: (accId) => this.withCalendarKeys((c2) => disconnectAccount(c2, accId)),
10191
10320
  publishToAccount: (accId, calendarId) => this.withCalendarKeys((c2) => publishCalendarToAccount(c2, accId, calendarId)),
10192
- listAppPasswords: () => this.withCalendarKeys((c2) => listAppPasswords(c2)),
10193
- createAppPassword: (body) => this.withCalendarKeys((c2) => createAppPassword(c2, body)),
10194
- createFeed: (body) => this.withCalendarKeys((c2) => createFeed(c2, body)),
10195
- revokeAppPassword: (apwId) => this.withCalendarKeys((c2) => revokeAppPassword(c2, apwId)),
10196
10321
  listBookingPages: () => this.withCalendarKeys((c2) => listBookingPages(c2)),
10197
10322
  putBookingPage: (body) => this.withCalendarKeys((c2) => putBookingPage(c2, body)),
10198
10323
  deleteBookingPage: (slug) => this.withCalendarKeys((c2) => deleteBookingPage(c2, slug))
@@ -11267,6 +11392,116 @@ function attachmentFromFile(filePath) {
11267
11392
  );
11268
11393
  }
11269
11394
 
11395
+ // src/tag-helpers.ts
11396
+ var ENTITY_KINDS = ["person", "organisation"];
11397
+ var PRESENCE_KINDS = ["label", "issue", "person", "organisation"];
11398
+ function defaultKindForFormat(format) {
11399
+ if (format === "checkbox") return "label";
11400
+ if (format === "search") return "search";
11401
+ return "annotation";
11402
+ }
11403
+ function tagUseCount(tag) {
11404
+ return (tag.doctag_count ?? 0) + (tag.facttag_count ?? 0) + (tag.convotag_count ?? 0);
11405
+ }
11406
+ function filterDocumentTags(tags) {
11407
+ return tags.filter((tag) => tag.kind !== "search");
11408
+ }
11409
+ function isPresenceTag(tag) {
11410
+ return PRESENCE_KINDS.includes(tag.kind);
11411
+ }
11412
+ function isLabelTag(tag) {
11413
+ return tag.kind === "label";
11414
+ }
11415
+ function isAnnotationTag(tag) {
11416
+ return tag.kind === "annotation";
11417
+ }
11418
+ function isEntityTag(tag) {
11419
+ return ENTITY_KINDS.includes(tag.kind);
11420
+ }
11421
+ function tagsOfGroup(tags, group) {
11422
+ return tags.filter(group === "label" ? isLabelTag : isAnnotationTag);
11423
+ }
11424
+ function tagsForScope(tags, scope) {
11425
+ return tags.filter((tag) => {
11426
+ const onDocs = (tag.doctag_count ?? 0) > 0;
11427
+ const onFacts = (tag.facttag_count ?? 0) > 0;
11428
+ if (!onDocs && !onFacts) return true;
11429
+ return scope === "document" ? onDocs : onFacts;
11430
+ });
11431
+ }
11432
+ var TAG_NESTING_MAX_DEPTH = 2;
11433
+ function indexByExternalId(tags) {
11434
+ return new Map(tags.map((tag) => [tag.external_id, tag]));
11435
+ }
11436
+ function resolveParentId(tag, byId3) {
11437
+ const parentId = tag.parent_ext_id;
11438
+ if (!parentId || parentId === tag.external_id) return null;
11439
+ return byId3.has(parentId) ? parentId : null;
11440
+ }
11441
+ function buildChildIndex(tags) {
11442
+ const byId3 = indexByExternalId(tags);
11443
+ const childrenOf = /* @__PURE__ */ new Map();
11444
+ for (const tag of tags) {
11445
+ const parentId = resolveParentId(tag, byId3);
11446
+ if (!parentId) continue;
11447
+ const siblings = childrenOf.get(parentId);
11448
+ if (siblings) siblings.push(tag);
11449
+ else childrenOf.set(parentId, [tag]);
11450
+ }
11451
+ return childrenOf;
11452
+ }
11453
+ function getChildTags(tags, tagId) {
11454
+ return buildChildIndex(tags).get(tagId) ?? [];
11455
+ }
11456
+ function getTagDescendantIds(tags, tagId) {
11457
+ const childrenOf = buildChildIndex(tags);
11458
+ const found = /* @__PURE__ */ new Set();
11459
+ const queue = [...childrenOf.get(tagId) ?? []];
11460
+ while (queue.length > 0) {
11461
+ const tag = queue.shift();
11462
+ if (tag.external_id === tagId || found.has(tag.external_id)) continue;
11463
+ found.add(tag.external_id);
11464
+ queue.push(...childrenOf.get(tag.external_id) ?? []);
11465
+ }
11466
+ return found;
11467
+ }
11468
+ function flattenTagTree(tags) {
11469
+ const byId3 = indexByExternalId(tags);
11470
+ const childrenOf = buildChildIndex(tags);
11471
+ const rows = [];
11472
+ const emitted = /* @__PURE__ */ new Set();
11473
+ const visit = (tag, depth) => {
11474
+ if (emitted.has(tag.external_id)) return;
11475
+ emitted.add(tag.external_id);
11476
+ const children = childrenOf.get(tag.external_id) ?? [];
11477
+ rows.push({ tag, depth, childCount: children.length });
11478
+ for (const child of children) visit(child, depth + 1);
11479
+ };
11480
+ for (const tag of tags) {
11481
+ if (resolveParentId(tag, byId3) === null) visit(tag, 0);
11482
+ }
11483
+ for (const tag of tags) visit(tag, 0);
11484
+ return rows;
11485
+ }
11486
+ var isFlatKind = (kind) => FLAT_TAG_KINDS.includes(kind);
11487
+ function getEligibleParentTags(tags, tagId) {
11488
+ const byId3 = indexByExternalId(tags);
11489
+ const blocked = tagId ? getTagDescendantIds(tags, tagId) : /* @__PURE__ */ new Set();
11490
+ if (tagId) blocked.add(tagId);
11491
+ return tags.filter(
11492
+ (tag) => !blocked.has(tag.external_id) && resolveParentId(tag, byId3) === null && // Issues, people and organisations are flat: never a parent (the API refuses it).
11493
+ !isFlatKind(tag.kind)
11494
+ );
11495
+ }
11496
+ function wouldCreateTagCycle(tags, tagId, parentId) {
11497
+ if (!parentId) return false;
11498
+ if (parentId === tagId) return true;
11499
+ return getTagDescendantIds(tags, tagId).has(parentId);
11500
+ }
11501
+ function canTagHaveParent(tags, tagId) {
11502
+ return getChildTags(tags, tagId).length === 0;
11503
+ }
11504
+
11270
11505
  // src/listen/index.ts
11271
11506
  var listen_exports = {};
11272
11507
  __export(listen_exports, {
@@ -11580,6 +11815,6 @@ async function startDmListener(options) {
11580
11815
  };
11581
11816
  }
11582
11817
 
11583
- export { ACCOUNT_VENDOR, Arbi, ArbiApiError, ArbiError, ArbiSessionExpiredError, ClaudeOrchestrator, DEFAULT_AI_USD_PER_GBP, DOC_TERMINAL_STATUSES, DRIVE_SYNC_VENDORS, FLAT_TAG_KINDS, FileConfigStore, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MICROSOFT_VENDORS, OpenClawOrchestrator, PlanStepsError, PublicBookingError, SHAREPOINT_VENDORS, STEP_FIELD_OPTION_TONES, TAG_KINDS, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, agents_exports as agents, assistant_exports as assistant, authenticatedFetch, bookPublicSlot, buildCitationChunkData, buildDocNameMap, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, calendar_exports as calendar, cancelPublicBooking, chats_exports as chats, connectErrorMessage, connectWebSocket, connectWithReconnect, connectors_exports as connectors, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, createDocumentWaiter, device_flow_exports as deviceFlow, doctags_exports as doctags, documents_exports as documents, documents_node_exports as documentsNode, facts_exports as facts, files_exports as files, filterSkills, firm_exports as firm, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatStreamSummary, formatUserName, formatWorkspaceChoices, formatWsMessage, generateEncryptedWorkspaceKey, generateNewWorkspaceKey, getErrorCode, getErrorMessage, getPublicBookingPage, getRawWorkspaceKey, health_exports as health, house_template_exports as houseTemplates, identityErrorCode, identity_exports as identityVerification, isConnectorVendorVisible, isDriveSyncVendor, isMailboxSyncVendor, isSharePointVendor, isSharedSkill, listen_exports as listen, mail_exports as mail, mail_node_exports as mailNode, notifications_exports as notifications, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, performSigningKeyLogin, performSsoDeviceFlowLogin, profile_exports as profile, projects_exports as projects, requireData, requireOk, resolveAuth, resolveCitations, resolveWorkspace, responses_exports as responses, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings, signature_requests_exports as signatureRequests, splitAppPasswords, startDmListener, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, uploadSkill, usdToGbp, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaces_exports as workspaces };
11818
+ export { ACCOUNT_VENDOR, Arbi, ArbiApiError, ArbiError, ArbiSessionExpiredError, ClaudeOrchestrator, DEFAULT_AI_USD_PER_GBP, DOC_TERMINAL_STATUSES, DRIVE_SYNC_VENDORS, ENTITY_KINDS, FLAT_TAG_KINDS, FileConfigStore, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MAX_RETRIEVE_DOC_IDS, MICROSOFT_VENDORS, OpenClawOrchestrator, PRESENCE_KINDS, PlanStepsError, PublicBookingError, SHAREPOINT_VENDORS, STEP_FIELD_OPTION_TONES, TAG_KINDS, TAG_NESTING_MAX_DEPTH, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, agents_exports as agents, assistant_exports as assistant, authenticatedFetch, bookPublicSlot, buildCitationChunkData, buildDocNameMap, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, calendar_exports as calendar, canTagHaveParent, cancelPublicBooking, chats_exports as chats, connectErrorMessage, connectWebSocket, connectWithReconnect, connectors_exports as connectors, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, createDocumentWaiter, defaultKindForFormat, device_flow_exports as deviceFlow, doctags_exports as doctags, documents_exports as documents, documents_node_exports as documentsNode, facts_exports as facts, files_exports as files, filterDocumentTags, filterSkills, firm_exports as firm, flattenTagTree, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatStreamSummary, formatUserName, formatWorkspaceChoices, formatWsMessage, generateEncryptedWorkspaceKey, generateNewWorkspaceKey, getChildTags, getEligibleParentTags, getErrorCode, getErrorMessage, getPublicBookingPage, getRawWorkspaceKey, getTagDescendantIds, health_exports as health, house_template_exports as houseTemplates, identityErrorCode, identity_exports as identityVerification, isAnnotationTag, isConnectorVendorVisible, isDriveSyncVendor, isEntityTag, isFlatKind, isLabelTag, isMailboxSyncVendor, isPresenceTag, isSharePointVendor, isSharedSkill, listen_exports as listen, mail_exports as mail, mail_node_exports as mailNode, notifications_exports as notifications, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, performSigningKeyLogin, performSsoDeviceFlowLogin, profile_exports as profile, projects_exports as projects, refusalReason, requireData, requireOk, resolveAuth, resolveCitations, resolveWorkspace, responses_exports as responses, searchChunks, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings, signature_requests_exports as signatureRequests, startDmListener, streamSSE, stripCitationMarkdown, summarizeCitations, tagUseCount, tags_exports as tags, tagsForScope, tagsOfGroup, uploadSkill, usdToGbp, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaces_exports as workspaces, wouldCreateTagCycle };
11584
11819
  //# sourceMappingURL=index.js.map
11585
11820
  //# sourceMappingURL=index.js.map