@arbidocs/sdk 0.5.69 → 0.5.70
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 +163 -15
- 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 +164 -17
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +163 -15
- 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 +164 -17
- 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, bytesToBase64, sealSecureMail, decodeSecureMailKey, openSecureMail, secureMailClaim, 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,130 @@ 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
|
+
var MAX_MESSAGE_BYTES = 25 * 1024 * 1024;
|
|
6019
|
+
var utf8 = new TextEncoder();
|
|
6020
|
+
var encodedWord = (value) => `=?UTF-8?B?${bytesToBase64(utf8.encode(value))}?=`;
|
|
6021
|
+
var folded = (value) => value.match(/.{1,76}/g)?.join("\r\n") ?? "";
|
|
6022
|
+
var safeHeader = (value) => {
|
|
6023
|
+
if (/[\r\n\0]/.test(value)) throw new Error("Email headers cannot contain newlines");
|
|
6024
|
+
return value;
|
|
6025
|
+
};
|
|
6026
|
+
function secureMime(compose, sender) {
|
|
6027
|
+
const address = (r2) => `${r2.name ? encodedWord(safeHeader(r2.name)) + " " : ""}<${safeHeader(r2.email)}>`;
|
|
6028
|
+
const boundary = "arbi-" + crypto.randomUUID();
|
|
6029
|
+
const headers = [
|
|
6030
|
+
`From: ${address({ email: sender.email, name: sender.display_name })}`,
|
|
6031
|
+
...compose.to.length ? [`To: ${compose.to.map(address).join(", ")}`] : [],
|
|
6032
|
+
...compose.cc.length ? [`Cc: ${compose.cc.map(address).join(", ")}`] : [],
|
|
6033
|
+
`Subject: ${encodedWord(safeHeader(compose.subject))}`,
|
|
6034
|
+
`Date: ${(/* @__PURE__ */ new Date()).toUTCString()}`,
|
|
6035
|
+
`Message-ID: <${crypto.randomUUID()}@${sender.email.split("@")[1]}>`,
|
|
6036
|
+
...compose.in_reply_to ? [`In-Reply-To: ${safeHeader(compose.in_reply_to)}`] : [],
|
|
6037
|
+
...compose.references?.length ? [`References: ${compose.references.map(safeHeader).join(" ")}`] : [],
|
|
6038
|
+
"MIME-Version: 1.0",
|
|
6039
|
+
"X-ARBI-Secure-Delivery: 1",
|
|
6040
|
+
`Content-Type: multipart/mixed; boundary="${boundary}"`
|
|
6041
|
+
];
|
|
6042
|
+
const alternative = "alternative-" + crypto.randomUUID();
|
|
6043
|
+
const plainPart = `Content-Type: text/plain; charset="utf-8"\r
|
|
6044
|
+
Content-Transfer-Encoding: base64\r
|
|
6045
|
+
\r
|
|
6046
|
+
${folded(bytesToBase64(utf8.encode(compose.text)))}`;
|
|
6047
|
+
const bodyPart = compose.html ? `Content-Type: multipart/alternative; boundary="${alternative}"\r
|
|
6048
|
+
\r
|
|
6049
|
+
--${alternative}\r
|
|
6050
|
+
${plainPart}\r
|
|
6051
|
+
--${alternative}\r
|
|
6052
|
+
Content-Type: text/html; charset="utf-8"\r
|
|
6053
|
+
Content-Transfer-Encoding: base64\r
|
|
6054
|
+
\r
|
|
6055
|
+
${folded(bytesToBase64(utf8.encode(compose.html)))}\r
|
|
6056
|
+
--${alternative}--\r
|
|
6057
|
+
` : plainPart;
|
|
6058
|
+
const parts = [
|
|
6059
|
+
`--${boundary}\r
|
|
6060
|
+
${bodyPart}`,
|
|
6061
|
+
...compose.attachments.map((a2) => {
|
|
6062
|
+
if (!a2.content_base64) throw new Error("Attachment content is missing");
|
|
6063
|
+
const name = encodeURIComponent(safeHeader(a2.name)).replace(/'/g, "%27");
|
|
6064
|
+
return `--${boundary}\r
|
|
6065
|
+
Content-Type: ${safeHeader(a2.content_type || "application/octet-stream")}\r
|
|
6066
|
+
Content-Disposition: attachment; filename*=UTF-8''${name}\r
|
|
6067
|
+
Content-Transfer-Encoding: base64\r
|
|
6068
|
+
\r
|
|
6069
|
+
${folded(a2.content_base64)}`;
|
|
6070
|
+
}),
|
|
6071
|
+
`--${boundary}--\r
|
|
6072
|
+
`
|
|
6073
|
+
];
|
|
6074
|
+
return utf8.encode(headers.join("\r\n") + "\r\n\r\n" + parts.join("\r\n"));
|
|
6075
|
+
}
|
|
6076
|
+
async function prepareSecureMail(compose, sender, { requestId, senderPublicKey, frontendOrigin }) {
|
|
6077
|
+
const raw = secureMime(compose, sender);
|
|
6078
|
+
try {
|
|
6079
|
+
if (raw.length > MAX_MESSAGE_BYTES) throw new Error("Email exceeds the message size limit");
|
|
6080
|
+
const metadata = {
|
|
6081
|
+
secure_delivery: true,
|
|
6082
|
+
id: "",
|
|
6083
|
+
subject: compose.subject,
|
|
6084
|
+
sender: [{ email: sender.email, name: sender.display_name }],
|
|
6085
|
+
to: compose.to,
|
|
6086
|
+
cc: compose.cc,
|
|
6087
|
+
bcc: [],
|
|
6088
|
+
received_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6089
|
+
preview: compose.text.slice(0, 220),
|
|
6090
|
+
unread: false,
|
|
6091
|
+
text: "",
|
|
6092
|
+
references: compose.references ?? [],
|
|
6093
|
+
attachments: compose.attachments.map((a2, i2) => ({
|
|
6094
|
+
...a2,
|
|
6095
|
+
id: String(i2),
|
|
6096
|
+
content_base64: null
|
|
6097
|
+
}))
|
|
6098
|
+
};
|
|
6099
|
+
const recipients = [
|
|
6100
|
+
...new Set([...compose.to, ...compose.cc, ...compose.bcc].map((r2) => r2.email.toLowerCase()))
|
|
6101
|
+
];
|
|
6102
|
+
const sealed = await sealSecureMail(raw, metadata, senderPublicKey);
|
|
6103
|
+
return {
|
|
6104
|
+
request_id: requestId,
|
|
6105
|
+
draft_id: compose.draft_id,
|
|
6106
|
+
recipients: recipients.map((email) => ({
|
|
6107
|
+
id: crypto.randomUUID(),
|
|
6108
|
+
email,
|
|
6109
|
+
fragment_key: sealed.fragment_key
|
|
6110
|
+
})),
|
|
6111
|
+
ciphertext: sealed.ciphertext,
|
|
6112
|
+
metadata_ciphertext: sealed.metadata_ciphertext,
|
|
6113
|
+
sender_wrapped_key: sealed.sender_wrapped_key,
|
|
6114
|
+
frontend_origin: frontendOrigin
|
|
6115
|
+
};
|
|
6116
|
+
} finally {
|
|
6117
|
+
raw.fill(0);
|
|
6118
|
+
}
|
|
6119
|
+
}
|
|
6120
|
+
async function claimSecureMail(mail, id, fragmentKey, recipientPublicKey) {
|
|
6121
|
+
const key = decodeSecureMailKey(fragmentKey);
|
|
6122
|
+
try {
|
|
6123
|
+
const path2 = `/secure/${encodeURIComponent(id)}`;
|
|
6124
|
+
const response = await mail(path2);
|
|
6125
|
+
const { raw } = await openSecureMail(await response.json(), key);
|
|
6126
|
+
raw.fill(0);
|
|
6127
|
+
const claim = await secureMailClaim(key, recipientPublicKey);
|
|
6128
|
+
const claimed = await mail(`${path2}/claim`, { method: "POST", body: JSON.stringify(claim) });
|
|
6129
|
+
return await claimed.json();
|
|
6130
|
+
} finally {
|
|
6131
|
+
key.fill(0);
|
|
6132
|
+
}
|
|
6133
|
+
}
|
|
6134
|
+
|
|
6011
6135
|
// src/operations/workspaces.ts
|
|
6012
6136
|
var workspaces_exports = {};
|
|
6013
6137
|
__export(workspaces_exports, {
|
|
@@ -9645,7 +9769,6 @@ __export(mail_exports, {
|
|
|
9645
9769
|
NATIVE_ACCOUNT: () => NATIVE_ACCOUNT,
|
|
9646
9770
|
attachmentFromBytes: () => attachmentFromBytes,
|
|
9647
9771
|
claimNativeAlias: () => claimNativeAlias,
|
|
9648
|
-
claimSecureMail: () => claimSecureMail,
|
|
9649
9772
|
createMailFetch: () => createMailFetch,
|
|
9650
9773
|
downloadAttachment: () => downloadAttachment,
|
|
9651
9774
|
getMailPolicy: () => getMailPolicy,
|
|
@@ -9751,28 +9874,16 @@ async function unlockNativeMail(mail, keys) {
|
|
|
9751
9874
|
secretKey.fill(0);
|
|
9752
9875
|
}
|
|
9753
9876
|
}
|
|
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
9877
|
function attachmentFromBytes(name, contentType, bytes) {
|
|
9767
9878
|
return {
|
|
9768
9879
|
id: "",
|
|
9769
9880
|
name,
|
|
9770
9881
|
content_type: contentType,
|
|
9771
9882
|
size: bytes.length,
|
|
9772
|
-
content_base64:
|
|
9883
|
+
content_base64: bytesToBase644(bytes)
|
|
9773
9884
|
};
|
|
9774
9885
|
}
|
|
9775
|
-
function
|
|
9886
|
+
function bytesToBase644(bytes) {
|
|
9776
9887
|
let binary = "";
|
|
9777
9888
|
for (let i2 = 0; i2 < bytes.length; i2 += 32768) {
|
|
9778
9889
|
binary += String.fromCharCode(...bytes.subarray(i2, i2 + 32768));
|
|
@@ -12057,6 +12168,42 @@ var Arbi = class {
|
|
|
12057
12168
|
});
|
|
12058
12169
|
}
|
|
12059
12170
|
};
|
|
12171
|
+
// ── Secure mail ─────────────────────────────────────────────────────
|
|
12172
|
+
/**
|
|
12173
|
+
* Mail to anyone, sealed in this browser under a key that travels only in the link's fragment
|
|
12174
|
+
* (see `operations/secure-mail`). Both sides use the signed-in user's encryption key: the
|
|
12175
|
+
* login's, or (a new tab not signed in to the server yet) the one kept on this device.
|
|
12176
|
+
*/
|
|
12177
|
+
secureMail = {
|
|
12178
|
+
/**
|
|
12179
|
+
* The `/secure/send` payload for `compose` from `account`, shown with the user's own name.
|
|
12180
|
+
* Links open on `frontendOrigin` (default: this page's origin).
|
|
12181
|
+
*/
|
|
12182
|
+
prepare: async (compose, account, requestId, frontendOrigin = globalThis.location?.origin ?? "") => {
|
|
12183
|
+
const user = this.client?.session.getState().user;
|
|
12184
|
+
const name = user ? [user.given_name, user.family_name] : [this.userProfile?.givenName, this.userProfile?.familyName];
|
|
12185
|
+
const senderName = name.filter(Boolean).join(" ");
|
|
12186
|
+
return prepareSecureMail(
|
|
12187
|
+
compose,
|
|
12188
|
+
{ ...account, display_name: senderName || account.display_name },
|
|
12189
|
+
{ requestId, senderPublicKey: await this.encryptionPublicKey(), frontendOrigin }
|
|
12190
|
+
);
|
|
12191
|
+
},
|
|
12192
|
+
/**
|
|
12193
|
+
* Claim the secure message `id` with the key from its link into the user's native inbox, over
|
|
12194
|
+
* `mail` (default: this session's mail transport). Resolves to the message's id there.
|
|
12195
|
+
*/
|
|
12196
|
+
claim: async (id, fragmentKey, mail = this.mail.fetch) => claimSecureMail(mail, id, fragmentKey, await this.encryptionPublicKey())
|
|
12197
|
+
};
|
|
12198
|
+
/** The signed-in user's X25519 public key (from the identity key; its secret half is wiped). */
|
|
12199
|
+
async encryptionPublicKey() {
|
|
12200
|
+
const signingKey = this.loginResult?.signingPrivateKey ?? (await this.client?.storage.getSession().catch(() => null))?.signingPrivateKey;
|
|
12201
|
+
if (!signingKey) throw new ArbiError("Sign in again to unlock your encryption key");
|
|
12202
|
+
await initSodium();
|
|
12203
|
+
const pair = encryptionKeypairFromSigningKey(signingKey);
|
|
12204
|
+
pair.secretKey.fill(0);
|
|
12205
|
+
return pair.publicKey;
|
|
12206
|
+
}
|
|
12060
12207
|
async openResponseHandle(open, options, id, bufferEvents = false) {
|
|
12061
12208
|
const controller = new AbortController();
|
|
12062
12209
|
const abort = () => controller.abort();
|
|
@@ -13879,6 +14026,6 @@ function composeTools(base, next, mode) {
|
|
|
13879
14026
|
return structuredClone(mode === "add" ? { ...base, ...next } : next);
|
|
13880
14027
|
}
|
|
13881
14028
|
|
|
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 };
|
|
14029
|
+
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
14030
|
//# sourceMappingURL=browser.js.map
|
|
13884
14031
|
//# sourceMappingURL=browser.js.map
|