@arbidocs/sdk 0.4.107 → 0.4.109

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,6 +1,6 @@
1
- import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, aL as SkippedFile, bf as UploadResult, m as AuthHeaders, bb as UploadBatchResult, be as UploadOptions, bc as UploadDirectOptions, bd as UploadDirectResult, aI as SUPPORTED_EXTENSIONS, a1 as MailAttachment, J as DmCryptoContext } from './browser-yXZhW9gn.cjs';
2
- export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, w as ConversationUsageResponse, z as CreateWorkRequest, B as CreateWorkflowRequest, D as DEFAULT_AI_USD_PER_GBP, E as DOC_TERMINAL_STATUSES, F as DecryptedDmNotification, H as DmAttachmentFile, I as DmAttachmentInput, K as DocNameMap, L as DocumentAutomationAction, M as DocumentListFields, N as DocumentListOrder, O as DocumentSelector, P as DocumentWaiter, Q as DocumentWaiterOptions, U as FormattedWsMessage, V as IdentityErrorCode, W as IdentityPurchase, X as IdentityState, Y as IdentityStatus, Z as LinkedRun, _ as ListAllOptions, a0 as ListPaginatedOptions, a2 as MailDraftSSEEvent, a3 as MessageLevel, a4 as MessageMetadataPayload, a5 as MessageQueuedEvent, a6 as OutputTokensDetails, a7 as ParsedSlashCommand, a8 as PendingAuthResponse, a9 as PlanStepsError, aa as PlanWorkRequest, ac as ProjectBudget, ad as ProjectConversationUsageResponse, ae as ProjectDetails, af as ProjectEventKind, ag as ProjectEventResponse, ah as ProjectInvoicesResponse, ai as ProjectResponse, aj as ProjectUpdateRequest, ak as ProjectUsageResponse, al as QueryOptions, am as RaisedSignal, an as ReconnectOptions, ao as ReconnectableWsConnection, ap as ResolvedCitation, aq as ResolvedRecipient, ar as ResponseCompletedEvent, as as ResponseContentPartAddedEvent, at as ResponseCreatedEvent, au as ResponseFailedEvent, av as ResponseOutputItemAddedEvent, aw as ResponseOutputItemDoneEvent, ax as ResponseOutputTextDeltaEvent, ay as ResponseOutputTextDoneEvent, az as ResponseUsage, aA as RunProgress, aB as RunStep, aC as RunWaitingOn, aD as SSEEvent, aE as SSEStreamCallbacks, aF as SSEStreamResult, aG as SSEStreamStartData, aH as STEP_FIELD_OPTION_TONES, aJ as SendBack, aK as SkillSummary, aM as StepActionRequest, aN as StepActivityEvent, aO as StepAssignee, aP as StepField, aQ as StepFieldOption, aR as StepFieldOptionTone, aS as StepKind, aT as StepPhase, aU as StepSignal, aV as StepSignalWhen, aW as StepState, aX as StepStatus, aY as SubmitBackgroundQueryOptions, aZ as TagChange, a_ as TagFieldDefinition, a$ as TagKind, b0 as TagKindField, b1 as TagKindSchema, b2 as TagLinks, b3 as TagListQuery, b4 as TagResponse, b5 as TaskPlan, b6 as TaskPlanStep, b7 as TokenBudgetContext, b8 as UpdateConversationRequest, ba as UpdateWorkflowRequest, bg as UsageBreakdown, bh as UserDailyUsageResponse, bi as UserInfo, bj as UserInputRequestEvent, bk as UserMessageEvent, bl as WebSocketAuthError, bm as WorkStatus, bn as WorkflowAuthMode, bo as WorkflowResponse, bp as WorkflowRunHistoryResponse, bq as WorkflowRunResponse, br as WorkspaceContext, bs as WsConnection, bt as account, bu as agentconfig, bv as agents, bw as assistant, bx as authenticatedFetch, by as buildDocNameMap, bz as buildFactsContextTool, bA as buildRetrievalChunkTool, bB as buildRetrievalFullContextTool, bC as buildRetrievalTocTool, bD as connectWebSocket, bE as connectWithReconnect, bF as consumeSSEStream, bG as contacts, bH as conversations, bI as countCitations, bJ as createAuthenticatedClient, bK as createDocumentWaiter, bL as dm, bM as doctags, bN as documents, bO as facts, bP as files, bQ as filterSkills, bR as formatAgentStepLabel, bS as formatFileSize, bT as formatGbp, bU as formatGbpPerMillionTokens, bV as formatItemLabel, bW as formatStreamSummary, bX as formatUserName, bY as formatWorkspaceChoices, bZ as formatWsMessage, b_ as generateEncryptedWorkspaceKey, b$ as generateNewWorkspaceKey, c0 as getErrorCode, c1 as getErrorMessage, c2 as getRawWorkspaceKey, c3 as health, c5 as identityErrorCode, c4 as identityVerification, c6 as mail, c7 as parseSSEEvents, c8 as parseSlashCommand, c9 as parseSlashTokenInProgress, ca as performPasswordLogin, cb as performSigningKeyLogin, cc as performSsoDeviceFlowLogin, cd as profile, ce as projects, cf as requireData, cg as requireOk, ch as resolveAuth, ci as resolveCitations, cj as resolveWorkspace, ck as responses, cl as selectWorkspace, cm as selectWorkspaceById, cn as sessions, co as settings, cp as signatureRequests, cq as streamSSE, cr as stripCitationMarkdown, cs as summarizeCitations, ct as tags, cu as usdToGbp, cv as work, cw as workflowSteps, cx as workflows, cy as workspaces } from './browser-yXZhW9gn.cjs';
3
- import { SessionStorageProvider, ArbiClient } from '@arbidocs/client';
1
+ import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, aL as SkippedFile, bf as UploadResult, m as AuthHeaders, bb as UploadBatchResult, be as UploadOptions, bc as UploadDirectOptions, bd as UploadDirectResult, aI as SUPPORTED_EXTENSIONS, a1 as MailAttachment, J as DmCryptoContext } from './browser-B18uooMW.cjs';
2
+ export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, w as ConversationUsageResponse, z as CreateWorkRequest, B as CreateWorkflowRequest, D as DEFAULT_AI_USD_PER_GBP, E as DOC_TERMINAL_STATUSES, F as DecryptedDmNotification, H as DmAttachmentFile, I as DmAttachmentInput, K as DocNameMap, L as DocumentAutomationAction, M as DocumentListFields, N as DocumentListOrder, O as DocumentSelector, P as DocumentWaiter, Q as DocumentWaiterOptions, U as FormattedWsMessage, V as IdentityErrorCode, W as IdentityPurchase, X as IdentityState, Y as IdentityStatus, Z as LinkedRun, _ as ListAllOptions, a0 as ListPaginatedOptions, a2 as MailDraftSSEEvent, a3 as MessageLevel, a4 as MessageMetadataPayload, a5 as MessageQueuedEvent, a6 as OutputTokensDetails, a7 as ParsedSlashCommand, a8 as PendingAuthResponse, a9 as PlanStepsError, aa as PlanWorkRequest, ac as ProjectBudget, ad as ProjectConversationUsageResponse, ae as ProjectDetails, af as ProjectEventKind, ag as ProjectEventResponse, ah as ProjectInvoicesResponse, ai as ProjectResponse, aj as ProjectUpdateRequest, ak as ProjectUsageResponse, al as QueryOptions, am as RaisedSignal, an as ReconnectOptions, ao as ReconnectableWsConnection, ap as ResolvedCitation, aq as ResolvedRecipient, ar as ResponseCompletedEvent, as as ResponseContentPartAddedEvent, at as ResponseCreatedEvent, au as ResponseFailedEvent, av as ResponseOutputItemAddedEvent, aw as ResponseOutputItemDoneEvent, ax as ResponseOutputTextDeltaEvent, ay as ResponseOutputTextDoneEvent, az as ResponseUsage, aA as RunProgress, aB as RunStep, aC as RunWaitingOn, aD as SSEEvent, aE as SSEStreamCallbacks, aF as SSEStreamResult, aG as SSEStreamStartData, aH as STEP_FIELD_OPTION_TONES, aJ as SendBack, aK as SkillSummary, aM as StepActionRequest, aN as StepActivityEvent, aO as StepAssignee, aP as StepField, aQ as StepFieldOption, aR as StepFieldOptionTone, aS as StepKind, aT as StepPhase, aU as StepSignal, aV as StepSignalWhen, aW as StepState, aX as StepStatus, aY as SubmitBackgroundQueryOptions, aZ as TagChange, a_ as TagFieldDefinition, a$ as TagKind, b0 as TagKindField, b1 as TagKindSchema, b2 as TagLinks, b3 as TagListQuery, b4 as TagResponse, b5 as TaskPlan, b6 as TaskPlanStep, b7 as TokenBudgetContext, b8 as UpdateConversationRequest, ba as UpdateWorkflowRequest, bg as UsageBreakdown, bh as UserDailyUsageResponse, bi as UserInfo, bj as UserInputRequestEvent, bk as UserMessageEvent, bl as WebSocketAuthError, bm as WorkStatus, bn as WorkflowAuthMode, bo as WorkflowResponse, bp as WorkflowRunHistoryResponse, bq as WorkflowRunResponse, br as WorkspaceContext, bs as WsConnection, bt as account, bu as agentconfig, bv as agents, bw as assistant, bx as authenticatedFetch, by as buildDocNameMap, bz as buildFactsContextTool, bA as buildRetrievalChunkTool, bB as buildRetrievalFullContextTool, bC as buildRetrievalTocTool, bD as connectWebSocket, bE as connectWithReconnect, bF as consumeSSEStream, bG as contacts, bH as conversations, bI as countCitations, bJ as createAuthenticatedClient, bK as createDocumentWaiter, bL as dm, bM as doctags, bN as documents, bO as facts, bP as files, bQ as filterSkills, bR as formatAgentStepLabel, bS as formatFileSize, bT as formatGbp, bU as formatGbpPerMillionTokens, bV as formatItemLabel, bW as formatStreamSummary, bX as formatUserName, bY as formatWorkspaceChoices, bZ as formatWsMessage, b_ as generateEncryptedWorkspaceKey, b$ as generateNewWorkspaceKey, c0 as getErrorCode, c1 as getErrorMessage, c2 as getRawWorkspaceKey, c3 as health, c5 as identityErrorCode, c4 as identityVerification, c6 as mail, c7 as parseSSEEvents, c8 as parseSlashCommand, c9 as parseSlashTokenInProgress, ca as performPasswordLogin, cb as performSigningKeyLogin, cc as performSsoDeviceFlowLogin, cd as profile, ce as projects, cf as requireData, cg as requireOk, ch as resolveAuth, ci as resolveCitations, cj as resolveWorkspace, ck as responses, cl as selectWorkspace, cm as selectWorkspaceById, cn as sessions, co as settings, cp as signatureRequests, cq as streamSSE, cr as stripCitationMarkdown, cs as summarizeCitations, ct as tags, cu as usdToGbp, cv as work, cw as workflowSteps, cx as workflows, cy as workspaces } from './browser-B18uooMW.cjs';
3
+ import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
4
4
  export { LoginProfile } from '@arbidocs/client';
