@arbidocs/react 0.3.138 → 0.3.139
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 +26 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -21
- package/dist/index.d.ts +27 -21
- package/dist/index.js +27 -16
- 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$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode, ComponentType } from 'react';
|
|
3
3
|
import { ArbiOptions, Arbi, SSEStreamResult, SSEStreamStartData, ResponseOutputItemDoneEvent, ArtifactEvent } from '@arbidocs/sdk/browser';
|
|
4
|
-
export { AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent,
|
|
4
|
+
export { AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent, CreateNoteRequest, CreateTaskRequest, MessageMetadataPayload, NoteResponse, NoteSearchRequest, NoteSearchResponse, OutputTokensDetails, ProjectInvoicesResponse, ProjectUsageResponse, QueryOptions, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseCreatedEvent, ResponseFailedEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputTextDeltaEvent, ResponseOutputTextDoneEvent, ResponseUsage, SSEStreamCallbacks, SSEStreamResult, SSEStreamStartData, TaskResponse, UpdateTaskRequest, UserDailyUsageResponse, UserInputRequestEvent, UserMessageEvent, WorkspaceChronologyOut } from '@arbidocs/sdk/browser';
|
|
5
5
|
import * as _arbidocs_client from '@arbidocs/client';
|
|
6
6
|
import { WebSocketServerMessage, WsTaskUpdateMessage, WsPresenceUpdateMessage, components } from '@arbidocs/client';
|
|
7
7
|
export { WebSocketServerMessage, WsBatchCompleteMessage, WsNotificationResponse, WsPresenceUpdateMessage, WsResponseCompleteMessage, WsTaskUpdateMessage, isMessageType } from '@arbidocs/client';
|
|
@@ -358,7 +358,7 @@ declare const arbiQueryKeys: {
|
|
|
358
358
|
sessions: () => readonly ["arbi", "sessions"];
|
|
359
359
|
health: () => readonly ["arbi", "health"];
|
|
360
360
|
tasks: () => readonly ["arbi", "tasks"];
|
|
361
|
-
|
|
361
|
+
notes: (workspaceId: string) => readonly ["arbi", "notes", string];
|
|
362
362
|
configs: () => readonly ["arbi", "configs"];
|
|
363
363
|
activity: () => readonly ["arbi", "activity"];
|
|
364
364
|
projects: () => readonly ["arbi", "projects"];
|
|
@@ -443,13 +443,11 @@ declare function useDocuments(workspaceId: string | undefined, options?: {
|
|
|
443
443
|
doctags: {
|
|
444
444
|
note?: string | null | undefined;
|
|
445
445
|
citations?: {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
offset_end: number;
|
|
452
|
-
};
|
|
446
|
+
passages: {
|
|
447
|
+
chunk_id: string;
|
|
448
|
+
doc_ext_id?: string | null | undefined;
|
|
449
|
+
page?: number | null | undefined;
|
|
450
|
+
}[];
|
|
453
451
|
} | null | undefined;
|
|
454
452
|
doc_ext_id: string;
|
|
455
453
|
tag_ext_id: string;
|
|
@@ -625,20 +623,20 @@ declare function useTasks(options?: {
|
|
|
625
623
|
created_at: string;
|
|
626
624
|
updated_at: string;
|
|
627
625
|
}[]>, Error>;
|
|
628
|
-
/** List the open workspace's
|
|
626
|
+
/** List the open workspace's notes. */
|
|
629
627
|
declare function useMemories(workspaceId: string | undefined, options?: {
|
|
630
628
|
enabled?: boolean;
|
|
631
629
|
pinnedOnly?: boolean;
|
|
632
630
|
}): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
633
|
-
|
|
634
|
-
citations?:
|
|
635
|
-
[key: string]: _arbidocs_client.components["schemas"]["CitationData"];
|
|
636
|
-
} | null;
|
|
631
|
+
text: string;
|
|
632
|
+
citations?: _arbidocs_client.components["schemas"]["CitationSources"] | null;
|
|
637
633
|
external_id: string;
|
|
638
634
|
workspace_ext_id: string;
|
|
639
635
|
pinned: boolean;
|
|
640
636
|
shared: boolean;
|
|
641
637
|
source: string;
|
|
638
|
+
note_date?: string | null;
|
|
639
|
+
tags: _arbidocs_client.components["schemas"]["NoteTagResponse"][];
|
|
642
640
|
created_by_ext_id: string;
|
|
643
641
|
created_at: string;
|
|
644
642
|
updated_at: string;
|
|
@@ -873,13 +871,11 @@ declare function useWorkspaceDocs(workspaceId?: string): {
|
|
|
873
871
|
doctags: {
|
|
874
872
|
note?: string | null | undefined;
|
|
875
873
|
citations?: {
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
offset_end: number;
|
|
882
|
-
};
|
|
874
|
+
passages: {
|
|
875
|
+
chunk_id: string;
|
|
876
|
+
doc_ext_id?: string | null | undefined;
|
|
877
|
+
page?: number | null | undefined;
|
|
878
|
+
}[];
|
|
883
879
|
} | null | undefined;
|
|
884
880
|
doc_ext_id: string;
|
|
885
881
|
tag_ext_id: string;
|
|
@@ -1807,6 +1803,16 @@ declare const ENTITY_MAPPINGS: {
|
|
|
1807
1803
|
NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1808
1804
|
};
|
|
1809
1805
|
};
|
|
1806
|
+
NOTE: {
|
|
1807
|
+
NAMES: {
|
|
1808
|
+
SINGULAR: string;
|
|
1809
|
+
PLURAL: string;
|
|
1810
|
+
};
|
|
1811
|
+
ICONS: {
|
|
1812
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1813
|
+
NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1814
|
+
};
|
|
1815
|
+
};
|
|
1810
1816
|
USER: {
|
|
1811
1817
|
NAMES: {
|
|
1812
1818
|
SINGULAR: string;
|
package/dist/index.d.ts
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 { ArbiOptions, Arbi, SSEStreamResult, SSEStreamStartData, ResponseOutputItemDoneEvent, ArtifactEvent } from '@arbidocs/sdk/browser';
|
|
4
|
-
export { AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent,
|
|
4
|
+
export { AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent, CreateNoteRequest, CreateTaskRequest, MessageMetadataPayload, NoteResponse, NoteSearchRequest, NoteSearchResponse, OutputTokensDetails, ProjectInvoicesResponse, ProjectUsageResponse, QueryOptions, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseCreatedEvent, ResponseFailedEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputTextDeltaEvent, ResponseOutputTextDoneEvent, ResponseUsage, SSEStreamCallbacks, SSEStreamResult, SSEStreamStartData, TaskResponse, UpdateTaskRequest, UserDailyUsageResponse, UserInputRequestEvent, UserMessageEvent, WorkspaceChronologyOut } from '@arbidocs/sdk/browser';
|
|
5
5
|
import * as _arbidocs_client from '@arbidocs/client';
|
|
6
6
|
import { WebSocketServerMessage, WsTaskUpdateMessage, WsPresenceUpdateMessage, components } from '@arbidocs/client';
|
|
7
7
|
export { WebSocketServerMessage, WsBatchCompleteMessage, WsNotificationResponse, WsPresenceUpdateMessage, WsResponseCompleteMessage, WsTaskUpdateMessage, isMessageType } from '@arbidocs/client';
|
|
@@ -358,7 +358,7 @@ declare const arbiQueryKeys: {
|
|
|
358
358
|
sessions: () => readonly ["arbi", "sessions"];
|
|
359
359
|
health: () => readonly ["arbi", "health"];
|
|
360
360
|
tasks: () => readonly ["arbi", "tasks"];
|
|
361
|
-
|
|
361
|
+
notes: (workspaceId: string) => readonly ["arbi", "notes", string];
|
|
362
362
|
configs: () => readonly ["arbi", "configs"];
|
|
363
363
|
activity: () => readonly ["arbi", "activity"];
|
|
364
364
|
projects: () => readonly ["arbi", "projects"];
|
|
@@ -443,13 +443,11 @@ declare function useDocuments(workspaceId: string | undefined, options?: {
|
|
|
443
443
|
doctags: {
|
|
444
444
|
note?: string | null | undefined;
|
|
445
445
|
citations?: {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
offset_end: number;
|
|
452
|
-
};
|
|
446
|
+
passages: {
|
|
447
|
+
chunk_id: string;
|
|
448
|
+
doc_ext_id?: string | null | undefined;
|
|
449
|
+
page?: number | null | undefined;
|
|
450
|
+
}[];
|
|
453
451
|
} | null | undefined;
|
|
454
452
|
doc_ext_id: string;
|
|
455
453
|
tag_ext_id: string;
|
|
@@ -625,20 +623,20 @@ declare function useTasks(options?: {
|
|
|
625
623
|
created_at: string;
|
|
626
624
|
updated_at: string;
|
|
627
625
|
}[]>, Error>;
|
|
628
|
-
/** List the open workspace's
|
|
626
|
+
/** List the open workspace's notes. */
|
|
629
627
|
declare function useMemories(workspaceId: string | undefined, options?: {
|
|
630
628
|
enabled?: boolean;
|
|
631
629
|
pinnedOnly?: boolean;
|
|
632
630
|
}): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
633
|
-
|
|
634
|
-
citations?:
|
|
635
|
-
[key: string]: _arbidocs_client.components["schemas"]["CitationData"];
|
|
636
|
-
} | null;
|
|
631
|
+
text: string;
|
|
632
|
+
citations?: _arbidocs_client.components["schemas"]["CitationSources"] | null;
|
|
637
633
|
external_id: string;
|
|
638
634
|
workspace_ext_id: string;
|
|
639
635
|
pinned: boolean;
|
|
640
636
|
shared: boolean;
|
|
641
637
|
source: string;
|
|
638
|
+
note_date?: string | null;
|
|
639
|
+
tags: _arbidocs_client.components["schemas"]["NoteTagResponse"][];
|
|
642
640
|
created_by_ext_id: string;
|
|
643
641
|
created_at: string;
|
|
644
642
|
updated_at: string;
|
|
@@ -873,13 +871,11 @@ declare function useWorkspaceDocs(workspaceId?: string): {
|
|
|
873
871
|
doctags: {
|
|
874
872
|
note?: string | null | undefined;
|
|
875
873
|
citations?: {
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
offset_end: number;
|
|
882
|
-
};
|
|
874
|
+
passages: {
|
|
875
|
+
chunk_id: string;
|
|
876
|
+
doc_ext_id?: string | null | undefined;
|
|
877
|
+
page?: number | null | undefined;
|
|
878
|
+
}[];
|
|
883
879
|
} | null | undefined;
|
|
884
880
|
doc_ext_id: string;
|
|
885
881
|
tag_ext_id: string;
|
|
@@ -1807,6 +1803,16 @@ declare const ENTITY_MAPPINGS: {
|
|
|
1807
1803
|
NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1808
1804
|
};
|
|
1809
1805
|
};
|
|
1806
|
+
NOTE: {
|
|
1807
|
+
NAMES: {
|
|
1808
|
+
SINGULAR: string;
|
|
1809
|
+
PLURAL: string;
|
|
1810
|
+
};
|
|
1811
|
+
ICONS: {
|
|
1812
|
+
DEFAULT: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1813
|
+
NEW: React__default.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1814
|
+
};
|
|
1815
|
+
};
|
|
1810
1816
|
USER: {
|
|
1811
1817
|
NAMES: {
|
|
1812
1818
|
SINGULAR: string;
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { useQuery, useMutation, useQueries, QueryClient, QueryClientProvider, us
|
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { connectWithReconnect, resolveCitations, summarizeCitations } from '@arbidocs/sdk/browser';
|
|
9
9
|
export { Arbi, ArbiError } from '@arbidocs/sdk/browser';
|
|
10
|
-
import { Trash2, CheckCheck, Check, MessageCircleMore, MoreVertical, MessageSquareLock, Info, FileQuestion, BookOpen, Upload, LogOut, LayoutGrid, Bell, MessageSquare, CircleUserRound, Wrench, Package, ClipboardList, UserPlus, Contact, Settings2, Users, User, StickyNote, FolderPlus, Hash, EyeOff, Eye, CaptionsOff, FolderOpen, MessageSquareMore, MessageSquarePlus, MessageSquareText, MessageSquareOff, MessagesSquare, Columns3Cog, SquarePlus, SquareM, ChevronsDown, Bot, Calendar, Search, Folder, List, SquareCheckBig, Loader2, AlertTriangle, ShieldCheck, Copy, Sparkles, FileText, GitCompareArrows, Download, Image as Image$1, CornerDownLeft, X, ArrowLeft, Send, Tags, Crown, Activity, Gauge, Gift, PartyPopper, UserCheck, FileX2, FileCheck2, Pencil, SquareArrowOutUpRight, XCircle, CheckCircle2, ArrowRight, ChevronDown, MoreHorizontal, SquarePen, FileX, SkipForward, CheckCircle } from 'lucide-react';
|
|
10
|
+
import { Trash2, CheckCheck, Check, MessageCircleMore, MoreVertical, MessageSquareLock, Info, FileQuestion, BookOpen, Upload, LogOut, LayoutGrid, Bell, MessageSquare, CircleUserRound, Wrench, Package, ClipboardList, UserPlus, Contact, Settings2, Users, User, NotebookPen, NotebookText, StickyNote, FolderPlus, Hash, EyeOff, Eye, CaptionsOff, FolderOpen, MessageSquareMore, MessageSquarePlus, MessageSquareText, MessageSquareOff, MessagesSquare, Columns3Cog, SquarePlus, SquareM, ChevronsDown, Bot, Calendar, Search, Folder, List, SquareCheckBig, Loader2, AlertTriangle, ShieldCheck, Copy, Sparkles, FileText, GitCompareArrows, Download, Image as Image$1, CornerDownLeft, X, ArrowLeft, Send, Tags, Crown, Activity, Gauge, Gift, PartyPopper, UserCheck, FileX2, FileCheck2, Pencil, SquareArrowOutUpRight, XCircle, CheckCircle2, ArrowRight, ChevronDown, MoreHorizontal, SquarePen, FileX, SkipForward, CheckCircle } from 'lucide-react';
|
|
11
11
|
import { isMessageType } from '@arbidocs/client';
|
|
12
12
|
export { isMessageType } from '@arbidocs/client';
|
|
13
13
|
import { create } from 'zustand';
|
|
@@ -591,7 +591,7 @@ var arbiQueryKeys = {
|
|
|
591
591
|
sessions: () => ["arbi", "sessions"],
|
|
592
592
|
health: () => ["arbi", "health"],
|
|
593
593
|
tasks: () => ["arbi", "tasks"],
|
|
594
|
-
|
|
594
|
+
notes: (workspaceId) => ["arbi", "notes", workspaceId],
|
|
595
595
|
configs: () => ["arbi", "configs"],
|
|
596
596
|
activity: () => ["arbi", "activity"],
|
|
597
597
|
projects: () => ["arbi", "projects"],
|
|
@@ -696,8 +696,8 @@ function useTasks(options) {
|
|
|
696
696
|
function useMemories(workspaceId, options) {
|
|
697
697
|
const arbi = useArbi();
|
|
698
698
|
return useQuery({
|
|
699
|
-
queryKey: arbiQueryKeys.
|
|
700
|
-
queryFn: () => arbi.
|
|
699
|
+
queryKey: arbiQueryKeys.notes(workspaceId ?? ""),
|
|
700
|
+
queryFn: () => arbi.notes.list({ pinnedOnly: options?.pinnedOnly }),
|
|
701
701
|
enabled: (options?.enabled ?? true) && !!workspaceId && arbi.hasWorkspace
|
|
702
702
|
});
|
|
703
703
|
}
|
|
@@ -2550,18 +2550,15 @@ function DocumentReview({
|
|
|
2550
2550
|
const list = [];
|
|
2551
2551
|
const chunkTag = /* @__PURE__ */ new Map();
|
|
2552
2552
|
for (const dt of doc?.doctags ?? []) {
|
|
2553
|
-
const
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
});
|
|
2563
|
-
for (const cid of chunkIds) if (!chunkTag.has(cid)) chunkTag.set(cid, dt.tag_ext_id);
|
|
2564
|
-
}
|
|
2553
|
+
const chunkIds = dt.citations?.passages?.map((p) => p.chunk_id) ?? [];
|
|
2554
|
+
if (chunkIds.length === 0) continue;
|
|
2555
|
+
list.push({
|
|
2556
|
+
key: dt.tag_ext_id,
|
|
2557
|
+
tagExtId: dt.tag_ext_id,
|
|
2558
|
+
statement: dt.note ?? "",
|
|
2559
|
+
chunkIds
|
|
2560
|
+
});
|
|
2561
|
+
for (const cid of chunkIds) if (!chunkTag.has(cid)) chunkTag.set(cid, dt.tag_ext_id);
|
|
2565
2562
|
}
|
|
2566
2563
|
return { findings: list, chunkToTag: chunkTag };
|
|
2567
2564
|
}, [doc?.doctags]);
|
|
@@ -4640,6 +4637,20 @@ var ENTITY_MAPPINGS = {
|
|
|
4640
4637
|
NEW: StickyNote
|
|
4641
4638
|
}
|
|
4642
4639
|
},
|
|
4640
|
+
// Workspace knowledge the assistant retains and recalls — durable free text,
|
|
4641
|
+
// optionally grounded in source passages. Distinct from ANNOTATION, which is
|
|
4642
|
+
// attached TO a document field; a NOTE is workspace-scoped and stands alone.
|
|
4643
|
+
// Stored server-side as `memories` (mem-*); "Note" is the user-facing name.
|
|
4644
|
+
NOTE: {
|
|
4645
|
+
NAMES: {
|
|
4646
|
+
SINGULAR: "Note",
|
|
4647
|
+
PLURAL: "Notes"
|
|
4648
|
+
},
|
|
4649
|
+
ICONS: {
|
|
4650
|
+
DEFAULT: NotebookText,
|
|
4651
|
+
NEW: NotebookPen
|
|
4652
|
+
}
|
|
4653
|
+
},
|
|
4643
4654
|
USER: {
|
|
4644
4655
|
NAMES: {
|
|
4645
4656
|
SINGULAR: "User",
|