@arbidocs/sdk 0.5.75 → 0.5.77

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.
@@ -981,6 +981,25 @@ interface SetupReport {
981
981
  /** No credentials, response bodies, names, keys or document content are returned in the report. */
982
982
  declare function diagnoseSetup(options: DiagnoseOptions): Promise<SetupReport>;
983
983
 
984
+ /** Human-authored reports; screenshot capture remains an explicit UI choice. */
985
+
986
+ interface SupportTicketInput {
987
+ description: string;
988
+ screenshot?: Blob;
989
+ /** Reuse this key when retrying the same report. */
990
+ idempotencyKey?: string;
991
+ }
992
+ declare function createSupportTicket(arbi: ArbiClient, input: SupportTicketInput): Promise<{
993
+ ticket_id: number;
994
+ reference: string;
995
+ }>;
996
+
997
+ type support_SupportTicketInput = SupportTicketInput;
998
+ declare const support_createSupportTicket: typeof createSupportTicket;
999
+ declare namespace support {
1000
+ export { type support_SupportTicketInput as SupportTicketInput, support_createSupportTicket as createSupportTicket };
1001
+ }
1002
+
984
1003
  /**
985
1004
  * Document operations — browser-safe functions.
986
1005
  *
@@ -2226,6 +2245,27 @@ interface NativeMailKeys {
2226
2245
  * Call it again to unlock mail that arrived since.
2227
2246
  */
2228
2247
  declare function unlockNativeMail(mail: MailFetch, keys: NativeMailKeys): Promise<void>;
2248
+ /**
2249
+ * Hand this session a connected IMAP account's credentials: they are kept sealed to the user, so
2250
+ * unwrap them with the user's private key and re-seal them to the server session.
2251
+ */
2252
+ declare function unlockMailCredentials(mail: MailFetch, accountId: string, keys: NativeMailKeys): Promise<void>;
2253
+ /** What opens a draft's body in the Word editor (`key` is filled in by {@link openDraftEditor}). */
2254
+ type MailDraftEditorOpen = Omit<Schemas$2['MailRoomOpen'], 'key'>;
2255
+ /** A collaboration session on a draft's body; `identity` is who edits in the room. */
2256
+ type MailDraftEditorSession = Omit<Schemas$2['MailRoomSession'], 'identity'> & {
2257
+ identity: {
2258
+ actorId: string;
2259
+ name: string;
2260
+ role: 'human' | 'agent';
2261
+ };
2262
+ };
2263
+ /**
2264
+ * Open a native draft's body in the Word editor. A room this session has not unlocked answers 423
2265
+ * with its key sealed to the user: unwrap it with their private key and seal it to the server
2266
+ * session, as unlocking the inbox does, then open again with it.
2267
+ */
2268
+ declare function openDraftEditor(mail: MailFetch, body: MailDraftEditorOpen, keys: () => Promise<NativeMailKeys>): Promise<MailDraftEditorSession>;
2229
2269
  /** Build an attachment from bytes. */
2230
2270
  declare function attachmentFromBytes(name: string, contentType: string, bytes: Uint8Array): MailAttachment;
2231
2271
 
@@ -2235,6 +2275,8 @@ type mail_MailAddress = MailAddress;
2235
2275
  type mail_MailAddressInput = MailAddressInput;
2236
2276
  type mail_MailAttachment = MailAttachment;
2237
2277
  type mail_MailCompose = MailCompose;
2278
+ type mail_MailDraftEditorOpen = MailDraftEditorOpen;
2279
+ type mail_MailDraftEditorSession = MailDraftEditorSession;
2238
2280
  type mail_MailDraftSaved = MailDraftSaved;
2239
2281
  type mail_MailFetch = MailFetch;
2240
2282
  type mail_MailFolder = MailFolder;
@@ -2254,12 +2296,14 @@ declare const mail_getMailPolicy: typeof getMailPolicy;
2254
2296
  declare const mail_listFolders: typeof listFolders;
2255
2297
  declare const mail_listMailAccounts: typeof listMailAccounts;
2256
2298
  declare const mail_listMessages: typeof listMessages;
2299
+ declare const mail_openDraftEditor: typeof openDraftEditor;
2257
2300
  declare const mail_saveDraft: typeof saveDraft;
2258
2301
  declare const mail_sendMessage: typeof sendMessage;
2302
+ declare const mail_unlockMailCredentials: typeof unlockMailCredentials;
2259
2303
  declare const mail_unlockNativeMail: typeof unlockNativeMail;
2260
2304
  declare const mail_updateMessage: typeof updateMessage;
2261
2305
  declare namespace mail {
2262
- export { type mail_ListMessagesOptions as ListMessagesOptions, type mail_MailAccount as MailAccount, type mail_MailAddress as MailAddress, type mail_MailAddressInput as MailAddressInput, type mail_MailAttachment as MailAttachment, type mail_MailCompose as MailCompose, type mail_MailDraftSaved as MailDraftSaved, type mail_MailFetch as MailFetch, type mail_MailFolder as MailFolder, type mail_MailMessage as MailMessage, type mail_MailMessagePage as MailMessagePage, type mail_MailMessageUpdate as MailMessageUpdate, type mail_MailPolicy as MailPolicy, type mail_MailSend as MailSend, type mail_MailSendResult as MailSendResult, mail_NATIVE_ACCOUNT as NATIVE_ACCOUNT, type mail_NativeMailKeys as NativeMailKeys, mail_attachmentFromBytes as attachmentFromBytes, mail_claimNativeAlias as claimNativeAlias, mail_createMailFetch as createMailFetch, mail_downloadAttachment as downloadAttachment, mail_getMailPolicy as getMailPolicy, getMessage$1 as getMessage, mail_listFolders as listFolders, mail_listMailAccounts as listMailAccounts, mail_listMessages as listMessages, mail_saveDraft as saveDraft, mail_sendMessage as sendMessage, mail_unlockNativeMail as unlockNativeMail, mail_updateMessage as updateMessage };
2306
+ export { type mail_ListMessagesOptions as ListMessagesOptions, type mail_MailAccount as MailAccount, type mail_MailAddress as MailAddress, type mail_MailAddressInput as MailAddressInput, type mail_MailAttachment as MailAttachment, type mail_MailCompose as MailCompose, type mail_MailDraftEditorOpen as MailDraftEditorOpen, type mail_MailDraftEditorSession as MailDraftEditorSession, type mail_MailDraftSaved as MailDraftSaved, type mail_MailFetch as MailFetch, type mail_MailFolder as MailFolder, type mail_MailMessage as MailMessage, type mail_MailMessagePage as MailMessagePage, type mail_MailMessageUpdate as MailMessageUpdate, type mail_MailPolicy as MailPolicy, type mail_MailSend as MailSend, type mail_MailSendResult as MailSendResult, mail_NATIVE_ACCOUNT as NATIVE_ACCOUNT, type mail_NativeMailKeys as NativeMailKeys, mail_attachmentFromBytes as attachmentFromBytes, mail_claimNativeAlias as claimNativeAlias, mail_createMailFetch as createMailFetch, mail_downloadAttachment as downloadAttachment, mail_getMailPolicy as getMailPolicy, getMessage$1 as getMessage, mail_listFolders as listFolders, mail_listMailAccounts as listMailAccounts, mail_listMessages as listMessages, mail_openDraftEditor as openDraftEditor, mail_saveDraft as saveDraft, mail_sendMessage as sendMessage, mail_unlockMailCredentials as unlockMailCredentials, mail_unlockNativeMail as unlockNativeMail, mail_updateMessage as updateMessage };
2263
2307
  }
2264
2308
 
2265
2309
  /**
@@ -12448,11 +12492,44 @@ declare class Arbi {
12448
12492
  * recovery. Pass `fetch` to the `mail` operations, e.g. `mail.listFolders(arbi.mail.fetch)`.
12449
12493
  */
12450
12494
  readonly mail: {
12451
- /** Fetch a path under `/v1/mail`; rejects a non-2xx response with an `ArbiApiError` (`status`). */
12452
- fetch: (path: string, init?: RequestInit) => Promise<Response>;
12453
- /** Unlock the signed-in user's native inbox for this server session (see `unlockNativeMail`). */
12495
+ /**
12496
+ * Fetch a path under `/v1/mail`; rejects a non-2xx response with an `ArbiApiError` (`status`).
12497
+ * A read of the native inbox unlocks it first (`unlockNative`), so mail that arrived since is
12498
+ * readable too; `nativeUnlocked` skips that when the caller already unlocked it for this pass.
12499
+ * With no token yet (a new tab) the session is restored first; a 401 re-logs in and is sent
12500
+ * again once.
12501
+ */
12502
+ fetch: (path: string, init?: RequestInit, { nativeUnlocked }?: {
12503
+ nativeUnlocked?: boolean;
12504
+ }) => Promise<Response>;
12505
+ /**
12506
+ * Unlock the signed-in user's native inbox for this server session (see `unlockNativeMail`).
12507
+ * Concurrent calls share one unlock.
12508
+ */
12454
12509
  unlockNative: () => Promise<void>;
12510
+ /**
12511
+ * Hand this session what the server needs to read `account`: the native inbox's keys, a
12512
+ * Microsoft or Gmail account's connector tokens, an IMAP account's sealed credentials.
12513
+ */
12514
+ unlockAccount: (account: {
12515
+ id: string;
12516
+ provider: string;
12517
+ }) => Promise<void>;
12518
+ /**
12519
+ * Open a native draft's body in the Word editor, unlocking its room for this session with the
12520
+ * user's key when the server asks (see `openDraftEditor`).
12521
+ */
12522
+ openDraftEditor: (body: MailDraftEditorOpen) => Promise<MailDraftEditorSession>;
12455
12523
  };
12524
+ /** The native inbox unlock in flight (`mail.unlockNative`). */
12525
+ private nativeUnlock;
12526
+ /** One request under `/v1/mail` on the session's token (see `mail.fetch`). */
12527
+ private mailRequest;
12528
+ /**
12529
+ * The keys that unlock the user's mail for this server session: the session's key (current after
12530
+ * a re-login) and the identity key (the login's, or the one kept on this device).
12531
+ */
12532
+ private nativeMailKeys;
12456
12533
  /**
12457
12534
  * Mail to anyone, sealed in this browser under a key that travels only in the link's fragment
12458
12535
  * (see `operations/secure-mail`). Both sides use the signed-in user's encryption key: the
@@ -15087,6 +15164,12 @@ declare class Arbi {
15087
15164
  premium_default?: string | null | undefined;
15088
15165
  }>;
15089
15166
  };
15167
+ readonly support: {
15168
+ create: (input: SupportTicketInput) => Promise<{
15169
+ ticket_id: number;
15170
+ reference: string;
15171
+ }>;
15172
+ };
15090
15173
  readonly health: {
15091
15174
  check: () => Promise<{
15092
15175
  status: string;
@@ -17656,4 +17739,4 @@ declare function documentTools(options: {
17656
17739
  /** Add replaces matching tool names; replace discards all previous tools. No mutation of inputs. */
17657
17740
  declare function composeTools(base: ResponseTools, next: ResponseTools, mode: 'add' | 'replace'): ResponseTools;
17658
17741
 
17659
- export { type CitationSummary as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalDavProfile as D, type CalendarAccount as E, type CalendarAccountKind as F, type CalendarCreateBody as G, type CalendarEvent as H, type CalendarKeys as I, type CalendarRead as J, type CalendarSettings as K, type CalendarSettingsBody as L, type CalendarUpdate as M, type CalendarWindow as N, CallApiError as O, type Capabilities as P, type ChatAttachmentFile as Q, type ChatAttachmentInput as R, type ChatCryptoContext as S, type ChatKeyRing as T, type ChatKind as U, type ChatMemberKey as V, type ChatMemberResponse as W, type ChatMessage as X, type ChatMessageResponse as Y, type ChatResponse as Z, type ChatSession as _, type AccountSyncResult as a, type FreeBusyEntry as a$, type CitationToolSources as a0, type CliConfig as a1, type CliCredentials as a2, type CommandDescriptor as a3, type ConfigStore as a4, type Configuration as a5, type ConfigurationPatch as a6, type ConnectOptions as a7, type ConnectionModel as a8, type ConnectorCatalogEntry as a9, type DecryptedChatMessage as aA, type DeploymentHouseTemplate as aB, type DiagnoseOptions as aC, type DirectModelUsage as aD, type DocInfo as aE, type DocInfoMap as aF, type DocNameMap as aG, type DocumentAutomationAction as aH, type DocumentListFields as aI, type DocumentListOrder as aJ, type DocumentSelector as aK, type DocumentWaiter as aL, type DocumentWaiterOptions as aM, type DriveSyncProgress as aN, type DriveSyncSummary as aO, DuplicateContactError as aP, ENTITY_KINDS as aQ, type EditScope as aR, type EntityKind as aS, type EventCreateBody as aT, type EventPatchBody as aU, FLAT_TAG_KINDS as aV, type FactResponse as aW, type FactSearchRequest as aX, type FactSearchResponse as aY, type FindTimeParams as aZ, type FormattedWsMessage as a_, type ConnectorFolder as aa, type ConnectorSyncProgress as ab, type ConnectorSyncStatus as ac, type ConnectorVendorKey as ad, type ConnectorVisibilitySettings as ae, type ContextUsage as af, type ConversationResponse as ag, type ConversationUsageResponse as ah, type CreateFactRequest as ai, type CreateFactsRequest as aj, type CreateWorkRequest as ak, type CreateWorkflowRequest as al, DEFAULT_AI_USD_PER_GBP as am, DOC_TERMINAL_STATUSES as an, DRIVE_SYNC_VENDORS as ao, type Database as ap, type DatabaseAggregateRequest as aq, type DatabaseAggregateResult as ar, type DatabaseColumn as as, type DatabaseColumnWrite as at, type DatabaseImportResult as au, type DatabaseRow as av, type DatabaseRowPage as aw, type DatabaseRowsQuery as ax, type DateTimeSpec as ay, type DecryptedChat as az, type ActivityKind as b, type RespondParams as b$, type FullContextSelection as b0, GOOGLE_VENDORS as b1, type HolidayCountry as b2, type HouseTemplateCandidate as b3, IMANAGE_VENDORS as b4, type IdentityErrorCode as b5, type IdentityPurchase as b6, type IdentityState as b7, type IdentityStatus as b8, type ImportResult as b9, type PlanWorkRequest as bA, type ProductResponse as bB, type ProjectAddonKind as bC, type ProjectAddonSettingsRequest as bD, type ProjectBudget as bE, type ProjectCheckoutRequest as bF, type ProjectConversationUsageResponse as bG, type ProjectCreateOptions as bH, type ProjectDetails as bI, type ProjectEventKind as bJ, type ProjectEventResponse as bK, type ProjectInvoicesResponse as bL, type ProjectNextPeriodAddonsRequest as bM, type ProjectPlanChangeRequest as bN, type ProjectQuoteRequest as bO, type ProjectResponse as bP, type ProjectUpdateRequest as bQ, type ProjectUsageResponse as bR, PublicBookingError as bS, type PublicBookingPage as bT, type QuotaExceeded as bU, type RaisedSignal as bV, type RawResponseEvent as bW, type ReconnectOptions as bX, type ReconnectableWsConnection as bY, type ResolvedCitation as bZ, type ResolvedRecipient as b_, type InvitationRead as ba, type JsonSchemaOutputFormat as bb, type LinkedRun as bc, type ListAllOptions as bd, type ListEventsParams as be, type ListFactsOptions as bf, type ListPaginatedOptions as bg, MAILBOX_SYNC_VENDORS as bh, MAX_RETRIEVE_DOC_IDS as bi, MICROSOFT_VENDORS as bj, type MailAttachment as bk, type MessageLevel as bl, type ModelConnection as bm, type OAuthAccountKind as bn, type OutputItemDone as bo, type OverlayItem as bp, type OverlayLayerName as bq, PRESENCE_KINDS as br, PROMPT_CONTEXT_CHARS as bs, type ParsedResponse as bt, type ParsedSlashCommand as bu, type ParsedStructuredResponse as bv, type PendingAuthResponse as bw, type PersonKey as bx, type PersonalConnectionInput as by, PlanStepsError as bz, type ActivityResponse as c, type TagKind as c$, type RespondPartstat as c0, type Response$1 as c1, type ResponseCreateRequest as c2, type ResponseCreateResult as c3, type ResponseHandle as c4, type ResponseSnapshot as c5, type ResponseStart as c6, type ResponseStartOptions as c7, ResponseStream as c8, type ResponseStreamEvent as c9, type ShareRole as cA, type SkillSummary as cB, type SkippedFile as cC, type SlackConnectionStatus as cD, type StepActionRequest as cE, type StepActivityEvent as cF, type StepAssignee as cG, type StepDisplay as cH, type StepField as cI, type StepFieldOption as cJ, type StepFieldOptionTone as cK, type StepKind as cL, type StepPhase as cM, type StepSignal as cN, type StepSignalWhen as cO, type StepState as cP, type StepStatus as cQ, type SubagentBranchRecord as cR, type SubagentLaneInfo as cS, type SubmitBackgroundQueryOptions as cT, type SubscribeParams as cU, type SyncTriggerResult as cV, TAG_KINDS as cW, TAG_NESTING_MAX_DEPTH as cX, type TagChange as cY, type TagFieldDefinition as cZ, type TagGroup as c_, type ResponseTools as ca, type RoomCreateBody as cb, type RoomQuery as cc, type RoomRead as cd, type RunProgress as ce, type RunStats as cf, type RunStep as cg, type RunWaitingOn as ch, SHAREPOINT_VENDORS as ci, type SSEEvent as cj, type SSEStreamCallbacks as ck, type SSEStreamOutcome as cl, type SSEStreamResult as cm, STEP_FIELD_OPTION_TONES as cn, STOP_ID_WAIT_MS as co, STOP_REPEAT_WINDOW_MS as cp, SUPPORTED_EXTENSIONS as cq, type ScopedTarget as cr, type SearchChunk as cs, type SecureMailCompose as ct, type SecureMailSend as cu, type SecureMailSender as cv, type SendBack as cw, type SetupDiagnostic as cx, type SetupReport as cy, type ShareRead as cz, Arbi as d, composeConfiguration as d$, type TagKindField as d0, type TagKindSchema as d1, type TagLinks as d2, type TagListQuery as d3, type TagNode as d4, type TagResponse as d5, type TagScope as d6, type TagTreeRow as d7, type TaskPlan as d8, type TaskPlanStep as d9, type WorkflowRunResponse as dA, type WorkspaceConflict as dB, type WorkspaceContext as dC, type WorkspaceOpenResponse as dD, type WorkspaceResponse as dE, type WsConnection as dF, account as dG, agentconfig as dH, agents as dI, appendTranscriptionHints as dJ, assistant as dK, authenticatedFetch as dL, bookPublicSlot as dM, buildCitationChunkData as dN, buildDocNameMap as dO, buildDocumentTools as dP, buildFactsContextTool as dQ, buildRetrievalChunkTool as dR, buildRetrievalFullContextTool as dS, buildRetrievalTocTool as dT, buildTurnRequest as dU, calendar as dV, calls as dW, canTagHaveParent as dX, cancelPublicBooking as dY, capabilities as dZ, chats as d_, type TaxQuoteResponse as da, type Thread as db, type ThreadsResponse as dc, type TimeSuggestion as dd, type TurnRequest as de, type UpdateConversationRequest as df, type UpdateFactRequest as dg, type UpdateWorkflowRequest as dh, type UploadBatchResult as di, type UploadDirectOptions as dj, type UploadDirectResult as dk, type UploadDocumentsOptions as dl, type UploadOptions as dm, type UploadProgressListener as dn, type UploadResult as dp, type UsageBreakdown as dq, type UserConnectorEntry as dr, type UserDailyUsageResponse as ds, type UserInfo as dt, WebSocketAuthError as du, type WeeklyHoursSpec as dv, type WorkStatus as dw, type WorkflowAuthMode as dx, type WorkflowResponse as dy, type WorkflowRunHistoryResponse as dz, ArbiApiError as e, houseTemplate as e$, composeTools as e0, computeRunStats as e1, connectErrorMessage as e2, connectWebSocket as e3, connectWithReconnect as e4, connectors as e5, contacts as e6, continuityPrompt as e7, conversations as e8, countCitations as e9, formatItemLabel as eA, formatStreamSummary as eB, formatTokens as eC, formatUserName as eD, formatWorkspaceChoices as eE, formatWsMessage as eF, generateEncryptedWorkspaceKey as eG, generateNewWorkspaceKey as eH, getAgentStepLabel as eI, getAttachableRunId as eJ, getChildTags as eK, getContextRemainingPercent as eL, getContextUsedPercent as eM, getContextUsedTokens as eN, getCurrentStep as eO, getEligibleParentTags as eP, getErrorCode as eQ, getErrorMessage as eR, getPublicBookingPage as eS, getRawWorkspaceKey as eT, getRunToAttach as eU, getRunToCancel as eV, getStepDisplay as eW, getStepTool as eX, getSubagentBranchRecord as eY, getTagDescendantIds as eZ, health as e_, createAuthenticatedClient as ea, createDocumentWaiter as eb, createIndexAssigner as ec, databases as ed, defaultKindForFormat as ee, diagnoseSetup as ef, doctags as eg, documentTools as eh, documents as ei, estimateDraftTokens as ej, extractDocumentIdsFromMessages as ek, extractFactIdsFromMessages as el, extractSubagentLanes as em, facts as en, files as eo, filterDocumentTags as ep, filterSkills as eq, findLeafForTaskMessage as er, findMainSiblingLeaf as es, findReplyTarget as et, findSubagentRunId as eu, flattenTagTree as ev, formatAgentStepLabel as ew, formatFileSize as ex, formatGbp as ey, formatGbpPerMillionTokens as ez, ArbiError as f, work as f$, hydrateAgentSteps as f0, identity as f1, identityErrorCode as f2, instructions as f3, isAnnotationTag as f4, isConnectorVendorVisible as f5, isDriveSyncVendor as f6, isEntityTag as f7, isFlatKind as f8, isLabelTag as f9, requireData as fA, requireOk as fB, resolveAuth as fC, resolveCitations as fD, resolveSummary as fE, resolveWorkspace as fF, responses as fG, searchChunks as fH, secureMail as fI, selectFullContextDocument as fJ, selectWorkspace as fK, selectWorkspaceById as fL, sessions as fM, settings as fN, signatureRequests as fO, sliceToSubagentThread as fP, streamSSE as fQ, stripCitationMarkdown as fR, subagentJobLabel as fS, summarizeCitations as fT, tagUseCount as fU, tags as fV, tagsForScope as fW, tagsOfGroup as fX, topLevelAgentSteps as fY, uploadSkill as fZ, usdToGbp as f_, isMailboxSyncVendor as fa, isNearAiUsageBudget as fb, isPresenceTag as fc, isSharePointVendor as fd, isSharedSkill as fe, isTraceItem as ff, mail as fg, mcpTools as fh, mergeAgentSteps as fi, modelConnections as fj, notifications as fk, parseSSEEvents as fl, parseSlashCommand as fm, parseSlashTokenInProgress as fn, parseStructuredResponse as fo, performPasswordLogin as fp, performSigningKeyLogin as fq, performSsoDeviceFlowLogin as fr, pickMainThread as fs, profile as ft, progressFetch as fu, projects as fv, quotaExceededFrom as fw, quotaFromStreamError as fx, reduceOutputItem as fy, refusalReason as fz, type ArbiErrorOptions as g, workflowSteps as g0, workflows as g1, workspaceConflictOf as g2, workspaces as g3, wouldCreateTagCycle as g4, type ArbiHostSession as h, type ArbiOptions as i, ArbiSessionExpiredError as j, ArbiStructuredOutputError as k, ArbiTransportError as l, ArbiWorkspaceChangedError as m, ArbiWorkspaceSupersededError as n, ArbiWorkspaceUnavailableError as o, type AskHandlers as p, type AskRequest as q, type AttendeeRead as r, type AuthContext as s, type AuthHeaders as t, type AuthMode as u, type AuthenticatedClient as v, type BookingPage as w, type BookingPageWriteBody as x, type BookingRequestBody as y, type BridgeTokensOptions as z };
17742
+ export { type CitationSummary as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalDavProfile as D, type CalendarAccount as E, type CalendarAccountKind as F, type CalendarCreateBody as G, type CalendarEvent as H, type CalendarKeys as I, type CalendarRead as J, type CalendarSettings as K, type CalendarSettingsBody as L, type CalendarUpdate as M, type CalendarWindow as N, CallApiError as O, type Capabilities as P, type ChatAttachmentFile as Q, type ChatAttachmentInput as R, type ChatCryptoContext as S, type ChatKeyRing as T, type ChatKind as U, type ChatMemberKey as V, type ChatMemberResponse as W, type ChatMessage as X, type ChatMessageResponse as Y, type ChatResponse as Z, type ChatSession as _, type AccountSyncResult as a, type FreeBusyEntry as a$, type CitationToolSources as a0, type CliConfig as a1, type CliCredentials as a2, type CommandDescriptor as a3, type ConfigStore as a4, type Configuration as a5, type ConfigurationPatch as a6, type ConnectOptions as a7, type ConnectionModel as a8, type ConnectorCatalogEntry as a9, type DecryptedChatMessage as aA, type DeploymentHouseTemplate as aB, type DiagnoseOptions as aC, type DirectModelUsage as aD, type DocInfo as aE, type DocInfoMap as aF, type DocNameMap as aG, type DocumentAutomationAction as aH, type DocumentListFields as aI, type DocumentListOrder as aJ, type DocumentSelector as aK, type DocumentWaiter as aL, type DocumentWaiterOptions as aM, type DriveSyncProgress as aN, type DriveSyncSummary as aO, DuplicateContactError as aP, ENTITY_KINDS as aQ, type EditScope as aR, type EntityKind as aS, type EventCreateBody as aT, type EventPatchBody as aU, FLAT_TAG_KINDS as aV, type FactResponse as aW, type FactSearchRequest as aX, type FactSearchResponse as aY, type FindTimeParams as aZ, type FormattedWsMessage as a_, type ConnectorFolder as aa, type ConnectorSyncProgress as ab, type ConnectorSyncStatus as ac, type ConnectorVendorKey as ad, type ConnectorVisibilitySettings as ae, type ContextUsage as af, type ConversationResponse as ag, type ConversationUsageResponse as ah, type CreateFactRequest as ai, type CreateFactsRequest as aj, type CreateWorkRequest as ak, type CreateWorkflowRequest as al, DEFAULT_AI_USD_PER_GBP as am, DOC_TERMINAL_STATUSES as an, DRIVE_SYNC_VENDORS as ao, type Database as ap, type DatabaseAggregateRequest as aq, type DatabaseAggregateResult as ar, type DatabaseColumn as as, type DatabaseColumnWrite as at, type DatabaseImportResult as au, type DatabaseRow as av, type DatabaseRowPage as aw, type DatabaseRowsQuery as ax, type DateTimeSpec as ay, type DecryptedChat as az, type ActivityKind as b, type RespondParams as b$, type FullContextSelection as b0, GOOGLE_VENDORS as b1, type HolidayCountry as b2, type HouseTemplateCandidate as b3, IMANAGE_VENDORS as b4, type IdentityErrorCode as b5, type IdentityPurchase as b6, type IdentityState as b7, type IdentityStatus as b8, type ImportResult as b9, type PlanWorkRequest as bA, type ProductResponse as bB, type ProjectAddonKind as bC, type ProjectAddonSettingsRequest as bD, type ProjectBudget as bE, type ProjectCheckoutRequest as bF, type ProjectConversationUsageResponse as bG, type ProjectCreateOptions as bH, type ProjectDetails as bI, type ProjectEventKind as bJ, type ProjectEventResponse as bK, type ProjectInvoicesResponse as bL, type ProjectNextPeriodAddonsRequest as bM, type ProjectPlanChangeRequest as bN, type ProjectQuoteRequest as bO, type ProjectResponse as bP, type ProjectUpdateRequest as bQ, type ProjectUsageResponse as bR, PublicBookingError as bS, type PublicBookingPage as bT, type QuotaExceeded as bU, type RaisedSignal as bV, type RawResponseEvent as bW, type ReconnectOptions as bX, type ReconnectableWsConnection as bY, type ResolvedCitation as bZ, type ResolvedRecipient as b_, type InvitationRead as ba, type JsonSchemaOutputFormat as bb, type LinkedRun as bc, type ListAllOptions as bd, type ListEventsParams as be, type ListFactsOptions as bf, type ListPaginatedOptions as bg, MAILBOX_SYNC_VENDORS as bh, MAX_RETRIEVE_DOC_IDS as bi, MICROSOFT_VENDORS as bj, type MailAttachment as bk, type MessageLevel as bl, type ModelConnection as bm, type OAuthAccountKind as bn, type OutputItemDone as bo, type OverlayItem as bp, type OverlayLayerName as bq, PRESENCE_KINDS as br, PROMPT_CONTEXT_CHARS as bs, type ParsedResponse as bt, type ParsedSlashCommand as bu, type ParsedStructuredResponse as bv, type PendingAuthResponse as bw, type PersonKey as bx, type PersonalConnectionInput as by, PlanStepsError as bz, type ActivityResponse as c, type TagGroup as c$, type RespondPartstat as c0, type Response$1 as c1, type ResponseCreateRequest as c2, type ResponseCreateResult as c3, type ResponseHandle as c4, type ResponseSnapshot as c5, type ResponseStart as c6, type ResponseStartOptions as c7, ResponseStream as c8, type ResponseStreamEvent as c9, type ShareRole as cA, type SkillSummary as cB, type SkippedFile as cC, type SlackConnectionStatus as cD, type StepActionRequest as cE, type StepActivityEvent as cF, type StepAssignee as cG, type StepDisplay as cH, type StepField as cI, type StepFieldOption as cJ, type StepFieldOptionTone as cK, type StepKind as cL, type StepPhase as cM, type StepSignal as cN, type StepSignalWhen as cO, type StepState as cP, type StepStatus as cQ, type SubagentBranchRecord as cR, type SubagentLaneInfo as cS, type SubmitBackgroundQueryOptions as cT, type SubscribeParams as cU, type SupportTicketInput as cV, type SyncTriggerResult as cW, TAG_KINDS as cX, TAG_NESTING_MAX_DEPTH as cY, type TagChange as cZ, type TagFieldDefinition as c_, type ResponseTools as ca, type RoomCreateBody as cb, type RoomQuery as cc, type RoomRead as cd, type RunProgress as ce, type RunStats as cf, type RunStep as cg, type RunWaitingOn as ch, SHAREPOINT_VENDORS as ci, type SSEEvent as cj, type SSEStreamCallbacks as ck, type SSEStreamOutcome as cl, type SSEStreamResult as cm, STEP_FIELD_OPTION_TONES as cn, STOP_ID_WAIT_MS as co, STOP_REPEAT_WINDOW_MS as cp, SUPPORTED_EXTENSIONS as cq, type ScopedTarget as cr, type SearchChunk as cs, type SecureMailCompose as ct, type SecureMailSend as cu, type SecureMailSender as cv, type SendBack as cw, type SetupDiagnostic as cx, type SetupReport as cy, type ShareRead as cz, Arbi as d, chats as d$, type TagKind as d0, type TagKindField as d1, type TagKindSchema as d2, type TagLinks as d3, type TagListQuery as d4, type TagNode as d5, type TagResponse as d6, type TagScope as d7, type TagTreeRow as d8, type TaskPlan as d9, type WorkflowRunHistoryResponse as dA, type WorkflowRunResponse as dB, type WorkspaceConflict as dC, type WorkspaceContext as dD, type WorkspaceOpenResponse as dE, type WorkspaceResponse as dF, type WsConnection as dG, account as dH, agentconfig as dI, agents as dJ, appendTranscriptionHints as dK, assistant as dL, authenticatedFetch as dM, bookPublicSlot as dN, buildCitationChunkData as dO, buildDocNameMap as dP, buildDocumentTools as dQ, buildFactsContextTool as dR, buildRetrievalChunkTool as dS, buildRetrievalFullContextTool as dT, buildRetrievalTocTool as dU, buildTurnRequest as dV, calendar as dW, calls as dX, canTagHaveParent as dY, cancelPublicBooking as dZ, capabilities as d_, type TaskPlanStep as da, type TaxQuoteResponse as db, type Thread as dc, type ThreadsResponse as dd, type TimeSuggestion as de, type TurnRequest as df, type UpdateConversationRequest as dg, type UpdateFactRequest as dh, type UpdateWorkflowRequest as di, type UploadBatchResult as dj, type UploadDirectOptions as dk, type UploadDirectResult as dl, type UploadDocumentsOptions as dm, type UploadOptions as dn, type UploadProgressListener as dp, type UploadResult as dq, type UsageBreakdown as dr, type UserConnectorEntry as ds, type UserDailyUsageResponse as dt, type UserInfo as du, WebSocketAuthError as dv, type WeeklyHoursSpec as dw, type WorkStatus as dx, type WorkflowAuthMode as dy, type WorkflowResponse as dz, ArbiApiError as e, health as e$, composeConfiguration as e0, composeTools as e1, computeRunStats as e2, connectErrorMessage as e3, connectWebSocket as e4, connectWithReconnect as e5, connectors as e6, contacts as e7, continuityPrompt as e8, conversations as e9, formatGbpPerMillionTokens as eA, formatItemLabel as eB, formatStreamSummary as eC, formatTokens as eD, formatUserName as eE, formatWorkspaceChoices as eF, formatWsMessage as eG, generateEncryptedWorkspaceKey as eH, generateNewWorkspaceKey as eI, getAgentStepLabel as eJ, getAttachableRunId as eK, getChildTags as eL, getContextRemainingPercent as eM, getContextUsedPercent as eN, getContextUsedTokens as eO, getCurrentStep as eP, getEligibleParentTags as eQ, getErrorCode as eR, getErrorMessage as eS, getPublicBookingPage as eT, getRawWorkspaceKey as eU, getRunToAttach as eV, getRunToCancel as eW, getStepDisplay as eX, getStepTool as eY, getSubagentBranchRecord as eZ, getTagDescendantIds as e_, countCitations as ea, createAuthenticatedClient as eb, createDocumentWaiter as ec, createIndexAssigner as ed, databases as ee, defaultKindForFormat as ef, diagnoseSetup as eg, doctags as eh, documentTools as ei, documents as ej, estimateDraftTokens as ek, extractDocumentIdsFromMessages as el, extractFactIdsFromMessages as em, extractSubagentLanes as en, facts as eo, files as ep, filterDocumentTags as eq, filterSkills as er, findLeafForTaskMessage as es, findMainSiblingLeaf as et, findReplyTarget as eu, findSubagentRunId as ev, flattenTagTree as ew, formatAgentStepLabel as ex, formatFileSize as ey, formatGbp as ez, ArbiError as f, uploadSkill as f$, houseTemplate as f0, hydrateAgentSteps as f1, identity as f2, identityErrorCode as f3, instructions as f4, isAnnotationTag as f5, isConnectorVendorVisible as f6, isDriveSyncVendor as f7, isEntityTag as f8, isFlatKind as f9, refusalReason as fA, requireData as fB, requireOk as fC, resolveAuth as fD, resolveCitations as fE, resolveSummary as fF, resolveWorkspace as fG, responses as fH, searchChunks as fI, secureMail as fJ, selectFullContextDocument as fK, selectWorkspace as fL, selectWorkspaceById as fM, sessions as fN, settings as fO, signatureRequests as fP, sliceToSubagentThread as fQ, streamSSE as fR, stripCitationMarkdown as fS, subagentJobLabel as fT, summarizeCitations as fU, support as fV, tagUseCount as fW, tags as fX, tagsForScope as fY, tagsOfGroup as fZ, topLevelAgentSteps as f_, isLabelTag as fa, isMailboxSyncVendor as fb, isNearAiUsageBudget as fc, isPresenceTag as fd, isSharePointVendor as fe, isSharedSkill as ff, isTraceItem as fg, mail as fh, mcpTools as fi, mergeAgentSteps as fj, modelConnections as fk, notifications as fl, parseSSEEvents as fm, parseSlashCommand as fn, parseSlashTokenInProgress as fo, parseStructuredResponse as fp, performPasswordLogin as fq, performSigningKeyLogin as fr, performSsoDeviceFlowLogin as fs, pickMainThread as ft, profile as fu, progressFetch as fv, projects as fw, quotaExceededFrom as fx, quotaFromStreamError as fy, reduceOutputItem as fz, type ArbiErrorOptions as g, usdToGbp as g0, work as g1, workflowSteps as g2, workflows as g3, workspaceConflictOf as g4, workspaces as g5, wouldCreateTagCycle as g6, type ArbiHostSession as h, type ArbiOptions as i, ArbiSessionExpiredError as j, ArbiStructuredOutputError as k, ArbiTransportError as l, ArbiWorkspaceChangedError as m, ArbiWorkspaceSupersededError as n, ArbiWorkspaceUnavailableError as o, type AskHandlers as p, type AskRequest as q, type AttendeeRead as r, type AuthContext as s, type AuthHeaders as t, type AuthMode as u, type AuthenticatedClient as v, type BookingPage as w, type BookingPageWriteBody as x, type BookingRequestBody as y, type BridgeTokensOptions as z };
@@ -981,6 +981,25 @@ interface SetupReport {
981
981
  /** No credentials, response bodies, names, keys or document content are returned in the report. */
982
982
  declare function diagnoseSetup(options: DiagnoseOptions): Promise<SetupReport>;
983
983
 
984
+ /** Human-authored reports; screenshot capture remains an explicit UI choice. */
985
+
986
+ interface SupportTicketInput {
987
+ description: string;
988
+ screenshot?: Blob;
989
+ /** Reuse this key when retrying the same report. */
990
+ idempotencyKey?: string;
991
+ }
992
+ declare function createSupportTicket(arbi: ArbiClient, input: SupportTicketInput): Promise<{
993
+ ticket_id: number;
994
+ reference: string;
995
+ }>;
996
+
997
+ type support_SupportTicketInput = SupportTicketInput;
998
+ declare const support_createSupportTicket: typeof createSupportTicket;
999
+ declare namespace support {
1000
+ export { type support_SupportTicketInput as SupportTicketInput, support_createSupportTicket as createSupportTicket };
1001
+ }
1002
+
984
1003
  /**
985
1004
  * Document operations — browser-safe functions.
986
1005
  *
@@ -2226,6 +2245,27 @@ interface NativeMailKeys {
2226
2245
  * Call it again to unlock mail that arrived since.
2227
2246
  */
2228
2247
  declare function unlockNativeMail(mail: MailFetch, keys: NativeMailKeys): Promise<void>;
2248
+ /**
2249
+ * Hand this session a connected IMAP account's credentials: they are kept sealed to the user, so
2250
+ * unwrap them with the user's private key and re-seal them to the server session.
2251
+ */
2252
+ declare function unlockMailCredentials(mail: MailFetch, accountId: string, keys: NativeMailKeys): Promise<void>;
2253
+ /** What opens a draft's body in the Word editor (`key` is filled in by {@link openDraftEditor}). */
2254
+ type MailDraftEditorOpen = Omit<Schemas$2['MailRoomOpen'], 'key'>;
2255
+ /** A collaboration session on a draft's body; `identity` is who edits in the room. */
2256
+ type MailDraftEditorSession = Omit<Schemas$2['MailRoomSession'], 'identity'> & {
2257
+ identity: {
2258
+ actorId: string;
2259
+ name: string;
2260
+ role: 'human' | 'agent';
2261
+ };
2262
+ };
2263
+ /**
2264
+ * Open a native draft's body in the Word editor. A room this session has not unlocked answers 423
2265
+ * with its key sealed to the user: unwrap it with their private key and seal it to the server
2266
+ * session, as unlocking the inbox does, then open again with it.
2267
+ */
2268
+ declare function openDraftEditor(mail: MailFetch, body: MailDraftEditorOpen, keys: () => Promise<NativeMailKeys>): Promise<MailDraftEditorSession>;
2229
2269
  /** Build an attachment from bytes. */
2230
2270
  declare function attachmentFromBytes(name: string, contentType: string, bytes: Uint8Array): MailAttachment;
2231
2271
 
@@ -2235,6 +2275,8 @@ type mail_MailAddress = MailAddress;
2235
2275
  type mail_MailAddressInput = MailAddressInput;
2236
2276
  type mail_MailAttachment = MailAttachment;
2237
2277
  type mail_MailCompose = MailCompose;
2278
+ type mail_MailDraftEditorOpen = MailDraftEditorOpen;
2279
+ type mail_MailDraftEditorSession = MailDraftEditorSession;
2238
2280
  type mail_MailDraftSaved = MailDraftSaved;
2239
2281
  type mail_MailFetch = MailFetch;
2240
2282
  type mail_MailFolder = MailFolder;
@@ -2254,12 +2296,14 @@ declare const mail_getMailPolicy: typeof getMailPolicy;
2254
2296
  declare const mail_listFolders: typeof listFolders;
2255
2297
  declare const mail_listMailAccounts: typeof listMailAccounts;
2256
2298
  declare const mail_listMessages: typeof listMessages;
2299
+ declare const mail_openDraftEditor: typeof openDraftEditor;
2257
2300
  declare const mail_saveDraft: typeof saveDraft;
2258
2301
  declare const mail_sendMessage: typeof sendMessage;
2302
+ declare const mail_unlockMailCredentials: typeof unlockMailCredentials;
2259
2303
  declare const mail_unlockNativeMail: typeof unlockNativeMail;
2260
2304
  declare const mail_updateMessage: typeof updateMessage;
2261
2305
  declare namespace mail {
2262
- export { type mail_ListMessagesOptions as ListMessagesOptions, type mail_MailAccount as MailAccount, type mail_MailAddress as MailAddress, type mail_MailAddressInput as MailAddressInput, type mail_MailAttachment as MailAttachment, type mail_MailCompose as MailCompose, type mail_MailDraftSaved as MailDraftSaved, type mail_MailFetch as MailFetch, type mail_MailFolder as MailFolder, type mail_MailMessage as MailMessage, type mail_MailMessagePage as MailMessagePage, type mail_MailMessageUpdate as MailMessageUpdate, type mail_MailPolicy as MailPolicy, type mail_MailSend as MailSend, type mail_MailSendResult as MailSendResult, mail_NATIVE_ACCOUNT as NATIVE_ACCOUNT, type mail_NativeMailKeys as NativeMailKeys, mail_attachmentFromBytes as attachmentFromBytes, mail_claimNativeAlias as claimNativeAlias, mail_createMailFetch as createMailFetch, mail_downloadAttachment as downloadAttachment, mail_getMailPolicy as getMailPolicy, getMessage$1 as getMessage, mail_listFolders as listFolders, mail_listMailAccounts as listMailAccounts, mail_listMessages as listMessages, mail_saveDraft as saveDraft, mail_sendMessage as sendMessage, mail_unlockNativeMail as unlockNativeMail, mail_updateMessage as updateMessage };
2306
+ export { type mail_ListMessagesOptions as ListMessagesOptions, type mail_MailAccount as MailAccount, type mail_MailAddress as MailAddress, type mail_MailAddressInput as MailAddressInput, type mail_MailAttachment as MailAttachment, type mail_MailCompose as MailCompose, type mail_MailDraftEditorOpen as MailDraftEditorOpen, type mail_MailDraftEditorSession as MailDraftEditorSession, type mail_MailDraftSaved as MailDraftSaved, type mail_MailFetch as MailFetch, type mail_MailFolder as MailFolder, type mail_MailMessage as MailMessage, type mail_MailMessagePage as MailMessagePage, type mail_MailMessageUpdate as MailMessageUpdate, type mail_MailPolicy as MailPolicy, type mail_MailSend as MailSend, type mail_MailSendResult as MailSendResult, mail_NATIVE_ACCOUNT as NATIVE_ACCOUNT, type mail_NativeMailKeys as NativeMailKeys, mail_attachmentFromBytes as attachmentFromBytes, mail_claimNativeAlias as claimNativeAlias, mail_createMailFetch as createMailFetch, mail_downloadAttachment as downloadAttachment, mail_getMailPolicy as getMailPolicy, getMessage$1 as getMessage, mail_listFolders as listFolders, mail_listMailAccounts as listMailAccounts, mail_listMessages as listMessages, mail_openDraftEditor as openDraftEditor, mail_saveDraft as saveDraft, mail_sendMessage as sendMessage, mail_unlockMailCredentials as unlockMailCredentials, mail_unlockNativeMail as unlockNativeMail, mail_updateMessage as updateMessage };
2263
2307
  }
2264
2308
 
2265
2309
  /**
@@ -12448,11 +12492,44 @@ declare class Arbi {
12448
12492
  * recovery. Pass `fetch` to the `mail` operations, e.g. `mail.listFolders(arbi.mail.fetch)`.
12449
12493
  */
12450
12494
  readonly mail: {
12451
- /** Fetch a path under `/v1/mail`; rejects a non-2xx response with an `ArbiApiError` (`status`). */
12452
- fetch: (path: string, init?: RequestInit) => Promise<Response>;
12453
- /** Unlock the signed-in user's native inbox for this server session (see `unlockNativeMail`). */
12495
+ /**
12496
+ * Fetch a path under `/v1/mail`; rejects a non-2xx response with an `ArbiApiError` (`status`).
12497
+ * A read of the native inbox unlocks it first (`unlockNative`), so mail that arrived since is
12498
+ * readable too; `nativeUnlocked` skips that when the caller already unlocked it for this pass.
12499
+ * With no token yet (a new tab) the session is restored first; a 401 re-logs in and is sent
12500
+ * again once.
12501
+ */
12502
+ fetch: (path: string, init?: RequestInit, { nativeUnlocked }?: {
12503
+ nativeUnlocked?: boolean;
12504
+ }) => Promise<Response>;
12505
+ /**
12506
+ * Unlock the signed-in user's native inbox for this server session (see `unlockNativeMail`).
12507
+ * Concurrent calls share one unlock.
12508
+ */
12454
12509
  unlockNative: () => Promise<void>;
12510
+ /**
12511
+ * Hand this session what the server needs to read `account`: the native inbox's keys, a
12512
+ * Microsoft or Gmail account's connector tokens, an IMAP account's sealed credentials.
12513
+ */
12514
+ unlockAccount: (account: {
12515
+ id: string;
12516
+ provider: string;
12517
+ }) => Promise<void>;
12518
+ /**
12519
+ * Open a native draft's body in the Word editor, unlocking its room for this session with the
12520
+ * user's key when the server asks (see `openDraftEditor`).
12521
+ */
12522
+ openDraftEditor: (body: MailDraftEditorOpen) => Promise<MailDraftEditorSession>;
12455
12523
  };
12524
+ /** The native inbox unlock in flight (`mail.unlockNative`). */
12525
+ private nativeUnlock;
12526
+ /** One request under `/v1/mail` on the session's token (see `mail.fetch`). */
12527
+ private mailRequest;
12528
+ /**
12529
+ * The keys that unlock the user's mail for this server session: the session's key (current after
12530
+ * a re-login) and the identity key (the login's, or the one kept on this device).
12531
+ */
12532
+ private nativeMailKeys;
12456
12533
  /**
12457
12534
  * Mail to anyone, sealed in this browser under a key that travels only in the link's fragment
12458
12535
  * (see `operations/secure-mail`). Both sides use the signed-in user's encryption key: the
@@ -15087,6 +15164,12 @@ declare class Arbi {
15087
15164
  premium_default?: string | null | undefined;
15088
15165
  }>;
15089
15166
  };
15167
+ readonly support: {
15168
+ create: (input: SupportTicketInput) => Promise<{
15169
+ ticket_id: number;
15170
+ reference: string;
15171
+ }>;
15172
+ };
15090
15173
  readonly health: {
15091
15174
  check: () => Promise<{
15092
15175
  status: string;
@@ -17656,4 +17739,4 @@ declare function documentTools(options: {
17656
17739
  /** Add replaces matching tool names; replace discards all previous tools. No mutation of inputs. */
17657
17740
  declare function composeTools(base: ResponseTools, next: ResponseTools, mode: 'add' | 'replace'): ResponseTools;
17658
17741
 
17659
- export { type CitationSummary as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalDavProfile as D, type CalendarAccount as E, type CalendarAccountKind as F, type CalendarCreateBody as G, type CalendarEvent as H, type CalendarKeys as I, type CalendarRead as J, type CalendarSettings as K, type CalendarSettingsBody as L, type CalendarUpdate as M, type CalendarWindow as N, CallApiError as O, type Capabilities as P, type ChatAttachmentFile as Q, type ChatAttachmentInput as R, type ChatCryptoContext as S, type ChatKeyRing as T, type ChatKind as U, type ChatMemberKey as V, type ChatMemberResponse as W, type ChatMessage as X, type ChatMessageResponse as Y, type ChatResponse as Z, type ChatSession as _, type AccountSyncResult as a, type FreeBusyEntry as a$, type CitationToolSources as a0, type CliConfig as a1, type CliCredentials as a2, type CommandDescriptor as a3, type ConfigStore as a4, type Configuration as a5, type ConfigurationPatch as a6, type ConnectOptions as a7, type ConnectionModel as a8, type ConnectorCatalogEntry as a9, type DecryptedChatMessage as aA, type DeploymentHouseTemplate as aB, type DiagnoseOptions as aC, type DirectModelUsage as aD, type DocInfo as aE, type DocInfoMap as aF, type DocNameMap as aG, type DocumentAutomationAction as aH, type DocumentListFields as aI, type DocumentListOrder as aJ, type DocumentSelector as aK, type DocumentWaiter as aL, type DocumentWaiterOptions as aM, type DriveSyncProgress as aN, type DriveSyncSummary as aO, DuplicateContactError as aP, ENTITY_KINDS as aQ, type EditScope as aR, type EntityKind as aS, type EventCreateBody as aT, type EventPatchBody as aU, FLAT_TAG_KINDS as aV, type FactResponse as aW, type FactSearchRequest as aX, type FactSearchResponse as aY, type FindTimeParams as aZ, type FormattedWsMessage as a_, type ConnectorFolder as aa, type ConnectorSyncProgress as ab, type ConnectorSyncStatus as ac, type ConnectorVendorKey as ad, type ConnectorVisibilitySettings as ae, type ContextUsage as af, type ConversationResponse as ag, type ConversationUsageResponse as ah, type CreateFactRequest as ai, type CreateFactsRequest as aj, type CreateWorkRequest as ak, type CreateWorkflowRequest as al, DEFAULT_AI_USD_PER_GBP as am, DOC_TERMINAL_STATUSES as an, DRIVE_SYNC_VENDORS as ao, type Database as ap, type DatabaseAggregateRequest as aq, type DatabaseAggregateResult as ar, type DatabaseColumn as as, type DatabaseColumnWrite as at, type DatabaseImportResult as au, type DatabaseRow as av, type DatabaseRowPage as aw, type DatabaseRowsQuery as ax, type DateTimeSpec as ay, type DecryptedChat as az, type ActivityKind as b, type RespondParams as b$, type FullContextSelection as b0, GOOGLE_VENDORS as b1, type HolidayCountry as b2, type HouseTemplateCandidate as b3, IMANAGE_VENDORS as b4, type IdentityErrorCode as b5, type IdentityPurchase as b6, type IdentityState as b7, type IdentityStatus as b8, type ImportResult as b9, type PlanWorkRequest as bA, type ProductResponse as bB, type ProjectAddonKind as bC, type ProjectAddonSettingsRequest as bD, type ProjectBudget as bE, type ProjectCheckoutRequest as bF, type ProjectConversationUsageResponse as bG, type ProjectCreateOptions as bH, type ProjectDetails as bI, type ProjectEventKind as bJ, type ProjectEventResponse as bK, type ProjectInvoicesResponse as bL, type ProjectNextPeriodAddonsRequest as bM, type ProjectPlanChangeRequest as bN, type ProjectQuoteRequest as bO, type ProjectResponse as bP, type ProjectUpdateRequest as bQ, type ProjectUsageResponse as bR, PublicBookingError as bS, type PublicBookingPage as bT, type QuotaExceeded as bU, type RaisedSignal as bV, type RawResponseEvent as bW, type ReconnectOptions as bX, type ReconnectableWsConnection as bY, type ResolvedCitation as bZ, type ResolvedRecipient as b_, type InvitationRead as ba, type JsonSchemaOutputFormat as bb, type LinkedRun as bc, type ListAllOptions as bd, type ListEventsParams as be, type ListFactsOptions as bf, type ListPaginatedOptions as bg, MAILBOX_SYNC_VENDORS as bh, MAX_RETRIEVE_DOC_IDS as bi, MICROSOFT_VENDORS as bj, type MailAttachment as bk, type MessageLevel as bl, type ModelConnection as bm, type OAuthAccountKind as bn, type OutputItemDone as bo, type OverlayItem as bp, type OverlayLayerName as bq, PRESENCE_KINDS as br, PROMPT_CONTEXT_CHARS as bs, type ParsedResponse as bt, type ParsedSlashCommand as bu, type ParsedStructuredResponse as bv, type PendingAuthResponse as bw, type PersonKey as bx, type PersonalConnectionInput as by, PlanStepsError as bz, type ActivityResponse as c, type TagKind as c$, type RespondPartstat as c0, type Response$1 as c1, type ResponseCreateRequest as c2, type ResponseCreateResult as c3, type ResponseHandle as c4, type ResponseSnapshot as c5, type ResponseStart as c6, type ResponseStartOptions as c7, ResponseStream as c8, type ResponseStreamEvent as c9, type ShareRole as cA, type SkillSummary as cB, type SkippedFile as cC, type SlackConnectionStatus as cD, type StepActionRequest as cE, type StepActivityEvent as cF, type StepAssignee as cG, type StepDisplay as cH, type StepField as cI, type StepFieldOption as cJ, type StepFieldOptionTone as cK, type StepKind as cL, type StepPhase as cM, type StepSignal as cN, type StepSignalWhen as cO, type StepState as cP, type StepStatus as cQ, type SubagentBranchRecord as cR, type SubagentLaneInfo as cS, type SubmitBackgroundQueryOptions as cT, type SubscribeParams as cU, type SyncTriggerResult as cV, TAG_KINDS as cW, TAG_NESTING_MAX_DEPTH as cX, type TagChange as cY, type TagFieldDefinition as cZ, type TagGroup as c_, type ResponseTools as ca, type RoomCreateBody as cb, type RoomQuery as cc, type RoomRead as cd, type RunProgress as ce, type RunStats as cf, type RunStep as cg, type RunWaitingOn as ch, SHAREPOINT_VENDORS as ci, type SSEEvent as cj, type SSEStreamCallbacks as ck, type SSEStreamOutcome as cl, type SSEStreamResult as cm, STEP_FIELD_OPTION_TONES as cn, STOP_ID_WAIT_MS as co, STOP_REPEAT_WINDOW_MS as cp, SUPPORTED_EXTENSIONS as cq, type ScopedTarget as cr, type SearchChunk as cs, type SecureMailCompose as ct, type SecureMailSend as cu, type SecureMailSender as cv, type SendBack as cw, type SetupDiagnostic as cx, type SetupReport as cy, type ShareRead as cz, Arbi as d, composeConfiguration as d$, type TagKindField as d0, type TagKindSchema as d1, type TagLinks as d2, type TagListQuery as d3, type TagNode as d4, type TagResponse as d5, type TagScope as d6, type TagTreeRow as d7, type TaskPlan as d8, type TaskPlanStep as d9, type WorkflowRunResponse as dA, type WorkspaceConflict as dB, type WorkspaceContext as dC, type WorkspaceOpenResponse as dD, type WorkspaceResponse as dE, type WsConnection as dF, account as dG, agentconfig as dH, agents as dI, appendTranscriptionHints as dJ, assistant as dK, authenticatedFetch as dL, bookPublicSlot as dM, buildCitationChunkData as dN, buildDocNameMap as dO, buildDocumentTools as dP, buildFactsContextTool as dQ, buildRetrievalChunkTool as dR, buildRetrievalFullContextTool as dS, buildRetrievalTocTool as dT, buildTurnRequest as dU, calendar as dV, calls as dW, canTagHaveParent as dX, cancelPublicBooking as dY, capabilities as dZ, chats as d_, type TaxQuoteResponse as da, type Thread as db, type ThreadsResponse as dc, type TimeSuggestion as dd, type TurnRequest as de, type UpdateConversationRequest as df, type UpdateFactRequest as dg, type UpdateWorkflowRequest as dh, type UploadBatchResult as di, type UploadDirectOptions as dj, type UploadDirectResult as dk, type UploadDocumentsOptions as dl, type UploadOptions as dm, type UploadProgressListener as dn, type UploadResult as dp, type UsageBreakdown as dq, type UserConnectorEntry as dr, type UserDailyUsageResponse as ds, type UserInfo as dt, WebSocketAuthError as du, type WeeklyHoursSpec as dv, type WorkStatus as dw, type WorkflowAuthMode as dx, type WorkflowResponse as dy, type WorkflowRunHistoryResponse as dz, ArbiApiError as e, houseTemplate as e$, composeTools as e0, computeRunStats as e1, connectErrorMessage as e2, connectWebSocket as e3, connectWithReconnect as e4, connectors as e5, contacts as e6, continuityPrompt as e7, conversations as e8, countCitations as e9, formatItemLabel as eA, formatStreamSummary as eB, formatTokens as eC, formatUserName as eD, formatWorkspaceChoices as eE, formatWsMessage as eF, generateEncryptedWorkspaceKey as eG, generateNewWorkspaceKey as eH, getAgentStepLabel as eI, getAttachableRunId as eJ, getChildTags as eK, getContextRemainingPercent as eL, getContextUsedPercent as eM, getContextUsedTokens as eN, getCurrentStep as eO, getEligibleParentTags as eP, getErrorCode as eQ, getErrorMessage as eR, getPublicBookingPage as eS, getRawWorkspaceKey as eT, getRunToAttach as eU, getRunToCancel as eV, getStepDisplay as eW, getStepTool as eX, getSubagentBranchRecord as eY, getTagDescendantIds as eZ, health as e_, createAuthenticatedClient as ea, createDocumentWaiter as eb, createIndexAssigner as ec, databases as ed, defaultKindForFormat as ee, diagnoseSetup as ef, doctags as eg, documentTools as eh, documents as ei, estimateDraftTokens as ej, extractDocumentIdsFromMessages as ek, extractFactIdsFromMessages as el, extractSubagentLanes as em, facts as en, files as eo, filterDocumentTags as ep, filterSkills as eq, findLeafForTaskMessage as er, findMainSiblingLeaf as es, findReplyTarget as et, findSubagentRunId as eu, flattenTagTree as ev, formatAgentStepLabel as ew, formatFileSize as ex, formatGbp as ey, formatGbpPerMillionTokens as ez, ArbiError as f, work as f$, hydrateAgentSteps as f0, identity as f1, identityErrorCode as f2, instructions as f3, isAnnotationTag as f4, isConnectorVendorVisible as f5, isDriveSyncVendor as f6, isEntityTag as f7, isFlatKind as f8, isLabelTag as f9, requireData as fA, requireOk as fB, resolveAuth as fC, resolveCitations as fD, resolveSummary as fE, resolveWorkspace as fF, responses as fG, searchChunks as fH, secureMail as fI, selectFullContextDocument as fJ, selectWorkspace as fK, selectWorkspaceById as fL, sessions as fM, settings as fN, signatureRequests as fO, sliceToSubagentThread as fP, streamSSE as fQ, stripCitationMarkdown as fR, subagentJobLabel as fS, summarizeCitations as fT, tagUseCount as fU, tags as fV, tagsForScope as fW, tagsOfGroup as fX, topLevelAgentSteps as fY, uploadSkill as fZ, usdToGbp as f_, isMailboxSyncVendor as fa, isNearAiUsageBudget as fb, isPresenceTag as fc, isSharePointVendor as fd, isSharedSkill as fe, isTraceItem as ff, mail as fg, mcpTools as fh, mergeAgentSteps as fi, modelConnections as fj, notifications as fk, parseSSEEvents as fl, parseSlashCommand as fm, parseSlashTokenInProgress as fn, parseStructuredResponse as fo, performPasswordLogin as fp, performSigningKeyLogin as fq, performSsoDeviceFlowLogin as fr, pickMainThread as fs, profile as ft, progressFetch as fu, projects as fv, quotaExceededFrom as fw, quotaFromStreamError as fx, reduceOutputItem as fy, refusalReason as fz, type ArbiErrorOptions as g, workflowSteps as g0, workflows as g1, workspaceConflictOf as g2, workspaces as g3, wouldCreateTagCycle as g4, type ArbiHostSession as h, type ArbiOptions as i, ArbiSessionExpiredError as j, ArbiStructuredOutputError as k, ArbiTransportError as l, ArbiWorkspaceChangedError as m, ArbiWorkspaceSupersededError as n, ArbiWorkspaceUnavailableError as o, type AskHandlers as p, type AskRequest as q, type AttendeeRead as r, type AuthContext as s, type AuthHeaders as t, type AuthMode as u, type AuthenticatedClient as v, type BookingPage as w, type BookingPageWriteBody as x, type BookingRequestBody as y, type BridgeTokensOptions as z };
17742
+ export { type CitationSummary as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalDavProfile as D, type CalendarAccount as E, type CalendarAccountKind as F, type CalendarCreateBody as G, type CalendarEvent as H, type CalendarKeys as I, type CalendarRead as J, type CalendarSettings as K, type CalendarSettingsBody as L, type CalendarUpdate as M, type CalendarWindow as N, CallApiError as O, type Capabilities as P, type ChatAttachmentFile as Q, type ChatAttachmentInput as R, type ChatCryptoContext as S, type ChatKeyRing as T, type ChatKind as U, type ChatMemberKey as V, type ChatMemberResponse as W, type ChatMessage as X, type ChatMessageResponse as Y, type ChatResponse as Z, type ChatSession as _, type AccountSyncResult as a, type FreeBusyEntry as a$, type CitationToolSources as a0, type CliConfig as a1, type CliCredentials as a2, type CommandDescriptor as a3, type ConfigStore as a4, type Configuration as a5, type ConfigurationPatch as a6, type ConnectOptions as a7, type ConnectionModel as a8, type ConnectorCatalogEntry as a9, type DecryptedChatMessage as aA, type DeploymentHouseTemplate as aB, type DiagnoseOptions as aC, type DirectModelUsage as aD, type DocInfo as aE, type DocInfoMap as aF, type DocNameMap as aG, type DocumentAutomationAction as aH, type DocumentListFields as aI, type DocumentListOrder as aJ, type DocumentSelector as aK, type DocumentWaiter as aL, type DocumentWaiterOptions as aM, type DriveSyncProgress as aN, type DriveSyncSummary as aO, DuplicateContactError as aP, ENTITY_KINDS as aQ, type EditScope as aR, type EntityKind as aS, type EventCreateBody as aT, type EventPatchBody as aU, FLAT_TAG_KINDS as aV, type FactResponse as aW, type FactSearchRequest as aX, type FactSearchResponse as aY, type FindTimeParams as aZ, type FormattedWsMessage as a_, type ConnectorFolder as aa, type ConnectorSyncProgress as ab, type ConnectorSyncStatus as ac, type ConnectorVendorKey as ad, type ConnectorVisibilitySettings as ae, type ContextUsage as af, type ConversationResponse as ag, type ConversationUsageResponse as ah, type CreateFactRequest as ai, type CreateFactsRequest as aj, type CreateWorkRequest as ak, type CreateWorkflowRequest as al, DEFAULT_AI_USD_PER_GBP as am, DOC_TERMINAL_STATUSES as an, DRIVE_SYNC_VENDORS as ao, type Database as ap, type DatabaseAggregateRequest as aq, type DatabaseAggregateResult as ar, type DatabaseColumn as as, type DatabaseColumnWrite as at, type DatabaseImportResult as au, type DatabaseRow as av, type DatabaseRowPage as aw, type DatabaseRowsQuery as ax, type DateTimeSpec as ay, type DecryptedChat as az, type ActivityKind as b, type RespondParams as b$, type FullContextSelection as b0, GOOGLE_VENDORS as b1, type HolidayCountry as b2, type HouseTemplateCandidate as b3, IMANAGE_VENDORS as b4, type IdentityErrorCode as b5, type IdentityPurchase as b6, type IdentityState as b7, type IdentityStatus as b8, type ImportResult as b9, type PlanWorkRequest as bA, type ProductResponse as bB, type ProjectAddonKind as bC, type ProjectAddonSettingsRequest as bD, type ProjectBudget as bE, type ProjectCheckoutRequest as bF, type ProjectConversationUsageResponse as bG, type ProjectCreateOptions as bH, type ProjectDetails as bI, type ProjectEventKind as bJ, type ProjectEventResponse as bK, type ProjectInvoicesResponse as bL, type ProjectNextPeriodAddonsRequest as bM, type ProjectPlanChangeRequest as bN, type ProjectQuoteRequest as bO, type ProjectResponse as bP, type ProjectUpdateRequest as bQ, type ProjectUsageResponse as bR, PublicBookingError as bS, type PublicBookingPage as bT, type QuotaExceeded as bU, type RaisedSignal as bV, type RawResponseEvent as bW, type ReconnectOptions as bX, type ReconnectableWsConnection as bY, type ResolvedCitation as bZ, type ResolvedRecipient as b_, type InvitationRead as ba, type JsonSchemaOutputFormat as bb, type LinkedRun as bc, type ListAllOptions as bd, type ListEventsParams as be, type ListFactsOptions as bf, type ListPaginatedOptions as bg, MAILBOX_SYNC_VENDORS as bh, MAX_RETRIEVE_DOC_IDS as bi, MICROSOFT_VENDORS as bj, type MailAttachment as bk, type MessageLevel as bl, type ModelConnection as bm, type OAuthAccountKind as bn, type OutputItemDone as bo, type OverlayItem as bp, type OverlayLayerName as bq, PRESENCE_KINDS as br, PROMPT_CONTEXT_CHARS as bs, type ParsedResponse as bt, type ParsedSlashCommand as bu, type ParsedStructuredResponse as bv, type PendingAuthResponse as bw, type PersonKey as bx, type PersonalConnectionInput as by, PlanStepsError as bz, type ActivityResponse as c, type TagGroup as c$, type RespondPartstat as c0, type Response$1 as c1, type ResponseCreateRequest as c2, type ResponseCreateResult as c3, type ResponseHandle as c4, type ResponseSnapshot as c5, type ResponseStart as c6, type ResponseStartOptions as c7, ResponseStream as c8, type ResponseStreamEvent as c9, type ShareRole as cA, type SkillSummary as cB, type SkippedFile as cC, type SlackConnectionStatus as cD, type StepActionRequest as cE, type StepActivityEvent as cF, type StepAssignee as cG, type StepDisplay as cH, type StepField as cI, type StepFieldOption as cJ, type StepFieldOptionTone as cK, type StepKind as cL, type StepPhase as cM, type StepSignal as cN, type StepSignalWhen as cO, type StepState as cP, type StepStatus as cQ, type SubagentBranchRecord as cR, type SubagentLaneInfo as cS, type SubmitBackgroundQueryOptions as cT, type SubscribeParams as cU, type SupportTicketInput as cV, type SyncTriggerResult as cW, TAG_KINDS as cX, TAG_NESTING_MAX_DEPTH as cY, type TagChange as cZ, type TagFieldDefinition as c_, type ResponseTools as ca, type RoomCreateBody as cb, type RoomQuery as cc, type RoomRead as cd, type RunProgress as ce, type RunStats as cf, type RunStep as cg, type RunWaitingOn as ch, SHAREPOINT_VENDORS as ci, type SSEEvent as cj, type SSEStreamCallbacks as ck, type SSEStreamOutcome as cl, type SSEStreamResult as cm, STEP_FIELD_OPTION_TONES as cn, STOP_ID_WAIT_MS as co, STOP_REPEAT_WINDOW_MS as cp, SUPPORTED_EXTENSIONS as cq, type ScopedTarget as cr, type SearchChunk as cs, type SecureMailCompose as ct, type SecureMailSend as cu, type SecureMailSender as cv, type SendBack as cw, type SetupDiagnostic as cx, type SetupReport as cy, type ShareRead as cz, Arbi as d, chats as d$, type TagKind as d0, type TagKindField as d1, type TagKindSchema as d2, type TagLinks as d3, type TagListQuery as d4, type TagNode as d5, type TagResponse as d6, type TagScope as d7, type TagTreeRow as d8, type TaskPlan as d9, type WorkflowRunHistoryResponse as dA, type WorkflowRunResponse as dB, type WorkspaceConflict as dC, type WorkspaceContext as dD, type WorkspaceOpenResponse as dE, type WorkspaceResponse as dF, type WsConnection as dG, account as dH, agentconfig as dI, agents as dJ, appendTranscriptionHints as dK, assistant as dL, authenticatedFetch as dM, bookPublicSlot as dN, buildCitationChunkData as dO, buildDocNameMap as dP, buildDocumentTools as dQ, buildFactsContextTool as dR, buildRetrievalChunkTool as dS, buildRetrievalFullContextTool as dT, buildRetrievalTocTool as dU, buildTurnRequest as dV, calendar as dW, calls as dX, canTagHaveParent as dY, cancelPublicBooking as dZ, capabilities as d_, type TaskPlanStep as da, type TaxQuoteResponse as db, type Thread as dc, type ThreadsResponse as dd, type TimeSuggestion as de, type TurnRequest as df, type UpdateConversationRequest as dg, type UpdateFactRequest as dh, type UpdateWorkflowRequest as di, type UploadBatchResult as dj, type UploadDirectOptions as dk, type UploadDirectResult as dl, type UploadDocumentsOptions as dm, type UploadOptions as dn, type UploadProgressListener as dp, type UploadResult as dq, type UsageBreakdown as dr, type UserConnectorEntry as ds, type UserDailyUsageResponse as dt, type UserInfo as du, WebSocketAuthError as dv, type WeeklyHoursSpec as dw, type WorkStatus as dx, type WorkflowAuthMode as dy, type WorkflowResponse as dz, ArbiApiError as e, health as e$, composeConfiguration as e0, composeTools as e1, computeRunStats as e2, connectErrorMessage as e3, connectWebSocket as e4, connectWithReconnect as e5, connectors as e6, contacts as e7, continuityPrompt as e8, conversations as e9, formatGbpPerMillionTokens as eA, formatItemLabel as eB, formatStreamSummary as eC, formatTokens as eD, formatUserName as eE, formatWorkspaceChoices as eF, formatWsMessage as eG, generateEncryptedWorkspaceKey as eH, generateNewWorkspaceKey as eI, getAgentStepLabel as eJ, getAttachableRunId as eK, getChildTags as eL, getContextRemainingPercent as eM, getContextUsedPercent as eN, getContextUsedTokens as eO, getCurrentStep as eP, getEligibleParentTags as eQ, getErrorCode as eR, getErrorMessage as eS, getPublicBookingPage as eT, getRawWorkspaceKey as eU, getRunToAttach as eV, getRunToCancel as eW, getStepDisplay as eX, getStepTool as eY, getSubagentBranchRecord as eZ, getTagDescendantIds as e_, countCitations as ea, createAuthenticatedClient as eb, createDocumentWaiter as ec, createIndexAssigner as ed, databases as ee, defaultKindForFormat as ef, diagnoseSetup as eg, doctags as eh, documentTools as ei, documents as ej, estimateDraftTokens as ek, extractDocumentIdsFromMessages as el, extractFactIdsFromMessages as em, extractSubagentLanes as en, facts as eo, files as ep, filterDocumentTags as eq, filterSkills as er, findLeafForTaskMessage as es, findMainSiblingLeaf as et, findReplyTarget as eu, findSubagentRunId as ev, flattenTagTree as ew, formatAgentStepLabel as ex, formatFileSize as ey, formatGbp as ez, ArbiError as f, uploadSkill as f$, houseTemplate as f0, hydrateAgentSteps as f1, identity as f2, identityErrorCode as f3, instructions as f4, isAnnotationTag as f5, isConnectorVendorVisible as f6, isDriveSyncVendor as f7, isEntityTag as f8, isFlatKind as f9, refusalReason as fA, requireData as fB, requireOk as fC, resolveAuth as fD, resolveCitations as fE, resolveSummary as fF, resolveWorkspace as fG, responses as fH, searchChunks as fI, secureMail as fJ, selectFullContextDocument as fK, selectWorkspace as fL, selectWorkspaceById as fM, sessions as fN, settings as fO, signatureRequests as fP, sliceToSubagentThread as fQ, streamSSE as fR, stripCitationMarkdown as fS, subagentJobLabel as fT, summarizeCitations as fU, support as fV, tagUseCount as fW, tags as fX, tagsForScope as fY, tagsOfGroup as fZ, topLevelAgentSteps as f_, isLabelTag as fa, isMailboxSyncVendor as fb, isNearAiUsageBudget as fc, isPresenceTag as fd, isSharePointVendor as fe, isSharedSkill as ff, isTraceItem as fg, mail as fh, mcpTools as fi, mergeAgentSteps as fj, modelConnections as fk, notifications as fl, parseSSEEvents as fm, parseSlashCommand as fn, parseSlashTokenInProgress as fo, parseStructuredResponse as fp, performPasswordLogin as fq, performSigningKeyLogin as fr, performSsoDeviceFlowLogin as fs, pickMainThread as ft, profile as fu, progressFetch as fv, projects as fw, quotaExceededFrom as fx, quotaFromStreamError as fy, reduceOutputItem as fz, type ArbiErrorOptions as g, usdToGbp as g0, work as g1, workflowSteps as g2, workflows as g3, workspaceConflictOf as g4, workspaces as g5, wouldCreateTagCycle as g6, type ArbiHostSession as h, type ArbiOptions as i, ArbiSessionExpiredError as j, ArbiStructuredOutputError as k, ArbiTransportError as l, ArbiWorkspaceChangedError as m, ArbiWorkspaceSupersededError as n, ArbiWorkspaceUnavailableError as o, type AskHandlers as p, type AskRequest as q, type AttendeeRead as r, type AuthContext as s, type AuthHeaders as t, type AuthMode as u, type AuthenticatedClient as v, type BookingPage as w, type BookingPageWriteBody as x, type BookingRequestBody as y, type BridgeTokensOptions as z };
package/dist/browser.cjs CHANGED
@@ -4639,6 +4639,39 @@ function buildChunkLookup(tools) {
4639
4639
  return lookup;
4640
4640
  }
4641
4641
 
4642
+ // src/operations/support.ts
4643
+ var support_exports = {};
4644
+ __export(support_exports, {
4645
+ createSupportTicket: () => createSupportTicket
4646
+ });
4647
+
4648
+ // src/operations/mail-encoding.ts
4649
+ function bytesToBase64(bytes) {
4650
+ let binary = "";
4651
+ for (let i2 = 0; i2 < bytes.length; i2 += 32768) {
4652
+ binary += String.fromCharCode(...bytes.subarray(i2, i2 + 32768));
4653
+ }
4654
+ return btoa(binary);
4655
+ }
4656
+
4657
+ // src/operations/support.ts
4658
+ async function createSupportTicket(arbi, input) {
4659
+ if (!input.description.trim()) throw new ArbiError("Describe what you need help with.");
4660
+ if (input.screenshot && (input.screenshot.type !== "image/png" || input.screenshot.size > 2 * 1024 * 1024))
4661
+ throw new ArbiError("The screenshot must be a PNG image no larger than 2 MB.");
4662
+ const screenshot = input.screenshot ? bytesToBase64(new Uint8Array(await input.screenshot.arrayBuffer())) : void 0;
4663
+ return requireData(
4664
+ await arbi.fetch.POST("/v1/support/tickets", {
4665
+ body: {
4666
+ description: input.description.trim(),
4667
+ idempotency_key: input.idempotencyKey ?? crypto.randomUUID(),
4668
+ ...screenshot ? { screenshot_png: screenshot } : {}
4669
+ }
4670
+ }),
4671
+ "Could not send your support request."
4672
+ );
4673
+ }
4674
+
4642
4675
  // src/diagnostics.ts
4643
4676
  async function diagnoseSetup(options) {
4644
4677
  const checks = [];
@@ -6170,15 +6203,6 @@ __export(secure_mail_exports, {
6170
6203
  prepareSecureMail: () => prepareSecureMail,
6171
6204
  secureMime: () => secureMime
6172
6205
  });
6173
-
6174
- // src/operations/mail-encoding.ts
6175
- function bytesToBase64(bytes) {
6176
- let binary = "";
6177
- for (let i2 = 0; i2 < bytes.length; i2 += 32768) {
6178
- binary += String.fromCharCode(...bytes.subarray(i2, i2 + 32768));
6179
- }
6180
- return btoa(binary);
6181
- }
6182
6206
  var MAX_MESSAGE_BYTES = 25 * 1024 * 1024;
6183
6207
  var utf8 = new TextEncoder();
6184
6208
  var encodedWord = (value) => `=?UTF-8?B?${bytesToBase64(utf8.encode(value))}?=`;
@@ -9940,8 +9964,10 @@ __export(mail_exports, {
9940
9964
  listFolders: () => listFolders,
9941
9965
  listMailAccounts: () => listMailAccounts,
9942
9966
  listMessages: () => listMessages,
9967
+ openDraftEditor: () => openDraftEditor,
9943
9968
  saveDraft: () => saveDraft,
9944
9969
  sendMessage: () => sendMessage,
9970
+ unlockMailCredentials: () => unlockMailCredentials,
9945
9971
  unlockNativeMail: () => unlockNativeMail,
9946
9972
  updateMessage: () => updateMessage
9947
9973
  });
@@ -10038,6 +10064,47 @@ async function unlockNativeMail(mail, keys) {
10038
10064
  secretKey.fill(0);
10039
10065
  }
10040
10066
  }
10067
+ async function unlockMailCredentials(mail, accountId, keys) {
10068
+ await client.initSodium();
10069
+ const secretKey = client.encryptionKeypairFromSigningKey(keys.signingPrivateKey).secretKey;
10070
+ const { sealed_credentials } = await json(
10071
+ mail(`${accountPath(accountId)}/sealed-credentials`)
10072
+ );
10073
+ const bytes = client.sealedBoxDecrypt(sealed_credentials, secretKey);
10074
+ try {
10075
+ const access = await client.sealKeyForSession(bytes, keys.serverSessionKey);
10076
+ await mail(`${accountPath(accountId)}/session-credentials`, {
10077
+ method: "POST",
10078
+ body: JSON.stringify({ access })
10079
+ });
10080
+ } finally {
10081
+ bytes.fill(0);
10082
+ secretKey.fill(0);
10083
+ }
10084
+ }
10085
+ async function openDraftEditor(mail, body, keys) {
10086
+ const open = (extra = {}) => json(
10087
+ mail("/drafts/editor", { method: "POST", body: JSON.stringify({ ...body, ...extra }) })
10088
+ );
10089
+ try {
10090
+ return await open();
10091
+ } catch (error) {
10092
+ const { status, apiError } = error;
10093
+ const locked = apiError?.detail;
10094
+ if (status !== 423 || !locked?.sealed_key || !locked.room_id) throw error;
10095
+ const { signingPrivateKey, serverSessionKey } = await keys();
10096
+ await client.initSodium();
10097
+ const secretKey = client.encryptionKeypairFromSigningKey(signingPrivateKey).secretKey;
10098
+ const key = client.sealedBoxDecrypt(locked.sealed_key, secretKey);
10099
+ try {
10100
+ const sealed = await client.sealKeyForSession(key, serverSessionKey);
10101
+ return await open({ room_id: locked.room_id, key: sealed });
10102
+ } finally {
10103
+ key.fill(0);
10104
+ secretKey.fill(0);
10105
+ }
10106
+ }
10107
+ }
10041
10108
  function attachmentFromBytes(name, contentType, bytes) {
10042
10109
  return {
10043
10110
  id: "",
@@ -12306,34 +12373,84 @@ var Arbi = class {
12306
12373
  * recovery. Pass `fetch` to the `mail` operations, e.g. `mail.listFolders(arbi.mail.fetch)`.
12307
12374
  */
12308
12375
  mail = {
12309
- /** Fetch a path under `/v1/mail`; rejects a non-2xx response with an `ArbiApiError` (`status`). */
12310
- fetch: (path2, init = {}) => this.recovering(async () => {
12311
- const { baseUrl, accessToken, fetch: send = globalThis.fetch } = this.getAuthHeaders();
12312
- const headers = new Headers(init.headers);
12313
- headers.set("Authorization", `Bearer ${accessToken}`);
12314
- if (init.body && !headers.has("Content-Type"))
12315
- headers.set("Content-Type", "application/json");
12316
- const response = await send(`${baseUrl}/v1/mail${path2}`, { ...init, headers });
12317
- if (!response.ok) {
12318
- const body = await response.json().catch(() => null);
12319
- throw new ArbiApiError(
12320
- typeof body?.detail === "string" ? body.detail : "The mail request could not be completed",
12321
- body,
12322
- response.status
12323
- );
12324
- }
12325
- return response;
12376
+ /**
12377
+ * Fetch a path under `/v1/mail`; rejects a non-2xx response with an `ArbiApiError` (`status`).
12378
+ * A read of the native inbox unlocks it first (`unlockNative`), so mail that arrived since is
12379
+ * readable too; `nativeUnlocked` skips that when the caller already unlocked it for this pass.
12380
+ * With no token yet (a new tab) the session is restored first; a 401 re-logs in and is sent
12381
+ * again once.
12382
+ */
12383
+ fetch: (path2, init = {}, { nativeUnlocked = false } = {}) => this.recovering(async () => {
12384
+ const nativeRead = path2.startsWith("/accounts/native/") && (init.method ?? "GET").toUpperCase() !== "POST";
12385
+ if (nativeRead && !nativeUnlocked) await this.mail.unlockNative();
12386
+ return this.mailRequest(path2, init);
12326
12387
  }),
12327
- /** Unlock the signed-in user's native inbox for this server session (see `unlockNativeMail`). */
12328
- unlockNative: () => {
12329
- const login = this.loginResult;
12330
- if (!login) return Promise.reject(new ArbiError("Sign in to unlock your inbox"));
12331
- return unlockNativeMail(this.mail.fetch, {
12332
- signingPrivateKey: login.signingPrivateKey,
12333
- serverSessionKey: login.serverSessionKey
12334
- });
12335
- }
12388
+ /**
12389
+ * Unlock the signed-in user's native inbox for this server session (see `unlockNativeMail`).
12390
+ * Concurrent calls share one unlock.
12391
+ */
12392
+ unlockNative: () => this.nativeUnlock ??= this.nativeMailKeys().then((keys) => unlockNativeMail(this.mail.fetch, keys)).finally(() => {
12393
+ this.nativeUnlock = null;
12394
+ }),
12395
+ /**
12396
+ * Hand this session what the server needs to read `account`: the native inbox's keys, a
12397
+ * Microsoft or Gmail account's connector tokens, an IMAP account's sealed credentials.
12398
+ */
12399
+ unlockAccount: async (account) => {
12400
+ if (account.provider === "native") return this.mail.unlockNative();
12401
+ if (account.provider === "microsoft" || account.provider === "gmail") {
12402
+ await this.connectors.bridgeTokens({ vendor: account.provider });
12403
+ return;
12404
+ }
12405
+ await unlockMailCredentials(this.mail.fetch, account.id, await this.nativeMailKeys());
12406
+ },
12407
+ /**
12408
+ * Open a native draft's body in the Word editor, unlocking its room for this session with the
12409
+ * user's key when the server asks (see `openDraftEditor`).
12410
+ */
12411
+ openDraftEditor: (body) => openDraftEditor(this.mail.fetch, body, () => this.nativeMailKeys())
12336
12412
  };
12413
+ /** The native inbox unlock in flight (`mail.unlockNative`). */
12414
+ nativeUnlock = null;
12415
+ /** One request under `/v1/mail` on the session's token (see `mail.fetch`). */
12416
+ async mailRequest(path2, init) {
12417
+ const client = this.requireClient();
12418
+ let token = client.session.getState().accessToken;
12419
+ if (!token) token = await client.auth.relogin();
12420
+ if (!token) throw new ArbiError("Sign in again to restore your session");
12421
+ const send = client.http?.fetch ?? globalThis.fetch;
12422
+ const request = (bearer) => {
12423
+ const headers = new Headers(init.headers);
12424
+ headers.set("Authorization", `Bearer ${bearer}`);
12425
+ if (init.body && !headers.has("Content-Type")) headers.set("Content-Type", "application/json");
12426
+ return send(`${this.options.url}/v1/mail${path2}`, { ...init, headers });
12427
+ };
12428
+ let response = await request(token);
12429
+ if (response.status === 401) {
12430
+ const refreshed = await client.auth.relogin();
12431
+ if (refreshed) response = await request(refreshed);
12432
+ }
12433
+ if (!response.ok) {
12434
+ const body = await response.json().catch(() => null);
12435
+ throw new ArbiApiError(
12436
+ typeof body?.detail === "string" ? body.detail : "The mail request could not be completed",
12437
+ body,
12438
+ response.status
12439
+ );
12440
+ }
12441
+ return response;
12442
+ }
12443
+ /**
12444
+ * The keys that unlock the user's mail for this server session: the session's key (current after
12445
+ * a re-login) and the identity key (the login's, or the one kept on this device).
12446
+ */
12447
+ async nativeMailKeys() {
12448
+ const client = this.requireClient();
12449
+ const serverSessionKey = client.session.getState().serverSessionKey ?? this.loginResult?.serverSessionKey ?? null;
12450
+ const signingPrivateKey = this.loginResult?.signingPrivateKey ?? (await client.storage.getSession().catch(() => null))?.signingPrivateKey;
12451
+ if (!serverSessionKey || !signingPrivateKey) throw new ArbiError("Sign in to unlock your inbox");
12452
+ return { signingPrivateKey, serverSessionKey };
12453
+ }
12337
12454
  // ── Secure mail ─────────────────────────────────────────────────────
12338
12455
  /**
12339
12456
  * Mail to anyone, sealed in this browser under a key that travels only in the link's fragment
@@ -13268,6 +13385,12 @@ var Arbi = class {
13268
13385
  getModels: () => getModels(this.requireClient())
13269
13386
  };
13270
13387
  // ── Health ────────────────────────────────────────────────────────────
13388
+ support = {
13389
+ create: (input) => {
13390
+ const request = { ...input, idempotencyKey: input.idempotencyKey ?? crypto.randomUUID() };
13391
+ return this.recovering(() => createSupportTicket(this.requireClient(), request));
13392
+ }
13393
+ };
13271
13394
  health = {
13272
13395
  check: () => getHealth(this.requireClient()),
13273
13396
  models: () => getHealthModels(this.requireClient()),
@@ -14356,6 +14479,7 @@ exports.streamSSE = streamSSE;
14356
14479
  exports.stripCitationMarkdown = stripCitationMarkdown;
14357
14480
  exports.subagentJobLabel = subagentJobLabel;
14358
14481
  exports.summarizeCitations = summarizeCitations;
14482
+ exports.support = support_exports;
14359
14483
  exports.tagUseCount = tagUseCount;
14360
14484
  exports.tags = tags_exports;
14361
14485
  exports.tagsForScope = tagsForScope;