@trustgraph/react-state 0.2.0
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/LICENSE +176 -0
- package/README.md +722 -0
- package/dist/NotificationProvider.d.ts +31 -0
- package/dist/NotificationProvider.d.ts.map +1 -0
- package/dist/hooks/useActivity.d.ts +18 -0
- package/dist/hooks/useActivity.d.ts.map +1 -0
- package/dist/hooks/useNotification.d.ts +27 -0
- package/dist/hooks/useNotification.d.ts.map +1 -0
- package/dist/index.cjs +6079 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +6019 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +6018 -0
- package/dist/index.js.map +1 -0
- package/dist/model/document-metadata.d.ts +15 -0
- package/dist/model/document-metadata.d.ts.map +1 -0
- package/dist/model/entity.d.ts +9 -0
- package/dist/model/entity.d.ts.map +1 -0
- package/dist/model/llm-models.d.ts +13 -0
- package/dist/model/llm-models.d.ts.map +1 -0
- package/dist/model/message.d.ts +6 -0
- package/dist/model/message.d.ts.map +1 -0
- package/dist/model/settings-types.d.ts +28 -0
- package/dist/model/settings-types.d.ts.map +1 -0
- package/dist/state/agent-tools.d.ts +18 -0
- package/dist/state/agent-tools.d.ts.map +1 -0
- package/dist/state/chat-query.d.ts +13 -0
- package/dist/state/chat-query.d.ts.map +1 -0
- package/dist/state/chat-session.d.ts +20 -0
- package/dist/state/chat-session.d.ts.map +1 -0
- package/dist/state/chat.d.ts +13 -0
- package/dist/state/chat.d.ts.map +1 -0
- package/dist/state/collections.d.ts +31 -0
- package/dist/state/collections.d.ts.map +1 -0
- package/dist/state/conversation.d.ts +13 -0
- package/dist/state/conversation.d.ts.map +1 -0
- package/dist/state/embeddings.d.ts +17 -0
- package/dist/state/embeddings.d.ts.map +1 -0
- package/dist/state/entity-query.d.ts +24 -0
- package/dist/state/entity-query.d.ts.map +1 -0
- package/dist/state/flow-classes.d.ts +63 -0
- package/dist/state/flow-classes.d.ts.map +1 -0
- package/dist/state/flow-parameters.d.ts +65 -0
- package/dist/state/flow-parameters.d.ts.map +1 -0
- package/dist/state/flows.d.ts +32 -0
- package/dist/state/flows.d.ts.map +1 -0
- package/dist/state/graph-embeddings.d.ts +19 -0
- package/dist/state/graph-embeddings.d.ts.map +1 -0
- package/dist/state/graph-query.d.ts +29 -0
- package/dist/state/graph-query.d.ts.map +1 -0
- package/dist/state/inference.d.ts +38 -0
- package/dist/state/inference.d.ts.map +1 -0
- package/dist/state/knowledge-cores.d.ts +23 -0
- package/dist/state/knowledge-cores.d.ts.map +1 -0
- package/dist/state/library.d.ts +25 -0
- package/dist/state/library.d.ts.map +1 -0
- package/dist/state/llm-models.d.ts +29 -0
- package/dist/state/llm-models.d.ts.map +1 -0
- package/dist/state/load.d.ts +33 -0
- package/dist/state/load.d.ts.map +1 -0
- package/dist/state/mcp-tools.d.ts +18 -0
- package/dist/state/mcp-tools.d.ts.map +1 -0
- package/dist/state/nlp-query.d.ts +24 -0
- package/dist/state/nlp-query.d.ts.map +1 -0
- package/dist/state/node-details.d.ts +60 -0
- package/dist/state/node-details.d.ts.map +1 -0
- package/dist/state/objects-query.d.ts +24 -0
- package/dist/state/objects-query.d.ts.map +1 -0
- package/dist/state/ontologies.d.ts +76 -0
- package/dist/state/ontologies.d.ts.map +1 -0
- package/dist/state/processing.d.ts +13 -0
- package/dist/state/processing.d.ts.map +1 -0
- package/dist/state/progress.d.ts +9 -0
- package/dist/state/progress.d.ts.map +1 -0
- package/dist/state/prompts.d.ts +22 -0
- package/dist/state/prompts.d.ts.map +1 -0
- package/dist/state/schemas.d.ts +13 -0
- package/dist/state/schemas.d.ts.map +1 -0
- package/dist/state/search.d.ts +9 -0
- package/dist/state/search.d.ts.map +1 -0
- package/dist/state/session.d.ts +9 -0
- package/dist/state/session.d.ts.map +1 -0
- package/dist/state/settings.d.ts +21 -0
- package/dist/state/settings.d.ts.map +1 -0
- package/dist/state/structured-query.d.ts +24 -0
- package/dist/state/structured-query.d.ts.map +1 -0
- package/dist/state/token-costs.d.ts +28 -0
- package/dist/state/token-costs.d.ts.map +1 -0
- package/dist/state/triples.d.ts +21 -0
- package/dist/state/triples.d.ts.map +1 -0
- package/dist/state/vector-search.d.ts +19 -0
- package/dist/state/vector-search.d.ts.map +1 -0
- package/dist/state/workbench.d.ts +20 -0
- package/dist/state/workbench.d.ts.map +1 -0
- package/dist/types.d.ts +27 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/document-encoding.d.ts +23 -0
- package/dist/utils/document-encoding.d.ts.map +1 -0
- package/dist/utils/knowledge-graph-viz.d.ts +23 -0
- package/dist/utils/knowledge-graph-viz.d.ts.map +1 -0
- package/dist/utils/knowledge-graph.d.ts +22 -0
- package/dist/utils/knowledge-graph.d.ts.map +1 -0
- package/dist/utils/row.d.ts +16 -0
- package/dist/utils/row.d.ts.map +1 -0
- package/dist/utils/vector-search.d.ts +2 -0
- package/dist/utils/vector-search.d.ts.map +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Triple } from "@trustgraph/client";
|
|
2
|
+
export declare const RDF_TYPE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
|
|
3
|
+
export declare const RDFS_LABEL = "http://www.w3.org/2000/01/rdf-schema#label";
|
|
4
|
+
export declare const DIGITAL_DOCUMENT = "https://schema.org/DigitalDocument";
|
|
5
|
+
export declare const SCHEMA_URL = "https://schema.org/url";
|
|
6
|
+
export declare const SCHEMA_KEYWORDS = "https://schema.org/keywords";
|
|
7
|
+
export interface DocumentParameters {
|
|
8
|
+
title?: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
keywords?: string[];
|
|
11
|
+
comments?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const createDocId: () => string;
|
|
14
|
+
export declare const prepareMetadata: (doc_id: string, params: any) => Triple[];
|
|
15
|
+
//# sourceMappingURL=document-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-metadata.d.ts","sourceRoot":"","sources":["../../src/model/document-metadata.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,eAAO,MAAM,QAAQ,oDAAoD,CAAC;AAC1E,eAAO,MAAM,UAAU,+CAA+C,CAAC;AACvE,eAAO,MAAM,gBAAgB,uCAAuC,CAAC;AACrE,eAAO,MAAM,UAAU,2BAA2B,CAAC;AACnD,eAAO,MAAM,eAAe,gCAAgC,CAAC;AAE7D,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,WAAW,cAEvB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,EAAE,WAAM,aAwCrD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/model/entity.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,MAAM;IAErB,KAAK,EAAE,MAAM,CAAC;IAGd,GAAG,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface EnumOption {
|
|
2
|
+
id: string;
|
|
3
|
+
description: string;
|
|
4
|
+
}
|
|
5
|
+
export interface LLMModelParameter {
|
|
6
|
+
name: string;
|
|
7
|
+
type: string;
|
|
8
|
+
description: string;
|
|
9
|
+
default: string;
|
|
10
|
+
enum: EnumOption[];
|
|
11
|
+
required: boolean;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=llm-models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-models.d.ts","sourceRoot":"","sources":["../../src/model/llm-models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/model/message.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,QAAQ,CAAC;CACzD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface Settings {
|
|
2
|
+
user: string;
|
|
3
|
+
collection: string;
|
|
4
|
+
authentication: {
|
|
5
|
+
apiKey: string;
|
|
6
|
+
};
|
|
7
|
+
graphrag: {
|
|
8
|
+
entityLimit: number;
|
|
9
|
+
tripleLimit: number;
|
|
10
|
+
maxSubgraphSize: number;
|
|
11
|
+
pathLength: number;
|
|
12
|
+
};
|
|
13
|
+
featureSwitches: {
|
|
14
|
+
ontologyEditor: boolean;
|
|
15
|
+
submissions: boolean;
|
|
16
|
+
agentTools: boolean;
|
|
17
|
+
mcpTools: boolean;
|
|
18
|
+
schemas: boolean;
|
|
19
|
+
tokenCost: boolean;
|
|
20
|
+
flowClasses: boolean;
|
|
21
|
+
flowClassEditor: boolean;
|
|
22
|
+
structuredQuery: boolean;
|
|
23
|
+
llmModels: boolean;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export declare const DEFAULT_SETTINGS: Settings;
|
|
27
|
+
export declare const SETTINGS_STORAGE_KEY = "trustgraph-settings";
|
|
28
|
+
//# sourceMappingURL=settings-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-types.d.ts","sourceRoot":"","sources":["../../src/model/settings-types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,EAAE;QACR,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;QACxB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,eAAe,EAAE;QACf,cAAc,EAAE,OAAO,CAAC;QACxB,WAAW,EAAE,OAAO,CAAC;QACrB,UAAU,EAAE,OAAO,CAAC;QACpB,QAAQ,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,EAAE,OAAO,CAAC;QACnB,WAAW,EAAE,OAAO,CAAC;QACrB,eAAe,EAAE,OAAO,CAAC;QACzB,eAAe,EAAE,OAAO,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC;KACpB,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,EAAE,QAwB9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for managing agent tools (create, read, update, delete operations)
|
|
3
|
+
* Provides CRUD operations for agent tools stored in the TrustGraph configuration
|
|
4
|
+
*/
|
|
5
|
+
export declare const useAgentTools: () => {
|
|
6
|
+
tools: any[][];
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
isError: boolean;
|
|
9
|
+
error: Error;
|
|
10
|
+
updateTool: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
|
|
11
|
+
isUpdatingTool: boolean;
|
|
12
|
+
createTool: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
|
|
13
|
+
isCreatingTool: boolean;
|
|
14
|
+
deleteTool: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
|
|
15
|
+
isDeletingTool: boolean;
|
|
16
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<any[][], Error>>;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=agent-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../../src/state/agent-tools.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;CAoKzB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for managing chat operations using React Query
|
|
3
|
+
* Provides functionality for sending chat messages and handling responses
|
|
4
|
+
* @returns {Object} Chat operations and state
|
|
5
|
+
*/
|
|
6
|
+
export declare const useChat: () => {
|
|
7
|
+
submitMessage: import("@tanstack/react-query").UseMutateFunction<string, Error, {
|
|
8
|
+
input: string;
|
|
9
|
+
}, unknown>;
|
|
10
|
+
isSubmitting: boolean;
|
|
11
|
+
submitError: Error;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=chat-query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-query.d.ts","sourceRoot":"","sources":["../../src/state/chat-query.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,eAAO,MAAM,OAAO;;eAgLuB,MAAM;;;;CAsDhD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* High-level hook for managing chat sessions
|
|
3
|
+
* Combines conversation state with inference services
|
|
4
|
+
* Handles routing, progress tracking, entity management, and notifications
|
|
5
|
+
*/
|
|
6
|
+
export declare const useChatSession: () => {
|
|
7
|
+
submitMessage: import("@tanstack/react-query").UseMutateFunction<string, Error, {
|
|
8
|
+
input: string;
|
|
9
|
+
}, unknown>;
|
|
10
|
+
isSubmitting: boolean;
|
|
11
|
+
submitError: Error;
|
|
12
|
+
};
|
|
13
|
+
export declare const useChat: () => {
|
|
14
|
+
submitMessage: import("@tanstack/react-query").UseMutateFunction<string, Error, {
|
|
15
|
+
input: string;
|
|
16
|
+
}, unknown>;
|
|
17
|
+
isSubmitting: boolean;
|
|
18
|
+
submitError: Error;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=chat-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-session.d.ts","sourceRoot":"","sources":["../../src/state/chat-session.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,eAAO,MAAM,cAAc;;eA0JgB,MAAM;;;;CAoDhD,CAAC;AAGF,eAAO,MAAM,OAAO;;eAvDuB,MAAM;;;;CAuDZ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Message } from "../model/message";
|
|
2
|
+
export type ChatMode = "graph-rag" | "agent" | "basic-llm";
|
|
3
|
+
export interface ChatState {
|
|
4
|
+
messages: Message[];
|
|
5
|
+
input: string;
|
|
6
|
+
chatMode: ChatMode;
|
|
7
|
+
setMessages: (v: Message[]) => void;
|
|
8
|
+
addMessage: (role: string, text: string, type?: "normal" | "thinking" | "observation" | "answer") => void;
|
|
9
|
+
setInput: (v: string) => void;
|
|
10
|
+
setChatMode: (mode: ChatMode) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const useChatStateStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ChatState>>;
|
|
13
|
+
//# sourceMappingURL=chat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/state/chat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,WAAW,CAAC;AAE3D,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IAEnB,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,UAAU,EAAE,CACV,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,QAAQ,KACpD,IAAI,CAAC;IACV,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACvC;AAED,eAAO,MAAM,iBAAiB,wEAyC3B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collection metadata structure
|
|
3
|
+
*/
|
|
4
|
+
export interface CollectionMetadata {
|
|
5
|
+
user: string;
|
|
6
|
+
collection: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tags: string[];
|
|
10
|
+
created_at: string;
|
|
11
|
+
updated_at: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Custom hook for managing collection operations
|
|
15
|
+
* Provides functionality for fetching, creating, updating, and deleting collections
|
|
16
|
+
* @returns {Object} Collections state and operations
|
|
17
|
+
*/
|
|
18
|
+
export declare const useCollections: () => {
|
|
19
|
+
collections: {};
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
isError: boolean;
|
|
22
|
+
error: Error;
|
|
23
|
+
updateCollection: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
|
|
24
|
+
isUpdating: boolean;
|
|
25
|
+
updateError: Error;
|
|
26
|
+
deleteCollections: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
|
|
27
|
+
isDeleting: boolean;
|
|
28
|
+
deleteError: Error;
|
|
29
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{}, Error>>;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=collections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../src/state/collections.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;CAgH1B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Message } from "../model/message";
|
|
2
|
+
export type ChatMode = "graph-rag" | "agent" | "basic-llm";
|
|
3
|
+
export interface ConversationState {
|
|
4
|
+
messages: Message[];
|
|
5
|
+
input: string;
|
|
6
|
+
chatMode: ChatMode;
|
|
7
|
+
setMessages: (v: Message[]) => void;
|
|
8
|
+
addMessage: (role: string, text: string, type?: "normal" | "thinking" | "observation" | "answer") => void;
|
|
9
|
+
setInput: (v: string) => void;
|
|
10
|
+
setChatMode: (mode: ChatMode) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const useConversation: import("zustand").UseBoundStore<import("zustand").StoreApi<ConversationState>>;
|
|
13
|
+
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/state/conversation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,WAAW,CAAC;AAE3D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IAEnB,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,UAAU,EAAE,CACV,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,QAAQ,KACpD,IAAI,CAAC;IACV,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACvC;AAED,eAAO,MAAM,eAAe,gFAyCzB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for managing token cost operations
|
|
3
|
+
* Provides functionality for fetching, deleting, and updating token costs
|
|
4
|
+
* for AI models
|
|
5
|
+
* @returns {Object} Token cost state and operations
|
|
6
|
+
*/
|
|
7
|
+
export declare const useEmbeddings: ({ flow, term }: {
|
|
8
|
+
flow: any;
|
|
9
|
+
term: any;
|
|
10
|
+
}) => {
|
|
11
|
+
embeddings: void | number[][];
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
isError: boolean;
|
|
14
|
+
error: Error;
|
|
15
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<void | number[][], Error>>;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=embeddings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embeddings.d.ts","sourceRoot":"","sources":["../../src/state/embeddings.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI;;;CAAc;;;;;;CAsD3C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for managing entity detail operations using React Query
|
|
3
|
+
* Provides functionality for fetching entity details and related triples
|
|
4
|
+
* @param entityUri - The URI of the entity to fetch details for
|
|
5
|
+
* @param flowId - The flow ID to use for the query
|
|
6
|
+
* @param collection - The collection to query
|
|
7
|
+
* @returns {Object} Entity detail state and operations
|
|
8
|
+
*/
|
|
9
|
+
export declare const useEntityDetail: (entityUri: string | undefined, flowId: string, collection: string) => {
|
|
10
|
+
detail: {
|
|
11
|
+
triples: import("@trustgraph/client").Triple[];
|
|
12
|
+
uri: string;
|
|
13
|
+
label: string;
|
|
14
|
+
};
|
|
15
|
+
isLoading: boolean;
|
|
16
|
+
isError: boolean;
|
|
17
|
+
error: Error;
|
|
18
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
19
|
+
triples: import("@trustgraph/client").Triple[];
|
|
20
|
+
uri: string;
|
|
21
|
+
label: string;
|
|
22
|
+
}, Error>>;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=entity-query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-query.d.ts","sourceRoot":"","sources":["../../src/state/entity-query.ts"],"names":[],"mappings":"AAQA;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,WAAW,MAAM,GAAG,SAAS,EAC7B,QAAQ,MAAM,EACd,YAAY,MAAM;;;;;;;;;;;;;;CA8DnB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flow class definition interface
|
|
3
|
+
*/
|
|
4
|
+
export interface FlowClassDefinition {
|
|
5
|
+
id?: string;
|
|
6
|
+
class: {
|
|
7
|
+
[key: string]: {
|
|
8
|
+
[queueName: string]: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
flow: {
|
|
12
|
+
[key: string]: {
|
|
13
|
+
[queueName: string]: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
interfaces: {
|
|
17
|
+
[key: string]: string | {
|
|
18
|
+
request: string;
|
|
19
|
+
response: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
description?: string;
|
|
23
|
+
tags?: string[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Custom hook for managing flow class operations
|
|
27
|
+
* Provides functionality for fetching, creating, updating, and deleting flow classes
|
|
28
|
+
* @returns {Object} Flow class state and operations
|
|
29
|
+
*/
|
|
30
|
+
export declare const useFlowClasses: () => {
|
|
31
|
+
flowClasses: FlowClassDefinition[];
|
|
32
|
+
isLoading: boolean;
|
|
33
|
+
error: Error;
|
|
34
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<FlowClassDefinition[], Error>>;
|
|
35
|
+
getFlowClass: (id: string) => FlowClassDefinition | undefined;
|
|
36
|
+
exists: (id: string) => boolean;
|
|
37
|
+
createFlowClass: import("@tanstack/react-query").UseMutateAsyncFunction<FlowClassDefinition, Error, {
|
|
38
|
+
id: string;
|
|
39
|
+
flowClass: Omit<FlowClassDefinition, "id">;
|
|
40
|
+
}, unknown>;
|
|
41
|
+
updateFlowClass: import("@tanstack/react-query").UseMutateAsyncFunction<FlowClassDefinition, Error, {
|
|
42
|
+
id: string;
|
|
43
|
+
flowClass: Partial<Omit<FlowClassDefinition, "id">>;
|
|
44
|
+
}, unknown>;
|
|
45
|
+
deleteFlowClass: import("@tanstack/react-query").UseMutateAsyncFunction<void, Error, string, unknown>;
|
|
46
|
+
duplicateFlowClass: import("@tanstack/react-query").UseMutateAsyncFunction<FlowClassDefinition, Error, {
|
|
47
|
+
sourceId: string;
|
|
48
|
+
targetId: string;
|
|
49
|
+
}, unknown>;
|
|
50
|
+
isCreating: boolean;
|
|
51
|
+
isUpdating: boolean;
|
|
52
|
+
isDeleting: boolean;
|
|
53
|
+
isDuplicating: boolean;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Generate a unique flow class ID
|
|
57
|
+
*/
|
|
58
|
+
export declare const generateFlowClassId: (baseName?: string) => string;
|
|
59
|
+
/**
|
|
60
|
+
* Validate flow class ID format
|
|
61
|
+
*/
|
|
62
|
+
export declare const isValidFlowClassId: (id: string) => boolean;
|
|
63
|
+
//# sourceMappingURL=flow-classes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-classes.d.ts","sourceRoot":"","sources":["../../src/state/flow-classes.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE;QACL,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;SAC7B,CAAC;KACH,CAAC;IACF,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;SAC7B,CAAC;KACH,CAAC;IACF,UAAU,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GACR,MAAM,GACN;YACE,OAAO,EAAE,MAAM,CAAC;YAChB,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;KACP,CAAC;IACF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;uBAuSJ,MAAM,KAAG,mBAAmB,GAAG,SAAS;iBAM9C,MAAM,KAAG,OAAO;;YA/LvB,MAAM;mBACC,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC;;;YAuCtC,MAAM;mBACC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;;;;kBA+EzC,MAAM;kBACN,MAAM;;;;;;CAsFrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,iBAAuB,KAAG,MAI7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,IAAI,MAAM,KAAG,OAG/C,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
interface ParameterSchema {
|
|
2
|
+
type: "string" | "number" | "integer" | "boolean";
|
|
3
|
+
description?: string;
|
|
4
|
+
default?: unknown;
|
|
5
|
+
enum?: EnumOption[] | string[];
|
|
6
|
+
minimum?: number;
|
|
7
|
+
maximum?: number;
|
|
8
|
+
pattern?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
helper?: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
}
|
|
13
|
+
interface EnumOption {
|
|
14
|
+
id: string;
|
|
15
|
+
description: string;
|
|
16
|
+
}
|
|
17
|
+
interface ParameterDefinitions {
|
|
18
|
+
[definitionName: string]: ParameterSchema;
|
|
19
|
+
}
|
|
20
|
+
interface FlowParameterMetadata {
|
|
21
|
+
description: string;
|
|
22
|
+
order: number;
|
|
23
|
+
type: string;
|
|
24
|
+
advanced?: boolean;
|
|
25
|
+
"controlled-by"?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Custom hook for fetching parameter definitions for a flow class
|
|
29
|
+
* @param flowClassName - The name of the flow class to fetch parameters for
|
|
30
|
+
* @returns Parameter definitions, mapping, and loading states
|
|
31
|
+
*/
|
|
32
|
+
export declare const useFlowParameters: (flowClassName?: string) => {
|
|
33
|
+
parameterDefinitions: ParameterDefinitions;
|
|
34
|
+
parameterMapping: {
|
|
35
|
+
[key: string]: string;
|
|
36
|
+
};
|
|
37
|
+
parameterMetadata: {
|
|
38
|
+
[key: string]: FlowParameterMetadata;
|
|
39
|
+
};
|
|
40
|
+
isLoading: boolean;
|
|
41
|
+
isError: boolean;
|
|
42
|
+
error: Error;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Custom hook for parameter validation
|
|
46
|
+
* @param parameterDefinitions - The parameter schema definitions
|
|
47
|
+
* @param parameterMapping - Maps flow param names to definition names
|
|
48
|
+
* @param parameterMetadata - Flow parameter metadata including controlled-by relationships
|
|
49
|
+
* @param parameterValues - Current parameter values
|
|
50
|
+
* @returns Validation result with isValid flag and errors object
|
|
51
|
+
*/
|
|
52
|
+
export declare const useParameterValidation: (parameterDefinitions: ParameterDefinitions, parameterMapping: {
|
|
53
|
+
[key: string]: string;
|
|
54
|
+
}, parameterMetadata: {
|
|
55
|
+
[key: string]: FlowParameterMetadata;
|
|
56
|
+
}, parameterValues: {
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
}) => {
|
|
59
|
+
isValid: boolean;
|
|
60
|
+
errors: {
|
|
61
|
+
[key: string]: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export type { ParameterSchema, EnumOption, ParameterDefinitions, FlowParameterMetadata, };
|
|
65
|
+
//# sourceMappingURL=flow-parameters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-parameters.d.ts","sourceRoot":"","sources":["../../src/state/flow-parameters.ts"],"names":[],"mappings":"AAOA,UAAU,eAAe;IACvB,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,EAAE,GAAG,MAAM,EAAE,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB;AAGD,UAAU,oBAAoB;IAC5B,CAAC,cAAc,EAAE,MAAM,GAAG,eAAe,CAAC;CAC3C;AAGD,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,gBAAgB,MAAM;;;;;;;;;;;CAsFvD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GACjC,sBAAsB,oBAAoB,EAC1C,kBAAkB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAC3C,mBAAmB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAAA;CAAE,EAC3D,iBAAiB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE;;;;;CAwH5C,CAAC;AAEF,YAAY,EACV,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,qBAAqB,GACtB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for managing flow operations
|
|
3
|
+
* Provides functionality for fetching, deleting, and creating flows
|
|
4
|
+
* @returns {Object} Flow state and operations
|
|
5
|
+
*/
|
|
6
|
+
export declare const useFlows: () => {
|
|
7
|
+
flows: any[];
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
isError: boolean;
|
|
10
|
+
error: Error;
|
|
11
|
+
flowClasses: any[][];
|
|
12
|
+
isFlowClassesLoading: boolean;
|
|
13
|
+
isFlowClassesError: boolean;
|
|
14
|
+
flowClassesError: Error;
|
|
15
|
+
startFlow: import("@tanstack/react-query").UseMutateFunction<void, Error, {
|
|
16
|
+
id: string;
|
|
17
|
+
flowClass: string;
|
|
18
|
+
description: string;
|
|
19
|
+
parameters?: Record<string, unknown>;
|
|
20
|
+
onSuccess?: () => void;
|
|
21
|
+
}, unknown>;
|
|
22
|
+
isStarting: boolean;
|
|
23
|
+
startError: Error;
|
|
24
|
+
stopFlows: import("@tanstack/react-query").UseMutateFunction<void, Error, {
|
|
25
|
+
ids: string[];
|
|
26
|
+
onSuccess?: () => void;
|
|
27
|
+
}, unknown>;
|
|
28
|
+
isStopping: boolean;
|
|
29
|
+
stopError: Error;
|
|
30
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<any[], Error>>;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=flows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/state/flows.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;YA6EX,MAAM;mBACC,MAAM;qBACJ,MAAM;qBACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;oBACxB,MAAM,IAAI;;;;;aA+BjB,MAAM,EAAE;oBACD,MAAM,IAAI;;;;;CAwD3B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for managing token cost operations
|
|
3
|
+
* Provides functionality for fetching, deleting, and updating token costs
|
|
4
|
+
* for AI models
|
|
5
|
+
* @returns {Object} Token cost state and operations
|
|
6
|
+
*/
|
|
7
|
+
export declare const useGraphEmbeddings: ({ flow, vecs, limit, collection }: {
|
|
8
|
+
flow: any;
|
|
9
|
+
vecs: any;
|
|
10
|
+
limit: any;
|
|
11
|
+
collection: any;
|
|
12
|
+
}) => {
|
|
13
|
+
graphEmbeddings: import("@trustgraph/client").Value[];
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
isError: boolean;
|
|
16
|
+
error: Error;
|
|
17
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@trustgraph/client").Value[], Error>>;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=graph-embeddings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-embeddings.d.ts","sourceRoot":"","sources":["../../src/state/graph-embeddings.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI;;;;;CAAiC;;;;;;CAgDnE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Subgraph } from "../utils/knowledge-graph-viz";
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook for managing graph visualization operations using React Query
|
|
4
|
+
* Provides functionality for fetching and updating graph subgraphs
|
|
5
|
+
* @param entityUri - The URI of the entity to build the graph around
|
|
6
|
+
* @param flowId - The flow ID to use for the query
|
|
7
|
+
* @param collection - The collection to query
|
|
8
|
+
* @returns {Object} Graph state and operations
|
|
9
|
+
*/
|
|
10
|
+
export declare const useGraphSubgraph: (entityUri: string | undefined, flowId: string, collection: string) => {
|
|
11
|
+
view: Subgraph;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
isError: boolean;
|
|
14
|
+
error: Error;
|
|
15
|
+
updateSubgraph: import("@tanstack/react-query").UseMutateFunction<Subgraph, Error, {
|
|
16
|
+
nodeId: string;
|
|
17
|
+
currentGraph: Subgraph;
|
|
18
|
+
}, unknown>;
|
|
19
|
+
isUpdating: boolean;
|
|
20
|
+
navigateByRelationship: import("@tanstack/react-query").UseMutateFunction<Subgraph, Error, {
|
|
21
|
+
selectedNodeId: string;
|
|
22
|
+
relationshipUri: string;
|
|
23
|
+
direction: "incoming" | "outgoing";
|
|
24
|
+
currentGraph: Subgraph;
|
|
25
|
+
}, unknown>;
|
|
26
|
+
isNavigating: boolean;
|
|
27
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<Subgraph, Error>>;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=graph-query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-query.d.ts","sourceRoot":"","sources":["../../src/state/graph-query.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAC3B,WAAW,MAAM,GAAG,SAAS,EAC7B,QAAQ,MAAM,EACd,YAAY,MAAM;;;;;;gBAoDN,MAAM;sBACA,QAAQ;;;;wBAkCN,MAAM;yBACL,MAAM;mBACZ,UAAU,GAAG,UAAU;sBACpB,QAAQ;;;;CA8D3B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Value } from "@trustgraph/client";
|
|
2
|
+
export interface GraphRagOptions {
|
|
3
|
+
entityLimit?: number;
|
|
4
|
+
tripleLimit?: number;
|
|
5
|
+
maxSubgraphSize?: number;
|
|
6
|
+
pathLength?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface GraphRagResult {
|
|
9
|
+
response: string;
|
|
10
|
+
entities: Value[];
|
|
11
|
+
}
|
|
12
|
+
export interface AgentCallbacks {
|
|
13
|
+
onThink?: (thought: string) => void;
|
|
14
|
+
onObserve?: (observation: string) => void;
|
|
15
|
+
onAnswer?: (answer: string) => void;
|
|
16
|
+
onError?: (error: string) => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Hook providing low-level access to LLM inference services
|
|
20
|
+
* No conversation state or side effects - just the API calls
|
|
21
|
+
*/
|
|
22
|
+
export declare const useInference: () => {
|
|
23
|
+
graphRag: import("@tanstack/react-query").UseMutateAsyncFunction<GraphRagResult, Error, {
|
|
24
|
+
input: string;
|
|
25
|
+
options?: GraphRagOptions;
|
|
26
|
+
collection: string;
|
|
27
|
+
}, unknown>;
|
|
28
|
+
textCompletion: import("@tanstack/react-query").UseMutateAsyncFunction<string, Error, {
|
|
29
|
+
systemPrompt: string;
|
|
30
|
+
input: string;
|
|
31
|
+
}, unknown>;
|
|
32
|
+
agent: import("@tanstack/react-query").UseMutateAsyncFunction<string, Error, {
|
|
33
|
+
input: string;
|
|
34
|
+
callbacks?: AgentCallbacks;
|
|
35
|
+
}, unknown>;
|
|
36
|
+
isLoading: boolean;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=inference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../src/state/inference.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,KAAK,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY;;eAaZ,MAAM;kBACH,eAAe;oBACb,MAAM;;;sBAiCJ,MAAM;eACb,MAAM;;;eAcN,MAAM;oBACD,cAAc;;;CAmC/B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for managing knowledge core operations
|
|
3
|
+
* Provides functionality for fetching, deleting, down/uploading cores
|
|
4
|
+
* @returns {Object} Knowledge core state and operations
|
|
5
|
+
*/
|
|
6
|
+
export declare const useKnowledgeCores: () => {
|
|
7
|
+
knowledgeCores: {
|
|
8
|
+
id: string;
|
|
9
|
+
}[];
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
isError: boolean;
|
|
12
|
+
error: Error;
|
|
13
|
+
deleteKnowledgeCores: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
|
|
14
|
+
isDeleting: boolean;
|
|
15
|
+
deleteError: Error;
|
|
16
|
+
loadKnowledgeCores: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
|
|
17
|
+
isLoadingCores: boolean;
|
|
18
|
+
loadError: Error;
|
|
19
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
20
|
+
id: string;
|
|
21
|
+
}[], Error>>;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=knowledge-cores.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge-cores.d.ts","sourceRoot":"","sources":["../../src/state/knowledge-cores.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;CAiH7B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for managing document library operations
|
|
3
|
+
* Provides functionality for fetching, deleting, and submitting documents
|
|
4
|
+
* @returns {Object} Library state and operations
|
|
5
|
+
*/
|
|
6
|
+
export declare const useLibrary: () => {
|
|
7
|
+
documents: import("@trustgraph/client").DocumentMetadata[];
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
isError: boolean;
|
|
10
|
+
error: Error;
|
|
11
|
+
deleteDocuments: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
|
|
12
|
+
isDeleting: boolean;
|
|
13
|
+
deleteError: Error;
|
|
14
|
+
submitDocuments: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
|
|
15
|
+
isSubmitting: boolean;
|
|
16
|
+
submitError: Error;
|
|
17
|
+
uploadFiles: import("@tanstack/react-query").UseMutateFunction<any, Error, void, unknown>;
|
|
18
|
+
isUploadingFiles: boolean;
|
|
19
|
+
filesUploadError: Error;
|
|
20
|
+
uploadTexts: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
|
|
21
|
+
isUploadingTexts: boolean;
|
|
22
|
+
textsUploadError: Error;
|
|
23
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@trustgraph/client").DocumentMetadata[], Error>>;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=library.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/state/library.ts"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;CA0NtB,CAAC"}
|