@arbidocs/react 0.5.97 → 0.5.98

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.
Files changed (50) hide show
  1. package/README.md +6 -1
  2. package/dist/artifacts/index.cjs +13 -13
  3. package/dist/artifacts/index.js +3 -3
  4. package/dist/calls/livekit/index.cjs +48 -48
  5. package/dist/calls/livekit/index.js +3 -3
  6. package/dist/{chunk-IIOOXKOB.js → chunk-4SH5INC3.js} +4 -4
  7. package/dist/{chunk-IIOOXKOB.js.map → chunk-4SH5INC3.js.map} +1 -1
  8. package/dist/{chunk-NJDVQIJR.cjs → chunk-5EELSW26.cjs} +4 -4
  9. package/dist/{chunk-NJDVQIJR.cjs.map → chunk-5EELSW26.cjs.map} +1 -1
  10. package/dist/{chunk-HGLS3IC6.js → chunk-5X3JANHT.js} +3 -3
  11. package/dist/{chunk-HGLS3IC6.js.map → chunk-5X3JANHT.js.map} +1 -1
  12. package/dist/{chunk-7PMNITKA.js → chunk-6SG2OGDR.js} +11 -2
  13. package/dist/chunk-6SG2OGDR.js.map +1 -0
  14. package/dist/{chunk-5RRWRTY3.js → chunk-ALT6ETIE.js} +39 -6
  15. package/dist/chunk-ALT6ETIE.js.map +1 -0
  16. package/dist/{chunk-BRFRQWAY.cjs → chunk-HAGC67GL.cjs} +11 -2
  17. package/dist/chunk-HAGC67GL.cjs.map +1 -0
  18. package/dist/{chunk-6BXRZYL2.cjs → chunk-ORBUPHMV.cjs} +38 -38
  19. package/dist/{chunk-6BXRZYL2.cjs.map → chunk-ORBUPHMV.cjs.map} +1 -1
  20. package/dist/{chunk-7RUVJZZG.cjs → chunk-Q65QCWNI.cjs} +57 -57
  21. package/dist/{chunk-7RUVJZZG.cjs.map → chunk-Q65QCWNI.cjs.map} +1 -1
  22. package/dist/{chunk-NR6PUE5O.cjs → chunk-VIOW22Q4.cjs} +44 -44
  23. package/dist/{chunk-NR6PUE5O.cjs.map → chunk-VIOW22Q4.cjs.map} +1 -1
  24. package/dist/{chunk-CSYZ3YI4.cjs → chunk-WJME7DI4.cjs} +99 -65
  25. package/dist/chunk-WJME7DI4.cjs.map +1 -0
  26. package/dist/{chunk-KZBYWXPS.js → chunk-YIZH5RVW.js} +3 -3
  27. package/dist/{chunk-KZBYWXPS.js.map → chunk-YIZH5RVW.js.map} +1 -1
  28. package/dist/{chunk-N3SFVZ7H.js → chunk-ZEGCZATR.js} +3 -3
  29. package/dist/{chunk-N3SFVZ7H.js.map → chunk-ZEGCZATR.js.map} +1 -1
  30. package/dist/document-tools/core.cjs +98 -98
  31. package/dist/document-tools/core.d.cts +2 -2
  32. package/dist/document-tools/core.d.ts +2 -2
  33. package/dist/document-tools/core.js +3 -3
  34. package/dist/document-tools/index.cjs +100 -100
  35. package/dist/document-tools/index.d.cts +1 -1
  36. package/dist/document-tools/index.d.ts +1 -1
  37. package/dist/document-tools/index.js +4 -4
  38. package/dist/index.cjs +1693 -1320
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.d.cts +221 -9
  41. package/dist/index.d.ts +221 -9
  42. package/dist/index.js +406 -50
  43. package/dist/index.js.map +1 -1
  44. package/dist/{query-keys.d-D6SAUl7S.d.ts → query-keys.d-O3lHn6rp.d.cts} +9 -0
  45. package/dist/{query-keys.d-D6SAUl7S.d.cts → query-keys.d-O3lHn6rp.d.ts} +9 -0
  46. package/package.json +3 -3
  47. package/dist/chunk-5RRWRTY3.js.map +0 -1
  48. package/dist/chunk-7PMNITKA.js.map +0 -1
  49. package/dist/chunk-BRFRQWAY.cjs.map +0 -1
  50. package/dist/chunk-CSYZ3YI4.cjs.map +0 -1
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { AudioViewer, ImageViewer, VideoViewer } from './chunk-HDCRPPBW.js';
2
- import { createRecordStore, useUserSettings, patchConversation, invalidateConversationDetails, removeConversationFromLists, addConversationToList, findConversation, isConversationShared, patchConversationList, invalidateConversationLists, getRecord, openBytes, touchRecord, notifyOfflineMailChange, putRecord, sealJson, blind, deleteRecords, useFeature, useAccountClient, useUpdateUserSettings, useIsEntitled, claimOfflineMail, onOfflineMailChange, getOfflineMailSettings, setOfflineMailSettings, myChatId, upsertChat, appendToThread, dropFromThread, deleteChatMessage, removeChat, getOpenChat, cachedChat, inOfflineWindow, recordsInBucket, openJson, offlineWindowStart, recordsOfKind, SCOPE_DAYS, allRecordSizes, setMeta, OFFLINE_MAIL_DB, applyChatEvent, applyCallEvent, getMeta, hasRecord, sealBytes } from './chunk-5RRWRTY3.js';
3
- export { AUDIENCE_CHOICES, CALL_CAPTION_TOPIC, CALL_CHAT_MAX_CHARS, CALL_CHAT_TOPIC, CALL_MODERATION_TOPIC, CALL_RECORDING_TOPIC, CALL_TRANSCRIPTION_TOPIC, CALL_WEBINAR_TOPIC, CAPTION_MAX_CHARS, COMPOSITE_AUDIO_BITS_PER_SECOND, COMPOSITE_VIDEO_BITS_PER_SECOND, DEFAULT_JOIN_CHOICES, EMPTY_CALL_SESSION, EXPORT_SAMPLE_RATE, HISTORY_LIMIT, LIVE_SEGMENTER, MAX_AVATAR_FILE_BYTES, MUTED_DEDUPE_MS, PLAYBACK_LOOKAHEAD_MS, READ_ONLY_MEETING_TEXT, RECORDING_CHUNK_MS, RECORDING_SEGMENTER, SEGMENT_FRAME_MS, SEGMENT_ID_PATTERN, SEGMENT_PRE_ROLL_MS, SHORT_PIECE_MERGE_GAP_MS, SPEAKER_AUDIO_BITS_PER_SECOND, TrackUploader, UPLOAD_ATTEMPTS, UPLOAD_BACKOFF_MS, acceptRing, addConversationToList, appendToThread, applyAgentDmStatus, applyCallEvent, applyChatEvent, applyChatMessage, applyChatRead, applyChatUpdated, arbiAccountClient, buildMeetingChatBody, cachedChat, cachedChats, callLink, callMemberKeys, callSession, chatByExtId, chatHasLiveCall, chatLiveCallId, chatTranscriptRef, clearMeetingChatCache, clearTrackUploaders, clockTime, compositeFiles, compositeTrack, conversationKeyForCall, createLocalFeatureStore, createMutedNotifier, createTrackCutter, cutAtPauses, declineRing, decodeCallChatPacket, decodeCaptionPacket, decodeMono16k, decryptPart, encodeCallChatPacket, encodeCaptionPacket, encodeWav, encryptPart, ensureMeetingChat, entitlementRefusal, extensionFor, fetchPart, fileSafe, findConversation, floatToWav, formatTranscriptMarkdown, getOpenChat, hasRecordingTranscript, invalidateCall, invalidateConversationDetails, invalidateConversationLists, isConversationListKey, isConversationShared, isRecordingOver, isRecordingSegmentId, isRetryable, isWorkspaceGuestOf, joinFromPreJoin, knownMeetingChat, loadMeetingHistory, markRejoining, meetingChatRefFrom, meetingRefForCall, mergeChatLines, mutedNoticeFromEvent, mutedNoticeFromPacket, mutedNoticeText, myChatId, newPacketId, newSegmentId, newTrackKey, nextSeqAfter, onCallEvent, openCall, openQuestion, openRecording, parseWebinarPacket, partKey, partOffsetMs, partsDue, patchConversation, patchConversationList, persistMeetingMessage, persistTranscriptSegment, playheadAt, postRecordingDocsToThread, postTranscriptToThread, readLocalFeature, recordingFiles, recordingWindowsOf, rejoinAsAudience, removeChat, removeConversationFromLists, resetCallSession, resolveMeetingChat, saveRecordingFilesToThread, schedulePart, sealQuestionText, serverCallsExperimental, setOpenChat, sortTranscriptMessages, sortedParts, speakerTracks, speakerWav, splitIntoFiles, standalone, startChatCall, startContactsCall, startDmCall, startThreadCall, startsMediaFile, storeTranscriptSegment, stripSpeakerPrefix, supersedeLiveTranscript, supersededTranscriptLines, threadHasLiveCall, threadLiveCallId, threadTranscriptLines, threadTranscriptRef, threadTranscriptText, timelineDurationMs, timelineOf, toProfileView, trackUploaderFor, transcribeRecording, transcriptPersistRole, transcriptSegmentOf, unwrapTrackKey, upsertChat, useAccountClient, useAvatarCrop, useCall, useCallInviteLinks, useCallRecording, useCallRecordings, useCallSession, useCallTranscriptionAvailable, useCallsConfig, useCallsEnabled, useCanHostCalls, useEntitlements, useFeature, useFeatureSwitch, useInvalidateEntitlements, useIsEntitled, useMeetingReadOnly, useNameEditor, useOpenCallMeetingChat, useProfile, useRecordingActions, useRecordingWindows, useRevokeCallInviteLink, useSaveToThread, useServerCallsEnabled, useServerCallsExperimental, useUpdateProfile, useUpdateUserSettings, useUserSettings, wipeOfflineMail, wrapTrackKey, writeSamples } from './chunk-5RRWRTY3.js';
4
- import { replayableTagMutations, inWorkspace, primeOnClient, patchDocuments, setCachedDocument, adjustTagCounts, patchCachedDocument, FINISHED_DOCUMENT_STATUSES, refreshDocuments, getCachedDocuments, useArbiWsStore, IN_FLIGHT_DOCUMENT_STATUSES, useCapturingWorkspace, QUEUED_WRITE_RETRY, isWorkspaceUnavailable, primeOnArbi, forgetDocuments, useDocument, useSimilarDocuments, SIMILARITY_THRESHOLD, QUEUED_WRITE_BLOCKED_MESSAGE, isBlockedOnWorkspace, useDocuments, finishEntityExtraction } from './chunk-KZBYWXPS.js';
5
- export { DISMISSED_TASK_TTL_MS, DOCUMENTS_FIRST_PAGE_MEASURE, DOCUMENTS_FIRST_PAGE_SIZE, DOCUMENTS_PAGE_SIZE, FINISHED_DOCUMENT_STATUSES, IN_FLIGHT_DOCUMENT_STATUSES, SIMILARITY_THRESHOLD, adjustTagCounts, dropTagFromCachedDocuments, finishEntityExtraction, forgetDocuments, getCachedDocuments, invalidateTagData, invalidateTagTables, isDocumentsLoading, isRowNewer, isStaleTaskUpdate, patchCachedDocument, patchDocuments, patchWorkspaceTags, refreshDocuments, resolveDocumentStatus, setCachedDocument, settledByRows, startEntityExtraction, stopDocumentsLoading, subscribeDocumentRows, upsertDocuments, useArbiWsStore, useCreateTag, useDeleteTag, useDocument, useDocuments, useDocumentsLoading, useEntityExtractionDocIds, useExtractEntities, useInvalidateTagData, useIsCreatingTag, useRefreshDocuments, useSetTagValues, useSimilarDocuments, useTagKindSchema, useUpdateTag, useUpdateTagKindSchema } from './chunk-KZBYWXPS.js';
6
- import { useArbiSessionState, useArbiSession, useWorkspaces, useConversations, useConfig, useArbiSessionStore, useAvailableModels, useParsedDocument, useTags, selectDraft, useConversationThreads, createArbiSessionStore, useTransientView, useProjects, useAgents, useAssistantQuery, useActivity, queuedMessages, MIN_QUEUED_MESSAGE_VISIBILITY_MS } from './chunk-N3SFVZ7H.js';
7
- export { DEFAULT_DOCUMENT_VIEWER_STATE, DOCUMENT_VIEWER_PANEL, EMPTY_CHAT_STATE, EMPTY_DOCUMENT_STATE, EMPTY_SESSION_STATE, MAX_THREAD_TABS, MIN_QUEUED_MESSAGE_VISIBILITY_MS, PROJECT_CREATION_DENIED_REASON, WORKSPACE_LAST_OPENED_KEY, WORKSPACE_STORAGE_KEY, agentControl, browserWorkspaceStorage, clearSealedDrafts, closePanelIn, composeArbiSessionStore, conversationKey, createArbiChatStore, createArbiDocumentSessionStore, createArbiLayoutStore, createArbiSessionStore, createArbiWorkspaceStore, createDebouncedWriter, createSealedDraftStorage, createStoragePersist, createUiStateStorage, defaultLayoutState, dmTabId, flushOnPageExit, isPanelOpen, isUsageMetered, layoutActionsOf, nextViewingDocument, openPanelIn, panelPlace, parseSavedChat, parseSavedDocuments, parseSavedLayout, queuedMessages, readWorkspaceLastOpened, restoreLayout, restoreSavedDocuments, savedChatOf, savedDocumentsOf, savedLayoutOf, selectDraft, selectIsGenerating, selectViewingDocumentId, threadTabId, useActivity, useAgents, useArbiSession, useArbiSessionState, useArbiSessionStore, useAssistantQuery, useAvailableModels, useBoxRole, useBuiltinCommands, useCanCreateProjects, useConfig, useConfigs, useConversationThreads, useConversations, useCurrentUser, useDeleteAgents, useDocumentVersionList, useHealth, useMessageDetails, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useSessionPageTab, useSessionView, useSignedInSession, useTags, useThumbnails, useTransientView, useUserUsageToday, useWorkspaceActivity, useWorkspaces } from './chunk-N3SFVZ7H.js';
8
- import { fetchDocumentFile, downloadBlob, fetchMarkupPdf, fetchDocumentPdf } from './chunk-HGLS3IC6.js';
9
- import { arbiMutationKeys, arbiQueryKeys, useArbi, useArbiHost, mailQueryKeys, isUnderQueryKey, connectorQueryKeys, calendarQueryKeys } from './chunk-7PMNITKA.js';
10
- export { arbiMutationKeys, arbiQueryKeys, calendarQueryKeys, callQueryKeys, connectorQueryKeys, isUnderQueryKey, mailQueryKeys, useArbi, useArbiHost, useDeploymentDomain } from './chunk-7PMNITKA.js';
2
+ import { createRecordStore, useUserSettings, patchConversation, invalidateConversationDetails, removeConversationFromLists, addConversationToList, findConversation, isConversationShared, patchConversationList, invalidateConversationLists, getRecord, openBytes, touchRecord, notifyOfflineMailChange, putRecord, sealJson, blind, deleteRecords, useFeature, useAccountClient, useUpdateUserSettings, useIsEntitled, claimOfflineMail, onOfflineMailChange, getOfflineMailSettings, setOfflineMailSettings, myChatId, upsertChat, appendToThread, dropFromThread, deleteChatMessage, removeChat, getOpenChat, cachedChat, inOfflineWindow, recordsInBucket, openJson, offlineWindowStart, recordsOfKind, SCOPE_DAYS, allRecordSizes, setMeta, OFFLINE_MAIL_DB, applyChatEvent, applyCallEvent, getMeta, hasRecord, sealBytes } from './chunk-ALT6ETIE.js';
3
+ export { AUDIENCE_CHOICES, CALL_CAPTION_TOPIC, CALL_CHAT_MAX_CHARS, CALL_CHAT_TOPIC, CALL_MODERATION_TOPIC, CALL_RECORDING_TOPIC, CALL_TRANSCRIPTION_TOPIC, CALL_WEBINAR_TOPIC, CAPTION_MAX_CHARS, COMPOSITE_AUDIO_BITS_PER_SECOND, COMPOSITE_VIDEO_BITS_PER_SECOND, DEFAULT_JOIN_CHOICES, EMPTY_CALL_SESSION, EXPORT_SAMPLE_RATE, HISTORY_LIMIT, LIVE_SEGMENTER, MAX_AVATAR_FILE_BYTES, MUTED_DEDUPE_MS, PLAYBACK_LOOKAHEAD_MS, READ_ONLY_MEETING_TEXT, RECORDING_CHUNK_MS, RECORDING_SEGMENTER, SEGMENT_FRAME_MS, SEGMENT_ID_PATTERN, SEGMENT_PRE_ROLL_MS, SHORT_PIECE_MERGE_GAP_MS, SPEAKER_AUDIO_BITS_PER_SECOND, TrackUploader, UPLOAD_ATTEMPTS, UPLOAD_BACKOFF_MS, acceptRing, addConversationToList, appendToThread, applyAgentDmStatus, applyCallEvent, applyChatEvent, applyChatMessage, applyChatRead, applyChatUpdated, arbiAccountClient, buildMeetingChatBody, cachedChat, cachedChats, callLink, callMemberKeys, callSession, chatByExtId, chatHasLiveCall, chatLiveCallId, chatTranscriptRef, clearMeetingChatCache, clearTrackUploaders, clockTime, compositeFiles, compositeTrack, conversationKeyForCall, createLocalFeatureStore, createMutedNotifier, createTrackCutter, cutAtPauses, declineRing, decodeCallChatPacket, decodeCaptionPacket, decodeMono16k, decryptPart, encodeCallChatPacket, encodeCaptionPacket, encodeWav, encryptPart, ensureMeetingChat, entitlementRefusal, extensionFor, fetchPart, fileSafe, findConversation, floatToWav, formatTranscriptMarkdown, getOpenChat, hasRecordingTranscript, invalidateCall, invalidateConversationDetails, invalidateConversationLists, isConversationListKey, isConversationShared, isRecordingOver, isRecordingSegmentId, isRetryable, isWorkspaceGuestOf, joinFromPreJoin, knownMeetingChat, loadMeetingHistory, markRejoining, meetingChatRefFrom, meetingRefForCall, mergeChatLines, mutedNoticeFromEvent, mutedNoticeFromPacket, mutedNoticeText, myChatId, newPacketId, newSegmentId, newTrackKey, nextSeqAfter, onCallEvent, openCall, openQuestion, openRecording, parseWebinarPacket, partKey, partOffsetMs, partsDue, patchConversation, patchConversationList, persistMeetingMessage, persistTranscriptSegment, playheadAt, postRecordingDocsToThread, postTranscriptToThread, readLocalFeature, recordingFiles, recordingWindowsOf, rejoinAsAudience, removeChat, removeConversationFromLists, resetCallSession, resolveMeetingChat, saveRecordingFilesToThread, schedulePart, sealQuestionText, serverCallsExperimental, setOpenChat, sortTranscriptMessages, sortedParts, speakerTracks, speakerWav, splitIntoFiles, standalone, startChatCall, startContactsCall, startDmCall, startThreadCall, startsMediaFile, storeTranscriptSegment, stripSpeakerPrefix, supersedeLiveTranscript, supersededTranscriptLines, threadHasLiveCall, threadLiveCallId, threadTranscriptLines, threadTranscriptRef, threadTranscriptText, timelineDurationMs, timelineOf, toProfileView, trackUploaderFor, transcribeRecording, transcriptPersistRole, transcriptSegmentOf, unwrapTrackKey, upsertChat, useAccountClient, useAvatarCrop, useCall, useCallInviteLinks, useCallRecording, useCallRecordings, useCallSession, useCallTranscriptionAvailable, useCallsConfig, useCallsEnabled, useCanHostCalls, useEntitlements, useFeature, useFeatureCheck, useFeatureSwitch, useInvalidateEntitlements, useIsEntitled, useMeetingReadOnly, useNameEditor, useOpenCallMeetingChat, useProfile, useRecordingActions, useRecordingWindows, useRevokeCallInviteLink, useSaveToThread, useServerCallsEnabled, useServerCallsExperimental, useUpdateProfile, useUpdateUserSettings, useUserSettings, wipeOfflineMail, wrapTrackKey, writeSamples } from './chunk-ALT6ETIE.js';
4
+ import { replayableTagMutations, inWorkspace, primeOnClient, patchDocuments, setCachedDocument, adjustTagCounts, patchCachedDocument, FINISHED_DOCUMENT_STATUSES, refreshDocuments, getCachedDocuments, useArbiWsStore, IN_FLIGHT_DOCUMENT_STATUSES, useCapturingWorkspace, QUEUED_WRITE_RETRY, isWorkspaceUnavailable, primeOnArbi, forgetDocuments, useDocument, useSimilarDocuments, SIMILARITY_THRESHOLD, QUEUED_WRITE_BLOCKED_MESSAGE, isBlockedOnWorkspace, useDocuments, finishEntityExtraction } from './chunk-YIZH5RVW.js';
5
+ export { DISMISSED_TASK_TTL_MS, DOCUMENTS_FIRST_PAGE_MEASURE, DOCUMENTS_FIRST_PAGE_SIZE, DOCUMENTS_PAGE_SIZE, FINISHED_DOCUMENT_STATUSES, IN_FLIGHT_DOCUMENT_STATUSES, SIMILARITY_THRESHOLD, adjustTagCounts, dropTagFromCachedDocuments, finishEntityExtraction, forgetDocuments, getCachedDocuments, invalidateTagData, invalidateTagTables, isDocumentsLoading, isRowNewer, isStaleTaskUpdate, patchCachedDocument, patchDocuments, patchWorkspaceTags, refreshDocuments, resolveDocumentStatus, setCachedDocument, settledByRows, startEntityExtraction, stopDocumentsLoading, subscribeDocumentRows, upsertDocuments, useArbiWsStore, useCreateTag, useDeleteTag, useDocument, useDocuments, useDocumentsLoading, useEntityExtractionDocIds, useExtractEntities, useInvalidateTagData, useIsCreatingTag, useRefreshDocuments, useSetTagValues, useSimilarDocuments, useTagKindSchema, useUpdateTag, useUpdateTagKindSchema } from './chunk-YIZH5RVW.js';
6
+ import { useArbiSessionState, useArbiSession, useWorkspaces, useConversations, useConfig, useArbiSessionStore, useAvailableModels, useParsedDocument, useTags, selectDraft, useConversationThreads, createArbiSessionStore, useTransientView, useProjects, useAgents, useAssistantQuery, useActivity, queuedMessages, MIN_QUEUED_MESSAGE_VISIBILITY_MS } from './chunk-ZEGCZATR.js';
7
+ export { DEFAULT_DOCUMENT_VIEWER_STATE, DOCUMENT_VIEWER_PANEL, EMPTY_CHAT_STATE, EMPTY_DOCUMENT_STATE, EMPTY_SESSION_STATE, MAX_THREAD_TABS, MIN_QUEUED_MESSAGE_VISIBILITY_MS, PROJECT_CREATION_DENIED_REASON, WORKSPACE_LAST_OPENED_KEY, WORKSPACE_STORAGE_KEY, agentControl, browserWorkspaceStorage, clearSealedDrafts, closePanelIn, composeArbiSessionStore, conversationKey, createArbiChatStore, createArbiDocumentSessionStore, createArbiLayoutStore, createArbiSessionStore, createArbiWorkspaceStore, createDebouncedWriter, createSealedDraftStorage, createStoragePersist, createUiStateStorage, defaultLayoutState, dmTabId, flushOnPageExit, isPanelOpen, isUsageMetered, layoutActionsOf, nextViewingDocument, openPanelIn, panelPlace, parseSavedChat, parseSavedDocuments, parseSavedLayout, queuedMessages, readWorkspaceLastOpened, restoreLayout, restoreSavedDocuments, savedChatOf, savedDocumentsOf, savedLayoutOf, selectDraft, selectIsGenerating, selectViewingDocumentId, threadTabId, useActivity, useAgents, useArbiSession, useArbiSessionState, useArbiSessionStore, useAssistantQuery, useAvailableModels, useBoxRole, useBuiltinCommands, useCanCreateProjects, useConfig, useConfigs, useConversationThreads, useConversations, useCurrentUser, useDeleteAgents, useDocumentVersionList, useHealth, useMessageDetails, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useSessionPageTab, useSessionView, useSignedInSession, useTags, useThumbnails, useTransientView, useUserUsageToday, useWorkspaceActivity, useWorkspaces } from './chunk-ZEGCZATR.js';
8
+ import { fetchDocumentFile, downloadBlob, fetchMarkupPdf, fetchDocumentPdf } from './chunk-5X3JANHT.js';
9
+ import { arbiMutationKeys, arbiQueryKeys, useArbi, useArbiHost, mailQueryKeys, isUnderQueryKey, connectorQueryKeys, calendarQueryKeys } from './chunk-6SG2OGDR.js';
10
+ export { arbiMutationKeys, arbiQueryKeys, calendarQueryKeys, callQueryKeys, connectorQueryKeys, isUnderQueryKey, mailQueryKeys, useArbi, useArbiHost, useDeploymentDomain } from './chunk-6SG2OGDR.js';
11
11
  import { ArbiHost, linkMentions, extractMentions, UNBOUND, bindingOfRow, readLegacyThreadDocuments, forgetLegacyThreadDocuments, toMessageMentions, takeDocumentForTurn, hasMessageBody, createSearchSession, clearSearchSession } from './chunk-MS43RNXM.js';