5
5
 
6
6
  /**
@@ -387,6 +387,59 @@ declare namespace mailNode {
387
387
  export { mailNode_attachmentFromFile as attachmentFromFile };
388
388
  }
389
389
 
390
+ /**
391
+ * Firm operations — the deployment's pooled monthly £ of AI usage (Box deployments).
392
+ */
393
+
394
+ type FirmPoolResponse = components['schemas']['FirmPoolResponse'];
395
+ /**
396
+ * The firm's AI usage pool this month (£): licence, add-ons, used of total, auto add-ons, and whether
397
+ * the caller may top up. `has_pool` is false where the deployment has no pooled budget. Readable by
398
+ * firm members and Box admins; anyone else gets a 403.
399
+ */
400
+ declare function getFirmPool(arbi: ArbiClient): Promise<FirmPoolResponse>;
401
+ /**
402
+ * Buy `aiAddons` renewing add-ons (+£10 of AI usage a month each) for the whole firm. Box admins only. Returns the
403
+ * updated pool and, when the payment needs the customer, the invoice to open.
404
+ */
405
+ declare function topUpFirmPool(arbi: ArbiClient, aiAddons: number): Promise<{
406
+ pool: {
407
+ has_pool: boolean;
408
+ month?: string | null | undefined;
409
+ resets_at?: string | null | undefined;
410
+ licence_status?: string | null | undefined;
411
+ expires_at?: string | null | undefined;
412
+ premium_only: boolean;
413
+ box_seats?: number | null | undefined;
414
+ plus_seats?: number | null | undefined;
415
+ ai_addons?: number | null | undefined;
416
+ addon_gbp?: number | null | undefined;
417
+ base_gbp?: number | null | undefined;
418
+ auto_addons?: number | null | undefined;
419
+ auto_addon_gbp?: number | null | undefined;
420
+ auto_addon_price_pence?: number | null | undefined;
421
+ auto_addon_spent_pence?: number | null | undefined;
422
+ auto_addon_limit_pence?: number | null | undefined;
423
+ total_gbp?: number | null | undefined;
424
+ used_gbp?: number | null | undefined;
425
+ remaining_gbp?: number | null | undefined;
426
+ people_this_month?: number | null | undefined;
427
+ report_computed_at?: string | null | undefined;
428
+ subscription_status?: string | null | undefined;
429
+ cancel_at_period_end?: boolean | null | undefined;
430
+ period_end?: string | null | undefined;
431
+ can_top_up: boolean;
432
+ };
433
+ invoice_url?: string | null | undefined;
434
+ }>;
435
+
436
+ type firm_FirmPoolResponse = FirmPoolResponse;
437
+ declare const firm_getFirmPool: typeof getFirmPool;
438
+ declare const firm_topUpFirmPool: typeof topUpFirmPool;
439
+ declare namespace firm {
440
+ export { type firm_FirmPoolResponse as FirmPoolResponse, firm_getFirmPool as getFirmPool, firm_topUpFirmPool as topUpFirmPool };
441
+ }
442
+
390
443
  /**
391
444
  * Orchestrator interface for `arbi listen`.
392
445
  *
@@ -564,4 +617,4 @@ declare namespace index {
564
617
  export { index_ClaudeOrchestrator as ClaudeOrchestrator, type index_ClaudeOrchestratorOptions as ClaudeOrchestratorOptions, type index_DmListener as DmListener, type index_DmListenerOptions as DmListenerOptions, index_OpenClawOrchestrator as OpenClawOrchestrator, type index_OpenClawOrchestratorOptions as OpenClawOrchestratorOptions, type index_Orchestrator as Orchestrator, type index_PromptContext as PromptContext, index_startDmListener as startDmListener };
565
618
  }
566
619
 
567
- export { AuthHeaders, ChatSession, ClaudeOrchestrator, type ClaudeOrchestratorOptions, CliConfig, CliCredentials, ConfigStore, DmCryptoContext, type DmListener, type DmListenerOptions, FileConfigStore, OpenClawOrchestrator, type OpenClawOrchestratorOptions, type Orchestrator, type PromptContext, deviceFlow, documentsNode, index as listen, mailNode, startDmListener };
620
+ export { AuthHeaders, ChatSession, ClaudeOrchestrator, type ClaudeOrchestratorOptions, CliConfig, CliCredentials, ConfigStore, DmCryptoContext, type DmListener, type DmListenerOptions, FileConfigStore, type FirmPoolResponse, OpenClawOrchestrator, type OpenClawOrchestratorOptions, type Orchestrator, type PromptContext, deviceFlow, documentsNode, firm, index as listen, mailNode, startDmListener };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, aL as SkippedFile, bf as UploadResult, m as AuthHeaders, bb as UploadBatchResult, be as UploadOptions, bc as UploadDirectOptions, bd as UploadDirectResult, aI as SUPPORTED_EXTENSIONS, a1 as MailAttachment, J as DmCryptoContext } from './browser-yXZhW9gn.js';
2
- export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, w as ConversationUsageResponse, z as CreateWorkRequest, B as CreateWorkflowRequest, D as DEFAULT_AI_USD_PER_GBP, E as DOC_TERMINAL_STATUSES, F as DecryptedDmNotification, H as DmAttachmentFile, I as DmAttachmentInput, K as DocNameMap, L as DocumentAutomationAction, M as DocumentListFields, N as DocumentListOrder, O as DocumentSelector, P as DocumentWaiter, Q as DocumentWaiterOptions, U as FormattedWsMessage, V as IdentityErrorCode, W as IdentityPurchase, X as IdentityState, Y as IdentityStatus, Z as LinkedRun, _ as ListAllOptions, a0 as ListPaginatedOptions, a2 as MailDraftSSEEvent, a3 as MessageLevel, a4 as MessageMetadataPayload, a5 as MessageQueuedEvent, a6 as OutputTokensDetails, a7 as ParsedSlashCommand, a8 as PendingAuthResponse, a9 as PlanStepsError, aa as PlanWorkRequest, ac as ProjectBudget, ad as ProjectConversationUsageResponse, ae as ProjectDetails, af as ProjectEventKind, ag as ProjectEventResponse, ah as ProjectInvoicesResponse, ai as ProjectResponse, aj as ProjectUpdateRequest, ak as ProjectUsageResponse, al as QueryOptions, am as RaisedSignal, an as ReconnectOptions, ao as ReconnectableWsConnection, ap as ResolvedCitation, aq as ResolvedRecipient, ar as ResponseCompletedEvent, as as ResponseContentPartAddedEvent, at as ResponseCreatedEvent, au as ResponseFailedEvent, av as ResponseOutputItemAddedEvent, aw as ResponseOutputItemDoneEvent, ax as ResponseOutputTextDeltaEvent, ay as ResponseOutputTextDoneEvent, az as ResponseUsage, aA as RunProgress, aB as RunStep, aC as RunWaitingOn, aD as SSEEvent, aE as SSEStreamCallbacks, aF as SSEStreamResult, aG as SSEStreamStartData, aH as STEP_FIELD_OPTION_TONES, aJ as SendBack, aK as SkillSummary, aM as StepActionRequest, aN as StepActivityEvent, aO as StepAssignee, aP as StepField, aQ as StepFieldOption, aR as StepFieldOptionTone, aS as StepKind, aT as StepPhase, aU as StepSignal, aV as StepSignalWhen, aW as StepState, aX as StepStatus, aY as SubmitBackgroundQueryOptions, aZ as TagChange, a_ as TagFieldDefinition, a$ as TagKind, b0 as TagKindField, b1 as TagKindSchema, b2 as TagLinks, b3 as TagListQuery, b4 as TagResponse, b5 as TaskPlan, b6 as TaskPlanStep, b7 as TokenBudgetContext, b8 as UpdateConversationRequest, ba as UpdateWorkflowRequest, bg as UsageBreakdown, bh as UserDailyUsageResponse, bi as UserInfo, bj as UserInputRequestEvent, bk as UserMessageEvent, bl as WebSocketAuthError, bm as WorkStatus, bn as WorkflowAuthMode, bo as WorkflowResponse, bp as WorkflowRunHistoryResponse, bq as WorkflowRunResponse, br as WorkspaceContext, bs as WsConnection, bt as account, bu as agentconfig, bv as agents, bw as assistant, bx as authenticatedFetch, by as buildDocNameMap, bz as buildFactsContextTool, bA as buildRetrievalChunkTool, bB as buildRetrievalFullContextTool, bC as buildRetrievalTocTool, bD as connectWebSocket, bE as connectWithReconnect, bF as consumeSSEStream, bG as contacts, bH as conversations, bI as countCitations, bJ as createAuthenticatedClient, bK as createDocumentWaiter, bL as dm, bM as doctags, bN as documents, bO as facts, bP as files, bQ as filterSkills, bR as formatAgentStepLabel, bS as formatFileSize, bT as formatGbp, bU as formatGbpPerMillionTokens, bV as formatItemLabel, bW as formatStreamSummary, bX as formatUserName, bY as formatWorkspaceChoices, bZ as formatWsMessage, b_ as generateEncryptedWorkspaceKey, b$ as generateNewWorkspaceKey, c0 as getErrorCode, c1 as getErrorMessage, c2 as getRawWorkspaceKey, c3 as health, c5 as identityErrorCode, c4 as identityVerification, c6 as mail, c7 as parseSSEEvents, c8 as parseSlashCommand, c9 as parseSlashTokenInProgress, ca as performPasswordLogin, cb as performSigningKeyLogin, cc as performSsoDeviceFlowLogin, cd as profile, ce as projects, cf as requireData, cg as requireOk, ch as resolveAuth, ci as resolveCitations, cj as resolveWorkspace, ck as responses, cl as selectWorkspace, cm as selectWorkspaceById, cn as sessions, co as settings, cp as signatureRequests, cq as streamSSE, cr as stripCitationMarkdown, cs as summarizeCitations, ct as tags, cu as usdToGbp, cv as work, cw as workflowSteps, cx as workflows, cy as workspaces } from './browser-yXZhW9gn.js';
3
- import { SessionStorageProvider, ArbiClient } from '@arbidocs/client';
1
+ import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, aL as SkippedFile, bf as UploadResult, m as AuthHeaders, bb as UploadBatchResult, be as UploadOptions, bc as UploadDirectOptions, bd as UploadDirectResult, aI as SUPPORTED_EXTENSIONS, a1 as MailAttachment, J as DmCryptoContext } from './browser-B18uooMW.js';
2
+ export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, w as ConversationUsageResponse, z as CreateWorkRequest, B as CreateWorkflowRequest, D as DEFAULT_AI_USD_PER_GBP, E as DOC_TERMINAL_STATUSES, F as DecryptedDmNotification, H as DmAttachmentFile, I as DmAttachmentInput, K as DocNameMap, L as DocumentAutomationAction, M as DocumentListFields, N as DocumentListOrder, O as DocumentSelector, P as DocumentWaiter, Q as DocumentWaiterOptions, U as FormattedWsMessage, V as IdentityErrorCode, W as IdentityPurchase, X as IdentityState, Y as IdentityStatus, Z as LinkedRun, _ as ListAllOptions, a0 as ListPaginatedOptions, a2 as MailDraftSSEEvent, a3 as MessageLevel, a4 as MessageMetadataPayload, a5 as MessageQueuedEvent, a6 as OutputTokensDetails, a7 as ParsedSlashCommand, a8 as PendingAuthResponse, a9 as PlanStepsError, aa as PlanWorkRequest, ac as ProjectBudget, ad as ProjectConversationUsageResponse, ae as ProjectDetails, af as ProjectEventKind, ag as ProjectEventResponse, ah as ProjectInvoicesResponse, ai as ProjectResponse, aj as ProjectUpdateRequest, ak as ProjectUsageResponse, al as QueryOptions, am as RaisedSignal, an as ReconnectOptions, ao as ReconnectableWsConnection, ap as ResolvedCitation, aq as ResolvedRecipient, ar as ResponseCompletedEvent, as as ResponseContentPartAddedEvent, at as ResponseCreatedEvent, au as ResponseFailedEvent, av as ResponseOutputItemAddedEvent, aw as ResponseOutputItemDoneEvent, ax as ResponseOutputTextDeltaEvent, ay as ResponseOutputTextDoneEvent, az as ResponseUsage, aA as RunProgress, aB as RunStep, aC as RunWaitingOn, aD as SSEEvent, aE as SSEStreamCallbacks, aF as SSEStreamResult, aG as SSEStreamStartData, aH as STEP_FIELD_OPTION_TONES, aJ as SendBack, aK as SkillSummary, aM as StepActionRequest, aN as StepActivityEvent, aO as StepAssignee, aP as StepField, aQ as StepFieldOption, aR as StepFieldOptionTone, aS as StepKind, aT as StepPhase, aU as StepSignal, aV as StepSignalWhen, aW as StepState, aX as StepStatus, aY as SubmitBackgroundQueryOptions, aZ as TagChange, a_ as TagFieldDefinition, a$ as TagKind, b0 as TagKindField, b1 as TagKindSchema, b2 as TagLinks, b3 as TagListQuery, b4 as TagResponse, b5 as TaskPlan, b6 as TaskPlanStep, b7 as TokenBudgetContext, b8 as UpdateConversationRequest, ba as UpdateWorkflowRequest, bg as UsageBreakdown, bh as UserDailyUsageResponse, bi as UserInfo, bj as UserInputRequestEvent, bk as UserMessageEvent, bl as WebSocketAuthError, bm as WorkStatus, bn as WorkflowAuthMode, bo as WorkflowResponse, bp as WorkflowRunHistoryResponse, bq as WorkflowRunResponse, br as WorkspaceContext, bs as WsConnection, bt as account, bu as agentconfig, bv as agents, bw as assistant, bx as authenticatedFetch, by as buildDocNameMap, bz as buildFactsContextTool, bA as buildRetrievalChunkTool, bB as buildRetrievalFullContextTool, bC as buildRetrievalTocTool, bD as connectWebSocket, bE as connectWithReconnect, bF as consumeSSEStream, bG as contacts, bH as conversations, bI as countCitations, bJ as createAuthenticatedClient, bK as createDocumentWaiter, bL as dm, bM as doctags, bN as documents, bO as facts, bP as files, bQ as filterSkills, bR as formatAgentStepLabel, bS as formatFileSize, bT as formatGbp, bU as formatGbpPerMillionTokens, bV as formatItemLabel, bW as formatStreamSummary, bX as formatUserName, bY as formatWorkspaceChoices, bZ as formatWsMessage, b_ as generateEncryptedWorkspaceKey, b$ as generateNewWorkspaceKey, c0 as getErrorCode, c1 as getErrorMessage, c2 as getRawWorkspaceKey, c3 as health, c5 as identityErrorCode, c4 as identityVerification, c6 as mail, c7 as parseSSEEvents, c8 as parseSlashCommand, c9 as parseSlashTokenInProgress, ca as performPasswordLogin, cb as performSigningKeyLogin, cc as performSsoDeviceFlowLogin, cd as profile, ce as projects, cf as requireData, cg as requireOk, ch as resolveAuth, ci as resolveCitations, cj as resolveWorkspace, ck as responses, cl as selectWorkspace, cm as selectWorkspaceById, cn as sessions, co as settings, cp as signatureRequests, cq as streamSSE, cr as stripCitationMarkdown, cs as summarizeCitations, ct as tags, cu as usdToGbp, cv as work, cw as workflowSteps, cx as workflows, cy as workspaces } from './browser-B18uooMW.js';
3
+ import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
4
4
  export { LoginProfile } from '@arbidocs/client';
5
5
 
6
6
  /**
@@ -387,6 +387,59 @@ declare namespace mailNode {
387
387
  export { mailNode_attachmentFromFile as attachmentFromFile };
388
388
  }
389
389
 
390
+ /**
391
+ * Firm operations — the deployment's pooled monthly £ of AI usage (Box deployments).
392
+ */
393
+
394
+ type FirmPoolResponse = components['schemas']['FirmPoolResponse'];
395
+ /**
396
+ * The firm's AI usage pool this month (£): licence, add-ons, used of total, auto add-ons, and whether
397
+ * the caller may top up. `has_pool` is false where the deployment has no pooled budget. Readable by
398
+ * firm members and Box admins; anyone else gets a 403.
399
+ */
400
+ declare function getFirmPool(arbi: ArbiClient): Promise<FirmPoolResponse>;
401
+ /**
402
+ * Buy `aiAddons` renewing add-ons (+£10 of AI usage a month each) for the whole firm. Box admins only. Returns the
403
+ * updated pool and, when the payment needs the customer, the invoice to open.
404
+ */
405
+ declare function topUpFirmPool(arbi: ArbiClient, aiAddons: number): Promise<{
406
+ pool: {
407
+ has_pool: boolean;
408
+ month?: string | null | undefined;
409
+ resets_at?: string | null | undefined;
410
+ licence_status?: string | null | undefined;
411
+ expires_at?: string | null | undefined;
412
+ premium_only: boolean;
413
+ box_seats?: number | null | undefined;
414
+ plus_seats?: number | null | undefined;
415
+ ai_addons?: number | null | undefined;
416
+ addon_gbp?: number | null | undefined;
417
+ base_gbp?: number | null | undefined;
418
+ auto_addons?: number | null | undefined;
419
+ auto_addon_gbp?: number | null | undefined;
420
+ auto_addon_price_pence?: number | null | undefined;
421
+ auto_addon_spent_pence?: number | null | undefined;
422
+ auto_addon_limit_pence?: number | null | undefined;
423
+ total_gbp?: number | null | undefined;
424
+ used_gbp?: number | null | undefined;
425
+ remaining_gbp?: number | null | undefined;
426
+ people_this_month?: number | null | undefined;
427
+ report_computed_at?: string | null | undefined;
428
+ subscription_status?: string | null | undefined;
429
+ cancel_at_period_end?: boolean | null | undefined;
430
+ period_end?: string | null | undefined;
431
+ can_top_up: boolean;
432
+ };
433
+ invoice_url?: string | null | undefined;
434
+ }>;
435
+
436
+ type firm_FirmPoolResponse = FirmPoolResponse;
437
+ declare const firm_getFirmPool: typeof getFirmPool;
438
+ declare const firm_topUpFirmPool: typeof topUpFirmPool;
439
+ declare namespace firm {
440
+ export { type firm_FirmPoolResponse as FirmPoolResponse, firm_getFirmPool as getFirmPool, firm_topUpFirmPool as topUpFirmPool };
441
+ }
442
+
390
443
  /**
391
444
  * Orchestrator interface for `arbi listen`.
392
445
  *
@@ -564,4 +617,4 @@ declare namespace index {
564
617
  export { index_ClaudeOrchestrator as ClaudeOrchestrator, type index_ClaudeOrchestratorOptions as ClaudeOrchestratorOptions, type index_DmListener as DmListener, type index_DmListenerOptions as DmListenerOptions, index_OpenClawOrchestrator as OpenClawOrchestrator, type index_OpenClawOrchestratorOptions as OpenClawOrchestratorOptions, type index_Orchestrator as Orchestrator, type index_PromptContext as PromptContext, index_startDmListener as startDmListener };
565
618
  }
566
619
 
567
- export { AuthHeaders, ChatSession, ClaudeOrchestrator, type ClaudeOrchestratorOptions, CliConfig, CliCredentials, ConfigStore, DmCryptoContext, type DmListener, type DmListenerOptions, FileConfigStore, OpenClawOrchestrator, type OpenClawOrchestratorOptions, type Orchestrator, type PromptContext, deviceFlow, documentsNode, index as listen, mailNode, startDmListener };
620
+ export { AuthHeaders, ChatSession, ClaudeOrchestrator, type ClaudeOrchestratorOptions, CliConfig, CliCredentials, ConfigStore, DmCryptoContext, type DmListener, type DmListenerOptions, FileConfigStore, type FirmPoolResponse, OpenClawOrchestrator, type OpenClawOrchestratorOptions, type Orchestrator, type PromptContext, deviceFlow, documentsNode, firm, index as listen, mailNode, startDmListener };
package/dist/index.js CHANGED
@@ -6722,6 +6722,22 @@ async function updateProfile(arbi, body) {
6722
6722
  );
6723
6723
  }
6724
6724
 
6725
+ // src/operations/firm.ts
6726
+ var firm_exports = {};
6727
+ __export(firm_exports, {
6728
+ getFirmPool: () => getFirmPool,
6729
+ topUpFirmPool: () => topUpFirmPool
6730
+ });
6731
+ async function getFirmPool(arbi) {
6732
+ return requireData(await arbi.fetch.GET("/v1/firm/pool"), "Failed to fetch the firm AI usage");
6733
+ }
6734
+ async function topUpFirmPool(arbi, aiAddons) {
6735
+ return requireData(
6736
+ await arbi.fetch.POST("/v1/firm/pool/topup", { body: { ai_addons: aiAddons } }),
6737
+ "Failed to add firm AI usage"
6738
+ );
6739
+ }
6740
+
6725
6741
  // src/operations/account.ts
6726
6742
  var account_exports = {};
6727
6743
  __export(account_exports, {
@@ -8302,6 +8318,13 @@ var Arbi = class {
8302
8318
  */
