@arbidocs/react 0.3.101 → 0.3.103
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/index.cjs +31 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +64 -3
- package/dist/index.d.ts +64 -3
- package/dist/index.js +29 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { ArbiOptions, Arbi, SSEStreamResult, SSEStreamStartData, AgentStepEvent } from '@arbidocs/sdk/browser';
|
|
4
|
-
export { AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent, MessageMetadataPayload, OutputTokensDetails, QueryOptions, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseCreatedEvent, ResponseFailedEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputTextDeltaEvent, ResponseOutputTextDoneEvent, ResponseUsage, SSEStreamCallbacks, SSEStreamResult, SSEStreamStartData, UserInputRequestEvent, UserMessageEvent } from '@arbidocs/sdk/browser';
|
|
3
|
+
import { ArbiOptions, Arbi, SSEStreamResult, SSEStreamStartData, AgentStepEvent, ArtifactEvent } from '@arbidocs/sdk/browser';
|
|
4
|
+
export { AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent, CreateMemoryRequest, CreateTaskRequest, MemoryResponse, MemorySearchRequest, MemorySearchResponse, MessageMetadataPayload, OutputTokensDetails, QueryOptions, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseCreatedEvent, ResponseFailedEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputTextDeltaEvent, ResponseOutputTextDoneEvent, ResponseUsage, SSEStreamCallbacks, SSEStreamResult, SSEStreamStartData, TaskResponse, UpdateTaskRequest, UserInputRequestEvent, UserMessageEvent } from '@arbidocs/sdk/browser';
|
|
5
5
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
6
6
|
import * as _arbidocs_client from '@arbidocs/client';
|
|
7
7
|
import { components } from '@arbidocs/client';
|
|
@@ -175,6 +175,9 @@ declare const arbiQueryKeys: {
|
|
|
175
175
|
agents: () => readonly ["arbi", "agents"];
|
|
176
176
|
sessions: () => readonly ["arbi", "sessions"];
|
|
177
177
|
health: () => readonly ["arbi", "health"];
|
|
178
|
+
tasks: () => readonly ["arbi", "tasks"];
|
|
179
|
+
memories: (workspaceId: string) => readonly ["arbi", "memories", string];
|
|
180
|
+
configs: () => readonly ["arbi", "configs"];
|
|
178
181
|
};
|
|
179
182
|
/** List the logged-in user's workspaces. */
|
|
180
183
|
declare function useWorkspaces(options?: {
|
|
@@ -317,6 +320,7 @@ declare function useAssistantQuery(): _tanstack_react_query.UseMutationResult<SS
|
|
|
317
320
|
onToken?: (content: string) => void;
|
|
318
321
|
onStreamStart?: (data: SSEStreamStartData) => void;
|
|
319
322
|
onAgentStep?: (data: AgentStepEvent) => void;
|
|
323
|
+
onArtifact?: (data: ArtifactEvent) => void;
|
|
320
324
|
onError?: (message: string) => void;
|
|
321
325
|
onComplete?: () => void;
|
|
322
326
|
}, unknown>;
|
|
@@ -376,6 +380,63 @@ declare function useHealth(options?: {
|
|
|
376
380
|
} | null | undefined;
|
|
377
381
|
available_models: string[];
|
|
378
382
|
}>, Error>;
|
|
383
|
+
/** List the caller's scheduled agent tasks. */
|
|
384
|
+
declare function useTasks(options?: {
|
|
385
|
+
enabled?: boolean;
|
|
386
|
+
}): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
387
|
+
external_id: string;
|
|
388
|
+
name: string;
|
|
389
|
+
trigger_type: string;
|
|
390
|
+
rrule: string | null;
|
|
391
|
+
run_at: string | null;
|
|
392
|
+
timezone: string;
|
|
393
|
+
event_kind: string | null;
|
|
394
|
+
action_type: string;
|
|
395
|
+
prompt: string;
|
|
396
|
+
skill_ref: string | null;
|
|
397
|
+
status: string;
|
|
398
|
+
next_run_at: string | null;
|
|
399
|
+
last_run_at: string | null;
|
|
400
|
+
last_error: string | null;
|
|
401
|
+
in_progress: boolean;
|
|
402
|
+
active_run_id: string | null;
|
|
403
|
+
agent_session: string | null;
|
|
404
|
+
run_started_at: string | null;
|
|
405
|
+
notify_on_complete: boolean;
|
|
406
|
+
created_by_kind: string;
|
|
407
|
+
workspace_ext_id?: string | null;
|
|
408
|
+
agent_ext_id?: string | null;
|
|
409
|
+
created_at: string;
|
|
410
|
+
updated_at: string;
|
|
411
|
+
}[]>, Error>;
|
|
412
|
+
/** List the open workspace's memory notes. */
|
|
413
|
+
declare function useMemories(workspaceId: string | undefined, options?: {
|
|
414
|
+
enabled?: boolean;
|
|
415
|
+
pinnedOnly?: boolean;
|
|
416
|
+
}): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
417
|
+
external_id: string;
|
|
418
|
+
workspace_ext_id: string;
|
|
419
|
+
content: string;
|
|
420
|
+
pinned: boolean;
|
|
421
|
+
shared: boolean;
|
|
422
|
+
source: string;
|
|
423
|
+
citations?: {
|
|
424
|
+
[key: string]: _arbidocs_client.components["schemas"]["CitationData"];
|
|
425
|
+
} | null;
|
|
426
|
+
created_by_ext_id: string;
|
|
427
|
+
created_at: string;
|
|
428
|
+
updated_at: string;
|
|
429
|
+
}[]>, Error>;
|
|
430
|
+
/** List the caller's saved agent configurations (behaviour templates). */
|
|
431
|
+
declare function useConfigs(options?: {
|
|
432
|
+
enabled?: boolean;
|
|
433
|
+
}): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
434
|
+
versions: {
|
|
435
|
+
external_id: string;
|
|
436
|
+
title: string | null;
|
|
437
|
+
created_at: string;
|
|
438
|
+
}[];
|
|
439
|
+
}>, Error>;
|
|
379
440
|
|
|
380
441
|
/**
|
|
381
442
|
* Minimal, dependency-free tooltip — a drop-in API replacement for a Radix
|
|
@@ -729,4 +790,4 @@ declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState
|
|
|
729
790
|
|
|
730
791
|
declare function cn(...inputs: ClassValue[]): string;
|
|
731
792
|
|
|
732
|
-
export { ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiProvider, type ArbiProviderProps, type ArbiUiState, AudIcon, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, DocumentEntity, type DocumentEntityProps, type DocumentLike, DocumentTable, type DocumentTableProps, EmlIcon, EntityPill, FILE_TYPE_COLORS, FileIcon, HoverCard, HoverCardContent, HoverCardTrigger, ImgIcon, PdfIcon, ProjectEntity, type ProjectEntityProps, type ProjectRelation, TagEntity, type TagEntityProps, type TagLike, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VidIcon, arbiQueryKeys, badgeVariants, buttonVariants, cn, useAgents, useArbi, useArbiUiStore, useAssistantQuery, useConversations, useDeleteAgents, useDocuments, useHealth, useSessions, useTags, useWorkspaces };
|
|
793
|
+
export { ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiProvider, type ArbiProviderProps, type ArbiUiState, AudIcon, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, DocumentEntity, type DocumentEntityProps, type DocumentLike, DocumentTable, type DocumentTableProps, EmlIcon, EntityPill, FILE_TYPE_COLORS, FileIcon, HoverCard, HoverCardContent, HoverCardTrigger, ImgIcon, PdfIcon, ProjectEntity, type ProjectEntityProps, type ProjectRelation, TagEntity, type TagEntityProps, type TagLike, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VidIcon, arbiQueryKeys, badgeVariants, buttonVariants, cn, useAgents, useArbi, useArbiUiStore, useAssistantQuery, useConfigs, useConversations, useDeleteAgents, useDocuments, useHealth, useMemories, useSessions, useTags, useTasks, useWorkspaces };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { ArbiOptions, Arbi, SSEStreamResult, SSEStreamStartData, AgentStepEvent } from '@arbidocs/sdk/browser';
|
|
4
|
-
export { AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent, MessageMetadataPayload, OutputTokensDetails, QueryOptions, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseCreatedEvent, ResponseFailedEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputTextDeltaEvent, ResponseOutputTextDoneEvent, ResponseUsage, SSEStreamCallbacks, SSEStreamResult, SSEStreamStartData, UserInputRequestEvent, UserMessageEvent } from '@arbidocs/sdk/browser';
|
|
3
|
+
import { ArbiOptions, Arbi, SSEStreamResult, SSEStreamStartData, AgentStepEvent, ArtifactEvent } from '@arbidocs/sdk/browser';
|
|
4
|
+
export { AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent, CreateMemoryRequest, CreateTaskRequest, MemoryResponse, MemorySearchRequest, MemorySearchResponse, MessageMetadataPayload, OutputTokensDetails, QueryOptions, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseCreatedEvent, ResponseFailedEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputTextDeltaEvent, ResponseOutputTextDoneEvent, ResponseUsage, SSEStreamCallbacks, SSEStreamResult, SSEStreamStartData, TaskResponse, UpdateTaskRequest, UserInputRequestEvent, UserMessageEvent } from '@arbidocs/sdk/browser';
|
|
5
5
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
6
6
|
import * as _arbidocs_client from '@arbidocs/client';
|
|
7
7
|
import { components } from '@arbidocs/client';
|
|
@@ -175,6 +175,9 @@ declare const arbiQueryKeys: {
|
|
|
175
175
|
agents: () => readonly ["arbi", "agents"];
|
|
176
176
|
sessions: () => readonly ["arbi", "sessions"];
|
|
177
177
|
health: () => readonly ["arbi", "health"];
|
|
178
|
+
tasks: () => readonly ["arbi", "tasks"];
|
|
179
|
+
memories: (workspaceId: string) => readonly ["arbi", "memories", string];
|
|
180
|
+
configs: () => readonly ["arbi", "configs"];
|
|
178
181
|
};
|
|
179
182
|
/** List the logged-in user's workspaces. */
|
|
180
183
|
declare function useWorkspaces(options?: {
|
|
@@ -317,6 +320,7 @@ declare function useAssistantQuery(): _tanstack_react_query.UseMutationResult<SS
|
|
|
317
320
|
onToken?: (content: string) => void;
|
|
318
321
|
onStreamStart?: (data: SSEStreamStartData) => void;
|
|
319
322
|
onAgentStep?: (data: AgentStepEvent) => void;
|
|
323
|
+
onArtifact?: (data: ArtifactEvent) => void;
|
|
320
324
|
onError?: (message: string) => void;
|
|
321
325
|
onComplete?: () => void;
|
|
322
326
|
}, unknown>;
|
|
@@ -376,6 +380,63 @@ declare function useHealth(options?: {
|
|
|
376
380
|
} | null | undefined;
|
|
377
381
|
available_models: string[];
|
|
378
382
|
}>, Error>;
|
|
383
|
+
/** List the caller's scheduled agent tasks. */
|
|
384
|
+
declare function useTasks(options?: {
|
|
385
|
+
enabled?: boolean;
|
|
386
|
+
}): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
387
|
+
external_id: string;
|
|
388
|
+
name: string;
|
|
389
|
+
trigger_type: string;
|
|
390
|
+
rrule: string | null;
|
|
391
|
+
run_at: string | null;
|
|
392
|
+
timezone: string;
|
|
393
|
+
event_kind: string | null;
|
|
394
|
+
action_type: string;
|
|
395
|
+
prompt: string;
|
|
396
|
+
skill_ref: string | null;
|
|
397
|
+
status: string;
|
|
398
|
+
next_run_at: string | null;
|
|
399
|
+
last_run_at: string | null;
|
|
400
|
+
last_error: string | null;
|
|
401
|
+
in_progress: boolean;
|
|
402
|
+
active_run_id: string | null;
|
|
403
|
+
agent_session: string | null;
|
|
404
|
+
run_started_at: string | null;
|
|
405
|
+
notify_on_complete: boolean;
|
|
406
|
+
created_by_kind: string;
|
|
407
|
+
workspace_ext_id?: string | null;
|
|
408
|
+
agent_ext_id?: string | null;
|
|
409
|
+
created_at: string;
|
|
410
|
+
updated_at: string;
|
|
411
|
+
}[]>, Error>;
|
|
412
|
+
/** List the open workspace's memory notes. */
|
|
413
|
+
declare function useMemories(workspaceId: string | undefined, options?: {
|
|
414
|
+
enabled?: boolean;
|
|
415
|
+
pinnedOnly?: boolean;
|
|
416
|
+
}): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
417
|
+
external_id: string;
|
|
418
|
+
workspace_ext_id: string;
|
|
419
|
+
content: string;
|
|
420
|
+
pinned: boolean;
|
|
421
|
+
shared: boolean;
|
|
422
|
+
source: string;
|
|
423
|
+
citations?: {
|
|
424
|
+
[key: string]: _arbidocs_client.components["schemas"]["CitationData"];
|
|
425
|
+
} | null;
|
|
426
|
+
created_by_ext_id: string;
|
|
427
|
+
created_at: string;
|
|
428
|
+
updated_at: string;
|
|
429
|
+
}[]>, Error>;
|
|
430
|
+
/** List the caller's saved agent configurations (behaviour templates). */
|
|
431
|
+
declare function useConfigs(options?: {
|
|
432
|
+
enabled?: boolean;
|
|
433
|
+
}): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
434
|
+
versions: {
|
|
435
|
+
external_id: string;
|
|
436
|
+
title: string | null;
|
|
437
|
+
created_at: string;
|
|
438
|
+
}[];
|
|
439
|
+
}>, Error>;
|
|
379
440
|
|
|
380
441
|
/**
|
|
381
442
|
* Minimal, dependency-free tooltip — a drop-in API replacement for a Radix
|
|
@@ -729,4 +790,4 @@ declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState
|
|
|
729
790
|
|
|
730
791
|
declare function cn(...inputs: ClassValue[]): string;
|
|
731
792
|
|
|
732
|
-
export { ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiProvider, type ArbiProviderProps, type ArbiUiState, AudIcon, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, DocumentEntity, type DocumentEntityProps, type DocumentLike, DocumentTable, type DocumentTableProps, EmlIcon, EntityPill, FILE_TYPE_COLORS, FileIcon, HoverCard, HoverCardContent, HoverCardTrigger, ImgIcon, PdfIcon, ProjectEntity, type ProjectEntityProps, type ProjectRelation, TagEntity, type TagEntityProps, type TagLike, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VidIcon, arbiQueryKeys, badgeVariants, buttonVariants, cn, useAgents, useArbi, useArbiUiStore, useAssistantQuery, useConversations, useDeleteAgents, useDocuments, useHealth, useSessions, useTags, useWorkspaces };
|
|
793
|
+
export { ArbiChat, type ArbiChatLabels, ArbiChatPanel, type ArbiChatPanelProps, type ArbiChatProps, type ArbiChatTheme, ArbiProvider, type ArbiProviderProps, type ArbiUiState, AudIcon, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, DocumentEntity, type DocumentEntityProps, type DocumentLike, DocumentTable, type DocumentTableProps, EmlIcon, EntityPill, FILE_TYPE_COLORS, FileIcon, HoverCard, HoverCardContent, HoverCardTrigger, ImgIcon, PdfIcon, ProjectEntity, type ProjectEntityProps, type ProjectRelation, TagEntity, type TagEntityProps, type TagLike, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VidIcon, arbiQueryKeys, badgeVariants, buttonVariants, cn, useAgents, useArbi, useArbiUiStore, useAssistantQuery, useConfigs, useConversations, useDeleteAgents, useDocuments, useHealth, useMemories, useSessions, useTags, useTasks, useWorkspaces };
|
package/dist/index.js
CHANGED
|
@@ -602,7 +602,10 @@ var arbiQueryKeys = {
|
|
|
602
602
|
tags: (workspaceId) => ["arbi", "tags", workspaceId],
|
|
603
603
|
agents: () => ["arbi", "agents"],
|
|
604
604
|
sessions: () => ["arbi", "sessions"],
|
|
605
|
-
health: () => ["arbi", "health"]
|
|
605
|
+
health: () => ["arbi", "health"],
|
|
606
|
+
tasks: () => ["arbi", "tasks"],
|
|
607
|
+
memories: (workspaceId) => ["arbi", "memories", workspaceId],
|
|
608
|
+
configs: () => ["arbi", "configs"]
|
|
606
609
|
};
|
|
607
610
|
function useWorkspaces(options) {
|
|
608
611
|
const arbi = useArbi();
|
|
@@ -672,6 +675,30 @@ function useHealth(options) {
|
|
|
672
675
|
enabled: options?.enabled
|
|
673
676
|
});
|
|
674
677
|
}
|
|
678
|
+
function useTasks(options) {
|
|
679
|
+
const arbi = useArbi();
|
|
680
|
+
return useQuery({
|
|
681
|
+
queryKey: arbiQueryKeys.tasks(),
|
|
682
|
+
queryFn: () => arbi.tasks.list(),
|
|
683
|
+
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
function useMemories(workspaceId, options) {
|
|
687
|
+
const arbi = useArbi();
|
|
688
|
+
return useQuery({
|
|
689
|
+
queryKey: arbiQueryKeys.memories(workspaceId ?? ""),
|
|
690
|
+
queryFn: () => arbi.memory.list({ pinnedOnly: options?.pinnedOnly }),
|
|
691
|
+
enabled: (options?.enabled ?? true) && !!workspaceId && arbi.hasWorkspace
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
function useConfigs(options) {
|
|
695
|
+
const arbi = useArbi();
|
|
696
|
+
return useQuery({
|
|
697
|
+
queryKey: arbiQueryKeys.configs(),
|
|
698
|
+
queryFn: () => arbi.agentConfig.list(),
|
|
699
|
+
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
700
|
+
});
|
|
701
|
+
}
|
|
675
702
|
function WorkspaceScreen({ theme, labels, onSelect }) {
|
|
676
703
|
const arbi = useArbi();
|
|
677
704
|
const { data: workspaces, isLoading } = useWorkspaces();
|
|
@@ -2435,6 +2462,6 @@ function DocumentTable({
|
|
|
2435
2462
|
) });
|
|
2436
2463
|
}
|
|
2437
2464
|
|
|
2438
|
-
export { ArbiChat, ArbiChatPanel, ArbiProvider, AudIcon, Avatar, AvatarFallback, AvatarImage, Badge, Button, DocumentEntity, DocumentTable, EmlIcon, EntityPill, FILE_TYPE_COLORS, FileIcon, HoverCard, HoverCardContent, HoverCardTrigger, ImgIcon, PdfIcon, ProjectEntity, TagEntity, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VidIcon, arbiQueryKeys, badgeVariants, buttonVariants, cn, useAgents, useArbi, useArbiUiStore, useAssistantQuery, useConversations, useDeleteAgents, useDocuments, useHealth, useSessions, useTags, useWorkspaces };
|
|
2465
|
+
export { ArbiChat, ArbiChatPanel, ArbiProvider, AudIcon, Avatar, AvatarFallback, AvatarImage, Badge, Button, DocumentEntity, DocumentTable, EmlIcon, EntityPill, FILE_TYPE_COLORS, FileIcon, HoverCard, HoverCardContent, HoverCardTrigger, ImgIcon, PdfIcon, ProjectEntity, TagEntity, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VidIcon, arbiQueryKeys, badgeVariants, buttonVariants, cn, useAgents, useArbi, useArbiUiStore, useAssistantQuery, useConfigs, useConversations, useDeleteAgents, useDocuments, useHealth, useMemories, useSessions, useTags, useTasks, useWorkspaces };
|
|
2439
2466
|
//# sourceMappingURL=index.js.map
|
|
2440
2467
|
//# sourceMappingURL=index.js.map
|