12
12
  export { LEGACY_THREAD_DOCUMENTS_KEY, MENTION_HREF_PREFIX, NotificationBell, Toaster, UNBOUND, bindingOfRow, clearSearchSession, createSearchSession, extractMentions, filterMentionCandidates, findMentionQuery, forgetLegacyThreadDocuments, hasMessageBody, insertMention, latestThreadOfDocument, linkMentions, mentionFromHref, openDocumentId, opensInWord, persistSearchSession, readLegacyThreadDocuments, requestSearch, savedDocumentIdFor, sharedSearchSession, takeDocumentForTurn, takePendingSearch, toMessageMentions, useOpenDocumentId, useRegisterOpenDocument, useTurnDocumentId } from './chunk-MS43RNXM.js';
13
13
  import { notify, recordChatArtifact } from './chunk-BF5KW5ZI.js';
@@ -32,7 +32,7 @@ import { cn } from './chunk-SN5YV6FF.js';
32
32
  export { cn } from './chunk-SN5YV6FF.js';
33
33
  import React, { memo, useState, createContext, useMemo, useCallback, useEffect, useRef, useLayoutEffect, useSyncExternalStore, useContext, useId } from 'react';
34
34
  import { useQuery, useQueryClient, useMutation, onlineManager, partialMatchKey, useMutationState, useQueries, QueryClient, MutationCache } from '@tanstack/react-query';