8303
8319
  me: () => getCurrentUser(this.requireClient())
8304
8320
  };
8321
+ // ── Firm ──────────────────────────────────────────────────────────────
8322
+ firm = {
8323
+ /** The firm's pooled monthly £ of AI usage (`has_pool` false where there is none). */
8324
+ pool: () => getFirmPool(this.requireClient()),
8325
+ /** Buy `aiAddons` renewing add-ons (+£10 of AI usage a month each) for the firm. Box admins only. */
8326
+ topUp: (aiAddons) => topUpFirmPool(this.requireClient(), aiAddons)
8327
+ };
8305
8328
  // ── Profile ───────────────────────────────────────────────────────────
8306
8329
  profile = {
8307
8330
  /** Update the display profile; pass only what changes (`''` clears family name or picture). */
@@ -10049,6 +10072,6 @@ async function startDmListener(options) {
10049
10072
  };
10050
10073
  }
10051
10074
 
10052
- export { Arbi, ArbiApiError, ArbiError, ArbiSessionExpiredError, ClaudeOrchestrator, DEFAULT_AI_USD_PER_GBP, DOC_TERMINAL_STATUSES, FileConfigStore, OpenClawOrchestrator, PlanStepsError, STEP_FIELD_OPTION_TONES, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, agents_exports as agents, assistant_exports as assistant, authenticatedFetch, buildDocNameMap, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, connectWebSocket, connectWithReconnect, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, createDocumentWaiter, device_flow_exports as deviceFlow, dm_exports as dm, doctags_exports as doctags, documents_exports as documents, documents_node_exports as documentsNode, facts_exports as facts, files_exports as files, filterSkills, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatStreamSummary, formatUserName, formatWorkspaceChoices, formatWsMessage, generateEncryptedWorkspaceKey, generateNewWorkspaceKey, getErrorCode, getErrorMessage, getRawWorkspaceKey, health_exports as health, identityErrorCode, identity_exports as identityVerification, listen_exports as listen, mail_exports as mail, mail_node_exports as mailNode, 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, startDmListener, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, usdToGbp, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaces_exports as workspaces };
10075
+ export { Arbi, ArbiApiError, ArbiError, ArbiSessionExpiredError, ClaudeOrchestrator, DEFAULT_AI_USD_PER_GBP, DOC_TERMINAL_STATUSES, FileConfigStore, OpenClawOrchestrator, PlanStepsError, STEP_FIELD_OPTION_TONES, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, agents_exports as agents, assistant_exports as assistant, authenticatedFetch, buildDocNameMap, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, connectWebSocket, connectWithReconnect, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, createDocumentWaiter, device_flow_exports as deviceFlow, dm_exports as dm, 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, getRawWorkspaceKey, health_exports as health, identityErrorCode, identity_exports as identityVerification, listen_exports as listen, mail_exports as mail, mail_node_exports as mailNode, 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, startDmListener, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, usdToGbp, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaces_exports as workspaces };
10053
10076
  //# sourceMappingURL=index.js.map
10054
10077
  //# sourceMappingURL=index.js.map