@arbidocs/sdk 0.5.69 → 0.5.71
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/{browser-BvdQbiFa.d.ts → browser-Bf6pRBuP.d.ts} +267 -173
- package/dist/{browser-CuDnbE8Y.d.cts → browser-CA2ecqVP.d.cts} +267 -173
- package/dist/browser.cjs +171 -21
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +179 -30
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +171 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +179 -30
- package/dist/index.js.map +1 -1
- package/examples/react-chat/package.json +2 -2
- package/package.json +2 -2
package/dist/browser.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as Arbi, e as ArbiApiError, f as ArbiError, g as ArbiErrorOptions, h as ArbiHostSession, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArbiStructuredOutputError, l as ArbiTransportError, m as ArbiWorkspaceChangedError, n as ArbiWorkspaceSupersededError, o as ArbiWorkspaceUnavailableError, p as AskHandlers, q as AskRequest, r as AttendeeRead, s as AuthContext, t as AuthHeaders, u as AuthMode, v as AuthenticatedClient, B as BookingConfirmation, w as BookingPage, x as BookingPageWriteBody, y as BookingRequestBody, z as BridgeTokensOptions, C as CalDavConnectBody, D as CalDavProfile, E as CalendarAccount, F as CalendarAccountKind, G as CalendarCreateBody, H as CalendarEvent, I as CalendarKeys, J as CalendarRead, K as CalendarSettings, L as CalendarSettingsBody, M as CalendarUpdate, N as CalendarWindow, O as CallApiError, P as Capabilities, Q as ChatAttachmentFile, R as ChatAttachmentInput, S as ChatCryptoContext, T as ChatKeyRing, U as ChatKind, V as ChatMemberKey, W as ChatMemberResponse, X as ChatMessage, Y as ChatMessageResponse, Z as ChatResponse, _ as ChatSession, $ as CitationSummary, a0 as CitationToolSources, a1 as CliConfig, a2 as CliCredentials, a3 as CommandDescriptor, a4 as ConfigStore, a5 as Configuration, a6 as ConfigurationPatch, a7 as ConnectOptions, a8 as ConnectionModel, a9 as ConnectorCatalogEntry, aa as ConnectorFolder, ab as ConnectorSyncProgress, ac as ConnectorSyncStatus, ad as ConnectorVendorKey, ae as ConnectorVisibilitySettings, af as ContextUsage, ag as ConversationResponse, ah as ConversationUsageResponse, ai as CreateFactRequest, aj as CreateFactsRequest, ak as CreateWorkRequest, al as CreateWorkflowRequest, am as DEFAULT_AI_USD_PER_GBP, ao as DRIVE_SYNC_VENDORS, ap as Database, aq as DatabaseAggregateRequest, ar as DatabaseAggregateResult, as as DatabaseColumn, at as DatabaseColumnWrite, au as DatabaseImportResult, av as DatabaseRow, aw as DatabaseRowPage, ax as DatabaseRowsQuery, ay as DateTimeSpec, aA as DecryptedChatMessage, aB as DeploymentHouseTemplate, aC as DirectModelUsage, aD as DocInfo, aE as DocInfoMap, aG as DocumentAutomationAction, aJ as DocumentSelector, aM as DriveSyncProgress, aN as DriveSyncSummary, aO as DuplicateContactError, aP as ENTITY_KINDS, aQ as EditScope, aR as EntityKind, aS as EventCreateBody, aT as EventPatchBody, aU as FLAT_TAG_KINDS, aV as FactResponse, aW as FactSearchRequest, aX as FactSearchResponse, aY as FindTimeParams, a_ as FreeBusyEntry, a$ as FullContextSelection, b0 as GOOGLE_VENDORS, b1 as HolidayCountry, b2 as HouseTemplateCandidate, b3 as IMANAGE_VENDORS, b4 as IdentityErrorCode, b5 as IdentityPurchase, b6 as IdentityState, b7 as IdentityStatus, b8 as ImportResult, b9 as InvitationRead, ba as JsonSchemaOutputFormat, bb as LinkedRun, bd as ListEventsParams, be as ListFactsOptions, bg as MAILBOX_SYNC_VENDORS, bh as MAX_RETRIEVE_DOC_IDS, bi as MICROSOFT_VENDORS, bl as ModelConnection, bm as OAuthAccountKind, bn as OutputItemDone, bo as OverlayItem, bp as OverlayLayerName, bq as PRESENCE_KINDS, br as PROMPT_CONTEXT_CHARS, bs as ParsedResponse, bt as ParsedSlashCommand, bu as ParsedStructuredResponse, bv as PendingAuthResponse, bw as PersonKey, bx as PersonalConnectionInput, by as PlanStepsError, bz as PlanWorkRequest, bA as ProductResponse, bB as ProjectAddonKind, bC as ProjectAddonSettingsRequest, bD as ProjectBudget, bE as ProjectCheckoutRequest, bF as ProjectConversationUsageResponse, bG as ProjectCreateOptions, bH as ProjectDetails, bI as ProjectEventKind, bJ as ProjectEventResponse, bK as ProjectInvoicesResponse, bL as ProjectNextPeriodAddonsRequest, bM as ProjectPlanChangeRequest, bN as ProjectQuoteRequest, bO as ProjectResponse, bP as ProjectUpdateRequest, bQ as ProjectUsageResponse, bR as PublicBookingError, bS as PublicBookingPage, bT as QuotaExceeded, bU as RaisedSignal, bV as RawResponseEvent, bW as ReconnectOptions, bX as ReconnectableWsConnection, bY as ResolvedCitation, b_ as RespondParams, b$ as RespondPartstat, c0 as Response, c1 as ResponseCreateRequest, c2 as ResponseCreateResult, c3 as ResponseHandle, c4 as ResponseSnapshot, c5 as ResponseStart, c6 as ResponseStartOptions, c7 as ResponseStream, c8 as ResponseStreamEvent, c9 as ResponseTools, ca as RoomCreateBody, cb as RoomQuery, cc as RoomRead, cd as RunProgress, ce as RunStats, cf as RunStep, cg as RunWaitingOn, ch as SHAREPOINT_VENDORS, ci as SSEEvent, cj as SSEStreamCallbacks, ck as SSEStreamOutcome, cl as SSEStreamResult, cn as STOP_ID_WAIT_MS, co as STOP_REPEAT_WINDOW_MS, cq as ScopedTarget, cr as SearchChunk, cs as
|
|
1
|
+
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as Arbi, e as ArbiApiError, f as ArbiError, g as ArbiErrorOptions, h as ArbiHostSession, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArbiStructuredOutputError, l as ArbiTransportError, m as ArbiWorkspaceChangedError, n as ArbiWorkspaceSupersededError, o as ArbiWorkspaceUnavailableError, p as AskHandlers, q as AskRequest, r as AttendeeRead, s as AuthContext, t as AuthHeaders, u as AuthMode, v as AuthenticatedClient, B as BookingConfirmation, w as BookingPage, x as BookingPageWriteBody, y as BookingRequestBody, z as BridgeTokensOptions, C as CalDavConnectBody, D as CalDavProfile, E as CalendarAccount, F as CalendarAccountKind, G as CalendarCreateBody, H as CalendarEvent, I as CalendarKeys, J as CalendarRead, K as CalendarSettings, L as CalendarSettingsBody, M as CalendarUpdate, N as CalendarWindow, O as CallApiError, P as Capabilities, Q as ChatAttachmentFile, R as ChatAttachmentInput, S as ChatCryptoContext, T as ChatKeyRing, U as ChatKind, V as ChatMemberKey, W as ChatMemberResponse, X as ChatMessage, Y as ChatMessageResponse, Z as ChatResponse, _ as ChatSession, $ as CitationSummary, a0 as CitationToolSources, a1 as CliConfig, a2 as CliCredentials, a3 as CommandDescriptor, a4 as ConfigStore, a5 as Configuration, a6 as ConfigurationPatch, a7 as ConnectOptions, a8 as ConnectionModel, a9 as ConnectorCatalogEntry, aa as ConnectorFolder, ab as ConnectorSyncProgress, ac as ConnectorSyncStatus, ad as ConnectorVendorKey, ae as ConnectorVisibilitySettings, af as ContextUsage, ag as ConversationResponse, ah as ConversationUsageResponse, ai as CreateFactRequest, aj as CreateFactsRequest, ak as CreateWorkRequest, al as CreateWorkflowRequest, am as DEFAULT_AI_USD_PER_GBP, ao as DRIVE_SYNC_VENDORS, ap as Database, aq as DatabaseAggregateRequest, ar as DatabaseAggregateResult, as as DatabaseColumn, at as DatabaseColumnWrite, au as DatabaseImportResult, av as DatabaseRow, aw as DatabaseRowPage, ax as DatabaseRowsQuery, ay as DateTimeSpec, aA as DecryptedChatMessage, aB as DeploymentHouseTemplate, aC as DirectModelUsage, aD as DocInfo, aE as DocInfoMap, aG as DocumentAutomationAction, aJ as DocumentSelector, aM as DriveSyncProgress, aN as DriveSyncSummary, aO as DuplicateContactError, aP as ENTITY_KINDS, aQ as EditScope, aR as EntityKind, aS as EventCreateBody, aT as EventPatchBody, aU as FLAT_TAG_KINDS, aV as FactResponse, aW as FactSearchRequest, aX as FactSearchResponse, aY as FindTimeParams, a_ as FreeBusyEntry, a$ as FullContextSelection, b0 as GOOGLE_VENDORS, b1 as HolidayCountry, b2 as HouseTemplateCandidate, b3 as IMANAGE_VENDORS, b4 as IdentityErrorCode, b5 as IdentityPurchase, b6 as IdentityState, b7 as IdentityStatus, b8 as ImportResult, b9 as InvitationRead, ba as JsonSchemaOutputFormat, bb as LinkedRun, bd as ListEventsParams, be as ListFactsOptions, bg as MAILBOX_SYNC_VENDORS, bh as MAX_RETRIEVE_DOC_IDS, bi as MICROSOFT_VENDORS, bl as ModelConnection, bm as OAuthAccountKind, bn as OutputItemDone, bo as OverlayItem, bp as OverlayLayerName, bq as PRESENCE_KINDS, br as PROMPT_CONTEXT_CHARS, bs as ParsedResponse, bt as ParsedSlashCommand, bu as ParsedStructuredResponse, bv as PendingAuthResponse, bw as PersonKey, bx as PersonalConnectionInput, by as PlanStepsError, bz as PlanWorkRequest, bA as ProductResponse, bB as ProjectAddonKind, bC as ProjectAddonSettingsRequest, bD as ProjectBudget, bE as ProjectCheckoutRequest, bF as ProjectConversationUsageResponse, bG as ProjectCreateOptions, bH as ProjectDetails, bI as ProjectEventKind, bJ as ProjectEventResponse, bK as ProjectInvoicesResponse, bL as ProjectNextPeriodAddonsRequest, bM as ProjectPlanChangeRequest, bN as ProjectQuoteRequest, bO as ProjectResponse, bP as ProjectUpdateRequest, bQ as ProjectUsageResponse, bR as PublicBookingError, bS as PublicBookingPage, bT as QuotaExceeded, bU as RaisedSignal, bV as RawResponseEvent, bW as ReconnectOptions, bX as ReconnectableWsConnection, bY as ResolvedCitation, b_ as RespondParams, b$ as RespondPartstat, c0 as Response, c1 as ResponseCreateRequest, c2 as ResponseCreateResult, c3 as ResponseHandle, c4 as ResponseSnapshot, c5 as ResponseStart, c6 as ResponseStartOptions, c7 as ResponseStream, c8 as ResponseStreamEvent, c9 as ResponseTools, ca as RoomCreateBody, cb as RoomQuery, cc as RoomRead, cd as RunProgress, ce as RunStats, cf as RunStep, cg as RunWaitingOn, ch as SHAREPOINT_VENDORS, ci as SSEEvent, cj as SSEStreamCallbacks, ck as SSEStreamOutcome, cl as SSEStreamResult, cn as STOP_ID_WAIT_MS, co as STOP_REPEAT_WINDOW_MS, cq as ScopedTarget, cr as SearchChunk, cs as SecureMailCompose, ct as SecureMailSend, cu as SecureMailSender, cv as SendBack, cw as ShareRead, cx as ShareRole, cy as SkillSummary, cz as SkippedFile, cA as SlackConnectionStatus, cB as StepActionRequest, cC as StepActivityEvent, cD as StepAssignee, cE as StepDisplay, cF as StepField, cI as StepKind, cJ as StepPhase, cK as StepSignal, cL as StepSignalWhen, cM as StepState, cN as StepStatus, cO as SubagentBranchRecord, cP as SubagentLaneInfo, cQ as SubmitBackgroundQueryOptions, cR as SubscribeParams, cS as SyncTriggerResult, cT as TAG_KINDS, cU as TAG_NESTING_MAX_DEPTH, cV as TagChange, cW as TagFieldDefinition, cX as TagGroup, cY as TagKind, cZ as TagKindField, c_ as TagKindSchema, c$ as TagLinks, d0 as TagListQuery, d1 as TagNode, d2 as TagResponse, d3 as TagScope, d4 as TagTreeRow, d5 as TaskPlan, d6 as TaskPlanStep, d7 as TaxQuoteResponse, d8 as Thread, d9 as ThreadsResponse, da as TimeSuggestion, db as TurnRequest, dc as UpdateConversationRequest, dd as UpdateFactRequest, de as UpdateWorkflowRequest, di as UploadDocumentsOptions, dj as UploadOptions, dk as UploadProgressListener, dl as UploadResult, dm as UsageBreakdown, dn as UserConnectorEntry, dp as UserDailyUsageResponse, dq as UserInfo, dr as WebSocketAuthError, ds as WeeklyHoursSpec, dt as WorkStatus, du as WorkflowAuthMode, dv as WorkflowResponse, dw as WorkflowRunHistoryResponse, dx as WorkflowRunResponse, dy as WorkspaceConflict, dz as WorkspaceContext, dA as WorkspaceOpenResponse, dB as WorkspaceResponse, dC as WsConnection, dD as account, dE as agentconfig, dG as appendTranscriptionHints, dH as assistant, dI as authenticatedFetch, dJ as bookPublicSlot, dK as buildCitationChunkData, dM as buildDocumentTools, dN as buildFactsContextTool, dO as buildRetrievalChunkTool, dP as buildRetrievalFullContextTool, dQ as buildRetrievalTocTool, dR as buildTurnRequest, dS as calendar, dT as calls, dU as canTagHaveParent, dV as cancelPublicBooking, dW as capabilities, dX as chats, dY as composeConfiguration, dZ as composeTools, d_ as computeRunStats, d$ as connectErrorMessage, e0 as connectWebSocket, e1 as connectWithReconnect, e2 as connectors, e3 as contacts, e4 as continuityPrompt, e5 as conversations, e6 as countCitations, e7 as createAuthenticatedClient, e9 as createIndexAssigner, ea as databases, eb as defaultKindForFormat, ec as doctags, ed as documentTools, ee as documents, ef as estimateDraftTokens, eg as extractDocumentIdsFromMessages, eh as extractFactIdsFromMessages, ei as extractSubagentLanes, ej as facts, ek as files, el as filterDocumentTags, em as filterSkills, en as findLeafForTaskMessage, eo as findMainSiblingLeaf, ep as findReplyTarget, eq as findSubagentRunId, er as flattenTagTree, es as formatAgentStepLabel, et as formatFileSize, eu as formatGbp, ev as formatGbpPerMillionTokens, ew as formatItemLabel, ey as formatTokens, ez as formatUserName, eA as formatWorkspaceChoices, eE as getAgentStepLabel, eF as getAttachableRunId, eG as getChildTags, eH as getContextRemainingPercent, eI as getContextUsedPercent, eJ as getContextUsedTokens, eK as getCurrentStep, eL as getEligibleParentTags, eM as getErrorCode, eN as getErrorMessage, eO as getPublicBookingPage, eP as getRawWorkspaceKey, eQ as getRunToAttach, eR as getRunToCancel, eS as getStepDisplay, eT as getStepTool, eU as getSubagentBranchRecord, eV as getTagDescendantIds, eW as health, eX as houseTemplates, eY as hydrateAgentSteps, e_ as identityErrorCode, eZ as identityVerification, e$ as instructions, f0 as isAnnotationTag, f1 as isConnectorVendorVisible, f2 as isDriveSyncVendor, f3 as isEntityTag, f4 as isFlatKind, f5 as isLabelTag, f6 as isMailboxSyncVendor, f7 as isNearAiUsageBudget, f8 as isPresenceTag, f9 as isSharePointVendor, fa as isSharedSkill, fb as isTraceItem, fc as mail, fd as mcpTools, fe as mergeAgentSteps, ff as modelConnections, fg as notifications, fh as parseSSEEvents, fi as parseSlashCommand, fj as parseSlashTokenInProgress, fk as parseStructuredResponse, fl as performPasswordLogin, fo as pickMainThread, fp as profile, fq as progressFetch, fr as projects, fs as quotaExceededFrom, ft as quotaFromStreamError, fu as reduceOutputItem, fv as refusalReason, fw as requireData, fx as requireOk, fy as resolveAuth, fz as resolveCitations, fA as resolveSummary, fB as resolveWorkspace, fC as responses, fD as searchChunks, fE as secureMail, fF as selectFullContextDocument, fG as selectWorkspace, fH as selectWorkspaceById, fI as sessions, fJ as settings, fL as sliceToSubagentThread, fM as streamSSE, fN as stripCitationMarkdown, fO as subagentJobLabel, fP as summarizeCitations, fQ as tagUseCount, fR as tags, fS as tagsForScope, fT as tagsOfGroup, fU as topLevelAgentSteps, fW as usdToGbp, fX as work, fY as workflowSteps, fZ as workflows, f_ as workspaceConflictOf, f$ as workspaces, g0 as wouldCreateTagCycle } from './browser-CA2ecqVP.cjs';
|
|
2
2
|
export { A as AgentControlStateEvent, a as AgentStepDeltaEvent, b as AgentStepEvent, c as ArbiErrorEvent, d as ArtifactEvent, D as DeferredInterjectionEvent, M as MailDraftSSEEvent, e as MessageMetadataPayload, f as MessageQueuedEvent, O as OutputTokensDetails, P as ProbeAnswerEvent, R as ResponseCompletedEvent, g as ResponseContentPartAddedEvent, h as ResponseCreatedEvent, i as ResponseFailedEvent, j as ResponseOutputItemAddedEvent, k as ResponseOutputItemDoneEvent, l as ResponseOutputTextDeltaEvent, m as ResponseOutputTextDoneEvent, n as ResponseUsage, S as SSEStreamStartData, T as TokenBudgetContext, U as UserInputRequestEvent, o as UserMessageEvent } from './sse-types-BbR7JG5o.cjs';
|
|
3
3
|
export { CallPeer, HttpErrorInfo, HttpRequestInfo, HttpResponseInfo, HttpTransportOptions, LoginProfile, SessionPersistence } from '@arbidocs/client';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as Arbi, e as ArbiApiError, f as ArbiError, g as ArbiErrorOptions, h as ArbiHostSession, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArbiStructuredOutputError, l as ArbiTransportError, m as ArbiWorkspaceChangedError, n as ArbiWorkspaceSupersededError, o as ArbiWorkspaceUnavailableError, p as AskHandlers, q as AskRequest, r as AttendeeRead, s as AuthContext, t as AuthHeaders, u as AuthMode, v as AuthenticatedClient, B as BookingConfirmation, w as BookingPage, x as BookingPageWriteBody, y as BookingRequestBody, z as BridgeTokensOptions, C as CalDavConnectBody, D as CalDavProfile, E as CalendarAccount, F as CalendarAccountKind, G as CalendarCreateBody, H as CalendarEvent, I as CalendarKeys, J as CalendarRead, K as CalendarSettings, L as CalendarSettingsBody, M as CalendarUpdate, N as CalendarWindow, O as CallApiError, P as Capabilities, Q as ChatAttachmentFile, R as ChatAttachmentInput, S as ChatCryptoContext, T as ChatKeyRing, U as ChatKind, V as ChatMemberKey, W as ChatMemberResponse, X as ChatMessage, Y as ChatMessageResponse, Z as ChatResponse, _ as ChatSession, $ as CitationSummary, a0 as CitationToolSources, a1 as CliConfig, a2 as CliCredentials, a3 as CommandDescriptor, a4 as ConfigStore, a5 as Configuration, a6 as ConfigurationPatch, a7 as ConnectOptions, a8 as ConnectionModel, a9 as ConnectorCatalogEntry, aa as ConnectorFolder, ab as ConnectorSyncProgress, ac as ConnectorSyncStatus, ad as ConnectorVendorKey, ae as ConnectorVisibilitySettings, af as ContextUsage, ag as ConversationResponse, ah as ConversationUsageResponse, ai as CreateFactRequest, aj as CreateFactsRequest, ak as CreateWorkRequest, al as CreateWorkflowRequest, am as DEFAULT_AI_USD_PER_GBP, ao as DRIVE_SYNC_VENDORS, ap as Database, aq as DatabaseAggregateRequest, ar as DatabaseAggregateResult, as as DatabaseColumn, at as DatabaseColumnWrite, au as DatabaseImportResult, av as DatabaseRow, aw as DatabaseRowPage, ax as DatabaseRowsQuery, ay as DateTimeSpec, aA as DecryptedChatMessage, aB as DeploymentHouseTemplate, aC as DirectModelUsage, aD as DocInfo, aE as DocInfoMap, aG as DocumentAutomationAction, aJ as DocumentSelector, aM as DriveSyncProgress, aN as DriveSyncSummary, aO as DuplicateContactError, aP as ENTITY_KINDS, aQ as EditScope, aR as EntityKind, aS as EventCreateBody, aT as EventPatchBody, aU as FLAT_TAG_KINDS, aV as FactResponse, aW as FactSearchRequest, aX as FactSearchResponse, aY as FindTimeParams, a_ as FreeBusyEntry, a$ as FullContextSelection, b0 as GOOGLE_VENDORS, b1 as HolidayCountry, b2 as HouseTemplateCandidate, b3 as IMANAGE_VENDORS, b4 as IdentityErrorCode, b5 as IdentityPurchase, b6 as IdentityState, b7 as IdentityStatus, b8 as ImportResult, b9 as InvitationRead, ba as JsonSchemaOutputFormat, bb as LinkedRun, bd as ListEventsParams, be as ListFactsOptions, bg as MAILBOX_SYNC_VENDORS, bh as MAX_RETRIEVE_DOC_IDS, bi as MICROSOFT_VENDORS, bl as ModelConnection, bm as OAuthAccountKind, bn as OutputItemDone, bo as OverlayItem, bp as OverlayLayerName, bq as PRESENCE_KINDS, br as PROMPT_CONTEXT_CHARS, bs as ParsedResponse, bt as ParsedSlashCommand, bu as ParsedStructuredResponse, bv as PendingAuthResponse, bw as PersonKey, bx as PersonalConnectionInput, by as PlanStepsError, bz as PlanWorkRequest, bA as ProductResponse, bB as ProjectAddonKind, bC as ProjectAddonSettingsRequest, bD as ProjectBudget, bE as ProjectCheckoutRequest, bF as ProjectConversationUsageResponse, bG as ProjectCreateOptions, bH as ProjectDetails, bI as ProjectEventKind, bJ as ProjectEventResponse, bK as ProjectInvoicesResponse, bL as ProjectNextPeriodAddonsRequest, bM as ProjectPlanChangeRequest, bN as ProjectQuoteRequest, bO as ProjectResponse, bP as ProjectUpdateRequest, bQ as ProjectUsageResponse, bR as PublicBookingError, bS as PublicBookingPage, bT as QuotaExceeded, bU as RaisedSignal, bV as RawResponseEvent, bW as ReconnectOptions, bX as ReconnectableWsConnection, bY as ResolvedCitation, b_ as RespondParams, b$ as RespondPartstat, c0 as Response, c1 as ResponseCreateRequest, c2 as ResponseCreateResult, c3 as ResponseHandle, c4 as ResponseSnapshot, c5 as ResponseStart, c6 as ResponseStartOptions, c7 as ResponseStream, c8 as ResponseStreamEvent, c9 as ResponseTools, ca as RoomCreateBody, cb as RoomQuery, cc as RoomRead, cd as RunProgress, ce as RunStats, cf as RunStep, cg as RunWaitingOn, ch as SHAREPOINT_VENDORS, ci as SSEEvent, cj as SSEStreamCallbacks, ck as SSEStreamOutcome, cl as SSEStreamResult, cn as STOP_ID_WAIT_MS, co as STOP_REPEAT_WINDOW_MS, cq as ScopedTarget, cr as SearchChunk, cs as
|
|
1
|
+
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as Arbi, e as ArbiApiError, f as ArbiError, g as ArbiErrorOptions, h as ArbiHostSession, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArbiStructuredOutputError, l as ArbiTransportError, m as ArbiWorkspaceChangedError, n as ArbiWorkspaceSupersededError, o as ArbiWorkspaceUnavailableError, p as AskHandlers, q as AskRequest, r as AttendeeRead, s as AuthContext, t as AuthHeaders, u as AuthMode, v as AuthenticatedClient, B as BookingConfirmation, w as BookingPage, x as BookingPageWriteBody, y as BookingRequestBody, z as BridgeTokensOptions, C as CalDavConnectBody, D as CalDavProfile, E as CalendarAccount, F as CalendarAccountKind, G as CalendarCreateBody, H as CalendarEvent, I as CalendarKeys, J as CalendarRead, K as CalendarSettings, L as CalendarSettingsBody, M as CalendarUpdate, N as CalendarWindow, O as CallApiError, P as Capabilities, Q as ChatAttachmentFile, R as ChatAttachmentInput, S as ChatCryptoContext, T as ChatKeyRing, U as ChatKind, V as ChatMemberKey, W as ChatMemberResponse, X as ChatMessage, Y as ChatMessageResponse, Z as ChatResponse, _ as ChatSession, $ as CitationSummary, a0 as CitationToolSources, a1 as CliConfig, a2 as CliCredentials, a3 as CommandDescriptor, a4 as ConfigStore, a5 as Configuration, a6 as ConfigurationPatch, a7 as ConnectOptions, a8 as ConnectionModel, a9 as ConnectorCatalogEntry, aa as ConnectorFolder, ab as ConnectorSyncProgress, ac as ConnectorSyncStatus, ad as ConnectorVendorKey, ae as ConnectorVisibilitySettings, af as ContextUsage, ag as ConversationResponse, ah as ConversationUsageResponse, ai as CreateFactRequest, aj as CreateFactsRequest, ak as CreateWorkRequest, al as CreateWorkflowRequest, am as DEFAULT_AI_USD_PER_GBP, ao as DRIVE_SYNC_VENDORS, ap as Database, aq as DatabaseAggregateRequest, ar as DatabaseAggregateResult, as as DatabaseColumn, at as DatabaseColumnWrite, au as DatabaseImportResult, av as DatabaseRow, aw as DatabaseRowPage, ax as DatabaseRowsQuery, ay as DateTimeSpec, aA as DecryptedChatMessage, aB as DeploymentHouseTemplate, aC as DirectModelUsage, aD as DocInfo, aE as DocInfoMap, aG as DocumentAutomationAction, aJ as DocumentSelector, aM as DriveSyncProgress, aN as DriveSyncSummary, aO as DuplicateContactError, aP as ENTITY_KINDS, aQ as EditScope, aR as EntityKind, aS as EventCreateBody, aT as EventPatchBody, aU as FLAT_TAG_KINDS, aV as FactResponse, aW as FactSearchRequest, aX as FactSearchResponse, aY as FindTimeParams, a_ as FreeBusyEntry, a$ as FullContextSelection, b0 as GOOGLE_VENDORS, b1 as HolidayCountry, b2 as HouseTemplateCandidate, b3 as IMANAGE_VENDORS, b4 as IdentityErrorCode, b5 as IdentityPurchase, b6 as IdentityState, b7 as IdentityStatus, b8 as ImportResult, b9 as InvitationRead, ba as JsonSchemaOutputFormat, bb as LinkedRun, bd as ListEventsParams, be as ListFactsOptions, bg as MAILBOX_SYNC_VENDORS, bh as MAX_RETRIEVE_DOC_IDS, bi as MICROSOFT_VENDORS, bl as ModelConnection, bm as OAuthAccountKind, bn as OutputItemDone, bo as OverlayItem, bp as OverlayLayerName, bq as PRESENCE_KINDS, br as PROMPT_CONTEXT_CHARS, bs as ParsedResponse, bt as ParsedSlashCommand, bu as ParsedStructuredResponse, bv as PendingAuthResponse, bw as PersonKey, bx as PersonalConnectionInput, by as PlanStepsError, bz as PlanWorkRequest, bA as ProductResponse, bB as ProjectAddonKind, bC as ProjectAddonSettingsRequest, bD as ProjectBudget, bE as ProjectCheckoutRequest, bF as ProjectConversationUsageResponse, bG as ProjectCreateOptions, bH as ProjectDetails, bI as ProjectEventKind, bJ as ProjectEventResponse, bK as ProjectInvoicesResponse, bL as ProjectNextPeriodAddonsRequest, bM as ProjectPlanChangeRequest, bN as ProjectQuoteRequest, bO as ProjectResponse, bP as ProjectUpdateRequest, bQ as ProjectUsageResponse, bR as PublicBookingError, bS as PublicBookingPage, bT as QuotaExceeded, bU as RaisedSignal, bV as RawResponseEvent, bW as ReconnectOptions, bX as ReconnectableWsConnection, bY as ResolvedCitation, b_ as RespondParams, b$ as RespondPartstat, c0 as Response, c1 as ResponseCreateRequest, c2 as ResponseCreateResult, c3 as ResponseHandle, c4 as ResponseSnapshot, c5 as ResponseStart, c6 as ResponseStartOptions, c7 as ResponseStream, c8 as ResponseStreamEvent, c9 as ResponseTools, ca as RoomCreateBody, cb as RoomQuery, cc as RoomRead, cd as RunProgress, ce as RunStats, cf as RunStep, cg as RunWaitingOn, ch as SHAREPOINT_VENDORS, ci as SSEEvent, cj as SSEStreamCallbacks, ck as SSEStreamOutcome, cl as SSEStreamResult, cn as STOP_ID_WAIT_MS, co as STOP_REPEAT_WINDOW_MS, cq as ScopedTarget, cr as SearchChunk, cs as SecureMailCompose, ct as SecureMailSend, cu as SecureMailSender, cv as SendBack, cw as ShareRead, cx as ShareRole, cy as SkillSummary, cz as SkippedFile, cA as SlackConnectionStatus, cB as StepActionRequest, cC as StepActivityEvent, cD as StepAssignee, cE as StepDisplay, cF as StepField, cI as StepKind, cJ as StepPhase, cK as StepSignal, cL as StepSignalWhen, cM as StepState, cN as StepStatus, cO as SubagentBranchRecord, cP as SubagentLaneInfo, cQ as SubmitBackgroundQueryOptions, cR as SubscribeParams, cS as SyncTriggerResult, cT as TAG_KINDS, cU as TAG_NESTING_MAX_DEPTH, cV as TagChange, cW as TagFieldDefinition, cX as TagGroup, cY as TagKind, cZ as TagKindField, c_ as TagKindSchema, c$ as TagLinks, d0 as TagListQuery, d1 as TagNode, d2 as TagResponse, d3 as TagScope, d4 as TagTreeRow, d5 as TaskPlan, d6 as TaskPlanStep, d7 as TaxQuoteResponse, d8 as Thread, d9 as ThreadsResponse, da as TimeSuggestion, db as TurnRequest, dc as UpdateConversationRequest, dd as UpdateFactRequest, de as UpdateWorkflowRequest, di as UploadDocumentsOptions, dj as UploadOptions, dk as UploadProgressListener, dl as UploadResult, dm as UsageBreakdown, dn as UserConnectorEntry, dp as UserDailyUsageResponse, dq as UserInfo, dr as WebSocketAuthError, ds as WeeklyHoursSpec, dt as WorkStatus, du as WorkflowAuthMode, dv as WorkflowResponse, dw as WorkflowRunHistoryResponse, dx as WorkflowRunResponse, dy as WorkspaceConflict, dz as WorkspaceContext, dA as WorkspaceOpenResponse, dB as WorkspaceResponse, dC as WsConnection, dD as account, dE as agentconfig, dG as appendTranscriptionHints, dH as assistant, dI as authenticatedFetch, dJ as bookPublicSlot, dK as buildCitationChunkData, dM as buildDocumentTools, dN as buildFactsContextTool, dO as buildRetrievalChunkTool, dP as buildRetrievalFullContextTool, dQ as buildRetrievalTocTool, dR as buildTurnRequest, dS as calendar, dT as calls, dU as canTagHaveParent, dV as cancelPublicBooking, dW as capabilities, dX as chats, dY as composeConfiguration, dZ as composeTools, d_ as computeRunStats, d$ as connectErrorMessage, e0 as connectWebSocket, e1 as connectWithReconnect, e2 as connectors, e3 as contacts, e4 as continuityPrompt, e5 as conversations, e6 as countCitations, e7 as createAuthenticatedClient, e9 as createIndexAssigner, ea as databases, eb as defaultKindForFormat, ec as doctags, ed as documentTools, ee as documents, ef as estimateDraftTokens, eg as extractDocumentIdsFromMessages, eh as extractFactIdsFromMessages, ei as extractSubagentLanes, ej as facts, ek as files, el as filterDocumentTags, em as filterSkills, en as findLeafForTaskMessage, eo as findMainSiblingLeaf, ep as findReplyTarget, eq as findSubagentRunId, er as flattenTagTree, es as formatAgentStepLabel, et as formatFileSize, eu as formatGbp, ev as formatGbpPerMillionTokens, ew as formatItemLabel, ey as formatTokens, ez as formatUserName, eA as formatWorkspaceChoices, eE as getAgentStepLabel, eF as getAttachableRunId, eG as getChildTags, eH as getContextRemainingPercent, eI as getContextUsedPercent, eJ as getContextUsedTokens, eK as getCurrentStep, eL as getEligibleParentTags, eM as getErrorCode, eN as getErrorMessage, eO as getPublicBookingPage, eP as getRawWorkspaceKey, eQ as getRunToAttach, eR as getRunToCancel, eS as getStepDisplay, eT as getStepTool, eU as getSubagentBranchRecord, eV as getTagDescendantIds, eW as health, eX as houseTemplates, eY as hydrateAgentSteps, e_ as identityErrorCode, eZ as identityVerification, e$ as instructions, f0 as isAnnotationTag, f1 as isConnectorVendorVisible, f2 as isDriveSyncVendor, f3 as isEntityTag, f4 as isFlatKind, f5 as isLabelTag, f6 as isMailboxSyncVendor, f7 as isNearAiUsageBudget, f8 as isPresenceTag, f9 as isSharePointVendor, fa as isSharedSkill, fb as isTraceItem, fc as mail, fd as mcpTools, fe as mergeAgentSteps, ff as modelConnections, fg as notifications, fh as parseSSEEvents, fi as parseSlashCommand, fj as parseSlashTokenInProgress, fk as parseStructuredResponse, fl as performPasswordLogin, fo as pickMainThread, fp as profile, fq as progressFetch, fr as projects, fs as quotaExceededFrom, ft as quotaFromStreamError, fu as reduceOutputItem, fv as refusalReason, fw as requireData, fx as requireOk, fy as resolveAuth, fz as resolveCitations, fA as resolveSummary, fB as resolveWorkspace, fC as responses, fD as searchChunks, fE as secureMail, fF as selectFullContextDocument, fG as selectWorkspace, fH as selectWorkspaceById, fI as sessions, fJ as settings, fL as sliceToSubagentThread, fM as streamSSE, fN as stripCitationMarkdown, fO as subagentJobLabel, fP as summarizeCitations, fQ as tagUseCount, fR as tags, fS as tagsForScope, fT as tagsOfGroup, fU as topLevelAgentSteps, fW as usdToGbp, fX as work, fY as workflowSteps, fZ as workflows, f_ as workspaceConflictOf, f$ as workspaces, g0 as wouldCreateTagCycle } from './browser-Bf6pRBuP.js';
|
|
2
2
|
export { A as AgentControlStateEvent, a as AgentStepDeltaEvent, b as AgentStepEvent, c as ArbiErrorEvent, d as ArtifactEvent, D as DeferredInterjectionEvent, M as MailDraftSSEEvent, e as MessageMetadataPayload, f as MessageQueuedEvent, O as OutputTokensDetails, P as ProbeAnswerEvent, R as ResponseCompletedEvent, g as ResponseContentPartAddedEvent, h as ResponseCreatedEvent, i as ResponseFailedEvent, j as ResponseOutputItemAddedEvent, k as ResponseOutputItemDoneEvent, l as ResponseOutputTextDeltaEvent, m as ResponseOutputTextDoneEvent, n as ResponseUsage, S as SSEStreamStartData, T as TokenBudgetContext, U as UserInputRequestEvent, o as UserMessageEvent } from './sse-types-BbR7JG5o.js';
|
|
3
3
|
export { CallPeer, HttpErrorInfo, HttpRequestInfo, HttpResponseInfo, HttpTransportOptions, LoginProfile, SessionPersistence } from '@arbidocs/client';
|
package/dist/browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createArbiClient, base64ToBytes, unwrapWorkspaceKey, sealKeyForSession, buildWebSocketUrl, createAuthMessage, parseServerMessage, isMessageType, createContentHash, encryptFile, initSodium, encryptionKeypairFromSigningKey, sealedBoxEncrypt, sealedBoxDecrypt, bytesToBase64, encryptWithChatKey, decryptWithChatKey, decryptFile, deriveDirectChatKey, openSealedChatKey, generateChatKey, sealChatKey, sealCallKey, encryptMessage,
|
|
1
|
+
import { createArbiClient, base64ToBytes, unwrapWorkspaceKey, sealKeyForSession, buildWebSocketUrl, createAuthMessage, parseServerMessage, isMessageType, createContentHash, encryptFile, initSodium, encryptionKeypairFromSigningKey, sealedBoxEncrypt, sealedBoxDecrypt, sealSecureMail, decodeSecureMailKey, openSecureMail, secureMailClaim, bytesToBase64 as bytesToBase64$1, encryptWithChatKey, decryptWithChatKey, decryptFile, deriveDirectChatKey, openSealedChatKey, generateChatKey, sealChatKey, sealCallKey, encryptMessage, createSessionManager, authRequestError, isAbortError, changePassword, openCallKeyOf, decryptCallTitle, generateCallKey, encryptCallTitle, sealCallKeyForPeers, openSealedCallKey, readSessionClaims } from '@arbidocs/client';
|
|
2
2
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -6008,6 +6008,139 @@ async function unlockModelConnections(arbi, keys, onlyId) {
|
|
|
6008
6008
|
}
|
|
6009
6009
|
}
|
|
6010
6010
|
|
|
6011
|
+
// src/operations/secure-mail.ts
|
|
6012
|
+
var secure_mail_exports = {};
|
|
6013
|
+
__export(secure_mail_exports, {
|
|
6014
|
+
claimSecureMail: () => claimSecureMail,
|
|
6015
|
+
prepareSecureMail: () => prepareSecureMail,
|
|
6016
|
+
secureMime: () => secureMime
|
|
6017
|
+
});
|
|
6018
|
+
|
|
6019
|
+
// src/operations/mail-encoding.ts
|
|
6020
|
+
function bytesToBase64(bytes) {
|
|
6021
|
+
let binary = "";
|
|
6022
|
+
for (let i2 = 0; i2 < bytes.length; i2 += 32768) {
|
|
6023
|
+
binary += String.fromCharCode(...bytes.subarray(i2, i2 + 32768));
|
|
6024
|
+
}
|
|
6025
|
+
return btoa(binary);
|
|
6026
|
+
}
|
|
6027
|
+
var MAX_MESSAGE_BYTES = 25 * 1024 * 1024;
|
|
6028
|
+
var utf8 = new TextEncoder();
|
|
6029
|
+
var encodedWord = (value) => `=?UTF-8?B?${bytesToBase64(utf8.encode(value))}?=`;
|
|
6030
|
+
var folded = (value) => value.match(/.{1,76}/g)?.join("\r\n") ?? "";
|
|
6031
|
+
var safeHeader = (value) => {
|
|
6032
|
+
if (/[\r\n\0]/.test(value)) throw new Error("Email headers cannot contain newlines");
|
|
6033
|
+
return value;
|
|
6034
|
+
};
|
|
6035
|
+
function secureMime(compose, sender) {
|
|
6036
|
+
const address = (r2) => `${r2.name ? encodedWord(safeHeader(r2.name)) + " " : ""}<${safeHeader(r2.email)}>`;
|
|
6037
|
+
const boundary = "arbi-" + crypto.randomUUID();
|
|
6038
|
+
const headers = [
|
|
6039
|
+
`From: ${address({ email: sender.email, name: sender.display_name })}`,
|
|
6040
|
+
...compose.to.length ? [`To: ${compose.to.map(address).join(", ")}`] : [],
|
|
6041
|
+
...compose.cc.length ? [`Cc: ${compose.cc.map(address).join(", ")}`] : [],
|
|
6042
|
+
`Subject: ${encodedWord(safeHeader(compose.subject))}`,
|
|
6043
|
+
`Date: ${(/* @__PURE__ */ new Date()).toUTCString()}`,
|
|
6044
|
+
`Message-ID: <${crypto.randomUUID()}@${sender.email.split("@")[1]}>`,
|
|
6045
|
+
...compose.in_reply_to ? [`In-Reply-To: ${safeHeader(compose.in_reply_to)}`] : [],
|
|
6046
|
+
...compose.references?.length ? [`References: ${compose.references.map(safeHeader).join(" ")}`] : [],
|
|
6047
|
+
"MIME-Version: 1.0",
|
|
6048
|
+
"X-ARBI-Secure-Delivery: 1",
|
|
6049
|
+
`Content-Type: multipart/mixed; boundary="${boundary}"`
|
|
6050
|
+
];
|
|
6051
|
+
const alternative = "alternative-" + crypto.randomUUID();
|
|
6052
|
+
const plainPart = `Content-Type: text/plain; charset="utf-8"\r
|
|
6053
|
+
Content-Transfer-Encoding: base64\r
|
|
6054
|
+
\r
|
|
6055
|
+
${folded(bytesToBase64(utf8.encode(compose.text)))}`;
|
|
6056
|
+
const bodyPart = compose.html ? `Content-Type: multipart/alternative; boundary="${alternative}"\r
|
|
6057
|
+
\r
|
|
6058
|
+
--${alternative}\r
|
|
6059
|
+
${plainPart}\r
|
|
6060
|
+
--${alternative}\r
|
|
6061
|
+
Content-Type: text/html; charset="utf-8"\r
|
|
6062
|
+
Content-Transfer-Encoding: base64\r
|
|
6063
|
+
\r
|
|
6064
|
+
${folded(bytesToBase64(utf8.encode(compose.html)))}\r
|
|
6065
|
+
--${alternative}--\r
|
|
6066
|
+
` : plainPart;
|
|
6067
|
+
const parts = [
|
|
6068
|
+
`--${boundary}\r
|
|
6069
|
+
${bodyPart}`,
|
|
6070
|
+
...compose.attachments.map((a2) => {
|
|
6071
|
+
if (!a2.content_base64) throw new Error("Attachment content is missing");
|
|
6072
|
+
const name = encodeURIComponent(safeHeader(a2.name)).replace(/'/g, "%27");
|
|
6073
|
+
return `--${boundary}\r
|
|
6074
|
+
Content-Type: ${safeHeader(a2.content_type || "application/octet-stream")}\r
|
|
6075
|
+
Content-Disposition: attachment; filename*=UTF-8''${name}\r
|
|
6076
|
+
Content-Transfer-Encoding: base64\r
|
|
6077
|
+
\r
|
|
6078
|
+
${folded(a2.content_base64)}`;
|
|
6079
|
+
}),
|
|
6080
|
+
`--${boundary}--\r
|
|
6081
|
+
`
|
|
6082
|
+
];
|
|
6083
|
+
return utf8.encode(headers.join("\r\n") + "\r\n\r\n" + parts.join("\r\n"));
|
|
6084
|
+
}
|
|
6085
|
+
async function prepareSecureMail(compose, sender, { requestId, senderPublicKey, frontendOrigin }) {
|
|
6086
|
+
const raw = secureMime(compose, sender);
|
|
6087
|
+
try {
|
|
6088
|
+
if (raw.length > MAX_MESSAGE_BYTES) throw new Error("Email exceeds the message size limit");
|
|
6089
|
+
const metadata = {
|
|
6090
|
+
secure_delivery: true,
|
|
6091
|
+
id: "",
|
|
6092
|
+
subject: compose.subject,
|
|
6093
|
+
sender: [{ email: sender.email, name: sender.display_name }],
|
|
6094
|
+
to: compose.to,
|
|
6095
|
+
cc: compose.cc,
|
|
6096
|
+
bcc: [],
|
|
6097
|
+
received_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6098
|
+
preview: compose.text.slice(0, 220),
|
|
6099
|
+
unread: false,
|
|
6100
|
+
text: "",
|
|
6101
|
+
references: compose.references ?? [],
|
|
6102
|
+
attachments: compose.attachments.map((a2, i2) => ({
|
|
6103
|
+
...a2,
|
|
6104
|
+
id: String(i2),
|
|
6105
|
+
content_base64: null
|
|
6106
|
+
}))
|
|
6107
|
+
};
|
|
6108
|
+
const recipients = [
|
|
6109
|
+
...new Set([...compose.to, ...compose.cc, ...compose.bcc].map((r2) => r2.email.toLowerCase()))
|
|
6110
|
+
];
|
|
6111
|
+
const sealed = await sealSecureMail(raw, metadata, senderPublicKey);
|
|
6112
|
+
return {
|
|
6113
|
+
request_id: requestId,
|
|
6114
|
+
draft_id: compose.draft_id,
|
|
6115
|
+
recipients: recipients.map((email) => ({
|
|
6116
|
+
id: crypto.randomUUID(),
|
|
6117
|
+
email,
|
|
6118
|
+
fragment_key: sealed.fragment_key
|
|
6119
|
+
})),
|
|
6120
|
+
ciphertext: sealed.ciphertext,
|
|
6121
|
+
metadata_ciphertext: sealed.metadata_ciphertext,
|
|
6122
|
+
sender_wrapped_key: sealed.sender_wrapped_key,
|
|
6123
|
+
frontend_origin: frontendOrigin
|
|
6124
|
+
};
|
|
6125
|
+
} finally {
|
|
6126
|
+
raw.fill(0);
|
|
6127
|
+
}
|
|
6128
|
+
}
|
|
6129
|
+
async function claimSecureMail(mail, id, fragmentKey, recipientPublicKey) {
|
|
6130
|
+
const key = decodeSecureMailKey(fragmentKey);
|
|
6131
|
+
try {
|
|
6132
|
+
const path2 = `/secure/${encodeURIComponent(id)}`;
|
|
6133
|
+
const response = await mail(path2);
|
|
6134
|
+
const { raw } = await openSecureMail(await response.json(), key);
|
|
6135
|
+
raw.fill(0);
|
|
6136
|
+
const claim = await secureMailClaim(key, recipientPublicKey);
|
|
6137
|
+
const claimed = await mail(`${path2}/claim`, { method: "POST", body: JSON.stringify(claim) });
|
|
6138
|
+
return await claimed.json();
|
|
6139
|
+
} finally {
|
|
6140
|
+
key.fill(0);
|
|
6141
|
+
}
|
|
6142
|
+
}
|
|
6143
|
+
|
|
6011
6144
|
// src/operations/workspaces.ts
|
|
6012
6145
|
var workspaces_exports = {};
|
|
6013
6146
|
__export(workspaces_exports, {
|
|
@@ -7259,7 +7392,7 @@ async function uploadChatAttachment(arbi, input) {
|
|
|
7259
7392
|
name: input.name,
|
|
7260
7393
|
type: input.type || "application/octet-stream",
|
|
7261
7394
|
size: input.bytes.length,
|
|
7262
|
-
key: bytesToBase64(key)
|
|
7395
|
+
key: bytesToBase64$1(key)
|
|
7263
7396
|
};
|
|
7264
7397
|
} finally {
|
|
7265
7398
|
key.fill(0);
|
|
@@ -7348,7 +7481,7 @@ async function openChatKeyRing(chat, crypto2) {
|
|
|
7348
7481
|
const keys = /* @__PURE__ */ new Map();
|
|
7349
7482
|
if (chat.kind === "direct") {
|
|
7350
7483
|
const peer = directPeer(chat, crypto2.userExtId);
|
|
7351
|
-
const peerPub = peer?.encryption_public_key ?? bytesToBase64(crypto2.encryptionKeypair.publicKey);
|
|
7484
|
+
const peerPub = peer?.encryption_public_key ?? bytesToBase64$1(crypto2.encryptionKeypair.publicKey);
|
|
7352
7485
|
keys.set(0, await deriveDirectChatKey(peerPub, crypto2.encryptionKeypair.secretKey));
|
|
7353
7486
|
} else {
|
|
7354
7487
|
for (const k2 of chat.my_keys ?? []) {
|
|
@@ -7493,7 +7626,7 @@ async function createGroupChat(arbi, crypto2, params) {
|
|
|
7493
7626
|
),
|
|
7494
7627
|
creator_sealed_key: await sealChatKey(
|
|
7495
7628
|
key,
|
|
7496
|
-
bytesToBase64(crypto2.encryptionKeypair.publicKey)
|
|
7629
|
+
bytesToBase64$1(crypto2.encryptionKeypair.publicKey)
|
|
7497
7630
|
)
|
|
7498
7631
|
}
|
|
7499
7632
|
}),
|
|
@@ -9645,7 +9778,6 @@ __export(mail_exports, {
|
|
|
9645
9778
|
NATIVE_ACCOUNT: () => NATIVE_ACCOUNT,
|
|
9646
9779
|
attachmentFromBytes: () => attachmentFromBytes,
|
|
9647
9780
|
claimNativeAlias: () => claimNativeAlias,
|
|
9648
|
-
claimSecureMail: () => claimSecureMail,
|
|
9649
9781
|
createMailFetch: () => createMailFetch,
|
|
9650
9782
|
downloadAttachment: () => downloadAttachment,
|
|
9651
9783
|
getMailPolicy: () => getMailPolicy,
|
|
@@ -9751,34 +9883,15 @@ async function unlockNativeMail(mail, keys) {
|
|
|
9751
9883
|
secretKey.fill(0);
|
|
9752
9884
|
}
|
|
9753
9885
|
}
|
|
9754
|
-
async function claimSecureMail(mail, id, fragmentKey, recipientPublicKey) {
|
|
9755
|
-
const key = decodeSecureMailKey(fragmentKey);
|
|
9756
|
-
try {
|
|
9757
|
-
const path2 = `/secure/${encodeURIComponent(id)}`;
|
|
9758
|
-
const { raw } = await openSecureMail(await json(mail(path2)), key);
|
|
9759
|
-
raw.fill(0);
|
|
9760
|
-
const claim = await secureMailClaim(key, recipientPublicKey);
|
|
9761
|
-
return await json(mail(`${path2}/claim`, { method: "POST", body: JSON.stringify(claim) }));
|
|
9762
|
-
} finally {
|
|
9763
|
-
key.fill(0);
|
|
9764
|
-
}
|
|
9765
|
-
}
|
|
9766
9886
|
function attachmentFromBytes(name, contentType, bytes) {
|
|
9767
9887
|
return {
|
|
9768
9888
|
id: "",
|
|
9769
9889
|
name,
|
|
9770
9890
|
content_type: contentType,
|
|
9771
9891
|
size: bytes.length,
|
|
9772
|
-
content_base64:
|
|
9892
|
+
content_base64: bytesToBase64(bytes)
|
|
9773
9893
|
};
|
|
9774
9894
|
}
|
|
9775
|
-
function bytesToBase643(bytes) {
|
|
9776
|
-
let binary = "";
|
|
9777
|
-
for (let i2 = 0; i2 < bytes.length; i2 += 32768) {
|
|
9778
|
-
binary += String.fromCharCode(...bytes.subarray(i2, i2 + 32768));
|
|
9779
|
-
}
|
|
9780
|
-
return btoa(binary);
|
|
9781
|
-
}
|
|
9782
9895
|
|
|
9783
9896
|
// src/operations/calendar.ts
|
|
9784
9897
|
var calendar_exports = {};
|
|
@@ -12057,6 +12170,42 @@ var Arbi = class {
|
|
|
12057
12170
|
});
|
|
12058
12171
|
}
|
|
12059
12172
|
};
|
|
12173
|
+
// ── Secure mail ─────────────────────────────────────────────────────
|
|
12174
|
+
/**
|
|
12175
|
+
* Mail to anyone, sealed in this browser under a key that travels only in the link's fragment
|
|
12176
|
+
* (see `operations/secure-mail`). Both sides use the signed-in user's encryption key: the
|
|
12177
|
+
* login's, or (a new tab not signed in to the server yet) the one kept on this device.
|
|
12178
|
+
*/
|
|
12179
|
+
secureMail = {
|
|
12180
|
+
/**
|
|
12181
|
+
* The `/secure/send` payload for `compose` from `account`, shown with the user's own name.
|
|
12182
|
+
* Links open on `frontendOrigin` (default: this page's origin).
|
|
12183
|
+
*/
|
|
12184
|
+
prepare: async (compose, account, requestId, frontendOrigin = globalThis.location?.origin ?? "") => {
|
|
12185
|
+
const user = this.client?.session.getState().user;
|
|
12186
|
+
const name = user ? [user.given_name, user.family_name] : [this.userProfile?.givenName, this.userProfile?.familyName];
|
|
12187
|
+
const senderName = name.filter(Boolean).join(" ");
|
|
12188
|
+
return prepareSecureMail(
|
|
12189
|
+
compose,
|
|
12190
|
+
{ ...account, display_name: senderName || account.display_name },
|
|
12191
|
+
{ requestId, senderPublicKey: await this.encryptionPublicKey(), frontendOrigin }
|
|
12192
|
+
);
|
|
12193
|
+
},
|
|
12194
|
+
/**
|
|
12195
|
+
* Claim the secure message `id` with the key from its link into the user's native inbox, over
|
|
12196
|
+
* `mail` (default: this session's mail transport). Resolves to the message's id there.
|
|
12197
|
+
*/
|
|
12198
|
+
claim: async (id, fragmentKey, mail = this.mail.fetch) => claimSecureMail(mail, id, fragmentKey, await this.encryptionPublicKey())
|
|
12199
|
+
};
|
|
12200
|
+
/** The signed-in user's X25519 public key (from the identity key; its secret half is wiped). */
|
|
12201
|
+
async encryptionPublicKey() {
|
|
12202
|
+
const signingKey = this.loginResult?.signingPrivateKey ?? (await this.client?.storage.getSession().catch(() => null))?.signingPrivateKey;
|
|
12203
|
+
if (!signingKey) throw new ArbiError("Sign in again to unlock your encryption key");
|
|
12204
|
+
await initSodium();
|
|
12205
|
+
const pair = encryptionKeypairFromSigningKey(signingKey);
|
|
12206
|
+
pair.secretKey.fill(0);
|
|
12207
|
+
return pair.publicKey;
|
|
12208
|
+
}
|
|
12060
12209
|
async openResponseHandle(open, options, id, bufferEvents = false) {
|
|
12061
12210
|
const controller = new AbortController();
|
|
12062
12211
|
const abort = () => controller.abort();
|
|
@@ -12566,7 +12715,7 @@ var Arbi = class {
|
|
|
12566
12715
|
const crypto2 = await this.requireChatCrypto();
|
|
12567
12716
|
return {
|
|
12568
12717
|
externalId: crypto2.userExtId,
|
|
12569
|
-
publicKey: bytesToBase64(crypto2.encryptionKeypair.publicKey)
|
|
12718
|
+
publicKey: bytesToBase64$1(crypto2.encryptionKeypair.publicKey)
|
|
12570
12719
|
};
|
|
12571
12720
|
},
|
|
12572
12721
|
/** The keys of a chat I hold (cached per set of epochs). */
|
|
@@ -12689,7 +12838,7 @@ var Arbi = class {
|
|
|
12689
12838
|
mode: params.mode ?? "call",
|
|
12690
12839
|
...params.joinPolicy ? { join_policy: params.joinPolicy } : {},
|
|
12691
12840
|
title: title ? await encryptCallTitle(title, fresh) : null,
|
|
12692
|
-
creator_sealed_key: await sealCallKey(fresh, bytesToBase64(me2.encryptionKeypair.publicKey)),
|
|
12841
|
+
creator_sealed_key: await sealCallKey(fresh, bytesToBase64$1(me2.encryptionKeypair.publicKey)),
|
|
12693
12842
|
invitees: Object.entries(sealed).map(([user_ext_id, sealed_key]) => ({
|
|
12694
12843
|
user_ext_id,
|
|
12695
12844
|
sealed_key,
|
|
@@ -12747,7 +12896,7 @@ var Arbi = class {
|
|
|
12747
12896
|
const key = await generateCallKey();
|
|
12748
12897
|
const updated = await updateCall(this.requireClient(), call.external_id, {
|
|
12749
12898
|
reset_link: true,
|
|
12750
|
-
creator_sealed_key: await sealCallKey(key, bytesToBase64(me2.encryptionKeypair.publicKey)),
|
|
12899
|
+
creator_sealed_key: await sealCallKey(key, bytesToBase64$1(me2.encryptionKeypair.publicKey)),
|
|
12751
12900
|
sealed_keys: await sealCallKeyForPeers(key, invitees, me2.userExtId),
|
|
12752
12901
|
title: title ? await encryptCallTitle(title, key) : null
|
|
12753
12902
|
});
|
|
@@ -12769,7 +12918,7 @@ var Arbi = class {
|
|
|
12769
12918
|
title: title ? await encryptWithChatKey(title, chatKey) : null,
|
|
12770
12919
|
creator_sealed_key: await sealChatKey(
|
|
12771
12920
|
chatKey,
|
|
12772
|
-
bytesToBase64(me2.encryptionKeypair.publicKey)
|
|
12921
|
+
bytesToBase64$1(me2.encryptionKeypair.publicKey)
|
|
12773
12922
|
),
|
|
12774
12923
|
members: await Promise.all(
|
|
12775
12924
|
members.map(async (m2) => ({
|
|
@@ -13879,6 +14028,6 @@ function composeTools(base, next, mode) {
|
|
|
13879
14028
|
return structuredClone(mode === "add" ? { ...base, ...next } : next);
|
|
13880
14029
|
}
|
|
13881
14030
|
|
|
13882
|
-
export { ACCOUNT_VENDOR, Arbi, ArbiApiError, ArbiError, ArbiSessionExpiredError, ArbiStructuredOutputError, ArbiTransportError, ArbiWorkspaceChangedError, ArbiWorkspaceSupersededError, ArbiWorkspaceUnavailableError, CallApiError, DEFAULT_AI_USD_PER_GBP, DRIVE_SYNC_VENDORS, DuplicateContactError, ENTITY_KINDS, FLAT_TAG_KINDS, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MAX_RETRIEVE_DOC_IDS, MICROSOFT_VENDORS, PRESENCE_KINDS, PROMPT_CONTEXT_CHARS, PlanStepsError, PublicBookingError, ResponseStream, SHAREPOINT_VENDORS, STOP_ID_WAIT_MS, STOP_REPEAT_WINDOW_MS, TAG_KINDS, TAG_NESTING_MAX_DEPTH, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, appendTranscriptionHints, assistant_exports as assistant, authenticatedFetch, bookPublicSlot, buildCitationChunkData, buildDocumentTools, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, buildTurnRequest, calendar_exports as calendar, calls_exports as calls, canTagHaveParent, cancelPublicBooking, capabilities, chats_exports as chats, composeConfiguration, composeTools, computeRunStats, connectErrorMessage, connectWebSocket, connectWithReconnect, connectors_exports as connectors, contacts_exports as contacts, continuityPrompt, conversations_exports as conversations, countCitations, createAuthenticatedClient, createIndexAssigner, databases_exports as databases, defaultKindForFormat, doctags_exports as doctags, documentTools, documents_exports as documents, estimateDraftTokens, extractDocumentIdsFromMessages, extractFactIdsFromMessages, extractSubagentLanes, facts_exports as facts, files_exports as files, filterDocumentTags, filterSkills, findLeafForTaskMessage, findMainSiblingLeaf, findReplyTarget, findSubagentRunId, flattenTagTree, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatTokens, formatUserName, formatWorkspaceChoices, getAgentStepLabel, getAttachableRunId, getChildTags, getContextRemainingPercent, getContextUsedPercent, getContextUsedTokens, getCurrentStep, getEligibleParentTags, getErrorCode, getErrorMessage, getPublicBookingPage, getRawWorkspaceKey, getRunToAttach, getRunToCancel, getStepDisplay, getStepTool, getSubagentBranchRecord, getTagDescendantIds, health_exports as health, house_template_exports as houseTemplates, hydrateAgentSteps, identityErrorCode, identity_exports as identityVerification, instructions, isAnnotationTag, isConnectorVendorVisible, isDriveSyncVendor, isEntityTag, isFlatKind, isLabelTag, isMailboxSyncVendor, isNearAiUsageBudget, isPresenceTag, isSharePointVendor, isSharedSkill, isTraceItem, mail_exports as mail, mcpTools, mergeAgentSteps, model_connections_exports as modelConnections, notifications_exports as notifications, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, parseStructuredResponse, performPasswordLogin, pickMainThread, profile_exports as profile, progressFetch, projects_exports as projects, quotaExceededFrom, quotaFromStreamError, reduceOutputItem, refusalReason, requireData, requireOk, resolveAuth, resolveCitations, resolveSummary, resolveWorkspace, responses_exports as responses, searchChunks, selectFullContextDocument, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings, sliceToSubagentThread, streamSSE, stripCitationMarkdown, subagentJobLabel, summarizeCitations, tagUseCount, tags_exports as tags, tagsForScope, tagsOfGroup, topLevelAgentSteps, usdToGbp, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaceConflictOf, workspaces_exports as workspaces, wouldCreateTagCycle };
|
|
14031
|
+
export { ACCOUNT_VENDOR, Arbi, ArbiApiError, ArbiError, ArbiSessionExpiredError, ArbiStructuredOutputError, ArbiTransportError, ArbiWorkspaceChangedError, ArbiWorkspaceSupersededError, ArbiWorkspaceUnavailableError, CallApiError, DEFAULT_AI_USD_PER_GBP, DRIVE_SYNC_VENDORS, DuplicateContactError, ENTITY_KINDS, FLAT_TAG_KINDS, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MAX_RETRIEVE_DOC_IDS, MICROSOFT_VENDORS, PRESENCE_KINDS, PROMPT_CONTEXT_CHARS, PlanStepsError, PublicBookingError, ResponseStream, SHAREPOINT_VENDORS, STOP_ID_WAIT_MS, STOP_REPEAT_WINDOW_MS, TAG_KINDS, TAG_NESTING_MAX_DEPTH, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, appendTranscriptionHints, assistant_exports as assistant, authenticatedFetch, bookPublicSlot, buildCitationChunkData, buildDocumentTools, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, buildTurnRequest, calendar_exports as calendar, calls_exports as calls, canTagHaveParent, cancelPublicBooking, capabilities, chats_exports as chats, composeConfiguration, composeTools, computeRunStats, connectErrorMessage, connectWebSocket, connectWithReconnect, connectors_exports as connectors, contacts_exports as contacts, continuityPrompt, conversations_exports as conversations, countCitations, createAuthenticatedClient, createIndexAssigner, databases_exports as databases, defaultKindForFormat, doctags_exports as doctags, documentTools, documents_exports as documents, estimateDraftTokens, extractDocumentIdsFromMessages, extractFactIdsFromMessages, extractSubagentLanes, facts_exports as facts, files_exports as files, filterDocumentTags, filterSkills, findLeafForTaskMessage, findMainSiblingLeaf, findReplyTarget, findSubagentRunId, flattenTagTree, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatTokens, formatUserName, formatWorkspaceChoices, getAgentStepLabel, getAttachableRunId, getChildTags, getContextRemainingPercent, getContextUsedPercent, getContextUsedTokens, getCurrentStep, getEligibleParentTags, getErrorCode, getErrorMessage, getPublicBookingPage, getRawWorkspaceKey, getRunToAttach, getRunToCancel, getStepDisplay, getStepTool, getSubagentBranchRecord, getTagDescendantIds, health_exports as health, house_template_exports as houseTemplates, hydrateAgentSteps, identityErrorCode, identity_exports as identityVerification, instructions, isAnnotationTag, isConnectorVendorVisible, isDriveSyncVendor, isEntityTag, isFlatKind, isLabelTag, isMailboxSyncVendor, isNearAiUsageBudget, isPresenceTag, isSharePointVendor, isSharedSkill, isTraceItem, mail_exports as mail, mcpTools, mergeAgentSteps, model_connections_exports as modelConnections, notifications_exports as notifications, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, parseStructuredResponse, performPasswordLogin, pickMainThread, profile_exports as profile, progressFetch, projects_exports as projects, quotaExceededFrom, quotaFromStreamError, reduceOutputItem, refusalReason, requireData, requireOk, resolveAuth, resolveCitations, resolveSummary, resolveWorkspace, responses_exports as responses, searchChunks, secure_mail_exports as secureMail, selectFullContextDocument, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings, sliceToSubagentThread, streamSSE, stripCitationMarkdown, subagentJobLabel, summarizeCitations, tagUseCount, tags_exports as tags, tagsForScope, tagsOfGroup, topLevelAgentSteps, usdToGbp, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaceConflictOf, workspaces_exports as workspaces, wouldCreateTagCycle };
|
|
13883
14032
|
//# sourceMappingURL=browser.js.map
|
|
13884
14033
|
//# sourceMappingURL=browser.js.map
|