@arbidocs/react 0.5.86 → 0.5.87
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/README.md +2 -3
- package/dist/artifacts/index.cjs +46 -48
- package/dist/artifacts/index.cjs.map +1 -1
- package/dist/artifacts/index.js +7 -9
- package/dist/artifacts/index.js.map +1 -1
- package/dist/calls/livekit/index.cjs +60 -62
- package/dist/calls/livekit/index.cjs.map +1 -1
- package/dist/calls/livekit/index.js +6 -8
- package/dist/calls/livekit/index.js.map +1 -1
- package/dist/{chunk-Z3LLUO32.cjs → chunk-5NOZDH3F.cjs} +12 -2
- package/dist/chunk-5NOZDH3F.cjs.map +1 -0
- package/dist/{chunk-WQY3RQ6G.js → chunk-73ENECAT.js} +5 -6
- package/dist/{chunk-LUDIYWT7.cjs.map → chunk-73ENECAT.js.map} +1 -1
- package/dist/{chunk-2Y2WOIHH.cjs → chunk-AOPGD23L.cjs} +60 -148
- package/dist/chunk-AOPGD23L.cjs.map +1 -0
- package/dist/{chunk-G4Z3IP4J.js → chunk-BF5KW5ZI.js} +3 -17
- package/dist/chunk-BF5KW5ZI.js.map +1 -0
- package/dist/{chunk-TK7ERJPE.js → chunk-BFNY3RZG.js} +22 -12
- package/dist/chunk-BFNY3RZG.js.map +1 -0
- package/dist/{chunk-U4PWVSCT.cjs → chunk-C4WODQGO.cjs} +24 -11
- package/dist/chunk-C4WODQGO.cjs.map +1 -0
- package/dist/{chunk-E7VD5WNY.cjs → chunk-DS7NTSKH.cjs} +41 -74
- package/dist/chunk-DS7NTSKH.cjs.map +1 -0
- package/dist/{chunk-JT7PN7JH.js → chunk-DU2P354H.js} +6 -37
- package/dist/chunk-DU2P354H.js.map +1 -0
- package/dist/{chunk-TAVS54EN.cjs → chunk-GKWMT64A.cjs} +6 -6
- package/dist/{chunk-TAVS54EN.cjs.map → chunk-GKWMT64A.cjs.map} +1 -1
- package/dist/{chunk-AXKHDLBB.cjs → chunk-HEVPIVF2.cjs} +15 -15
- package/dist/{chunk-AXKHDLBB.cjs.map → chunk-HEVPIVF2.cjs.map} +1 -1
- package/dist/{chunk-XPLD4LFC.js → chunk-KTXZ222T.js} +6 -91
- package/dist/chunk-KTXZ222T.js.map +1 -0
- package/dist/{chunk-PXWKJI4K.cjs → chunk-LBAG7KL7.cjs} +35 -261
- package/dist/chunk-LBAG7KL7.cjs.map +1 -0
- package/dist/{chunk-CSPAEVZS.js → chunk-MS43RNXM.js} +5 -5
- package/dist/{chunk-CSPAEVZS.js.map → chunk-MS43RNXM.js.map} +1 -1
- package/dist/{chunk-OC7F5SNA.cjs → chunk-MXP4O4DI.cjs} +5 -5
- package/dist/{chunk-OC7F5SNA.cjs.map → chunk-MXP4O4DI.cjs.map} +1 -1
- package/dist/{chunk-ZWFMFOGP.cjs → chunk-NDIKMOBJ.cjs} +4 -4
- package/dist/{chunk-ZWFMFOGP.cjs.map → chunk-NDIKMOBJ.cjs.map} +1 -1
- package/dist/{chunk-XAEVT7ZM.js → chunk-NNAJLY6B.js} +34 -257
- package/dist/chunk-NNAJLY6B.js.map +1 -0
- package/dist/{chunk-LUDIYWT7.cjs → chunk-QLRDHLWR.cjs} +72 -73
- package/dist/chunk-QLRDHLWR.cjs.map +1 -0
- package/dist/{chunk-DZUBZ45Y.cjs → chunk-RLSBRZ6Z.cjs} +2 -17
- package/dist/chunk-RLSBRZ6Z.cjs.map +1 -0
- package/dist/{chunk-VGAA7AFS.js → chunk-S3OGDLDC.js} +4 -13
- package/dist/chunk-S3OGDLDC.js.map +1 -0
- package/dist/{chunk-NNWMHMEC.js → chunk-UW2SGTI5.js} +3 -3
- package/dist/{chunk-NNWMHMEC.js.map → chunk-UW2SGTI5.js.map} +1 -1
- package/dist/{chunk-QRCMKEE6.js → chunk-VSCU7K4V.js} +11 -3
- package/dist/chunk-VSCU7K4V.js.map +1 -0
- package/dist/{chunk-C44GO33B.js → chunk-WL2Y2T47.js} +3 -3
- package/dist/{chunk-C44GO33B.js.map → chunk-WL2Y2T47.js.map} +1 -1
- package/dist/{chunk-47YVW3J4.js → chunk-YQBDEOVE.js} +4 -4
- package/dist/{chunk-47YVW3J4.js.map → chunk-YQBDEOVE.js.map} +1 -1
- package/dist/{chunk-Q6U7ALNV.cjs → chunk-ZHXYFJIA.cjs} +44 -54
- package/dist/chunk-ZHXYFJIA.cjs.map +1 -0
- package/dist/document-tools/core.cjs +100 -110
- package/dist/document-tools/core.d.cts +3 -78
- package/dist/document-tools/core.d.ts +3 -78
- package/dist/document-tools/core.js +5 -7
- package/dist/document-tools/index.cjs +102 -112
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.d.cts +2 -2
- package/dist/document-tools/index.d.ts +2 -2
- package/dist/document-tools/index.js +6 -8
- package/dist/document-tools/index.js.map +1 -1
- package/dist/index.cjs +1740 -2305
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-BDcwpFVa.d.cts → index.d-1_bJB-Yl.d.cts} +1 -58
- package/dist/{index.d-BDcwpFVa.d.ts → index.d-1_bJB-Yl.d.ts} +1 -58
- package/dist/{index.d-Deqz5-pF.d.ts → index.d-ChaR6kMc.d.cts} +1 -6
- package/dist/{index.d-Deqz5-pF.d.cts → index.d-ChaR6kMc.d.ts} +1 -6
- package/dist/index.d.cts +184 -1423
- package/dist/index.d.ts +184 -1423
- package/dist/index.js +281 -799
- package/dist/index.js.map +1 -1
- package/dist/{query-keys.d-Dm0NL9nr.d.cts → query-keys.d-D6SAUl7S.d.cts} +0 -9
- package/dist/{query-keys.d-Dm0NL9nr.d.ts → query-keys.d-D6SAUl7S.d.ts} +0 -9
- package/dist/shell/index.cjs +48 -53
- package/dist/shell/index.d.cts +1 -1
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.js +4 -5
- package/dist/ui/index.cjs +156 -169
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +3 -4
- package/dist/viewers/index.cjs +0 -120
- package/dist/viewers/index.cjs.map +1 -1
- package/dist/viewers/index.d.cts +3 -40
- package/dist/viewers/index.d.ts +3 -40
- package/dist/viewers/index.js +1 -120
- package/dist/viewers/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-2Y2WOIHH.cjs.map +0 -1
- package/dist/chunk-CPZ36AQS.js +0 -11
- package/dist/chunk-CPZ36AQS.js.map +0 -1
- package/dist/chunk-DZUBZ45Y.cjs.map +0 -1
- package/dist/chunk-E7VD5WNY.cjs.map +0 -1
- package/dist/chunk-G4Z3IP4J.js.map +0 -1
- package/dist/chunk-JT7PN7JH.js.map +0 -1
- package/dist/chunk-PXWKJI4K.cjs.map +0 -1
- package/dist/chunk-Q6U7ALNV.cjs.map +0 -1
- package/dist/chunk-QRCMKEE6.js.map +0 -1
- package/dist/chunk-RCKA7BEF.cjs +0 -14
- package/dist/chunk-RCKA7BEF.cjs.map +0 -1
- package/dist/chunk-TK7ERJPE.js.map +0 -1
- package/dist/chunk-U4PWVSCT.cjs.map +0 -1
- package/dist/chunk-VGAA7AFS.js.map +0 -1
- package/dist/chunk-VGMMK5OM.cjs +0 -26
- package/dist/chunk-VGMMK5OM.cjs.map +0 -1
- package/dist/chunk-VGO77X5U.js +0 -22
- package/dist/chunk-VGO77X5U.js.map +0 -1
- package/dist/chunk-WQY3RQ6G.js.map +0 -1
- package/dist/chunk-XAEVT7ZM.js.map +0 -1
- package/dist/chunk-XPLD4LFC.js.map +0 -1
- package/dist/chunk-Z3LLUO32.cjs.map +0 -1
|
@@ -194,21 +194,7 @@ function useMessageChatArtifact(messageId) {
|
|
|
194
194
|
() => void 0
|
|
195
195
|
);
|
|
196
196
|
}
|
|
197
|
-
function useConversationChatArtifact(conversationId) {
|
|
198
|
-
return useSyncExternalStore(
|
|
199
|
-
subscribe,
|
|
200
|
-
() => {
|
|
201
|
-
if (!conversationId) return void 0;
|
|
202
|
-
for (let i = order.length - 1; i >= 0; i--) {
|
|
203
|
-
const artifact = artifacts[order[i]];
|
|
204
|
-
if (artifact?.conversationId === conversationId) return artifact;
|
|
205
|
-
}
|
|
206
|
-
return void 0;
|
|
207
|
-
},
|
|
208
|
-
() => void 0
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
197
|
|
|
212
|
-
export { DEFAULT_NOTIFY_TONE, MAX_SESSION_NOTIFICATIONS, clearChatArtifacts, configureNotify, getChatArtifact, getChatArtifacts, notify, persistNotifyHistory, recordChatArtifact, seedNotifications, selectUnread, useChatArtifact,
|
|
213
|
-
//# sourceMappingURL=chunk-
|
|
214
|
-
//# sourceMappingURL=chunk-
|
|
198
|
+
export { DEFAULT_NOTIFY_TONE, MAX_SESSION_NOTIFICATIONS, clearChatArtifacts, configureNotify, getChatArtifact, getChatArtifacts, notify, persistNotifyHistory, recordChatArtifact, seedNotifications, selectUnread, useChatArtifact, useMessageChatArtifact, useNotify };
|
|
199
|
+
//# sourceMappingURL=chunk-BF5KW5ZI.js.map
|
|
200
|
+
//# sourceMappingURL=chunk-BF5KW5ZI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/notifications/notify-store.ts","../src/chat/chat-artifacts.ts"],"names":["saved"],"mappings":";;;;;;;AAsFO,IAAM,yBAAA,GAA4B;AAuBzC,IAAI,GAAA,GAAM,CAAA;AACV,IAAM,GAAA,GAAM,MAAM,CAAA,CAAA,EAAI,IAAA,CAAK,GAAA,EAAI,CAAE,QAAA,CAAS,EAAE,CAAC,CAAA,EAAA,CAAI,GAAA,EAAA,EAAO,QAAA,CAAS,EAAE,CAAC,CAAA,CAAA;AAGpE,SAAS,WAAW,KAAA,EAA6C;AAC/D,EAAA,IAAI,OAAA,GAAU,CAAA;AACd,EAAA,OAAO,KAAA,CAAM,OAAO,CAAC,CAAA,KAAM,EAAE,MAAA,IAAU,EAAE,WAAW,yBAAyB,CAAA;AAC/E;AAEO,IAAM,SAAA,GAAY,MAAA,CAAoB,CAAC,GAAA,MAAS;AAAA,EACrD,eAAe,EAAC;AAAA,EAChB,KAAA,EA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,GAAQ,EAAC;AACT,EAAA,IAAA,EAAK;AACP;AAGO,SAAS,gBAAA,GAA2D;AACzE,EAAA,OAAO,SAAA;AACT;AAGO,SAAS,gBAAgB,UAAA,EAAuC;AACrE,EAAA,OAAO,UAAA,GAAa,SAAA,CAAU,UAAU,CAAA,GAAI,MAAA;AAC9C;AAGO,SAAS,gBAAgB,UAAA,EAAuC;AACrE,EAAA,OAAO,oBAAA;AAAA,IACL,SAAA;AAAA,IACA,MAAM,gBAAgB,UAAU,CAAA;AAAA,IAChC,MAAM;AAAA,GACR;AACF;AAGO,SAAS,uBAAuB,SAAA,EAAsC;AAC3E,EAAA,OAAO,oBAAA;AAAA,IACL,SAAA;AAAA,IACA,MACE,SAAA,GACI,MAAA,CAAO,MAAA,CAAO,SAAS,CAAA,CAAE,IAAA,CAAK,CAAC,QAAA,KAAa,QAAA,CAAS,YAAA,KAAiB,SAAS,CAAA,GAC/E,MAAA;AAAA,IACN,MAAM;AAAA,GACR;AACF","file":"chunk-BF5KW5ZI.js","sourcesContent":["/**\n * The one notification history: every `notify.*` call pops a transient toast (rendered by\n * <Toaster/>, on sonner) and, unless `{ record: false }`, records an entry. The same entries feed\n * the topbar bell (<NotificationBell/>), its unread badge and a host's notification page; backend\n * bridges reconcile their own slices into it with {@link syncSource}.\n *\n * notify.success('Saved') // toast + entry\n * notify.error('Upload failed', { record: false }) // toast only\n * notify.info('Opening workspace…', { ambient: true }) // a log line: never badges\n *\n * sonner owns the transient toast lifecycle (stacking, timing, dismissal); this store owns the\n * history, the mute switch and what a host configures once (workspace glyph and link, see\n * {@link configureNotify}; persistence, see {@link persistNotifyHistory}). Brand-neutral: no seed\n * data, no app imports. For full sonner power the raw `toast` is re-exported.\n */\nimport { type ReactNode } from 'react'\nimport { renderToStaticMarkup } from 'react-dom/server'\n// This module IS the sanctioned toast engine home — the app-level rule that\n// steers callers to notify() doesn't apply here.\n// eslint-disable-next-line no-restricted-imports\nimport { toast } from 'sonner'\nimport { create } from 'zustand'\n\nexport { toast }\n\nexport type NotifyVariant = 'success' | 'error' | 'info' | 'warning'\n\nexport interface AppNotification {\n id: string\n title: string\n description?: string\n variant: NotifyVariant\n /** Epoch ms the entry was recorded. */\n ts: number\n read: boolean\n /** Optional in-app link the entry deep-links to (passed to the bell's onNavigate). */\n href?: string\n /** Optional click action — wins over `href` when both are present. Session\n * history only: never persisted, so a closure is safe here. */\n onSelect?: () => void\n /** The label of the action `onSelect` runs (\"Reply\", \"View\"). */\n actionLabel?: string\n /** Workspace the entry belongs to. */\n workspaceId?: string\n /** Markup of a rich (non-string) toast message, for a log that shows it as it was toasted. */\n html?: string\n /** Routine session activity (\"Opening workspace…\", \"Saved\") — kept for the\n * log but not something that demands attention: excluded from the unread\n * badge and from the bell's list. */\n ambient?: boolean\n /** Where the entry comes from. Session entries (`notify.*`) have none; a\n * backend bridge stamps its own (e.g. 'server') so {@link syncSource} can\n * replace exactly its slice on every refetch without touching the rest. */\n source?: string\n}\n\nexport interface NotifyOptions {\n /** Shown under the title in the toast; a string description is also recorded. */\n description?: ReactNode\n /** Record an entry in the history (default true). False pops the toast only — for an event\n * whose entry arrives another way (a server-persisted notification synced by a bridge). */\n record?: boolean\n /** Pop the transient toast (default true unless muted). False records the entry only. */\n toast?: boolean\n /** Recorded title for a rich (non-string) toast title. Default: the string title, else the\n * rich title's text. */\n recordTitle?: string\n /** Recorded markup for a rich toast title (default: the title rendered to static markup). */\n html?: string\n href?: string\n /** Workspace the notification belongs to: its glyph shows in the toast and its link is the\n * entry's default `href` (both as configured with {@link configureNotify}). */\n workspaceId?: string\n duration?: number\n /** A toast action button (sonner). Clicking the entry runs it too. */\n action?: { label: ReactNode; onClick: () => void }\n /** Override the toast glyph (sonner). */\n icon?: ReactNode\n /** Extra class on the toast (sonner). */\n className?: string\n /** Record as routine session activity (see {@link AppNotification.ambient}): born read. */\n ambient?: boolean\n}\n\n/** Session entries kept (oldest dropped first) — a safety net against pathological growth; a\n * large upload can log many entries, so it is generous. Source slices are bounded by their source. */\nexport const MAX_SESSION_NOTIFICATIONS = 5000\n\ninterface NotifyState {\n notifications: AppNotification[]\n /** Toasts are muted: entries are still recorded — the history is what the user comes back to. */\n muted: boolean\n setMuted: (muted: boolean) => void\n markRead: (id: string) => void\n markAllRead: () => void\n removeNotification: (id: string) => void\n removeNotifications: (ids: readonly string[]) => void\n clearNotifications: () => void\n /** Replace the history (e.g. seed a demo/initial set). */\n seed: (items: AppNotification[]) => void\n /** Record an entry (used by `notify.*`; sonner renders the toast). */\n record: (note: AppNotification) => void\n /** Reconcile one source's slice with fresh truth (e.g. a backend list on\n * every refetch): entries stamped with `source` are replaced wholesale —\n * including their read state, which the source owns — while entries from\n * other sources (session activity) stay untouched. Newest first. */\n syncSource: (source: string, items: AppNotification[]) => void\n}\n\nlet seq = 0\nconst uid = () => `n${Date.now().toString(36)}${(seq++).toString(36)}`\n\n/** Keep at most {@link MAX_SESSION_NOTIFICATIONS} session entries (newest first). */\nfunction capSession(items: AppNotification[]): AppNotification[] {\n let session = 0\n return items.filter((n) => n.source || ++session <= MAX_SESSION_NOTIFICATIONS)\n}\n\nexport const useNotify = create<NotifyState>((set) => ({\n notifications: [],\n muted: false,\n setMuted: (muted) => set({ muted }),\n markRead: (id) =>\n set((s) => ({\n notifications: s.notifications.map((n) => (n.id === id ? { ...n, read: true } : n)),\n })),\n markAllRead: () =>\n set((s) => ({ notifications: s.notifications.map((n) => ({ ...n, read: true })) })),\n removeNotification: (id) =>\n set((s) => ({ notifications: s.notifications.filter((n) => n.id !== id) })),\n removeNotifications: (ids) => {\n const drop = new Set(ids)\n set((s) => ({ notifications: s.notifications.filter((n) => !drop.has(n.id)) }))\n },\n clearNotifications: () => set({ notifications: [] }),\n seed: (items) => set({ notifications: items }),\n record: (note) => set((s) => ({ notifications: capSession([note, ...s.notifications]) })),\n syncSource: (source, items) =>\n set((s) => ({\n notifications: [\n ...items.map((n) => ({ ...n, source })),\n ...s.notifications.filter((n) => n.source !== source),\n ].sort((a, b) => b.ts - a.ts),\n })),\n}))\n\n/** What a host configures once for every `notify.*` call. */\nexport interface NotifyConfig {\n /** The toast glyph of a notification that names a workspace. */\n workspaceIcon?: (workspaceId: string) => ReactNode\n /** The default link of an entry that names a workspace. */\n workspaceHref?: (workspaceId: string) => string | undefined\n /** The default of {@link NotifyOptions.ambient} for calls that do not say: a host whose own\n * toasts are mostly confirmations (\"Saved\") records them as log lines, and passes\n * `ambient: false` for what should claim attention. Default false. */\n ambient?: boolean\n}\n\nlet config: NotifyConfig = {}\n\n/** Set the host's workspace glyph and link (merged into what is configured). */\nexport function configureNotify(next: NotifyConfig): void {\n config = { ...config, ...next }\n}\n\nfunction richMarkup(title: ReactNode): string | undefined {\n try {\n return renderToStaticMarkup(title)\n } catch {\n return undefined\n }\n}\n\nconst textOf = (html: string | undefined) =>\n (html ?? '')\n .replace(/<[^>]+>/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim()\n\n/** Ergonomic helper — `notify.success('Saved')` — toast (sonner) + optional entry. */\nfunction make(variant: NotifyVariant) {\n return (title: ReactNode, opts: NotifyOptions = {}): string => {\n const { workspaceId } = opts\n const ambient = opts.ambient ?? config.ambient ?? false\n if (opts.toast !== false && !useNotify.getState().muted) {\n toast[variant](title, {\n description: opts.description,\n duration: opts.duration,\n action: opts.action,\n icon: opts.icon ?? (workspaceId ? config.workspaceIcon?.(workspaceId) : undefined),\n className: opts.className,\n })\n }\n const id = uid()\n if (opts.record !== false) {\n const html =\n opts.html ?? (typeof title === 'string' || title == null ? undefined : richMarkup(title))\n useNotify.getState().record({\n id,\n // A rich toast still needs a READABLE title — \"Passage copied: gamma-services p.1\",\n // not \"Notification\" — so it comes from the rendered markup, tags stripped.\n title:\n opts.recordTitle ?? (typeof title === 'string' ? title : textOf(html) || 'Notification'),\n description: typeof opts.description === 'string' ? opts.description : undefined,\n variant,\n ts: Date.now(),\n // Ambient activity is a log line, not a claim on attention: it never wears an unread dot.\n read: ambient,\n // Clicking the entry goes where the notification points: its action (when it has one),\n // an explicit link, or the workspace it happened in.\n href: opts.href ?? (workspaceId ? config.workspaceHref?.(workspaceId) : undefined),\n onSelect: opts.action?.onClick,\n actionLabel: opts.action ? String(opts.action.label) : undefined,\n workspaceId,\n html,\n ambient,\n })\n }\n return id\n }\n}\nexport const notify = {\n success: make('success'),\n error: make('error'),\n info: make('info'),\n warning: make('warning'),\n}\n\n/** Replace the history — inject a seed/initial set. */\nexport function seedNotifications(items: AppNotification[]): void {\n useNotify.getState().seed(items)\n}\n\ninterface SavedHistory {\n muted?: boolean\n notifications?: AppNotification[]\n}\n\n/**\n * Keep the session history and the mute switch across reloads in `storage` under `key`: restores\n * them now and saves every change. Source slices are not saved (their source re-syncs them), and\n * neither are actions — a closure does not survive a reload. Returns the unsubscribe.\n */\nexport function persistNotifyHistory(\n key: string,\n storage: Pick<Storage, 'getItem' | 'setItem'> | undefined = globalThis.localStorage\n): () => void {\n if (!storage) return () => {}\n try {\n const saved = JSON.parse(storage.getItem(key) ?? 'null') as SavedHistory | null\n if (saved) {\n const known = new Set(useNotify.getState().notifications.map((n) => n.id))\n useNotify.setState((s) => ({\n muted: saved.muted ?? s.muted,\n notifications: capSession(\n [\n ...s.notifications,\n ...(saved.notifications ?? []).filter((n) => !n.source && !known.has(n.id)),\n ].sort((a, b) => b.ts - a.ts)\n ),\n }))\n }\n } catch {\n // Unreadable or blocked storage: start empty.\n }\n let saved: AppNotification[] = []\n let savedMuted: boolean | undefined\n return useNotify.subscribe((s) => {\n const session = s.notifications.filter((n) => !n.source)\n // A backend re-sync or a read change elsewhere leaves the session slice as it was.\n if (\n s.muted === savedMuted &&\n session.length === saved.length &&\n session.every((n, i) => n === saved[i])\n )\n return\n saved = session\n savedMuted = s.muted\n // JSON drops the undefined fields: an action's closure cannot be saved, nor its label alone.\n const notifications = session.map((n) => ({\n ...n,\n onSelect: undefined,\n actionLabel: undefined,\n }))\n try {\n storage.setItem(key, JSON.stringify({ muted: s.muted, notifications }))\n } catch {\n // Full or blocked storage: the in-memory history still works.\n }\n })\n}\n\n/** Unread count selector for the topbar bell — ambient session activity never\n * demands attention, so it never counts. */\nexport const selectUnread = (s: NotifyState): number =>\n s.notifications.filter((n) => !n.read && !n.ambient).length\n\n/** Default glyph colour per variant (raw palette, override via `toneClassNames`). */\nexport const DEFAULT_NOTIFY_TONE: Record<NotifyVariant, string> = {\n success: 'text-green-600',\n error: 'text-destructive',\n warning: 'text-amber-500',\n info: 'text-blue-500',\n}\n","import { useSyncExternalStore } from 'react'\nimport type { ArtifactEvent } from '@arbidocs/sdk/browser'\n\n/**\n * The documents the assistant is writing (or wrote) in this tab's chats, as their artifact events\n * stream in: the chat engine records every one (`recordChatArtifact`), before the host's\n * `chat.onArtifact` shows it. One store for every surface that shows a draft as it is written: the\n * answer's artifact card, the document viewer, and a drafting chat's document pane.\n *\n * A module-level store, like the open-document registry: a chat and a viewer agree wherever they\n * sit in the tree. It holds what streamed in this tab only; a saved draft is read from the\n * documents list. Cleared on sign-out (`clearChatArtifacts`).\n */\n\n/** An artifact as it streams: what the events said so far. */\nexport interface ChatArtifact {\n /** The document it is written into (`doc-…`). */\n docExtId: string\n title: string\n /** The content so far (Markdown, or the html/react source of a live artifact). */\n content: string\n /**\n * `markdown` / `text` are document drafts (stored by the server as Word documents); `html` /\n * `react` are live artifacts; `image` is a generated image.\n */\n mode: 'markdown' | 'html' | 'text' | 'react' | 'image'\n isComplete: boolean\n version?: number | null\n /** The answer that writes it. */\n messageExtId?: string\n /** The conversation it is written in (`new` until the server named it). */\n conversationId: string\n createdAt: string\n}\n\nlet artifacts: Record<string, ChatArtifact> = {}\n/** Document ids, most recently started last. */\nlet order: string[] = []\nconst listeners = new Set<() => void>()\n\nfunction subscribe(listener: () => void): () => void {\n listeners.add(listener)\n return () => listeners.delete(listener)\n}\n\nfunction emit() {\n listeners.forEach((listener) => listener())\n}\n\n/** Record an artifact event of a chat turn in `conversationId`. */\nexport function recordChatArtifact(event: ArtifactEvent, conversationId: string): void {\n const previous = artifacts[event.doc_ext_id]\n const artifact: ChatArtifact = {\n docExtId: event.doc_ext_id,\n title: event.title,\n content: event.content,\n // The backend schema lags the 'react' mode it also sends; the value passes through unchanged.\n mode: event.mode as ChatArtifact['mode'],\n isComplete: event.is_complete,\n version: event.version,\n createdAt: new Date().toISOString(),\n messageExtId: event.message_ext_id ?? undefined,\n conversationId,\n }\n artifacts = { ...artifacts, [artifact.docExtId]: artifact }\n if (!previous) order = [...order, artifact.docExtId]\n emit()\n}\n\n/** Forget every streamed artifact (sign-out). */\nexport function clearChatArtifacts(): void {\n if (order.length === 0) return\n artifacts = {}\n order = []\n emit()\n}\n\n/** Every artifact streamed in this tab, by document id. */\nexport function getChatArtifacts(): Readonly<Record<string, ChatArtifact>> {\n return artifacts\n}\n\n/** The artifact streaming (or streamed) into this document, if one did in this tab. */\nexport function getChatArtifact(documentId: string | null | undefined) {\n return documentId ? artifacts[documentId] : undefined\n}\n\n/** The artifact streaming into this document, if one is. Re-renders as it streams. */\nexport function useChatArtifact(documentId: string | null | undefined) {\n return useSyncExternalStore(\n subscribe,\n () => getChatArtifact(documentId),\n () => undefined\n )\n}\n\n/** The artifact this answer writes (or wrote), if it did in this tab. */\nexport function useMessageChatArtifact(messageId: string | null | undefined) {\n return useSyncExternalStore(\n subscribe,\n () =>\n messageId\n ? Object.values(artifacts).find((artifact) => artifact.messageExtId === messageId)\n : undefined,\n () => undefined\n )\n}\n"]}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
import { ArbiHostContext } from './chunk-VSCU7K4V.js';
|
|
2
|
+
import { useContext } from 'react';
|
|
3
|
+
|
|
4
|
+
function useArbiHost() {
|
|
5
|
+
return useContext(ArbiHostContext);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// src/useArbi.ts
|
|
9
|
+
function useArbi() {
|
|
10
|
+
const { arbi } = useArbiHost();
|
|
11
|
+
if (!arbi) {
|
|
12
|
+
throw new Error("useArbi() needs an <ArbiHost> whose config has an `arbi`");
|
|
13
|
+
}
|
|
14
|
+
return arbi;
|
|
15
|
+
}
|
|
16
|
+
function useDeploymentDomain() {
|
|
17
|
+
return useArbiHost().arbi?.getDeploymentDomain();
|
|
18
|
+
}
|
|
19
|
+
|
|
1
20
|
// src/query-keys.ts
|
|
2
21
|
var arbiQueryKeys = {
|
|
3
22
|
fileShares: () => ["arbi", "fileShares"],
|
|
@@ -41,8 +60,6 @@ var arbiQueryKeys = {
|
|
|
41
60
|
tagKind: (workspaceId, kind) => ["arbi", "tags", workspaceId, "kind", kind],
|
|
42
61
|
/** A task's history, under the conversations prefix: every conversation write refreshes it. */
|
|
43
62
|
conversationActivity: (conversationId) => ["arbi", "conversations", conversationId, "activity"],
|
|
44
|
-
/** Under the conversations prefix: every step action or conversation write refreshes it. */
|
|
45
|
-
conversationUsage: (conversationId) => ["arbi", "conversations", conversationId, "usage"],
|
|
46
63
|
thumbnails: (docIds) => ["arbi", "thumbnails", [...docIds].sort().join(",")],
|
|
47
64
|
/** Every stage of a document's parsed content. */
|
|
48
65
|
parsedDocument: (docId) => ["arbi", "parsedDoc", docId],
|
|
@@ -69,10 +86,6 @@ var arbiQueryKeys = {
|
|
|
69
86
|
/** A workspace's activity feed (all its pages). */
|
|
70
87
|
workspaceActivity: (workspaceId) => ["arbi", "workspaceActivity", workspaceId],
|
|
71
88
|
projects: () => ["arbi", "projects"],
|
|
72
|
-
/** A filtered project list, under `projects()`. */
|
|
73
|
-
projectsFiltered: (stage, leadUser) => ["arbi", "projects", "list", stage ?? "", leadUser ?? ""],
|
|
74
|
-
/** Under `projects()`: a project update refreshes its events too. */
|
|
75
|
-
projectEvents: (projectExtId) => ["arbi", "projects", projectExtId, "events"],
|
|
76
89
|
projectUsage: (projectExtId, monthsBack) => ["arbi", "projectUsage", projectExtId, monthsBack],
|
|
77
90
|
projectConversationUsage: (projectExtId, monthsBack) => ["arbi", "projectUsage", projectExtId, "byConversation", monthsBack],
|
|
78
91
|
projectInvoices: (projectExtId) => ["arbi", "projectInvoices", projectExtId],
|
|
@@ -176,9 +189,6 @@ var arbiQueryKeys = {
|
|
|
176
189
|
/** Every signature request list: what a request write refreshes. */
|
|
177
190
|
signatureRequests: () => ["arbi", "signatureRequests"],
|
|
178
191
|
signatureRequestsForDocument: (docId) => ["arbi", "signatureRequests", "document", docId],
|
|
179
|
-
/** The requests of a workspace waiting for my signature (the open one on the server). */
|
|
180
|
-
signatureRequestsAwaitingMe: (workspaceId = "") => ["arbi", "signatureRequests", "awaiting-me", workspaceId],
|
|
181
|
-
signatureRequest: (requestId) => ["arbi", "signatureRequests", "one", requestId],
|
|
182
192
|
/** Who may sign in a workspace; no id: every workspace's. */
|
|
183
193
|
signatureCandidates: (workspaceId) => workspaceId === void 0 ? ["arbi", "signatureRequests", "candidates"] : ["arbi", "signatureRequests", "candidates", workspaceId],
|
|
184
194
|
/** The user's saved (informal) signature. */
|
|
@@ -316,6 +326,6 @@ function isUnderQueryKey(queryKey, prefix) {
|
|
|
316
326
|
return prefix.every((part, i) => queryKey[i] === part);
|
|
317
327
|
}
|
|
318
328
|
|
|
319
|
-
export { arbiMutationKeys, arbiQueryKeys, calendarQueryKeys, callQueryKeys, connectorQueryKeys, documentBytesKey, isUnderQueryKey, mailQueryKeys };
|
|
320
|
-
//# sourceMappingURL=chunk-
|
|
321
|
-
//# sourceMappingURL=chunk-
|
|
329
|
+
export { arbiMutationKeys, arbiQueryKeys, calendarQueryKeys, callQueryKeys, connectorQueryKeys, documentBytesKey, isUnderQueryKey, mailQueryKeys, useArbi, useArbiHost, useDeploymentDomain };
|
|
330
|
+
//# sourceMappingURL=chunk-BFNY3RZG.js.map
|
|
331
|
+
//# sourceMappingURL=chunk-BFNY3RZG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/host/config.ts","../src/useArbi.ts","../src/query-keys.ts"],"names":[],"mappings":";;;AA6IO,SAAS,WAAA,GAA8B;AAC5C,EAAA,OAAO,WAAW,eAAe,CAAA;AACnC;;;ACxIO,SAAS,O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AAA;AAAA,EACjF,WAAA,EAAa,MAAM,CAAC,MAAA,EAAQ,QAAQ,UAAU,CAAA;AAAA,EAC9C,QAAA,EAAU,CACR,SAAA,EACA,QAAA,EACA,KAAA,EACA,MAAA,KACG,CAAC,MAAA,EAAQ,MAAA,EAAQ,UAAA,EAAY,SAAA,EAAW,QAAA,EAAU,OAAO,MAAM,CAAA;AAAA,EACpE,OAAA,EAAS,CAAC,SAAA,EAA+B,SAAA,KACvC,CAAC,MAAA,EAAQ,MAAA,EAAQ,SAAA,EAAW,SAAA,EAAW,SAAS,CAAA;AAAA;AAAA,EAElD,QAAA,EAAU,MAAM,CAAC,MAAA,EAAQ,QAAQ,UAAU,CAAA;AAAA;AAAA,EAE3C,YAAA,EAAc,CAAC,SAAA,EAA+B,OAAA,KAC5C,CAAC,MAAA,EAAQ,MAAA,EAAQ,eAAA,EAAiB,SAAA,EAAW,OAAO,CAAA;AAAA,EACtD,cAAA,EAAgB,CAAC,SAAA,EAAmB,SAAA,EAAmB,YAAA,KACrD,CAAC,MAAA,EAAQ,MAAA,EAAQ,iBAAA,EAAmB,SAAA,EAAW,SAAA,EAAW,YAAY;AAC1E;AAMO,IAAM,mBAAmB,CAC9B,WAAA,EACA,SACA,IAAA,KAEA,OAAA,KAAY,SACP,CAAC,MAAA,EAAQ,eAAA,EAAiB,WAAW,IACrC,CAAC,MAAA,EAAQ,iBAAiB,WAAA,EAAa,OAAA,EAAS,QAAQ,KAAK;AAG7D,SAAS,eAAA,CAAgB,UAA8B,MAAA,EAAqC;AACjG,EAAA,OAAO,MAAA,CAAO,MAAM,CAAC,IAAA,EAAM,MAAM,QAAA,CAAS,CAAC,MAAM,IAAI,CAAA;AACvD","file":"chunk-BFNY3RZG.js","sourcesContent":["/**\n * What a host hands the `@arbidocs/react` hooks, as one configuration (`<ArbiHost config>`). Every\n * field is optional: without one the hooks use their own default. `@arbidocs/blocks` extends it\n * with the blocks domains (environment, billing, viewer, …).\n *\n * A field whose value lives in the host's state is a hook (`use…`), called by the hooks and kits\n * that need it, so the configuration itself stays one stable object for the host's life.\n */\n\nimport { useContext } from 'react'\nimport type { Arbi } from '@arbidocs/sdk/browser'\nimport type { AccountClient } from '../account/client'\nimport type { CalendarSupport } from '../calendar/support'\nimport type { ComponentType } from 'react'\nimport type { MeetingChatRef } from '../calls/meeting-chat'\nimport type { ActiveCall } from '../calls/session'\nimport type { ArbiChatHost } from '../chat/host'\nimport type { DocumentsSupport } from '../documents/support'\nimport type { MailClient } from '../mail/client'\nimport type { ArbiSessionStore } from '../session/store'\nimport type { DictateContextValue } from '../ui/DictateContext'\nimport type { EntityVocabulary } from '../entities/vocabulary'\nimport type { EntitySize } from '../entities/EntityPill'\nimport type { ArbiHostConnection } from './ArbiHost'\nimport type { ArbiFeatures } from './features'\nimport { ArbiHostContext } from './context'\nimport type { DashboardsHost } from '../datasets/registry'\n\n/** The mail client, and whether mail is on for the signed-in user. */\nexport interface MailHost {\n client: MailClient\n /**\n * Whether mail reads run (signed in and entitled), and the server session the mailbox is\n * unlocked for: unlocking runs again when it changes (`null`: none yet, nothing is unlocked).\n * Absent: on, for one session.\n */\n useStatus?: () => { enabled: boolean; sessionKey: string | null }\n /**\n * The mail waiting in this device's Outbox (written offline), by status, while `enabled` (Mail\n * switched on); the offline status counts it as waiting work. Absent: no Outbox.\n */\n useOutbox?: (enabled: boolean) => ReadonlyArray<{ status: string }>\n /** The Outbox's folder, opened through `openMail({ folder })`. */\n outboxFolder?: string\n}\n\n/** The account client of the settings kits, and whether account reads run (signed in). */\nexport interface AccountHost {\n client: AccountClient\n /** Absent: always. */\n useEnabled?: () => boolean\n}\n\n/** A person in the call UI (a participant, a speaker, a host). */\nexport interface CallUserPillProps {\n /** Their LiveKit identity: the user ext id. */\n identity: string\n /** The call's name for them, for someone the host does not know. */\n name?: string | null\n size?: EntitySize\n variant?: 'pill' | 'icon'\n /** Click opens a chat with them (off by default inside the call). */\n interactive?: boolean\n className?: string\n}\n\n/** Where the call panel goes in the host's layout. */\nexport type CallSlotMode = 'docked' | 'main'\n\n/** What the calls need from the host: navigation and layout are the host's. */\nexport interface CallsHost {\n /**\n * Show a call's meeting chat: an end-to-end chat, or a workspace meeting thread. Absent: the\n * in-call \"Open meeting chat\" does nothing.\n */\n openMeetingChat?: (ref: MeetingChatRef) => void\n /**\n * Once connected, show the call's conversation (its chat and live transcript) beside the call.\n * Absent: nothing is shown.\n */\n showConversation?: (call: ActiveCall) => void | Promise<void>\n /**\n * The element whose box the shown call fills: the right-hand dock, or (a webinar's audience) the\n * main area. The host claims its slot while `shown` and calls `onLost` when another panel takes\n * it (the call then minimises). Absent: the call floats at the right edge.\n */\n useSlot?: (mode: CallSlotMode, shown: boolean, onLost: () => void) => HTMLElement | null\n /** How a person shows in the call UI. Absent: the plain user pill with the call's name. */\n UserPill?: ComponentType<CallUserPillProps>\n}\n\nexport interface ArbiHostConfig {\n /**\n * The SDK on the signed-in session. A host with its own login passes one on its session\n * (`new Arbi({ url, session })`); a blocks-only site gets one from `defaultHost`. A new instance (a\n * new session, a newly opened workspace) re-renders every hook.\n */\n arbi?: Arbi\n /** The session state the kits share. Absent: an in-memory one per top-level host. */\n session?: ArbiSessionStore\n /** Live processing, uploads and the host's document actions. Absent: the package's own. */\n documents?: DocumentsSupport\n /** The calendar kept on this device and account OAuth. Absent: online only, the user's connectors. */\n calendar?: CalendarSupport\n /** Absent: mail on the `arbi` session. */\n mail?: MailHost\n /** Absent: the account on the `arbi` session. */\n account?: AccountHost\n /** Absent: calls open no meeting chat from the room. */\n calls?: CallsHost\n /**\n * The parts of the product the user switches on or off, and where each switch is kept (the user's\n * settings, or this device), read with `useFeature(name)`. The call UI also follows the `calls`\n * feature, on top of the server's calls config. Absent, or a feature not listed: on.\n */\n features?: ArbiFeatures\n /** Dictation for every `dictate` field. Absent: no mic button. */\n dictate?: DictateContextValue\n /** The sign-in layer of a blocks-only site (`defaultHost` in `@arbidocs/blocks/connect`). */\n connection?: ArbiHostConnection\n /** Where the chat engine's side effects go (documents shown, mail drafts, used-up quota). */\n chat?: ArbiChatHost\n /**\n * The site's words for the entities (`{ PROJECT: 'Matter' }`), read by every kit through\n * `getEntityLabel`. Absent: the registry's (\"Project\", \"Workspace\", \"Thread\", …).\n */\n vocabulary?: EntityVocabulary\n /**\n * What the site calls its assistant where people address it: the `@<name>` offered in a chat's\n * mention menu, the draft a shared thread starts with, and the name a message is routed to the\n * assistant on. Absent: \"ARBI\".\n */\n assistantName?: string\n /**\n * Charts and dashboards: more data sources (an external feed, a source relabelled in the site's\n * words) and where saved dashboards are kept. Absent: the built-in sources, saved in a database.\n */\n dashboards?: DashboardsHost\n}\n\n/** The host configuration in scope (`{}` outside an `<ArbiHost>`). */\nexport function useArbiHost(): ArbiHostConfig {\n return useContext(ArbiHostContext) as ArbiHostConfig\n}\n","/**\n * The `Arbi` of the host configuration (`<ArbiHost config={{ arbi }}>`).\n */\n\nimport type { Arbi } from '@arbidocs/sdk/browser'\nimport { useArbiHost } from './host/config'\n\nexport function useArbi(): Arbi {\n const { arbi } = useArbiHost()\n if (!arbi) {\n throw new Error('useArbi() needs an <ArbiHost> whose config has an `arbi`')\n }\n return arbi\n}\n\n/**\n * The deployment domain the user's keys are derived for, as the host's `Arbi` computes it\n * (`deploymentDomain`, else the API URL's hostname). `undefined` without one. The document tools\n * default their `deploymentDomain` (needed for e-signing) to it.\n */\nexport function useDeploymentDomain(): string | undefined {\n return useArbiHost().arbi?.getDeploymentDomain()\n}\n","/**\n * The one query-key factory of the ARBI front end: every React Query key and mutation key the\n * packages and the app use is built here, under `['arbi', …]`. Literal key arrays anywhere else\n * fail the `arbi/query-keys-from-factory` lint rule and `query-keys.guard.test.ts`, so a key can't\n * drift from the queries it names (a stale literal reads or invalidates nothing, silently).\n *\n * Dependency-free on purpose (types only): e2e helpers import it and pass keys into the page.\n */\n\nimport type {\n CalendarWindow,\n ListEventsParams,\n OverlayLayerName,\n RoomQuery,\n} from '@arbidocs/sdk/browser'\n\nexport const arbiQueryKeys = {\n fileShares: () => ['arbi', 'fileShares'] as const,\n fileShare: (id: string) => ['arbi', 'fileShare', id] as const,\n fileSharePdf: (id: string, status?: string) => ['arbi', 'fileSharePdf', id, status] as const,\n workspaces: () => ['arbi', 'workspaces'] as const,\n /** Every workspace's member list: what a workspace switch drops. */\n allWorkspaceUsers: () => ['arbi', 'workspaceUsers'] as const,\n workspaceUsers: (workspaceId: string) => ['arbi', 'workspaceUsers', workspaceId] as const,\n /** Every workspace's documents list: the prefix a write patches when it does not know the workspace. */\n allDocuments: () => ['arbi', 'documents'] as const,\n documents: (workspaceId: string) => ['arbi', 'documents', workspaceId] as const,\n /** One document (a viewer's); writes keep it current next to the list. */\n document: (docId: string) => ['arbi', 'document', docId] as const,\n documentsById: (docIds: string[]) =>\n ['arbi', 'documentsById', [...docIds].sort().join(',')] as const,\n /** Every workspace's near-duplicate pairs. */\n allSimilarDocuments: () => ['arbi', 'similarDocuments'] as const,\n similarDocuments: (workspaceId: string, threshold: number) =>\n ['arbi', 'similarDocuments', workspaceId, threshold] as const,\n /** Every version list: the prefix a new version invalidates. */\n allDocumentVersions: () => ['arbi', 'documentVersions'] as const,\n documentVersions: (docId: string) => ['arbi', 'documentVersions', docId] as const,\n conversations: (workspaceId: string) => ['arbi', 'conversations', workspaceId] as const,\n /** Every workspace's conversation list (and threads): the prefix a conversation write invalidates. */\n allConversations: () => ['arbi', 'conversations'] as const,\n /** A conversation's threads, under the conversations prefix (ids are unique across workspaces). */\n conversationThreads: (conversationId: string) =>\n ['arbi', 'conversations', conversationId, 'threads'] as const,\n /** One stored message with everything the server keeps on it (its trace and metadata). */\n messageDetails: (messageId: string) => ['arbi', 'messageDetails', messageId] as const,\n /** The backend's built-in slash commands. */\n assistantCommands: () => ['arbi', 'assistantCommands'] as const,\n /** Every workspace's tags (lists, tables and kinds): what a cross-workspace change refreshes. */\n allTags: () => ['arbi', 'tags'] as const,\n tags: (workspaceId: string) => ['arbi', 'tags', workspaceId] as const,\n /** Under the workspace's tags: the kinds' fields (refreshed with the tags). */\n tagKinds: (workspaceId: string) => ['arbi', 'tags', workspaceId, 'kinds'] as const,\n /** Every filtered list (a table of tags): what a tag write refreshes, the whole list aside. */\n tagLists: (workspaceId: string) => ['arbi', 'tags', workspaceId, 'list'] as const,\n /** Under the workspace's tags: a tag, doctag or fact write that invalidates `tags` refreshes it. */\n tagList: (workspaceId: string, query: string) =>\n ['arbi', 'tags', workspaceId, 'list', query] as const,\n /** A kind's fields, under the workspace's tags. */\n tagKind: (workspaceId: string, kind: string) =>\n ['arbi', 'tags', workspaceId, 'kind', kind] as const,\n /** A task's history, under the conversations prefix: every conversation write refreshes it. */\n conversationActivity: (conversationId: string) =>\n ['arbi', 'conversations', conversationId, 'activity'] as const,\n thumbnails: (docIds: string[]) => ['arbi', 'thumbnails', [...docIds].sort().join(',')] as const,\n /** Every stage of a document's parsed content. */\n parsedDocument: (docId: string) => ['arbi', 'parsedDoc', docId] as const,\n parsedDoc: (docId: string, stage: string) => ['arbi', 'parsedDoc', docId, stage] as const,\n agents: () => ['arbi', 'agents'] as const,\n sessions: () => ['arbi', 'sessions'] as const,\n health: () => ['arbi', 'health'] as const,\n workflows: () => ['arbi', 'workflows'] as const,\n /** Under `workflows()`: a workflow write or run refreshes its runs too. */\n workflowRuns: (workflowId: string) => ['arbi', 'workflows', workflowId, 'runs'] as const,\n /** Every workspace's facts: the prefix a fact write invalidates. */\n allFacts: () => ['arbi', 'facts'] as const,\n facts: (workspaceId: string) => ['arbi', 'facts', workspaceId] as const,\n configs: () => ['arbi', 'configs'] as const,\n activity: () => ['arbi', 'activity'] as const,\n /** Every transfer query (jobs, lists, plans): what a finished job refreshes. */\n allWorkspaceTransfers: () => ['arbi', 'workspaceTransfers'] as const,\n /** The caller's recent transfer jobs out of a workspace. */\n workspaceTransfers: (workspaceId: string) =>\n ['arbi', 'workspaceTransfers', 'list', workspaceId] as const,\n /** One transfer job's progress. */\n workspaceTransfer: (transferId: string) =>\n ['arbi', 'workspaceTransfers', 'job', transferId] as const,\n /** What a scope (serialised) would take in a workspace, for a mode. */\n workspaceTransferPlan: (workspaceId: string, scope: string, mode: string) =>\n ['arbi', 'workspaceTransfers', 'plan', workspaceId, scope, mode] as const,\n /** A workspace's activity feed (all its pages). */\n workspaceActivity: (workspaceId: string) => ['arbi', 'workspaceActivity', workspaceId] as const,\n projects: () => ['arbi', 'projects'] as const,\n projectUsage: (projectExtId: string, monthsBack: number) =>\n ['arbi', 'projectUsage', projectExtId, monthsBack] as const,\n projectConversationUsage: (projectExtId: string, monthsBack: number) =>\n ['arbi', 'projectUsage', projectExtId, 'byConversation', monthsBack] as const,\n projectInvoices: (projectExtId: string) => ['arbi', 'projectInvoices', projectExtId] as const,\n /** The plans and add-ons on sale. */\n products: () => ['arbi', 'products'] as const,\n /** Prices of a purchase or a change (quotes, previews); nothing is bought. */\n billingQuotes: () => ['arbi', 'billingQuote'] as const,\n userUsageToday: () => ['arbi', 'userUsageToday'] as const,\n currentUser: () => ['arbi', 'currentUser'] as const,\n firmPool: () => ['arbi', 'firmPool'] as const,\n contacts: () => ['arbi', 'contacts'] as const,\n /** Every chat query (the list and each open thread). */\n chats: () => ['arbi', 'chats'] as const,\n /** My chats, raw (titles and last messages are ciphertext), most recently active first. */\n chatList: () => ['arbi', 'chats', 'list'] as const,\n /** One thread's loaded messages, decrypted, oldest first (`ChatThreadData`). */\n chatThread: (chatExtId: string) => ['arbi', 'chats', 'thread', chatExtId] as const,\n /** My own agent's progress on my last message to it (`agent_dm_status`), per agent. */\n agentDmStatus: (agentExtId: string) => ['arbi', 'chats', 'agentStatus', agentExtId] as const,\n /** The paid features this person may use (`/v1/user/entitlements`). */\n entitlements: () => ['arbi', 'entitlements'] as const,\n skills: () => ['arbi', 'skills'] as const,\n /** A skill's main file (SKILL.md), as text. */\n skillSource: (docExtId: string) => ['arbi', 'skills', 'source', docExtId] as const,\n /** An agent's pinned config; `undefined` = the library default config. */\n agentConfig: (agentExtId?: string) => ['arbi', 'agentConfig', agentExtId ?? 'default'] as const,\n agentWorkspaces: (agentExtId: string) => ['arbi', 'agentWorkspaces', agentExtId] as const,\n /** An agent's own login, polled while its controls are open. */\n agentSession: (agentExtId: string) => ['arbi', 'agentSession', agentExtId] as const,\n agentChats: (agentExtId: string) => ['arbi', 'agentChats', agentExtId] as const,\n authorizeLimits: () => ['arbi', 'authorizeLimits'] as const,\n mcpTools: () => ['arbi', 'mcpTools'] as const,\n models: () => ['arbi', 'models'] as const,\n availableModels: () => ['arbi', 'availableModels'] as const,\n modelConnections: (userId?: string) => ['arbi', 'modelConnections', userId] as const,\n directModelUsage: (userId?: string) => ['arbi', 'directModelUsage', userId] as const,\n /** The signed-in user's own profile (name, picture, email). */\n profile: () => ['arbi', 'profile'] as const,\n identity: () => ['arbi', 'identity'] as const,\n /** The signed-in user's settings record (notification preferences, flags). */\n userSettings: () => ['arbi', 'userSettings'] as const,\n /** Every notification list: the prefix a delete, a read receipt or an arrival invalidates. */\n allSupportTickets: () => ['arbi', 'support'] as const,\n supportTickets: () => ['arbi', 'support', 'tickets'] as const,\n supportTicket: (id: number) => ['arbi', 'support', 'tickets', id] as const,\n allNotifications: () => ['arbi', 'notifications'] as const,\n /** The newest `limit` notifications, received and sent. */\n notifications: (limit: number) => ['arbi', 'notifications', limit] as const,\n /** The documents a workspace may use as its Word house template. */\n houseTemplateCandidates: (workspaceId: string) =>\n ['arbi', 'houseTemplateCandidates', workspaceId] as const,\n // ── Storage, archive ────────────────────────────────────────────────────────────────────────\n /** Every storage view (projects, items, names, Recently deleted): what a restore or delete refreshes. */\n storage: () => ['arbi', 'storage'] as const,\n /** What each project stores; no params: every such list. */\n storageProjects: (params?: object) =>\n params === undefined\n ? (['arbi', 'storage', 'projects'] as const)\n : (['arbi', 'storage', 'projects', params] as const),\n /** The largest items stored; no params: every such list. */\n storageItems: (params?: object) =>\n params === undefined\n ? (['arbi', 'storage', 'items'] as const)\n : (['arbi', 'storage', 'items', params] as const),\n /** Decrypted document names of storage items. */\n storageItemNames: (params?: object) =>\n params === undefined\n ? (['arbi', 'storage', 'names'] as const)\n : (['arbi', 'storage', 'names', params] as const),\n /** The deployment's storage day by day. */\n storageSnapshots: (params?: object) =>\n params === undefined\n ? (['arbi', 'storage', 'snapshots'] as const)\n : (['arbi', 'storage', 'snapshots', params] as const),\n /** A workspace's Recently deleted documents; no id: every workspace's. */\n workspaceTrash: (workspaceId?: string) =>\n workspaceId === undefined\n ? (['arbi', 'storage', 'workspaceTrash'] as const)\n : (['arbi', 'storage', 'workspaceTrash', workspaceId] as const),\n /** A workspace's archive state; no id: every workspace's. */\n workspaceArchive: (workspaceId?: string) =>\n workspaceId === undefined\n ? (['arbi', 'workspaceArchive'] as const)\n : (['arbi', 'workspaceArchive', workspaceId] as const),\n // ── Databases ───────────────────────────────────────────────────────────────────────────────\n // Every key below names its workspace right after its kind: a list read in one workspace is never\n // served, or overwritten, in another (the list is the session's open workspace on the server).\n /** Every database query of every workspace (what a write or a switch refreshes). */\n databases: () => ['arbi', 'databases'] as const,\n /** A workspace's databases; no id: every workspace's. */\n databaseList: (workspaceId?: string) =>\n workspaceId === undefined\n ? (['arbi', 'databases', 'list'] as const)\n : (['arbi', 'databases', 'list', workspaceId] as const),\n /** One database of a workspace; no workspace: every one read. */\n database: (workspaceId?: string, databaseId?: string) =>\n workspaceId === undefined\n ? (['arbi', 'databases', 'one'] as const)\n : (['arbi', 'databases', 'one', workspaceId, databaseId ?? ''] as const),\n /**\n * A database's rows (a search); no workspace: every database's, no params: every search of one.\n * `['arbi', 'databases', 'rows', workspaceId, databaseId, params]`.\n */\n databaseRows: (workspaceId?: string, databaseId?: string, params?: object) =>\n workspaceId === undefined\n ? (['arbi', 'databases', 'rows'] as const)\n : params === undefined\n ? (['arbi', 'databases', 'rows', workspaceId, databaseId ?? ''] as const)\n : (['arbi', 'databases', 'rows', workspaceId, databaseId ?? '', params] as const),\n /** The saved dashboards of a store's scope (a workspace). */\n dashboards: (scope: string) => ['arbi', 'dashboards', scope] as const,\n /** A database's rows grouped and measured (a chart); no workspace: every database's. */\n databaseAggregate: (workspaceId?: string, databaseId?: string, request?: object) =>\n workspaceId === undefined\n ? (['arbi', 'databases', 'aggregate'] as const)\n : (['arbi', 'databases', 'aggregate', workspaceId, databaseId ?? '', request ?? {}] as const),\n // ── Configs, health ─────────────────────────────────────────────────────────────────────────\n /** Under `configs()`: the saved configuration versions. */\n configVersions: () => ['arbi', 'configs', 'versions'] as const,\n /** Under `configs()`: the JSON schema of every config model. */\n configSchema: () => ['arbi', 'configs', 'schema'] as const,\n /** Under `configs()`: one configuration. */\n config: (configId: string) => ['arbi', 'configs', 'one', configId] as const,\n /** The remote model providers' health. */\n remoteModels: () => ['arbi', 'remoteModels'] as const,\n // ── Conversations ───────────────────────────────────────────────────────────────────────────\n /** Under the conversations prefix: what a parked run waits for the owner to allow. */\n conversationPendingAuth: (conversationId: string) =>\n ['arbi', 'conversations', conversationId, 'pending-auth'] as const,\n // ── Document tools ──────────────────────────────────────────────────────────────────────────\n /** Signatures on a document (a version); no id: every document's. */\n documentSignatures: (docId?: string, version?: number | null) =>\n docId === undefined\n ? (['arbi', 'documentSignatures'] as const)\n : (['arbi', 'documentSignatures', docId, version ?? null] as const),\n /** The certificate of a signature reference. */\n signatureVerification: (reference: string) =>\n ['arbi', 'signatureVerification', reference] as const,\n /** Every signature request list: what a request write refreshes. */\n signatureRequests: () => ['arbi', 'signatureRequests'] as const,\n signatureRequestsForDocument: (docId: string) =>\n ['arbi', 'signatureRequests', 'document', docId] as const,\n /** Who may sign in a workspace; no id: every workspace's. */\n signatureCandidates: (workspaceId?: string) =>\n workspaceId === undefined\n ? (['arbi', 'signatureRequests', 'candidates'] as const)\n : (['arbi', 'signatureRequests', 'candidates', workspaceId] as const),\n /** The user's saved (informal) signature. */\n savedSignature: () => ['arbi', 'savedSignature'] as const,\n /** An html/react artifact's source. */\n artifactSource: (docId: string) => ['arbi', 'artifactSource', docId] as const,\n /** An artifact's text, under its parsed content (refreshed with it). */\n artifactText: (docId: string) => ['arbi', 'parsedDoc', docId, 'marker', 'artifact-text'] as const,\n /** An image document's bytes as an object URL. */\n assetImage: (docId: string) => ['arbi', 'assetImage', docId] as const,\n // ── Misc ────────────────────────────────────────────────────────────────────────────────────\n /** An agent config's model tier (the builder's badge). */\n agentConfigModel: (configId: string) => ['arbi', 'agentConfigModel', configId] as const,\n /** Under `billingQuotes()`: the price of a plan change. */\n billingPreview: (projectExtId: string, change: unknown) =>\n ['arbi', 'billingQuote', 'preview', projectExtId, change] as const,\n billingPlanQuote: (projectExtId: string | null, body: unknown) =>\n ['arbi', 'billingQuote', 'plan', projectExtId, body] as const,\n billingAddonQuote: (projectExtId: string, kind: string) =>\n ['arbi', 'billingQuote', 'addon', projectExtId, kind] as const,\n /** Under `contacts()`: a search of the people one can reach. */\n contactSearch: (term: string) => ['arbi', 'contacts', 'search', term] as const,\n /** Under the workspace's facts: a filtered list. */\n factList: (workspaceId: string, filter: unknown) =>\n ['arbi', 'facts', workspaceId, filter] as const,\n /**\n * Under `skills()`: a workspace's list, hidden ones included or not. Without a marketplace the\n * server lists the open workspace's skills, so the list is kept per workspace.\n */\n skillList: (workspaceId: string, includeHidden: boolean) =>\n ['arbi', 'skills', 'list', workspaceId, includeHidden] as const,\n /** Under the project's events: one kind, one page size. */\n projectEventList: (projectExtId: string, kind: string, limit: number | 'default') =>\n ['arbi', 'projects', projectExtId, 'events', kind, limit] as const,\n /** The documents pinned for offline reading on this device. */\n offlineDocuments: () => ['arbi', 'offlineDocuments'] as const,\n /** Notifications of one kind for a deployment's user (polled). */\n typedNotifications: (kind: string, apiUrl: string, userId: string | undefined) =>\n ['arbi', 'typedNotifications', kind, apiUrl, userId ?? ''] as const,\n}\n\n/**\n * Keys of the mutations a host may need to follow (its own caches outside these hooks), e.g. with\n * a `MutationCache` subscription: a workflow run creates a task in the host's own task list.\n */\nexport const arbiMutationKeys = {\n /** A member's role changed. */\n setWorkspaceMemberRoles: () => ['arbi', 'workspaces', 'roles'] as const,\n runWorkflow: () => ['arbi', 'workflows', 'run'] as const,\n updateTagKindSchema: () => ['arbi', 'tags', 'kinds', 'update'] as const,\n createTag: () => ['arbi', 'tags', 'create'] as const,\n updateTag: () => ['arbi', 'tags', 'update'] as const,\n deleteTag: () => ['arbi', 'tags', 'delete'] as const,\n extractEntities: () => ['arbi', 'tags', 'entities', 'extract'] as const,\n updateDocuments: () => ['arbi', 'documents', 'update'] as const,\n deleteDocuments: () => ['arbi', 'documents', 'delete'] as const,\n uploadDocuments: () => ['arbi', 'documents', 'upload'] as const,\n uploadUrls: () => ['arbi', 'documents', 'uploadUrls'] as const,\n assignDocTags: () => ['arbi', 'doctags', 'assign'] as const,\n removeDocTags: () => ['arbi', 'doctags', 'remove'] as const,\n updateDocTag: () => ['arbi', 'doctags', 'update'] as const,\n generateDocTags: () => ['arbi', 'doctags', 'generate'] as const,\n /** Members added to or removed from a workspace (leaving included). */\n workspaceMembership: () => ['arbi', 'workspaces', 'members'] as const,\n /** A chat turn being sent (the app's send pipeline). */\n sendMessage: () => ['arbi', 'conversations', 'send'] as const,\n}\n\n/**\n * Query keys of the calendar hooks, all under `['arbi', 'calendar']`. The calendar is the user's,\n * not a workspace's; only the overlays carry the open workspace.\n */\nexport const calendarQueryKeys = {\n all: () => ['arbi', 'calendar'] as const,\n settings: () => ['arbi', 'calendar', 'settings'] as const,\n calendars: () => ['arbi', 'calendar', 'calendars'] as const,\n /** Every event list: the prefix an event write invalidates. */\n events: () => ['arbi', 'calendar', 'events'] as const,\n eventList: (p: ListEventsParams) =>\n [\n 'arbi',\n 'calendar',\n 'events',\n { start: p.start, end: p.end, calendars: p.calendars?.join(',') ?? null },\n ] as const,\n /** Every single event read. */\n eventDetails: () => ['arbi', 'calendar', 'event'] as const,\n event: (id: string, recurrenceId?: string | null) =>\n ['arbi', 'calendar', 'event', id, recurrenceId ?? null] as const,\n shares: (calId: string) => ['arbi', 'calendar', 'shares', calId] as const,\n invitations: () => ['arbi', 'calendar', 'invitations'] as const,\n holidayCountries: () => ['arbi', 'calendar', 'holiday-countries'] as const,\n allRooms: () => ['arbi', 'calendar', 'rooms'] as const,\n rooms: (q: RoomQuery) => ['arbi', 'calendar', 'rooms', q] as const,\n freebusy: (attendees: string[], start: string, end: string) =>\n ['arbi', 'calendar', 'freebusy', attendees.join(','), start, end] as const,\n allLookups: () => ['arbi', 'calendar', 'lookup'] as const,\n lookup: (uid: string) => ['arbi', 'calendar', 'lookup', uid] as const,\n overlays: (workspaceId: string | null, w?: CalendarWindow, layers?: OverlayLayerName[]) =>\n [\n 'arbi',\n 'calendar',\n 'overlays',\n workspaceId,\n w ? { start: w.start, end: w.end, layers: layers?.join(',') } : null,\n ] as const,\n accounts: () => ['arbi', 'calendar', 'accounts'] as const,\n caldavProfiles: () => ['arbi', 'calendar', 'caldav-profiles'] as const,\n bookingPages: () => ['arbi', 'calendar', 'booking-pages'] as const,\n /** The offline outbox (writes made offline, not yet sent). */\n outbox: () => ['arbi', 'calendar', 'outbox'] as const,\n}\n\n/** Query keys of the call hooks, all under `['arbi', 'calls']`. Calls are the user's, not a workspace's. */\nexport const callQueryKeys = {\n all: () => ['arbi', 'calls'] as const,\n config: () => ['arbi', 'calls', 'config'] as const,\n call: (callExtId: string) => ['arbi', 'calls', 'call', callExtId] as const,\n /** Everything about a call's recordings: the prefix a recording event invalidates. */\n recordingsOf: (callExtId: string) => ['arbi', 'calls', 'recordings', callExtId] as const,\n recordings: (callExtId: string) => ['arbi', 'calls', 'recordings', callExtId, 'list'] as const,\n recording: (callExtId: string, recordingExtId: string) =>\n ['arbi', 'calls', 'recordings', callExtId, 'one', recordingExtId] as const,\n inviteLinks: (callExtId: string) => ['arbi', 'calls', 'invite-links', callExtId] as const,\n}\n\nexport const connectorQueryKeys = {\n all: () => ['arbi', 'connectors'] as const,\n catalog: () => ['arbi', 'connectors', 'catalog'] as const,\n mine: () => ['arbi', 'connectors', 'mine'] as const,\n mailboxFolders: (vendor: string) => ['arbi', 'connectors', 'folders', vendor] as const,\n mailboxSyncProgress: (vendor: string, workspaceExtId: string) =>\n ['arbi', 'connectors', 'sync-progress', vendor, workspaceExtId] as const,\n allMailboxSyncProgress: () => ['arbi', 'connectors', 'sync-progress'] as const,\n driveFolders: (vendor: string) => ['arbi', 'connectors', 'drive-folders', vendor] as const,\n driveFolderChildren: (vendor: string, itemId: string) =>\n ['arbi', 'connectors', 'drive-folder-children', vendor, itemId] as const,\n driveFolderDocCount: (vendor: string, itemId: string) =>\n ['arbi', 'connectors', 'drive-folder-doc-count', vendor, itemId] as const,\n driveSyncEstimate: (vendor: string) =>\n ['arbi', 'connectors', 'drive-sync-estimate', vendor] as const,\n driveSyncProgress: (vendor: string) =>\n ['arbi', 'connectors', 'drive-sync-progress', vendor] as const,\n allDriveSyncProgress: () => ['arbi', 'connectors', 'drive-sync-progress'] as const,\n slack: () => ['arbi', 'connectors', 'slack'] as const,\n}\n\nexport const mailQueryKeys = {\n all: () => ['arbi', 'mail'] as const,\n policy: () => ['arbi', 'mail', 'policy'] as const,\n accounts: () => ['arbi', 'mail', 'accounts'] as const,\n unlock: (accountId: string | undefined, sessionKey: string | null) =>\n ['arbi', 'mail', 'unlock', accountId, sessionKey ?? ''] as const,\n allFolders: () => ['arbi', 'mail', 'folders'] as const,\n folders: (accountId: string | undefined) => ['arbi', 'mail', 'folders', accountId] as const,\n allMessages: () => ['arbi', 'mail', 'messages'] as const,\n messages: (\n accountId: string | undefined,\n folderId: string | undefined,\n query: string,\n cursor: string | null\n ) => ['arbi', 'mail', 'messages', accountId, folderId, query, cursor] as const,\n message: (accountId: string | undefined, messageId: string | null | undefined) =>\n ['arbi', 'mail', 'message', accountId, messageId] as const,\n /** The projects an email's AI work can be billed to. */\n projects: () => ['arbi', 'mail', 'projects'] as const,\n /** A saved draft prepared for editing. */\n draftCompose: (accountId: string | undefined, draftId: string | undefined) =>\n ['arbi', 'mail', 'draft-compose', accountId, draftId] as const,\n attachmentText: (accountId: string, messageId: string, attachmentId: string) =>\n ['arbi', 'mail', 'attachment-text', accountId, messageId, attachmentId] as const,\n}\n\n/** `pdf`: the document as a PDF; `original`: the stored file (an image, a recording, a sheet). */\nexport type DocumentBytesKind = 'pdf' | 'original'\n\n/** Every version and kind of a document's bytes: the prefix a new version invalidates. */\nexport const documentBytesKey = (\n documentRef: string,\n version?: number | null,\n kind?: DocumentBytesKind\n) =>\n version === undefined\n ? (['arbi', 'documentBytes', documentRef] as const)\n : (['arbi', 'documentBytes', documentRef, version, kind ?? 'pdf'] as const)\n\n/** Whether `queryKey` lies under `prefix` (a factory key): React Query's own prefix match. */\nexport function isUnderQueryKey(queryKey: readonly unknown[], prefix: readonly unknown[]): boolean {\n return prefix.every((part, i) => queryKey[i] === part)\n}\n"]}
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunk5NOZDH3F_cjs = require('./chunk-5NOZDH3F.cjs');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
|
|
6
|
+
function useArbiHost() {
|
|
7
|
+
return react.useContext(chunk5NOZDH3F_cjs.ArbiHostContext);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// src/useArbi.ts
|
|
11
|
+
function useArbi() {
|
|
12
|
+
const { arbi } = useArbiHost();
|
|
13
|
+
if (!arbi) {
|
|
14
|
+
throw new Error("useArbi() needs an <ArbiHost> whose config has an `arbi`");
|
|
15
|
+
}
|
|
16
|
+
return arbi;
|
|
17
|
+
}
|
|
18
|
+
function useDeploymentDomain() {
|
|
19
|
+
return useArbiHost().arbi?.getDeploymentDomain();
|
|
20
|
+
}
|
|
21
|
+
|
|
3
22
|
// src/query-keys.ts
|
|
4
23
|
var arbiQueryKeys = {
|
|
5
24
|
fileShares: () => ["arbi", "fileShares"],
|
|
@@ -43,8 +62,6 @@ var arbiQueryKeys = {
|
|
|
43
62
|
tagKind: (workspaceId, kind) => ["arbi", "tags", workspaceId, "kind", kind],
|
|
44
63
|
/** A task's history, under the conversations prefix: every conversation write refreshes it. */
|
|
45
64
|
conversationActivity: (conversationId) => ["arbi", "conversations", conversationId, "activity"],
|
|
46
|
-
/** Under the conversations prefix: every step action or conversation write refreshes it. */
|
|
47
|
-
conversationUsage: (conversationId) => ["arbi", "conversations", conversationId, "usage"],
|
|
48
65
|
thumbnails: (docIds) => ["arbi", "thumbnails", [...docIds].sort().join(",")],
|
|
49
66
|
/** Every stage of a document's parsed content. */
|
|
50
67
|
parsedDocument: (docId) => ["arbi", "parsedDoc", docId],
|
|
@@ -71,10 +88,6 @@ var arbiQueryKeys = {
|
|
|
71
88
|
/** A workspace's activity feed (all its pages). */
|
|
72
89
|
workspaceActivity: (workspaceId) => ["arbi", "workspaceActivity", workspaceId],
|
|
73
90
|
projects: () => ["arbi", "projects"],
|
|
74
|
-
/** A filtered project list, under `projects()`. */
|
|
75
|
-
projectsFiltered: (stage, leadUser) => ["arbi", "projects", "list", stage ?? "", leadUser ?? ""],
|
|
76
|
-
/** Under `projects()`: a project update refreshes its events too. */
|
|
77
|
-
projectEvents: (projectExtId) => ["arbi", "projects", projectExtId, "events"],
|
|
78
91
|
projectUsage: (projectExtId, monthsBack) => ["arbi", "projectUsage", projectExtId, monthsBack],
|
|
79
92
|
projectConversationUsage: (projectExtId, monthsBack) => ["arbi", "projectUsage", projectExtId, "byConversation", monthsBack],
|
|
80
93
|
projectInvoices: (projectExtId) => ["arbi", "projectInvoices", projectExtId],
|
|
@@ -178,9 +191,6 @@ var arbiQueryKeys = {
|
|
|
178
191
|
/** Every signature request list: what a request write refreshes. */
|
|
179
192
|
signatureRequests: () => ["arbi", "signatureRequests"],
|
|
180
193
|
signatureRequestsForDocument: (docId) => ["arbi", "signatureRequests", "document", docId],
|
|
181
|
-
/** The requests of a workspace waiting for my signature (the open one on the server). */
|
|
182
|
-
signatureRequestsAwaitingMe: (workspaceId = "") => ["arbi", "signatureRequests", "awaiting-me", workspaceId],
|
|
183
|
-
signatureRequest: (requestId) => ["arbi", "signatureRequests", "one", requestId],
|
|
184
194
|
/** Who may sign in a workspace; no id: every workspace's. */
|
|
185
195
|
signatureCandidates: (workspaceId) => workspaceId === void 0 ? ["arbi", "signatureRequests", "candidates"] : ["arbi", "signatureRequests", "candidates", workspaceId],
|
|
186
196
|
/** The user's saved (informal) signature. */
|
|
@@ -326,5 +336,8 @@ exports.connectorQueryKeys = connectorQueryKeys;
|
|
|
326
336
|
exports.documentBytesKey = documentBytesKey;
|
|
327
337
|
exports.isUnderQueryKey = isUnderQueryKey;
|
|
328
338
|
exports.mailQueryKeys = mailQueryKeys;
|
|
329
|
-
|
|
330
|
-
|
|
339
|
+
exports.useArbi = useArbi;
|
|
340
|
+
exports.useArbiHost = useArbiHost;
|
|
341
|
+
exports.useDeploymentDomain = useDeploymentDomain;
|
|
342
|
+
//# sourceMappingURL=chunk-C4WODQGO.cjs.map
|
|
343
|
+
//# sourceMappingURL=chunk-C4WODQGO.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/host/config.ts","../src/useArbi.ts","../src/query-keys.ts"],"names":["useContext","ArbiHostContext"],"mappings":";;;;;AA6IO,SAAS,WAAA,GAA8B;AAC5C,EAAA,OAAOA,iBAAWC,iCAAe,CAAA;AACnC;;;ACxIO,SAAS,OAAA,GAAgB;AAC9B,EAAA,MAAM,EAAE,IAAA,EAAK,GAAI,WAAA,EAAY;AAC7B,EAAA,IAAI,CAAC,IAAA,EAAM;AACT,IAAA,MAAM,IAAI,MAAM,0DAA0D,CAAA;AAAA,EAC5E;AACA,EAAA,OAAO,IAAA;AACT;AAOO,SAAS,mBAAA,GAA0C;AACxD,EAAA,OAAO,WAAA,EAAY,CAAE,IAAA,EAAM,mBAAA,EAAoB;AACjD;;;ACNO,IAAM,aAAA,GAAgB;AAAA,EAC3B,UAAA,EAAY,MAAM,CAAC,MAAA,EAAQ,YAAY,CAAA;AAAA,EACvC,WAAW,CAAC,EAAA,KAAe,CAAC,MAAA,EAAQ,aAAa,EAAE,CAAA;AAAA,EACnD,YAAA,EAAc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AAA,EAA+B,OAAA,KAC5C,CAAC,MAAA,EAAQ,MAAA,EAAQ,eAAA,EAAiB,SAAA,EAAW,OAAO,CAAA;AAAA,EACtD,cAAA,EAAgB,CAAC,SAAA,EAAmB,SAAA,EAAmB,YAAA,KACrD,CAAC,MAAA,EAAQ,MAAA,EAAQ,iBAAA,EAAmB,SAAA,EAAW,SAAA,EAAW,YAAY;AAC1E;AAMO,IAAM,mBAAmB,CAC9B,WAAA,EACA,SACA,IAAA,KAEA,OAAA,KAAY,SACP,CAAC,MAAA,EAAQ,eAAA,EAAiB,WAAW,IACrC,CAAC,MAAA,EAAQ,iBAAiB,WAAA,EAAa,OAAA,EAAS,QAAQ,KAAK;AAG7D,SAAS,eAAA,CAAgB,UAA8B,MAAA,EAAqC;AACjG,EAAA,OAAO,MAAA,CAAO,MAAM,CAAC,IAAA,EAAM,MAAM,QAAA,CAAS,CAAC,MAAM,IAAI,CAAA;AACvD","file":"chunk-C4WODQGO.cjs","sourcesContent":["/**\n * What a host hands the `@arbidocs/react` hooks, as one configuration (`<ArbiHost config>`). Every\n * field is optional: without one the hooks use their own default. `@arbidocs/blocks` extends it\n * with the blocks domains (environment, billing, viewer, …).\n *\n * A field whose value lives in the host's state is a hook (`use…`), called by the hooks and kits\n * that need it, so the configuration itself stays one stable object for the host's life.\n */\n\nimport { useContext } from 'react'\nimport type { Arbi } from '@arbidocs/sdk/browser'\nimport type { AccountClient } from '../account/client'\nimport type { CalendarSupport } from '../calendar/support'\nimport type { ComponentType } from 'react'\nimport type { MeetingChatRef } from '../calls/meeting-chat'\nimport type { ActiveCall } from '../calls/session'\nimport type { ArbiChatHost } from '../chat/host'\nimport type { DocumentsSupport } from '../documents/support'\nimport type { MailClient } from '../mail/client'\nimport type { ArbiSessionStore } from '../session/store'\nimport type { DictateContextValue } from '../ui/DictateContext'\nimport type { EntityVocabulary } from '../entities/vocabulary'\nimport type { EntitySize } from '../entities/EntityPill'\nimport type { ArbiHostConnection } from './ArbiHost'\nimport type { ArbiFeatures } from './features'\nimport { ArbiHostContext } from './context'\nimport type { DashboardsHost } from '../datasets/registry'\n\n/** The mail client, and whether mail is on for the signed-in user. */\nexport interface MailHost {\n client: MailClient\n /**\n * Whether mail reads run (signed in and entitled), and the server session the mailbox is\n * unlocked for: unlocking runs again when it changes (`null`: none yet, nothing is unlocked).\n * Absent: on, for one session.\n */\n useStatus?: () => { enabled: boolean; sessionKey: string | null }\n /**\n * The mail waiting in this device's Outbox (written offline), by status, while `enabled` (Mail\n * switched on); the offline status counts it as waiting work. Absent: no Outbox.\n */\n useOutbox?: (enabled: boolean) => ReadonlyArray<{ status: string }>\n /** The Outbox's folder, opened through `openMail({ folder })`. */\n outboxFolder?: string\n}\n\n/** The account client of the settings kits, and whether account reads run (signed in). */\nexport interface AccountHost {\n client: AccountClient\n /** Absent: always. */\n useEnabled?: () => boolean\n}\n\n/** A person in the call UI (a participant, a speaker, a host). */\nexport interface CallUserPillProps {\n /** Their LiveKit identity: the user ext id. */\n identity: string\n /** The call's name for them, for someone the host does not know. */\n name?: string | null\n size?: EntitySize\n variant?: 'pill' | 'icon'\n /** Click opens a chat with them (off by default inside the call). */\n interactive?: boolean\n className?: string\n}\n\n/** Where the call panel goes in the host's layout. */\nexport type CallSlotMode = 'docked' | 'main'\n\n/** What the calls need from the host: navigation and layout are the host's. */\nexport interface CallsHost {\n /**\n * Show a call's meeting chat: an end-to-end chat, or a workspace meeting thread. Absent: the\n * in-call \"Open meeting chat\" does nothing.\n */\n openMeetingChat?: (ref: MeetingChatRef) => void\n /**\n * Once connected, show the call's conversation (its chat and live transcript) beside the call.\n * Absent: nothing is shown.\n */\n showConversation?: (call: ActiveCall) => void | Promise<void>\n /**\n * The element whose box the shown call fills: the right-hand dock, or (a webinar's audience) the\n * main area. The host claims its slot while `shown` and calls `onLost` when another panel takes\n * it (the call then minimises). Absent: the call floats at the right edge.\n */\n useSlot?: (mode: CallSlotMode, shown: boolean, onLost: () => void) => HTMLElement | null\n /** How a person shows in the call UI. Absent: the plain user pill with the call's name. */\n UserPill?: ComponentType<CallUserPillProps>\n}\n\nexport interface ArbiHostConfig {\n /**\n * The SDK on the signed-in session. A host with its own login passes one on its session\n * (`new Arbi({ url, session })`); a blocks-only site gets one from `defaultHost`. A new instance (a\n * new session, a newly opened workspace) re-renders every hook.\n */\n arbi?: Arbi\n /** The session state the kits share. Absent: an in-memory one per top-level host. */\n session?: ArbiSessionStore\n /** Live processing, uploads and the host's document actions. Absent: the package's own. */\n documents?: DocumentsSupport\n /** The calendar kept on this device and account OAuth. Absent: online only, the user's connectors. */\n calendar?: CalendarSupport\n /** Absent: mail on the `arbi` session. */\n mail?: MailHost\n /** Absent: the account on the `arbi` session. */\n account?: AccountHost\n /** Absent: calls open no meeting chat from the room. */\n calls?: CallsHost\n /**\n * The parts of the product the user switches on or off, and where each switch is kept (the user's\n * settings, or this device), read with `useFeature(name)`. The call UI also follows the `calls`\n * feature, on top of the server's calls config. Absent, or a feature not listed: on.\n */\n features?: ArbiFeatures\n /** Dictation for every `dictate` field. Absent: no mic button. */\n dictate?: DictateContextValue\n /** The sign-in layer of a blocks-only site (`defaultHost` in `@arbidocs/blocks/connect`). */\n connection?: ArbiHostConnection\n /** Where the chat engine's side effects go (documents shown, mail drafts, used-up quota). */\n chat?: ArbiChatHost\n /**\n * The site's words for the entities (`{ PROJECT: 'Matter' }`), read by every kit through\n * `getEntityLabel`. Absent: the registry's (\"Project\", \"Workspace\", \"Thread\", …).\n */\n vocabulary?: EntityVocabulary\n /**\n * What the site calls its assistant where people address it: the `@<name>` offered in a chat's\n * mention menu, the draft a shared thread starts with, and the name a message is routed to the\n * assistant on. Absent: \"ARBI\".\n */\n assistantName?: string\n /**\n * Charts and dashboards: more data sources (an external feed, a source relabelled in the site's\n * words) and where saved dashboards are kept. Absent: the built-in sources, saved in a database.\n */\n dashboards?: DashboardsHost\n}\n\n/** The host configuration in scope (`{}` outside an `<ArbiHost>`). */\nexport function useArbiHost(): ArbiHostConfig {\n return useContext(ArbiHostContext) as ArbiHostConfig\n}\n","/**\n * The `Arbi` of the host configuration (`<ArbiHost config={{ arbi }}>`).\n */\n\nimport type { Arbi } from '@arbidocs/sdk/browser'\nimport { useArbiHost } from './host/config'\n\nexport function useArbi(): Arbi {\n const { arbi } = useArbiHost()\n if (!arbi) {\n throw new Error('useArbi() needs an <ArbiHost> whose config has an `arbi`')\n }\n return arbi\n}\n\n/**\n * The deployment domain the user's keys are derived for, as the host's `Arbi` computes it\n * (`deploymentDomain`, else the API URL's hostname). `undefined` without one. The document tools\n * default their `deploymentDomain` (needed for e-signing) to it.\n */\nexport function useDeploymentDomain(): string | undefined {\n return useArbiHost().arbi?.getDeploymentDomain()\n}\n","/**\n * The one query-key factory of the ARBI front end: every React Query key and mutation key the\n * packages and the app use is built here, under `['arbi', …]`. Literal key arrays anywhere else\n * fail the `arbi/query-keys-from-factory` lint rule and `query-keys.guard.test.ts`, so a key can't\n * drift from the queries it names (a stale literal reads or invalidates nothing, silently).\n *\n * Dependency-free on purpose (types only): e2e helpers import it and pass keys into the page.\n */\n\nimport type {\n CalendarWindow,\n ListEventsParams,\n OverlayLayerName,\n RoomQuery,\n} from '@arbidocs/sdk/browser'\n\nexport const arbiQueryKeys = {\n fileShares: () => ['arbi', 'fileShares'] as const,\n fileShare: (id: string) => ['arbi', 'fileShare', id] as const,\n fileSharePdf: (id: string, status?: string) => ['arbi', 'fileSharePdf', id, status] as const,\n workspaces: () => ['arbi', 'workspaces'] as const,\n /** Every workspace's member list: what a workspace switch drops. */\n allWorkspaceUsers: () => ['arbi', 'workspaceUsers'] as const,\n workspaceUsers: (workspaceId: string) => ['arbi', 'workspaceUsers', workspaceId] as const,\n /** Every workspace's documents list: the prefix a write patches when it does not know the workspace. */\n allDocuments: () => ['arbi', 'documents'] as const,\n documents: (workspaceId: string) => ['arbi', 'documents', workspaceId] as const,\n /** One document (a viewer's); writes keep it current next to the list. */\n document: (docId: string) => ['arbi', 'document', docId] as const,\n documentsById: (docIds: string[]) =>\n ['arbi', 'documentsById', [...docIds].sort().join(',')] as const,\n /** Every workspace's near-duplicate pairs. */\n allSimilarDocuments: () => ['arbi', 'similarDocuments'] as const,\n similarDocuments: (workspaceId: string, threshold: number) =>\n ['arbi', 'similarDocuments', workspaceId, threshold] as const,\n /** Every version list: the prefix a new version invalidates. */\n allDocumentVersions: () => ['arbi', 'documentVersions'] as const,\n documentVersions: (docId: string) => ['arbi', 'documentVersions', docId] as const,\n conversations: (workspaceId: string) => ['arbi', 'conversations', workspaceId] as const,\n /** Every workspace's conversation list (and threads): the prefix a conversation write invalidates. */\n allConversations: () => ['arbi', 'conversations'] as const,\n /** A conversation's threads, under the conversations prefix (ids are unique across workspaces). */\n conversationThreads: (conversationId: string) =>\n ['arbi', 'conversations', conversationId, 'threads'] as const,\n /** One stored message with everything the server keeps on it (its trace and metadata). */\n messageDetails: (messageId: string) => ['arbi', 'messageDetails', messageId] as const,\n /** The backend's built-in slash commands. */\n assistantCommands: () => ['arbi', 'assistantCommands'] as const,\n /** Every workspace's tags (lists, tables and kinds): what a cross-workspace change refreshes. */\n allTags: () => ['arbi', 'tags'] as const,\n tags: (workspaceId: string) => ['arbi', 'tags', workspaceId] as const,\n /** Under the workspace's tags: the kinds' fields (refreshed with the tags). */\n tagKinds: (workspaceId: string) => ['arbi', 'tags', workspaceId, 'kinds'] as const,\n /** Every filtered list (a table of tags): what a tag write refreshes, the whole list aside. */\n tagLists: (workspaceId: string) => ['arbi', 'tags', workspaceId, 'list'] as const,\n /** Under the workspace's tags: a tag, doctag or fact write that invalidates `tags` refreshes it. */\n tagList: (workspaceId: string, query: string) =>\n ['arbi', 'tags', workspaceId, 'list', query] as const,\n /** A kind's fields, under the workspace's tags. */\n tagKind: (workspaceId: string, kind: string) =>\n ['arbi', 'tags', workspaceId, 'kind', kind] as const,\n /** A task's history, under the conversations prefix: every conversation write refreshes it. */\n conversationActivity: (conversationId: string) =>\n ['arbi', 'conversations', conversationId, 'activity'] as const,\n thumbnails: (docIds: string[]) => ['arbi', 'thumbnails', [...docIds].sort().join(',')] as const,\n /** Every stage of a document's parsed content. */\n parsedDocument: (docId: string) => ['arbi', 'parsedDoc', docId] as const,\n parsedDoc: (docId: string, stage: string) => ['arbi', 'parsedDoc', docId, stage] as const,\n agents: () => ['arbi', 'agents'] as const,\n sessions: () => ['arbi', 'sessions'] as const,\n health: () => ['arbi', 'health'] as const,\n workflows: () => ['arbi', 'workflows'] as const,\n /** Under `workflows()`: a workflow write or run refreshes its runs too. */\n workflowRuns: (workflowId: string) => ['arbi', 'workflows', workflowId, 'runs'] as const,\n /** Every workspace's facts: the prefix a fact write invalidates. */\n allFacts: () => ['arbi', 'facts'] as const,\n facts: (workspaceId: string) => ['arbi', 'facts', workspaceId] as const,\n configs: () => ['arbi', 'configs'] as const,\n activity: () => ['arbi', 'activity'] as const,\n /** Every transfer query (jobs, lists, plans): what a finished job refreshes. */\n allWorkspaceTransfers: () => ['arbi', 'workspaceTransfers'] as const,\n /** The caller's recent transfer jobs out of a workspace. */\n workspaceTransfers: (workspaceId: string) =>\n ['arbi', 'workspaceTransfers', 'list', workspaceId] as const,\n /** One transfer job's progress. */\n workspaceTransfer: (transferId: string) =>\n ['arbi', 'workspaceTransfers', 'job', transferId] as const,\n /** What a scope (serialised) would take in a workspace, for a mode. */\n workspaceTransferPlan: (workspaceId: string, scope: string, mode: string) =>\n ['arbi', 'workspaceTransfers', 'plan', workspaceId, scope, mode] as const,\n /** A workspace's activity feed (all its pages). */\n workspaceActivity: (workspaceId: string) => ['arbi', 'workspaceActivity', workspaceId] as const,\n projects: () => ['arbi', 'projects'] as const,\n projectUsage: (projectExtId: string, monthsBack: number) =>\n ['arbi', 'projectUsage', projectExtId, monthsBack] as const,\n projectConversationUsage: (projectExtId: string, monthsBack: number) =>\n ['arbi', 'projectUsage', projectExtId, 'byConversation', monthsBack] as const,\n projectInvoices: (projectExtId: string) => ['arbi', 'projectInvoices', projectExtId] as const,\n /** The plans and add-ons on sale. */\n products: () => ['arbi', 'products'] as const,\n /** Prices of a purchase or a change (quotes, previews); nothing is bought. */\n billingQuotes: () => ['arbi', 'billingQuote'] as const,\n userUsageToday: () => ['arbi', 'userUsageToday'] as const,\n currentUser: () => ['arbi', 'currentUser'] as const,\n firmPool: () => ['arbi', 'firmPool'] as const,\n contacts: () => ['arbi', 'contacts'] as const,\n /** Every chat query (the list and each open thread). */\n chats: () => ['arbi', 'chats'] as const,\n /** My chats, raw (titles and last messages are ciphertext), most recently active first. */\n chatList: () => ['arbi', 'chats', 'list'] as const,\n /** One thread's loaded messages, decrypted, oldest first (`ChatThreadData`). */\n chatThread: (chatExtId: string) => ['arbi', 'chats', 'thread', chatExtId] as const,\n /** My own agent's progress on my last message to it (`agent_dm_status`), per agent. */\n agentDmStatus: (agentExtId: string) => ['arbi', 'chats', 'agentStatus', agentExtId] as const,\n /** The paid features this person may use (`/v1/user/entitlements`). */\n entitlements: () => ['arbi', 'entitlements'] as const,\n skills: () => ['arbi', 'skills'] as const,\n /** A skill's main file (SKILL.md), as text. */\n skillSource: (docExtId: string) => ['arbi', 'skills', 'source', docExtId] as const,\n /** An agent's pinned config; `undefined` = the library default config. */\n agentConfig: (agentExtId?: string) => ['arbi', 'agentConfig', agentExtId ?? 'default'] as const,\n agentWorkspaces: (agentExtId: string) => ['arbi', 'agentWorkspaces', agentExtId] as const,\n /** An agent's own login, polled while its controls are open. */\n agentSession: (agentExtId: string) => ['arbi', 'agentSession', agentExtId] as const,\n agentChats: (agentExtId: string) => ['arbi', 'agentChats', agentExtId] as const,\n authorizeLimits: () => ['arbi', 'authorizeLimits'] as const,\n mcpTools: () => ['arbi', 'mcpTools'] as const,\n models: () => ['arbi', 'models'] as const,\n availableModels: () => ['arbi', 'availableModels'] as const,\n modelConnections: (userId?: string) => ['arbi', 'modelConnections', userId] as const,\n directModelUsage: (userId?: string) => ['arbi', 'directModelUsage', userId] as const,\n /** The signed-in user's own profile (name, picture, email). */\n profile: () => ['arbi', 'profile'] as const,\n identity: () => ['arbi', 'identity'] as const,\n /** The signed-in user's settings record (notification preferences, flags). */\n userSettings: () => ['arbi', 'userSettings'] as const,\n /** Every notification list: the prefix a delete, a read receipt or an arrival invalidates. */\n allSupportTickets: () => ['arbi', 'support'] as const,\n supportTickets: () => ['arbi', 'support', 'tickets'] as const,\n supportTicket: (id: number) => ['arbi', 'support', 'tickets', id] as const,\n allNotifications: () => ['arbi', 'notifications'] as const,\n /** The newest `limit` notifications, received and sent. */\n notifications: (limit: number) => ['arbi', 'notifications', limit] as const,\n /** The documents a workspace may use as its Word house template. */\n houseTemplateCandidates: (workspaceId: string) =>\n ['arbi', 'houseTemplateCandidates', workspaceId] as const,\n // ── Storage, archive ────────────────────────────────────────────────────────────────────────\n /** Every storage view (projects, items, names, Recently deleted): what a restore or delete refreshes. */\n storage: () => ['arbi', 'storage'] as const,\n /** What each project stores; no params: every such list. */\n storageProjects: (params?: object) =>\n params === undefined\n ? (['arbi', 'storage', 'projects'] as const)\n : (['arbi', 'storage', 'projects', params] as const),\n /** The largest items stored; no params: every such list. */\n storageItems: (params?: object) =>\n params === undefined\n ? (['arbi', 'storage', 'items'] as const)\n : (['arbi', 'storage', 'items', params] as const),\n /** Decrypted document names of storage items. */\n storageItemNames: (params?: object) =>\n params === undefined\n ? (['arbi', 'storage', 'names'] as const)\n : (['arbi', 'storage', 'names', params] as const),\n /** The deployment's storage day by day. */\n storageSnapshots: (params?: object) =>\n params === undefined\n ? (['arbi', 'storage', 'snapshots'] as const)\n : (['arbi', 'storage', 'snapshots', params] as const),\n /** A workspace's Recently deleted documents; no id: every workspace's. */\n workspaceTrash: (workspaceId?: string) =>\n workspaceId === undefined\n ? (['arbi', 'storage', 'workspaceTrash'] as const)\n : (['arbi', 'storage', 'workspaceTrash', workspaceId] as const),\n /** A workspace's archive state; no id: every workspace's. */\n workspaceArchive: (workspaceId?: string) =>\n workspaceId === undefined\n ? (['arbi', 'workspaceArchive'] as const)\n : (['arbi', 'workspaceArchive', workspaceId] as const),\n // ── Databases ───────────────────────────────────────────────────────────────────────────────\n // Every key below names its workspace right after its kind: a list read in one workspace is never\n // served, or overwritten, in another (the list is the session's open workspace on the server).\n /** Every database query of every workspace (what a write or a switch refreshes). */\n databases: () => ['arbi', 'databases'] as const,\n /** A workspace's databases; no id: every workspace's. */\n databaseList: (workspaceId?: string) =>\n workspaceId === undefined\n ? (['arbi', 'databases', 'list'] as const)\n : (['arbi', 'databases', 'list', workspaceId] as const),\n /** One database of a workspace; no workspace: every one read. */\n database: (workspaceId?: string, databaseId?: string) =>\n workspaceId === undefined\n ? (['arbi', 'databases', 'one'] as const)\n : (['arbi', 'databases', 'one', workspaceId, databaseId ?? ''] as const),\n /**\n * A database's rows (a search); no workspace: every database's, no params: every search of one.\n * `['arbi', 'databases', 'rows', workspaceId, databaseId, params]`.\n */\n databaseRows: (workspaceId?: string, databaseId?: string, params?: object) =>\n workspaceId === undefined\n ? (['arbi', 'databases', 'rows'] as const)\n : params === undefined\n ? (['arbi', 'databases', 'rows', workspaceId, databaseId ?? ''] as const)\n : (['arbi', 'databases', 'rows', workspaceId, databaseId ?? '', params] as const),\n /** The saved dashboards of a store's scope (a workspace). */\n dashboards: (scope: string) => ['arbi', 'dashboards', scope] as const,\n /** A database's rows grouped and measured (a chart); no workspace: every database's. */\n databaseAggregate: (workspaceId?: string, databaseId?: string, request?: object) =>\n workspaceId === undefined\n ? (['arbi', 'databases', 'aggregate'] as const)\n : (['arbi', 'databases', 'aggregate', workspaceId, databaseId ?? '', request ?? {}] as const),\n // ── Configs, health ─────────────────────────────────────────────────────────────────────────\n /** Under `configs()`: the saved configuration versions. */\n configVersions: () => ['arbi', 'configs', 'versions'] as const,\n /** Under `configs()`: the JSON schema of every config model. */\n configSchema: () => ['arbi', 'configs', 'schema'] as const,\n /** Under `configs()`: one configuration. */\n config: (configId: string) => ['arbi', 'configs', 'one', configId] as const,\n /** The remote model providers' health. */\n remoteModels: () => ['arbi', 'remoteModels'] as const,\n // ── Conversations ───────────────────────────────────────────────────────────────────────────\n /** Under the conversations prefix: what a parked run waits for the owner to allow. */\n conversationPendingAuth: (conversationId: string) =>\n ['arbi', 'conversations', conversationId, 'pending-auth'] as const,\n // ── Document tools ──────────────────────────────────────────────────────────────────────────\n /** Signatures on a document (a version); no id: every document's. */\n documentSignatures: (docId?: string, version?: number | null) =>\n docId === undefined\n ? (['arbi', 'documentSignatures'] as const)\n : (['arbi', 'documentSignatures', docId, version ?? null] as const),\n /** The certificate of a signature reference. */\n signatureVerification: (reference: string) =>\n ['arbi', 'signatureVerification', reference] as const,\n /** Every signature request list: what a request write refreshes. */\n signatureRequests: () => ['arbi', 'signatureRequests'] as const,\n signatureRequestsForDocument: (docId: string) =>\n ['arbi', 'signatureRequests', 'document', docId] as const,\n /** Who may sign in a workspace; no id: every workspace's. */\n signatureCandidates: (workspaceId?: string) =>\n workspaceId === undefined\n ? (['arbi', 'signatureRequests', 'candidates'] as const)\n : (['arbi', 'signatureRequests', 'candidates', workspaceId] as const),\n /** The user's saved (informal) signature. */\n savedSignature: () => ['arbi', 'savedSignature'] as const,\n /** An html/react artifact's source. */\n artifactSource: (docId: string) => ['arbi', 'artifactSource', docId] as const,\n /** An artifact's text, under its parsed content (refreshed with it). */\n artifactText: (docId: string) => ['arbi', 'parsedDoc', docId, 'marker', 'artifact-text'] as const,\n /** An image document's bytes as an object URL. */\n assetImage: (docId: string) => ['arbi', 'assetImage', docId] as const,\n // ── Misc ────────────────────────────────────────────────────────────────────────────────────\n /** An agent config's model tier (the builder's badge). */\n agentConfigModel: (configId: string) => ['arbi', 'agentConfigModel', configId] as const,\n /** Under `billingQuotes()`: the price of a plan change. */\n billingPreview: (projectExtId: string, change: unknown) =>\n ['arbi', 'billingQuote', 'preview', projectExtId, change] as const,\n billingPlanQuote: (projectExtId: string | null, body: unknown) =>\n ['arbi', 'billingQuote', 'plan', projectExtId, body] as const,\n billingAddonQuote: (projectExtId: string, kind: string) =>\n ['arbi', 'billingQuote', 'addon', projectExtId, kind] as const,\n /** Under `contacts()`: a search of the people one can reach. */\n contactSearch: (term: string) => ['arbi', 'contacts', 'search', term] as const,\n /** Under the workspace's facts: a filtered list. */\n factList: (workspaceId: string, filter: unknown) =>\n ['arbi', 'facts', workspaceId, filter] as const,\n /**\n * Under `skills()`: a workspace's list, hidden ones included or not. Without a marketplace the\n * server lists the open workspace's skills, so the list is kept per workspace.\n */\n skillList: (workspaceId: string, includeHidden: boolean) =>\n ['arbi', 'skills', 'list', workspaceId, includeHidden] as const,\n /** Under the project's events: one kind, one page size. */\n projectEventList: (projectExtId: string, kind: string, limit: number | 'default') =>\n ['arbi', 'projects', projectExtId, 'events', kind, limit] as const,\n /** The documents pinned for offline reading on this device. */\n offlineDocuments: () => ['arbi', 'offlineDocuments'] as const,\n /** Notifications of one kind for a deployment's user (polled). */\n typedNotifications: (kind: string, apiUrl: string, userId: string | undefined) =>\n ['arbi', 'typedNotifications', kind, apiUrl, userId ?? ''] as const,\n}\n\n/**\n * Keys of the mutations a host may need to follow (its own caches outside these hooks), e.g. with\n * a `MutationCache` subscription: a workflow run creates a task in the host's own task list.\n */\nexport const arbiMutationKeys = {\n /** A member's role changed. */\n setWorkspaceMemberRoles: () => ['arbi', 'workspaces', 'roles'] as const,\n runWorkflow: () => ['arbi', 'workflows', 'run'] as const,\n updateTagKindSchema: () => ['arbi', 'tags', 'kinds', 'update'] as const,\n createTag: () => ['arbi', 'tags', 'create'] as const,\n updateTag: () => ['arbi', 'tags', 'update'] as const,\n deleteTag: () => ['arbi', 'tags', 'delete'] as const,\n extractEntities: () => ['arbi', 'tags', 'entities', 'extract'] as const,\n updateDocuments: () => ['arbi', 'documents', 'update'] as const,\n deleteDocuments: () => ['arbi', 'documents', 'delete'] as const,\n uploadDocuments: () => ['arbi', 'documents', 'upload'] as const,\n uploadUrls: () => ['arbi', 'documents', 'uploadUrls'] as const,\n assignDocTags: () => ['arbi', 'doctags', 'assign'] as const,\n removeDocTags: () => ['arbi', 'doctags', 'remove'] as const,\n updateDocTag: () => ['arbi', 'doctags', 'update'] as const,\n generateDocTags: () => ['arbi', 'doctags', 'generate'] as const,\n /** Members added to or removed from a workspace (leaving included). */\n workspaceMembership: () => ['arbi', 'workspaces', 'members'] as const,\n /** A chat turn being sent (the app's send pipeline). */\n sendMessage: () => ['arbi', 'conversations', 'send'] as const,\n}\n\n/**\n * Query keys of the calendar hooks, all under `['arbi', 'calendar']`. The calendar is the user's,\n * not a workspace's; only the overlays carry the open workspace.\n */\nexport const calendarQueryKeys = {\n all: () => ['arbi', 'calendar'] as const,\n settings: () => ['arbi', 'calendar', 'settings'] as const,\n calendars: () => ['arbi', 'calendar', 'calendars'] as const,\n /** Every event list: the prefix an event write invalidates. */\n events: () => ['arbi', 'calendar', 'events'] as const,\n eventList: (p: ListEventsParams) =>\n [\n 'arbi',\n 'calendar',\n 'events',\n { start: p.start, end: p.end, calendars: p.calendars?.join(',') ?? null },\n ] as const,\n /** Every single event read. */\n eventDetails: () => ['arbi', 'calendar', 'event'] as const,\n event: (id: string, recurrenceId?: string | null) =>\n ['arbi', 'calendar', 'event', id, recurrenceId ?? null] as const,\n shares: (calId: string) => ['arbi', 'calendar', 'shares', calId] as const,\n invitations: () => ['arbi', 'calendar', 'invitations'] as const,\n holidayCountries: () => ['arbi', 'calendar', 'holiday-countries'] as const,\n allRooms: () => ['arbi', 'calendar', 'rooms'] as const,\n rooms: (q: RoomQuery) => ['arbi', 'calendar', 'rooms', q] as const,\n freebusy: (attendees: string[], start: string, end: string) =>\n ['arbi', 'calendar', 'freebusy', attendees.join(','), start, end] as const,\n allLookups: () => ['arbi', 'calendar', 'lookup'] as const,\n lookup: (uid: string) => ['arbi', 'calendar', 'lookup', uid] as const,\n overlays: (workspaceId: string | null, w?: CalendarWindow, layers?: OverlayLayerName[]) =>\n [\n 'arbi',\n 'calendar',\n 'overlays',\n workspaceId,\n w ? { start: w.start, end: w.end, layers: layers?.join(',') } : null,\n ] as const,\n accounts: () => ['arbi', 'calendar', 'accounts'] as const,\n caldavProfiles: () => ['arbi', 'calendar', 'caldav-profiles'] as const,\n bookingPages: () => ['arbi', 'calendar', 'booking-pages'] as const,\n /** The offline outbox (writes made offline, not yet sent). */\n outbox: () => ['arbi', 'calendar', 'outbox'] as const,\n}\n\n/** Query keys of the call hooks, all under `['arbi', 'calls']`. Calls are the user's, not a workspace's. */\nexport const callQueryKeys = {\n all: () => ['arbi', 'calls'] as const,\n config: () => ['arbi', 'calls', 'config'] as const,\n call: (callExtId: string) => ['arbi', 'calls', 'call', callExtId] as const,\n /** Everything about a call's recordings: the prefix a recording event invalidates. */\n recordingsOf: (callExtId: string) => ['arbi', 'calls', 'recordings', callExtId] as const,\n recordings: (callExtId: string) => ['arbi', 'calls', 'recordings', callExtId, 'list'] as const,\n recording: (callExtId: string, recordingExtId: string) =>\n ['arbi', 'calls', 'recordings', callExtId, 'one', recordingExtId] as const,\n inviteLinks: (callExtId: string) => ['arbi', 'calls', 'invite-links', callExtId] as const,\n}\n\nexport const connectorQueryKeys = {\n all: () => ['arbi', 'connectors'] as const,\n catalog: () => ['arbi', 'connectors', 'catalog'] as const,\n mine: () => ['arbi', 'connectors', 'mine'] as const,\n mailboxFolders: (vendor: string) => ['arbi', 'connectors', 'folders', vendor] as const,\n mailboxSyncProgress: (vendor: string, workspaceExtId: string) =>\n ['arbi', 'connectors', 'sync-progress', vendor, workspaceExtId] as const,\n allMailboxSyncProgress: () => ['arbi', 'connectors', 'sync-progress'] as const,\n driveFolders: (vendor: string) => ['arbi', 'connectors', 'drive-folders', vendor] as const,\n driveFolderChildren: (vendor: string, itemId: string) =>\n ['arbi', 'connectors', 'drive-folder-children', vendor, itemId] as const,\n driveFolderDocCount: (vendor: string, itemId: string) =>\n ['arbi', 'connectors', 'drive-folder-doc-count', vendor, itemId] as const,\n driveSyncEstimate: (vendor: string) =>\n ['arbi', 'connectors', 'drive-sync-estimate', vendor] as const,\n driveSyncProgress: (vendor: string) =>\n ['arbi', 'connectors', 'drive-sync-progress', vendor] as const,\n allDriveSyncProgress: () => ['arbi', 'connectors', 'drive-sync-progress'] as const,\n slack: () => ['arbi', 'connectors', 'slack'] as const,\n}\n\nexport const mailQueryKeys = {\n all: () => ['arbi', 'mail'] as const,\n policy: () => ['arbi', 'mail', 'policy'] as const,\n accounts: () => ['arbi', 'mail', 'accounts'] as const,\n unlock: (accountId: string | undefined, sessionKey: string | null) =>\n ['arbi', 'mail', 'unlock', accountId, sessionKey ?? ''] as const,\n allFolders: () => ['arbi', 'mail', 'folders'] as const,\n folders: (accountId: string | undefined) => ['arbi', 'mail', 'folders', accountId] as const,\n allMessages: () => ['arbi', 'mail', 'messages'] as const,\n messages: (\n accountId: string | undefined,\n folderId: string | undefined,\n query: string,\n cursor: string | null\n ) => ['arbi', 'mail', 'messages', accountId, folderId, query, cursor] as const,\n message: (accountId: string | undefined, messageId: string | null | undefined) =>\n ['arbi', 'mail', 'message', accountId, messageId] as const,\n /** The projects an email's AI work can be billed to. */\n projects: () => ['arbi', 'mail', 'projects'] as const,\n /** A saved draft prepared for editing. */\n draftCompose: (accountId: string | undefined, draftId: string | undefined) =>\n ['arbi', 'mail', 'draft-compose', accountId, draftId] as const,\n attachmentText: (accountId: string, messageId: string, attachmentId: string) =>\n ['arbi', 'mail', 'attachment-text', accountId, messageId, attachmentId] as const,\n}\n\n/** `pdf`: the document as a PDF; `original`: the stored file (an image, a recording, a sheet). */\nexport type DocumentBytesKind = 'pdf' | 'original'\n\n/** Every version and kind of a document's bytes: the prefix a new version invalidates. */\nexport const documentBytesKey = (\n documentRef: string,\n version?: number | null,\n kind?: DocumentBytesKind\n) =>\n version === undefined\n ? (['arbi', 'documentBytes', documentRef] as const)\n : (['arbi', 'documentBytes', documentRef, version, kind ?? 'pdf'] as const)\n\n/** Whether `queryKey` lies under `prefix` (a factory key): React Query's own prefix match. */\nexport function isUnderQueryKey(queryKey: readonly unknown[], prefix: readonly unknown[]): boolean {\n return prefix.every((part, i) => queryKey[i] === part)\n}\n"]}
|