35
- import { documents, houseTemplates, doctags, STOP_ID_WAIT_MS, resolveCitations, summarizeCitations, createIndexAssigner, reduceOutputItem, findReplyTarget, ArbiApiError, quotaFromStreamError, STOP_REPEAT_WINDOW_MS, getRunToCancel, pickMainThread, extractDocumentIdsFromMessages, extractFactIdsFromMessages, hydrateAgentSteps, getSubagentBranchRecord, getRunToAttach, settings, isConnectorVendorVisible, ACCOUNT_VENDOR, searchChunks, formatFileSize, chats, connectWithReconnect, ArbiWorkspaceSupersededError, identityErrorCode } from '@arbidocs/sdk/browser';
35
+ import { documents, houseTemplates, doctags, STOP_ID_WAIT_MS, resolveCitations, summarizeCitations, createIndexAssigner, reduceOutputItem, findReplyTarget, ArbiApiError, quotaFromStreamError, STOP_REPEAT_WINDOW_MS, getRunToCancel, pickMainThread, extractDocumentIdsFromMessages, extractFactIdsFromMessages, hydrateAgentSteps, getSubagentBranchRecord, getRunToAttach, settings, mail, isConnectorVendorVisible, ACCOUNT_VENDOR, searchChunks, formatFileSize, chats, connectWithReconnect, ArbiWorkspaceSupersededError, identityErrorCode } from '@arbidocs/sdk/browser';
36
36
  export { ACCOUNT_VENDOR, Arbi, ArbiError, DEFAULT_AI_USD_PER_GBP, DRIVE_SYNC_VENDORS, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MAX_RETRIEVE_DOC_IDS, MICROSOFT_VENDORS, PublicBookingError, SHAREPOINT_VENDORS, bookPublicSlot, cancelPublicBooking, connectErrorMessage, formatGbp, formatGbpPerMillionTokens, getPublicBookingPage, isConnectorVendorVisible, isDriveSyncVendor, isMailboxSyncVendor, isSharePointVendor, usdToGbp } from '@arbidocs/sdk/browser';
37
37
  import { Link, Trash2, CheckCheck, Check, X, Mic, Pause, Play, Square, Loader2, RotateCcw, Sparkles, Camera, Circle, AlertTriangle, ShieldCheck, Copy, FileText, GitCompareArrows, Download, Info, Activity, HardDrive, Gauge, Gift, PartyPopper, UserPlus, UserCheck, Reply, PenLine, AtSign, MessageCircleMore, FileX2, FileCheck2, Pencil, FolderPlus, SquareArrowOutUpRight, Paperclip, Send, CornerDownLeft, ArrowRight, Image as Image$1, AppWindow } from 'lucide-react';
38
38
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1419,7 +1419,7 @@ function useSaveConfigField(baseConfigId) {
1419
1419
  });
