@arbidocs/react 0.4.131 → 0.4.133
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/artifacts/index.cjs +55 -56
- package/dist/artifacts/index.cjs.map +1 -1
- package/dist/artifacts/index.js +4 -6
- package/dist/artifacts/index.js.map +1 -1
- package/dist/{chunk-BOJHNPNJ.cjs → chunk-6PPWZILQ.cjs} +16 -11
- package/dist/chunk-6PPWZILQ.cjs.map +1 -0
- package/dist/{chunk-BUFDJCDS.js → chunk-CPPBN2JB.js} +9 -7
- package/dist/chunk-CPPBN2JB.js.map +1 -0
- package/dist/{chunk-UN3AZUXX.cjs → chunk-E5XFVK4I.cjs} +42 -29
- package/dist/chunk-E5XFVK4I.cjs.map +1 -0
- package/dist/{chunk-G6FHNURH.js → chunk-NNWMHMEC.js} +60 -3
- package/dist/chunk-NNWMHMEC.js.map +1 -0
- package/dist/{chunk-6AWF4HFU.js → chunk-PPRKQK4P.js} +16 -11
- package/dist/chunk-PPRKQK4P.js.map +1 -0
- package/dist/{chunk-XIDDXD5Y.cjs → chunk-R2MF7YCW.cjs} +9 -7
- package/dist/chunk-R2MF7YCW.cjs.map +1 -0
- package/dist/{chunk-XV7EOUQM.js → chunk-T253I7XC.js} +17 -5
- package/dist/chunk-T253I7XC.js.map +1 -0
- package/dist/{chunk-S7J5SCTZ.cjs → chunk-TYUQFRHF.cjs} +4 -4
- package/dist/{chunk-S7J5SCTZ.cjs.map → chunk-TYUQFRHF.cjs.map} +1 -1
- package/dist/{chunk-6JSXDLIQ.js → chunk-ZJ6NQ4M4.js} +3 -3
- package/dist/{chunk-6JSXDLIQ.js.map → chunk-ZJ6NQ4M4.js.map} +1 -1
- package/dist/{chunk-5DCRIWCA.cjs → chunk-ZWFMFOGP.cjs} +68 -2
- package/dist/chunk-ZWFMFOGP.cjs.map +1 -0
- package/dist/document-tools/index.cjs +26 -27
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.js +4 -5
- package/dist/document-tools/index.js.map +1 -1
- package/dist/{index-C7OqcKY3.d.cts → index-D8NvRj3J.d.cts} +16 -7
- package/dist/{index-C7OqcKY3.d.ts → index-D8NvRj3J.d.ts} +16 -7
- package/dist/index.cjs +372 -225
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +174 -23
- package/dist/index.d.ts +174 -23
- package/dist/index.js +173 -40
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +10 -6
- package/dist/shell/index.d.cts +1 -1
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/viewers/index.cjs +2 -2
- package/dist/viewers/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-5DCRIWCA.cjs.map +0 -1
- package/dist/chunk-6AWF4HFU.js.map +0 -1
- package/dist/chunk-74UTKIWQ.js +0 -62
- package/dist/chunk-74UTKIWQ.js.map +0 -1
- package/dist/chunk-BOJHNPNJ.cjs.map +0 -1
- package/dist/chunk-BUFDJCDS.js.map +0 -1
- package/dist/chunk-G6FHNURH.js.map +0 -1
- package/dist/chunk-NUFEZBA5.cjs +0 -72
- package/dist/chunk-NUFEZBA5.cjs.map +0 -1
- package/dist/chunk-UN3AZUXX.cjs.map +0 -1
- package/dist/chunk-XIDDXD5Y.cjs.map +0 -1
- package/dist/chunk-XV7EOUQM.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode, ComponentType } from 'react';
|
|
3
3
|
import * as _arbidocs_sdk_browser from '@arbidocs/sdk/browser';
|
|
4
|
-
import { ArbiOptions, QueryOptions,
|
|
4
|
+
import { Arbi, ArbiOptions, QueryOptions, SSEStreamResult, SSEStreamStartData, UserMessageEvent, MessageMetadataPayload, ResponseOutputItemDoneEvent, ArtifactEvent, TagListQuery, StepActionRequest, UpdateConversationRequest, UpdateWorkflowRequest, TagKind, TagKindSchema, TagFieldDefinition, ProjectEventKind, ProjectUpdateRequest, contacts, LoginProfile, settings, DecryptedChatMessage } from '@arbidocs/sdk/browser';
|
|
5
5
|
export { ActivityKind, ActivityResponse, AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent, AuthMode, ConversationResponse, CreateFactRequest, CreateWorkRequest, CreateWorkflowRequest, DEFAULT_AI_USD_PER_GBP, FactResponse, FactSearchRequest, FactSearchResponse, LoginProfile, MessageMetadataPayload, OutputTokensDetails, PendingAuthResponse, PlanWorkRequest, ProjectInvoicesResponse, ProjectUsageResponse, QueryOptions, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseCreatedEvent, ResponseFailedEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputTextDeltaEvent, ResponseOutputTextDoneEvent, ResponseUsage, SSEStreamCallbacks, SSEStreamResult, SSEStreamStartData, SkillSummary, TaskPlan, UpdateConversationRequest, UpdateWorkflowRequest, UserDailyUsageResponse, UserInputRequestEvent, UserMessageEvent, WorkStatus, WorkflowAuthMode, WorkflowResponse, WorkflowRunResponse, formatGbp, formatGbpPerMillionTokens, usdToGbp } from '@arbidocs/sdk/browser';
|
|
6
6
|
import * as _arbidocs_client from '@arbidocs/client';
|
|
7
7
|
import { WebSocketServerMessage, WsTaskUpdateMessage, WsPresenceUpdateMessage, components, RecoveryKeyParams } from '@arbidocs/client';
|
|
@@ -16,7 +16,7 @@ import { VerificationResult } from '@didit-protocol/sdk-web';
|
|
|
16
16
|
import { LucideIcon } from 'lucide-react';
|
|
17
17
|
import { Components } from 'react-markdown';
|
|
18
18
|
export { D as DraftCleanReport, a as DraftCleanStage, c as cleanDraftMarkdown, b as cleanDraftWithReport, p as promoteBoldTitle, r as repairParsedStructure, d as repairParsedTitle, s as stripAgentPreamble, u as unescapeMarkdown, e as unwrapCitationLinks } from './stored-markdown-Bp18vrbr.cjs';
|
|
19
|
-
export { A as AppNotification, D as DEFAULT_NOTIFY_TONE, N as NotificationBell, a as NotificationBellProps, b as NotificationBellTriggerState, c as NotifyOptions, d as NotifyVariant, T as Toaster, n as notify, s as seedNotifications, e as selectUnread, u as useNotify } from './index-
|
|
19
|
+
export { A as AppNotification, D as DEFAULT_NOTIFY_TONE, N as NotificationBell, a as NotificationBellProps, b as NotificationBellTriggerState, c as NotifyOptions, d as NotifyVariant, T as Toaster, n as notify, s as seedNotifications, e as selectUnread, u as useNotify } from './index-D8NvRj3J.cjs';
|
|
20
20
|
import { ColDef } from 'ag-grid-community';
|
|
21
21
|
export { ToasterProps, toast } from 'sonner';
|
|
22
22
|
import 'clsx';
|
|
@@ -41,10 +41,12 @@ import '@radix-ui/react-toggle';
|
|
|
41
41
|
import '@radix-ui/react-toggle-group';
|
|
42
42
|
import 'rehype-sanitize';
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
type ArbiProviderProps = {
|
|
45
45
|
children: ReactNode;
|
|
46
|
-
}
|
|
47
|
-
|
|
46
|
+
} & ({
|
|
47
|
+
arbi: Arbi;
|
|
48
|
+
} | ArbiOptions);
|
|
49
|
+
declare function ArbiProvider({ children, ...props }: ArbiProviderProps): React$1.JSX.Element;
|
|
48
50
|
|
|
49
51
|
interface ArbiChatPassage {
|
|
50
52
|
id: string;
|
|
@@ -551,6 +553,8 @@ declare const arbiQueryKeys: {
|
|
|
551
553
|
tagList: (workspaceId: string, query: string) => readonly ["arbi", "tags", string, "list", string];
|
|
552
554
|
/** A kind's fields, under the workspace's tags. */
|
|
553
555
|
tagKind: (workspaceId: string, kind: string) => readonly ["arbi", "tags", string, "kind", string];
|
|
556
|
+
/** A task's history, under the conversations prefix: every conversation write refreshes it. */
|
|
557
|
+
conversationActivity: (conversationId: string) => readonly ["arbi", "conversations", string, "activity"];
|
|
554
558
|
/** Under the conversations prefix: every step action or conversation write refreshes it. */
|
|
555
559
|
conversationUsage: (conversationId: string) => readonly ["arbi", "conversations", string, "usage"];
|
|
556
560
|
thumbnails: (docIds: string[]) => readonly ["arbi", "thumbnails", string];
|
|
@@ -559,6 +563,8 @@ declare const arbiQueryKeys: {
|
|
|
559
563
|
sessions: () => readonly ["arbi", "sessions"];
|
|
560
564
|
health: () => readonly ["arbi", "health"];
|
|
561
565
|
workflows: () => readonly ["arbi", "workflows"];
|
|
566
|
+
/** Under `workflows()`: a workflow write or run refreshes its runs too. */
|
|
567
|
+
workflowRuns: (workflowId: string) => readonly ["arbi", "workflows", string, "runs"];
|
|
562
568
|
facts: (workspaceId: string) => readonly ["arbi", "facts", string];
|
|
563
569
|
configs: () => readonly ["arbi", "configs"];
|
|
564
570
|
activity: () => readonly ["arbi", "activity"];
|
|
@@ -580,6 +586,11 @@ declare const arbiQueryKeys: {
|
|
|
580
586
|
/** An agent's pinned config; `undefined` = the library default config. */
|
|
581
587
|
agentConfig: (agentExtId?: string) => readonly ["arbi", "agentConfig", string];
|
|
582
588
|
agentWorkspaces: (agentExtId: string) => readonly ["arbi", "agentWorkspaces", string];
|
|
589
|
+
/** An agent's own login, polled while its controls are open. */
|
|
590
|
+
agentSession: (agentExtId: string) => readonly ["arbi", "agentSession", string];
|
|
591
|
+
agentChats: (agentExtId: string) => readonly ["arbi", "agentChats", string];
|
|
592
|
+
authorizeLimits: () => readonly ["arbi", "authorizeLimits"];
|
|
593
|
+
mcpTools: () => readonly ["arbi", "mcpTools"];
|
|
583
594
|
models: () => readonly ["arbi", "models"];
|
|
584
595
|
/** The signed-in user's own profile (name, picture, email). */
|
|
585
596
|
profile: () => readonly ["arbi", "profile"];
|
|
@@ -587,6 +598,13 @@ declare const arbiQueryKeys: {
|
|
|
587
598
|
/** The signed-in user's settings record (notification preferences, flags). */
|
|
588
599
|
userSettings: () => readonly ["arbi", "userSettings"];
|
|
589
600
|
};
|
|
601
|
+
/**
|
|
602
|
+
* Keys of the mutations a host may need to follow (its own caches outside these hooks), e.g. with
|
|
603
|
+
* a `MutationCache` subscription: a workflow run creates a task in the host's own task list.
|
|
604
|
+
*/
|
|
605
|
+
declare const arbiMutationKeys: {
|
|
606
|
+
runWorkflow: () => readonly ["arbi", "workflows", "run"];
|
|
607
|
+
};
|
|
590
608
|
/** Workspace people for mentions and ownership. */
|
|
591
609
|
declare function useWorkspaceUsers(workspaceId: string | undefined, options?: {
|
|
592
610
|
enabled?: boolean;
|
|
@@ -2479,6 +2497,21 @@ declare function useWorkflows(options?: {
|
|
|
2479
2497
|
created_at: string;
|
|
2480
2498
|
updated_at: string;
|
|
2481
2499
|
}[]>, Error>;
|
|
2500
|
+
/** A workflow's runs, re-read every few seconds while shown (a run moves on by itself). */
|
|
2501
|
+
declare function useWorkflowRuns(workflowId: string | undefined): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
2502
|
+
conversation_ext_id?: string | null;
|
|
2503
|
+
id: number;
|
|
2504
|
+
status: string;
|
|
2505
|
+
action_type: string;
|
|
2506
|
+
result: {
|
|
2507
|
+
[key: string]: unknown;
|
|
2508
|
+
} | null;
|
|
2509
|
+
label_ext_id: string | null;
|
|
2510
|
+
document_ext_ids: string[];
|
|
2511
|
+
error: string | null;
|
|
2512
|
+
created_at: string;
|
|
2513
|
+
completed_at: string | null;
|
|
2514
|
+
}[]>, Error>;
|
|
2482
2515
|
/** Create a workflow from a `CreateWorkflowRequest`. Resolves with the created workflow. */
|
|
2483
2516
|
declare function useCreateWorkflow(): _tanstack_react_query.UseMutationResult<{
|
|
2484
2517
|
external_id: string;
|
|
@@ -2603,6 +2636,33 @@ declare function useCreateAgent(): _tanstack_react_query.UseMutationResult<{
|
|
|
2603
2636
|
is_identity_verified: boolean;
|
|
2604
2637
|
signing_private_key: string;
|
|
2605
2638
|
}, Error, string, unknown>;
|
|
2639
|
+
/**
|
|
2640
|
+
* Generate an avatar for an owned agent from a prompt and set it as its picture. Resolves with the
|
|
2641
|
+
* agent (`picture` set); the agent list refreshes.
|
|
2642
|
+
*/
|
|
2643
|
+
declare function useGenerateAgentAvatar(): _tanstack_react_query.UseMutationResult<{
|
|
2644
|
+
picture: string;
|
|
2645
|
+
}, Error, {
|
|
2646
|
+
agentExtId: string;
|
|
2647
|
+
prompt: string;
|
|
2648
|
+
}, unknown>;
|
|
2649
|
+
/** The default and maximum lifetime of a temporary agent authorization (seconds). */
|
|
2650
|
+
declare function useAuthorizeLimits(options?: {
|
|
2651
|
+
enabled?: boolean;
|
|
2652
|
+
}): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
2653
|
+
default_ttl_seconds: number;
|
|
2654
|
+
max_ttl_seconds: number;
|
|
2655
|
+
}>, Error>;
|
|
2656
|
+
/** The MCP tools registered on the deployment, for an agent's tool picker. */
|
|
2657
|
+
declare function useMcpTools(options?: {
|
|
2658
|
+
enabled?: boolean;
|
|
2659
|
+
}): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
2660
|
+
tools: {
|
|
2661
|
+
name: string;
|
|
2662
|
+
description: string;
|
|
2663
|
+
server_name: string;
|
|
2664
|
+
}[];
|
|
2665
|
+
}>, Error>;
|
|
2606
2666
|
/**
|
|
2607
2667
|
* An agent's pinned config (persona, model, tool switches), or the library default config when
|
|
2608
2668
|
* `agentExtId` is omitted: edit forms seed from the first, create forms from the second.
|
|
@@ -2745,6 +2805,7 @@ declare function useAgentChats(agentId: string | undefined): _tanstack_react_que
|
|
|
2745
2805
|
title: string;
|
|
2746
2806
|
updated_at: string;
|
|
2747
2807
|
}[]>, Error>;
|
|
2808
|
+
/** Log an owned agent in on its own (optionally into a workspace). */
|
|
2748
2809
|
declare function useStartAgentSession(): _tanstack_react_query.UseMutationResult<{
|
|
2749
2810
|
backend: string;
|
|
2750
2811
|
active: boolean;
|
|
@@ -2754,6 +2815,7 @@ declare function useStartAgentSession(): _tanstack_react_query.UseMutationResult
|
|
|
2754
2815
|
agentId: string;
|
|
2755
2816
|
workspaceId?: string;
|
|
2756
2817
|
}, unknown>;
|
|
2818
|
+
/** Log an owned agent out. */
|
|
2757
2819
|
declare function useCloseAgentSession(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
|
|
2758
2820
|
|
|
2759
2821
|
/** Refresh what a tag, doctag or fact change affects: the workspace's tags, tables and facts. */
|
|
@@ -3824,12 +3886,17 @@ declare function useWorkspaceNotificationLevel(workspaceId: string | null | unde
|
|
|
3824
3886
|
isSaving: boolean;
|
|
3825
3887
|
error: Error | null;
|
|
3826
3888
|
};
|
|
3889
|
+
/** What the host does once a follow switch is saved or refused (e.g. a toast: nothing else shows). */
|
|
3890
|
+
interface FollowSaveCallbacks {
|
|
3891
|
+
onSuccess?: () => void;
|
|
3892
|
+
onError?: (error: Error) => void;
|
|
3893
|
+
}
|
|
3827
3894
|
/** Whether the user follows a thread (pushed everything in it), and the switch. */
|
|
3828
3895
|
declare function useFollowThread(conversationId: string | null | undefined, options?: {
|
|
3829
3896
|
enabled?: boolean;
|
|
3830
3897
|
}): {
|
|
3831
3898
|
following: boolean;
|
|
3832
|
-
setFollowing: (on: boolean) => void;
|
|
3899
|
+
setFollowing: (on: boolean, callbacks?: FollowSaveCallbacks) => void;
|
|
3833
3900
|
isLoading: boolean;
|
|
3834
3901
|
isSaving: boolean;
|
|
3835
3902
|
error: Error | null;
|
|
@@ -6275,8 +6342,8 @@ declare function useCommandPalette(): CommandPaletteValue;
|
|
|
6275
6342
|
* REUSE-FIRST: this composes AG Grid + `DocumentEntity`/`TagEntity` + the shadcn
|
|
6276
6343
|
* `Badge`; it is not a bespoke table. Data comes from the SDK `useDocuments`
|
|
6277
6344
|
* hook (or an explicit `documents` prop). Selection is controlled via
|
|
6278
|
-
* `selectedIds`/`onSelectionChange`, falling back to
|
|
6279
|
-
* `
|
|
6345
|
+
* `selectedIds`/`onSelectionChange`, falling back to
|
|
6346
|
+
* the session state (`useArbiSessionState`) when those props are omitted.
|
|
6280
6347
|
*/
|
|
6281
6348
|
|
|
6282
6349
|
type DocResponse$2 = components['schemas']['DocResponse'];
|
|
@@ -6338,7 +6405,7 @@ declare function DocumentCardMenu({ docId, fileName, onOpen, onRename, canDelete
|
|
|
6338
6405
|
* DocumentGallery — a reusable thumbnail-grid view of a workspace's documents.
|
|
6339
6406
|
*
|
|
6340
6407
|
* REUSE-FIRST: a sibling of `DocumentTable` sharing the exact same data sources
|
|
6341
|
-
* (`useDocuments` + `useTags` + the
|
|
6408
|
+
* (`useDocuments` + `useTags` + the session state's selection).
|
|
6342
6409
|
* The only extra dependency is `useThumbnails`, which batch-loads real first-page
|
|
6343
6410
|
* previews. Each tile is a `DocumentCard`; this component only binds it to data.
|
|
6344
6411
|
*/
|
|
@@ -6930,20 +6997,104 @@ declare function VideoCapture({ onSave, onDiscard, onError, isSaving }: VideoCap
|
|
|
6930
6997
|
declare function hasVideoTrack(blob: Blob): Promise<boolean>;
|
|
6931
6998
|
|
|
6932
6999
|
/**
|
|
6933
|
-
*
|
|
7000
|
+
* The session state every block reads and writes: the selected workspace, the current conversation,
|
|
7001
|
+
* the document being viewed, the document selection, generation per conversation, Personal
|
|
7002
|
+
* Assistant mode and the documents in each conversation.
|
|
6934
7003
|
*
|
|
6935
|
-
*
|
|
6936
|
-
*
|
|
6937
|
-
*
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
7004
|
+
* An {@link ArbiSessionStore} is the adapter a host provides through `ArbiSessionStateProvider`:
|
|
7005
|
+
* a host with its own state (ARBI-frontend's zustand store) maps its fields onto
|
|
7006
|
+
* {@link ArbiSessionState} and its actions onto the setters, so there is one source of truth.
|
|
7007
|
+
* Other hosts use {@link createArbiSessionStore}, an in-memory store.
|
|
7008
|
+
*/
|
|
7009
|
+
/** The document being viewed. */
|
|
7010
|
+
interface ArbiViewingDocument {
|
|
7011
|
+
/** The document (`doc-…`), or a version reference (`doc-…@v2`) while an earlier version shows. */
|
|
7012
|
+
id: string;
|
|
7013
|
+
/** The page being read, when known. */
|
|
7014
|
+
page: number | null;
|
|
7015
|
+
/** The passage being read, when one is. */
|
|
7016
|
+
passageId: string | null;
|
|
7017
|
+
}
|
|
7018
|
+
/** Generation in one conversation. */
|
|
7019
|
+
interface ArbiConversationGeneration {
|
|
7020
|
+
isGenerating: boolean;
|
|
7021
|
+
error: string | null;
|
|
7022
|
+
/** When the running turn started (epoch ms). */
|
|
7023
|
+
startTime: number | null;
|
|
7024
|
+
}
|
|
7025
|
+
/** A document in a conversation's context; a pinned one stays there across turns. */
|
|
7026
|
+
interface ArbiConversationDocument {
|
|
7027
|
+
docId: string;
|
|
7028
|
+
isPinned: boolean;
|
|
7029
|
+
}
|
|
7030
|
+
interface ArbiSessionState {
|
|
7031
|
+
/** The selected workspace (`wrk-…`). */
|
|
7032
|
+
workspaceId: string | null;
|
|
7033
|
+
/** The open conversation, or null for a new one / none. */
|
|
7034
|
+
conversationId: string | null;
|
|
7035
|
+
viewingDocument: ArbiViewingDocument | null;
|
|
7036
|
+
/** The documents selected in document lists. */
|
|
7037
|
+
selectedDocumentIds: readonly string[];
|
|
7038
|
+
/** Generation state per conversation id. */
|
|
7039
|
+
generating: Readonly<Record<string, ArbiConversationGeneration>>;
|
|
7040
|
+
/** Personal Assistant mode for new conversations. */
|
|
7041
|
+
paMode: boolean;
|
|
7042
|
+
/** The documents in each conversation's context, per conversation id. */
|
|
7043
|
+
conversationDocuments: Readonly<Record<string, readonly ArbiConversationDocument[]>>;
|
|
7044
|
+
}
|
|
7045
|
+
/** What to view: page and passage are left unchanged when omitted. */
|
|
7046
|
+
interface ArbiViewingDocumentInput {
|
|
7047
|
+
id: string;
|
|
7048
|
+
page?: number | null;
|
|
7049
|
+
passageId?: string | null;
|
|
7050
|
+
}
|
|
7051
|
+
interface ArbiSessionStore {
|
|
7052
|
+
/** The current state. The same object until something in it changes. */
|
|
7053
|
+
getState(): ArbiSessionState;
|
|
7054
|
+
/** Be told when the state may have changed. Returns the unsubscribe. */
|
|
7055
|
+
subscribe(listener: () => void): () => void;
|
|
7056
|
+
setWorkspaceId(id: string | null): void;
|
|
7057
|
+
setConversationId(id: string | null): void;
|
|
7058
|
+
/**
|
|
7059
|
+
* View a document, or none. Viewing another document resets the page; `page` and `passageId`
|
|
7060
|
+
* set them when given.
|
|
7061
|
+
*/
|
|
7062
|
+
setViewingDocument(document: ArbiViewingDocumentInput | null): void;
|
|
7063
|
+
setSelectedDocumentIds(ids: string[]): void;
|
|
7064
|
+
setConversationGenerating(conversationId: string, isGenerating: boolean): void;
|
|
7065
|
+
setPaMode(enabled: boolean): void;
|
|
7066
|
+
setConversationDocuments(conversationId: string, documents: ArbiConversationDocument[]): void;
|
|
7067
|
+
}
|
|
7068
|
+
declare const EMPTY_SESSION_STATE: ArbiSessionState;
|
|
7069
|
+
/** The viewed document itself (`doc-…`), also while one of its earlier versions is on screen. */
|
|
7070
|
+
declare const selectViewingDocumentId: (state: ArbiSessionState) => string | null;
|
|
7071
|
+
/** Whether `conversationId` is generating. */
|
|
7072
|
+
declare const selectIsGenerating: (conversationId: string | null | undefined) => (state: ArbiSessionState) => boolean;
|
|
7073
|
+
/** The next viewing document, given the current one (shared by every store implementation). */
|
|
7074
|
+
declare function nextViewingDocument(current: ArbiViewingDocument | null, input: ArbiViewingDocumentInput | null): ArbiViewingDocument | null;
|
|
7075
|
+
/** An in-memory session store: the default for hosts without state of their own. */
|
|
7076
|
+
declare function createArbiSessionStore(initial?: Partial<ArbiSessionState>): ArbiSessionStore;
|
|
7077
|
+
|
|
7078
|
+
/**
|
|
7079
|
+
* The session state the blocks below share (see `./store`). A host passes its own
|
|
7080
|
+
* {@link ArbiSessionStore} (ARBI-frontend backs it with its zustand store). Without `store` the
|
|
7081
|
+
* provider uses the one above it, else keeps an in-memory one, so a kit (`ConnectionProvider`) can
|
|
7082
|
+
* always mount one and still share the host's. Blocks rendered with no provider above share a
|
|
7083
|
+
* module default, so a standalone block still coordinates with its siblings.
|
|
7084
|
+
*/
|
|
7085
|
+
|
|
7086
|
+
interface ArbiSessionStateProviderProps {
|
|
7087
|
+
/** The host's session state. Omitted: the enclosing provider's, else an in-memory one. */
|
|
7088
|
+
store?: ArbiSessionStore;
|
|
7089
|
+
children: ReactNode;
|
|
6946
7090
|
}
|
|
6947
|
-
declare
|
|
7091
|
+
declare function ArbiSessionStateProvider({ store, children, }: ArbiSessionStateProviderProps): React.ReactElement;
|
|
7092
|
+
/** The session store: its setters, and `getState()` for the state as of now (in callbacks). */
|
|
7093
|
+
declare function useArbiSessionStore(): ArbiSessionStore;
|
|
7094
|
+
/**
|
|
7095
|
+
* A slice of the session state; re-renders when it changes. The selector returns a value from the
|
|
7096
|
+
* state or a primitive (a new object each call would never settle).
|
|
7097
|
+
*/
|
|
7098
|
+
declare function useArbiSessionState<T>(selector: (state: ArbiSessionState) => T): T;
|
|
6948
7099
|
|
|
6949
|
-
export { AUDIO_MIME_PREFERENCE, type AccountClient, type AccountClientContextValue, AccountClientProvider, type AccountClientProviderProps, type AccountSession, type AccountSignOutOptions, type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, type AgentAccessMode, type AgentConfigSections, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, type AiRunOptions, type AiTaskStatus, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, type ArbiChat, type ArbiChatCitation, type ArbiChatDocument, type ArbiChatMessage, type ArbiChatMessageStatus, type ArbiChatPassage, type ArbiChatRole, type ArbiChatThread, ArbiProvider, type ArbiProviderProps, type
|
|
7100
|
+
export { AUDIO_MIME_PREFERENCE, type AccountClient, type AccountClientContextValue, AccountClientProvider, type AccountClientProviderProps, type AccountSession, type AccountSignOutOptions, type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, type AgentAccessMode, type AgentConfigSections, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, type AiRunOptions, type AiTaskStatus, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, type ArbiChat, type ArbiChatCitation, type ArbiChatDocument, type ArbiChatMessage, type ArbiChatMessageStatus, type ArbiChatPassage, type ArbiChatRole, type ArbiChatThread, type ArbiConversationDocument, type ArbiConversationGeneration, ArbiProvider, type ArbiProviderProps, type ArbiSessionState, ArbiSessionStateProvider, type ArbiSessionStateProviderProps, type ArbiSessionStore, type ArbiViewingDocument, type ArbiViewingDocumentInput, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, type AspectOption, AudIcon, type AudioRecorderState, type AudioSegment, type AvatarCrop, type AvatarFileProblem, ChatBubble, type ChatBubbleProps, type Chunk, type ChunkActivation, type ChunkedRecorder, type ChunkedRecorderOptions, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_PASSWORD_CHANGE_FORM_MESSAGES, DEFAULT_SEGMENTER_CONFIG, DEFAULT_START_BY_EMAIL_LABELS, DateSeparator, type DateSeparatorProps, type DeleteAccountBlocker, type DeleteAccountFlow, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentCardMenu, type DocumentCardMenuProps, DocumentGallery, type DocumentGalleryProps, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, DraftTitleControls, type DraftTitleControlsProps, EMPTY_SESSION_STATE, type EmailChange, type EmailPreferences, EmlIcon, EntityIconComponent, FILE_TYPE_COLORS, FileIcon, FireworksIcon, type FollowSaveCallbacks, GeminiIcon, GitHubIcon, GoogleIcon, type GrantAgentAccessVars, HtmlIcon, INITIAL_SEGMENTER_STATE, IdentityPurchase, IdentityStatus, IdentityStep, type IdentityVerificationApi, IdentityVerificationFlow, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, InlineMicButton, type InlineMicButtonProps, LinkedInIcon, MAIL_DRAFT_REPLACED_EVENT, MAX_AVATAR_FILE_BYTES, type MailAccount, type MailAddress, type MailAttachment, type MailClient, type MailClientContextValue, MailClientProvider, type MailClientProviderProps, type MailCompose, type MailDeliveryRecipient, type MailDeliveryStatus, type MailDeviceFallback, type MailDraftEditorRequest, type MailDraftEditorSession, type MailFetch, type MailFolder, type MailMessage, type MailMessageUpdate, MailOfflineUnavailableError, type MailPage, type MailPolicy, type MailProject, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, MicRecordingOverlay, type MicRecordingOverlayProps, MicWaveformIndicator, type MicWaveformIndicatorProps, type MountDiditOptions, type NameEditor, type NotificationPreferencesModel, type NotificationTypeMeta, OpenAIIcon, PROJECT_CREATION_DENIED_REASON, type PaletteNavItem, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, type PasswordChangeForm, type PasswordChangeFormMessages, type PasswordChangeVars, PdfIcon, PhotoCapture, type PhotoCaptureProps, type ProfileView, type ProjectsUsageAggregate, ProviderIcon, RUN_WINDOW_MS, type RecordedChunk, type RelevancePatch, type RenderMarkdown, type SaveAgentConfigVars, type SearchChunk, type SegmenterConfig, type SegmenterEvent, type SegmenterState, SemanticSearch, type SemanticSearchProps, type ShellRecentWorkspaceItem, type ShellWorkspaceItem, type ShellWorkspaceKind, type ShellWorkspaceMember, type ShellWorkspaceSeed, type ShellWorkspaceSource, StartByEmail, type StartByEmailLabels, type StartByEmailProps, type ThreadAccessors, type ThreadItem, type ToolResponses, TxtIcon, TypingIndicator, type UpdateProfileVars, type UsageTotals, type UseArbiChatOptions, type UseArbiShellWorkspacesOptions, type UseAudioRecorderOptions, type UseAudioRecorderResult, type UseAvatarCropOptions, type UseCameraStreamResult, type UseDeleteAccountFlowOptions, type UseDirectMessagesResult, type UseEmailChangeOptions, type UseIdentityVerificationFlowOptions, type UseNameEditorOptions, type UsePasswordChangeFormOptions, type UseShellWorkspacesOptions, type UseShellWorkspacesResult, type UseVideoRecorderResult, VIDEO_MIME_PREFERENCE, VidIcon, VideoCapture, type VideoCaptureProps, type VideoRecorderState, VoiceNoteRecorder, type VoiceNoteRecorderProps, type WorkspaceNotificationLevel, XlsIcon, accountPath, aliasTakenMessage, annotateThread, announceMailDraftReplaced, arbiAccountClient, arbiMailClient, arbiMutationKeys, arbiQueryKeys, captureFrameAsBlob, classifyMediaError, createArbiSessionStore, createChunkedRecorder, createMailClient, cropImage, dayKey, defaultMailAlias, describeActivity, downloadRecoveryFile, fileAttachment, flushSegmenter, formatElapsed, formatIdentityPrice, formatRelativeTime, getNotificationTypeMeta, getWorkspaceActionText, getWorkspaceKind, getWorkspaceSentPhrase, hasVideoTrack, identityStepFor, invalidateTagData, isAliasTakenError, isUsageMetered, isWorkspaceNotificationType, levelFromRms, mailDraftIdFromContent, mailJson, mailQueryKeys, mountDiditVerification, nextAliasSuggestion, nextViewingDocument, parseActivityContent, parseDeleteAccountBlockers, pickRecentWorkspaces, pickRecorderMimeType, redlineStats, resolveActiveWorkspace, selectIsGenerating, selectViewingDocumentId, stepSegmenter, textToArtifact, titleFromQuestion, toChatCitations, toNotificationPreferences, toProfileView, toRedlineMarkdown, toShellWorkspace, useAccountClient, useActOnStep, useActivity, useAgentChats, useAgentConfig, useAgentModels, useAgentSession, useAgentWorkspaces, useAgents, useAiTask, useArbi, useArbiChat, useArbiConnected, useArbiDocumentSync, useArbiSessionState, useArbiSessionStore, useArbiShellWorkspaces, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useAudioRecorder, useAuthorizeLimits, useAvatarCrop, useCameraStream, useCanCreateProjects, useClaimNativeAlias, useCloseAgentSession, useCommandPalette, useConfigs, useConfirmEmailChange, useConnectMailAccount, useContacts, useConversationActivity, useConversationPendingAuth, useConversationThreads, useConversationUsage, useConversations, useCreateAgent, useCreateContact, useCreateWork, useCreateWorkflow, useCurrentSessionId, useCurrentUser, useDeleteAccount, useDeleteAccountFlow, useDeleteAgents, useDeleteContact, useDeleteWorkflow, useDeploymentDomain, useDirectMessages, useDisconnectMailAccount, useDocuments, useEmailChange, useFacts, useFilteredProjects, useFirmPool, useFollowThread, useGenerateAgentAvatar, useGrantAgentAccess, useHealth, useIdentityVerification, useIdentityVerificationFlow, useInvalidateTagData, useInviteContacts, useMailAccounts, useMailCache, useMailClient, useMailDraftCompose, useMailDraftEditor, useMailDraftReplaced, useMailFolders, useMailMessage, useMailMessages, useMailOnline, useMailPolicy, useMailProjects, useMailUnlock, useMcpTools, useNameEditor, useNotificationPreferences, useParsedDocument, usePasswordChange, usePasswordChangeForm, usePendingContacts, usePlanWork, useProfile, useProjectConversationUsage, useProjectEvents, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useRequestEmailChange, useRevokeAgentAccess, useRunConversation, useRunWorkflow, useSaveAgentConfig, useSaveMailDraft, useSemanticSearch, useSendBackStep, useSendMail, useSessions, useSetTagValues, useShellWorkspaces, useSignOut, useSkills, useStartAgentSession, useStartWorkQuery, useTagKindSchema, useTags, useTerminateSession, useThumbnails, useTopUpFirmPool, useUpdateContact, useUpdateConversation, useUpdateMailMessage, useUpdateProfile, useUpdateProjectFields, useUpdateTagKindSchema, useUpdateWorkflow, useUploadSkillFiles, useUserSettings, useUserUsageToday, useVideoRecorder, useWorkNotifications, useWorkflowRuns, useWorkflows, useWorkspaceActivity, useWorkspaceDocs, useWorkspaceNotificationLevel, useWorkspaceUsers, useWorkspaces, userDisplayName, userInitials, workflowStepOf };
|