1420
1420
  const saveOnBase = (base, changes, title) => {
1421
1421
  const current = chain2.current?.ids.has(base) ? chain2.current : null;
1422
- const ids = current?.ids ?? /* @__PURE__ */ new Set([base]);
1422
+ const ids2 = current?.ids ?? /* @__PURE__ */ new Set([base]);
1423
1423
  const from = current?.latest ?? Promise.resolve(base);
1424
1424
  const saved = from.then(async (configId) => {
1425
1425
  const [defaults, active] = await Promise.all([
@@ -1436,17 +1436,17 @@ function useSaveConfigField(baseConfigId) {
1436
1436
  title
1437
1437
  });
1438
1438
  if (response?.external_id) {
1439
- ids.add(response.external_id);
1439
+ ids2.add(response.external_id);
1440
1440
  const { chatModel: chatModel2 } = session.getState();
1441
1441
  const followsSettings = !chatModel2 && base === userSettings?.last_config;
1442
- if (chain2.current?.ids === ids && !followsSettings) {
1442
+ if (chain2.current?.ids === ids2 && !followsSettings) {
1443
1443
  session.setChatModel(response.external_id);
1444
1444
  }
1445
1445
  }
1446
1446
  return { response, configId: response?.external_id ?? configId };
1447
1447
  });
1448
1448
  chain2.current = {
1449
- ids,
1449
+ ids: ids2,
1450
1450
  latest: Promise.all([from, saved]).then(
1451
1451
  ([, done]) => done.configId,
1452
1452
  () => from
@@ -1734,10 +1734,10 @@ function useWorkspaceProcessing(workspaceId) {
1734
1734
  (rows) => useArbiWsStore.getState().settleTasks(rows)
1735
1735
  );
1736
1736
  const recheck = async () => {
1737
- const ids = Object.values(useArbiWsStore.getState().tasks).filter(
1737
+ const ids2 = Object.values(useArbiWsStore.getState().tasks).filter(
1738
1738
  (t) => t.workspace_ext_id === workspaceId && IN_FLIGHT_DOCUMENT_STATUSES.has(t.status)
1739
1739
  ).map((t) => t.doc_ext_id);
1740
- if (ids.length) await refreshDocuments(queryClient, arbi, ids);
1740
+ if (ids2.length) await refreshDocuments(queryClient, arbi, ids2);
1741
1741
  };
1742
1742
  let wasConnected = useArbiWsStore.getState().status === "connected";
1743
1743
  const unsubscribeStatus = useArbiWsStore.subscribe((state) => {
@@ -1813,12 +1813,12 @@ function settleUpdatedDocuments(qc, updated) {
1813
1813
  for (const doc of updated) setCachedDocument(qc, doc);
1814
1814
  }
1815
1815
  function patchEachDocument(qc, docIds, reducer) {
1816
- const ids = new Set(docIds);
1816
+ const ids2 = new Set(docIds);
1817
1817
  patchDocuments(
1818
1818
  qc,
1819
- (old) => old.some((doc) => ids.has(doc.external_id)) ? old.map((doc) => ids.has(doc.external_id) ? reducer(doc) : doc) : old
1819
+ (old) => old.some((doc) => ids2.has(doc.external_id)) ? old.map((doc) => ids2.has(doc.external_id) ? reducer(doc) : doc) : old
1820
1820
  );
1821
- for (const id of ids) patchCachedDocument(qc, id, reducer);
1821
+ for (const id of ids2) patchCachedDocument(qc, id, reducer);
1822
1822
  }
1823
1823
  function workspaceOf(qc, docId) {
1824
1824
  for (const [, docs] of qc.getQueriesData({
@@ -1848,13 +1848,13 @@ function settleAssignedDocTags(qc, created) {
1848
1848
  for (const [workspaceId, delta] of workspaces) adjustTagCounts(qc, workspaceId, delta);
1849
1849
  }
1850
1850
  function settleRemovedDocTags(qc, { tagId, docIds }) {
1851
- const ids = new Set(docIds);
1851
+ const ids2 = new Set(docIds);
1852
1852
  const removedByWorkspace = /* @__PURE__ */ new Map();
1853
1853
  for (const [, docs] of qc.getQueriesData({
1854
1854
  queryKey: arbiQueryKeys.allDocuments()
1855
1855
  })) {
1856
1856
  for (const doc of Array.isArray(docs) ? docs : []) {
1857
- if (!ids.has(doc.external_id)) continue;
1857
+ if (!ids2.has(doc.external_id)) continue;
1858
1858
  if (!doc.doctags?.some((dt) => dt.tag_ext_id === tagId)) continue;
1859
1859
  removedByWorkspace.set(
1860
1860
  doc.workspace_ext_id,
@@ -1862,7 +1862,7 @@ function settleRemovedDocTags(qc, { tagId, docIds }) {
1862
1862
  );
1863
1863
  }
1864
1864
  }
1865
- patchEachDocument(qc, ids, (doc) => ({
1865
+ patchEachDocument(qc, ids2, (doc) => ({
1866
1866
  ...doc,
1867
1867
  doctags: (doc.doctags ?? []).filter((dt) => dt.tag_ext_id !== tagId)
1868
1868
  }));
@@ -2338,9 +2338,9 @@ function useDocumentThumbnails(visibleIds) {
2338
2338
  setThumbnails(/* @__PURE__ */ new Map());
2339
2339
  }, [workspaceId]);
2340
2340
  const fetchMissing = useCallback(
2341
- async (ids) => {
2341
+ async (ids2) => {
2342
2342
  if (!workspaceId) return;
2343
- const need = ids.filter((id) => !resolvedRef.current.has(id) && !inflightRef.current.has(id));
2343
+ const need = ids2.filter((id) => !resolvedRef.current.has(id) && !inflightRef.current.has(id));
2344
2344
  if (need.length === 0) return;
2345
2345
  need.forEach((id) => inflightRef.current.add(id));
2346
2346
  try {
@@ -3822,10 +3822,10 @@ function watchPendingDocIds(queryClient) {
3822
3822
  watched.add(queryClient);
3823
3823
  const cache = queryClient.getMutationCache();
3824
3824
  const update2 = () => {
3825
- const ids = new Set(
3825
+ const ids2 = new Set(
3826
3826
  cache.findAll({ predicate: PENDING_SYNC_PREDICATE }).flatMap((m) => docIdsFromVariables(kindOf(m.options.mutationKey), m.state.variables))
3827
3827
  );
3828
- if (!sameSet(usePendingDocIds.getState().ids, ids)) usePendingDocIds.setState({ ids });
3828
+ if (!sameSet(usePendingDocIds.getState().ids, ids2)) usePendingDocIds.setState({ ids: ids2 });
3829
3829
  };
3830
3830
  update2();
3831
3831
  cache.subscribe(update2);
@@ -4341,7 +4341,7 @@ function useStreamHandlers() {
4341
4341
  return "";
4342
4342
  }
4343
4343
  },
4344
- refreshDocuments: (ids) => refreshDocuments(queryClient, arbi, ids)
4344
+ refreshDocuments: (ids2) => refreshDocuments(queryClient, arbi, ids2)
4345
4345
  },
4346
4346
  params
4347
4347
  ),
@@ -6638,6 +6638,113 @@ function useInstallSkillPack(pack) {
6638
6638
  }
6639
6639
  });
6640
6640
  }
6641
+
6642
+ // src/skill-pack.ts
6643
+ var FRONTMATTER = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/;
6644
+ var SLUG = /^[a-z0-9][a-z0-9-]*$/;
6645
+ function readFrontmatter(block) {
6646
+ const meta = {};
6647
+ for (const line of block.split(/\r?\n/)) {
6648
+ const i = line.indexOf(":");
6649
+ if (i > 0) meta[line.slice(0, i).trim().toLowerCase()] = line.slice(i + 1).trim();
6650
+ }
6651
+ return meta;
6652
+ }
6653
+ function withPreamble(preamble, body) {
6654
+ return [preamble?.trim(), body.trim()].filter(Boolean).join("\n\n");
6655
+ }
6656
+ function checkSlug(slug, where) {
6657
+ if (!SLUG.test(slug)) throw new Error(`${where}: "${slug}" is not a skill slug`);
6658
+ }
6659
+ function fromFile(path, text2, preamble) {
6660
+ const match = FRONTMATTER.exec(text2);
6661
+ if (!match) throw new Error(`${path}: a skill needs frontmatter`);
6662
+ const meta = readFrontmatter(match[1]);
6663
+ const slug = meta.name ?? "";
6664
+ checkSlug(slug, path);
6665
+ if (path.includes("/") && !path.includes(`/${slug}/`))
6666
+ throw new Error(`${path}: name must be the folder's slug`);
6667
+ let inputs = [];
6668
+ if (meta.inputs) {
6669
+ try {
6670
+ inputs = JSON.parse(meta.inputs);
6671
+ } catch {
6672
+ throw new Error(`${path}: inputs must be one line of JSON`);
6673
+ }
6674
+ }
6675
+ const instructions = withPreamble(preamble, match[2]);
6676
+ return {
6677
+ slug,
6678
+ title: meta.title || slug,
6679
+ description: meta.description ?? "",
6680
+ icon: meta.icon || void 0,
6681
+ category: meta.category || void 0,
6682
+ inputs,
6683
+ instructions,
6684
+ markdown: `---
6685
+ ${match[1]}
6686
+ ---
6687
+
6688
+ ${instructions}
6689
+ `
6690
+ };
6691
+ }
6692
+ var oneLine = (text2) => text2.replace(/\s*\n\s*/g, " ").trim();
6693
+ function fromDefinition(skill, preamble) {
6694
+ checkSlug(skill.name, "defineSkillPack");
6695
+ const inputs = skill.inputs ?? [];
6696
+ const instructions = withPreamble(preamble, skill.prompt);
6697
+ const meta = [
6698
+ `name: ${skill.name}`,
6699
+ `description: ${oneLine(skill.description)}`,
6700
+ skill.title && `title: ${oneLine(skill.title)}`,
6701
+ skill.icon && `icon: ${skill.icon}`,
6702
+ skill.category && `category: ${oneLine(skill.category)}`,
6703
+ inputs.length > 0 && `inputs: ${JSON.stringify(inputs)}`
6704
+ ].filter(Boolean);
6705
+ return {
6706
+ slug: skill.name,
6707
+ title: skill.title || skill.name,
6708
+ description: skill.description,
6709
+ icon: skill.icon,
6710
+ category: skill.category,
6711
+ inputs,
6712
+ instructions,
6713
+ markdown: `---
6714
+ ${meta.join("\n")}
6715
+ ---
6716
+
6717
+ ${instructions}
6718
+ `
6719
+ };
6720
+ }
6721
+ function defineSkillPack({
6722
+ id,
6723
+ label,
6724
+ preamble,
6725
+ files = {},
6726
+ skills = [],
6727
+ marker
6728
+ }) {
6729
+ const all = [
6730
+ ...Object.entries(files).map(([path, text2]) => fromFile(path, text2, preamble)),
6731
+ ...skills.map((skill) => fromDefinition(skill, preamble))
6732
+ ].sort((a, b) => a.slug.localeCompare(b.slug));
6733
+ const seen = /* @__PURE__ */ new Set();
6734
+ for (const skill of all) {
6735
+ if (seen.has(skill.slug)) throw new Error(`defineSkillPack: two skills are "${skill.slug}"`);
6736
+ seen.add(skill.slug);
6737
+ }
6738
+ return { ...createSkillPack({ id, skills: all, marker }), label, skills: all };
6739
+ }
6740
+ function skillPackPrompt(pack, slug, request = "") {
6741
+ const skill = pack.skills.find((s) => s.slug === slug);
6742
+ if (!skill) throw new Error(`No skill "${slug}" in the ${pack.id} pack`);
6743
+ return request.trim() ? `${skill.instructions}
6744
+
6745
+ ## Request
6746
+ ${request.trim()}` : skill.instructions;
6747
+ }
6641
6748
  var WORK_OFFLINE_VIEW = "app.workOffline";
6642
6749
  var isWorkingOffline = (session) => session.getState().views.transient[WORK_OFFLINE_VIEW] === true;
6643
6750
  var setWorkOfflineIn = (session, on) => session.setTransientView(WORK_OFFLINE_VIEW, on || void 0);
@@ -6716,6 +6823,17 @@ var MailOfflineUnavailableError = class extends Error {
6716
6823
  function accountPath(id) {
6717
6824
  return `/accounts/${encodeURIComponent(id)}`;
6718
6825
  }
6826
+ function conversationsPath(accountId, folderId, query, cursor) {
6827
+ const params = new URLSearchParams({
6828
+ folder_id: folderId,
6829
+ q: query,
6830
+ ...cursor ? { cursor } : {}
6831
+ });
6832
+ return `${accountPath(accountId)}/conversations?${params}`;
6833
+ }
6834
+ function threadPath(accountId, threadId, folderId) {
6835
+ return `${accountPath(accountId)}/thread?${new URLSearchParams({ thread_id: threadId, folder_id: folderId })}`;
6836
+ }
6719
6837
  async function mailJson(fetch2, path, init) {
6720
6838
  const response = await fetch2(path, init);
6721
6839
  return response.status === 204 ? void 0 : response.json();
@@ -6730,6 +6848,8 @@ function createMailClient(fetch2, overrides = {}) {
6730
6848
  fetch2,
6731
6849
  `${accountPath(account.id)}/messages?${new URLSearchParams({ folder_id: folderId, q: query, ...cursor ? { cursor } : {} })}`
6732
6850
  ),
6851
+ listConversations: (account, folderId, query, cursor) => mailJson(fetch2, conversationsPath(account.id, folderId, query, cursor)),
6852
+ getThread: (account, threadId, folderId) => mailJson(fetch2, threadPath(account.id, threadId, folderId)),
6733
6853
  getMessage: (account, messageId) => mailJson(fetch2, `${accountPath(account.id)}/messages/${encodeURIComponent(messageId)}`),
6734
6854
  unlock: async () => {
6735
6855
  },
@@ -6782,6 +6902,71 @@ function mailDraftIdFromContent(content) {
6782
6902
  }
6783
6903
  }
6784
6904
 
6905
+ // src/mail/threads.ts
6906
+ function mailConversationKey(message) {
6907
+ return message.thread_id || message.id;
6908
+ }
6909
+ function toMailConversation(threadId, members) {
6910
+ const newest = members[0];
6911
+ const senders = /* @__PURE__ */ new Map();
6912
+ for (const message of [...members].reverse())
6913
+ for (const address of message.sender)
6914
+ if (!senders.has(address.email.toLowerCase()))
6915
+ senders.set(address.email.toLowerCase(), address);
6916
+ return {
6917
+ thread_id: threadId,
6918
+ subject: [...members].reverse().find((m) => m.subject)?.subject ?? "",
6919
+ preview: newest.preview,
6920
+ senders: [...senders.values()],
6921
+ received_at: newest.received_at ?? null,
6922
+ message_count: members.length,
6923
+ unread_count: members.filter((m) => m.unread).length,
6924
+ flagged: members.some((m) => m.flagged),
6925
+ messages: members
6926
+ };
6927
+ }
6928
+ function groupMailConversations(messages) {
6929
+ const groups = /* @__PURE__ */ new Map();
6930
+ for (const message of messages) {
6931
+ const key = mailConversationKey(message);
6932
+ const members = groups.get(key);
6933
+ if (members) members.push(message);
6934
+ else groups.set(key, [message]);
6935
+ }
6936
+ return [...groups].map(([key, members]) => toMailConversation(key, members));
6937
+ }
6938
+ var MESSAGE_ID = /<[^<>\s]+>/g;
6939
+ function ids(header) {
6940
+ if (!header || header.length === 0) return [];
6941
+ const text2 = Array.isArray(header) ? header.join(" ") : header;
6942
+ return text2.match(MESSAGE_ID) ?? text2.split(/\s+/).filter(Boolean);
6943
+ }
6944
+ function mailThreadRoot(message) {
6945
+ return ids(message.references)[0] ?? ids(message.in_reply_to)[0] ?? ids(message.message_id)[0];
6946
+ }
6947
+ async function hmacKey(secret, value) {
6948
+ const key = await crypto.subtle.importKey(
6949
+ "raw",
6950
+ secret,
6951
+ { name: "HMAC", hash: "SHA-256" },
6952
+ false,
6953
+ ["sign"]
6954
+ );
6955
+ const mac = new Uint8Array(
6956
+ await crypto.subtle.sign("HMAC", key, new TextEncoder().encode(`message:${value.trim()}`))
6957
+ );
6958
+ return Array.from(mac.slice(0, 16), (b) => b.toString(16).padStart(2, "0")).join("");
6959
+ }
6960
+ async function nativeThreadKeys(secret, message) {
6961
+ const root = mailThreadRoot(message);
6962
+ if (!root) return void 0;
6963
+ const own = ids(message.message_id)[0];
6964
+ return {
6965
+ thread_hmac: await hmacKey(secret, root),
6966
+ ...own && { message_id_hmac: await hmacKey(secret, own) }
6967
+ };
6968
+ }
6969
+
6785
6970
  // src/mail/offline/mailbox.ts
6786
6971
  var keyOf = {
6787
6972
  accounts: () => blind("accounts"),
@@ -6930,6 +7115,16 @@ async function searchFolder(accountId, folderId, query) {
6930
7115
  }
6931
7116
  return out;
6932
7117
  }
7118
+ var isVirtualFolder = (folder) => folder?.role === "flagged";
7119
+ async function loadAccountMessages(accountId, include, query = "") {
7120
+ const seen = /* @__PURE__ */ new Map();
7121
+ for (const folder of await loadFolders(accountId) ?? []) {
7122
+ if (isVirtualFolder(folder) || !include(folder)) continue;
7123
+ for (const message of await searchFolder(accountId, folder.id, query))
7124
+ if (!seen.has(message.id)) seen.set(message.id, message);
7125
+ }
7126
+ return [...seen.values()].sort((a, b) => receivedAt(b) - receivedAt(a));
7127
+ }
6933
7128
 
6934
7129
  // src/offline-store/network.ts
6935
7130
  function isNetworkFailure(error) {
@@ -6966,9 +7161,24 @@ async function readHeader(accountId, folderId, messageId) {
6966
7161
  return void 0;
6967
7162
  }
6968
7163
  }
7164
+ async function deviceCopies(accountId, messageId) {
7165
+ const copies = [];
7166
+ for (const folder of await loadFolders(accountId) ?? []) {
7167
+ const header = await readHeader(accountId, folder.id, messageId);
7168
+ if (header) copies.push({ folderId: folder.id, header });
7169
+ }
7170
+ return copies;
7171
+ }
6969
7172
  async function applyToDevice({ account, messageId, folderId, change }) {
6970
7173
  let header = await readHeader(account.id, folderId, messageId);
6971
- const headerKey = await keyOf.header(account.id, folderId, messageId);
7174
+ let headerKey = await keyOf.header(account.id, folderId, messageId);
7175
+ if (!header) {
7176
+ const [copy] = await deviceCopies(account.id, messageId);
7177
+ if (copy) {
7178
+ header = copy.header;
7179
+ headerKey = await keyOf.header(account.id, copy.folderId, messageId);
7180
+ }
7181
+ }
6972
7182
  if (change.kind === "delete") {
6973
7183
  const attachments = header?.attachments ?? [];
6974
7184
  await removeKeys([
@@ -6978,14 +7188,17 @@ async function applyToDevice({ account, messageId, folderId, change }) {
6978
7188
  ]);
6979
7189
  return;
6980
7190
  }
6981
- const { unread, folder_id: moveTo, action } = change.update;
6982
- if (unread !== void 0) {
6983
- if (header) {
6984
- header = { ...header, unread };
6985
- await saveHeader(account.id, folderId, header);
6986
- }
7191
+ const { unread, flagged, folder_id: moveTo, action } = change.update;
7192
+ if (unread !== void 0 || flagged !== void 0) {
7193
+ const state = {
7194
+ ...unread !== void 0 && { unread },
7195
+ ...flagged !== void 0 && { flagged }
7196
+ };
7197
+ if (header) header = { ...header, ...state };
7198
+ for (const copy of await deviceCopies(account.id, messageId))
7199
+ await saveHeader(account.id, copy.folderId, { ...copy.header, ...state });
6987
7200
  const body = await loadBody(account.id, messageId);
6988
- if (body) await saveBody(account.id, { ...body, unread });
7201
+ if (body) await saveBody(account.id, { ...body, ...state });
6989
7202
  }
6990
7203
  if (!moveTo && !action) return;
6991
7204
  if (header) await removeKeys([headerKey]);
@@ -7000,6 +7213,7 @@ function combine(pending, next) {
7000
7213
  const update2 = { ...pending.change.update };
7001
7214
  let restoreTo = pending.restoreTo;
7002
7215
  if (next.update.unread !== void 0) update2.unread = next.update.unread;
7216
+ if (next.update.flagged !== void 0) update2.flagged = next.update.flagged;
7003
7217
  if (next.update.folder_id !== void 0 || next.update.action !== void 0) {
7004
7218
  const before = { folder_id: update2.folder_id, action: update2.action };
7005
7219
  delete update2.folder_id;
@@ -7047,6 +7261,7 @@ async function queue(input) {
7047
7261
  kind: "update",
7048
7262
  update: {
7049
7263
  unread: input.change.update.unread,
7264
+ flagged: input.change.update.flagged,
7050
7265
  folder_id: existing.restoreTo ?? existing.folderId
7051
7266
  }
7052
7267
  }
@@ -7560,7 +7775,7 @@ async function syncMailbox(transport, settings, options = {}) {
7560
7775
  const records = await recordsInBucket(await bucketOf.folder(account.id, gone.id));
7561
7776
  await removeKeys(records.map((r) => r.key));
7562
7777
  }
7563
- for (const folder of folders)
7778
+ for (const folder of folders.filter((f) => !isVirtualFolder(f)))
7564
7779
  await syncFolder(transport, account, folder, settings, windowStart, full, budget);
7565
7780
  notifyOfflineMailChange("mailbox");
7566
7781
  } catch (accountError) {
@@ -7812,6 +8027,16 @@ async function onlineFirst(online, offline, unavailable) {
7812
8027
  if (saved !== void 0) return saved;
7813
8028
  throw new MailOfflineUnavailableError(unavailable);
7814
8029
  }
8030
+ async function deviceMessages(account, folderId, query) {
8031
+ if (!isVirtualFolder(await savedFolder(account.id, folderId)))
8032
+ return searchFolder(account.id, folderId, query);
8033
+ const inView = (f) => account.provider === "imap" ? f.role === "inbox" : f.role !== "trash";
8034
+ const all = await loadAccountMessages(account.id, inView, query);
8035
+ return all.filter((m) => m.flagged);
8036
+ }
8037
+ async function savedFolder(accountId, folderId) {
8038
+ return (await loadFolders(accountId) ?? []).find((f) => f.id === folderId);
8039
+ }
7815
8040
  function offlineMailReads(getArbi, { keepsMail = () => true } = {}) {
7816
8041
  const call = (path) => mailJson((p, i) => getArbi().mail.fetch(p, i), path);
7817
8042
  const settings = () => getOfflineMailSettings(sessionUser(getArbi()));
@@ -7856,6 +8081,7 @@ function offlineMailReads(getArbi, { keepsMail = () => true } = {}) {
7856
8081
  );
7857
8082
  if (storeEnabled() && !query)
7858
8083
  remember(async () => {
8084
+ if (isVirtualFolder(await savedFolder(account.id, folderId))) return;
7859
8085
  for (const message of page.messages)
7860
8086
  if (keeps(message)) await saveHeader(account.id, folderId, message);
7861
8087
  await overlayPendingMailChanges();
@@ -7864,10 +8090,43 @@ function offlineMailReads(getArbi, { keepsMail = () => true } = {}) {
7864
8090
  },
7865
8091
  async () => {
7866
8092
  if (!await hasFolder(account.id)) return void 0;
7867
- return { messages: await searchFolder(account.id, folderId, query), fromDevice: true };
8093
+ return { messages: await deviceMessages(account, folderId, query), fromDevice: true };
7868
8094
  },
7869
8095
  `You're offline and this folder isn't saved on this device. ${NOT_SAVED_HINT}`
7870
8096
  ),
8097
+ listConversations: (account, folderId, query, cursor) => onlineFirst(
8098
+ async () => {
8099
+ const page = await call(
8100
+ conversationsPath(account.id, folderId, query, cursor)
8101
+ );
8102
+ if (storeEnabled() && !query)
8103
+ remember(async () => {
8104
+ if (isVirtualFolder(await savedFolder(account.id, folderId))) return;
8105
+ for (const conversation of page.conversations)
8106
+ for (const message of conversation.messages)
8107
+ if (keeps(message)) await saveHeader(account.id, folderId, message);
8108
+ await overlayPendingMailChanges();
8109
+ });
8110
+ return page;
8111
+ },
8112
+ async () => {
8113
+ if (!await hasFolder(account.id)) return void 0;
8114
+ const messages = await deviceMessages(account, folderId, query);
8115
+ return { conversations: groupMailConversations(messages), fromDevice: true };
8116
+ },
8117
+ `You're offline and this folder isn't saved on this device. ${NOT_SAVED_HINT}`
8118
+ ),
8119
+ getThread: (account, threadId, folderId) => onlineFirst(
8120
+ () => call(threadPath(account.id, threadId, folderId)),
8121
+ async () => {
8122
+ if (!await hasFolder(account.id)) return void 0;
8123
+ const trash = (await savedFolder(account.id, folderId))?.role === "trash";
8124
+ const messages = (await loadAccountMessages(account.id, (f) => f.role === "trash" === trash)).filter((m) => mailConversationKey(m) === threadId);
8125
+ if (!messages.length) return void 0;
8126
+ return { thread_id: threadId, messages: messages.reverse(), fromDevice: true };
8127
+ },
8128
+ "You're offline and this conversation isn't saved on this device."
8129
+ ),
7871
8130
  getMessage: (account, messageId) => onlineFirst(
7872
8131
  async () => {
7873
8132
  const message = await call(
@@ -7983,6 +8242,27 @@ function useMailMessages(account, folderId, query, cursor, options = {}) {
7983
8242
  refetchInterval: options.refetchInterval
7984
8243
  });
7985
8244
  }
8245
+ function useMailConversations(account, folderId, query, cursor, options = {}) {
8246
+ const { client } = useMailClient();
8247
+ return useQuery({
8248
+ queryKey: mailQueryKeys.conversations(account?.id, folderId, query, cursor),
8249
+ queryFn: () => client.listConversations(account, folderId, query, cursor),
8250
+ networkMode: "always",
8251
+ enabled: !!account && !!folderId && (options.enabled ?? true),
8252
+ retry: false,
8253
+ refetchInterval: options.refetchInterval
8254
+ });
8255
+ }
8256
+ function useMailThread(account, threadId, folderId, options = {}) {
8257
+ const { client } = useMailClient();
8258
+ return useQuery({
8259
+ queryKey: mailQueryKeys.thread(account?.id, threadId, folderId),
8260
+ queryFn: () => client.getThread(account, threadId, folderId ?? ""),
8261
+ networkMode: "always",
8262
+ enabled: !!account && !!threadId && (options.enabled ?? true),
8263
+ retry: false
8264
+ });
8265
+ }
7986
8266
  function useMailMessage(account, messageId, options = {}) {
7987
8267
  const { client } = useMailClient();
7988
8268
  return useQuery({
@@ -7993,6 +8273,18 @@ function useMailMessage(account, messageId, options = {}) {
7993
8273
  retry: false
7994
8274
  });
7995
8275
  }
8276
+ function useReadMailMessage() {
8277
+ const { client } = useMailClient();
8278
+ const queryClient = useQueryClient();
8279
+ return useCallback(
8280
+ (account, messageId) => queryClient.ensureQueryData({
8281
+ queryKey: mailQueryKeys.message(account.id, messageId),
8282
+ queryFn: () => client.getMessage(account, messageId),
8283
+ networkMode: "always"
8284
+ }),
8285
+ [client, queryClient]
8286
+ );
8287
+ }
7996
8288
  function decodeBase64Text(b64) {
7997
8289
  const bytes = Uint8Array.from(atob(b64), (c) => c.charCodeAt(0));
7998
8290
  return new TextDecoder().decode(bytes);
@@ -8080,10 +8372,33 @@ function useMailCache() {
8080
8372
  return {
8081
8373
  refreshAll,
8082
8374
  refreshFolders: () => queryClient.invalidateQueries({ queryKey: mailQueryKeys.allFolders() }),
8083
- /** After a write to one message: drop a read of it still in flight (it may carry the old state), then refresh. */
8084
- settleMessage: async (accountId, messageId) => {
8085
- await queryClient.cancelQueries({ queryKey: mailQueryKeys.message(accountId, messageId) });
8086
- await refreshAll();
8375
+ /**
8376
+ * Show a flag change at once in every conversation list and thread read (the server's state
8377
+ * follows on the next refresh).
8378
+ */
8379
+ showFlag: (accountId, messageIds, flagged, threadId) => {
8380
+ const ids2 = new Set(messageIds);
8381
+ const patch = (message) => ids2.has(message.id) ? { ...message, flagged } : message;
8382
+ queryClient.setQueriesData(
8383
+ { queryKey: mailQueryKeys.allConversations() },
8384
+ (page) => page && {
8385
+ ...page,
8386
+ conversations: page.conversations.map((c) => {
8387
+ const whole = threadId !== void 0 && c.thread_id === threadId;
8388
+ if (!whole && !c.messages.some((m) => ids2.has(m.id))) return c;
8389
+ const messages = c.messages.map(patch);
8390
+ return {
8391
+ ...c,
8392
+ messages,
8393
+ flagged: whole ? flagged : messages.some((m) => m.flagged)
8394
+ };
8395
+ })
8396
+ }
8397
+ );
8398
+ queryClient.setQueriesData(
8399
+ { queryKey: mailQueryKeys.accountThreads(accountId) },
8400
+ (thread) => thread && { ...thread, messages: thread.messages.map(patch) }
8401
+ );
8087
8402
  }
8088
8403
  };
8089
8404
  }, [queryClient]);
@@ -9436,7 +9751,7 @@ function useDeleteDatabaseRows() {
9436
9751
  const arbi = useArbi();
9437
9752
  const invalidate = useInvalidate();
9438
9753
  return useMutation({
9439
- mutationFn: ({ databaseId, ids }) => arbi.databases.deleteRows(databaseId, ids),
9754
+ mutationFn: ({ databaseId, ids: ids2 }) => arbi.databases.deleteRows(databaseId, ids2),
9440
9755
  onSuccess: () => Promise.all([invalidate.rows(), invalidate.list()])
9441
9756
  });
9442
9757
  }
@@ -11213,20 +11528,20 @@ function useDebounced(value, ms) {
11213
11528
  return debounced;
11214
11529
  }
11215
11530
  function peopleDirectory(people, meId) {
11216
- const ids = /* @__PURE__ */ new Map();
11531
+ const ids2 = /* @__PURE__ */ new Map();
11217
11532
  const emails = /* @__PURE__ */ new Map();
11218
11533
  for (const p of people) {
11219
- if (p.user && p.user.external_id !== meId && !ids.has(p.user.external_id))
11220
- ids.set(p.user.external_id, p.user);
11534
+ if (p.user && p.user.external_id !== meId && !ids2.has(p.user.external_id))
11535
+ ids2.set(p.user.external_id, p.user);
11221
11536
  const key = p.email.toLowerCase();
11222
11537
  if (key && !emails.has(key)) emails.set(key, p);
11223
11538
  }
11224
- const users = [...ids.values()].sort(
11539
+ const users = [...ids2.values()].sort(
11225
11540
  (a, b) => getUserDisplayName(a).localeCompare(getUserDisplayName(b))
11226
11541
  );
11227
11542
  return {
11228
11543
  users,
11229
- byId: (id) => id ? ids.get(id) : void 0,
11544
+ byId: (id) => id ? ids2.get(id) : void 0,
11230
11545
  byEmail: (email) => email ? emails.get(email.toLowerCase()) : void 0
11231
11546
  };
11232
11547
  }
@@ -12123,6 +12438,47 @@ async function offlineDocumentAttachment(doc, maxBytes) {
12123
12438
  new File([blob], doc.file_name || getDocumentTitle(doc, "document"), { type: blob.type })
12124
12439
  );
12125
12440
  }
12441
+ var BATCH = 50;
12442
+ var SECRET_FRESH_MS = 6e4;
12443
+ var tried = /* @__PURE__ */ new Set();
12444
+ function useNativeThreadKeys(account, messages) {
12445
+ const { client, enabled } = useMailClient();
12446
+ const isOnline = useMailOnline();
12447
+ const queryClient = useQueryClient();
12448
+ const readMessage = useReadMailMessage();
12449
+ useEffect(() => {
12450
+ if (!enabled || !isOnline || account?.provider !== "native" || !messages) return;
12451
+ const unkeyed = messages.filter((m) => !m.thread_id && m.id.startsWith("eml-") && !tried.has(m.id)).slice(0, BATCH);
12452
+ if (!unkeyed.length) return;
12453
+ for (const m of unkeyed) tried.add(m.id);
12454
+ const keyable = unkeyed.filter((m) => m.message_id);
12455
+ if (!keyable.length) return;
12456
+ void (async () => {
12457
+ try {
12458
+ const secret = await queryClient.fetchQuery({
12459
+ queryKey: mailQueryKeys.threadSecret(),
12460
+ queryFn: () => mail.getNativeThreadSecret(client.fetch),
12461
+ staleTime: SECRET_FRESH_MS
12462
+ });
12463
+ const keys = {};
12464
+ for (const listed of keyable) {
12465
+ const source = listed.references.length ? listed : await readMessage(account, listed.id).catch(() => void 0);
12466
+ const key = source && await nativeThreadKeys(secret, source);
12467
+ if (key) keys[listed.id] = key;
12468
+ }
12469
+ if (!Object.keys(keys).length) return;
12470
+ if (await mail.submitNativeThreadKeys(client.fetch, keys) > 0) {
12471
+ await queryClient.invalidateQueries({ queryKey: mailQueryKeys.allConversations() });
12472
+ await queryClient.invalidateQueries({ queryKey: mailQueryKeys.allMessages() });
12473
+ }
12474
+ } catch (error) {
12475
+ queryClient.removeQueries({ queryKey: mailQueryKeys.threadSecret() });
12476
+ for (const m of keyable) tried.delete(m.id);
12477
+ logger.warn("[mail] could not key older mail into conversations", error);
12478
+ }
12479
+ })();
12480
+ }, [account, messages, enabled, isOnline, client, queryClient, readMessage]);
12481
+ }
12126
12482
  var SYNC_INTERVAL_MS = 5 * 60 * 1e3;
12127
12483
  var NEW_MAIL_DEBOUNCE_MS = 5e3;
12128
12484
  function useOfflineMailActive() {
@@ -14663,7 +15019,7 @@ function useDeleteNotifications() {
14663
15019
  const arbi = useArbi();
14664
15020
  const queries = useQueryClient();
14665
15021
  return useMutation({
14666
- mutationFn: (ids) => arbi.notifications.delete(ids),
15022
+ mutationFn: (ids2) => arbi.notifications.delete(ids2),
14667
15023
  onSuccess: () => queries.invalidateQueries({ queryKey: arbiQueryKeys.allNotifications() })
14668
15024
  });
14669
15025
  }
@@ -14671,7 +15027,7 @@ function useMarkNotificationsRead() {
14671
15027
  const arbi = useArbi();
14672
15028
  const queries = useQueryClient();
14673
15029
  return useMutation({
14674
- mutationFn: (ids) => arbi.notifications.markRead(ids),
15030
+ mutationFn: (ids2) => arbi.notifications.markRead(ids2),
14675
15031
  onSuccess: () => queries.invalidateQueries({ queryKey: arbiQueryKeys.allNotifications() })
14676
15032
  });
14677
15033
  }
@@ -16235,6 +16591,6 @@ function useRateSupportTicket() {
16235
16591
  });
16236
16592
  }
16237
16593
 
16238
- export { AGENT_CONTROL_COMMANDS, AGGREGATE_FIELDS, ALLOWED_PORTAL_ORIGINS, ARCHIVE_POLL_MS, ASSISTANT_MENTION_LABEL, AUTO_CHAT_MODEL, ActivityFeed, AiAnswer, AppleIcon, ArbiHost2 as ArbiHost, ArbiWebSocketProvider, ArtifactCanvas, BOOT_GATE_TIMEOUT_MS, BOX_SEAT_REFUSED, BOX_SEAT_REFUSED_ACTION, BOX_SEAT_REFUSED_TITLE, BUILTIN_DATA_SOURCES, CONVERSATION_SWITCH_MEASURE, ChatBubble, CitationRenderer, CommandPalette, CommandPaletteProvider, ConversationList, ConversationScope, DATABASE_RELATION_PICK_LIMIT, DATABASE_ROWS_PAGE, DEFAULT_ASPECT_OPTIONS, DEFAULT_CONVERSATIONS_SOURCE_LABELS, DEFAULT_DATABASE_SOURCE_LABELS, DEFAULT_DOCUMENTS_SOURCE_LABELS, DEFAULT_PASSWORD_CHANGE_FORM_MESSAGES, DEFAULT_PROJECTS_SOURCE_LABELS, DEFAULT_USAGE_SOURCE_LABELS, DEFAULT_WORKSPACES_SOURCE_LABELS, DateSeparator, DmAvatar, DmComposer, DocumentReview, DraftTitleControls, EMPTY_GROUP_LABEL, FACTS_SEARCH_VIEW, FIRST_TOKEN_MEASURE, GitHubIcon, ImageCropModal, ImageCropper, LIVE_UPDATE_TYPES, LinkedInIcon, MAIL_DRAFT_REPLACED_EVENT, MAX_DASHBOARD_SPEC_CHARS, MAX_SERIES, MIN_NARRATION_DWELL_MS, MODEL_GROUP_LABELS, MailOfflineUnavailableError, MessageArtifactCard, OUTBOX_FOLDER, PENDING_SYNC_PREDICATE, POLL_EVERY_MS, PhotoCapture, RUN_WINDOW_MS, SIGNATURE_NOTIFICATION_TYPES, SLOW_AFTER_MS, STILL_WORKING, StorageActionError, TRANSFER_POLL_MS, TaskThreadPendingError, TypingIndicator, UPLOAD_ACCEPT, UPLOAD_MAX_FILE_SIZE, VideoCapture, VoiceNoteRecorder, WORK_NOTIFICATION_LABELS, WORK_OFFLINE_VIEW, __resetPendingFinalCommitsForTests, __resetStreamingTokenBufferForTests, accountPath, addAssistantMessageToCache, addUserMessageToCache, adoptNewChatDocument, aggregateDataset, aliasTakenMessage, allConversationThreads, annotateThread, announceMailDraftReplaced, appendTokenToMessage, applyConversationEvent, applyFinalContextToMessage, applyLiveUpdate, applyNotificationRow, applyOptimisticDocumentEdit, applyOutputItemToMessage, applyTaskEvent, arbiMailClient, archiveName, archivedWorkspaceMessage, assistantLabels, bindThreadDocument, boundDocumentOf, bucketOf2 as bucketOf, bucketRange, buildDocumentMetadataRows, buildMentionCandidates, buildPendingFirstTurn, buildPendingSyncItem, buildWorkspaceArchive, cacheThreadBinding, cachedAssistantMode, cachedMentionCandidates, cachedQuotaUsedUp, calendarNotificationMeta, calendarOfflineSupport, callNotificationMeta, captureFrameAsBlob, claimOfflineQueue, clearLoadingState, clearUserInputRequest, commitFinalMessage, completeQueuedUserMessageByContent, computeOnline, confirmLosingOfflineMail, connectOAuthCalendarAccount, connectorErrorStatus, connectorReturnTo, createArbiQueryClient, createConversationsSource, createDataSourceRegistry, createDatabaseSource, createDocumentsSource, createMailClient, createMemoryDashboardStore, createProjectsSource, createSkillPack, createStreamHandlers, createUsageSource, createWorkspaceSwitch, createWorkspacesSource, cropImage, dayKey, defaultMailAlias, defineRowsSource, deleteLocalDraft, deleteOutboxItem, deploymentUserMeta, describeActivity, describeCalendarNotification, describeServerNotification, discardStreamingTokensForMessage, disconnectAttachedRun, documentActivityMeta, documentActivityPhrase, documentDisplayName, documentMailAttachment, docxMentionMeta, downloadRecoveryFile, enqueueOutbox, ensureAssistantMessageLoading, extractZipFile, fallbackFileName, fileAttachment, filesFromDrop, fillTimeGaps, filterRows, flushStreamingTokens, forgetUploadedDocumentFolder, formatConfigValidationError, formatIdentityPrice, getInterjectionText, getNotificationTypeMeta, getOfflineDocument, getOrphanedLastMessage, getRelatedLabels, getRelatedTotal, getRunStartedAt, getThreadsQueryKey, getWorkspaceActionText, getWorkspaceKind, getWorkspaceSentPhrase, hasPendingFinalCommit, hasPendingMailChange, hasVideoTrack, identityStepFor, inputRequestTitle, invalidateCalendarEvents, invalidateCalendars, invalidateConversationActivity, isActivityKey, isAliasTakenError, isArchiveMoving, isCommentToPeople, isDeploymentAdmin, isDeploymentUserNotification, isFullConfig, isMessageRunning, isNetworkFailure, isNotificationRow, isOrphanedUserMessage, isQueuedCalendarWrite, isReplayableArbiMutation, isSignatureNotificationType, isTableViewOf, isTransferFinished, isTransferResumable, isWorkingOffline, isWorkspaceArchivedError, isWorkspaceNotificationType, isZipFile, loadOfflineDocument, loadAttachment as loadOfflineMailAttachment, mailDraftIdFromContent, mailJson, markMessageAsFailed, markNarrationSettled, migrateLegacyThreadDocuments, mountDiditVerification, nextAliasSuggestion, notificationUserName, offlineMailReads, openAccessRequest, parseActivityContent, parseDashboardSpec, parseDeleteAccountBlockers, pendingChatModelSave, peopleDirectory, personOfUser, pickRecentWorkspaces, prepareUploadFiles, queryOfChart, queueMailChange, recordsOf, redlineStats, refuseChatWhenOffline, registerArbiMutationDefaults, registerAttachedRun, removeSettledNarration, requestPersistentStorage, resetCalendarAccountSyncState, resetMessageContent, resolveActiveWorkspace, resolveConfigModel, resolveReplyTarget, retryOutboxItem, rollbackOptimisticDocumentEdit, safePortalUrl, saveLocalDraft, serializeDashboardSpec, serverNotificationBellEntry, setMessageContent, setUserInputRequest, setWorkOfflineIn, signatureNotificationPhrase, signatureRequestMeta, subscribeDocumentReads, supportsHouseTemplates, textToArtifact, threadBinding, threadEndingAtContains, titleFromQuestion, toChatCitations, toNotificationPreferences, toRedlineMarkdown, toShellWorkspace, updateMessageWithMetadata, updateUserMessageInCache, updateUserMessageStateInCache, uploadFolderOf, uploadedDocumentFolder, useActOnStep, useActiveConfigId, useAddChatMembers, useAddDatabaseRows, useAddHolidayCalendar, useAddProjectAddonBlock, useAddWorkspaceMembers, useAddonQuote, useAgentChats, useAgentConfig, useAgentDmStatus, useAgentModels, useAgentRunControl, useAgentSession, useAgentWorkspaces, useAiTask, useAnswerAgentQuestion, useApplyChatModel, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArchiveProgressPolling, useArchiveWorkspace, useAskAgain, useAssignDocTags, useAssistantName, useAuthorizeLimits, useAutoSendDraft, useBookingPages, useBootTimeout, useBranchNavigation, useCalDavProfiles, useCalendarAccounts, useCalendarEvent, useCalendarEventByUid, useCalendarEvents, useCalendarInvitations, useCalendarOfflineRuntime, useCalendarOutbox, useCalendarOverlays, useCalendarSettings, useCalendarShares, useCalendarSupport, useCalendars, useCameraStream, useCanEditShared, useCancelDriveSync, useCancelMailboxSync, useCancelManyPendingSync, useCancelProjectSubscription, useCancelWorkspaceTransfer, useChangeProjectPlan, useChargeWatch, useChatArrivals, useChatPost, useChatSummaries, useChatThread, useChatUnreadTotal, useChats, useClaimNativeAlias, useClaimSecureMail, useCloseAgentSession, useCommandPalette, useConfigSchema, useConfirmEmailChange, useConnectCalDavAccount, useConnectMailAccount, useConnectOAuthAccount, useConnectRunStream, useConnectorAutoSync, useConnectorCatalog, useConnectorVendorVisibility, useContacts, useConversation, useConversationActions, useConversationActivity, useConversationData, useConversationDocuments, useConversationIsShared, useConversationItems, useConversationPendingAuth, useConversationSearch, useConversationSettings, useConversationTurn, useConversationWorkspace, useCreateAgent, useCreateCalendar, useCreateContact, useCreateDatabase, useCreateEvent, useCreateFact, useCreateFacts, useCreateGroupChat, useCreateProject, useCreateProjectCheckout, useCreateRoom, useCreateWork, useCreateWorkflow, useCreateWorkspace, useCurrentSessionId, useCurrentWorkspace, useDashboardStore, useDataSources, useDatabase, useDatabaseAggregate, useDatabaseDashboardStore, useDatabaseRows, useDatabases, useDecideCounter, useDeleteAccount, useDeleteAccountFlow, useDeleteBookingPage, useDeleteCalendar, useDeleteChatMessage, useDeleteConfig, useDeleteContact, useDeleteConversation, useDeleteDashboard, useDeleteDatabase, useDeleteDatabaseRows, useDeleteDocuments, useDeleteEvent, useDeleteFact, useDeleteMessage, useDeleteNotifications, useDeleteProject, useDeleteSkill, useDeleteWorkflow, useDeleteWorkspaces, useDirectModelUsage, useDisconnectCalendarAccount, useDisconnectConnector, useDisconnectMailAccount, useDisconnectSlack, useDismissedTips, useDocumentAutoAdd, useDocumentHostActions, useDocumentPendingSync, useDocumentThumbnails, useDocumentsSupport, useDownloadDocuments, useDriveFolderChildren, useDriveFolderDocCount, useDriveFolders, useDriveSyncEstimate, useDriveSyncProgress, useEmailChange, useEnableDriveSync, useEnableMailboxSync, useExportDatabase, useFacts, useFactsSearch, useFetchCalendarEvent, useFinaliseTranslation, useFindTime, useFlushOutbox, useFollowThread, useFreeBusy, useGenerateAgentAvatar, useGenerateDocTags, useGrantAgentAccess, useHolidayCountries, useHouseTemplateCandidates, useIdentityVerification, useIdentityVerificationFlow, useImportCalendar, useImportContacts, useImportDatabase, useImportDatabaseRows, useInstallSkillPack, useInvalidateAfterTransfer, useInvalidateProjects, useInvalidateStorage, useInviteContacts, useIsSlow, useIsWorkspaceOwner, useKeepDocumentsOffline, useLinkContact, useLinkMentions, useLocalDrafts, useMailAccounts, useMailAttachmentText, useMailCache, useMailClient, useMailDraftCompose, useMailDraftEditor, useMailDraftReplaced, useMailFolders, useMailMessage, useMailMessages, useMailOnline, useMailPolicy, useMailProjects, useMailUnlock, useMailboxFolders, useMailboxSyncProgress, useMarkChatRead, useMarkDocumentShared, useMarkNotificationsRead, useMcpTools, useMessageTimer, useModelConnections, useMoveEvent, useMoveWorkspaceToProject, useMyConnectors, useNotificationPreferences, useNotifications, useOfflineDocumentIds, useOfflineMailActive, useOfflineMailRuntime, useOfflineMailSettings, useOfflineMailStatus, useOpenSelectedWorkspace, useOpenViewerDocumentId, useOutbox, usePanelDataset, usePassageQuotes, usePasswordChange, usePasswordChangeForm, usePendingMailChanges, usePendingSyncCounts, usePendingSyncItems, usePeople, usePeopleSearch, usePlanQuote, usePlanWork, usePlanWorkspaceTransfer, usePreviewProjectPlanChange, useProcessingTask, useProcessingTasks, useProducts, useProjectBillingPortal, useProjectConversationUsage, usePublishCalendar, useRateSupportTicket, useReconnect, useRefreshCalendar, useRefreshConnectorsOnRunEnd, useRefreshProject, useRelatedDocuments, useRemoveChatMember, useRemoveDocTags, useRemoveDocumentsOffline, useRemoveModelConnection, useRemoveWorkspaceMembers, useRenameChat, useRenameFolder, useRequestEmailChange, useRequestWorkspaceAccess, useRespondToEvent, useResumeCalendarAccountConnect, useResumeWorkspaceTransfer, useRevokeAgentAccess, useRooms, useRunConversation, useRunWorkflow, useSaveAgentConfig, useSaveBookingPage, useSaveCalendarSettings, useSaveConfig, useSaveConfigField, useSaveDashboard, useSaveMailDraft, useSaveModelConnection, useSaveSkill, useSavedDashboards, useSearchContacts, useSearchDatabaseRows, useSearchFacts, useSemanticSearch, useSendMail, useSessions, useSetDeploymentHouseTemplate, useSetSkillVisibility, useSetWorkspaceHouseTemplate, useSetWorkspaceMemberRoles, useShareCalendar, useShellWorkspaces, useSignOut, useSkillSource, useSkills, useSlackConnection, useStartAgentSession, useStartCalendarAccountOAuth, useStartTaskQuery, useStartWorkspaceTransfer, useStorageActions, useStorageItemNames, useStorageItems, useStorageProjects, useStorageSnapshots, useStreamHandlers, useSubscribeCalendar, useSupportTicket, useSupportTickets, useSwitchWorkspace, useSyncAccountsOnOpen, useSyncCalendarAccount, useSyncOfflineMailbox, useTerminateSession, useThinkingContent, useThreadDocument, useTriggerDriveSync, useTriggerMailboxSync, useUnarchiveWorkspace, useUnlockModelConnections, useUnreadByPeer, useUnshareCalendar, useUpdateCalendar, useUpdateCalendarAccount, useUpdateContact, useUpdateConversation, useUpdateDatabase, useUpdateDatabaseRow, useUpdateDocTag, useUpdateDocuments, useUpdateEvent, useUpdateFact, useUpdateProjectAddonSettings, useUpdateProjectFields, useUpdateProjectNextPeriodAddons, useUpdateWorkflow, useUpdateWorkspace, useUploadDocuments, useUploadFiles, useUploadFromUrls, useUploadSkillFiles, useUploadUrls, useVideoRecorder, useWorkItems, useWorkOffline, useWorkflowRuns, useWorkflows, useWorkspaceArchive, useWorkspaceDocs, useWorkspaceExportDownload, useWorkspaceNotificationLevel, useWorkspaceProcessing, useWorkspaceRole, useWorkspaceTransfer, useWorkspaceTransfers, useWorkspaceTrash, useWorkspaceUsers, userDisplayName, userInitials, viewsOfTable, waitForResponseId, wipeCalendarOffline, wipeOfflineDocuments, withRelativePath, workflowRunTitle, workflowStepOf, workspaceHouseTemplateId };
16594
+ export { AGENT_CONTROL_COMMANDS, AGGREGATE_FIELDS, ALLOWED_PORTAL_ORIGINS, ARCHIVE_POLL_MS, ASSISTANT_MENTION_LABEL, AUTO_CHAT_MODEL, ActivityFeed, AiAnswer, AppleIcon, ArbiHost2 as ArbiHost, ArbiWebSocketProvider, ArtifactCanvas, BOOT_GATE_TIMEOUT_MS, BOX_SEAT_REFUSED, BOX_SEAT_REFUSED_ACTION, BOX_SEAT_REFUSED_TITLE, BUILTIN_DATA_SOURCES, CONVERSATION_SWITCH_MEASURE, ChatBubble, CitationRenderer, CommandPalette, CommandPaletteProvider, ConversationList, ConversationScope, DATABASE_RELATION_PICK_LIMIT, DATABASE_ROWS_PAGE, DEFAULT_ASPECT_OPTIONS, DEFAULT_CONVERSATIONS_SOURCE_LABELS, DEFAULT_DATABASE_SOURCE_LABELS, DEFAULT_DOCUMENTS_SOURCE_LABELS, DEFAULT_PASSWORD_CHANGE_FORM_MESSAGES, DEFAULT_PROJECTS_SOURCE_LABELS, DEFAULT_USAGE_SOURCE_LABELS, DEFAULT_WORKSPACES_SOURCE_LABELS, DateSeparator, DmAvatar, DmComposer, DocumentReview, DraftTitleControls, EMPTY_GROUP_LABEL, FACTS_SEARCH_VIEW, FIRST_TOKEN_MEASURE, GitHubIcon, ImageCropModal, ImageCropper, LIVE_UPDATE_TYPES, LinkedInIcon, MAIL_DRAFT_REPLACED_EVENT, MAX_DASHBOARD_SPEC_CHARS, MAX_SERIES, MIN_NARRATION_DWELL_MS, MODEL_GROUP_LABELS, MailOfflineUnavailableError, MessageArtifactCard, OUTBOX_FOLDER, PENDING_SYNC_PREDICATE, POLL_EVERY_MS, PhotoCapture, RUN_WINDOW_MS, SIGNATURE_NOTIFICATION_TYPES, SLOW_AFTER_MS, STILL_WORKING, StorageActionError, TRANSFER_POLL_MS, TaskThreadPendingError, TypingIndicator, UPLOAD_ACCEPT, UPLOAD_MAX_FILE_SIZE, VideoCapture, VoiceNoteRecorder, WORK_NOTIFICATION_LABELS, WORK_OFFLINE_VIEW, __resetPendingFinalCommitsForTests, __resetStreamingTokenBufferForTests, accountPath, addAssistantMessageToCache, addUserMessageToCache, adoptNewChatDocument, aggregateDataset, aliasTakenMessage, allConversationThreads, annotateThread, announceMailDraftReplaced, appendTokenToMessage, applyConversationEvent, applyFinalContextToMessage, applyLiveUpdate, applyNotificationRow, applyOptimisticDocumentEdit, applyOutputItemToMessage, applyTaskEvent, arbiMailClient, archiveName, archivedWorkspaceMessage, assistantLabels, bindThreadDocument, boundDocumentOf, bucketOf2 as bucketOf, bucketRange, buildDocumentMetadataRows, buildMentionCandidates, buildPendingFirstTurn, buildPendingSyncItem, buildWorkspaceArchive, cacheThreadBinding, cachedAssistantMode, cachedMentionCandidates, cachedQuotaUsedUp, calendarNotificationMeta, calendarOfflineSupport, callNotificationMeta, captureFrameAsBlob, claimOfflineQueue, clearLoadingState, clearUserInputRequest, commitFinalMessage, completeQueuedUserMessageByContent, computeOnline, confirmLosingOfflineMail, connectOAuthCalendarAccount, connectorErrorStatus, connectorReturnTo, conversationsPath, createArbiQueryClient, createConversationsSource, createDataSourceRegistry, createDatabaseSource, createDocumentsSource, createMailClient, createMemoryDashboardStore, createProjectsSource, createSkillPack, createStreamHandlers, createUsageSource, createWorkspaceSwitch, createWorkspacesSource, cropImage, dayKey, defaultMailAlias, defineRowsSource, defineSkillPack, deleteLocalDraft, deleteOutboxItem, deploymentUserMeta, describeActivity, describeCalendarNotification, describeServerNotification, discardStreamingTokensForMessage, disconnectAttachedRun, documentActivityMeta, documentActivityPhrase, documentDisplayName, documentMailAttachment, docxMentionMeta, downloadRecoveryFile, enqueueOutbox, ensureAssistantMessageLoading, extractZipFile, fallbackFileName, fileAttachment, filesFromDrop, fillTimeGaps, filterRows, flushStreamingTokens, forgetUploadedDocumentFolder, formatConfigValidationError, formatIdentityPrice, getInterjectionText, getNotificationTypeMeta, getOfflineDocument, getOrphanedLastMessage, getRelatedLabels, getRelatedTotal, getRunStartedAt, getThreadsQueryKey, getWorkspaceActionText, getWorkspaceKind, getWorkspaceSentPhrase, groupMailConversations, hasPendingFinalCommit, hasPendingMailChange, hasVideoTrack, identityStepFor, inputRequestTitle, invalidateCalendarEvents, invalidateCalendars, invalidateConversationActivity, isActivityKey, isAliasTakenError, isArchiveMoving, isCommentToPeople, isDeploymentAdmin, isDeploymentUserNotification, isFullConfig, isMessageRunning, isNetworkFailure, isNotificationRow, isOrphanedUserMessage, isQueuedCalendarWrite, isReplayableArbiMutation, isSignatureNotificationType, isTableViewOf, isTransferFinished, isTransferResumable, isWorkingOffline, isWorkspaceArchivedError, isWorkspaceNotificationType, isZipFile, loadOfflineDocument, loadAttachment as loadOfflineMailAttachment, mailConversationKey, mailDraftIdFromContent, mailJson, mailThreadRoot, markMessageAsFailed, markNarrationSettled, migrateLegacyThreadDocuments, mountDiditVerification, nativeThreadKeys, nextAliasSuggestion, notificationUserName, offlineMailReads, openAccessRequest, parseActivityContent, parseDashboardSpec, parseDeleteAccountBlockers, pendingChatModelSave, peopleDirectory, personOfUser, pickRecentWorkspaces, prepareUploadFiles, queryOfChart, queueMailChange, recordsOf, redlineStats, refuseChatWhenOffline, registerArbiMutationDefaults, registerAttachedRun, removeSettledNarration, requestPersistentStorage, resetCalendarAccountSyncState, resetMessageContent, resolveActiveWorkspace, resolveConfigModel, resolveReplyTarget, retryOutboxItem, rollbackOptimisticDocumentEdit, safePortalUrl, saveLocalDraft, serializeDashboardSpec, serverNotificationBellEntry, setMessageContent, setUserInputRequest, setWorkOfflineIn, signatureNotificationPhrase, signatureRequestMeta, skillPackPrompt, subscribeDocumentReads, supportsHouseTemplates, textToArtifact, threadBinding, threadEndingAtContains, threadPath, titleFromQuestion, toChatCitations, toMailConversation, toNotificationPreferences, toRedlineMarkdown, toShellWorkspace, updateMessageWithMetadata, updateUserMessageInCache, updateUserMessageStateInCache, uploadFolderOf, uploadedDocumentFolder, useActOnStep, useActiveConfigId, useAddChatMembers, useAddDatabaseRows, useAddHolidayCalendar, useAddProjectAddonBlock, useAddWorkspaceMembers, useAddonQuote, useAgentChats, useAgentConfig, useAgentDmStatus, useAgentModels, useAgentRunControl, useAgentSession, useAgentWorkspaces, useAiTask, useAnswerAgentQuestion, useApplyChatModel, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArchiveProgressPolling, useArchiveWorkspace, useAskAgain, useAssignDocTags, useAssistantName, useAuthorizeLimits, useAutoSendDraft, useBookingPages, useBootTimeout, useBranchNavigation, useCalDavProfiles, useCalendarAccounts, useCalendarEvent, useCalendarEventByUid, useCalendarEvents, useCalendarInvitations, useCalendarOfflineRuntime, useCalendarOutbox, useCalendarOverlays, useCalendarSettings, useCalendarShares, useCalendarSupport, useCalendars, useCameraStream, useCanEditShared, useCancelDriveSync, useCancelMailboxSync, useCancelManyPendingSync, useCancelProjectSubscription, useCancelWorkspaceTransfer, useChangeProjectPlan, useChargeWatch, useChatArrivals, useChatPost, useChatSummaries, useChatThread, useChatUnreadTotal, useChats, useClaimNativeAlias, useClaimSecureMail, useCloseAgentSession, useCommandPalette, useConfigSchema, useConfirmEmailChange, useConnectCalDavAccount, useConnectMailAccount, useConnectOAuthAccount, useConnectRunStream, useConnectorAutoSync, useConnectorCatalog, useConnectorVendorVisibility, useContacts, useConversation, useConversationActions, useConversationActivity, useConversationData, useConversationDocuments, useConversationIsShared, useConversationItems, useConversationPendingAuth, useConversationSearch, useConversationSettings, useConversationTurn, useConversationWorkspace, useCreateAgent, useCreateCalendar, useCreateContact, useCreateDatabase, useCreateEvent, useCreateFact, useCreateFacts, useCreateGroupChat, useCreateProject, useCreateProjectCheckout, useCreateRoom, useCreateWork, useCreateWorkflow, useCreateWorkspace, useCurrentSessionId, useCurrentWorkspace, useDashboardStore, useDataSources, useDatabase, useDatabaseAggregate, useDatabaseDashboardStore, useDatabaseRows, useDatabases, useDecideCounter, useDeleteAccount, useDeleteAccountFlow, useDeleteBookingPage, useDeleteCalendar, useDeleteChatMessage, useDeleteConfig, useDeleteContact, useDeleteConversation, useDeleteDashboard, useDeleteDatabase, useDeleteDatabaseRows, useDeleteDocuments, useDeleteEvent, useDeleteFact, useDeleteMessage, useDeleteNotifications, useDeleteProject, useDeleteSkill, useDeleteWorkflow, useDeleteWorkspaces, useDirectModelUsage, useDisconnectCalendarAccount, useDisconnectConnector, useDisconnectMailAccount, useDisconnectSlack, useDismissedTips, useDocumentAutoAdd, useDocumentHostActions, useDocumentPendingSync, useDocumentThumbnails, useDocumentsSupport, useDownloadDocuments, useDriveFolderChildren, useDriveFolderDocCount, useDriveFolders, useDriveSyncEstimate, useDriveSyncProgress, useEmailChange, useEnableDriveSync, useEnableMailboxSync, useExportDatabase, useFacts, useFactsSearch, useFetchCalendarEvent, useFinaliseTranslation, useFindTime, useFlushOutbox, useFollowThread, useFreeBusy, useGenerateAgentAvatar, useGenerateDocTags, useGrantAgentAccess, useHolidayCountries, useHouseTemplateCandidates, useIdentityVerification, useIdentityVerificationFlow, useImportCalendar, useImportContacts, useImportDatabase, useImportDatabaseRows, useInstallSkillPack, useInvalidateAfterTransfer, useInvalidateProjects, useInvalidateStorage, useInviteContacts, useIsSlow, useIsWorkspaceOwner, useKeepDocumentsOffline, useLinkContact, useLinkMentions, useLocalDrafts, useMailAccounts, useMailAttachmentText, useMailCache, useMailClient, useMailConversations, useMailDraftCompose, useMailDraftEditor, useMailDraftReplaced, useMailFolders, useMailMessage, useMailMessages, useMailOnline, useMailPolicy, useMailProjects, useMailThread, useMailUnlock, useMailboxFolders, useMailboxSyncProgress, useMarkChatRead, useMarkDocumentShared, useMarkNotificationsRead, useMcpTools, useMessageTimer, useModelConnections, useMoveEvent, useMoveWorkspaceToProject, useMyConnectors, useNativeThreadKeys, useNotificationPreferences, useNotifications, useOfflineDocumentIds, useOfflineMailActive, useOfflineMailRuntime, useOfflineMailSettings, useOfflineMailStatus, useOpenSelectedWorkspace, useOpenViewerDocumentId, useOutbox, usePanelDataset, usePassageQuotes, usePasswordChange, usePasswordChangeForm, usePendingMailChanges, usePendingSyncCounts, usePendingSyncItems, usePeople, usePeopleSearch, usePlanQuote, usePlanWork, usePlanWorkspaceTransfer, usePreviewProjectPlanChange, useProcessingTask, useProcessingTasks, useProducts, useProjectBillingPortal, useProjectConversationUsage, usePublishCalendar, useRateSupportTicket, useReadMailMessage, useReconnect, useRefreshCalendar, useRefreshConnectorsOnRunEnd, useRefreshProject, useRelatedDocuments, useRemoveChatMember, useRemoveDocTags, useRemoveDocumentsOffline, useRemoveModelConnection, useRemoveWorkspaceMembers, useRenameChat, useRenameFolder, useRequestEmailChange, useRequestWorkspaceAccess, useRespondToEvent, useResumeCalendarAccountConnect, useResumeWorkspaceTransfer, useRevokeAgentAccess, useRooms, useRunConversation, useRunWorkflow, useSaveAgentConfig, useSaveBookingPage, useSaveCalendarSettings, useSaveConfig, useSaveConfigField, useSaveDashboard, useSaveMailDraft, useSaveModelConnection, useSaveSkill, useSavedDashboards, useSearchContacts, useSearchDatabaseRows, useSearchFacts, useSemanticSearch, useSendMail, useSessions, useSetDeploymentHouseTemplate, useSetSkillVisibility, useSetWorkspaceHouseTemplate, useSetWorkspaceMemberRoles, useShareCalendar, useShellWorkspaces, useSignOut, useSkillSource, useSkills, useSlackConnection, useStartAgentSession, useStartCalendarAccountOAuth, useStartTaskQuery, useStartWorkspaceTransfer, useStorageActions, useStorageItemNames, useStorageItems, useStorageProjects, useStorageSnapshots, useStreamHandlers, useSubscribeCalendar, useSupportTicket, useSupportTickets, useSwitchWorkspace, useSyncAccountsOnOpen, useSyncCalendarAccount, useSyncOfflineMailbox, useTerminateSession, useThinkingContent, useThreadDocument, useTriggerDriveSync, useTriggerMailboxSync, useUnarchiveWorkspace, useUnlockModelConnections, useUnreadByPeer, useUnshareCalendar, useUpdateCalendar, useUpdateCalendarAccount, useUpdateContact, useUpdateConversation, useUpdateDatabase, useUpdateDatabaseRow, useUpdateDocTag, useUpdateDocuments, useUpdateEvent, useUpdateFact, useUpdateProjectAddonSettings, useUpdateProjectFields, useUpdateProjectNextPeriodAddons, useUpdateWorkflow, useUpdateWorkspace, useUploadDocuments, useUploadFiles, useUploadFromUrls, useUploadSkillFiles, useUploadUrls, useVideoRecorder, useWorkItems, useWorkOffline, useWorkflowRuns, useWorkflows, useWorkspaceArchive, useWorkspaceDocs, useWorkspaceExportDownload, useWorkspaceNotificationLevel, useWorkspaceProcessing, useWorkspaceRole, useWorkspaceTransfer, useWorkspaceTransfers, useWorkspaceTrash, useWorkspaceUsers, userDisplayName, userInitials, viewsOfTable, waitForResponseId, wipeCalendarOffline, wipeOfflineDocuments, withRelativePath, workflowRunTitle, workflowStepOf, workspaceHouseTemplateId };
16239
16595
  //# sourceMappingURL=index.js.map
16240
16596
  //# sourceMappingURL=index.js.map